query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
sequencelengths
0
101
negative_scores
sequencelengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Starts the local server and listens to it at port 8080
async function localServerStart() { var http = require('http'); //creating server http.createServer(async function (request, response) { var body = []; request.on('error', (err) => { console.error(err); }).on('data', (chunk) => { body.push(chunk); }).on('end', async () => { var result = Buffer.concat(body).toString(); // BEGINNING OF NEW STUFF response.on('error', (err) => { console.error(err); }); //getting the request as an JSON obj var obj = JSON.parse(result); // console.log("obj below"); // console.log(obj); /** *sending the request to the handler and waiting for result */ var answer = await handleRequest(obj); response.statusCode = 200; response.setHeader('Content-Type', 'application/json'); //writing the response for the request if (obj.method == "query" || obj.method == "pull" || obj.method == "blob" || obj.method == "gitClone") { response.write(answer); } else { response.write(obj.method); } response.end(); }); }).listen(localServerExtensionPort); //the server object listens on port 8080 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function startListening() {\n\tapp.listen(8080, function() {\n\t\tconsole.log(\"🐢 http://localhost:8080\");\n\t});\n}", "function startListening() {\n\tapp.listen(8080, function() {\n\t\tconsole.log(\"🐢 http://localhost:8080\");\n\t});\n}", "function startListening() {\n\tapp.listen(8080, function() {\n\t\tconsole.log(\"Sever started at http://localhost:8080 Start chatting!\");\n\t});\n}", "function startListening() {\n app.listen(8000, function() {\n console.log(\"server is started: http://localhost:8000 ⚡️\");\n });\n}", "function startServer() {\n Http.listen(env.serverPort, () => {\n console.log('Listening at :' + env.serverPort + '...');\n });\n}", "function serverStart() {\n\tvar port = server.address().port;\n\tconsole.log('Server listening on port ' + port);\n}", "function start(){\n server = http.createServer(app).listen( config.port );\n logger.info((new Date()).toString()+ \":: PROJECT_NAME server listening on port::\", config.port, \", environment:: \", app.settings.env);\n}", "function startServer () {\n require('http').createServer(function (req, res) {\n req.addListener('end', function (e) {\n //\n // Serve files!\n //\n server.serve(req, res, function (resp) {\n if (resp && (resp.status === 404)) { // If the file wasn't found\n\n server.serveFile('/index.html', 302, resp.headers, req, res);\n }\n });\n });\n }).listen(8080);\n\n console.log('server now listening on port: 8080')\n}", "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Application listening at http://' + host + ':' + port);\n}", "function serverStart() {\n var port = this.address().port;\n console.log(\"Server listening on port \" + port);\n}", "function listening(){\n console.log('server running');\n console.log(`running on localhost: ${port}`);\n}", "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Listening at http://' + host + ':' + port);\n}", "start() {\n // listen to coming requests\n const port = Number(this.config.port || process.env.PORT || 0);\n const host = this.config.host || '127.0.0.1';\n this.server.listen(port, host, () => {\n this.app.locals.url = `${this.app.locals.schema}://${host}:${port}`;\n log.info(`Server started on ${this.app.locals.url}`);\n });\n }", "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Example app listening at http://' + host + ':' + port);\n}", "function StartWebServer(port) {\n if (port == 0 || port == 65535) return;\n obj.args.port = port;\n if (obj.tlsServer != null) {\n if (obj.args.lanonly == true) {\n obj.tcpServer = obj.tlsServer.listen(port, function () { console.log('MeshCentral HTTPS web server running on port ' + port + '.'); });\n } else {\n obj.tcpServer = obj.tlsServer.listen(port, function () { console.log('MeshCentral HTTPS web server running on ' + certificates.CommonName + ':' + port + '.'); });\n }\n } else {\n obj.tcpServer = obj.app.listen(port, function () { console.log('MeshCentral HTTP web server running on port ' + port + '.'); });\n }\n }", "function startServer(){\n server.start((err) => {\n if (err) {\n throw err;\n }\n console.log(`Server running at: ${server.info.uri}`);\n //pino.info('Server running at 8080')\n });\n}", "function listening(){\n console.log(\"server running\"); \n console.log(`running on localhost: ${port}`);\n}", "function listen() {\r\n var host = server.address().address;\r\n var port = server.address().port;\r\n console.log('Example app listening at http://' + host + ':' + port);\r\n}", "function listen() {\r\n var host = server.address().address;\r\n var port = server.address().port;\r\n console.log('Example app listening at http://' + host + ':' + port);\r\n}", "function listen() {\r\n var host = server.address().address;\r\n var port = server.address().port;\r\n console.log('Example app listening at http://' + host + ':' + port);\r\n}", "function listening(){\n console.log(\"server running\"); \n console.log(`running on localhost: ${port}`);\n}", "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Example app listening at http://' + host + ':' + port);\n}", "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Example app listening at http://' + host + ':' + port);\n}", "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Example app listening at http://' + host + ':' + port);\n}", "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Example app listening at http://' + host + ':' + port);\n}", "function listen() {\n var host = server.address().address;\n var port = server.address().port;\n console.log('Example app listening at http://' + host + ':' + port);\n}", "startListening() {\n\t\tthis.server.listen(this.port, () => {\n\t\t\tconsole.log('Server started listening on port', this.port);\n\t\t});\n\t}", "function start(port) {\n users_info_data.openUsersInfoDatabase();\n let service = HTTP.createServer(handle);\n try { service.listen(port, 'localhost'); }\n catch (err) { throw err; }\n console.log(\"Visit localhost:\" + port);\n}", "function start(options) {\n app.get('/', function(req, res) {\n res.end('Hello World');\n });\n \n monitor.app(app.listen(options.port));\n }", "start (port) {\n // Listen for and handle incoming HTTP requests\n this.server.on('request', (request, response) => {\n const res = new Response(response)\n this.handleRequest(request, res)\n })\n\n this.server.listen(port)\n }", "function onListening() {\n var serverURL = \"http://localhost:\" + config.port;\n console.log(\"server listening on \" + serverURL);\n}", "function startListening() {\n app.listen(port);\n console.log('+---------------------------+');\n console.log(`| express listening on ${port} |`);\n console.log('+---------------------------+\\n');\n }", "function listening(){\n console.log(`Server is running on localhost: ${port}`);\n}", "function startHttpServer() {\n var server = http.createServer(httpRequestHandler);\n var port = program.port || httpRequestHandler.get('port');\n\n server.listen(port, function() {\n console.log('\\nPersonalization server listening on port ' + port);\n });\n}", "function startServer() {\r\n\tif ((process.argv[2] == 'help' || !process.argv[2]) && useCommandLine) {\r\n\t\tconsole.log('node index.js {local,online} [shutdownKey] [port]');\r\n\t\tprocess.exit(0);\r\n\t}\r\n\tvar local = process.argv[2] == 'local';\r\n\tvar shutdownK = process.argv[3] || 'q';\r\n\tvar port = process.argv[4] || 8000;\r\n\tif (local) {\r\n\t\tinitServer('localhost', port);\r\n\t} else {\r\n\t\tvar ip = ipGetter.address();\r\n\t\tconsole.log('Connect to: http://' + ip + ':8000/');\r\n\t\tinitServer(ip, port);\r\n\t}\r\n\tif (useCommandLine) {\r\n\t\tbindShutdownKey(shutdownK);\r\n\t}\r\n\tnetInit();\r\n\tMaps.forEach(map => map.data.id = newID(false));\r\n\tlog(0, 'Map id\\'s set');\r\n\tloadMap(Maps[0]);\r\n\tsetInterval(mainLoop, msPerFrame);\r\n}", "function start() {\n app.listen(app.get('port'), function() {\n console.log('Node app is running on port', app.get('port'));\n });\n}", "function listen(port){\n this.http.listen(port, function(){\n console.log('Running on http://localhost:' + port);\n });\n}", "function listening() {\n console.log(`Server is running on localhost:${port}`);\n}", "async listen() {\n const { resolvedPort } = this;\n this.httpServer.listen(resolvedPort);\n rapid.log(`Listening on port ${resolvedPort}`);\n }", "start() {\r\n this.server.listen(process.env.PORT, () => {\r\n logger.info(colors.green(`● API server running on [::]:${ process.env.PORT }`));\r\n });\r\n }", "function onListening() {\n // 忽略80端口\n const _port = (port != 80 ? ':' + port : '');\n const url = \"http://\" + hostname + _port + '/';\n debug(`${staticDir} server running at ${url}`);\n console.log(`${staticDir} server running at`,url);\n\n if(!argv.silent){\n openBrowserURL(url)\n }\n\n}", "serve() {\n this.server.listen(this.port);\n console.log(`Port: ${this.port}`);\n }", "function start(){\n var port = process.env.PORT || config.server.port;\n app.listen(port);\n console.log(\"server pid %s listening on port %s in %s mode\",\n process.pid,\n port,\n app.get('env')\n );\n}", "function onListening() {\n log.info('%s listening at %s', config.appName, server.address().address);\n console.log('Server started on %s', server.address().address);\n console.log(`Test using:\\n curl -kisS ${server.address().address}/hello`);\n}", "function onListening() {\n var addr = server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port;\n debug('Listening on ' + bind);\n console.log('http://localhost:' + addr.port);\n}", "start() {\n\t\tlet self = this;\n\t\tthis.app.listen(this.app.get(\"port\"), () => {\n\t\t\tconsole.log(`Server Listening for port: ${self.app.get(\"port\")}`);\n\t\t});\n\t}", "async start () {\n assert(!this._server, 'http server is already started');\n this._app = express();\n this._app.use('/healthcheck', healthcheck(this._config));\n this._app.use('/', video(this._counterService, this._config));\n\n this._server = http.createServer(this._app);\n this._statsServer = new StatsServer(this._server, this._communicationMesh);\n await this._statsServer.start();\n this._logger.info({ port: this._config.get('LISTEN_PORT') }, 'Goint to listen http:// and ws:// at port');\n this._server.listen(this._config.get('LISTEN_PORT'));\n }", "function start(port) {\n app.listen(port, () => console.log(`Server started on port ${port}`));\n}", "function start_server () {\n var server = new msp.Proxy();\n server.listen(8050);\n log('Proxying from http://:8050');\n}", "function listening(){\n console.log(\"server running\");\n console.log(`running on localhost: {$port}`);\n}", "start() {\n this._app.listen(config.get('web.port'), config.get('web.address'));\n LogService.info(\"ApiHandler\", \"API Listening on \" + config.get(\"web.address\") + \":\" + config.get(\"web.port\"));\n }", "function startServer() {\n\tapp.serverInstance = server.listen(config.PORT, config.HOST, function() {\n\t\tlogger.info('Express server listening on %d, in %s mode...', config.PORT, config.ENV);\n\t});\n}", "function start(port) {\n app.listen(port, () => console.log(`Server is up on ${port}`));\n}", "function onListening() {\n var addr = server.address()\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port\n debug('HTTP server listening on ' + bind)\n}", "function serve() {\n var server = gls.static('dist/', PORT);\n //server.start();\n var promise = server.start();\n //optionally handle the server process exiting\n promise.then(function(result) {\n console.log('server started')\n openBrowser()\n });\n}", "function onListening () {\n const addr = server.address()\n console.log(`Listening on https://localhost:${addr.port}`)\n}", "function listening() {\n console.log(`localhost:${port}`);\n}", "function serve() {\n var http = require('http');\n http.createServer(function(req, res){\n fs.readFile(html_source, 'utf8', function(err, data) {\n if (err) {\n res.send(err);\n console.log(err);\n }\n res.end(data.toString());\n });\n }).listen(port);\n console.log(\"\\nRunning \".yellow + \"joy\".blue + \" development server\".yellow);\n console.log(\"http://127.0.0.1:1337\".green);\n console.log(\"Ctrl-C to Stop\\n\".green);\n}", "startServer() {\n let requestHandler = this.onRequest.bind(this);\n let port = this.port;\n http.createServer(requestHandler).listen(port);\n console.log(\"Server running at http://localhost:%d\", port);\n }", "function onListening() {\n logger.info('Webserver listening on port ' + server.address().port)\n }", "function run(httpServer) {\n httpServer.listen();\n}", "function listen () {\n\t\n\tif (app.get('env') === 'test') return;\n \tapp.listen(port);\n \tconsole.log('Express app started on port ' + port);\n}", "function start(){\n var port = process.env.PORT || 3030;\n app.listen(port);\n console.log(\"server pid %s listening on port %s in %s mode\",\n process.pid,\n port,\n app.get('env')\n );\n}", "function onListening() {\n\tconst addr = server.address();\n\tdebug(`Listening on http://localhost:${addr.port}`);\n\tappLogger.info('app started');\n}", "function onListening() {\n\tdebug('Listening on port ' + server.address().port);\n}", "function startServer() {\n\tserver = require(__dirname + '/NetworkServer');\n\tserver.startServer();\n}", "function onListening() {\n Object.keys(httpServers).forEach(key => {\n var httpServer = httpServers[key];\n var addr = httpServer.address()||{};\n var bind = typeof addr === \"string\"\n ? \"pipe \" + addr\n : \"port \" + addr.port;\n debug(\"Listening on \" + bind);\n })\n}", "start() {\n // Start the app on the specific interface (and port).\n this.server.listen(this.port, () => {\n console.log('%s: Node server started on %s:%d ...',\n Date(Date.now() ), this.ip, this.port);\n });\n\n // Start the runtime\n RED.start();\n }", "function start(port) {\n app.listen(port, () => {\n console.log(`im listen for the port ${port}`);\n });\n}", "start(){\n this.applyMiddleWare();\n this.init();\n this.instance.listen(process.env.SERVER_PORT,()=>{\n console.log(`Server started on port ${process.env.SERVER_HOST}.`);\n console.log(`Navigate to http://${process.env.SERVER_HOST}:${process.env.SERVER_PORT}`);\n });\n }", "function onListening() {\n const addr = server.address();\n const bind =\n typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port;\n console.log(`Up on http://localhost:${addr.port}`);\n}", "start() {\n this._.on('request', this.onRequest.bind(this));\n this._.on('error', this.onError.bind(this));\n this._.on('listening', this.onListening.bind(this));\n\n this._.listen(this.config.port);\n }", "function startServer() {\n var server = new Server();\n console.log('server started');\n}", "function startListener() {\n console.log(\"Starting WebApp on port \" + app_port);\n app.listen(app_port);\n console.log(\"WebApp is now listening on port \" + app_port + \"\\n\");\n}", "function onListening() {\n const addr = server.address()\n const bind = typeof addr === 'string' ? 'pipe ' + addr : 'port ' + addr.port\n mainWindow.webContents.send('listening', bind)\n}", "function onListening() {\n var addr = server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port;\n log.debug('HTTP server listening on ' + bind);\n }", "function startServer(port, cb) { \n server = http.createServer(app);\n server.listen(port, function (err) {\n console.log('Listening on ' + port);\n if (cb !== undefined) { cb(err); }\n });\n}", "startWebServer() {\n express.listen(this.master.CLA.port, () => console.log(`Running on port ${this.master.CLA.port}`))\n this.loadRoutes()\n }", "function startWebserver() {\n\n if ( curProtocol === 'https' ) {\n const credentials = {\n key: fs.readFileSync( configs.protocol[ curProtocol ].privateKey ),\n cert: fs.readFileSync( configs.protocol[ curProtocol ].certificate ),\n ca: fs.readFileSync( configs.protocol[ curProtocol ].ca )\n };\n const https_server = https.createServer( credentials, handleRequest );\n\n // start HTTPS webserver\n https_server.listen( configs.protocol[ curProtocol ].port );\n\n console.log( 'HTTPS server started at: https://' + configs.domain + ':' + configs.protocol[ curProtocol ].port );\n\n } else if ( curProtocol === 'http' ) {\n const http_server = http.createServer( handleRequest );\n\n // start HTTP webserver\n http_server.listen( configs.protocol[ curProtocol ].port );\n\n console.log( 'HTTP server started at: http://' + configs.domain + ':' + configs.protocol[ curProtocol ].port);\n\n } else {\n console.error( \"neither 'http' or 'https' configuration specified\" );\n }\n }", "function start (opts) {\n const port = opts.server\n const server = http.createServer(onRequest)\n server.listen(port, 'localhost', onListen)\n\n function onListen () {\n console.log(`${pkgJSON.name} starting on http://localhost:${port}`)\n }\n\n function onRequest (req, res) {\n handleRequest(opts, req, res)\n }\n}", "function onListening() {\n const address = httpServer.address().address;\n console.info(`Listening port ${port} on ${address} (with os.hostname=${os.hostname()})`);\n const entryFqdn = getEntryFqdn(address, port);\n console.info(`Use browser to open: ${entryFqdn}`);\n}", "function onListening() {\n const addr = server.address()\n const bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port: ' + addr.port\n //打印log\n console.log(CGlobal.logLang('clothingshop:server HTTP启动成功,{0} IP地址为:{1}', bind, ip || 'localhost'))\n console.timeEnd('HTTP service start time is')\n console.log('界面访问 http://%s:%s%s/index', 'localhost', addr.port, contextPath === '/' ? '' : contextPath)\n console.log('swagger界面访问 http://%s:%s%s/swagger-ui/', 'localhost', addr.port, contextPath === '/' ? '' : contextPath)\n // console.log('Node 界面访问 http://%s:%s/superLogin', hostname, addr.port);\n // console.log('Vue 界面访问 http://%s:%s/v-index', hostname, addr.port);\n // console.log('Angular 界面访问 http://%s:%s/ng-index', hostname, addr.port);\n }", "function startExpress() {\n\n http.createServer(app).listen(app.get('port'), () => {\n console.log('Web server is running on ', app.get('port'));\n });\n}", "function start() {\n listen();\n}", "function onListening() {\n\tlogger.info('Server running at port 3000');\n}", "function start() {\n\tsocket.connect(port, host);\n}", "function startServer(port, cb) {\n server = http.createServer(app);\n server.listen(port, function (err) {\n console.log('Listening on ' + port);\n if (cb !== undefined) { cb(err); }\n });\n}", "start() {\n this.httpServer.start();\n }", "function onListening() {\n let debug = require('debug')('debugserver');\n httpPort&&debug('Express Listening on ' + httpPort);\n httpsPort&&debug('Express Listening on ' + httpsPort);\n}", "function httpOnListening() {\n var addr = httpServer.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port;\n debug('Listening on ' + bind);\n}", "start() {\n this.app.listen(this.app.get('port'), () => {\n console.log(`####### Listen on port ${this.app.get('port')} #######`);\n });\n }", "async function startServer() {\n await server.start(TEST_SERVER_PORT);\n}", "function listen(port = config.get('port'), host = config.get('host')) {\n app.listen(port, host, () => {\n logger.info('Server Listening', {\n host,\n port,\n });\n });\n}", "function onListening() {\n var addr = server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port;\n console.log('Listening on ' + bind);\n console.log('Broadcast on local IP ' + ip);\n console.log('------------------------------');\n console.log('View site at http://localhost:' + port);\n}", "function onListening () {\n console.log(chalk.bold.whiteBright.bgBlue(`\\nServer listening on port ${port}\\n`))\n}", "Listen() {\n this.server.listen(this.port, () => {\n console.log(` ---> Servidor corriendo en ${Constants_1.HOST}${this.port}`);\n });\n }", "started() {\n\n\t\tthis.app.listen(Number(this.settings.port), err => {\n\t\t\tif (err)\n\t\t\t\treturn this.broker.fatal(err);\n\t\t\tthis.logger.info(`API Server started on port ${this.settings.port}`);\n\t\t});\n\n\t}", "function onListening() {\n var addr = process.env.ADDRESS || http_server.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port;\n debug('Listening on ' + bind);\n}", "listen() {\n this.server.listen( this.port, () => {\n console.log('Servidor corriendo en puerto', this.port );\n });\n }", "listen(port) {\n this.server.listen(port);\n }", "function onListening() {\n const addr = server.address();\n console.log(`Listening on ${addr.port}`);\n}" ]
[ "0.78415805", "0.78415805", "0.7661802", "0.761614", "0.7551808", "0.7472026", "0.7440004", "0.7414381", "0.73970085", "0.7376053", "0.7338134", "0.7336493", "0.73169893", "0.7303056", "0.7298042", "0.7297081", "0.72890246", "0.7284261", "0.7284261", "0.7284261", "0.72815156", "0.72705287", "0.72705287", "0.72705287", "0.72705287", "0.72705287", "0.7265787", "0.72345346", "0.71760297", "0.71541435", "0.71340144", "0.71237546", "0.7110347", "0.7104727", "0.7094916", "0.7090781", "0.7077259", "0.7076503", "0.70642006", "0.70615584", "0.7057247", "0.7042428", "0.70104164", "0.6991626", "0.69776046", "0.69746006", "0.69688606", "0.69524527", "0.69394964", "0.69275844", "0.69207066", "0.6913044", "0.6886973", "0.68672705", "0.68582606", "0.68551767", "0.6853857", "0.6832613", "0.6821588", "0.68191504", "0.68150127", "0.68145984", "0.6809236", "0.67920756", "0.67861485", "0.67792684", "0.6769556", "0.6768287", "0.6768268", "0.67638534", "0.67490166", "0.67442924", "0.67346406", "0.67279947", "0.6706749", "0.669935", "0.6694007", "0.668511", "0.6683639", "0.6669536", "0.6665846", "0.6663943", "0.6661908", "0.66587013", "0.6655482", "0.6654221", "0.6652268", "0.6648052", "0.66396976", "0.6639152", "0.66380566", "0.6635284", "0.6631956", "0.6629161", "0.662596", "0.66219276", "0.66194254", "0.66063994", "0.66041327", "0.66037166", "0.659955" ]
0.0
-1
The entering function of the start file
async function p() { localServerStart(); consoleCommands(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "start () {}", "start() {// [3]\n }", "function start() {\n\n}", "function start(){\n\t\n}", "started() {\r\n\r\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "started() {\n\n\t}", "start() {}", "start() {}", "start() {}", "start() {}", "start() {}", "start() {}", "started() {\n\t}", "start() {\n }", "preStart() {\n }", "started() { }", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "function BeforeStart(){return}", "started () {}", "started() {\n\n }", "started() {\n\n }", "started() {\n\n }", "function mainFn () {\n logFn( prefixStr + 'Start' );\n xhiObj.npmObj.load( xhiObj.fqPkgFilename, onLoadFn );\n }", "function start() {\n //Currently does nothing\n }", "start() {\n console.log(\"Die Klasse App sagt Hallo!\");\n }", "start() {// Your initialization goes here.\n }", "get start() {}", "started () {\n\n }", "started () {\n\n }", "started () {\n\n }", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "_start() {\n this._loadPage();\n this._sayHello();\n }", "function start(){\n console.log('start()');\n}", "function start() {\n​\n}", "function start() {\n\treadStorage();\n\tdisplayAnn();\n}", "start () {\n debug(\"Method 'start' not implemented\");\n }", "start() {\r\n // Add your logic here to be invoked when the application is started\r\n }", "function start(tab)\n{\n\t\n}", "function start() {\n init();\n run();\n }", "function Start () {}", "function start () {\n console.info('CALLED: start()');\n bindEvents();\n }", "earlyStart() {\n\t\treturn true;\n\t}", "function Start () {\n\t\t\n\t\t\n\t\n\t}", "function start(){\n console.log('1. accediendo al sistema...');\n acceder('Johana');\n}", "function start()\n{\n clear();\n console.log(\"==============================================\\n\");\n console.log(\" *** Welcome to the Interstellar Pawn Shop *** \\n\");\n console.log(\"==============================================\\n\");\n console.log(\"We carry the following items:\\n\");\n readCatalog();\n}", "function init() {\n spielstart();\n}", "function start(){\r\n helloUser();\r\n }", "function Start()\n {\n console.log(\"%cApp Started...\", \"color:blue; font-size:20px\");\n \n }", "function startup()\r\n{\r\n\tconsole.log(\"#include<stdio.h> \\n void main()\");\r\n}", "function startPoint()\n{\n\n}", "function main() {\r\n initFlags();\r\n fixMarkup();\r\n changeLayout();\r\n initConfiguration();\r\n}", "function start(){\n\t\t //Initialize this Game. \n newGame(); \n //Add mouse click event listeners. \n addListeners();\n\t\t}", "function loadStart() {\n // Prepare the screen and load new content\n collapseHeader(false);\n wipeContents();\n loadHTML('#info-content', 'ajax/info.html');\n loadHTML('#upper-content', 'ajax/texts.html #welcome-text');\n loadHTML('#burger-container', 'ajax/burger-background.html #burger-flags', function() {\n loadScript(\"js/flag-events.js\");\n });\n}", "function runStart()/* : void*/\n {\n this.setUp();\n }", "start() {\n // Add your logic here to be invoked when the application is started\n }", "function main() {\n // Initialize some event listeners on the word info display choice.\n setup_word_info();\n\n // Initialize the first page of cues.\n previous_page();\n\n // Initialize the top scores leaderboard.\n load_leaderboard();\n\n // Initialize the Sammy.js app.\n app.run();\n}", "loginStart() {\n\n }", "function start() {\n const logoText = figlet.textSync(\"Employee Database Tracker!\", 'Standard');\n console.log(logoText);\n loadMainPrompt();\n}", "async function t_startup() {\r\n await sleep(2);\r\n await t_write(t_header);\r\n await sleep(1);\r\n fileData = loadFile(t_startupPath); //Get content of the startup file\r\n var lines = fileData.split('\\n'); //Split it in its lines\r\n for (var line=0; line<lines.length; line++) { //Print every line by line with a delay between them\r\n t_println(lines[line]);\r\n await sleep(0.2);\r\n }\r\n await sleep(1);\r\n}", "function main() {\n\t\t\thtmlModule = new htmlUtil(); // View creation / HTML logic\n\t\t\tarrModule = new arrMethods(); // Array Method shortcuts\n\t\t\tmsg = htmlModule.msg; // Logging\n\t\t\tmsg.set(\"Starting Module\");\n\n\t\t\t// Setup Form.\n\t\t\ttempForm();\n\t\t}", "start() {\n this.do(\"start\")\n }", "start() {\n super.start();\n }", "function main() {\r\n\t// Init the myGM functions.\r\n\tmyGM.init();\r\n\r\n\t// If the script was already executed, do nothing.\r\n\tif(myGM.$('#' + myGM.prefix + 'alreadyExecutedScript'))\treturn;\r\n\r\n\t// Add the hint, that the script was already executed.\r\n\tvar alreadyExecuted\t\t= myGM.addElement('input', myGM.$('#container'), 'alreadyExecutedScript');\r\n\talreadyExecuted.type\t= 'hidden';\r\n\r\n\t// Init the language.\r\n\tLanguage.init();\r\n\r\n\t// Init the script.\r\n\tGeneral.init();\r\n\r\n\t// Call the function to check for updates.\r\n\tUpdater.init();\r\n\r\n\t// Call the function to enhance the view.\r\n\tEnhancedView.init();\r\n}", "function start() {\n if (!argv._.length || argv._.indexOf('start') !== -1) {\n instance.start();\n }\n }", "function _startScript() {\r\n // Prevent the user from pressing the Start button again.\r\n _setButtonState(false);\r\n\r\n _buildWorkQueue();\r\n }", "function start() {\n\t\t\tsetTimeout(startUp, 0);\n\t\t}", "firstRun() { }", "function startOver() { }", "start() {\n\t\tthis.emit(\"game_start\");\n\t}", "function runStart() {\n\tvar GPIO = require(\"gpio\");\n\tvar stopPin = new GPIO(STOP_PIN);\n\tstopPin.setDirection(GPIO.INPUT);\n\tif (stopPin.getLevel()) {\n\t\tlog(\"Start program bypassed by user.\");\n\t\treturn;\n\t}\n\t\n\tvar esp32duktapeNS = NVS.open(\"esp32duktape\", \"readwrite\");\n\tvar startProgram = esp32duktapeNS.get(\"start\", \"string\");\n\tesp32duktapeNS.close();\n\tif (startProgram !== null) {\n\t\tlog(\"Running start program: %s\" + startProgram);\n\t\tvar script = ESP32.loadFile(\"/spiffs\" + startProgram);\n\t\tif (script !== null) {\n\t\t\ttry {\n\t\t\t\teval(script);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tlog(\"Caught exception: \" + e.stack);\n\t\t\t}\n\t\t} // We loaded the script\n\t} else { // We have a program \n\t\tlog(\"No start program\");\n\t}\n} // runStart", "function start() {\n\n console.log(\"\\n\\t ------------Welcome to Bamazon Store-------------\");\n showProducts();\n\n\n\n}", "function start() { \n initiate_graph_builder();\n initiate_job_info(); \n initiate_aggregate_info();\n initiate_node_info();\n}", "function Start() {\n // local variable\n let title = document.title;\n\n ///Displaying to console to confirm that the javascript file works.\n console.log(\n \"%c javascript works, Nice\",\n \"font-weight:bold; font-size: 20px;\"\n );\n console.log(\n \"%c ----------------------------\",\n \"font-weight:bold; font-size: 20px;\"\n );\n console.log(\"Title: \" + title);\n console.log();\n\n ///try catch any possible error!\n //Try various functions and if any of them doesn't exists, \n //it skips to catch block and then displays the content from the catch block.\n try {\n switch (title) {\n case \"COMP125 - Home\":\n content.HomeContent();\n\n break;\n\n case \"COMP125 - About\":\n content.AboutContent();\n break;\n\n case \"COMP125 - Contact\":\n content.ContactContent();\n break;\n\n default:\n throw \"Title not Defined\";\n break;\n }\n } catch (err) {\n console.log(err);\n console.warn(\"Oops\");\n }\n\n //injecting files by calling function\n insertHTML(\"../Scripts/View/content/header.html\", \"header\");\n insertHTML(\"../Scripts/View/content/footer.html\", \"footer\");\n }", "function onStartup()\n{\n\tprintLog(\"info\", \"onStartup called\");\n}", "_start() {\n\n this._menuView = new MenuView(\n document.querySelector('nav'),\n this.sketches\n );\n\n for (var key in this.sketches) {\n this.DEFAULT_SKETCH = key;\n break;\n }\n\n this._setupScroll();\n this._setupWindow();\n this._onHashChange();\n }", "function start(){ alert(\"AstroJS Is Ready! Release 3.022 by Salvatore Ruiu ( www.suchelu.it )\"); }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }", "function start() {\n\n gw_job_process.UI();\n\n }" ]
[ "0.738937", "0.7372664", "0.7296327", "0.727324", "0.7212825", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.7140945", "0.70918775", "0.70918775", "0.70918775", "0.70918775", "0.70918775", "0.70918775", "0.70399916", "0.699805", "0.6975471", "0.6954358", "0.69464445", "0.69464445", "0.69464445", "0.69464445", "0.69464445", "0.69464445", "0.69464445", "0.69464445", "0.6944055", "0.6899066", "0.6899066", "0.6899066", "0.68873745", "0.6860145", "0.6809625", "0.68075454", "0.6734637", "0.6711331", "0.6711331", "0.6711331", "0.6710456", "0.6710456", "0.6710456", "0.6710456", "0.6710456", "0.6710456", "0.6710456", "0.6710456", "0.6710456", "0.6710456", "0.666406", "0.66478306", "0.66371036", "0.66324687", "0.6630482", "0.66234416", "0.6622581", "0.6616679", "0.6591628", "0.65854514", "0.6540756", "0.6536101", "0.6527572", "0.65273756", "0.65181303", "0.6503478", "0.6498584", "0.64897513", "0.6484599", "0.64817524", "0.6474121", "0.6449552", "0.6438396", "0.64196163", "0.64169997", "0.6413082", "0.63804775", "0.6356314", "0.63532144", "0.6340099", "0.6338425", "0.633546", "0.6331605", "0.6329813", "0.6325946", "0.630377", "0.62649643", "0.6260868", "0.62565464", "0.62559843", "0.62369543", "0.6230752", "0.62283933", "0.62221056", "0.6216695", "0.6213289", "0.6213289", "0.6213289" ]
0.0
-1
Fetch the data from the server.
function getData (symbols, endpoint) { let host = settings.react.calls.server.host; let port = settings.react.calls.server.port; let url = host + ':' + port + '/' + symbols.join(','); switch(endpoint) { case '': break; case 'historical': url = url + '/historical'; break; } return fetch(url) .then(resp => resp.json()) .catch(err => { console.warn('Error fetching data.', err); return Promise.reject(err); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetchData() {\n fetch(url, {\n method: \"get\",\n headers: {\n \"Content-Type\": \"application/json; charset=utf-8\",\n \"x-apikey\": key,\n \"cache-control\": \"no-cache\",\n },\n })\n .then((e) => e.json())\n .then((data) => {\n //Data sendes til functionen handleData\n handleData(data);\n });\n }", "static async getData() {\n const url = 'http://cparkchallenge.herokuapp.com/report/:lat/:long';\n\n return await fetch(url)\n .then(dataFromServer => dataFromServer.json());\n }", "fetchData() {\n this.initLoading();\n\n this.setFilters(this.qs_url, this.generateBaseFilters());\n this.data.filters = this.getFilters(this.qs_url);\n\n let qs = this.setQuerySet(this.view, this.qs_url).filter(this.getFiltersPrepared(this.qs_url)).prefetch();\n this.setQuerySet(this.view, this.qs_url, qs);\n\n this.getInstancesList(this.view, this.qs_url).then(instances => {\n this.setLoadingSuccessful();\n\n this.setInstancesToData(instances);\n\n if(this.view.schema.autoupdate) {\n this.startAutoUpdate();\n }\n\n }).catch(error => {\n this.setLoadingError(error);\n });\n\n this.getParentInstancesForPath();\n }", "fetchData() {\n this.initLoading();\n let qs = this.setAndGetQuerySetFromSandBox(this.view, this.qs_url);\n this.data.instance = qs.cache = qs.model.getInstance({}, qs);\n this.setLoadingSuccessful();\n this.getParentInstancesForPath();\n }", "fetchData() {\n this.initLoading();\n let qs = this.setAndGetQuerySetFromSandBox(this.view, this.qs_url);\n this.data.instance = qs.cache = qs.model.getInstance({}, qs);\n this.setLoadingSuccessful();\n this.getParentInstancesForPath();\n }", "function fetchData(cb) {\n request(apiUrl, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n cb(null,body);\n } else {\n cb('Fetch error');\n }\n });\n}", "async function fetchData() {\n try {\n const response = await fetch(baseUrl + url);\n if (response.ok) {\n const json = await response.json();\n setData(json);\n } else {\n throw response;\n }\n } catch (error) {\n setError(error)\n } finally {\n setLoading(false);\n }\n }", "fetchData() {\n this.initLoading();\n this.getInstance(this.view, this.qs_url).then(instance => {\n this.setLoadingSuccessful();\n this.data.instance = instance;\n\n if(this.view.schema.autoupdate) {\n this.startAutoUpdate();\n }\n }).catch(error => {\n debugger;\n this.setLoadingError(error);\n });\n\n this.getParentInstancesForPath();\n }", "_doFetch() {\n\t\tthis.emit(\"needs_data\", this);\n\t}", "async function gettingData() {\n let response = await fetch(url);\n let data = await response.json();\n console.log(data);\n }", "fetchData() {\n this.initLoading();\n this.setAndGetInstanceFromSandBox(this.view, this.qs_url).then(instance => {\n this.setLoadingSuccessful();\n this.data.instance = instance;\n }).catch(error => {\n this.setLoadingError(error);\n debugger;\n });\n\n this.getParentInstancesForPath();\n }", "fetch () {\n this._makeRequest('GET', resources);\n }", "function getData() {\n let name = qs(\"select\").value;\n let url = URL_BASE + name + \"/\";\n fetch(url)\n .then(checkStatus)\n .then(response => response.json())\n .then(genData)\n .catch(handleError);\n }", "function doFetch() {\n\t\tsetFetching(true);\n\t}", "function fetch_data() {\n\n function on_data_received(data) {\n\t load_data_into_table(data);\n\n if (refresh_rate != 0) {\n\t setTimeout(fetch_data, refresh_rate * 1000);\n\t }\n }\n \n $.ajax({\n url: dataurl,\n method: 'GET',\n dataType: 'json',\n success: on_data_received\n });\n }", "async function fetchData() {\n const request = await instance.get(fetchUrl);\n setMovies(request.data.results);\n return request;\n }", "async function fetchData() {\n\n // get the datasets.json data\n const url = withPrefix('/data/datasets.json')\n const resp = await fetch(url)\n const datasets = await resp.json()\n\n // sort the datasets by added date, descending\n datasets.sort((a, b) => new Date(b.added) - new Date(a.added))\n\n // update the display with latest data\n setDatasets(datasets)\n setFiltered(datasets.map(d => d.slug))\n setSubjects(getSubjects(datasets))\n setStart(getEarliestDate(datasets))\n }", "function fetchTheData() {\r\n let baseURL = \"https://newsapi.org/v2/top-headlines\";\r\n deleteOld();\r\n let search = \"?q=\" + id(\"search\").value;\r\n id(\"searchTerm\").textContent = id(\"search\").value;\r\n let apiKey = \"&apiKey=c1c6c8286a5449b7a7fcc01deb46437c\";\r\n fetch(baseURL + search + apiKey)\r\n .then(checkStatus)\r\n .then(response => response.json()) // if json\r\n .then(processResponse)\r\n .catch(handleError);\r\n }", "async function fetcher() {\n let data = {};\n try {\n data = await query()\n }\n catch (error) {\n setError(error)\n return\n }\n console.log(\"DATAAA\", data)\n setLoading(false)\n setData(data)\n setDone(true)\n }", "async function fetchData() {\n\n let url = urlFoodListGenerator(baseUrl, constants.APIKEY, maxRecipePerCall, listFoodstuffs)\n console.log('fetching from ' + url)\n\n await setFetchLoading(true)\n fetch(url)\n .then((response) => response.json())\n .then((data) => {\n console.table(data)\n console.log(data)\n setData(data)\n setFetchLoading(false)\n\n })\n .catch((e) => {\n setFetchError(e)\n setFetchLoading(false)\n })\n }", "fetch () {\n if (this._metadataComplete) {\n return\n }\n this._fetching = true\n if (this._metadataSize) {\n this._requestPieces()\n }\n }", "fetch () {\n if (this._metadataComplete) {\n return\n }\n this._fetching = true\n if (this._metadataSize) {\n this._requestPieces()\n }\n }", "async function fetchData() {\n const response = await API.get(\"findTask/\");\n\n setTasks(response.data);\n console.log(\"👉 Returned data:\", response);\n }", "function getData(url){\n return fetch(url);\n}", "async function getData() {\n cardsDiv.innerHTML = `<h1>loading..</h1>`;\n const response = await fetch(endPoint);\n const data = await response.json();\n return data.data;\n}", "async function fetchData() {\n const response = await fetch(\n \"https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/1.0_hour.geojson\",\n {\n method: \"GET\",\n }\n );\n\n const jsonResponse = await response.json();\n\n if (jsonResponse && jsonResponse.metadata.count>0) {\n const { features, metadata, bbox } = jsonResponse;\n\n setFeaturesState(features);\n setMetaData(metadata);\n setBboxState(bbox);\n return jsonResponse;\n }\n }", "async fetch () {\n\t\tif (this.notFound.length === 0) {\n\t\t\treturn;\t// got 'em all from the cache ... yeehaw\n\t\t}\n\t\telse if (this.notFound.length === 1) {\n\t\t\t// single ID fetch is more efficient\n\t\t\treturn await this.fetchOne();\n\t\t}\n\t\telse {\n\t\t\treturn await this.fetchMany();\n\t\t}\n\t}", "function fetchData() {\n var requests = [];\n\n var datasets = App.manifest.get('data') || [];\n\n datasets.forEach(function(data) {\n var filename = data.src.slice(0, -5),\n model = new StormData();\n\n model.url = App.bundleManager.getResourceUrl('bundle/data/' + data.src);\n\n App.data[filename] = model;\n requests.push(model.fetch());\n });\n\n return $.when.apply($, requests);\n}", "async function fetchData() {\n const request = await authAxios.get(`${apiUrl}`);\n setData(request.data.results);\n console.warn(request);\n return request;\n }", "async function fetchData()\r\n{\r\n let url='https://opentdb.com/api.php?amount=10&type=multiple';\r\n try \r\n {\r\n let res = await fetch(url);\r\n return await res.json();\r\n } \r\n catch (error) \r\n {\r\n console.log(error);\r\n }\r\n}", "function fetchData () {\n return fetch(`${config.API_URL}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': 'Bearer ComicClanVettIO2019'}}) \n}", "async function fetchData() {\n try {\n const res = await fetch(url, options);\n if (res.status != 200) {\n throw(\"server refused!\")\n }\n const json = await res.json();\n console.log(\"got fetch response\");\n thenFun(json);\n } \n catch (error) {\n console.log(\"got fetch error\");\n catchFun(error);\n }\n }", "async fetchData() {\n const response = await fetch(\"https://randomuser.me/api/?results=10\");\n if (!response.ok) {\n console.log(\n \"Looks like there was a problem. Status Code: \" + response.status\n );\n }\n\n let data = await response.json();\n let dataf = null;\n return dataf.results;\n }", "function getData(Lat, Lon) {\r\n const readyToSent = (url + \"lat=\" + Lat \r\n + \"&lon=\" + Lon + \"&appid=\" + key);\r\n fetch(readyToSent)\r\n .then(response => response.json())\r\n .then(data => {\r\n console.log(data);\r\n fetchData(data)\r\n })\r\n}", "async connectedCallback() {\n let request = new XMLHttpRequest();\n request.open('GET', jsonData, false);\n request.send(null);\n this.data = JSON.parse(request.responseText);\n // turns out that github does not provide \n // unauthenticated access to public repos over rest\n // Thank you github. Hence cannot fatch Data using the Fetch API \n //const data = await fetchDataHelper({ amountOfRecords: 100 });\n //this.data = data;\n this.calculateData();\n }", "function fetchData(){\n console.log('Fetching events at ' + Date.now());\n const CORNELL_EVENTS_URL = url.format('http://events.cornell.edu/calendar.xml');\n request(CORNELL_EVENTS_URL, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n parseString(body.toString(), function (err, result) {\n //Store the data in mongo\n updateData( formatData( result.rss.channel[0].item ) );\n });\n } else {\n console.error('Error in grabbing calendar data');\n console.error(error);\n if (!error){\n console.error('Response Code: ' + response.statusCode);\n }\n }\n });\n}", "async function getData(){\n\tlet full = baseURL+city.value+apiKey;\n\tconst request = await fetch(full);\n\ttry{\n\t\tconst gotData = await request.json();\t\t\n\t\treturn gotData;\n\t}\n\tcatch(error){\n\t\tconsole.log('error' + error)\n\t}\n}", "async function fetchData() {\n const favoriteResponse = await axios.get(\n \"https://6161517ee46acd001777c003.mockapi.io/cart\"\n ); // получаем кроссовки из БД для favorites\n\n const itemsResponse = await axios.get(\n \"https://6161517ee46acd001777c003.mockapi.io/favorites\"\n ); // получаем кроссовки из БД для корзины\n const cartResponse = await axios.get(\n \"https://6161517ee46acd001777c003.mockapi.io/items\"\n ); // получаем кроссовки из БД для главной страницы\n\n setIsLoading(false);\n setCardSneakers(favoriteResponse.data);\n setCardFavorite(itemsResponse.data);\n setSneakers(cartResponse.data);\n }", "function fetchData() {\n console.log('IMonData: [Old API] Fetching...');\n var store = new Store();\n\n var baseUrl = 'https://thenetmonitor.org/v1/';\n\n var futures = [];\n\n ['datum_sources', 'countries', 'regions'].forEach(function(type) {\n var fut = HTTP.get.future()(baseUrl + type, { timeout: Settings.timeout });\n futures.push(fut);\n var results = fut.wait();\n store.sync(results.data);\n });\n\n Future.wait(futures);\n\n console.log('IMonData: [Old API] Inserting...');\n\n _.each(store.findAll('regions'), insertRegion);\n _.each(store.findAll('countries'), insertCountry);\n _.each(store.findAll('datum_sources'), insertIndicator);\n\n console.log('IMonData: [Old API] Inserted.');\n\n}", "function fetchData() {\n return new Promise(resolve =>\n resolve(initData)\n );\n}", "async fetchData(){\n\t\tlet response = await fetch('https://rallycoding.herokuapp.com/api/music_albums');\n\t\treturn response.json(); //Wait for response to come then then return promise\n\t}", "async function getData() {\n try {\n const res = await fetch('https://cdn.rawgit.com/akabab/superhero-api/0.2.0/api/all.json')\n const data = await res.json()\n setDatabase(data)\n } catch (error) {\n console.log(error)\n }\n }", "async function fetchData() {\n const request = await axios.get(fetchUrl);\n setGames(request.data.results);\n return request;\n }", "async function getData() {\n try {\n const response = await fetch('http://localhost:1337/products');\n \n const results = await response.json();\n const facts = results;\n \n return facts;\n } catch (error) {\n console.log(error);\n }\n}", "function fetchData() {\n fetch('http://localhost:8080/recipe/get/Breakfast')\n .then(res => res.json())\n .then(json => addToBreakfastSelector(json))\n .catch(err => console.error(err));\n\n fetch('http://localhost:8080/recipe/get/Lunch')\n .then(res => res.json())\n .then(json => addToLunchSelector(json))\n .catch(err => console.error(err));\n\n fetch('http://localhost:8080/recipe/get/Dinner')\n .then(res => res.json())\n .then(json => addToDinnerSelector(json))\n .catch(err => console.error(err));\n}", "fetchData(url) {\n return fetch(url).then((resp) => resp.json());\n }", "fetchData() {\n return window.fetch(ApiA.API_URL)\n .then((data) => data.json());\n }", "function getData(){\r\n url = URL_COMMON + \"/current_config/\";\r\n fetch(url).then( response => response.json())\r\n .then( data => {\r\n console.log(data);\r\n appendData(data);\r\n })\r\n .catch( err => {\r\n console.log('error: ' + err);\r\n });\r\n\r\n}", "async function getData() {\n await fetchingData(\n endP({ courseId }).getCourse,\n setCourse,\n setIsFetching\n );\n\n await fetchingData(\n endP({ courseId }).getGroups,\n setGroups,\n setIsFetching\n );\n }", "function getData() {\n const apiName = 'sbrestapi';\n const path = '/alerts';\n const myInit = {\n // OPTIONAL\n headers: {}, // OPTIONAL\n };\n\n return API.get(apiName, path, myInit).catch(err => {\n console.log('There has been a problem with your fetch operation: ' + err);\n throw err;\n });\n}", "async get(url){\n const getData = await fetch(url);\n\n const data = await getData.json();\n return data;\n\n }", "async function getData(url) {\n\n let fetchConfig = {\n mode: 'no-cors',\n headers: {\n 'Content-Type': 'application/json'\n },\n };\n\n var fetchResponse = await fetch(url, fetchConfig)\n .catch(function(error) {\n });\n return fetchResponse.json();\n }", "function getData() {\nvar url1 = 'http://localhost:8080/api/game_view/' + myParam\n fetch(url1)\n .then(response => response.json())\n .then(response => {\n let slvGames = response\n console.log(response)\n main(slvGames)\n })\n .catch(err => console.log(err));\n}", "fetch(id) {\n return this._callApi('get', id);\n }", "async get(url) {\n \n // Awaiting for fetch response\n const response = await fetch(url);\n \n // Awaiting for response.json()\n const resData = await response.json();\n \n // Returning result data\n return resData;\n }", "function getData() {\n fetch(baseURL)\n .then((response) => response.json())\n .then((data) => {\n dataSet.push(...data);\n init();\n })\n .catch((error) => {\n container__top.innerHTML = `${NO_DATA_FOUND} ${error}`;\n });\n getData2();\n getData3();\n }", "function fetchData() {\n\tshowLoader(); // invoke loader\n\tfetch('https://api.magicthegathering.io/v1/cards?random=true&pageSize=100&language=English')\n\t\t.then((response) => response.json())\n\t\t.then((data) => {\n\t\t\thideLoader(); // invoke hide loader func\n\t\t\tconsole.log(data);\n\t\t\tdataArr = data.cards.slice();\n\t\t\tconsole.log(dataArr); // test\n\t\t\tloadArr = dataArr.slice(0, n);\n\t\n\t\t\trenderCardList(loadArr);\n\t\t\tbtnLoadMore.style.display = 'block'; // show load more button\n\t\t});\n}", "function fetch() {\n $.ajax({\n url: window.silvupleOptions.jsonContentLister,\n dataType: 'json',\n data: null,\n success: success,\n error : fail\n });\n }", "function getData() {\n fetch(url)\n // This is a callback function\n .then(function (u) {\n return u.json();\n })\n // Setting the global jsondata variable\n .then(function (json) {\n jsondata = json;\n\n // Call processDataCallback\n processDataCallback();\n\n document.getElementById('loader').style = \"display: none\";\n document.getElementById('data-content').style = \"\";\n\n // getTableData();\n createTable();\n });\n}", "function fetchdataURL() {\n fetch(API_URL)\n .then((response) => response.json())\n .then((json) => setUsers(json));\n }", "function fetchData(){\n \n fetch(COUNTRIES_URL)\n .then(function (response) {\n if (response.status !== 200) {\n console.warn(\n \"Looks like there was a problem. Status Code: \" + response.status\n );\n return;\n }\n response.json().then(function (data) {\n\n $.each(data, function () {\n countryList = data;\n });\n createTableCountries();\n createDropdownCountries();\n });\n })\n .catch(function (err) {\n console.error(\"Fetch Error -\", err);\n });\n return countryList;\n }", "async function fetchObject () {\n onFetchStart();\n const url = `${ BASE_URL }/object?${ KEY }`;\n\n try{\n const response = await fetch(url);\n const data = await response.json();\n // console.log(response)\n return data\n }catch(error){\n console.error(error);\n }finally{\n onFetchEnd();\n }\n\n}", "async function retreiveData() {\n data = await getPost();\n }", "async get(url){\n const response=await fetch(url);\n const resData=await response.json();\n return resData;\n }", "async readFutureCustomers() {\n this.setState({\n currentCommand: 'get/customers',\n loading: true\n });\n let response = await fetch(url + 'get/customers');\n let data = await response.json(); // for string\n return data\n }", "async function fetchData(){\n const response = await fetch(\"https://anapioficeandfire.com/api/houses?pageSize=100\");\n const data = await response.json();\n setHouse(data);\n }", "function retrive() {\n fetch (url)\n .then ((res) => res.json())\n .then ((data) => {\n refresh (data['data']);\n })\n .catch ((error) => {\n console.log(error);\n })\n}", "async function getData(url){\n const response = await fetch(url)\n const data = await response.json();\n return data\n\n }", "function getData(){\r\n\r\n \r\n //url of the site where the info comes from\r\n const Launches_URL = \"https://api.spacexdata.com/v2/launches/all\";\r\n \r\n let url = Launches_URL;\r\n\r\n \r\n \r\n \r\n //calling the method that will look through the retrieved info\r\n $.ajax({\r\n dataType: \"json\",\r\n url: url,\r\n data: null,\r\n success: jsonLoaded\r\n });\r\n\t}", "async function getData(url) {\n\t\tconst response = await fetch(url) // Pauso mi aplicación hasta que esto se termine de ejecutar y luego sigo con el código que sigue debajo.\n\t\tconst data = await response.json()\n\t\treturn data;\n\t}", "function getData() {\r\n fetch(url)\r\n // This is a callback function\r\n .then(function (u) {\r\n return u.json();\r\n })\r\n // Setting the global jsondata variable \r\n .then(function (json) {\r\n jsondata = json;\r\n \r\n // Call processDataCallback\r\n processDataCallback();\r\n \r\n document.getElementById('loader').style = \"display: none\";\r\n document.getElementById('data-content').style = \"\";\r\n\r\n // getTableData();\r\n createTable();\r\n });\r\n}", "function fetchData() {\n queryType=document.querySelector('#queryType').value;\n itemID=document.querySelector('#itemID').value;\n getFromSWAPI(queryType, itemID)\n}", "function getData() {\n openWebEocSession();\n var data = new XMLHttpRequest();\n data.open('GET', baseURL + boardURL, true);\n data.onload = function () {\n if (this.status == 200) {\n let allData = JSON.parse(this.responseText);\n populateAllVariables(allData);\n }\n }\n data.send();\n\n\n}", "function loadData() {\n fetch(postLink)\n .then(e => e.json())\n .then(showData);\n}", "async function FetchData() {\n const url = 'https://omgvamp-hearthstone-v1.p.rapidapi.com/cards';\n\n return fetch(url, {\n headers: {\n 'x-rapidapi-host' : 'omgvamp-hearthstone-v1.p.rapidapi.com',\n 'x-rapidapi-key' : '7df4822919mshbffd471d5b9df6fp1a2b0bjsndd91db79cbcd',\n \"useQueryString\": true,\n }\n })\n .then(checkStatus)\n .then(res => res.json())\n .catch(err => {\n console.log(err)\n })\n}", "async function fetchData(){\r\n\t//we'll hold the feed in feed\r\n\tlet feed;\r\n\t//fetch the text feed from our local copy\r\n\tawait fetch(\"/feed\")\r\n\t\t.then(response => response.json())\r\n\t\t.then(data => {feed = data.feed});\r\n\t//split to arr by lines\r\n\tmodbusValues = feed.split(\"\\n\");\r\n\t//store the date from first row\r\n\tserverLastUpdate = new Date(modbusValues[0]).toString();\r\n\tclientLastUpdate = new Date().toString();\r\n\t//remove an empty string from the end\r\n\tmodbusValues.pop();\r\n\t//goes through whole array and separates the register values from strings\r\n\tmodbusValues.forEach((item, index, arr) => {\r\n\t\tarr[index] = Number(item.split(\":\")[1]);\r\n\t});\r\n}", "function GetProductData(){\n fetch('https://localhost:44388/Product')\n .then(validateResponse)\n .then(readResponseAsJSON)\n .then(logResult)\n .then(renderCartItems)\n .then(bindEventListeners);\n}", "async getServerData() {\n return await fetch(API + '/v1/servers')\n .then((response) => response.json())\n .then((data) => {\n return data.data[0];\n });\n }", "async function loadData() {\n //initialize() will return either\n //multiple resolved promises of AJAX calls for initializing database or\n //Already Initialized\n const result = await initialize();\n\n //if result is array we have array of resolved promises\n //which they are data which is initialized to database\n if(Array.isArray(result)) {\n //so we just display this data without making additional AJAX call to database\n displayData(result);\n return;\n }\n\n //if data is already initialized we make AJAX request to get it\n const request = {\n method: 'GET',\n headers: {\n authorization: 'Kinvey ' + authToken,\n 'Content-Type': 'application/json',\n },\n };\n\n const response = await fetch(baseUrl, request)\n .then(handler)\n .catch(console.log);\n\n displayData(response);\n}", "function fetch(query) {\n var _this = this;\n if (query === void 0) { query = ''; }\n jQuery.ajax({\n method: 'GET',\n url: \"../edp-api-v3a.php?m=\" + query,\n success: function (data) {\n processData.call(_this, data);\n },\n error: function () {\n console.log('something went wrong!');\n }\n });\n}", "async function getData(){\n const newRes = await fetch('/getData');\n const finalData = await newRes.json();\n return finalData;\n}", "getAll() {\n return this.getDataFromServer(this.path);\n }", "function fetchData(url) {\n\t\treturn fetch(url, {mode: 'cors'})\n\t\t\t.then(checkStatus)\n\t\t\t.then(res => res.json())\n\t\t\t.catch(error => console.log('Looks like there was a problem', error))\n\t}", "function getDataFromServer() {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve(data);\n }, 2000);\n });\n}", "fetchData() {\n const url = 'http://data.unhcr.org/api/population/regions.json';\n return fetch(url, {\n method: 'GET',\n })\n .then((resp) => resp.json())\n .then((json) => this.parseRefugeeData(json))\n .catch((error) => Notification.logError(error, 'RefugeeCampMap.fetchData'));\n }", "async function fetchData() {\n setLoading(true)\n const res = await FindBatchWithCode(id)\n if (res) {\n await GetStudentRequestsForBatch(id)\n } else {\n showErrorSnackbar(enqueueSnackbar, 'This batch does not exist!')\n history.push('/dashboard')\n }\n setLoading(false)\n }", "fetch() {\n var dataPromise = this.request.fetch().then((response) => {\n var output = {};\n if (isObject(response)) {\n response\n .filter(source => source.notPathwayData == false)\n .map((ds) => {\n var name = (ds.name.length > 1) ? ds.name[1] : ds.name[0];\n output[ds.uri] = {\n id: ds.identifier,\n uri: ds.uri,\n name: name,\n description: ds.description,\n type: ds.type\n };\n });\n } else {\n output = null;\n }\n return output;\n }).catch(() => {\n return null;\n });\n\n this.data = dataPromise;\n return dataPromise;\n }", "async function fetchData() {\n let response = await axios.get(\n 'https://60a7a2c88532520017ae4a3b.mockapi.io/weekgoals'\n );\n let info = await response.data;\n setData(info);\n }", "async function fetchData() {\n\t\t\tconst request = await axios.get(\n\t\t\t\t`https://api.themoviedb.org/3/movie/upcoming?api_key=${api_key}&language=en-US`\n\t\t\t);\n\t\t\t// gets base url from axios.js and parse the extension from requests.js\n\t\t\tsetListing(request.data.results);\n\t\t\tconsole.log(request.data.results);\n\t\t}", "async function getdata() {\r\n let url = await fetch(postingIDURL);\r\n let data = await url.json();\r\n return data;\r\n }", "fetchData(){\n\t\tfetch(\"FishEyeData.json\")\n\t\t\t.then(response => response.json())\n\t\t\t.then((data) => {\n\t\t\t\tthis.photographers = data.photographers;\n\t\t\t\tthis.displayPhotographCards()\n\t\t\t})\n\t\t\t.catch(function (err) {\n\t\t\t\tconsole.log(err);\n\t\t\t});\n\t}", "getData(){}", "function fetchData() {\n let targetElement = this,\n url = `./includes/connect.php?id=${this.dataset.target}`;\n\n fetch(url)\n .then(res => res.json())\n .then(data => {\n console.log(data);\n buildPopover(data, targetElement);\n })\n .catch((err) => console.log(err));\n }", "async function getData(url) {\n const response = await fetch(url)\n const data = await response.json()\n // console.log(data);\n return data;\n\n }", "async function getData(url) {\n const response = await fetch(url)\n const data = await response.json()\n // console.log(data);\n return data;\n\n }", "function fetchdata(){\n\n\timgToggle();\n req = new XMLHttpRequest();\n req.open(\"GET\",'https://contesttrackerapi.herokuapp.com/',true);\n req.send();\n req.onload = function(){\n\n imgToggle();\n \n res = JSON.parse(req.responseText);\n putdata(res);\n\n // cache creation\n localStorage.cache = req.responseText;\n\n };\n req.onerror = function(){\n imgToggle();\n if(localStorage.cache){\n localData = JSON.parse(localStorage.cache);\n putdata(localData);\n }\n\n };\n}", "function getData(){\r\n return fetch('https://soroushf79.github.io/TechAssistTesting/data.json') // Hosted the updated new data on here\r\n .then(function(response) {\r\n if (!response.ok){\r\n throw Error(response.statusText);\r\n }\r\n console.log(\"Bueno\");\r\n return response.json();\r\n })\r\n .catch(function(error) {\r\n console.log(\"No bueno\");\r\n });\r\n }", "async function fetchUiData(url){\n const serverResponse = await fetch(url);\n const serverData = await serverResponse.json();\n console.log(serverData);\n \n resDate.innerHTML = `Date is: ${serverData.date}`;\n resTemp.innerHTML = `Temperature is: ${serverData.temp}`;\n resContent.innerHTML = `Content is: ${serverData.userRes}`;\n }", "function fetch() {\n $scope.isLoading = true;\n $http.post(url+'/api/user/getUserList', {\n // skip: $scope.searchParams.begin,\n skip: $scope.searchParams.limit,\n page: $scope.searchParams.pageNum - 1\n })\n .success(function (data) {\n $scope.isLoading = false;\n console.log('fetch userList from server success:', data);\n $scope.data_store = data.instances.list;\n $scope.userList = $scope.data_store;\n $scope.searchParams.total = data.instances.pageNum;\n\n })\n .error(function (data) {\n $scope.isLoading = false;\n alert('Internal server error');\n console.log('got error:', data);\n });\n }", "async function getFinalData(){\n try{\n const getData = await fetch ('/getAll');\n const finalData = await getData.json();\n return finalData;\n }catch(err){\n console.log('ERROR: ',err);\n }\n}", "function fetchData(url) {\n\treturn fetch(url)\n .then(checkStatus) \n .then(res => res.json())\n .catch(error => console.log('Looks like there was a problem!', error))\n}" ]
[ "0.73012596", "0.71859133", "0.70043886", "0.70028996", "0.70028996", "0.69244564", "0.68590915", "0.68550104", "0.682554", "0.68174285", "0.6800103", "0.67762625", "0.6773406", "0.6752981", "0.6752334", "0.6748075", "0.67198783", "0.66904664", "0.66825855", "0.6659984", "0.6652935", "0.6652935", "0.662887", "0.6623442", "0.6605178", "0.6602242", "0.6574195", "0.6567582", "0.65531707", "0.6537589", "0.652888", "0.6524101", "0.652373", "0.65185684", "0.6516987", "0.6500343", "0.64892185", "0.647861", "0.6477443", "0.64608604", "0.645671", "0.6454978", "0.64500463", "0.64489824", "0.6430539", "0.6409349", "0.64055616", "0.6397508", "0.63971454", "0.63887143", "0.6383404", "0.63750786", "0.6366883", "0.63663703", "0.63659704", "0.63618916", "0.6360767", "0.63480043", "0.63452595", "0.6345248", "0.63452035", "0.6344897", "0.6343265", "0.6336404", "0.6329502", "0.6328789", "0.63282645", "0.6319527", "0.63105094", "0.6310321", "0.6306132", "0.63025177", "0.62940985", "0.6291871", "0.6289391", "0.6289095", "0.628437", "0.62832797", "0.6277684", "0.62737924", "0.6272095", "0.6270384", "0.6269842", "0.626147", "0.6260817", "0.62585485", "0.6254617", "0.62462646", "0.6236911", "0.6224771", "0.6216329", "0.6205003", "0.6204641", "0.6203526", "0.6203526", "0.619963", "0.6197133", "0.61902875", "0.6186295", "0.6185481", "0.6181306" ]
0.0
-1
For each character replace it with its code. Concatenate all of the obtained numbers. Given a ciphered string, return the initial one if it is known that it consists only of lowercase letters. Note: here the character's code means its decimal ASCII code, the numerical representation of a character used by most modern programming languages. Example For cipher = "10197115121", the output should be decipher(cipher) = "easy". Explanation: charCode('e') = 101, charCode('a') = 97, charCode('s') = 115 and charCode('y') = 121.
function decipher(cipher) { let chars = cipher.match(/9[5-9]|.{3}/g); // match 95-99 or sets of 3 chars ( use {1,3} for up to 3 chars) return chars.map(charCode => String.fromCharCode(charCode)).join(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CaesarCipher(str, num) {\n\tvar res = '';\n\t\n\tfor(var i = 0; i < str.length; i++){\n\t\tif(/[A-z]/.test(str[i])){\n\t\t\tvar temp = str.charCodeAt([i]) + num;\n\t\t\t\n\t\t\tif(/[9][1-6]/.test(temp) || temp >=123) {\n\t\t\t\ttemp = temp - 26;\n\t\t\t}\n\t\t\tres = res + String.fromCharCode(temp);\n\t\t}\n\t\telse {\n\t\t\tres = res + str[i];\n\t\t}\n\t}\n\treturn res;\n}", "function CaesarCipher(str, num) {\n str = str.toLowerCase();\n var result = \" \";\n var charcode = 0;\n\n for (i = 0; i < str.length; i++) {\n charcode = (str[i].charCodeAt()) + num;\n result += String.fromCharCode(charcode);\n }\n\n return result;\n}", "function CaesarCipher(str,num){\n var charCodes = [];\n\n for(var i=0; i<str.length; i++){\n charCodes.push(str.charCodeAt(i) + num);\n }\n\n\n var encryption = [];\n charCodes.forEach(function(e){\n encryption.push(String.fromCharCode(e));\n });\n \n return encryption.join('');\n}", "function ccipher(d) {\n var encMsg = '';\n var shift = 3; //shift alpha 3 letters over\n for (var i = 0; i < d.length; i++) {\n var code = d.charCodeAt(i);\n if ((code >= 65) && (code <= 90)) {\n //uppercase\n encMsg += String.fromCharCode((mod((code - 65 + shift), 26) + 65));\n } else if ((code >= 97) && (code <= 122)) {\n encMsg += String.fromCharCode((mod((code - 97 + shift), 26) + 97));\n } else {\n encMsg += String.fromCharCode(code);\n }\n }\n return encMsg;\n}", "function CaesarCipher(str,num) { \n var littleAlpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];\n var bigAlpha = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];\n var result = '';\n var parts = str.split('');\n var ourIndex = 0;\n for (var i = 0; i < parts.length; i++){\n if (parts[i] >= 'a' && parts[i] <= 'z'){\n ourIndex = littleAlpha.indexOf(parts[i]);\n result += littleAlpha[ourIndex + num];\n } else if (parts[i] >= 'A' && parts[i] <= 'Z'){\n ourIndex = bigAlpha.indexOf(parts[i]);\n result += bigAlpha[ourIndex + num];\n } else {\n result += parts[i];\n }\n }\n return result;\n}", "function caesarCipherEncryptor(string, key) {\n // Write your code here.\n if (key === 0) return string;\n let result = \"\";\n let alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n for (let i = 0; i < string.length; i++) {\n console.log(\"char\", string[i]);\n //grab the current char from input and find at what idx is it in alphabet\n let curIdx = alphabet.indexOf(string[i]); //23\n console.log(\"currentIdx\", curIdx);\n //find the needed idx of the letter that should replace it (from alphabet)\n let newIdx = curIdx + key; //25\n console.log(\"newIdx\", newIdx);\n while (newIdx >= 26) {\n newIdx = newIdx - 26;\n console.log(\"newIdx in loop\", newIdx);\n }\n //find that new letter and add it to the result string\n result += alphabet.charAt(newIdx);\n console.log(\"results string\", result);\n }\n return result;\n}", "function cipher(str){\n var newStr =\"\";\n for (var i =0;i<str.length;i++){\n var num = str.charCodeAt(i);\n if (num == 32){\n newStr+=\" \";\n }else if ((97 <= num && num <=109) || (65 <= num && num <=77)){\n newStr+=String.fromCharCode(num+13);\n }else{\n newStr+=String.fromCharCode(num-13);\n }\n }\n console.log (newStr);\n}", "function caeserCipherEncryptor(str, key) {\n // intitalize an array to contain solution\n const newLetters = []\n // if the key is a big number (ie 54), we want the remainder\n // otherwise we want the number is smaller, it will be the remainder so all is well\n const newKey = key % 26\n // loop thru our str\n for (const letter of str) {\n // add the ciphered letter to result array\n newLetters.push(getNewLetter(letter, newKey))\n }\n //return the ciphered letters\n return newLetters.join('')\n}", "function ceasarCipher(str, num){\n num = num % 26;\n const lowerCaseStr = str.toLowerCase();\n const alphabetArr = 'abcdefghijklmnopqrstuvwxyz'.split('');\n let newStr = '';\n for (var i = 0; i < lowerCaseStr.length; i++){\n const currentLetter = lowerCaseStr[i];\n const currentIndex = alphabetArr.indexOf(currentLetter);\n let newIndex = currentIndex + num;\n if(currentLetter === ' '){\n newStr += currentLetter;\n continue;\n }\n if(newIndex > 25) newIndex = newIndex - 26;\n if(newIndex < 0) newIndex = newIndex + 26;\n if(str[i] === str[i].toUpperCase()){\n newStr += alphabetArr[newIndex].toUpperCase()\n }\n else newStr += alphabetArr[newIndex]\n }\n return newStr;\n}", "function CaesarCipher(str, num) {\n let newStr = '', i = 0;\n\n for (i; i < str.length; i++) {\n let char = String(str[i]);\n let isUpper = String(char) === String(char).toUpperCase()\n ? true\n : false;\n\n char = char.toLowerCase();\n\n if (alphabet.indexOf(char) > -1) {\n let newIndex = alphabet.indexOf(char) + num;\n\n if (newIndex < alphabet.length && newIndex >= 0) {\n isUpper\n ? (newStr += alphabet[newIndex].toUpperCase())\n : (newStr += alphabet[newIndex]);\n } else if (newIndex < 1) {\n isUpper\n ? (newStr += alphabet[\n alphabet.length + newIndex\n ].toUpperCase())\n : (newStr += alphabet[alphabet.length + newIndex]);\n } else {\n let shiftedIndex = -(alphabet.length - newIndex);\n isUpper\n ? (newStr += alphabet[shiftedIndex].toUpperCase())\n : (newStr += alphabet[shiftedIndex]);\n }\n } else {\n if (char === '\\n') {\n newStr += '<br>';\n } else {\n newStr += char;\n }\n }\n }\n\n return newStr;\n}", "function casesarCipher(str, num) {\n let alphabet = \"abcdefghijklmnopqrstuvwxyz\".split(\"\");\n let characters = str.split(\"\");\n let encodedMsg = characters.map((character) => {\n // console.log('character', character);\n if(alphabet.indexOf(character.toLowerCase()) === -1) {\n return character;\n }\n let isUpperCase = false;\n if(character !== character.toLowerCase()) isUpperCase = true;\n let charsAlphabetPosition = alphabet.indexOf(character.toLowerCase());\n let convertedChar;\n if(charsAlphabetPosition + num <= alphabet.length - 1) {\n return isUpperCase ? alphabet[charsAlphabetPosition + num].toUpperCase() : alphabet[charsAlphabetPosition + num];\n } \n else {\n return isUpperCase ? alphabet[(charsAlphabetPosition + num) - alphabet.length].toUpperCase() : alphabet[(charsAlphabetPosition + num) - alphabet.length] ;\n }\n });\n return encodedMsg.join('');;\n}", "function cCipher(string, num){\n let finalString = \"\";\n let arr = [\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\"];\n let shiftArr = [];\n let count = 0;\n let arrCount = 0;\n let shiftArrCount = 0;\n \n string = string.toUpperCase();\n \n for(let i = 0; i < arr.length; i++){\n if((i + num) <= arr.length - 1){\n arrCount = i + num;\n }\n \n else{\n arrCount = count;\n count++;\n }\n \n shiftArr[shiftArrCount] = arr[arrCount];\n shiftArrCount++;\n }\n \n for(let j = 0; j < string.length; j++){\n for(let k = 0; k < arr.length; k++){\n if(string[j] === arr[k])\n finalString += shiftArr[k];\n }\n }\n \n return finalString.replace(/(.{5})/g,\"$1 \");\n}", "function decipher(str) {\n let result = '';\n for (let i = 0; i < str.length; i++) {\n let asciNum = str[i].charCodeAt(); // .charCodeAt() looks at the ascii numberfor the string\n if (asciNum >= 65 && asciNum <= 77 || asciNum >= 97 && asciNum <= 109) { //string is A-M OR string is a-m\n result += String.fromCharCode(asciNum + 13); //add 13 to the ascii number\n } else if (asciNum >= 78 && asciNum <= 90 || asciNum >= 110 && asciNum <= 122) { //string is N-Z OR string is n-z\n result += String.fromCharCode(asciNum - 13); //add 13 to the ascii number\n } else {\n result += str[i];\n }\n }\n return result;\n}", "function caeserCipher(str, shift) {\n const alphabetArr = \"abcdefghijklmnopqrstuvwxyz\".split(\"\");\n let res = \"\";\n for(let i =0; i < str.length; i++){\n const char = str[i];\n const idx = alphabetArr.indexOf(char);\n //console.log(idx)\n if(idx === -1 ){\n res += char;\n continue;\n }\n const encodedIdx = (idx + shift) %26;\n console.log(encodedIdx)\n res += alphabetArr[encodedIdx]\n }\n return res;\n}", "function decipherThis(str) {\n var newStr = [];\n var splitStr = str.split(' ');/* Split string into an array of the words in the string */\n for(var i = 0; i<splitStr.length; i++){ /*Loop through the splitStr array to analyze each word individually.*/\n var number = splitStr[i].match(/\\d+/g).map(Number)/* Singles out the number in the string */\n var letter = String.fromCharCode(number) /* Converts the number into a letter of the alphabet */\n var letters = []\n var splitWord = splitStr[i].split('')\n \n for(var j = 0; j<splitWord.length; j++){\n if(splitWord[j] >= 0 && splitWord[j] <= 9){\n } else {\n letters.push(splitWord[j])\n }\n }\n letters[0] = [letters[letters.length-1],letters[letters.length-1]=letters[0]][0]\n letters.unshift(letter)\n newStr.push(letters.join(''))\n }\n return newStr.join(' ')\n}", "function rotationalCipher(str, key) {\n // Write your code here\n let cipher = '';\n\n //decipher each letter\n for (let i = 0; i < str.length; i++) {\n\n if (isNumeric(str[i])) {\n cipher += String.fromCharCode(((str.charCodeAt(i) + key - 48) % 10 + 48));\n } else if (isSpecialCharacter(str[i])) {\n cipher += str[i]\n }\n //if letter is uppercase then add uppercase letters\n else if (isUpperCase(str[i])) {\n cipher += String.fromCharCode((str.charCodeAt(i) + key - 65) % 26 + 65);\n } else {\n //else add lowercase letters\n cipher += String.fromCharCode((str.charCodeAt(i) + key - 97) % 26 + 97);\n }\n }\n\n return cipher;\n\n //check if letter is uppercase\n function isUpperCase(str) {\n return str === str.toUpperCase();\n }\n\n function isSpecialCharacter(str) {\n return str.match(/\\W|_/g);\n }\n\n function isNumeric(str) {\n return str.match(/^\\d+$/)\n }\n}", "function caesarCipher(str, key) {\n if (key > 26)\n key = key % 26;\n return str.toLocaleLowerCase().split('').map(function (val) {\n return String.fromCharCode((val.charCodeAt(0) + key) > 122 ? val.charCodeAt(0) + key - 26 :\n val.charCodeAt(0) + key); // 122 is 'z' so if charCode more than 122 we need to circle it by subtracting 26\n }).join('');\n}", "function caesarCipherEncryptor(string, key) {\n // Write your code here.\n // Create a var representing the alphabet\n // for loop: for each letter of the string,\n // find that letter's index in the alphabet. add 2 to that.\n // return alphabet with the new index\n // if it goes past 26, subtract 26\n\n const alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n let newStr = \"\";\n\n for (let i = 0; i < string.length; i++) {\n let idx = alphabet.indexOf(string[i]) + key;\n if (idx > 25) {\n idx = idx % 26;\n }\n newStr += alphabet[idx];\n }\n return newStr;\n}", "function decipherThis(str) {\n return switchLetter(replaceCharacter(str)).join(' ');\n}", "function caeserCipherEncryptor(str, key) {\n\t// intitalize an array to contain solution\n\tconst newLetters = []\n\t// mod ur current key by 26, cause theres ony 26 letters\n const newKey = key % 26\n //make the alphaet\n const alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('')\n\t// loop thru our str\n\tfor (const letter of str) {\n\t\t// add the ciphered letter to result array\n\t\tnewLetters.push(getNewLetterB(letter, newKey, alphabet))\n\t}\n\n\t//return the ciphered letters\n\treturn newLetters.join('')\n}", "function ceasarCipher3(alphabet) {\n for (var i = 0; i < alphabet.length; i++){\n console.log(alphabet[i].charCodeAt());\n }\n}", "function cipher(string, offset) {\n let code = '';\n for (let i = 0; i < string.length; i++) {\n let letter = string[i];\n let charCode = string.charCodeAt(i);\n if (charCode >= 65 && charCode <= 122) {\n letter = String.fromCharCode(((charCode - 65 + offset) % 26) + 65);\n } else if (charCode >= 97 && charCode <= 122) {\n letter = String.fromCharCode(((charCode - 97 + offset) % 26) + 97);\n }\n code += letter;\n }\n return code;\n}", "function caesarCipherDecript(str) {\r\n \r\n const alphabetArr = \"abcdefghijklmnopqrstuvwxyz\".split(\"\");\r\n let resultrot13EncriptCaesarCypher = \"\";\r\n\r\n for (let i = 0; i < str.length; i++) {\r\n const char = str[i];\r\n const idx = alphabetArr.indexOf(char);\r\n\r\n // if it is not a letter, don`t shift it\r\n if (idx === -1) {\r\n resultrot13EncriptCaesarCypher += char;\r\n continue;\r\n }\r\n\r\n // only 26 letters in alphabet, if > 26 it wraps around\r\n var shift = 6;\r\n const encodedIdx = (idx + shift) % 26;\r\n resultrot13EncriptCaesarCypher += alphabetArr[encodedIdx];\r\n }\r\n //return res;\r\n document.getElementById(\"showresult\").value = resultrot13EncriptCaesarCypher;\r\n //console.log(res);\r\n}", "function encrypt (str) {\n\t const reversed = str.split(\"\").reverse().join(\"\");\n\t var replaced1 = reversed.replace(/a/g,\"0\");\n\t var replaced2 = replaced1.replace(/e/g,\"1\");\n\t var replaced3 = replaced2.replace(/i/g,\"2\");\n\t var replaced4 = replaced3.replace(/o/g,\"2\");\n\t var replacedFinal = replaced4.replace(\"u\",\"3\");\n\t console.log(`${replacedFinal}aca`);\n\n}", "function cipherThis(text) {\n const strArr = text.split(' ');\n const output = [];\n\n strArr.forEach(str => {\n if (str.length === 1) {\n output.push(str.charCodeAt(0));\n }\n else {\n let tempStr = str.split('');\n tempStr[0] = str.charCodeAt(0);\n tempStr[1] = str[str.length - 1];\n tempStr[str.length - 1] = str[1];\n output.push(tempStr.join(''));\n }\n });\n\n return output.join(' ');\n}", "function ceasar(str, alphabet, num) {\n //\n for (var i = 0; i < str.length; i++) {\n for (var x = 0; x < alphabet.length; x++) {\n if (str[i] === alphabet[x]) {\n\n if (x + num >= 26) {\n var y = (x + num) % 26;\n var add2 = alphabet[y];\n newString += add2;\n } else {\n if (str[i]=== alphabet[x])\n var add = alphabet[x + num];\n newString += add;\n }\n }\n }\n }\n return newString;\n}", "function decipherThis(str) {\n const words = str.split(' ')\n const result = words.map(word => {\n const code = parseInt(word)\n const length = code.toString().length\n const firstLet = String.fromCharCode(code)\n let newWord = firstLet + word.slice(length)\n if (word.length === length) return newWord\n \n const array = newWord.split('')\n const secondLet = newWord[1]\n const lastLet = newWord[newWord.length - 1]\n array[1] = lastLet\n array[newWord.length - 1] = secondLet\n \n return array.join('')\n })\n \n return result.join(' ')\n}", "function rot2R_13(str) { // LBH QVQ VG!\n var cipheredString = \"\";\n for(x=0; x < str.length; x++){\n var origCharCode = str.charCodeAt(x);\n var codeToExtract;\n cipheredCharCode = origCharCode - cipherDistance;\n if(origCharCode == spaceCode){\n codeToExtract = origCharCode;\n } else if(cipheredCharCode < 65) {\n num_to_subtract = firstLetterCode - cipheredCharCode;\n codeToExtract = lastLetterCode + 1 - num_to_subtract;\n } else {\n codeToExtract = cipheredCharCode;\n }\n cipheredString += String.fromCharCode(codeToExtract);\n }\n console.log(cipheredString);\n}", "function decode(str) {\n //object representing the cipher\n const codeObj = {\n 'a': 1,\n 'b': 2,\n 'c': 3,\n 'd': 4\n };\n //create a vairable that is the first letter \n let decodedIndex = codeObj[str.charAt(0)];\n return str.charAt(decodedIndex);\n}", "function decipher(string){\n\n}", "function caesarCipher(str,num) {\n num = num % 26;\n var lowerCaseString = str.toLowerCase();\n var alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');\n var newString = '';\n \n for (var i = 0; i < lowerCaseString.length; i++) {\n var currentLetter = lowerCaseString[i];\n if (currentLetter === ' ') {\n newString += currentLetter;\n continue;\n }\n var currentIndex = alphabet.indexOf(currentLetter);\n var newIndex = currentIndex + num;\n if (newIndex > 25) newIndex = newIndex - 26;\n if (newIndex < 0) newIndex = 26 + newIndex;\n if (str[i] === str[i].toUpperCase()) {\n newString += alphabet[newIndex].toUpperCase();\n }\n else newString += alphabet[newIndex];\n };\n \n return newString;\n}", "function cipherDecipher(word){\r\n var result= \"\";\r\n for (var i = 0; i < word.length; i++) {\r\n var char = word[i].toLowerCase();\r\n if(char == \" \"){\r\n result = result.concat(char);\r\n continue;\r\n }\r\n // ignores all characters which are not letters. Those will be lots in the process\r\n if(!isLetter(char)){\r\n continue;\r\n }\r\n // encodes / decodes each character and appends it to the result string\r\n var encodedDecoded = encodeDecodeLetter(char);\r\n result = result.concat(encodedDecoded);\r\n rotate3();\r\n }\r\n return result;\r\n}", "function caesarCipherEncryptor(string, key) {\n let timesWrapped = key % 26;\n\n let finalString = \"\";\n for (let i = 0; i < string.length; i++) {\n let finalShift = string[i].charCodeAt() + timesWrapped;\n if (finalShift > 122) {\n finalShift = finalShift - 123 + 97;\n }\n finalString += String.fromCharCode(finalShift);\n }\n return finalString;\n}", "function obfuscateLetter(letter) {\n switch (letter) {\n case 'a' : return '4';\n case 'e' : return '3';\n case 'o' : return '0';\n case 'l' : return '1';\n default : return letter;\n }\n\n}", "function change(str){\n str = str.toLowerCase(); //changes all the charaters in the string to lower case\n var alpha = \"abcdefghijklmnopqrstuvwxyz\"; // create a new variable of all the letters in the alphabet\n var finalString = \"\"; // creates a new string\n \n \n for(var i = 0; i < alpha.length; i++) { //loop through all the letters of the alphabet\n if(str.indexOf(alpha[i]) !== -1) { //the indexOf method checks the location of a alpha letter in the string. If it is not in there it will return -1, which is a falsy value. \n\t\tfinalString += 1; //adds one if the value is located in the alphabet \n } else {\n\t\tfinalString += 0; //otherwise it adds 0\n }\n }\n return finalString; //returns the final value\n}", "function caesarCipher(string, num) {\n // Compute module to make sure num !> 26\n num = num % 26\n // Create alphabet array\n let alpha = 'abcdefghijklmnopqrstuvwxyz'.split('')\n // Instantiate new array.\n let arr = []\n \n for (let i = 0; i < string.length; i++) {\n // Get current later based on index.\n let currentChar = string[i]\n // Instantiate new index and check if it's < 0.\n let index = alpha.indexOf(currentChar.toLowerCase()) + num\n if (index < 0) index = index + 26\n \n // Proceed to push chars to new array.\n if (currentChar === ' ') arr.push(' ')\n if (currentChar === currentChar.toUpperCase()) {\n arr.push(alpha[index].toUpperCase())}\n else arr.push(alpha[index])\n }\n // Return new array.\n return arr.join('') \n }", "function cipher(phrase){ // Con esta funcion cifraremos la frase ingresada por el usuario\n var str= \"\";// Aqui se guardara la frase cifrada\n for (var i = 0; i < phrase.length; i++) { //Iterar el string para poder obtener el numero de la letra dentro del codigo ascii para posteriormente poder recorrernos 33 espacios.\n var codeNumber = phrase.charCodeAt(i); // charCodeAt nos devuelve un número indicando el valor Unicode del carácter en el índice proporcionado el cual estaremos iterando (i).\n var letterMay = (codeNumber - 65 + 33) % 26 + 65;\n var letterMin = (codeNumber - 97 + 33) % 26 + 97;\n\n if (codeNumber >= 65 && codeNumber <= 90) { //Condicionamos y seccionamos, si codeNumber es mayor o igual a la posicion 65 o menor o igual que 90 en el codigo ASCII seran letras Mayusculas.\n str += String.fromCharCode(letterMay);\n\n } else {\n (codeNumber >= 97 && codeNumber <= 122) //Condicionamos y seccionamos, si codeNumber es mayor o igual a la posicion 97 o menor o igual que 122 en el codigo ASCII seran letras Minisculas.\n str += String.fromCharCode(letterMin);\n }\n }\n\n console.log(str); // str Nos muestra la frase cifrada\n document.write(\"Tu frase cifrada es \" + str); //Imprimimos en la pantalla la frase cifrada para el usuario que guardamos en la variable str.\n}", "function cipher(aString, shiftNum) {\n aString = aString.toLowerCase();\n let smallAlphabet = \"abcdefghijklmnopqrstuvwxyz\"\n let theCipher = \"\"\n for (letter of smallAlphabet) {\n let currLetter = fullAlphabet.indexOf(letter);\n if (currLetter + shiftNum )\n }\n}", "function decipher(cifrado){\n\n alert (\"SORPRENDENTE: \" + cifrado);\n\n\n var descifrado =\"\";\n\n\n for(var j=0; j<cifrado.length; j++) { //el for recorrera las letras del texto a descifrar//\n\n var ubicacionDescifrado = (cifrado.charCodeAt(j) + 65 - 33) % 26 + 65;\n var palabraDescifrada= String.fromCharCode(ubicacionDescifrado);\n\n descifrado+=palabraDescifrada; //acumular las letras descifradas//\n}\n\nreturn descifrado;\n\n\n}", "function charChange(str) {\n //\"use strict\";\n var newString = \"\";\n var character;\n for (var i = 0; i < str.length; i++) { //runs through the string to get all of the character positions\n character = str.charCodeAt(i); //takes the character code at position i\n if (character > 64 && character < 91 || character > 96 && character < 123) {\n character = character + 1; //adds 1 to shift the value\n\n if (character == 123) { character = 65; } //changes z to A\n else if (character == 101) { character = 69; } //changes e to E\n else if (character == 105) { character = 73; } //changes i to I\n else if (character == 111) { character = 79; } //changes o to O\n else if (character == 117) { character = 85; } //changes u to U\n\n }\n newString += String.fromCharCode(character);\n }\n return newString;\n}", "function LetterChanges(str) {\n\n // First we do a little meta-problem solving by setting up our alpha and newAlpha strings:\n // Each character in alpha has the same index as the character coderbyte wants us to convert it to in newAlpha\n // For instance, since we want all d's in our input string to be converted to e's, and then we want all vowels to be capitalized,\n // we can \"cheat\" a by making alpha[3] equal to \"d\" and newAlpha[3] equal to \"E\".\n var alpha = \"abcdefghijklmnopqrstuvwxyz\";\n var newAlpha = \"bcdEfghIjklmnOpqrstUvwxyzA\";\n\n // Next, we declare a variable to hold our answer\n var answer = \"\";\n\n // After that, we loop through each character in our input string\n for (i = 0; i < str.length; i++) {\n\n // First, we use the indexOf method to check if the current character in our string is contained in alpha.\n // Note that if the string you pass into indexOf isn't found, it will return -1. Otherwise, it will return the index of the first matching character found.\n // For instance, alpha.indexOf(\"c\") returns 2, while alpha.indexOf(\"C\") returns -1.\n if (alpha.indexOf(str[i]) !== -1) {\n\n // If we find the character in the alpha string, we declare a variable to hold the index of the character.\n // Note that this is an unnessary step that I do for the purposes of clarity. See the 2nd function for a faster implementation.\n var index = alpha.indexOf(str[i]);\n\n // Since we set up the characters in alpha to have the same index as the one we want to convert it to in newAlpha,\n // all we have to do is use the charAt method to add the converted character to our answer variable.\n answer += newAlpha.charAt(index);\n\n // If str[i] doesn't appear in alpha...\n } else {\n\n // ...we add it to our answer string, leaving any characters we don't want to change untouched and in the same index in our answer variable as they were in our input string.\n answer += str[i];\n }\n }\n // Finally, we return the variable where we stored our answer.\n return answer;\n\n}", "function alphabetPosition(text) {\n let result = \"\";\n\n text = text.toLowerCase();\n console.log(text);\n \n for (let i = 0; i < text.length; i++) {\n code = text.charCodeAt(i) - 96;\n console.log(code); \n if (26 >= code && code >= 1) {\n result += code.toString() + ' ';\n } how would you clean it up? im sure you can do chains of like .toString.trimRight. etc?\n } // so at this point i was figuring out how to add a space between each number.\n // i also need to remember to subtract 97 from each number. \n return result.trimRight() // <-- i am proud i knew to put it here \n}", "function caesarCipherEncryptor(string, key) {\n // Write your code here.\n // we have to mutate this array we created, to work w edge case, where the ends move to the front. \n // the search ? // charAt(), IndexAt() or we can use a hash table \n const shiftedAlphabet = shiftAlphabet(key);\n let alphabet = 'abcdefghijklnmopqrstuvwxyz'.split('');\n let returnString = []; //space\n // O(n) \n for (let i = 0; i < string.length; i++) {\n // indexof O(N) if it is, we have to use a hash table in Javascript O(n) of constant 26\n let letterIndex = alphabet.indexOf(string[i]); \n returnString.push(shiftedAlphabet[letterIndex]) \n }\n return returnString.join('')\n }", "function caesarCipherEncryptor(string, key) {\n const newLetters = []\n\tconst newKey = key % 26\n\tconst alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('')\n\tfor (const letter of string) {\n\t\tnewLetters.push(getNewLetter(letter, newKey, alphabet))\n\t}\n\treturn newLetters.join('')\n}", "function cipher(string, offset) {\n // since I don't have uppercase and lowercase in my alphabet, this makes the string all lowercase\n let cleanString = string.toLowerCase();\n const alphabet = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n let newString = \"\";\n for (let character of cleanString) {\n // could be changed to see if character is in alphabet. If so, then do the offsetting. Else, return the character. Catches more errors\n if (character === \" \") {\n newString += \" \";\n } else {\n // from inside out, finds the alphabet index of the character in the string, adds the offset amount, converts this new number to a number inside the range of the alphabet ( % 26), then finds what new letter in the alphabet is at that position, then adds it to the new string.\n newString += alphabet[(alphabet.indexOf(character) + offset) % 26];\n }\n }\n return newString;\n}", "function main() {\n var n = parseInt(readLine());\n var s = readLine();\n var k = parseInt(readLine());\n\n var resultCode = [];\n var resultString = '';\n k = k % 26;\n for(var i = 0; i < s.length; i++) {\n if(s.charAt(i).match(/[a-zA-Z]/) !== null) {\n\n var charCode = s.charCodeAt(i) + k;\n if(s.charCodeAt(i) < 91) {\n if(charCode > 90) {\n charCode = charCode - 90 + 64;\n resultCode.push(charCode);\n } else {\n resultCode.push(charCode);\n }\n }\n else if(s.charCodeAt(i) > 96 && s.charCodeAt(i) < 123){\n if(charCode > 122) {\n charCode = charCode - 122 + 96;\n resultCode.push(charCode);\n } else {\n resultCode.push(charCode);\n }\n }\n } else {\n resultCode.push(s.charCodeAt(i));\n }\n }\n for(var j = 0; j < resultCode.length; j++) {\n resultString += String.fromCharCode(resultCode[j]);\n }\n console.log(resultString);\n}", "function encriptAndDecriptMessage(character) {\n const translatorMap = {\n a: 1,\n e: 2,\n i: 3,\n o: 4,\n u: 5,\n };\n for (let key in translatorMap) {\n if (character === key) {\n return translatorMap[key];\n }\n if (character === translatorMap[key].toString()) {\n return key;\n }\n }\n return character;\n}", "function decipher() {\n var uInput = document.getElementById(\"rot\").value;\n var alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n 'u', 'v', 'w', 'x', 'y', 'z'\n ];\n var output = \"\";\n var x;\n\n for (i = 0; i <= uInput.length; i++) {\n\n for (j = 0; j <= alphabet.length; j++) {\n\n if (uInput[i] == \" \") {\n\n output += \" \";\n } else if (uInput[i] == alphabet[j]) {\n var index2 = j - 13;\n\n if (index2 < 0) {\n\n index2 += 26;\n }\n x = alphabet[index2];\n output += x;\n\n }\n }\n }\n\n var sillyString = output.slice(0, -1);\n document.getElementById(\"test\").innerHTML = sillyString.slice(\" \");\n\n}", "function getCode(){\n var numbers = \"0123456789\";\n\n var chars= \"abcdefghijklmnopqrstuvwxyz\";\n \n var code_length = 6;\n var number_count = 3;\n var letter_count = 3;\n \n var code = '';\n \n for(var i=0; i < code_length; i++) {\n var letterOrNumber = Math.floor(Math.random() * 2);\n if((letterOrNumber == 0 || number_count == 0) && letter_count > 0) {\n letter_count--;\n var rnum = Math.floor(Math.random() * chars.length);\n code += chars[rnum];\n }\n else {\n number_count--;\n var rnum2 = Math.floor(Math.random() * numbers.length);\n code += numbers[rnum2];\n }\n }\nreturn code\n}", "function cipher(sent) {\n var sentence = sent.toUpperCase();\n var arraySentence = sentence.split('');// se forma un array con las letras que componen la cadena de ingreso\n var newArray = [];// creamos un array vacio que almacenará los datos ASCII\n var newSentence = ''; // formaremos en esta variable la nueva cadena encriptada\n if (sent.length === 0 || typeof(sent) === 'number') {\n alert('Input no valido');\n } else {\n for (var i = 0 ; i < sentence.length ; i++) {\n newArray.push(sentence.charCodeAt(i)); // agregamos cada numero en ASCII al array\n var cipherNumber = (newArray[i] - 65 + 33) % 26 + 65; // formula de encriptacion\n var newLetterWhitCipher = String.fromCharCode(cipherNumber); // el numero dado por la formula lo cambiamos segun ASCII \n newSentence += newLetterWhitCipher; // agregamos el caracter a la nueva cadena\n }\n }alert(newSentence);\n}", "function toCaesar(str, rotation){\n while(rotation >= 26) rotation -= 26;\n \n var newString = \"\";\n \n for(var i = 0; i < str.length; i++){\n var code = str.charCodeAt(i);\n \n if(code >= 65 && code <= 90){\n code += rotation;\n if(code > 90) code -= 26;\n }else if(code >= 97 && code <= 122){\n code += rotation;\n if(code > 122) code -= 26;\n }else{\n //number or something\n }\n \n newString += String.fromCharCode(code);\n }\n return newString;\n}", "function caesarCipherEncryptor(string, key) {\n\tconst newLetters = []\n\t// we mod 26 here since given we need to wrap the alphabet around in this cipher if the key is > 26 then we can just take the remainder and not have to condider anything more when the key is > 26\n\tconst newKey = key % 26\n\n\tfor (const letter of string) {\n\t\tnewLetters.push(getNewLetter(letter, newKey))\n\t}\n\treturn newLetters.join('');\n}", "function decipher() {\n var keyInput = parseInt(document.getElementById(\"key\").value);\n var uInput = document.getElementById(\"ceaser\").value;\n var alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];\n var output = \"\";\n\n for (i = 0; i <= uInput.length; i++) {\n\n for (j = 0; j <= alphabet.length; j++) {\n\n if (uInput[i] == \" \") {\n\n output += \" \";\n\n } else if (uInput[i] == alphabet[j]) {\n\n var index2 = j - keyInput;\n if (index2 < 0) {\n\n index2 += 26;\n }\n x = alphabet[index2];\n output += x;\n }\n\n\n }\n\n\n }\n\n var sillyString = output.slice(0, -1);\n document.getElementById(\"test\").innerHTML = sillyString;\n\n\n}", "function cipher (string, shift) {\n // create variable to store the characters of the alphabet to iterate through later on \n var alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n // create variable to store the returned encoded string\n var encodedString = \"\";\n // for loop that will iterate through strings characters and then shift them by the shift amount\n for (var i = 0; i < string.length; i++) {\n // store the current letter from the input string\n var currentLetter = string[i].toLowerCase();\n // create if statement to provide for spacing between words, , then continue script\n if (currentLetter === \" \") {\n encodedString += \" \"\n continue;\n }\n \n // determine the index in the alphabet of the current letter \n var indexOfCurrentLetter = alphabet.indexOf(currentLetter);\n // store the index of the new offset/shifted letter\n var newLetterIndex = indexOfCurrentLetter + shift;\n\n // provide for wrapping around the alphabet\n if (newLetterIndex > 25) {\n newLetterIndex = newLetter + 25;\n } else if (newLetterIndex < 0) {\n newLetterIndex = newLetterIndex + 26;\n }\n\n\n // store the new letter from the newLetterIndex\n var newLetter = alphabet[newLetterIndex];\n //load the offset letters into the new encoded string\n encodedString += newLetter;\n \n\n \n }\n console.log(encodedString);\n return encodedString;\n}", "function substitution(input, alphabet, encode = true) {\n // your solution code here\n let result = \"\"; \n input = input.toLowerCase(); \n let alph = \"abcdefghijklmnopqrstuvwxyz\";\n \n if(alphabet == undefined) return false;\n else if(alphabet.length != 26) return false;\n let total = 0;\n for(let i = 0; i < alphabet.length; i++){ \n for(let j = 0; j < alphabet.length; j++){\n if(alphabet[i] == alphabet[j]) total += 1;\n } \n }\n if(total > 26) return false \n if(encode){result = encodeFunction(input)}\n else {result = decodeFunction(input)}\n return result;\n \n function encodeFunction(input){\n let result = \"\"; \n for(let i = 0; i < input.length; i++){ \n if(input[i].includes(\" \")){result += input[i]} \n else { \n let hoho = alph.indexOf(input[i]) \n result = result + alphabet[hoho]\n } \n }\n return result;\n }\n\n function decodeFunction(input){\n let result = \"\";\n for(let i = 0; i < input.length; i++){\n if(input[i].includes(\" \")){result += input[i]}\n else{\n let haha = alphabet.indexOf(input[i]);\n result = result + alph[haha]\n }\n } \n return result\n }\n\n \n }", "function caesarEncrypt(input, key) {\n return input.split('').map(function(char) {\n if (char.charCodeAt() >= 97 && char.charCodeAt() <= 122) {\n return String.fromCharCode(((char.charCodeAt() - 97) + key) % 26 + 97);\n } else if (char.charCodeAt() >= 65 && char.charCodeAt() <= 90) {\n return String.fromCharCode(((char.charCodeAt() - 65) + key) % 26 + 65);\n } else {\n return char;\n }\n }).join('');\n}", "function encodeC(string, startCode) {\n\t\tvar result = \"\";\n\t\tvar sum = 0;\n\t\tvar w = 1;\n\n\t\tfor (var i = 0, j = string.length; i < j; i += 2) {\n\t\t\tresult += encodingById(parseInt(string.substr(i, 2)));\n\t\t\tsum += parseInt(string.substr(i, 2)) * (w);\n\t\t\tw++;\n\t\t}\n\t\treturn {\n\t\t\tresult: result,\n\t\t\tchecksum: (sum + startCode) % 103\n\t\t}\n\t}", "function encipher(str, shift) {\n // turn str into an array of characters\n str = str.split('');\n\n // use map to change each character into its ascii char code\n let codes = str.map( (char) => {\n return char.charCodeAt(0);\n });\n\n // replace each char code with its offset value using mod arithmetic\n let shiftedCodes = codes.map( (code) => {\n // shift the code by 97 (since 97 is 'a')\n let baseCode = code - 97;\n let shiftedCode = (baseCode + shift) % 26;\n return shiftedCode + 97;\n })\n\n // convert all the codes back to their ascii character\n let encryptedString = shiftedCodes.map( (code) => {\n return String.fromCharCode(code);\n })\n\n // join the array and return the string\n return encryptedString.join('');\n}", "function encipher() {\n var il = \"0\";\n var alphabet = \"\";\n var userInput = \"\";\n var shiftNum = \"\";\n var LetterReg = /^[A-Za-z]+$/;\n var numReg = /^\\d+$/;\n var Answer = \"\";\n var spaceReg = /\\s/;\n var inputLength = \"\";\n var inputSplit = \"\";\n var i = \"0\";\n \n //Get input\n \n var userInput = document.getElementById(\"userInput\").value;\n var shiftNum = document.getElementById(\"shiftNum\").value;\n \n //Checks if input is a letter. Uses a modified version of code found here: http://www.w3resource.com/javascript/form/all-letters-field.php\n \n if (userInput.match(LetterReg))\n {\n //Do nothing.\n }\n else\n {\n //Tells them to enter only letters with no caps, spaces or punctuation.\n \n alert(\"Please enter only letters, no caps, spaces or punctuation in message field.\");\n }\n \n if (shiftNum.match(numReg))\n {\n //Do nothing.\n }\n else\n {\n //Tells them to enter only numbers.\n \n alert(\"Please enter only numbers in the shift field.\");\n }\n \n //Gets input length.\n \n var inputLength = userInput.length;\n \n \n //Splits input into an array.\n \n var inputSplit = userInput.split(\"\");\n \n //Code using Evan's idea and his fix.\n \n alphabet = [\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\"];\n \n for (il = 0; il < inputLength; il++) {\n \n for (i = 0; i < 26; i++) {\n \n if (inputSplit[il] === alphabet[i]) {\n \n //Debug code from Evan is commented out.\n //console.log(inputSplit[il]);\n //console.log(i);\n \n var letter = Number(i) + Number(shiftNum);\n if (letter > 25) {\n var letter = letter - 26;\n }\n \n var Answer = Answer + alphabet[letter];\n break;\n }\n }\n }\n \n //Show result\n alert(\"Your secret message is \" + Answer);\n document.getElementById(\"Answer\").innerHTML = \"Your secret message is \" + Answer;\n \n}", "function caesarCipher(string, offset, length) {\n let result = ''\n for (const character of string) {\n const code = character.codePointAt(0)\n if (code > 64 && code < 91 || code > 96 && code < 123) {\n let newCode = code + offset\n while (newCode < 65 && code < 91 || newCode < 97 && code > 96) {\n newCode += 26\n }\n while (newCode > 90 && code < 91 || newCode > 122 && code > 96) {\n newCode -= 26\n }\n result += String.fromCharCode(newCode)\n } else {\n result += character\n }\n }\n return result\n}", "function substitution(input, alphabet, encode = true) {\n // your solution code here\n let cipher = []\n const usualABC = \"abcdefghijklmnopqrstuvwxyz\"\n let output = \"\"\n\n //ERROR HANDLING\n //should ignore cap letters\n input = input.toLowerCase()\n //needs alphabet param and has to be 26 chars otherwise ret false\n if (!alphabet || alphabet.length !== 26){\n return false\n }\n //check for unique chars in alphabet param and add to cipher array\n for (let i = 0; i < alphabet.length; i++){\n if (cipher.includes(alphabet[i])){\n i++\n return false\n } else {\n cipher.push(alphabet[i])\n }\n }\n\n \n //ENCODING\n if (encode == true){\n \n for(let i = 0; i < input.length; i++){\n if (usualABC.includes(input[i])){\n let alphaIndex = usualABC.indexOf(input[i])\n output += alphabet[alphaIndex]\n } else {\n output += input[i]\n }\n }\n\n return output \n } else {\n //DECODING\n for(let i = 0; i < input.length; i++){\n if (alphabet.includes(input[i])){\n let alphaIndex = alphabet.indexOf(input[i])\n output += usualABC[alphaIndex]\n } else {\n output += input[i]\n }\n }\n return output\n }\n \n \n }", "function transform(text) {\n var splitText = text.split('');\n for (var i = 0; i < splitText.length; i++) {\n if (splitText[i]=== 'z'){\n splitText[i]= 'a';\n } else if (splitText[i]=== 'Z'){\n splitText[i]= 'A';\n } else \n splitText[i] = String.fromCharCode(splitText[i].charCodeAt(0)+1);/*?????????*/\n \n }\n return splitText.join('');\n}", "function decipher(string, offset) {\n let deCoded = '';\n for (let i = 0; i < string.length; i++) {\n let letter = string[i];\n let charCode = string.charCodeAt(i);\n if (charCode >= 65 && charCode <= 90) {\n letter = String.fromCharCode(((charCode - 65 + offset) % 26 + 65));\n } else if (charCode >= 97 && charCode <= 122) {\n letter = String.fromCharCode(((charCode - 97 + offset) % 26) + 97);\n }\n deCoded += letter;\n }\n return deCoded;\n}", "function caesarCipherEncryptor(string, key) {\n\t// initialize new letter array\n\tconst newLetters = []\n\t// mod by number of letters just in case key > 26\n\tconst newKey = key % 26\n\tfor (const letter of string) {\n\t\tnewLetters.push(getNewLetter(letter, newKey))\n\t}\n\treturn newLetters.join('')\n}", "function cipher(cipherPhrase) { // y decipher (revisar luego nombres de variables)\r\n var upperCiphPhrase = cipherPhrase.toUpperCase();// sin return porque no necesito que me la muestre\r\n // var arrayFrase = array.from(upperCiphPhrase); charcode at no funciona con array\r\n var cipherArray = []; // la ponemos fuera del for ya que sino se va limpiando en cada vuelta del recorrido\r\n for (var i = 0; i < upperCiphPhrase.length; i++) {\r\n // console.log(i);\r\n var onAscci = upperCiphPhrase.charCodeAt(i); // para sacar el numero ascii correspondiente al numero de los elementos\r\n // console.log(onAscci);\r\n var algorithm = ((onAscci - 65 + 33) % 26 + 65) ; // nos da el numero ascci de la letra desplazada\r\n // console.log(desplazamiento);\r\n var cipherMsg = String.fromCharCode(algorithm); // pasamos los numeros ascii a sus letras correspondientes\r\n // console.log(newLetra);\r\n cipherArray.push(cipherMsg); // ingresamos cada letra al array para tener todas las letras en un array y luego convertirla a cadena\r\n // console.log(finalArray);\r\n var cypherStr = cipherArray.join(''); // array a string porque es solicitadoque se presente de sta forma\r\n // console.log(strCifrado);\r\n }\r\n // return strCifrado;\r\n return alert('Su mensaje es ' + cypherStr); // porque tengo que hacerle doble enter??\r\n }", "function incrementPasswordChar(char) {\n if (char === \"z\") {\n return \"a\";\n } else if (char === \"Z\") {\n return \"A\";\n } else if (char === 9) {\n return 0;\n }\n // return String.fromCharCode(char.charCodeAt(0) + 1);\n let charCode = char.charCodeAt(); // turns char into number\n let encryptedCharCode = charCode + 1; // increases number by 1\n let encryptedCodeString = String.fromCharCode(encryptedCharCode); // returns number back to string\n return encryptedCodeString;\n }", "function atbashCipher(text) {\n let output = \"\";\n let alphabet = \"abcdefghijklmnopqrstuvwxyz\"\n for (let i = 0; i < text.length; i++) {\n output += alphabet[26 - alphabet.indexOf(text[i]) - 1];\n }\n return output;\n}", "function vigenereEncrypt(str, key) {\n if (key === '') {\n return str;\n }\n\n var letters = 'abcdefghijklmnopqrstuvwxyz';\n key = key.toLowerCase();\n var encrypted = '';\n var encryptedChar = '';\n var keyIndex = 0;\n var i;\n\n for (i = 0; i < str.length; i += 1) {\n if (/[a-z]/i.test(str[i])) {\n encryptedChar = getChar(letters, str[i], key[keyIndex]);\n encrypted += /[a-z]/.test(str[i]) ? encryptedChar : encryptedChar.toUpperCase();\n keyIndex += 1;\n } else {\n encrypted += str[i];\n }\n\n if (keyIndex === key.length) {\n keyIndex = 0;\n }\n }\n\n return encrypted;\n}", "function rot13(str) {\n str = str.split('');\n\n const resultArr = str.map((item, index) => {\n if (item.charCodeAt(0) >= 32 && item.charCodeAt(0) <= 64) {\n return item.charCodeAt(0);\n }else if (item.charCodeAt(0) - 13 < 65){\n return item.charCodeAt(0) + 13\n }else {\n return item.charCodeAt(0) - 13\n }\n });\n\n console.log(String.fromCharCode.apply(null, resultArr));\n return String.fromCharCode.apply(null, resultArr);\n}", "function caesarCipher(string, num){\n const characters = 'abcdefghijklmnopqrstuvwxyz'.split('')\n const lowerCaseString = string.toLowerCase()\n num = num % 26\n const stringArr =lowerCaseString.split('')\n let changingString = []\n\n stringArr.map(char => {\n let charIndex = characters.indexOf(char)\n if (charIndex > -1 && characters.includes(char)){\n \n //Verify if index > 25 then return in the first index of list\n let index = charIndex + num > 25 ? charIndex + num - 26 : charIndex + num < 0 ? charIndex + num + 26 : charIndex + num \n // verify if string is upper case\n // ??\n\n char = characters[index]\n changingString.push(char) \n }else{\n changingString.push(char) \n }\n })\n //console.log(changingString)\n return changingString.join('')\n}", "function caesarCipher (inputString, shift) {\n const alphabet = \"abcdefghijklmnopqrstuvwxyz\";\n\n let result = \"\";\n\n for (var i = 0; i < inputString.length; i++) {\n let char = inputString[i];\n if (char === ' ') {\n result += ' ';\n } else {\n let startIdx = alphabet.indexOf(char);\n let shiftedIdx = (startIdx + shift) % 26;\n result += alphabet[shiftedIdx];\n }\n }\n\n return result;\n}", "function encrypt(){\n var str = \"AEGIOSZHOLAMUNDOaegiosz\";\nconsole.log(str);\nvar encrypted = {\n A:\"4\",\n E:\"3\",\n G:\"6\",\n I:\"1\",\n O:\"0\",\n S:\"5\",\n Z:\"2\",\n a:\"4\",\n e:\"3\",\n g:\"6\",\n i:\"1\",\n o:\"0\",\n s:\"5\",\n z:\"2\"\n \n};\nstr = str.replace(/A|4|E|3|G|6|I|1|O|0|S|5|Z|2|a|4|e|3|g|6|i|1|o|0|s|5|z|2/gi, function(matched){\n return encrypted[matched];\n});\nconsole.log(str);\n}", "function crypt(input, key) {\r\n var output = \"\";\r\n for (var i = 0, j = 0; i < input.length; i++) {\r\n var c = input.charCodeAt(i);\r\n if (isUppercase(c)) {\r\n output += String.fromCharCode((c - 65 + key[j % key.length]) % 26 + 65);\r\n j++;\r\n } else if (isLowercase(c)) {\r\n output += String.fromCharCode((c - 97 + key[j % key.length]) % 26 + 97);\r\n j++;\r\n } else {\r\n output += input.charAt(i);\r\n }\r\n }\r\n return output;\r\n}", "function shiftLetterUp(str) {\n let answer = \"\";\n\n for (let i = 0; i < str.length; i++) {\n if (str.charCodeAt(i) === 122) {\n answer += \"a\"\n } else {\n let newChar = String.fromCharCode(str.charCodeAt(i) + 1);\n answer += newChar;\n }\n }\n\n return answer;\n\n}", "function alternative(s) {\n const counts = new Array(26).fill(0);\n\n for (let i = 0; i < s.length; i++) {\n counts[s.charCodeAt(i) - 97]++;\n }\n\n const result = new Array(Math.max(...counts)).fill('');\n\n // iterate through each letter of alphabet\n for (let i = 0; i < 26; i++) {\n // iterate through each count of a letter\n for (let j = 0; j < counts[i]; j++) {\n if (j % 2 === 0) {\n result[j] += String.fromCharCode(i + 97);\n } else {\n result[j] = String.fromCharCode(i + 97) + result[j];\n\n }\n }\n }\n\n return result.join('');\n}", "function encryptorMin(word) {\n word = word.replace(/a/gi, '4');\n word = word.replace(/e/gi, '3');\n word = word.replace(/i/gi, '1');\n word = word.replace(/s/gi, '5');\n word = word.replace(/o/gi, '0');\n console.log(word);\n}", "function encode(phrase) {\n var result = \"\";\n // .. for each character in phrase\n for (var i = 0; i < phrase.length; i++) {\n // get the charCode of letter at index i\n var cc = phrase[i].charCodeAt(0);\n // add 13 to the letter's charCode\n cc += 13;\n // check if cc > 122,\n // ... if it is, then get the difference b/w cc and 123 (cc-123) and add it to 97 ('a')\n if ((cc += 13) > 122) {\n result === ((cc += 13) -123) + 97;\n // ((cc += 13) - 123) += 97;\n }\n result += String.fromCharCode(cc += 13);\n }\n\n // else(123 = cc + 13 <= 135) {\n // result += String.fromCharCode((cc + 13) - 26);\n\n // }\n\n // {\n // [123 = \"a\", 124 = \"b\", 125 = \"c\", 126 = \"d\", 127 = \"e\", 128 = \"f\", 129 = \"g\", 130 = \"h\", 131 = \"i\", 132 = \"j\", 133 = \"k\", 134 = \"l\", 135 = \"m\"];\n // }\n\n return result;\n}", "function substitution(input, alphabet, encode = true) {\n //Conditional check section\n if (!alphabet || alphabet.length !== 26) return false;\n for (char of alphabet) {\n if(alphabet.indexOf(char) !== alphabet.lastIndexOf(char)) return false; //Example alphabet.indexOf(x) = 0, alphabet.lastIndexOf(x) = 2, since 0 != 2, therefore false.\n }\n //Preparing section\n message = input.toLowerCase();\n const result = [];\n const originalAlphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];\n const codedAlphabet = []; //>['x', 'o', 'y', 'q', 'm', 'c', 'g', 'r', 'u', 'k', 's', 'w', 'a', 'f', 'l', 'n', 't', 'h', 'd', 'j', 'p', 'z', 'i', 'b', 'e', 'v']\n for (let i = 0; i < alphabet.length; i++) {\n codedAlphabet.push(alphabet[i]);\n }\n //Encode section\n if (encode == true) {\n for (letter of message) {\n const letterPosition = originalAlphabet.indexOf(letter);\n if (!originalAlphabet.includes(letter)) {\n result.push(letter);\n } else {\n result.push(codedAlphabet[letterPosition]);\n }\n }\n return result.join(\"\");\n //Decode section\n } else if (!encode) {\n for (char of input) { //input will be \"jrufscpw\" in the coded alphabet\n const charPosition = codedAlphabet.indexOf(char);\n if (!codedAlphabet.includes(char)) {\n result.push(char);\n } else {\n result.push(originalAlphabet[charPosition]);\n }\n }\n return result.join(\"\");\n }\n }", "function decryptCaesarCipher(input, key){\r\n\t//variable to hold end result\r\n\tvar result = '';\r\n\t//parse key to integer\r\n\tkey = parseInt(key);\r\n\t//bring key down if too large to work with alphabet ASCII characters\r\n\twhile (key > 26){\r\n\t\tkey /= 2;\r\n\t\tkey = Math.round(key);\r\n\t}\r\n\t//for each letter in ciphertext\r\n\tfor (var i = 0; i < input.length;i++){\r\n\t\t//convert to charCode\r\n\t\tvar tempChar = input.charCodeAt([i]);\r\n\t\t//if uppercase letter\r\n\t\tif (tempChar >= 97 && tempChar <= 122){\r\n\t\t\t//if wrap around needed for decipher\r\n\t\t\tif(tempChar-key < 97){\r\n\t\t\t\ttempChar-=key;\r\n\t\t\t\ttempChar=96-tempChar;\r\n\t\t\t\ttempChar=122-tempChar;\r\n\t\t\t}else{\r\n\t\t\t\ttempChar -= key;\r\n\t\t\t}\r\n\t\t//if lowercase letter\t\r\n\t\t}else if (tempChar >= 65 && tempChar <= 90){\r\n\t\t\t//if wrap around needed for cipher\r\n\t\t\tif(tempChar-key < 65){\r\n\t\t\t\ttempChar-=key;\r\n\t\t\t\ttempChar=64-tempChar;\r\n\t\t\t\ttempChar=90-tempChar;\r\n\t\t\t}else{\r\n\t\t\t\ttempChar-=key;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//convert deciphered charcode into string and add to result\r\n\t\ttempChar = String.fromCharCode(tempChar);\r\n\t\tresult+= tempChar;\r\n\t}\t\r\n\t//return result after deciphered\r\n\treturn result;\r\n}", "function LetterChanges(str) {\n\n return str.replace(/[a-zA-Z]/g,function(x) {\n return String.fromCharCode(x.charCodeAt(0)+1); \n });\n\n }", "function descipher(sent) {\n var sentence = sent.toUpperCase();\n var arraySentence = sentence.split('');\n var newArray = [];\n var newSentence = '';\n if (sent.length === 0 || typeof(sent) === 'number') {\n \talert('Input no valido');\n } else {\n for (var i = 0 ; i < sentence.length ; i++) {\n newArray.push(sentence.charCodeAt(i));\n var cipherNumber = (newArray[i] - 65 - 7 + 52) % 26 + 65; // se modifica la formula, ahora la letra que buscamos esta 7 espacios antes. \n var newLetterWhitCipher = String.fromCharCode(cipherNumber);\n newSentence += newLetterWhitCipher;\n }\n }alert(newSentence);\n}", "function better_rot13(str) {\n return str.replace(/[A-Z]/g, letter => String.fromCharCode((letter.charCodeAt() % 26) + 65))\n}", "Decrypt(string){\n var str=string;\n var newstr=\"\";\n for(var i=0;i<string.length;i++){\n var n=str.charCodeAt(i);\n if((n>=65 && n<=90)){\n var res=String.fromCharCode(155-n);\n newstr=newstr.concat(res);\n }\n else if((n>=97 && n<=122)){\n var res=String.fromCharCode(219-n);\n newstr=newstr.concat(res);\n }\n else{\n newstr=newstr.concat(str[i]);\n }\n }\n return newstr;\n }", "function rot13(str) {\n // charCode of current letter\n var charCode;\n // decoded string\n var newString = \"\";\n // decoded letter to add to decoded string\n var decodedLetter;\n // Iterating through encoded string\n for (var i = 0; i < str.length; i++){\n // If current letter is not - anything not A-Z\n if (str[i].search(/[^a-z]/gi) == -1){\n // retrieve charCode at current letter\n charCode = str.charCodeAt(i);\n /* A-Z is 65-90 for ASCII so 77 is cutoff to stay in range\n Adding or subtracting has same result of shifting letter 13 places. */\n if (charCode <= 77){\n charCode += 13;\n } else {\n charCode -= 13;\n }\n // generating decoded letter from new charCode that has been shifted by 13 places\n decodedLetter = String.fromCharCode(charCode);\n // Adding letter to decoded string\n newString += decodedLetter;\n } else {\n // If current character is something other than A-Z, just add to decoded string\n newString += str[i];\n }\n }\n return newString;\n }", "function numberLetters (str) {\n var newStr = '';\n for(var i = 0 ; i < str.length ; i++){\n if(str[i] === '1'){\n newStr = newStr + 'i';\n }else if(str[i] === '4'){\n newStr = newStr + 'a'\n }else if(str[i] === '3'){\n newStr = newStr + 'e'\n }else if(str[i] === '7'){\n newStr = newStr + 'u'\n }else if(str[i] === '0'){\n newStr = newStr + 'o'\n }else{\n newStr = newStr + str[i]\n }\n }\n return newStr\n}", "function solution(S) {\n let lowerS = S.toLowerCase();\n var occurrences = new Array(26);\n //set every letter as array index, and occurrences as 0 to initialize\n for (var i = 0; i < occurrences.length; i++) {\n occurrences[i] = 0;\n }\n // for ( <var> in <string> ) {\n // returns index of each element of string;\n // for ( <var> of <string> ) {\n // returns each character of string\n \n //for (var id in lowerS) {\n for (let id = 0; id < lowerS.length; id++) {\n //id yields the index of the characters in lowerS\n //lowerS.charCodeAt(id) yields the character code at position id of lower\n // Code: 104 id: 0 lowerS[id]: h\n // code - 'a'.charCodeAt(0) = 104 - 97 = 7\n // Code: 101 id: 1 lowerS[id]: e\n // code - 'a'.charCodeAt(0) = 101 - 97 = 4\n // Code: 108 id: 2 lowerS[id]: l\n // code - 'a'.charCodeAt(0) = 108 - 97 = 11\n // Code: 108 id: 3 lowerS[id]: l\n // code - 'a'.charCodeAt(0) = 108 - 97 = 11\n // Code: 111 id: 4 lowerS[id]: o\n // code - 'a'.charCodeAt(0) = 111 - 97 = 14\n let code = lowerS.charCodeAt(id);\n console.log(\"Code: \", code, \" id: \", id, \" lowerS[id]: \", lowerS[id]);\n //Subtracting the character code of 'a' from code yields the character # of a-z (0-25)\n let index = code - 'a'.charCodeAt(0);\n console.log(`code - 'a'.charCodeAt(0) = ${code} - ${'a'.charCodeAt(0)} = ${index}`);\n occurrences[index]++;\n }\n console.log(\"New occurrences: \", occurrences);\n\n var best_char = 'a';\n var best_res = occurrences[0]; //replace 0 with the actual value of occurrences of 'a'\n\n //starting i at 1, because we've already set best_char = 'a' and 'a's occurrences.\n for (var i = 1; i < 26; i++) {\n if (occurrences[i] >= best_res) {\n //Now reverse this from an index (i) to a character code (fromCharCode) to a character (best_char)\n best_char = String.fromCharCode('a'.charCodeAt(0) + i);\n best_res = occurrences[i];\n }\n }\n\n return best_char;\n}", "function caesarCipher() {\n let originalString = getText();\n let cipherAmt = getCipherAmount();\n let encryptedString = \"\";\n for (let char of originalString) {\n char = char.toUpperCase();\n // Check if this char is a letter.\n if (char.toUpperCase() !== char.toLowerCase()) {\n // Char is a letter. Encrypt it.\n let charCode = ((char.charCodeAt(0) + cipherAmt) - 65) % 26 + 65;\n encryptedString += String.fromCharCode(charCode);\n } else {\n // Otherwise, add it to encrypted string unchanged.\n encryptedString += char;\n }\n }\n // Display the encrypted text in the top portion of the page\n let outputSection = document.getElementById(\"caesarCipherSection\");\n outputSection.innerText = encryptedString;\n}", "function rot13(str) {\n var re = new RegExp(\"[a-z]\", \"i\");\n var min = 'A'.charCodeAt(0);\n var max = 'Z'.charCodeAt(0);\n var factor = 13;\n var result = \"\";\n str = str.toUpperCase();\n\n for (var i=0; i<str.length; i++) {\n result += (re.test(str[i]) ?\n String.fromCharCode((str.charCodeAt(i) - min + factor) % (max-min+1) + min) : str[i]);\n }\n\n return result.toLowerCase();\n }", "function Cipher2()\n{\n \n var user_input = document.getElementById(\"input2\").value.toUpperCase(); // get user input from webpage\n var show_Output;\n var keySum = 0; // cipher key number to be used\n \n if (user_input.trim().length == 0)\n {\n alert(\"white space\");\n show_Output = document.getElementById(\"resultC2\");\n show_Output.style.color = \"red\";\n show_Output.innerHTML =\"Invalid input. \\n\\nPlease only enter alphabets between A-Z or a-z\";\n \n }\n else{\n \n \n for(i=0; i<user_input.length; i++)\n {\n keySum = keySum + user_input.charCodeAt(i); // working out key number by iterating through all chracters\n }\n\n key = keySum;\n keySum = keySum % 13; // further operation on key value to be used for encryption\n\n \n var cipherText = \"\";\n for(i=0; i<user_input.length; i++)\n {\n var unico = user_input.charCodeAt(i); // looping thoriugh every single input charcter to convert it into ciphered text\n\n if(unico >=65 && unico <=90) // only convert ciphered text if its UNICODE in specified range\n {\n cipherText = cipherText + String.fromCharCode(unico + keySum); // finally encrypting input to cipher text\n }\n\n\n }\n\n\n cipherText = cipherText + key; // this is to give hint to decrypter to decode text\n\n show_Output = document.getElementById(\"resultC2\");\n show_Output.style.color = \"black\";\n show_Output.innerHTML = cipherText.toString(); // display result\n }\n \n \n}", "function AtbashCipher(txt){\n \n inputText = document.getElementById(\"input1\").value;\n outputText = \"\";\n \n //Checking if inputText is empty\n if(inputText.length==0)\n document.getElementById(\"input2\").value = \"\";\n \n for( i=0;i<inputText.length;i++)\n {\n // Checking if the character is in [a-z] or [A-Z] \n if( AtbashWheel[inputText[i]] !== undefined ) {\n res += AtbashWheel[inputText[i]]; \n }\n //Checking if character non alphabetic\n else {\n //No change, use the same character\n res += inputText[i];\n }\n document.getElementById(\"input2\").value = res;\n }\n}", "function toRot13(str){\n var newString = \"\";\n \n for(var i = 0; i < str.length; i++){\n var code = str.charCodeAt(i);\n \n if(code >= 65 && code <= 90){\n code -= 65;\n code += 13;\n if(code > 25) code -= 26;\n code += 65;\n }else if(code >= 97 && code <= 122){\n code -= 97;\n code += 13;\n \n if(code > 25) code -= 26;\n code += 97;\n }else{\n //it's a number or a symbol\n }\n newString += String.fromCharCode(code);\n \n }\n return newString;\n}", "function caesarCipher(s, k) {\n // 한바퀴를 더 돌 경우( a+25=>z ) 모듈러 연산으로 무시\n k = k % 26;\n return s.split(\"\").map((char) => {\n let ascii = char.charCodeAt(0);\n if (ascii >= 65 && ascii <= 90) {\n let offset = 90 - k + 1;\n if (ascii / offset >= 1) {\n return String.fromCharCode(ascii % offset + 65);\n } else {\n return String.fromCharCode(ascii + k);\n }\n } else if (ascii >= 97 && ascii <= 122) {\n let offset = 122 - k + 1;\n if (ascii / offset >= 1) {\n return String.fromCharCode(ascii % offset + 97);\n } else {\n return String.fromCharCode(ascii + k);\n }\n } else {\n return char;\n }\n }).join(\"\");\n}", "function makeLetters(charCodes) {\n return charCodes.map(function(c) {\n return String.fromCharCode(c);\n }).join('');\n }", "function Cipher2Decode()\n{\n \n var user_input = document.getElementById(\"inputd2\").value.toLocaleUpperCase(); // get user input from webpage\n \n var keySum = 0; // cipher key number to be used\n var stringKey = \"\";\n var extracted_input = \"\";\n var show_Output ;\n \n if (user_input.trim().length == 0)\n {\n alert(\"white space\");\n show_Output = document.getElementById(\"resultd2\");\n show_Output.style.color = \"red\";\n show_Output.innerHTML =\"Invalid input. \\n\\nPlease only enter alphabets between A-Z or a-z\";\n \n }\n else{\n for(i=0; i<user_input.length; i++)\n {\n\n var unicode = user_input[i].toString();\n var code = unicode.charCodeAt(0);\n if(code >=48 && code <=57)\n {\n stringKey +=unicode;\n\n }\n else {\n extracted_input +=unicode;\n }\n\n }\n \n if(stringKey.length==0)\n {\n alert(\"Please also enter encryption key number in digits with plaint text.\");\n }\n \n keySum = parseInt(stringKey) ;\n\n keySum = keySum % 13; // further operation on key value to be used for encryption\n\n var cipherText = \"\";\n \n for(i=0; i<extracted_input.length; i++)\n {\n var unico = user_input.charCodeAt(i); // looping thoriugh every single input charcter to convert it into ciphered text\n\n cipherText += String.fromCharCode(unico - keySum); // finally encrypting input to cipher text\n\n }\n \n show_Output = document.getElementById(\"resultd2\");\n show_Output.style.color = \"black\";\n show_Output.innerHTML = cipherText.toString(); // display result\n output2.innerHTML = cipherText; // display result\n }\n}", "function encrypt(string) {\n /*asosiy kirill ga o'girish algoritmi */\n for (var i = 0; i < string.length; i++) {\n for (var j = 0; j < alphaLatin.length; j++) {\n\n\n if (string[i] == alphaLatin[j]) {\n CyrillicTranslated += alphaRus[j]; break;\n }\n /*simvollarni va shuningdek o'zi kirill alifbosidagi harflarni ham o'zgartirmaydi: */\n else if ((string.charCodeAt(i) >= 9 && string.charCodeAt(i) <= 11) || (string.charCodeAt(i) > 32 && string.charCodeAt(i) < 39) || (string.charCodeAt(i) > 39 && string.charCodeAt(i) <= 64) || (string.charCodeAt(i) >= 91 && string.charCodeAt(i) < 96) || (string.charCodeAt(i) >= 123 && string.charCodeAt(i) <= 1300)) {\n CyrillicTranslated += string[i]; break;\n // alert(\"son simvol topdi\"); \n }\n\n else if (string.charCodeAt(i) === 32) { /* probelni necha bo'lsa shuncha qo'shadi :)*/\n CyrillicTranslated += \" \"; break;\n }\n }\n }\n // console.log(CyrillicTranslated)\n }", "function VigenereCipher(key, abc) {\n let _key = [...key].map(char =>\n abc.indexOf(char))\n\n let _nextKey = index =>\n _key[index % _key.length]\n\n let checkAlphabet = (x, f) => \n abc.indexOf(x) >= 0 ? f(x) : x\n\n this.encode = str =>\n str.replace(/./g, (x, i) =>\n checkAlphabet(x, x => abc[(abc.indexOf(x) + _nextKey(i)) % abc.length]))\n\n this.decode = str =>\n str.replace(/./g, (x, i) =>\n checkAlphabet(x, x => abc[(abc.indexOf(x) - _nextKey(i) + abc.length) % abc.length]))\n}", "function rot13(str) {\n // LBH QVQ VG!\n //Set number variable shifting characters\n let num = 0;\n //New variable cyphyerString will hold the new shifted cipher strings\n let cypherString = \"\";\n //For loop goes through the string\n for (let i = 0; i < str.length; i++) {\n //ASCI value for the first character of the string\n num = str.charCodeAt(i);\n\n if (num >= 65) {\n //if ASCI value of the character is >= 65 shift by 13 characters\n num += 13;\n }\n //if less then 90 shift back by 26\n if (num > 90) {\n num -= 26;\n }\n //Put the new shifted cypher string in the cypherString Variable\n cypherString += String.fromCharCode(num);\n }\n return cypherString;\n}", "function translate(code, shift, reverse)\n{\n var char;\n var dictionary = [\"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\\uFFF7\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \" \", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"0\", \"1\", \"2\", \"3\", \"4\",\"5\",\"6\",\"7\",\"8\",\"9\", \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\",\"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\",\"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \";\",\"=\",\",\",\"-\",\".\",\"/\",\"`\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"[\",\"\\\\\",\"]\",\"'\"];\n if (reverse) {\n char = dictionary.indexOf(code);\n if (char == -1) shift = true;\n else return {letter: char, shift: false};\n }\n if (shift) {\n dictionary = [\"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \" \", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \")\", \"!\", \"@\", \"#\", \"$\",\"%\",\"^\",\"&\",\"*\",\"(\", \"\",\"\",\"\",\"\",\"\",\"\",\"\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\",\"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\",\"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\",\"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\" , \"\", \"\", \"\", \"\", \":\",\"+\",\"<\",\"_\",\">\", \"?\",\"~\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\", \"\", \"\" ,\"{\",\"|\",\"}\",\"\\\"\"];\n if (reverse) {\n char = dictionary.indexOf(code);\n return {letter: char, shift: true};\n }\n }\n char = dictionary[code];\n return char;\n}", "function foldingCipher(str) {\n let res = \"\";\n let alphabet = 'abcdefghijklmnopqrstuvwxyz'.split(\"\");\n let key = {};\n for (let i = 0; i < alphabet.length/2; i++) {\n let j = alphabet.length - 1 - i;\n let frontLetter = alphabet[i];\n let backLetter = alphabet[j];\n key[frontLetter] = backLetter;\n key[backLetter] = frontLetter;\n }\n str.split(\"\").forEach((term) => {\n if (term !== \" \") {\n term = key[term];\n }\n res += term;\n });\n return res;\n}", "function substitution(input, alphabet, encode = true) {\n\n const realAlphabet = 'abcdefghijklmnopqrstuvwxyz ';\n \n if(!alphabet || alphabet.length !== 26){\n return false;\n }\n\n for(duplicate of alphabet){\n if(alphabet.indexOf(duplicate) != alphabet.lastIndexOf(duplicate)) \n return false;\n }\n\n const newAlphabet = [...alphabet, ' '];\n input = input.toLowerCase();\n const cipher = [];\n\n for(let i=0; i<input.length; i++){\n if(encode === true){\n cipher.push(newAlphabet[realAlphabet.indexOf(input[i])]);\n }\n else{\n //encode === false;\n cipher.push(realAlphabet[newAlphabet.indexOf(input[i])]);\n }\n }\n return cipher.join('');\n }" ]
[ "0.7190994", "0.71582544", "0.6925791", "0.6867967", "0.68528605", "0.6757514", "0.67308587", "0.6707515", "0.6689409", "0.6686503", "0.6663738", "0.6628777", "0.6622813", "0.6614678", "0.65032476", "0.6484479", "0.6469598", "0.6458858", "0.6457889", "0.6449539", "0.64488024", "0.6447198", "0.6433635", "0.6418024", "0.6415709", "0.6410209", "0.63887495", "0.6386266", "0.6360778", "0.63492376", "0.63446", "0.63244563", "0.6301162", "0.62974256", "0.6288187", "0.62411714", "0.62388504", "0.6230161", "0.6223647", "0.6217168", "0.61779726", "0.6174603", "0.61738884", "0.61635095", "0.61611843", "0.61607146", "0.6124379", "0.61176485", "0.61021453", "0.6100713", "0.6079677", "0.60764104", "0.6067539", "0.6057971", "0.60520333", "0.6040587", "0.6036131", "0.6029587", "0.60284525", "0.60241544", "0.6020885", "0.6005899", "0.5994594", "0.59787124", "0.5969155", "0.59606034", "0.595033", "0.59399533", "0.5938608", "0.5931852", "0.5903866", "0.5898785", "0.5897012", "0.58948284", "0.58782494", "0.58605254", "0.58592117", "0.58571535", "0.5842442", "0.5838283", "0.58345115", "0.583414", "0.5822672", "0.5818984", "0.58081347", "0.57979244", "0.579096", "0.57819223", "0.5775628", "0.57755476", "0.57716095", "0.57655615", "0.57587147", "0.57573694", "0.5743844", "0.57339007", "0.5726355", "0.5722348", "0.5721452", "0.571927" ]
0.62268007
38
Functions that handle ListBox selection and button actions / onListBoxAction: Called from ListBox event handlers
function onListBoxAction (data) { if (data.index < 0) return; switch (data.action) { case 'navigate': if (debug) console.log(`navigate: ${data.index}`); updateButton(false); break; case 'activate': if (debug) console.log(`activate: ${data.index}`) sendButtonActivationMessage({ id: 'find', index: data.index }); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listBoxSelectionCallBack(eventObj)\n{\n\tkony.print(\"\\n\\nin list box selection\\n\\n\");\n\tif(btnId==\"btnOrigin\"){\n\t\tfrmAnimation.lblSelectedOrigin.text=\"Origin: \"+(eventObj.selectedKeyValue)[1];\n\t\tkony.print(\"\\n--->\"+frmAnimation.lblSelectedOrigin.text);\n\t\t\t\t\n\t}else{\n\t\t\n\t\tfrmAnimation.lblSelectedDestination.text=\"Destination: \"+(eventObj.selectedKeyValue)[1];\n\t}\n\tfrmAnimation.hboxResultLocation.setVisibility(true, null);\n\tfrmAnimation.hboxContainer.setVisibility(true, animationConfigEnable);\n\t\n\tfrmAnimation.removeAt(1, animationConfigDisable);\n}", "_listBoxChangeHandler(event) {\n const that = this;\n\n if ((that.dropDownAppendTo && that.dropDownAppendTo.length > 0) || that.enableShadowDOM) {\n that.$.fireEvent('change', event.detail);\n }\n\n if (that.autoComplete === 'list' && event.detail) {\n const lastSelectedItem = that.$.listBox._items[event.detail.index];\n\n that._lastSelectedItem = lastSelectedItem && lastSelectedItem.selected ? lastSelectedItem : undefined;\n }\n\n that._applySelection(that.selectionMode, event.detail);\n }", "function ListBox_ProcessOnKeyDown(strDecodedEvent)\n{\n\t//our return value\n\tvar result = new Event_EventResult();\n\t//by default: no action\n\tvar nAction = __SELECTION_IGNORE;\n\t//switch on the event\n\tswitch (strDecodedEvent)\n\t{\n\t\tcase \"Up\":\n\t\t\t//pressing the up moves selection up\n\t\t\tnAction = __SELECTION_UP;\n\t\t\tbreak;\n\t\tcase \"Down\":\n\t\t\t//pressing the down moves the selection down\n\t\t\tnAction = __SELECTION_DOWN;\n\t\t\tbreak;\n\n\t}\n\t//want to do something?\n\tif (nAction != __SELECTION_IGNORE)\n\t{\n\t\t//get the object\n\t\tvar theObject = this.InterpreterObject;\n\t\t//since we are handling this: block its handling\n\t\tresult.Block = true;\n\t\t//we have nothing selected yet\n\t\tvar currentlySelected = -1;\n\t\t//loop through all the content\n\t\tfor (var items = theObject.Items, i = 0, c = items.length; i < c; i++)\n\t\t{\n\t\t\t//found the selected item?\n\t\t\tif (items[i].Selected)\n\t\t\t{\n\t\t\t\t//memorise it\n\t\t\t\tcurrentlySelected = i;\n\t\t\t\t//end loop\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//want to scroll up?\n\t\tif (nAction == __SELECTION_UP)\n\t\t{\n\t\t\t//move selection up\n\t\t\tcurrentlySelected = Math.max(0, currentlySelected - 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//move selection down\n\t\t\tcurrentlySelected = Math.min(currentlySelected + 1, theObject.Items.length - 1);\n\t\t}\n\t\t//get the data\n\t\tvar data = \"\" + (theObject.Items[currentlySelected].Index + 1);\n\t\t//create a result for unselecting it\n\t\tvar actionResult = theObject.MultiSelection ? {} : __SIMULATOR.ProcessEvent(new Event_Event(theObject, __NEMESIS_EVENT_SELECT, data));\n\t\t//not blocking it? always block in designer\n\t\tif (!actionResult.Block && !__DESIGNER_CONTROLLER)\n\t\t{\n\t\t\t//not an action?\n\t\t\tif (!actionResult.AdvanceToStateId)\n\t\t\t{\n\t\t\t\t//mark as we have a user data\n\t\t\t\ttheObject.HasUserInput = true;\n\t\t\t\t//notify that we have changed data\n\t\t\t\t__SIMULATOR.NotifyLogEvent({ Type: __LOG_USER_DATA, Name: theObject.GetDesignerName(), Data: data });\n\t\t\t}\n\t\t\t//fake the selection\n\t\t\tListBox_UpdateSelection(this, theObject, \"\" + currentlySelected);\n\t\t\t//refresh the listbox\n\t\t\tListBox_Paint(theObject);\n\t\t}\n\t}\n\t//return the result\n\treturn result;\n}", "_listBoxChangeHandler(event) {\n const that = this;\n\n //Stop listBox's change event. TextBox will throw it's own 'change' event\n event.stopPropagation();\n\n if (event.detail.selected) {\n const label = that.$.listBox._items[event.detail.index][that.inputMember];\n\n that.$.listBox.$.filterInput.value = label;\n\n that.$.input.value = that.displayMode === 'escaped' ?\n that._toEscapedDisplayMode(label) : that._toDefaultDisplayMode(label);\n that.set('value', that._toDefaultDisplayMode(that.$.input.value));\n }\n\n if (that.autoComplete !== 'none' && typeof that.dataSource !== 'function') {\n that._autoComplete(true);\n }\n }", "_handleListboxClick(e) {\n this._toggleListbox(!this.expanded);\n }", "function listSelector(event) {\n // highlight selected cat's name in dropdown list\n highlightList(event);\n // set selected cat's name in header\n setName(event);\n // hide drop-down list after selection\n hideList();\n}", "function evtHandler() {\n // console.log(\"event handler initialized\");\n //jQuery('#editbox').dialog({'autoOpen': false});\n\n jQuery('#list-usePref li').click(function () {\n\n resetClass(jQuery(this), 'active');\n jQuery(this).addClass('active');\n // console.log(\"colorSelector: \",colorSelector);\n triggerViz(styleVal);\n\n });\n\n }", "handleListUpdate() {\n\n // Add listeners for when the user makes a selection.\n this._$el.find('input.aims-layer-input')\n .click(this.handleChange.bind(this));\n }", "function clickList(ev) {\n\t\n\tvar sel = elList.selection.file_object;\n\tif(sel instanceof File) {\n\t\tpreview.image = thumbPath(sel);\n\t} else if(sel instanceof Folder) {\n\t\tsearch.text = \"\";\n\t\tcurrentFolder = sel;\n\t\tloadSubElements(sel);\n\t}\n\n}", "function onListchange ( event ) {\n alert(\"list changed!\");\n }", "_applySelection() {\n const that = this;\n\n if (that.selectionDisplayMode === 'placeholder' || that.selectedIndexes.length === 0) {\n that.$.actionButton.innerHTML = that.placeholder;\n return;\n }\n\n if (!that.$.listBox._items || that.$.listBox._items.length === 0) {\n return;\n }\n\n that.$.actionButton.innerHTML = '';\n that.$.actionButton.appendChild(that._createToken());\n }", "function editor_tools_handle_list()\n{\n // Create the list picker on first access.\n if (!editor_tools_list_picker_obj)\n {\n // Create a new popup.\n var popup = editor_tools_construct_popup('editor-tools-list-picker', 'l');\n editor_tools_list_picker_obj = popup[0];\n var content_obj = popup[1];\n\n // Populate the new popup.\n var wrapper = document.createElement('div');\n wrapper.style.marginLeft = '1em';\n for (var i = 0; i < editor_tools_list_picker_types.length; i++)\n {\n var type = editor_tools_list_picker_types[i];\n\n var list;\n if (type == 'b') {\n list = document.createElement('ul');\n } else {\n list = document.createElement('ol');\n list.type = type;\n }\n list.style.padding = 0;\n list.style.margin = 0;\n var item = document.createElement('li');\n\n var a_obj = document.createElement('a');\n a_obj.href = 'javascript:editor_tools_handle_list_select(\"' + type + '\")';\n a_obj.innerHTML = editor_tools_translate('list type ' + type);\n\n item.appendChild(a_obj);\n list.appendChild(item);\n wrapper.appendChild(list);\n }\n content_obj.appendChild(wrapper);\n\n // Register the popup with the editor tools.\n editor_tools_register_popup_object(editor_tools_list_picker_obj);\n }\n\n // Display the popup.\n var button_obj = document.getElementById('editor-tools-img-list');\n editor_tools_toggle_popup(editor_tools_list_picker_obj, button_obj);\n}", "_menubuttonTap(e) {\n this.shadowRoot.querySelector(\"#listbox\").style.display = \"inherit\";\n if (this.resetOnSelect) {\n this.selected = \"\";\n }\n }", "function ListBox_Line_Mousedown(event)\n{\n\t//get event type\n\tvar evtType = Browser_GetMouseDownEventType(event);\n\t//valid?\n\tif (evtType)\n\t{\n\t\t//in touch browser? event was touch start?\n\t\tif (__BROWSER_IS_TOUCH_ENABLED && evtType == __BROWSER_EVENT_MOUSEDOWN)\n\t\t{\n\t\t\t//convert touchstarts to double clicks\n\t\t\tevtType = __BROWSER_EVENT_DOUBLECLICK;\n\t\t}\n\t\t//block the event\n\t\tBrowser_BlockEvent(event);\n\t\t//destroy menus\n\t\tPopups_TriggerCloseAll();\n\t\t//get the line we clicked on\n\t\tvar theLine = Browser_GetEventSourceElement(event);\n\t\t//search for the correct item\n\t\twhile (theLine && !theLine.Item)\n\t\t{\n\t\t\t//iterate\n\t\t\ttheLine = theLine.parentNode;\n\t\t}\n\t\t//valid?\n\t\tif (theLine && theLine.Item)\n\t\t{\n\t\t\t//retrieve our item\n\t\t\tvar item = theLine.Item;\n\t\t\t//retrieve our object\n\t\t\tvar theObject = item.InterpreterObject;\n\t\t\t//indicate to the simulator that we detected something on us\n\t\t\t__SIMULATOR.NotifyFocusEvent(null, false, theObject);\n\t\t\t//the selection state of the line\n\t\t\tvar bSelected = item.Selected;\n\t\t\t//want to reset?\n\t\t\tvar bReset = false;\n\t\t\t//event to trigger\n\t\t\tvar eEvent = false;\n\t\t\t//switch on the event\n\t\t\tswitch (evtType)\n\t\t\t{\n\t\t\t\tcase __BROWSER_EVENT_CLICK:\n\t\t\t\t\t//we in multi selection? or not selected or in designer\n\t\t\t\t\tif (theObject.MultiSelection || !bSelected || __DESIGNER_CONTROLLER)\n\t\t\t\t\t{\n\t\t\t\t\t\t//set event as click\n\t\t\t\t\t\teEvent = __NEMESIS_EVENT_SELECT;\n\t\t\t\t\t\t//toggle selection\n\t\t\t\t\t\tbSelected = !bSelected;\n\t\t\t\t\t\t//reset if we are arent multiselection\n\t\t\t\t\t\tbReset = !theObject.MultiSelection;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __BROWSER_EVENT_MOUSERIGHT:\n\t\t\t\t\t//set event as right click\n\t\t\t\t\teEvent = __NEMESIS_EVENT_RIGHTCLICK;\n\t\t\t\t\tbreak;\n\t\t\t\tcase __BROWSER_EVENT_DOUBLECLICK:\n\t\t\t\t\t//set event as double click\n\t\t\t\t\teEvent = __NEMESIS_EVENT_DBLCLICK;\n\t\t\t\t\t//ensure it will be selected\n\t\t\t\t\tbSelected = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//valid event?\n\t\t\tif (eEvent)\n\t\t\t{\n\t\t\t\t//update creation point\n\t\t\t\tPopupMenu_UpdateCreationPoint(event);\n\t\t\t\t//get the data\n\t\t\t\tvar data = \"\" + (item.Index + 1);\n\t\t\t\t//create a result for unselecting it\n\t\t\t\tvar result = (theObject.MultiSelection && eEvent == __NEMESIS_EVENT_SELECT) ? {} : __SIMULATOR.ProcessEvent(new Event_Event(theObject, eEvent, data));\n\t\t\t\t//not blocking it? always block in designer\n\t\t\t\tif (!result.Block && !__DESIGNER_CONTROLLER)\n\t\t\t\t{\n\t\t\t\t\t//not an action?\n\t\t\t\t\tif (!result.AdvanceToStateId)\n\t\t\t\t\t{\n\t\t\t\t\t\t//mark as we have a user data\n\t\t\t\t\t\ttheObject.HasUserInput = true;\n\t\t\t\t\t\t//notify that we have changed data\n\t\t\t\t\t\t__SIMULATOR.NotifyLogEvent({ Type: __LOG_USER_DATA, Name: theObject.GetDesignerName(), Data: data });\n\t\t\t\t\t}\n\t\t\t\t\t//need reset?\n\t\t\t\t\tif (bReset)\n\t\t\t\t\t{\n\t\t\t\t\t\t//loop through all the items\n\t\t\t\t\t\tfor (var i = 0, c = theObject.Items.length; i < c; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//unselect it\n\t\t\t\t\t\t\ttheObject.Items[i].Selected = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//update the state of our line\n\t\t\t\t\titem.Selected = bSelected;\n\t\t\t\t\t//refresh the listbox\n\t\t\t\t\tListBox_Paint(theObject);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function ListBox(parent, name, x, y, w, h, min = 1, max = 0, show = true)\n{\n\t/* --------------------------------------------------------------------------------------\n\tvalidate parameters \n\t-------------------------------------------------------------------------------------- */\n\tvar select = -1;\t\t// content index that is selected\n\tvar mouseover = -1;\t\t// content index where mouse cursor hovers\n\tvar as = true; \t\t\t// auto-scroll feature state\n\tvar ats = true; \t\t// auto-thumbsize feature state\n\tvar res = 1;\t\t\t// scroll resolution\n\tvar showFullSel = true;\t// when enabled, ensure selected items are fully visible\n\tvar t = 24;\t\t\t\t// scrollbar thickness\n\tvar ts = 32;\t\t\t// thumbsize (ignored if ats = true)\n\n\t/* --------------------------------------------------------------------------------------\n\tbuild ui components \n\t-------------------------------------------------------------------------------------- */\n\tvar body = new Frame(parent, name + \"_body\", x, y, w, h, false, false, !show);\n\tvar scrollbar = new Slider(body, name + \"_scrollbar\", true, body.width - t, 0, t, h, ts, min*res, max*res, false);\n\n\t/*--------------------------------------------------------------------------------------\n\tassign event handlers\n\t--------------------------------------------------------------------------------------*/\n\tvar drawbeginEvents = [];\n\tvar drawendEvents = [];\n\tvar resizeEvents = [];\n\tvar mousedragEvents = [];\n\tvar drawcontentEvents = [];\n\tvar selectEvents = [];\n\tthis.addEventListener = function(e, f)\n\t{\n\t\tif (e === \"drawbegin\"){ drawbeginEvents.push(f); }\n\t\tif (e === \"drawend\"){ drawendEvents.push(f); }\n\t\tif (e === \"drawcontent\"){ drawcontentEvents.push(f); }\n\t\tif (e === \"drawthumb\"){ scrollbar.addEventListener(e, f); }\n\t\tif (e === \"drawslider\"){ scrollbar.addEventListener(\"draw\", f); }\n\t\tif (e === \"resize\"){ resizeEvents.push(f); }\t\t\n\t\tif (e === \"mousedrag\"){ mousedragEvents.push(f); }\n\t\tif (e === \"select\"){ selectEvents.push(f); }\n\t}\n\t\n\tthis.removeEventListener = function(e, f)\n\t{\n\t\tif (e === \"drawbegin\"){ for (var i = 0; i < drawbeginEvents.length; i++){ if (drawbeginEvents[i] == f){ drawbeginEvents.splice(i,1); return; }}}\t\t\t\n\t\tif (e === \"drawend\"){ for (var i = 0; i < drawendEvents.length; i++){ if (drawendEvents[i] == f){ drawendEvents.splice(i,1); return; }}}\t\t\t\n\t\tif (e === \"drawcontent\"){ for (var i = 0; i < drawcontentEvents.length; i++){ if (drawcontentEvents[i] == f){ drawcontentEvents.splice(i,1); return; }}}\t\t\t\n\t\tif (e === \"drawthumb\"){ scrollbar.removeEventListener(e, f); }\t\t\n\t\tif (e === \"drawslider\"){ scrollbar.removeEventListener(\"draw\", f); }\t\t\t\n\t\tif (e === \"resize\"){ for (var i = 0; i < resizeEvents.length; i++){ if (resizeEvents[i] == f){ resizeEvents.splice(i,1); return; }}}\t\t\t\n\t\tif (e === \"mousedrag\"){ for (var i = 0; i < mousedragEvents.length; i++){ if (mousedragEvents[i] == f){ mousedragEvents.splice(i,1); return; }}}\t\t\t\n\t\tif (e === \"select\"){ for (var i = 0; i < selectEvents.length; i++){ if (selectEvents[i] == f){ selectEvents.splice(i,1); return; }}}\t\t\t\n\t}\t\t\n\n\t/*--------------------------------------------------------------------------------------\n handle draw event here \n --------------------------------------------------------------------------------------*/\n\n\t// body is the defacto container. what you draw here is the background of the container itself\n\tbody.addEventListener(\"draw\", function(e)\n\t{\t\n\t\t// begin draw event. draw background, start clipping, etc...\n\t\tfor (var i = 0; i < drawbeginEvents.length; i++) drawbeginEvents[i]({elem: this, name: name, x: e.x, y: e.y, w: e.w, h: e.h });\n\n\t\t// draw each content. this loop will set coordinates and extent value for each item.\n\t\tvar start = Math.floor((scrollbar.value - scrollbar.min) / res);\n\t\tvar end = Math.ceil((scrollbar.value > scrollbar.max? scrollbar.max: scrollbar.value) / res);\n\t\tfor (var i = start; i < end; i++)\n\t\t{\n\t\t\t// for each content, execute all event handlers for it\n\t\t\tfor (var j = 0; j < drawcontentEvents.length; j++) \n\t\t\t{\n\t\t\t\t// contents are drawn in column\n\t\t\t\tdrawcontentEvents[j]({elem: this, name: name, i: i, \n\t\t\t\t\tx: e.x, \n\t\t\t\t\ty: e.y + h/(scrollbar.min/res) * (i - (scrollbar.value - scrollbar.min)/res ), \n\t\t\t\t\tw: e.w - (scrollbar.hide? 0 : t), \n\t\t\t\t\th: h/(scrollbar.min/res),\n\t\t\t\t\ts: (i == select? true: false), // is this content selected?\n\t\t\t\t\tm: (i == mouseover? true: false), // is mouse cursor hovering this content?\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t// end draw event\n\t\tfor (var i = 0; i < drawendEvents.length; i++) drawendEvents[i]({elem: this, name: name, x: e.x, y: e.y, w: e.w, h: e.h });\n\t}.bind(this));\n\n\n\t/*--------------------------------------------------------------------------------------\n\twhen mouse drags over listbox, it actually drags over body so we handle it here\n\t--------------------------------------------------------------------------------------*/\n\tbody.addEventListener(\"mousedrag\", function(e)\n\t{\n\t\t// calculate the index of the list where mouse cursor intersects\n\t\tvar s = Math.floor((e.y - e.elem.getAbsPos().y) / (h/(scrollbar.min)));\n\n\t\t// assume visible.size (scrollbar.min) = content.size and calculate which content.index intersects with mouse cursor\n\t\t// this means index s can only be between 0 to visible.size - 1. let's make sure that's the case\n\t\tif (s < 0) \n\t\t{\n\t\t\tscrollbar.value -= res; // if cursor is dragged outside and above, let's scroll up\n\t\t\ts = 0;\n\t\t}\n\t\tif (s >= scrollbar.min)\n\t\t{\n\t\t\tscrollbar.value += res; // if cursor is dragged outside and below, let's scroll down\t\t\t\n\t\t\ts = scrollbar.min - 1;\n\t\t}\n\n\t\t// but what if content.size is actually smaller than visible.size? since contents are located starting at the top\n\t\t// of display, some area in display below the last content are unoccupied, and mouse cursor maybe intersecting it.\n\t\t// let's ensure the index s stays at max value then\n\t\tif (s >= scrollbar.max) s = scrollbar.max - 1;\n\t\t\n\t\t// finally, visible.size can be different from content.size, so we shift value based on scrollbar's current value.\n\t\ts += (scrollbar.value - scrollbar.min);\n\n\t\t// at this point, s is based on min/max resolution of scrollbar. let's convert it to list item resolution\n\t\ts /= res;\n\t\ts = Math.floor(s);\n\n\t\t// it's possible that selected items during mouse drag are partially visible. if this is enabled, it will update\n\t\t// scrollbar to ensure selected item is fully visible\n\t\tif (showFullSel)\n\t\t{\n\t\t\t// if select.top < value - min, value = top + min; select.top = select * res\n\t\t\tif (select*res < scrollbar.value - scrollbar.min) scrollbar.value = (select*res) + scrollbar.min;\n\n\t\t\t// if select.btm >= value, value = select.btm + min; select.btm = select * res + res - 1\n\t\t\tif (select*res + res - 1 >= scrollbar.value) scrollbar.value = (select*res + res - 1) + 1;\n\t\t}\n\n\t\t// update variables with new select values\n\t\tselect = s;\n\t\tmouseover = s;\n\n\t\t// execute event handlers for select change\n\t\tfor (var i = 0; i < selectEvents.length; i++){ selectEvents[i]({elem: this, name: name, s: select}); }\n\t}.bind(this));\n\n\t/*--------------------------------------------------------------------------------------\n\tfind the item index where mouse cursor hovers\n\t--------------------------------------------------------------------------------------*/\n\tbody.addEventListener(\"mousemove\", function(e)\n\t{\n\t\tmouseover = (e.y - e.elem.getAbsPos().y) / (h/scrollbar.min) + (scrollbar.value - scrollbar.min);\n\t\tmouseover /= res;\n\t\tmouseover = Math.floor(mouseover);\n\n\t}.bind(this));\n\n\t/*--------------------------------------------------------------------------------------\n\tno more mouseover on any item if mouse leaves listbox extent or enter \n\tits child (scrollbar)\n\t--------------------------------------------------------------------------------------*/\n\tbody.addEventListener(\"mouseleave\", function(e){ mouseover = -1;}.bind(this));\t\n\tbody.addEventListener(\"mouseout\", function(e){ mouseover = -1; }.bind(this)); \n\t\n\t/*--------------------------------------------------------------------------------------\n\tfind the item where mouse cursor click and set it as select\n\t--------------------------------------------------------------------------------------*/\n\tbody.addEventListener(\"mousedown\", function(e)\n\t{\n\t\t// calculate the index of the list where mouse cursor intersects\n\t\tselect = (e.y - e.elem.getAbsPos().y) / (h/scrollbar.min) + (scrollbar.value - scrollbar.min);\n\t\tselect /= res;\n\t\tselect = Math.floor(select);\n\n\t\t// it's possible that selected items during mouse down are partially visible. if this is enabled, it will update\n\t\t// scrollbar to ensure selected item is fully visible\n\t\tif (showFullSel)\n\t\t{\n\t\t\t// if select.top < value - min, value = top + min; select.top = select * res\n\t\t\tif (select*res < scrollbar.value - scrollbar.min) scrollbar.value = (select*res) + scrollbar.min;\n\n\t\t\t// if select.btm >= value, value = select.btm + min; select.btm = select * res + res - 1\n\t\t\tif (select*res + res - 1 >= scrollbar.value) scrollbar.value = (select*res + res - 1) + 1;\n\t\t}\n\t\t\n\t\t// execute event handlers for select change\n\t\tfor (var i = 0; i < selectEvents.length; i++){ selectEvents[i]({elem: this, name: name, s: select}); }\n\t}.bind(this));\t\t\n\n\t/*--------------------------------------------------------------------------------------\n\tupdate thumbsize based on min/max values IF auto-thumbsize feature is ON\n\totherwise, set it to fixed value ts\n\t--------------------------------------------------------------------------------------*/\n\tfunction onUpdateThumbSize()\n\t{\n\t\tif (ats)\n\t\t{\n\t\t\t// update thumbsize. make sure it's not too small or it will be too small to click\n\t\t\tscrollbar.thumbsize = scrollbar.min / scrollbar.max * h;\n\t\t\tif (scrollbar.thumbsize < ts) scrollbar.thumbsize = ts;\n\t\t}\n\t\telse scrollbar.thumbsize = ts;\n\t}\n\n\t/*--------------------------------------------------------------------------------------\n\tmin property\n\t--------------------------------------------------------------------------------------*/\n Object.defineProperty(this, \"min\", \n { \n get: function(){ return scrollbar.min/res; },\n\t\tset: function(e)\n\t\t{ \n\t\t\tscrollbar.min = e *res; \n\t\t\tscrollbar.hide = as? (scrollbar.min >= scrollbar.max? true: false): false;\t\t\n\t\t\tonUpdateThumbSize();\n\t\t} \n\t }); \n\n\t/*--------------------------------------------------------------------------------------\n\tmax property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"max\", \n\t{ \n\t\tget: function(){ return scrollbar.max/res; },\n\t\tset: function(e)\n\t\t{ \n\t\t\tscrollbar.max = e * res; \n\t\t\tscrollbar.hide = as? (scrollbar.min >= scrollbar.max? true: false): false;\t\t\n\t\t\tonUpdateThumbSize();\n\n\t\t\t// if our content size is now smaller than currently selected, let's reset select\n\t\t\tif (scrollbar.max <= select)\n\t\t\t{\n\t\t\t\tselect = -1;\n\t\t\t\t\n\t\t\t\t// execute event handlers for select change\n\t\t\t\tfor (var i = 0; i < selectEvents.length; i++){ selectEvents[i]({elem: this, name: name, s: select}); }\n\t\t\t}\n\t\t} \n\t}); \n\n\t/*--------------------------------------------------------------------------------------\n\tthumb property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"thumbsize\", \n\t{ \n\t\tget: function(){ return scrollbar.thumbsize; },\n\t\tset: function(e)\n\t\t{ \n\t\t\tts = e;\n\t\t\tonUpdateThumbSize();\n\t\t} \n\t}); \n\n\t/*--------------------------------------------------------------------------------------\n\tfixed/dynamic thumb size property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"autothumbsize\", \n\t{ \n\t\tget: function(){ return ats; },\n\t\tset: function(e)\n\t\t{ \n\t\t\tats = e;\n\t\t\tonUpdateThumbSize();\n\t\t} \n\t}); \n\n\t/*--------------------------------------------------------------------------------------\n\twidth property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"width\", \n\t{ \n\t\tget: function(){ return w; },\n\t\tset: function(e)\n\t\t{ \n\t\t\tw = e;\n\t\t\tbody.width = w;\n\t\t\tscrollbar.x = w - t;\n\t\t} \n\t}); \t\n\n\t/*--------------------------------------------------------------------------------------\n\theight property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"height\", \n\t{ \n\t\tget: function(){ return h; },\n\t\tset: function(e)\n\t\t{ \n\t\t\th = e;\n\t\t\tbody.height = h;\n\t\t\tscrollbar.height = h;\n\t\t\tonUpdateThumbSize();\n\t\t} \n\t}); \t\n\n\t/*--------------------------------------------------------------------------------------\n\tscroll resolution property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"scrollres\", \n\t{ \n\t\tget: function(){ return res; },\n\t\tset: function(e)\n\t\t{\n\t\t\tprev = res;\n\t\t\tres = e;\n\t\t\t// do this to fire up min/max property function and update stuff based on new \n\t\t\t// scroll resolution value\t\t\t\n\t\t\tthis.min = scrollbar.min / prev;\n\t\t\tthis.max = scrollbar.max / prev;\n\t\t} \n\t}); \n\n\t/*--------------------------------------------------------------------------------------\n\tselect property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"select\", {\tget: function(){ return select; } }); \t\n\n\t/*--------------------------------------------------------------------------------------\n\tscrollbar thickness (width) property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"scrollthickness\", \n\t{\t\n\t\tget: function(){ return scrollbar.width; },\n\t\tset: function(e)\n\t\t{\n\t\t\tt = e;\n\t\t\tscrollbar.width = t;\t\t\n\t\t\tscrollbar.x = body.width - t;\n\t\t}\n\t}); \t\n\n\t/*--------------------------------------------------------------------------------------\n\tautoscroll property\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"autoscroll\", \n\t{ \n\t\tget: function(){ return as; },\n\t\tset: function(e)\n\t\t{ \n\t\t\tas = e; \n\t\t\tscrollbar.hide = as? (scrollbar.min >= scrollbar.max? true: false): false;\t\t\n\t\t} \n\t}); \n\n\t/*--------------------------------------------------------------------------------------\n\tvarious properties\n\t--------------------------------------------------------------------------------------*/\n\tObject.defineProperty(this, \"x\", { get: function(){ return x; }, set: function(e){ x = e; }});\n Object.defineProperty(this, \"y\", { get: function(){ return y; }, set: function(e){ y = e; }});\n Object.defineProperty(this, \"hide\", { get: function(){ return !show; }, set: function(e){ show = !e; }}); \n Object.defineProperty(this, \"name\", { get: function(){ return name; } });\n Object.defineProperty(this, \"parent\", { get: function(){ return parent; } });\n\n\t/*--------------------------------------------------------------------------------------\n\tinitialize certain properties so to update all properties before launching\n\t--------------------------------------------------------------------------------------*/\n//\tthis.min = this.min;\n}", "function clickedItem(e) {\n\t\tvar $li = $(e.target);\n\t\tvar label = $li.attr('data-label');\n\t\tvar value = $li.attr('data-value');\n\n\t\t// Forward to update function\n\t\tselectUpdateValue(e.data,$li);\n\n\t\tselectClose(e.data);\n\t}", "function onListWidgetClick(id) {\r\n\r\n /// get the clicked asset\r\n let selectedAsset = getAssetFromClick(id);\r\n onPickedAsset(selectedAsset);\r\n\r\n /// close the slide list if is open\r\n onListButtonClick();\r\n }", "function useListBoxExample() {\n const [isEditing, setIsEditing] = React.useState(false);\n const [value, setValue] = React.useState(subscriptionTypes[1]);\n const [valueOnChange, setValueOnChange] = React.useState(\"\");\n\n function handleOnStart() {\n setIsEditing(true);\n }\n\n function handleClose() {\n setIsEditing(false);\n }\n\n function handleSubmit(index, options) {\n setValue(options[index].value);\n }\n\n function handleChange(index, options) {\n setValueOnChange(options[index].value);\n }\n\n return {\n onChange: handleChange,\n onSubmit: handleSubmit,\n onClose: handleClose,\n onStart: handleOnStart,\n isEditing,\n value,\n valueOnChange,\n };\n}", "function eventListSelection(requestParams, isPersistentFromAPI) {\n\t\tconst overlayContent = $(overlay.iframe);\n\n\t\t$(document).off('mouseover touchend', 'div#listSummaryContainer > div')\n\t\t\t.on('mouseover touchend', 'div#listSummaryContainer > div', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\toverlayContent.find('div#listSummaryContainer > div').removeClass('selected');\n\t\t\t\t$(this).addClass('selected');\n\t\t\t});\n\n\t\t$(document).off('click touchend', 'div#listSummaryContainer > div > button')\n\t\t\t.on('click touchend', 'div#listSummaryContainer > div > button', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tvar $parent = $(this).parent(),\n\t\t\t\t\tlistName = $.trim($parent.data('name')),\n\t\t\t\t\tlistId = $.trim($parent.data('id'));\n\t\t\t\tif ($parent.hasClass('selected')) {\n\t\t\t\t\tif (listId !== '') {\n\t\t\t\t\t\taddItemToList(OP_CODE_UPDATE, {\n\t\t\t\t\t\t\tlistName: listName,\n\t\t\t\t\t\t\tlistId: listId\n\t\t\t\t\t\t}, requestParams);\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddItemToList(OP_CODE_CREATE, {\n\t\t\t\t\t\t\tlistName: listName\n\t\t\t\t\t\t}, requestParams);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t$(document).off('click', 'div#twoClickCreateList')\n\t\t\t.on('click', 'div#twoClickCreateList', function (event) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// Modifying the overlay title\n\t\t\t\toverlay.setTitle('Create a List');\n\t\t\t\toverlayContent.find('div#listSaveExternal div#listContent').html($(createListTemplate));\n\n\t\t\t\toverlayContent.find('div#listSaveExternal div#listContent')\n\t\t\t\t\t.find('input#twoClickListName').focus();\n\n\t\t\t\t//Analytics\n\t\t\t\tanalytics.trackCreateListOverlay();\n\t\t\t});\n\n\t\t//Handling the enter in the create list field\n\t\t$(document).off('keypress', 'input#twoClickListName')\n\t\t\t.on('keypress', 'input#twoClickListName', function (event) {\n\t\t\t\tif (event.keyCode === 13) {\n\t\t\t\t\toverlayContent.find('button#twoClickSave').trigger('click');\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\n\t\t$(document).off('click', 'button#twoClickSave')\n\t\t\t.on('click', 'button#twoClickSave', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\toverlayContent.find('span#twoClickCreateListForm').removeClass('form-input--error');\n\t\t\t\tvar listName = $('#twoClickListName').val();\n\t\t\t\tif (validateListName(listName)) {\n\t\t\t\t\taddItemToList(OP_CODE_CREATE, {\n\t\t\t\t\t\tlistName: listName\n\t\t\t\t\t}, requestParams);\n\t\t\t\t}\n\t\t\t});\n\n\t\t$('div#listSummaryContainer').scroll(function (event) {\n\t\t\tif (Math.floor($(this)[0].scrollHeight - $(this).scrollTop()) <= ($(this).outerHeight() + 5)) {\n\t\t\t\t$(this).removeClass('list--save__scroll');\n\t\t\t} else if (!$(this).hasClass('list--save__scroll')) {\n\t\t\t\t$(this).addClass('list--save__scroll');\n\t\t\t}\n\t\t});\n\n\t\t$(document).off('click', 'div#listSaveFooter a')\n\t\t\t.on('click', 'div#listSaveFooter a', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tvar isRegisterTab = ($(this).data('action') === 'register') ? true : false;\n\t\t\t\tauthenticateUser(isMobile, parameters, isRegisterTab);\n\t\t\t});\n\t}", "function populateListItems(listData, listItemTitle, selectionHandler) {\n\n //set default handler\n if (selectionHandler == null) {\n selectionHandler = defaultListSelectionHandler;\n }\n\n //set default title generator\n if (listItemTitle == null) {\n listItemTitle = defaultTitleGenerator;\n }\n\n //init list menu\n $(\"#listMenu\").popup();\n $(\"#listItems\").find(\".lovItem\").remove();\n\n $(\"#listMenu\").off(\"click\", \"li\")\n\n\n //add list items to lov\n if (listData != null && isArray(listData)) {\n for (var j = 0; j < listData.length; j++) { //row in table\n\n var liElement = $(\"<li/>\");\n liElement.addClass(\"lovItem\");\n\n for (var k in listData[j]) {\n var cellName = k;\n var cellValue = listData[j][k];\n liElement.data(cellName, cellValue);\n\n }\n\n var aElem = $(\"<a/>\");\n aElem.attr(\"href\", \"#\");\n aElem.addClass(\"ui-btn\");\n aElem.addClass(\"ui-btn-icon-right\");\n aElem.addClass(\"ui-icon-carat-r\");\n\n\n if (isFunction(listItemTitle)) {\n var text = listItemTitle.call(this, liElement.data(), j);\n aElem.text(text);\n }\n else {\n //populate list-item text\n aElem.text(liElement.data(String(listItemTitle)));\n }\n\n liElement.append(aElem);\n\n $(\"#listItems\").append(liElement);\n\n }\n }\n\n //handle item clicked\n $(\"#listMenu\").on(\"click\", \"li\",\n function () {\n $(\"#listMenu\").popup(\"close\");\n selectionHandler.call(this, $(this).data());\n }\n );\n\n $(\"#listMenu\").popup();\n\n $(\"#listMenu\").popup(\"open\");\n\n}", "function addItemToListHandler (e) {\n\t\tvar curElement = this;\n\t\tshowOverlay(curElement,addItemToList);\n\t\te.preventDefault();\n\t}", "addListViewItemHandlers(listItem) {\n var item = listItem.tag;\n listItem.selectedChanged.add(() => {\n if (listItem.selected) {\n this._listSelectedItem = item;\n this.detailViewOf(item);\n }\n });\n }", "_initEvents () {\n this.el.addEventListener('click', (e) => {\n if (e.target.dataset.action in this.actions) {\n this.actions[e.target.dataset.action](e.target);\n } else this._checkForLi(e.target);\n });\n }", "function initSelectionHandler(){\n $('button#select').on('click', function(e){\n var $filelist = $('#filelist');\n // clear the list and add the new selections\n $filelist.find('tr[data-source=\"config-browser\"]').each(function(idx, tr){\n var selection = getSelectionFromTR(tr);\n $filelist.trigger({type: 'config:removed', source: 'config-browser', selection: selection});\n });\n $(selections).each(function(idx, selection){\n $filelist.trigger({type: 'config:added', source: 'config-browser', selection: selection});\n });\n selections = [];\n });\n }", "function SelectionChange() {}", "function SelectionChange() {}", "function SelectionChange() {}", "function SelectionChange() {}", "'click .list-selected' (event) {\n\t\tevent.preventDefault();\n\n\t\tvar list = $(event.currentTarget).attr('list-id');\n\t\tSession.set('listId', list);\n\t\tSession.set('active', list);\n\t\tFlowRouter.go('/list/'+ list);\n\t}", "function SelectionChange() { }", "function SelectionChange() { }", "function handleSelectList(listName, listMenuItemEl, todoAppData, todoViewSetter) {\n\ttodoAppData.setSelectedList(listName);\n\ttodoViewSetter.setActiveListMenuItem(listMenuItemEl);\n\ttodoViewSetter.setSelectedList(todoAppData.selectedList);\n}", "function ListItem() { }", "function updateListboxSelection() {\n var data_params = $('form#main_form').serializeArray();\n $('input[name=\"knowledge_pad_module_ung_knowledge_pad_ung_docs_listbox_content_listbox_uid:list\"]').each(function() {\n data_params.push({\n 'name': 'listbox_uid:list',\n 'value': this.value\n });\n });\n $.ajax({\n async: false,\n type: 'POST',\n url: 'Base_updateListboxSelection',\n data: $.param(data_params)\n });\n}", "selectItemEvent(event) {\n\n var name = event.target.getAttribute('data-name')\n var boxid = event.target.getAttribute('id')\n var client = event.data.client\n var items = client.items\n var index = items.selected.indexOf(name);\n\n // If selected, we want to unselect it\n if ($(event.target).hasClass(client.selectedClass)) {\n $(event.target).removeClass(client.selectedClass);\n $(event.target).attr(\"style\", \"\");\n client.items.selected.splice(index, 1);\n\n // If unselected, we want to select it\n } else {\n $(event.target).attr(\"style\", \"background:\" + client.selectedColor);\n $(event.target).addClass(client.selectedClass);\n client.items.selected.push(name)\n }\n client.bingoCheck()\n }", "onSelectionRequested(e) {\n const previouslySelectedItems = this.getSelectedItems();\n let selectionChange = false;\n this._selectionRequested = true;\n if (this.mode !== _ListMode.default.None && this[`handle${this.mode}`]) {\n selectionChange = this[`handle${this.mode}`](e.detail.item, !!e.detail.selected);\n }\n if (selectionChange) {\n const changePrevented = !this.fireEvent(\"selection-change\", {\n selectedItems: this.getSelectedItems(),\n previouslySelectedItems,\n selectionComponentPressed: e.detail.selectionComponentPressed,\n targetItem: e.detail.item,\n key: e.detail.key\n }, true);\n if (changePrevented) {\n this._revertSelection(previouslySelectedItems);\n }\n }\n }", "function CameraCommand_Action_ProcessMode_ListBox(elapsed)\n{\n\t//want to show text?\n\tif (this.bDisplayMessage)\n\t{\n\t\t//trigger the display of our message\n\t\t__SIMULATOR.DisplayMessage(this.TutorialMessage, __MSG_TYPE_CAMERA);\n\t\t//no longer showing message\n\t\tthis.bDisplayMessage = false;\n\t}\n\t//have we searched for the item?\n\telse if (!this.Mode_ListBox_SearchedForItem)\n\t{\n\t\t//no data?\n\t\tif (this.Data == null || this.Data.length == 0)\n\t\t{\n\t\t\t//scrolling done\n\t\t\tthis.Mode_ListBox_ScrolledIntoView = true;\n\t\t\t//final action\n\t\t\tthis.Mode_ListBox_Final = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//get the item's result\n\t\t\tvar result = ListBox_GetNextItem(this.Object.HTML, this.Data);\n\t\t\t//memorise the item\n\t\t\tthis.Mode_ListBox_Item_Index = result.Index;\n\t\t\t//final action?\n\t\t\tthis.Mode_ListBox_Final = result.Final;\n\t\t}\n\t\t//we have searched for our index\n\t\tthis.Mode_ListBox_SearchedForItem = true;\n\t}\n\t//need to scroll?\n\telse if (!this.Mode_ListBox_ScrolledIntoView)\n\t{\n\t\t//scrolling done\n\t\tthis.Mode_ListBox_ScrolledIntoView = true;\n\t\t//get the item\n\t\tvar item = this.Object.MapItems[this.Mode_ListBox_Item_Index];\n\t\t//has valid html?\n\t\tif (item.HTML && !/none/i.test(item.HTML.style.display))\n\t\t{\n\t\t\t//we just want this to be scrolled into view\n\t\t\tthis.Camera.Commands.push(new CameraCommand_Scroll(this.Camera, item.HTML, null));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//get the object's clientHeight\n\t\t\tvar clientHeight = this.Object.HTML.clientHeight;\n\t\t\t//now calculate our scroll pos\n\t\t\tvar targetScroll = Math.max(0, item.Top - (clientHeight + item.Height) / 2);\n\n\t\t\tvar point = null;\n\t\t\t//create a fake scroll command\n\t\t\tvar scroll = new CameraCommand_Scroll(this.Camera, this.Object.HTML, null);\n\t\t\t//update it to our desired state\n\t\t\tscroll.State = __CAMERA_CMD_STATE_SCROLLING;\n\t\t\tscroll.ScrollTarget = this.Object.HTML;\n\t\t\tscroll.ScrollValue = targetScroll;\n\t\t\t//get our position\n\t\t\tvar targetArea = Position_GetDisplayRect(this.Object.HTML);\n\t\t\t//adjust for the scroll point\n\t\t\tif (targetScroll > this.Object.HTML.scrollTop)\n\t\t\t{\n\t\t\t\t//need to scroll down\n\t\t\t\tpoint = { x: targetArea.right - __CAMERA_CMD_SCROLL_BARSIZE / 2, y: targetArea.bottom - __CAMERA_CMD_SCROLL_BARSIZE / 2 };\n\t\t\t\tscroll.ScrollDirection = __CAMERA_CMD_SCROLL_DOWN;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//need to scroll up\n\t\t\t\tpoint = { x: targetArea.right - __CAMERA_CMD_SCROLL_BARSIZE / 2, y: targetArea.top + __CAMERA_CMD_SCROLL_BARSIZE / 2 };\n\t\t\t\tscroll.ScrollDirection = __CAMERA_CMD_SCROLL_UP;\n\t\t\t}\n\t\t\t//activate it\n\t\t\tthis.Camera.Commands.push(scroll);\n\t\t\t//set a move command\n\t\t\tthis.Camera.Commands.push(new CameraCommand_Move(this.Camera, point.x, point.y));\n\t\t}\n\t\t//scrolling only?\n\t\tif (this.bScrollOnly)\n\t\t{\n\t\t\t//done\n\t\t\tthis.State = __CAMERA_CMD_STATE_FINISHED;\n\t\t}\n\t}\n\t//target not yet specified\n\telse if (!this.Target)\n\t{\n\t\t//get target\n\t\tthis.Target = this.Object.GetHTMLTarget(this.Event, this.Data);\n\t}\n\t//not final?\n\telse if (!this.Mode_ListBox_Final)\n\t{\n\t\t//moved to the target?\n\t\tif (this.bMoveToTarget)\n\t\t{\n\t\t\t//notify the target area\n\t\t\tthis.Camera.NotifyTargetArea(this.GenerateTargetArea(this.Target, null));\n\t\t\t//generate target point for button\n\t\t\tthis.TargetPoint = this.GenerateTargetPoint(this.Target, null);\n\t\t\t//move to the target\n\t\t\tthis.Camera.Commands.push(new CameraCommand_Move(this.Camera, this.TargetPoint.x, this.TargetPoint.y));\n\t\t\t//on the target\n\t\t\tthis.bMoveToTarget = false;\n\t\t}\n\t\t//shown animation\n\t\telse if (!this.Mode_ListBox_ClickAnimation)\n\t\t{\n\t\t\t//add an animation command\n\t\t\tthis.Camera.Commands.push(new CameraCommand_Animation(this.Camera, __CAMERA_UI_TYPE_LEFT_CLICK));\n\t\t\t//animation done\n\t\t\tthis.Mode_ListBox_ClickAnimation = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//trigger the action\n\t\t\tBrowser_FireEvent(this.Target, __BROWSER_EVENT_CLICK);\n\t\t\t//done this so reset for next\n\t\t\tthis.Mode_ListBox_SearchedForItem = null;\n\t\t\tthis.Mode_ListBox_ScrolledIntoView = false;\n\t\t\tthis.Target = null;\n\t\t\tthis.bMoveToTarget = true;\n\t\t\tthis.Mode_ListBox_ClickAnimation = false;\n\t\t}\n\t}\n\t//want to trigger laser?\n\telse if (this.bTriggerLaser)\n\t{\n\t\t//get the laser colour \n\t\tvar color = this.bDataCheck ? this.Camera.CameraData.Parameters.LaserColourData : this.Camera.CameraData.Parameters.LaserColourAction;\n\t\t//create a new laser command and add it to the command queue\n\t\tthis.Camera.Commands.push(new CameraCommand_Laser(this.Camera, this.Target, this.TargetArea, color));\n\t\t//no longer triggering laser\n\t\tthis.bTriggerLaser = false;\n\t}\n\t//want to trigger overlay?\n\telse if (this.bTriggerOverlay)\n\t{\n\t\t//get the overlay colour \n\t\tvar color = this.bDataCheck ? this.Camera.CameraData.Parameters.OverlayColourData : this.Camera.CameraData.Parameters.OverlayColourAction;\n\t\t//add an overlay command\n\t\tthis.Camera.Commands.push(new CameraCommand_Overlay(this.Camera, this.Target, this.TargetArea, color));\n\t\t//no longer triggering overlay\n\t\tthis.bTriggerOverlay = false;\n\t}\n\t//clicked on it?\n\telse if (this.bTriggerFinalAction)\n\t{\n\t\t//moved to the target?\n\t\tif (this.bMoveToTarget)\n\t\t{\n\t\t\t//notify the target area\n\t\t\tthis.Camera.NotifyTargetArea(this.GenerateTargetArea(this.Target, null));\n\t\t\t//generate target point for button\n\t\t\tthis.TargetPoint = this.GenerateTargetPoint(this.Target, null);\n\t\t\t//move to the target\n\t\t\tthis.Camera.Commands.push(new CameraCommand_Move(this.Camera, this.TargetPoint.x, this.TargetPoint.y));\n\t\t\t//on the target\n\t\t\tthis.bMoveToTarget = false;\n\t\t}\n\t\t//shown animation\n\t\telse if (!this.Mode_ListBox_ClickAnimation)\n\t\t{\n\t\t\t//check event\n\t\t\tswitch (this.Event)\n\t\t\t{\n\t\t\t\tcase __NEMESIS_EVENT_CLICK_RIGHT:\n\t\t\t\tcase __NEMESIS_EVENT_RIGHTCLICK:\n\t\t\t\t\t//add an animation command\n\t\t\t\t\tthis.Camera.Commands.push(new CameraCommand_Animation(this.Camera, __CAMERA_UI_TYPE_RIGHT_CLICK));\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_EVENT_CLICK:\n\t\t\t\tcase __NEMESIS_EVENT_SELECT:\n\t\t\t\tcase __NEMESIS_EVENT_NOTHANDLED:\n\t\t\t\t\t//add an animation command\n\t\t\t\t\tthis.Camera.Commands.push(new CameraCommand_Animation(this.Camera, __CAMERA_UI_TYPE_LEFT_CLICK));\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_EVENT_DBLCLICK:\n\t\t\t\t\t//add an animation command\n\t\t\t\t\tthis.Camera.Commands.push(new CameraCommand_Animation(this.Camera, __CAMERA_UI_TYPE_DBL_CLICK));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//animation done\n\t\t\tthis.Mode_ListBox_ClickAnimation = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//check event\n\t\t\tswitch (this.Event)\n\t\t\t{\n\t\t\t\tcase __NEMESIS_EVENT_CLICK_RIGHT:\n\t\t\t\tcase __NEMESIS_EVENT_RIGHTCLICK:\n\t\t\t\t\t//trigger the action\n\t\t\t\t\tBrowser_FireEvent(this.Target, __BROWSER_EVENT_MOUSERIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_EVENT_SELECT:\n\t\t\t\tcase __NEMESIS_EVENT_CLICK:\n\t\t\t\tcase __NEMESIS_EVENT_NOTHANDLED:\n\t\t\t\t\t//trigger the action\n\t\t\t\t\tBrowser_FireEvent(this.Target, __BROWSER_EVENT_CLICK);\n\t\t\t\t\tbreak;\n\t\t\t\tcase __NEMESIS_EVENT_DBLCLICK:\n\t\t\t\t\t//trigger the action\n\t\t\t\t\tBrowser_FireEvent(this.Target, __BROWSER_EVENT_DOUBLECLICK);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//done this\n\t\t\tthis.bTriggerFinalAction = false;\n\t\t}\n\t}\n\telse\n\t{\n\t\t//done\n\t\tthis.State = __CAMERA_CMD_STATE_FINISHED;\n\t}\n}", "function newLiButtonClicked(){\n createListItem();\n }", "function ListView_ProcessOnKeyDown(strDecodedEvent)\n{\n\t//our return value\n\tvar result = new Event_EventResult();\n\t//by default: no action\n\tvar nAction = __SELECTION_IGNORE;\n\t//get the object\n\tvar theObject = this.InterpreterObject;\n\t//has it got content\n\tif (theObject.Content && theObject.Content.Items && theObject.Content.Items.length > 0)\n\t{\n\t\t//switch on the event\n\t\tswitch (strDecodedEvent)\n\t\t{\n\t\t\tcase \"Left\":\n\t\t\t\t//check the type\n\t\t\t\tif (theObject.Content.ListView_Style != __LISTVIEW_STYLE_REPORT)\n\t\t\t\t{\n\t\t\t\t\t//move the selection to the left\n\t\t\t\t\tnAction = __SELECTION_LEFT;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Right\":\n\t\t\t\t//check the type\n\t\t\t\tif (theObject.Content.ListView_Style != __LISTVIEW_STYLE_REPORT)\n\t\t\t\t{\n\t\t\t\t\t//move the selection to the right\n\t\t\t\t\tnAction = __SELECTION_RIGHT;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"Up\":\n\t\t\t\t//pressing the up moves selection up\n\t\t\t\tnAction = __SELECTION_UP;\n\t\t\t\tbreak;\n\t\t\tcase \"Down\":\n\t\t\t\t//pressing the down moves the selection down\n\t\t\t\tnAction = __SELECTION_DOWN;\n\t\t\t\tbreak;\n\t\t}\n\t\t//want to do something?\n\t\tif (nAction != __SELECTION_IGNORE)\n\t\t{\n\t\t\t//since we are handling this: block its handling\n\t\t\tresult.Block = true;\n\t\t\t//get last selected item\n\t\t\tvar currentlySelected = Get_Number(theObject.Content.Item_LastSelected, -1);\n\t\t\t//switch on direction\n\t\t\tswitch (nAction)\n\t\t\t{\n\t\t\t\tcase __SELECTION_LEFT:\n\t\t\t\t\t//if its list type\n\t\t\t\t\tif (theObject.Content.ListView_Style == __LISTVIEW_STYLE_LIST)\n\t\t\t\t\t{\n\t\t\t\t\t\t//go up the number of vertical items\n\t\t\t\t\t\tcurrentlySelected = Math.max(0, currentlySelected - theObject.Content_Item_KeyModifier);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//go up\n\t\t\t\t\t\tcurrentlySelected = Math.max(0, currentlySelected - 1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __SELECTION_RIGHT:\n\t\t\t\t\t//if its list type\n\t\t\t\t\tif (theObject.Content.ListView_Style == __LISTVIEW_STYLE_LIST)\n\t\t\t\t\t{\n\t\t\t\t\t\t//go down the number of vertical items\n\t\t\t\t\t\tcurrentlySelected = Math.min(currentlySelected + theObject.Content_Item_KeyModifier, theObject.Content.Items.length - 1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//go down\n\t\t\t\t\t\tcurrentlySelected = Math.min(currentlySelected + 1, theObject.Content.Items.length - 1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __SELECTION_UP:\n\t\t\t\t\t//if its list type\n\t\t\t\t\tif (theObject.Content.ListView_Style != __LISTVIEW_STYLE_LIST && theObject.Content.ListView_Style != __LISTVIEW_STYLE_REPORT)\n\t\t\t\t\t{\n\t\t\t\t\t\t//go up the number of vertical items\n\t\t\t\t\t\tcurrentlySelected = Math.max(0, currentlySelected - theObject.Content_Item_KeyModifier);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//go up\n\t\t\t\t\t\tcurrentlySelected = Math.max(0, currentlySelected - 1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase __SELECTION_DOWN:\n\t\t\t\t\t//if its list type\n\t\t\t\t\tif (theObject.Content.ListView_Style != __LISTVIEW_STYLE_LIST && theObject.Content.ListView_Style != __LISTVIEW_STYLE_REPORT)\n\t\t\t\t\t{\n\t\t\t\t\t\t//go down the number of vertical items\n\t\t\t\t\t\tcurrentlySelected = Math.min(currentlySelected + theObject.Content_Item_KeyModifier, theObject.Content.Items.length - 1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//go down\n\t\t\t\t\t\tcurrentlySelected = Math.min(currentlySelected + 1, theObject.Content.Items.length - 1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//now we try to select it so we need data\n\t\t\tvar data = [];\n\t\t\t//at zero we put the line index\n\t\t\tdata[0] = \"\" + (currentlySelected + 1);\n\t\t\t//if we have checkboxes?\n\t\t\tif (Get_Bool(theObject.Properties[__NEMESIS_PROPERTY_CHECKBOXEX], false))\n\t\t\t{\n\t\t\t\t//add the checkbox state at 1\n\t\t\t\tdata[1] = currentlySelectedItem.Checked ? __NEMESIS_Checked : __NEMESIS_Unchecked;\n\t\t\t}\n\t\t\t//create a result\n\t\t\tvar actionResult = __SIMULATOR.ProcessEvent(new Event_Event(theObject, __NEMESIS_EVENT_SELECT, data));\n\t\t\t//not blocking it?\n\t\t\tif (!actionResult.Block)\n\t\t\t{\n\t\t\t\t//helpers\n\t\t\t\tvar nEnd;\n\t\t\t\t//not an action?\n\t\t\t\tif (!result.AdvanceToStateId)\n\t\t\t\t{\n\t\t\t\t\t//notify that we have changed data\n\t\t\t\t\t__SIMULATOR.NotifyLogEvent({ Type: __LOG_USER_DATA, Name: theObject.GetDesignerName(), Data: data });\n\t\t\t\t}\n\t\t\t\t//loop through all items\n\t\t\t\tfor (var items = theObject.Content.Items, i = 0, c = items.length; i < c; i++)\n\t\t\t\t{\n\t\t\t\t\t//is this selected and it shouldnt be?\n\t\t\t\t\tif (items[i].Selected && i != currentlySelected || !items[i].Selected && i == currentlySelected)\n\t\t\t\t\t{\n\t\t\t\t\t\t//change its selection state\n\t\t\t\t\t\titems[i].Select(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//and mark this one as the last selected\n\t\t\t\ttheObject.Content.Item_LastSelected = currentlySelected;\n\t\t\t\t//now reset the array\n\t\t\t\ttheObject.Content.Item_LastChanged = [];\n\n\t\t\t\t//get the current item\n\t\t\t\tvar item = theObject.Content.Items[currentlySelected];\n\t\t\t\t//get current scrollTop\n\t\t\t\tvar scrollTop = theObject.Content.Item_Panel.scrollTop;\n\t\t\t\t//are we scrolled out?\n\t\t\t\tif (scrollTop > item.Rect.top)\n\t\t\t\t{\n\t\t\t\t\t//scroll up\n\t\t\t\t\ttheObject.Content.Item_Panel.scrollTop = item.Rect.top;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//get client height\n\t\t\t\t\tvar clientHeight = Browser_GetClientHeight(theObject.Content.Item_Panel);\n\t\t\t\t\t//calculate end\n\t\t\t\t\tnEnd = scrollTop + clientHeight;\n\t\t\t\t\t//are we outside the height?\n\t\t\t\t\tif (nEnd < item.Rect.top + item.Rect.height)\n\t\t\t\t\t{\n\t\t\t\t\t\t//set the scroll so that we are fully visible\n\t\t\t\t\t\ttheObject.Content.Item_Panel.scrollTop = item.Rect.top + item.Rect.height - clientHeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//we dont scroll the report horizontally\n\t\t\t\tif (theObject.Content.ListView_Style != __LISTVIEW_STYLE_REPORT)\n\t\t\t\t{\n\t\t\t\t\t//get current scroll left\n\t\t\t\t\tvar scrollLeft = theObject.Content.Item_Panel.scrollLeft;\n\t\t\t\t\t//are we scrolled out?\n\t\t\t\t\tif (scrollLeft > item.Rect.left)\n\t\t\t\t\t{\n\t\t\t\t\t\t//scroll up\n\t\t\t\t\t\ttheObject.Content.Item_Panel.scrollLeft = item.Rect.left;\n\t\t\t\t\t}\n\t\t\t\t\t//check the padding first\n\t\t\t\t\telse if (Math.abs(scrollLeft - item.Rect.left) > __CAMERA_CMD_SCROLL_PADDING)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get client height\n\t\t\t\t\t\tvar clientWidth = Browser_GetClientWidth(theObject.Content.Item_Panel);\n\t\t\t\t\t\t//calculate end\n\t\t\t\t\t\tnEnd = scrollLeft + clientWidth;\n\t\t\t\t\t\t//are we outside the height?\n\t\t\t\t\t\tif (nEnd < item.Rect.left + item.Rect.width)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the scroll so that we are fully visible\n\t\t\t\t\t\t\ttheObject.Content.Item_Panel.scrollLeft = item.Rect.left + item.Rect.width - clientWidth;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//now return the result\n\treturn result;\n}", "_keyDownHandler(event) {\n const that = this,\n activeElement = that.enableShadowDOM ? (that.shadowRoot.activeElement || document.activeElement) : document.activeElement,\n target = that.enableShadowDOM ? event.composedPath()[0] : event.target;\n\n if (that.$.listBox && target === that.$.listBox.$.filterInput ||\n (activeElement !== that && activeElement !== that.$.dropDownButton && activeElement !== that.$.actionButton)) {\n return;\n }\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n target.setAttribute('active', '');\n event.preventDefault();\n\n if (target !== that.$.actionButton) {\n that._keyPressed = true;\n\n if (that.opened) {\n if (that._focusedItem) {\n that.select(that._focusedItem);\n }\n\n if ((event.key === 'Enter' && ['none'].indexOf(that.selectionMode) < 0) || (event.key === ' ' && ['none', 'one', 'radioButton'].indexOf(that.selectionMode) > -1)) {\n that.close();\n }\n }\n else if (!that.opened && !that.readonly && that.dropDownOpenMode !== 'none') {\n that.open();\n }\n }\n\n break;\n case 'End':\n case 'Home':\n case 'PageUp':\n case 'PageDown':\n case 'ArrowUp':\n case 'ArrowDown':\n if (that.readonly) {\n return;\n }\n\n if (event.altKey) {\n that._keyPressed = false;\n that.$dropDownContainer.hasClass('jqx-visibility-hidden') ? that.open() : that.close();\n return;\n }\n\n event.preventDefault();\n that.$.listBox._handleKeyStrokes(event.key);\n break;\n case 'Escape':\n event.preventDefault();\n that.close();\n break;\n default:\n if (that.readonly) {\n return;\n }\n\n if (that.selectionMode === 'oneOrManyExtended') {\n that.$.listBox._keysPressed[event.key] = true;\n }\n\n that.$.listBox._applyIncrementalSearch(event.key);\n break;\n }\n }", "function onListButtonClick() {\r\n\r\n if (isFlex) return;\r\n\r\n if (!isSlideOpen) {\r\n openSlideList();\r\n showBlackPanel();\r\n\r\n } else {\r\n closeSlideList();\r\n hideBlackPanel();\r\n }\r\n }", "function liDoubleClicked() {\n removeListItem()\n }", "function handleShoppingList() {\n SL.renderShoppingList();\n SL.handleNewItemSubmit();\n SL.handleItemCheckClicked();\n SL.handleDeleteItemClicked();\n}", "function fnTransferFromCmbbox()\n{\n document.getElementById(\"lstChoices\").addEventListener(\"click\", clicked);\n\n //======OR===============//\n\n /*document.getElementById(\"lstChoices\").onclick = function()\n {\n var theList = document.getElementById(\"lstChoices\");\n var theName = theList.options[theList.selectedIndex].text;\n var thePrice = theList.options[theList.selectedIndex].value;\n\n document.getElementById(\"ProdNameDestination\").value = theName;\n document.getElementById(\"ProdPriceDestination\").value = thePrice;\n }*/\n\n\n function clicked()\n {\n //alert(\"You clicked me.\");\n var theList = document.getElementById(\"lstChoices\");\n var theName = theList.options[theList.selectedIndex].text;\n var thePrice = theList.options[theList.selectedIndex].value;\n //var theQuantity = theList.options[theList.selectedIndex].value;\n\n document.getElementById(\"ProdNameDestination\").value = theName;\n document.getElementById(\"ProdPriceDestination\").value = thePrice;\n //document.getElementById('Prod');\n }\n}", "onChange(item) {}", "function liElementClicked() {\n changeColor()\n }", "function loadLists() {\r\n\t\tlistItems();\r\n\t\taddCheckButtonEvents();\r\n\t\taddDeleteButtonEvents();\r\n\t}", "function firstBox(){\n boxAddList.addEventListener(\"click\", createBox);\n}", "function itemClick(evt) {\r\n var oTarget = com_joemarini.EVENTS.getEventTarget(evt);\r\n\r\n // if the event target was a text node, figure out its parent LI tag\r\n if (oTarget.nodeType == TEXTNODE) // \"3\" means text node. \r\n oTarget = getParentTagByName(\"li\", oTarget);\r\n\r\n // on the other hand, if the user clicked directly on the LI, then use it\r\n if (oTarget && oTarget.nodeName.toLowerCase() == \"li\") {\r\n // are we already editing another LI item? If so,\r\n // remove the current editing controls and move them to the item that was clicked.\r\n var curEditItem = document.getElementById(\"itemText\");\r\n if (curEditItem) {\r\n var oLItag = getParentTagByName(\"li\", curEditItem);\r\n oLItag.innerHTML = gOldContent;\r\n }\r\n gOldContent = oTarget.firstChild.data; // save aside old value of the LI in case the user cancels!\r\n editListItem(oTarget);\r\n }\r\n}", "function menuButtonClicked() {\n\t\n\t\t/* BUTTON CLICKED\n\t\t\tThis is the callback for a button added to the controls for a ul.\n\t\t\tThe ul is the dom element preceding the button panel.\n\t\t*/\n\n\t\t// the button function is specified in the class of the button. \n\t\t// For example class=\"ul-button func-addItem\" where we extract what is after 'func-'\n\t\t\n\t\tlogit('menuButtonClicked');\n\t\t\n\t\tvar func = getClassItemWithPrefix($(this), 'func-');\n\t\t\n\t\tvar label = $(this).prev();\n\t\t\n\t\t// The button should be in a parent element that wraps several buttons such as addItem, deleteItem, etc.\n\t\tvar ul = $(this).parent().prev();\t\t\n\t\t\n\t\t// the type of items contained in the ul is specified in the class for the ul.\n\t\t// For example, class=\"entity-Building\"\n\t\t\n\t\tvar ulEntity \t\t= getClassItemWithPrefix(ul, 'entity-');\n\t\tvar ulRelationship \t= getClassItemWithPrefix(ul, 'relationship-');\n\t\t\t\t\n\t\tvar liToOperateOn;\n\n\t\tvar selected_item = ul.find('.selected');\n\t\tif (selected_item.length) {\n\t\t\tliToOperateOn = selected_item.parents('.model-identity:eq(0)');\n\t\t} else {\n\t\t\tif (! $(this).parent().hasClass('function-menu')) {\n\t\t\t\tliToOperateOn = $(this).parent();\n\t\t\t}\n\t\t}\n\t\tvar ident;\n\t\tif (liToOperateOn) {\n\t\t\tident = getIdent(liToOperateOn);\n\t\t}\n\t\t\n\t\t// support various buttons based on their function:\n\t\tswitch ( func ) {\n\t\t\t\n\t\t\t// ! ** ADD ITEM\n\t\t\tcase \"addItem\":\n\t\t\t\n\t\t\t\t/* ADD_ITEM \n\t\t\t\t\tAdds an html element to the ul previous to the add button.\n\t\t\t\t\tThe entity type of the new element is set to the same entity type of the ul.\n\t\t\t\t*/\n\n\t\t\t\t// CONSTRUCT THE LI to represent the new instance of the entity\n\t\t\t\t// \t- add the entity specified by the ul\n\t\t\t\t// \t- constructLi will know to add a temporary model_id\n\n\t\t\t\tvar model = new Model();\n\t\t\t\n\t\t\t\tmodel.attrs.id \t\t= generateTempId();\n\t\t\t\tmodel.attrs.name \t= \"New \" + ulEntity;\n\t\t\t\tmodel.setEntity(ulEntity);\n\t\t\t\t\n\t\t\t\tlogit('addItem: ' + model.entity);\n\t\t\t\t\n\t\t\t\tvar relparent = ul.parents('.relparent:eq(0)');\n\t\t\t\tvar relparent_ident;\n\t\t\t\t\t\n\t\t\t\tif (relparent && relparent.attr('class') ) {\n\t\t\t\t\t\trelparent_ident = getIdent(relparent);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (ulEntity == \"NoteCard\") {\n\t\t\t\t\t\t\t// the default for a new NoteCard is that the list parent is the objects parent as well.\n\t\t\t\t\t\t\tmodel.attrs.parent_entity = relparent_ident.entity;\n\t\t\t\t\t\t\tmodel.attrs.parent_entity_id = entityId[relparent_ident.entity];\n\t\t\t\t\t\t\tmodel.attrs.parent_item_id = relparent_ident.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if this model is saved as a new item, this parent will be its parent in the db. \n\t\t\t\t\t\t// If this item is replaced with a suggested object, then this parent info will be negated.\n\t\t\t\t}\n\n\t\t\t\tlogit('[menuButtonClicked::addItem] 1. ulEntity='+ulEntity);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tdataStore.addModel(model);\n\t\t\t\t\tlogit('[menuButtonClicked::addItem] 2. ulEntity='+ulEntity);\n\t\t\t\n\t\t\t\t\n\t\t\t\tvar li;\n\t\t\t\tif (relparent_ident) {\n\t\t\t\t\tli = constructLi(ulEntity, model, relparent_ident.entity, relparent_ident.id, ulRelationship);\n\t\t\t\t} else {\n\t\t\t\t\tli = constructLi(ulEntity, model);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (label) li.prepend(label.clone());\n\t\t\t\t\n\t\t\t\t// ADD LI TO THE DOM\n\t\t\t\t// \t- if an item in the ul is selected, add the new li after the li that contains the selected item.\n\t\t\t\t\n\t\t\t\tif (selected_item && selected_item.length) {\n\t\t\t\t\tli.insertAfter(selected_item.parent());\n\t\t\t\t\tselected_item.removeClass('selected');\n\t\t\t\t} else {\n\t\t\t\t\tul.append(li);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// activate the new lit item for editing\t\t\t\t\n\t\t\t\tli.find('span.fieldname-name').eq(0).dblclick();\n\t\t\t\t\n\t\t\t\tul.scrollTop(1000);\n\n\t\t\t\tupdateLabelCount(ul);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t// ! ** DELETE ITEM\n\t\t\tcase 'deleteItem':\n\t\t\t\t// pop up a dialog to see if user would like to remove from list or remove record from db\n\t\t\t\t\n\t\t\t\tlogit('menuButtonClicked: adding class \"waiting-for-delete\" 1');\n\t\t\t\t// the button may be at the bottom or in an li with a list item.\n\t\t\t\tliToOperateOn.addClass('waiting-for-delete');\n\t\t\t\tlogit('menuButtonClicked: adding class \"waiting-for-delete\" 2 --- ' + liToOperateOn.attr('class'));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tvar buttons;\n\t\t\t\tif (ident.id.substr(0,3) == 'tmp') {\n\t\t\t\t\tbuttons = {\n\t\t\t\t\t\t\"Remove From List\": removeSelectedItem,\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t} else if (ulEntity == 'Essay') {\n\t\t\t\t\tbuttons = {\n\t\t\t\t\t\t\"Delete From Database\": reallyDeleteSelectedItem,\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t} else if (ulEntity == 'NoteCard') {\n\t\t\t\t\tbuttons = {\n\t\t\t\t\t\t\"Remove From List\": removeSelectedItem,\n\t\t\t\t\t\t\"Delete From Database\": reallyDeleteSelectedItem,\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbuttons = {\n\t\t\t\t\t\t\"Remove From List\": removeSelectedItem,\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbuttons.cancel = cancel;\n\t\t\t\t\n\t\t\t\tvar dialogOpts = {\n\t\t\t\t\tmodal: true,\n\t\t\t\t\twidth: 500,\n\t\t\t\t\tbuttons: buttons\n\t\t\t\t};\n\t\t\t\t$('<div>Really Delete?</div>').dialog(dialogOpts);\n\t\t\n\t\t\t\tbreak;\n\t\t}\t\n\t\t\n\t}", "function selectButtonHandler() {\n var self = this;\n\n makeButtonActive(self); //highlights this button\n\n thingView.clearStatus(); //clears whatever's in the status window \n\n //if this is the makeNewThing button, show the makeThing form\n if ($(this).hasClass(\"makeNewThing\")) { //generates a new form\n thingForm = new ThingForm();\n thingForm.newForm($('div#status'));\n\n } else //get object current li relates to, print status of that object\n {\n thingView.printThing(thingModel.allThings[$(this).attr(\"data\")]);\n }\n\n}", "function locationInitializer()\n{\n\tlistBoxLocation = new kony.ui.ListBox({\n \"id\": \"listBoxLocation\",\n \"isVisible\": true,\n \"masterData\": [\n [\"1\", \"Ahmedabad\"],\n [\"2\", \"Bangalore\"],\n [\"3\", \"Chennai\"],\n [\"4\", \"New Delhi\"],\n [\"5\", \"Goa\"]\n ],\n \"selectedKey\": \"1\",\n \"skin\": \"sknListboxKonyThemeNormal\",\n \"focusSkin\": \"sknListboxKonyThemeFocus\",\n \"onSelection\": listBoxSelectionCallBack\n \t}, {\n \"widgetAlignment\": constants.WIDGET_ALIGN_CENTER,\n \"vExpand\": false,\n \"hExpand\": true,\n \"margin\": [1, 1, 1, 1],\n \"padding\": [0, 1, 0, 1],\n \"contentAlignment\": constants.CONTENT_ALIGN_MIDDLE_LEFT,\n \"marginInPixel\": true,\n \"paddingInPixel\": false,\n \"containerWeight\": 7\n \t}, {\n \"dropDownImage\": null,\n \"viewType\": constants.LISTBOX_VIEW_TYPE_ONSCREENWHEEL\n \t });\n vboxLocationPicker = new kony.ui.Box({\n \"id\": \"vboxLocationPicker\",\n \"isVisible\": true,\n \"orientation\": constants.BOX_LAYOUT_VERTICAL\n \t}, {\n \"containerWeight\": 100,\n \"margin\": [0, 0, 0, 0],\n \"padding\": [0, 0, 0, 0],\n \"widgetAlignment\": constants.WIDGET_ALIGN_TOP_LEFT,\n \"marginInPixel\": false,\n \"paddingInPixel\": false,\n \"vExpand\": false,\n \"hExpand\": true,\n \"layoutType\": constants.CONTAINER_LAYOUT_BOX\n }, {});\n hboxLocationPicker = new kony.ui.Box({\n \"id\": \"hboxLocationPicker\",\n \"isVisible\": true,\n \"position\": constants.BOX_POSITION_AS_NORMAL,\n \"orientation\": constants.BOX_LAYOUT_HORIZONTAL\n \t}, {\n \"containerWeight\": 16,\n \"percent\": true,\n \"widgetAlignment\": constants.WIDGET_ALIGN_TOP_LEFT,\n \"margin\": [0, 0, 0, 0],\n \"padding\": [0, 0, 0, 0],\n \"vExpand\": false,\n \"marginInPixel\": false,\n \"paddingInPixel\": false,\n \"layoutType\": constants.CONTAINER_LAYOUT_BOX\n \t}, {});\n }", "onSelect(event) {}", "function handleShoppingList() {\n renderTheList();\n handleNewEntries();\n handleChecked();\n handleDelete();\n}", "function handleSelect(event) {\n if (event.target !== event.currentTarget) {\n startLightBox(event.target.parentElement.id);\n }\n\n // Prevent the event from bubbling back up the DOM\n stopPropagation(event);\n }", "setEvents(){\n const listElements = this.el.childNodes;\n for(let i = 0; i < listElements.length; i++){\n listElements[i].addEventListener('mousedown',this.onItemClickedEvent,true);\n }\n }", "function action_dropdown_boxes() {\n\t$('div.dropdown ul li a').click(function() {\n\t\t// get the selected dropdown option\n\t\tvar oOption = $(this);\n\n\t\t// get the containing div for the dropdown\n\t\tvar oContainer = oOption.closest('div.dropdown');\n\n\t\t// get the selected value of the option\n\t\tvar selected_value = oOption.data('value');\n\n\t\t// replace the text within the parent button to reflect the selected option\n\t\t$('button span.title', oContainer).html(oOption.html());\n\n\t\t// update the target field with the value IF the target field exists\n\t\tif($('input[name='+ oContainer.data('target') +']').length > 0) {\n\t\t\t$('input[name='+ oContainer.data('target') +']').val(oOption.data('value'));\n\t\t}\n\n\t\t// show the glass options on the image preview\n\t\t$('input[name=show_glass_options]').val('1');\n\n\t\t// -- rules\n\n\t\t// if the customer has selected a tint, set the self cleaning option to no - self cleaning only available on clear glass\n\t\tif($('input[name=tint_id]').val() != '1') {\n\t\t\t// get the second option from the self cleaning option\n\t\t\tvar self_cleaning = $('div.dropdown[data-target=glass_id] li:nth-child(1) a');\n\n\t\t\t// set the default option to no\n\t\t\t$('div.dropdown[data-target=glass_id] button span.title').html(self_cleaning.html() +' ( Only available on Clear Tint )');\n\n\t\t\t// set the target field \n\t\t\t$('input[name=glass_id]').val(self_cleaning.data('value'));\n\t\t}\n\n\t\t// action any additional calls\n\t\tif(oContainer.data('update-image') == true) {\n\t\t\tupdate_image_and_price();\n\t\t}\n\t});\n}", "click (event) {\n this.onSelectionChange([])\n }", "function onItemActionClick(event){\r\n\t\t\t\t\r\n\t\t//var obj\r\n\t\tvar objButton = jQuery(this);\r\n\t\tvar objItem = objButton.parents(\"li\");\r\n\t\t\r\n\t\tg_objItems.selectSingleItem(objItem);\r\n\t\t\r\n\t\tvar action = objButton.data(\"action\");\r\n\t\t\r\n\t\tif(action == \"open_menu\")\r\n\t\t\treturn(true);\r\n\t\t\r\n\t\tt.runItemAction(action);\r\n\t\t\r\n\t}", "function listar(){\n//funsiones a llenar combobox\n tipo();\n ciudad();\n inicializarSlider();\n playVideoOnScroll();\n\n}", "function UISelection(){\n\n }", "_applySelection(mode, details) {\n const that = this;\n\n function createSelectionTags() {\n while (that.$.selectionField.firstElementChild.nodeName === 'SPAN') {\n that.$.selectionField.removeChild(that.$.selectionField.firstElementChild)\n }\n\n let fragment = document.createDocumentFragment(), element, icon;\n\n if (that.selectionDisplayMode === 'tokens') {\n if (that.selectedIndexes.length === 1 && (that.selectionMode === 'oneOrManyExtended' || that.selectionMode === 'oneOrMany')) {\n icon = '';\n }\n else {\n icon = '&#10006'\n }\n }\n else {\n icon = ',';\n }\n\n that.selectedIndexes.map(index => {\n element = that._applyTokenTemplate(that.$.listBox._items[index][that.inputMember], icon);\n element._value = that.$.listBox._items[index].value;\n fragment.appendChild(element);\n });\n\n that.$.selectionField.insertBefore(fragment, that.$.input);\n that._currentSelection = that.selectedIndexes.map(i => that.$.listBox._items[i][that.inputMember]);\n that.$.container.setAttribute('has-value', '');\n that._oldValue = that.value = that._currentSelection.toString();\n that._positionDetection.positionDropDown();\n }\n\n that.$.autoCompleteString.textContent = '';\n\n if (that.selectedIndexes.length === 0) {\n that._clearSelection(details && details.index > -1 && that.$.input.value === that.$.listBox._items[details.index][that.inputMember]);\n return;\n }\n\n if (!that.$.listBox._items || that.$.listBox._items.length === 0) {\n return;\n }\n\n if (that.selectionMode === 'one' || that.selectionMode === 'zeroOrOne' || that.selectionMode === 'radioButton') {\n if (that._currentSelection && that._currentSelection.length > that.selectedIndexes.length) {\n that._currentSelection = that.selectedIndexes.map(i => that.$.listBox._items[i][that.inputMember]);\n that.$.input.value = that._currentSelection.toString();\n that._oldValue = that.value = that._currentSelection.toString();\n return;\n }\n\n that._clearSelection();\n that._currentSelection = that.selectedIndexes.map(i => that.$.listBox._items[i][that.inputMember]);\n that.$.input.value = that._currentSelection.toString();\n that._oldValue = that.value = that._currentSelection.toString();\n\n that.$.container.setAttribute('has-value', '');\n\n if (that.autoComplete !== 'none' && typeof that.dataSource !== 'function') {\n that._autoComplete(true);\n that.close();\n }\n }\n else {\n that.$.input.value = '';\n that.$.input.placeholder = '';\n that.$.container.setAttribute('has-value', '');\n\n if (!that._currentSelection || that.selectionMode === 'oneOrManyExtended' || (that.selectionMode === 'radioButton' && !that.grouped)) {\n createSelectionTags();\n return;\n }\n\n const selectionTags = that.$.selectionField.getElementsByClassName('jqx-token');\n\n if (that._currentSelection.length < that.selectedIndexes.length) {\n let selectedLabels = that.selectedIndexes.map(index => that.$.listBox._items[index][that.inputMember]);\n\n for (let i = 0; i < selectedLabels.length; i++) {\n if (that._currentSelection.indexOf(selectedLabels[i]) < 0) {\n const item = that.$.listBox._items[that.selectedIndexes[i]];\n let element, icon;\n\n if (that.selectionDisplayMode === 'tokens') {\n if (that.selectedIndexes.length === 1 && (that.selectionMode === 'oneOrManyExtended' || that.selectionMode === 'oneOrMany')) {\n icon = '';\n }\n else {\n icon = '&#10006'\n }\n }\n else {\n icon = ',';\n }\n\n if (that.selectedIndexes.length === 1 && (that.selectionMode === 'oneOrManyExtended' || that.selectionMode === 'oneOrMany')) {\n icon = '';\n }\n\n element = that._applyTokenTemplate(item[that.inputMember], icon);\n element._value = item.value;\n that.$.selectionField.insertBefore(element, that.$.input);\n }\n }\n\n if (that.autoComplete !== 'none' && (that.$.listBox._filteredItems && that.$.listBox._filteredItems.length !== that.$.listBox._items.length)) {\n that._autoComplete(true);\n }\n\n that._positionDetection.positionDropDown();\n }\n else if ((that._currentSelection.length > 0 && selectionTags.length === 0) ||\n (that._currentSelection.length === that.selectedIndexes.length && that._currentSelection.toString() !== that.selectedValues.toString())) {\n createSelectionTags();\n return;\n }\n else {\n if (!details) {\n return;\n }\n\n for (let t = 0; t < selectionTags.length; t++) {\n if (selectionTags[t]._value === details.value) {\n that.$.selectionField.removeChild(selectionTags[t]);\n break;\n }\n }\n }\n\n that._currentSelection = that.selectedIndexes.map(i => that.$.listBox._items[i][that.inputMember]);\n that._oldValue = that.value = that._currentSelection.toString();\n }\n }", "function CustomSelectableList()\r\n{\r\n\tthis.name = 'cslist';\r\n\tthis.items = new Array();\r\n\tthis.itemIdentifiers = new Array();\r\n\tthis.clickHandlers = new Array();\r\n\tthis.dblClickHandlers = new Array();\r\n\tthis.instanceName = null;\r\n\tthis.obj = \"CSList\";\r\n\tthis.lastId = null;\r\n\r\n\tthis.selectedObj = null;\r\n\t\r\n\tif (this.obj)\r\n\t\teval(this.obj + \"=this\");\r\n\r\n\tthis.unselectedColor = null;\r\n\tthis.selectedColor = null;\r\n\r\n\tthis.attachEventEx = function(target, event, func) \r\n\t{\r\n\t\tif (target.attachEvent)\r\n\t\t\ttarget.attachEvent(\"on\" + event, func);\r\n\t\telse if (target.addEventListener)\r\n\t\t\ttarget.addEventListener(event, func, false);\r\n\t\telse\r\n\t\t\ttarget[\"on\" + event] = func;\r\n\t}\r\n\r\n\tthis.addItem = function(item, itemIndex, clickHandler, doubleClickHandler, objIdentifier) \r\n\t{\r\n\t\tthis.items.push(item);\r\n\t\tthis.clickHandlers.push(clickHandler);\r\n\t\tthis.dblClickHandlers.push(doubleClickHandler);\r\n\t\tthis.itemIdentifiers.push(objIdentifier);\r\n\r\n\t\tvar obj = document.getElementById(item)\r\n\t\tif (obj) {\r\n\t\t\tthis.attachEventEx(obj, \"click\", new Function(this.obj + \".click('\" + item + \"');\"));\r\n\t\t\tthis.attachEventEx(obj, \"dblclick\", new Function(this.obj + \".dblclick('\" + item + \"');\"));\r\n\t\t}\r\n\t}\r\n\r\n\tthis.selectFirst = function()\r\n\t{\r\n\t\tif (this.items.length)\r\n\t\t\tthis.click(this.items[0]);\r\n\t}\r\n\r\n\tthis.selectById = function( id )\r\n\t{\r\n\t\tif (id.length)\r\n\t\t\tthis.click(id);\r\n\t\telse\r\n\t\t\tthis.selectFirst();\r\n\t}\r\n\r\n\tthis.selectByObj = function( obj )\r\n\t{\r\n\t\tif ( this.selectedObj != null )\r\n\t\t\tthis.selectedObj.style.backgroundColor = this.unselectedColor;\r\n\r\n\t\tif (obj)\r\n\t\t\tobj.style.backgroundColor = this.selectedColor;\r\n\r\n\t\tthis.selectedObj = obj;\r\n\t}\r\n\r\n\tthis._getItemIndex = function(id)\r\n\t{\r\n\t\treturn id.substr( this.instanceName.length+String(\"item\").length );\r\n\t}\r\n\r\n\tthis.click = function(id)\r\n\t{\r\n\t\tvar itemObj = document.getElementById(id);\r\n\t\tthis.selectByObj( itemObj );\r\n\r\n\t\tvar index = this._getItemIndex(id);\r\n\r\n\t\tif (this.clickHandlers[index] && this.lastId != index) {\r\n\t\t\teval(this.clickHandlers[index]);\r\n\t\t}\r\n\r\n\t\tthis.lastId = index;\r\n\t}\r\n\r\n\tthis.dblclick = function(id)\r\n\t{\r\n\t\tvar itemObj = document.getElementById(id);\r\n\r\n\t\tvar index = this._getItemIndex(id);\r\n\t\tif (this.dblClickHandlers[index]) {\r\n\t\t\teval(this.dblClickHandlers[index]);\r\n\t\t}\r\n\t}\r\n\r\n\tthis.getCurrentData = function()\r\n\t{\r\n\t\tif (this.lastId == null)\r\n\t\t\treturn null;\r\n\r\n\t\treturn this.itemIdentifiers[this.lastId];\r\n\t}\r\n}", "addClickHandlers() {\n //boxes is outside the class you are going to loop over every element of this nodelist...\n boxes.forEach(box => {\n //..then add a event listener on each one\n box.addEventListener('click', e => {\n //then run the following functions\n this.changeNumber(box.dataset.place);\n this.changeColor(box.dataset.place);\n })\n })\n }", "handleToggleMenu(listId) {}", "onListItemSelection(text) {\r\n /** HTMLInputElement : To make the element as HTMLInputElement and provides special properties and methods for manipulating the layout and presentation of input elements */\r\n const inputElement = this.getInputElement();\r\n inputElement.value = text;\r\n this.showSearchBoxList = false;\r\n this.searchLocationChanged.emit({ 'searchTerm': inputElement.value });\r\n dxp.log.debug(this.element.tagName, 'onListItemSelection()', `event emit for SPA`);\r\n }", "function ListBox_UpdateSelection(theHTML, theObject, forcedSelection)\n{\n\t//helpers\n\tvar i, c, bScroll;\n\t//marker for repaint\n\tvar repaint = true;\n\t//get the selection\n\tvar strSelection = forcedSelection ? forcedSelection : Get_String(theObject.Properties[__NEMESIS_PROPERTY_SELECTION], \"\");\n\t//split it\n\tvar aStrSelection = strSelection.split(__LISTBOX_SELECTION_SEPARATOR);\n\t//now create a map\n\tvar map = {};\n\t//go through the selection\n\tfor (i = 0, c = aStrSelection.length; i < c; i++)\n\t{\n\t\t//get the index\n\t\tvar index = Get_Number(aStrSelection[i], null);\n\t\t//valid?\n\t\tif (index != null)\n\t\t{\n\t\t\t//store this\n\t\t\tmap[index] = true;\n\t\t}\n\t}\n\t//loop through all the content\n\tfor (i = 0, c = theObject.Items.length, bScroll = true; i < c; i++)\n\t{\n\t\t//get the item\n\t\tvar item = theObject.Items[i];\n\t\t//Select it?\n\t\titem.Selected = map[item.Index] == true;\n\t\t//if we want to scroll and its selected\n\t\tif (bScroll && item.Selected)\n\t\t{\n\t\t\t//no need to keep scrolling\n\t\t\tbScroll = false;\n\t\t\t//get current scroll top\n\t\t\tvar scrollTop = theObject.HTML.scrollTop;\n\t\t\t//and client height\n\t\t\tvar clientHeight = theObject.HTML.clientHeight;\n\t\t\t//out of scope?\n\t\t\tif (item.Top < scrollTop || item.Top + item.Height > scrollTop + clientHeight)\n\t\t\t{\n\t\t\t\t//we will need to scroll so dont repaint\n\t\t\t\trepaint = false;\n\t\t\t\t//was this a forced selection (from key event)\n\t\t\t\tif (forcedSelection)\n\t\t\t\t{\n\t\t\t\t\t//going up?\n\t\t\t\t\tif (item.Top < scrollTop)\n\t\t\t\t\t{\n\t\t\t\t\t\t//go up\n\t\t\t\t\t\tscrollTop = item.Top;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//fit it at max\n\t\t\t\t\t\tscrollTop = item.Top + item.Height - clientHeight;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t////we want to center it\n\t\t\t\t\t//scrollTop = Math.max(0, item.Top - ((item.Height + clientHeight) / 2));\n\t\t\t\t\t//we want this one to be at the top\n\t\t\t\t\tscrollTop = item.Top;\n\t\t\t\t}\n\t\t\t\t//are we within a wait?\n\t\t\t\tif (__WAIT_MANAGER.IsWaiting())\n\t\t\t\t{\n\t\t\t\t\t//first scroll pos command? (we dont want to override the one from vertical scroll pos)\n\t\t\t\t\tif (!__SIMULATOR.Interpreter.HasPostDisplayCmd(theObject.DataObject.Id, __INTERPRETER_CMD_SCROLL_POSITION))\n\t\t\t\t\t{\n\t\t\t\t\t\t//set vertical scroll position\n\t\t\t\t\t\ttheObject.Properties[__NEMESIS_PROPERTY_VERTICAL_SCROLL_POS] = scrollTop;\n\t\t\t\t\t\t//fire a vertical scrollpos\n\t\t\t\t\t\t__SIMULATOR.Interpreter.AddPostDisplayCmd(theObject.DataObject.Id, __INTERPRETER_CMD_SCROLL_POSITION);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//do a scroll\n\t\t\t\t\ttheObject.HTML.scrollTop = scrollTop;\n\t\t\t\t\t//always trigger this because some browsers dont trigger it\n\t\t\t\t\tListBox_OnScroll(null, theObject.HTML);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//want to repaint?\n\tif (repaint)\n\t{\n\t\t//trigger refresh\n\t\tListBox_Paint(theObject);\n\t}\n}", "function onListWidgetOut(id) {\r\n if (!$(id).data('selected')) {\r\n $(id).removeClass('list-item-selected')\r\n $(id).find('.list-poster-frame').removeClass('list-poster-frame-selected');\r\n }\r\n }", "function defaultListSelectionHandler(selected) {\n for (inputId in selected) {\n var value = selected[inputId];\n populateFieldHTML(inputId, value);\n }\n}", "function liClicked(e) {\n // Always do this next line.\n e = e || window.event;\n //alert(e.target.tagName + \"::\"\n // + e.target.innerText + \"::\"\n // + e.currentTarget.tagName);\n var trgt = e.target || e.srcElement;\n\n if (trgt.tagName === \"LI\") {\n // trgt.className = \"picked\";\n }\n}", "selectedListNode(event, index) {\n this.dropdownOpen = false;\n if (this.recentDropdownOpen) {\n this.setRecentLocation(this.queryItems[index]);\n }\n else {\n this.getPlaceLocationInfo(this.queryItems[index]);\n }\n }", "select(item) {\n const that = this;\n\n if (!that.$.listBox) {\n return;\n }\n\n that.$.listBox.select(item);\n }", "_listBoxKeyDownHandler(event) {\n const that = this;\n\n if (event.key === 'Enter') {\n that.close();\n that.dropDownOpenMode === 'dropDownButton' ? that.$.dropDownButton.focus() : that.focus();\n event.stopPropagation();\n return;\n }\n\n if (event.key === 'Escape') {\n that.close();\n return;\n }\n }", "function bindItems() {\n var buttons = document.getElementsByName('delete')\n for (var i = 0; i < buttons.length; i++)\n {\n buttons[i].addEventListener('click', function(){\n masterList = utility.deleteItem(this.value, masterList);\n showList(masterList);\n saveList();\n });\n }\n var checkboxes = document.getElementsByName('done');\n for (var i = 0; i < checkboxes.length; i++)\n {\n checkboxes[i].addEventListener('click', function(){\n masterList = utility.checkItem(this.value, masterList);\n showList(masterList);\n saveList();\n });\n }\n}", "function ListBox_Line_TouchDoubleClick(event)\n{\n\t//ask the browser whether this is a double click\n\tif (Brower_TouchIsDoubleClick(event))\n\t{\n\t\t//call out method\n\t\tListBox_Line_Mousedown(event);\n\t}\n}", "function refreshListBox(target, funcname) {\n var cat_id = $('#' + target).val();\n if (cat_id == null) return;\n var fn = window[funcname];\n\n // is object a function?\n if (typeof fn === \"function\") fn(cat_id);\n}", "SelectedBox(value, action) {\n this.props.SelectBoxAction(value, action);\n // show the submitButton\n this.setState({ showSubmitButton: this.parseSubmitButton() })\n }", "function initializeMultipleSelectBoxMouseEvent($container) {\r\n\t\tvar $document = $(document);\r\n\t\t/* process container event */\r\n\t\t$container.bind(\"mousedown.\" + PLUGIN_NAMESPACE, function(e) {\r\n\t\t\t/* disable text selection */\r\n\t\t\te.preventDefault();\r\n\t\t\t/* starting row */\r\n\t\t\tvar target = e.target;\r\n\t\t\tvar $target = $(target);\r\n\t\t\tvar $startRow = $target;\r\n\t\t\t/* correct the focus for chrome */\r\n\t\t\tif (target == this) {\r\n\t\t\t\treturn;\r\n\t\t\t} else if ($target.parent()[0] != this) {\r\n\t\t\t\ttarget.focus();\r\n\t\t\t\t$startRow = $target.parents(\".\" + PLUGIN_NAMESPACE + \">*\").eq(0);\r\n\t\t\t} else {\r\n\t\t\t\tthis.focus();\r\n\t\t\t}\r\n\t\t\tvar startIndex = $startRow.getMultipleSelectBoxRowIndex($container);\r\n\t\t\tvar currentIndex = startIndex;\r\n\t\t\t/* trigger callback */\r\n\t\t\tif (!fireOnSelectStartEvent(e, $container, startIndex)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t/* prepare info for drawing */\r\n\t\t\tvar options = $container.getMultipleSelectBoxOptions();\r\n\t\t\tvar containerHistory = $container.getMultipleSelectBoxHistory();\r\n\t\t\t/* opposite and retain selection for touch device */\r\n\t\t\tvar isTouchDeviceMode = options.isTouchDeviceMode;\r\n\t\t\tvar isSelectionOpposite = isTouchDeviceMode;\r\n\t\t\tvar isSelectionRetained = isTouchDeviceMode;\r\n\t\t\tif (options.isKeyEventEnabled) {\r\n\t\t\t\tif (e.shiftKey) {\r\n\t\t\t\t\tcurrentIndex = startIndex;\r\n\t\t\t\t\tstartIndex = containerHistory.selectingStartIndex;\r\n\t\t\t\t} else if (e.ctrlKey) {\r\n\t\t\t\t\tisSelectionOpposite = isSelectionRetained = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/* starting */\r\n\t\t\t$container.addClass(PLUGIN_STYLE_SELECTING).drawMultipleSelectBox(startIndex, currentIndex, {\r\n\t\t\t\t\"isSelectionOpposite\": isSelectionOpposite,\r\n\t\t\t\t\"isSelectionRetained\": isSelectionRetained,\r\n\t\t\t\t\"scrollPos\": null\r\n\t\t\t});\r\n\t\t\t/* listening */\r\n\t\t\tvar scrollHelperFunc = function(e1) {\r\n\t\t\t\toptions.scrollHelper(e1, $container, startIndex, isSelectionRetained);\r\n\t\t\t};\r\n\t\t\t$container.yieldMultipleSelectBox().bind(\"mouseenter.\" + PLUGIN_NAMESPACE, function() {\r\n\t\t\t\tunbindEvents($document, [ \"mousemove\" ]);\r\n\t\t\t}).bind(\"mouseleave.\" + PLUGIN_NAMESPACE, function(e1) {\r\n\t\t\t\tscrollHelperFunc(e1);\r\n\t\t\t\t$document.bind(\"mousemove.\" + PLUGIN_NAMESPACE, function(e2) {\r\n\t\t\t\t\tscrollHelperFunc(e2);\r\n\t\t\t\t});\r\n\t\t\t}).bind(\"mouseover.\" + PLUGIN_NAMESPACE, function(e1) {\r\n\t\t\t\tscrollHelperFunc(e1);\r\n\t\t\t}).one(\"mouseup.\" + PLUGIN_NAMESPACE, function(e1) {\r\n\t\t\t\tscrollHelperFunc(e1);\r\n\t\t\t});\r\n\t\t\t/* IE hacked for mouse up event */\r\n\t\t\tif (isIE) {\r\n\t\t\t\t$document.bind(\"mouseleave.\" + PLUGIN_NAMESPACE, function() {\r\n\t\t\t\t\t$document.one(\"mousemove.\" + PLUGIN_NAMESPACE, function(e1) {\r\n\t\t\t\t\t\tif (!e1.button) {\r\n\t\t\t\t\t\t\tvalidateMultipleSelectBox(e1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t/* select group items automatically */\r\n\t\t$container.getMultipleSelectBoxCachedRows().filter(\".\" + PLUGIN_STYLE_OPTGROUP).bind(\"dblclick.\" + PLUGIN_NAMESPACE, function(e) {\r\n\t\t\tvar $startRow = $(this);\r\n\t\t\t/* trigger callback */\r\n\t\t\tif (!fireOnSelectStartEvent(e, $container, $startRow.getMultipleSelectBoxRowIndex($container))) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar options = $container.getMultipleSelectBoxOptions();\r\n\t\t\tvar maxLimit = options.maxLimit;\r\n\t\t\tvar childGroupItemList = $startRow.getMultipleSelectBoxOptGroupItems();\r\n\t\t\tvar childGroupItemSelectSize = childGroupItemList.length;\r\n\t\t\tif (childGroupItemSelectSize > 0) {\r\n\t\t\t\tif (maxLimit > 0 && childGroupItemSelectSize > maxLimit) {\r\n\t\t\t\t\tchildGroupItemSelectSize = maxLimit;\r\n\t\t\t\t}\r\n\t\t\t\t$container.drawMultipleSelectBox(childGroupItemList.eq(0).getMultipleSelectBoxRowIndex($container), childGroupItemList.eq(childGroupItemSelectSize - 1).getMultipleSelectBoxRowIndex($container), {\r\n\t\t\t\t\t\"scrollPos\": null\r\n\t\t\t\t});\r\n\t\t\t\t/* special case */\r\n\t\t\t\t$container.addClass(PLUGIN_STYLE_SELECTING);\r\n\t\t\t\tvalidateMultipleSelectBox(e);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "function prepareEventHandlers() {\r\n var testList = document.getElementById(\"testList\");\r\n var selectedTest = document.getElementById(\"selectedTest\");\r\n\r\n var title = document.getElementById(\"rule18\");\r\n\tsetCrumbs(1);\r\n testList.onchange = function() {\r\n var value = testList.value;\r\n \t var testIndex = testList.selectedIndex;\r\n title.innerHTML = value;\r\n title.style.textDecoration= \"underline\";\r\n\t\tsetCrumbs(2);\r\n getSelectedLab();\r\n }\r\n document.getElementById(\"quitButton\").onClick = function () {\r\n location.href = \"www.google.com\";\r\n alert(\"Quit!\");\r\n };\r\n}", "function xcustom_makeActionOnObjectSelection() {\r\n var currentSelectedObject = xcustom_getCurrentSelectedObject();\r\n if (null === currentSelectedObject) {\r\n // console.log('Nothing Selected...');\r\n xcustom_resetAndClosePanelSelectedObjectContent();\r\n $('#xcustom-div-right-panel').hide();\r\n return;\r\n }\r\n // console.log('The Selected Object Is : ', currentSelectedObject);\r\n xcustom_showSelectedObjectDataOnViewer(currentSelectedObject);\r\n}", "function on_doc_down(event){\n \t//Toggle Cursor Menu Dropdown\n \tif (!event.target.matches('#dropBtn') && !event.target.classList.contains('menuBtn')) {\n \t closeMenu();\n \t}\n\n \t//Confirm name change of sidebar element if clicking outside of textbox\n \tif (editingList && event.target.type != 'text'){\n \t\tvar li = editingList.parentElement.parentElement;\n \t\tli.attached.name = editingList.value;\n \t\tli.innerHTML = editingList.value;\n \t\teditingList = false;\n \t\treturn false;\n \t}\n\n \t//Reset all object opacities\n \tfor (var i=0; i<scene.objects.length; i++){\n \t\tif (scene.objects[i] != SELECTED){\n \t\t\tscene.objects[i].material.opacity = 1;\n \t\t}\n \t}\n\n \t//Select a cube if name in sidebar is clicked, otherwise unselect all\n \tif (event.target != renderer.domElement){\n \t\tif (event.target.localName == \"li\"){\n \t\t\tif(SELECTED){\n \t\t\t\tunselect();\n \t\t\t}\n \t\t\t// console.log(\"select!\");\n \t\t\tselectObj(event.srcElement.attached);\n \t\t}\n \t}\n }", "function eventListenerOptions() {\n options = document.querySelectorAll('option');\n document.querySelector(\"#stockLoader\").style.display = \"none\";\n for (option of options) {\n option.addEventListener(\"click\", function (e) {\n selectedOption = e.target;\n populateData(selectedOption.id);\n });\n }\n }", "function initListableDataEvents(){\r\n\t\t\treturn {\r\n\t\t\t\tonViewChange: function(){ ctrl.parametersForCollectionsList.selectedCollections = []; }\r\n\t\t\t}\r\n\t\t}", "function handleSelectEvent(e){\n\t\t\tif(e.value==\"Select All\"){\n\t\t\t\tupdateAllTabs(true);\n\t\t\t\te.value=\"Select None\";\n\t\t\t}else{\n\t\t\t\tupdateAllTabs(false);\n\t\t\t\te.value=\"Select All\";\n\t\t\t}\n\t\t\treturn;\n}", "click(){\n createAddItemWindow();\n }", "function addMeniuClickEvents() {\n var listItems = document.querySelectorAll('.list-group-item')\n listItems.forEach(function (el, i) {\n if (i !== 0) {\n el.addEventListener('click', function () {\n var itemNr = el.dataset.id\n addOrder(menuList[itemNr - 1])\n })\n }\n })\n }", "function onMenuItemClick(p_sType, p_aArgs, p_oValue) {\n if (p_oValue == \"startVM\") \t{ \n\t\tYAHOO.vnode.container.dialog1.show()\n\t\tYAHOO.vnode.container.dialog1.focus()\n }\n\telse if (p_oValue == \"terminateVM\") {\n\t\tYAHOO.vnode.container.dialog2.show()\n\t\tYAHOO.vnode.container.dialog2.focus()\n }\n else if (p_oValue == \"stateVM\") {\n YAHOO.vnode.container.dialog3.show()\n\t\tYAHOO.vnode.container.dialog3.focus()\n }\n else if (p_oValue == \"upTimeVM\") {\n YAHOO.vnode.container.dialog4.show()\n\t\tYAHOO.vnode.container.dialog4.focus()\n }\n else if (p_oValue == \"startVG\") {\n YAHOO.vnode.container.dialog5.show()\n\t\tYAHOO.vnode.container.dialog5.focus()\n }\n else if (p_oValue == \"stateVG\") {\n YAHOO.vnode.container.dialog6.show()\n\t\tYAHOO.vnode.container.dialog6.focus()\n }\n else if (p_oValue == \"terminateVG\") {\n YAHOO.vnode.container.dialog7.show()\n\t\tYAHOO.vnode.container.dialog7.focus()\n }\n else if (p_oValue == \"adminPanel\") {\n if (checkPermission()) {\n YAHOO.vnode.container.dialog8.show()\n\t \tYAHOO.vnode.container.dialog8.focus()\n }\n else {\n alert(\"User is not allowed\")\n }\n }\n}", "_handleListboxKeydown(e) {\n let coords = this.__activeDesc.split(\"-\"),\n rownum = parseInt(coords[1]),\n colnum = parseInt(coords[2]);\n if (e.keyCode === 32) {\n //spacebar\n e.preventDefault();\n this._toggleListbox(!this.expanded);\n } else if (this.expanded && [9, 35, 36, 38, 40].includes(e.keyCode)) {\n e.preventDefault();\n if (e.keyCode === 35) {\n //end\n let lastrow = this.options.length - 1,\n lastcol = this.options[lastrow].length - 1;\n this._goToOption(lastrow, lastcol); //move to last option\n } else if (e.keyCode === 36) {\n //home\n this._goToOption(0, 0); //move to first option\n } else if (e.keyCode === 38) {\n //previous (up arrow)\n if (colnum > 0) {\n this._goToOption(rownum, colnum - 1); //move up to previous column\n } else if (rownum > 0) {\n this._goToOption(rownum - 1, this.options[rownum - 1].length - 1); //move up to end of previous row\n }\n } else if (e.keyCode === 40) {\n //next (down arrow)\n if (colnum < this.options[rownum].length - 1) {\n //move down to next column\n this._goToOption(rownum, colnum + 1);\n } else if (rownum < this.options.length - 1) {\n //move down to beginning of next row\n this._goToOption(rownum + 1, [0]);\n }\n }\n }\n }", "function addListenerMyListEdit() {\n\t\t$(\".myList-itemEdit\").on(\"click\", function(event) {\n\t\t\tevent.stopPropagation();\n\t\t\tvar myList = $(this).closest(\".myLists-item\");\n\t\t\tvar currentTitle = myList.find(\".myList-title\").html();\n\t\t\t// TODO; annotate\n\t\t\tresetMyListEditMode( $(this) );\n\t\t\ttoggleToMyListButton();\n\t\t\t// Open current My List edit mode\n\t\t\tmyList.find(\".myList-main\").hide();\n\t\t\tmyList.find(\".myList-editTemplate\").show();\n\t\t\tmyList.find(\".myList-editTitle\").val(currentTitle);\n\t\t\tmyList.find(\".myList-editTitle\").focus();\n\t\t});\n\t}", "function onSelect(ui) {\n var selected = ui.item.value;\n $(\"#list\").css('display', 'block');\n $(\"#list\").html(\"<h3 id='choice'>Your choice:</h3><p>\" \n + selected + \"</p>\");\n $.ajax({\n url:\"ajax.php\",\n data: \"selected=\"+selected,\n type: \"GET\",\n dataType: \"json\"\n });\n}", "function setMenuEvents($list, dp_table) {\n\n // Hide a row\n $list.on('click', 'a[href=hide]', function (e) {\n e.preventDefault();\n var selected = getSelectedRows(dp_table);\n selected.forEach(function (row) {\n row.$row.addClass(\"hiddenrow\");\n })\n if (selected.length > 0) {\n $(this).closest('.header').find('.alert').text('There are ' + selected.length + ' hidden rows!');\n }\n });\n\n // Unhide all hidden rows\n $list.on('click', 'a[href=unhide]', function (e) {\n e.preventDefault();\n dp_table.rows.forEach(function (row) {\n row.$row.removeClass(\"hiddenrow\");\n });\n $(this).closest('.header').find('.alert').empty();\n });\n\n // Delete a row.\n // Sends a request to delete flows and hides the rows until table is refreshed.\n // The drawback is that the entry will be hiddeneven if delete is not successful.\n $list.on('click', 'a[href=delete]', function (e) {\n e.preventDefault();\n var selected = getSelectedRows(dp_table);\n var flows = [];\n selected.forEach(function (row) {\n flows.push(row.dataitem)\n });\n if (flows.length > 0) {\n $.post(\"/flowdel\", JSON.stringify(flows))\n .done(function (response) {\n displayMessage(response);\n selected.forEach(function (row) {\n row.$row.addClass(\"hiddenrow\"); //temp\n })\n })\n .fail(function () {\n var msg = \"No response from controller.\";\n displayMessage(msg);\n })\n }\n });\n\n // Sends a request to monitor flows.\n $list.on('click', 'a[href=monitor]', function (e) {\n e.preventDefault();\n var selected = getSelectedRows(dp_table);\n var flows = [];\n selected.forEach(function (row) {\n flows.push(row.dataitem)\n });\n if (flows.length > 0) {\n $.post(\"/flowmonitor\", JSON.stringify(flows))\n .done(function (response) {\n displayMessage(response);\n selected.forEach(function (row) {\n row.$row.addClass(\"monitorrow\"); //temp\n })\n })\n .fail(function () {\n var msg = \"No response from controller.\";\n displayMessage(msg);\n })\n }\n });\n\n // Saves the row to session storage\n $list.on('click', 'a[href=edit]', function (e) {\n e.preventDefault();\n var selected = getSelectedRows(dp_table);\n if (selected.length > 0) {\n sessionStorage.setItem(category, JSON.stringify(selected[0].dataitem));\n var msg = \"Table entry copied to session storage.\";\n displayMessage(msg);\n }\n });\n\n $list.on('click', 'a', function (e) {\n e.preventDefault();\n var selected = getSelectedRows(dp_table);\n });\n }", "function setFormEvents() {\n\t\tvar $lightbox = $('.lightbox');\n\t\t$lightbox.find('.submit').click(submit);\n\t\t$lightbox.find('.select-field').click(selectUpdate);\n\t\t$lightbox.find('input[type=number]').keydown(checkInput);\n\t\t$lightbox.find('.more-info, em.close-form, .cover').click(closeForm);\n\t\t$lightbox.find('#req-more-info .close-form').click(function(){\n\t\t\t$lightbox.find('.more-info').click();\n\t\t});\n\n\t\t// Stop click even propogating to lightbox to prevent closing modal\n\t\t$lightbox.find('form').click(function(e) {\n\t\t\treturn false;\n\t\t});\n\n\t\t$lightbox.find('.checkbox-field label').click(function() {\n\t\t\tvar $input = $(this).find('input');\n\t\t\t$input.prop('checked', !$input.prop('checked'));\n\t\t});\n\n\t\t$lightbox.find('.more-info label').click(function() {\n\t\t\t$(this).next('input').focus();\n\t\t});\n\n\t\t$lightbox.find('.select-field').focus(function() {\n\t\t\t$(this).children('.select-list').focus();\n\t\t});\n\n\t\tvar textInputs = $lightbox.find('.more-info input[type=text], .more-info input[type=number]');\n\t\tvar inputs = $lightbox.find('.more-info input, .more-info .select-list, .more-info .checkbox-field>label');\n\t\tvar checkboxes = $lightbox.find('.more-info .checkbox-field>label');\n\t\tvar selectLists = $lightbox.find('.select-list');\n\t\tvar selectListItems = selectLists.children('div');\n\n\t\t$lightbox.find('.submit').keydown(function(e) {\n\t\t\tenterClick.call($(this).children('input'), e);\n\t\t});\n\t\tcheckboxes.keydown(enterClick);\n\t\tfunction enterClick(e) {\n\t\t\tif (e.which === 13) {\n\t\t\t\t$(this).click();\n\t\t\t}\n\t\t}\n\t\tcheckboxes.click(function() {\n\t\t\tvar checked = $lightbox.find('.checkbox-field[data-required] input:checked').closest('.checkbox-field');\n\t\t\tvar parentForm = $(this).closest('form');\n\t\t\tparentForm.children('.input-field').removeClass('input-field').children('input, .select-list').attr('tabindex', '-1'); //.each(function(){this.disabled=true;});\n\t\t\tchecked.each(function() {\n\t\t\t\tvar required = $(this).attr('data-required').split(' ');\n\t\t\t\trequired.forEach(function(reqGroup) {\n\t\t\t\t\tthis.children('.' + reqGroup).addClass('input-field').children('input, .select-list').attr('tabindex', '0'); //.each(function(){this.disabled=false;});\n\t\t\t\t}, parentForm);\n\t\t\t});\n\t\t});\n\n\t\tselectListItems.click(function() {\n\t\t\tif (!$(this).hasClass('selected')) {\n\t\t\t\t$(this).siblings('.selected').removeClass('selected');\n\t\t\t\t$(this).addClass('selected');\n\t\t\t}\n\t\t});\n\t\tselectLists.click(function(e) {\n\t\t\t$(this).parent().toggleClass('open');\n\t\t});\n\t\tselectLists.keydown(function(e) {\n\t\t\tswitch (e.which) {\n\t\t\t\tcase 13:\n\t\t\t\t\t$(this).click();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 38:\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t$(this).parent().addClass('open');\n\t\t\t\t\tvar selected = $(this).children('.selected');\n\t\t\t\t\tif (selected.prev('div').length) {\n\t\t\t\t\t\tselected.removeClass('selected');\n\t\t\t\t\t\tselected.prev('div').addClass('selected');\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 40:\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t$(this).parent().addClass('open');\n\t\t\t\t\tvar selected = $(this).children('.selected');\n\t\t\t\t\tif (selected.next('div').length) {\n\t\t\t\t\t\tselected.removeClass('selected');\n\t\t\t\t\t\tselected.next('div').addClass('selected');\n\t\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tinputs.focus(function() {\n\t\t\t$(this).parent().closest('div').addClass('focused');\n\t\t});\n\t\tinputs.focusout(function() {\n\t\t\t$(this).parent().removeClass('focused');\n\t\t\t$(this).parent().removeClass('open');\n\t\t});\n\t\ttextInputs.change(function() {\n\t\t\tif ($(this).val() === '') $(this).parent('.text-field').removeClass('filled');\n\t\t\telse $(this).parent('.text-field').addClass('filled');\n\t\t});\n\t}", "function handleShoppingList() {\n renderShoppingList();\n handleNewItemSubmit();\n handleItemCheckClicked();\n handleDeleteItemClicked();\n handleToggleCheckedItems ();\n handleSearchedItem ();\n}", "function clickOptiontoSelect(){\n\n}", "function handleShoppingList() {\n renderShoppingList();\n handleNewItemSubmit();\n handleItemCheckClicked();\n handleDeleteItemChecked();\n }", "function boxSelector(list,action)\n{\n action = (action == 'select') ? true : (action == 'unselect') ? false : action;\n for ( var i=0;i<list.length;i++ )\n {\n var group = 'bbDomUtil.getInputElementByName(\"'+list[i]+'\")';\n if ( typeof (group = eval(group)) != 'undefined' )\n {\n var j;\n if ( action == 'invert' )\n {\n for ( j=0;j<group.length;j++ )\n {\n group[j].checked = !group[j].checked;\n }\n }\n else\n {\n for ( j=0;j<group.length;j++ )\n {\n group[j].checked = action;\n }\n }\n }\n }\n}", "listAction() {}", "function addAnswerClickListener() {\n\n $(\"li\").on(\"click\", function () {\n\n\n\n // Set selected answer to selected list item.\n\n selectedAnswer = $(this).html();\n\n\n\n // Show answer page.\n\n showSection(answerPage);\n\n\n\n // Add answer information to answer page.\n\n createAnswerSection(selectedAnswer);\n\n });\n\n}", "function addListenerShowMyLists() {\n\t\t$(\"#myLists\").on('click', '.myList-main', function() {\n\t\t\tcurrentMyList = $(this).closest(\".myLists-item\").data(\"list\");\n\t\t\tshowCurrentListItems();\n\t\t\t$(\".myList-main\").removeClass(\"highlight\");\n\t\t\t$(this).addClass(\"highlight\");\n\t\t\tupdateListItemTitle();\n\t\t\tresetNewItemForm();\n\t\t\ttoggleListItemTitleButton();\n\t\t});\n\t}", "function __jackfrost_multichoice_before_add(wrapper, listbox_wrapper, item) {\n var return_value = wrapper.triggerHandler('beforeAdd', [item.key, item]);\n return (typeof return_value == 'undefined') || return_value;\n}" ]
[ "0.7392048", "0.7068184", "0.6567267", "0.64783067", "0.6200226", "0.6195994", "0.6120593", "0.611731", "0.6082135", "0.602773", "0.6025057", "0.59951574", "0.5970093", "0.5878831", "0.58513296", "0.5822986", "0.5816855", "0.5792404", "0.57719886", "0.5727343", "0.5692175", "0.5691228", "0.5642542", "0.5638349", "0.56356484", "0.56356484", "0.56356484", "0.56356484", "0.562441", "0.56219274", "0.56219274", "0.5621489", "0.56141573", "0.56061083", "0.56002426", "0.5572765", "0.5568841", "0.55256337", "0.5485515", "0.5465757", "0.54531884", "0.5451959", "0.54213756", "0.5418769", "0.5411209", "0.54064727", "0.5385903", "0.5369604", "0.5367716", "0.5365748", "0.5364464", "0.5364308", "0.5359419", "0.5359201", "0.5355784", "0.5354274", "0.53515923", "0.5348587", "0.5336417", "0.5335885", "0.53315634", "0.533142", "0.5317404", "0.53161675", "0.5310744", "0.53091264", "0.53085387", "0.52960694", "0.5278749", "0.5275721", "0.52750295", "0.5274817", "0.52648646", "0.5262763", "0.52593833", "0.5254886", "0.5250281", "0.5248293", "0.5243943", "0.5242495", "0.52405113", "0.5231142", "0.5225118", "0.5216685", "0.52059513", "0.5196749", "0.5195196", "0.51951677", "0.5185437", "0.51829934", "0.51806706", "0.5179948", "0.51786214", "0.51727223", "0.5171848", "0.51706886", "0.51703435", "0.5169358", "0.5167871", "0.515971" ]
0.7394105
0
Handle window focus change events: If the sidebar is open in the newly focused window, save the new window ID and update the sidebar content.
function handleWindowFocusChanged (windowId) { if (windowId !== myWindowId) { let checkingOpenStatus = browser.sidebarAction.isOpen({ windowId }); checkingOpenStatus.then(onGotStatus, onInvalidId); } function onGotStatus (result) { if (result) { myWindowId = windowId; runContentScripts('onFocusChanged'); if (debug) console.log(`Focus changed to window: ${myWindowId}`); } } function onInvalidId (error) { if (debug) console.log(`onInvalidId: ${error}`); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\n isWindowFocused = true;\n }", "function focusHandler(){\r\n isWindowFocused = true;\r\n }", "function updateSidebar() {\n $('.sidebar-menu li').removeClass('active');\n $('li[db-page=' + current_parent_page + ']').addClass('active');\n }", "function closeSidebar (windowId) {\r\n//console.log(\"Background received closeSidebar notification from \"+windowId);\r\n delete isSidebarOpen[windowId];\r\n}", "function panelShowBookmark (wId, tabId, bnId) {\r\n//console.log(\"Showing \"+bnId+\" in BSP2 sidebar \"+wId+\" for tab \"+tabId);\r\n if (isSidebarOpen[wId] == true) { // If open and ready, send message to show bnId\r\n\tsendAddonMsgShowBkmk(wId, tabId, bnId);\r\n }\r\n else { // Else, wait it is fully open, in newSidebar() callback above, to send it\r\n\tshowInSidebarWId = wId;\r\n\tshowInSidebarTabId = tabId;\r\n\tshowInSidebarBnId = bnId;\r\n }\r\n}", "function _updateWindowState() {\n\n window.history.replaceState({},\n 'MainWindow',\n window.location.pathname + \"?\" + UrlParams.toString());\n }", "static set_focus( wnd ) {\n let oldwnd = WINDOW.#wnd_with_focus; \n if (!wnd instanceof WINDOW) {\n return;\n }\n if (wnd === oldwnd) {\n return;\n }\n WINDOW.window_set_index(wnd, WINDOW.count);\n WINDOW.#wnd_with_focus = wnd;\n wnd.header.style.backgroundColor = wnd.titlecolor_active;\n wnd.gained_focus();\n if (oldwnd) {\n oldwnd.lost_focus();\n }\n }", "function openSidebarWhenClicked() {\n\t\tbrowser.browserAction.onClicked.removeListener(openSidebarWhenClicked)\n\t\tbrowser.sidebarAction.open()\n\t\tbrowser.browserAction.onClicked.addListener(closeSidebarWhenClicked)\n\t}", "function scanSidebars () {\r\n let a_winId = Object.keys(privateSidebarsList);\r\n let len = a_winId.length;\r\n for (let i=0 ; i<len ; i++) {\r\n\tlet winId = a_winId[i]; // A String\r\n\tlet windowId = privateSidebarsList[winId]; // An integer\r\n//console.log(\"Scanning \"+windowId);\r\n\tbrowser.sidebarAction.isOpen(\r\n\t {windowId: windowId}\r\n\t).then(\r\n\t function (open) {\r\n//console.log(windowId+\" is \"+open);\r\n\t\tif (!open) { // Remove from lists of open sidebars\r\n//console.log(\"Deleting \"+windowId);\r\n\t\t delete privateSidebarsList[windowId];\r\n\t\t delete isSidebarOpen[windowId];\r\n\t\t // Do not delete entry in sidebarCurId to keep it across sidebar sessions\r\n\t\t if (--len <= 0) {\r\n\t\t\tclearInterval(sidebarScanIntervalId);\r\n\t\t\tsidebarScanIntervalId = undefined;\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t).catch( // Asynchronous also, like .then\r\n\t function (err) {\r\n\t\t// window doesn't exist anymore\r\n//console.log(\"Error name: \"+err.name+\" Error message: \"+err.message);\r\n\t\tif (err.message.includes(\"Invalid window ID\")) {\r\n//console.log(\"Window doesn't exist anymore, deleting it: \"+windowId);\r\n\t\t delete privateSidebarsList[windowId];\r\n\t\t delete isSidebarOpen[windowId];\r\n\t\t // Do not delete entry in sidebarCurId to keep it across sidebar sessions\r\n\t\t let len = Object.keys(privateSidebarsList).length;\r\n\t\t if (len == 0) {\r\n\t\t\tclearInterval(sidebarScanIntervalId);\r\n\t\t\tsidebarScanIntervalId = undefined;\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t);\r\n }\r\n}", "function focusChange(windowId) {\n\t\tgetIntentionData().then(intentionData => {\n\t\tif (intentionData.focus && windowId !== intentionData.windowId) {\n\t\t\tintentionData.focus = false\n\t\t\tintentionData.focusLost.push({\n\t\t\t\tstart: Date.now(),\n\t\t\t\tend: undefined\n\t\t\t})\n\t\t} else if (!intentionData.focus && windowId === intentionData.windowId) {\n\t\t\tlet focusIndex = intentionData.focusLost.length - 1\n\t\t\tintentionData.focus = true\n\t\t\tintentionData.focusLost[focusIndex].end = Date.now()\n\t\t}\n\n\t\tupdateIntentionData('focusChange', intentionData)\n\t})\n}", "function handleFocus(event) {\n scope.$apply(attributes.bnWindowFocus);\n $log.warn(\"Window focused.\");\n }", "function handleFocus() {\n scope.$apply(attributes.trWindowFocus);\n }", "function win_focusChange(evt) {\n\t if (evt && evt.target !== window) return;\n\n\t if (document.hasFocus()) {\n\t if (iosIsPageFocused) return;\n\t iosIsPageFocused = true;\n\t pageStateCheck();\n\t } else {\n\t if (!iosIsPageFocused) return;\n\t iosIsPageFocused = false;\n\t pageStateCheck();\n\t }\n\t }", "function createWindow() {\n\n //Initialize sql database when window is created\n const server = require('./javascript/dbService')\n \n // Create Main window with custom size\n win = new BrowserWindow({\n width: 900,\n height: 680,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n bookmarkWindow = new BrowserWindow({\n width: 400,\n height: 380,\n parent: win,\n show: false,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n newBookmarkWindow = new BrowserWindow({\n width: 400,\n height: 380,\n parent: win,\n show: false,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n // load selected html file on the main window\n win.loadFile('./src/index.html')\n bookmarkWindow.loadFile('./src/bm.html')\n newBookmarkWindow.loadFile('./src/newbookmark.html')\n // Open the DevTools.\n win.webContents.openDevTools()\n\n //disable webconsole\n //win.webContents.on(\"devtools-opened\", () => { win.webContents.closeDevTools()})\n\n/*\n bookmarkWindow.webContents.on('did-finish-load', () => {\n bookmarkWindow.webContents.send('ping', 'pong')\n })*/\n\n \n // Clear variable when application window is closed\n win.on('closed', () => {\n win = null\n })\n\n bookmarkWindow.on('close', (e) => {\n e.preventDefault()\n bookmarkWindow.hide()\n })\n\n newBookmarkWindow.on('close', (e) => {\n e.preventDefault()\n newBookmarkWindow.hide()\n })\n\n\n}", "function handleWindowResize () {\n ctrl.lastSelectedIndex = ctrl.selectedIndex;\n ctrl.offsetLeft = fixOffset(ctrl.offsetLeft);\n\n $mdUtil.nextTick(function () {\n ctrl.updateInkBarStyles();\n updatePagination();\n });\n }", "function handleWindowResize () {\n ctrl.lastSelectedIndex = ctrl.selectedIndex;\n ctrl.offsetLeft = fixOffset(ctrl.offsetLeft);\n $mdUtil.nextTick(function () {\n ctrl.updateInkBarStyles();\n updatePagination();\n });\n }", "function handleWindowResize () {\n ctrl.lastSelectedIndex = ctrl.selectedIndex;\n ctrl.offsetLeft = fixOffset(ctrl.offsetLeft);\n $mdUtil.nextTick(function () {\n ctrl.updateInkBarStyles();\n updatePagination();\n });\n }", "function handleWindowResize () {\n ctrl.lastSelectedIndex = ctrl.selectedIndex;\n ctrl.offsetLeft = fixOffset(ctrl.offsetLeft);\n $mdUtil.nextTick(function () {\n ctrl.updateInkBarStyles();\n updatePagination();\n });\n }", "function onClickedContextMenuHandler (info, tab) {\r\n let menuItemId = info.menuItemId;\r\n//console.log(\"menuItemId = \"+menuItemId);\r\n if (menuItemId == SubMenuPathId) {\r\n//console.log(\"SubMenuPathId clicked\");\r\n\tlet bnId = info.bookmarkId;\r\n\tlet BN = curBNList[bnId];\r\n\topenPropPopup(\"prop\", bnId, BN_path(BN.parentId), BN.type, BN.title, BN.url);\r\n }\r\n else\r\n if (menuItemId == BAOpenTabId) {\r\n//console.log(\"BAOpenTabId clicked, tab id = \"+tab.id);\r\n\t// Open BSP2 in new tab, referred by this tab to come back to it when closing\r\n\topenBsp2NewTab(tab);\r\n }\r\n else if (menuItemId == BAShowInSidebar) {\r\n//console.log(\"Show \"+lastMenuBnId+\" in BSP2 sidebar\");\r\n\tif (lastMenuBnId != undefined) {\r\n\t let windowId = tab.windowId;\r\n\t // Can't use browser.sidebarAction.isOpen() here, as this is waiting for a Promise,\r\n\t // and so when it arrives we are not anymore in the code flow of a user action, so\r\n\t // the browser.sidebarAction.close() and browser.sidebarAction.open() are not working :-(\r\n\t // => Have to track state through other mechanisms to not rely on Promises ...\r\n\t if (isSidebarOpen[windowId] == true) { // Already open\r\n\t\tpanelShowBookmark(windowId, tab.id, lastMenuBnId);\r\n\t }\r\n\t else {\r\n\t\tbrowser.sidebarAction.open()\r\n\t\t.then(panelShowBookmark(windowId, tab.id, lastMenuBnId));\r\n\t }\r\n\t}\r\n }\r\n else if (menuItemId == BAHistory) {\r\n\t// Open Bookmark history window\r\n\topenBsp2History();\r\n }\r\n else if (menuItemId == BAOptionsId) {\r\n\t// Open BSP2 options\r\n\tbrowser.runtime.openOptionsPage();\r\n }\r\n}", "function buttonClicked (tab) {\r\n//console.log(\"Background received button click\");\r\n let windowId = tab.windowId;\r\n // Can't use browser.sidebarAction.isOpen() here, as this is waiting for a Promise,\r\n // and so when it arrives we are not anymore in the code flow of a user action, so\r\n // the browser.sidebarAction.close() and browser.sidebarAction.open() are not working :-(\r\n // => Have to track state through other mechanisms to not rely on Promises ...\r\n if (isSidebarOpen[windowId] == true) {\r\n//console.log(\"Sidebar is open. Closing.\");\r\n\tbrowser.sidebarAction.close();\r\n }\r\n else {\r\n//console.log(\"Sidebar is closed. Opening.\");\r\n\tbrowser.sidebarAction.open();\r\n }\r\n}", "function onMain() {\n //get a reference to the current Application.\n const app = fin.desktop.Application.getCurrent();\n const win = fin.desktop.Window.getCurrent();\n\n //we get the current OpenFin version\n fin.desktop.System.getVersion(version => {\n const ofVersion = document.querySelector('#of-version');\n ofVersion.innerText = version;\n });\n\n let counter = 0;\n\n const counterP = document.querySelector('#counter');\n\n setInterval(() => {\n counterP.innerText = counter++;\n }, 500);\n\n const childWinBtn = document.querySelector('#child-win');\n\n childWinBtn.addEventListener('click', () => {\n new fin.desktop.Window({\n name: `${Math.random() * 99999}`,\n url: 'http://localhost:5555/index.html',\n autoShow: true\n });\n });\n\n const contextMenu = new fin.desktop.Window({\n name: 'context-menu: ' + Math.random() * 9999999,\n url: 'http://localhost:5555/context-menu.html',\n frame: false,\n defaultHeight: 140,\n defaultWidth: 200,\n saveWindowState: false,\n alwaysOnTop: true,\n customData: win.name,\n shadow: true\n });\n\n window.addEventListener('contextmenu', (e) => {\n e.preventDefault();\n contextMenu.setBounds(e.screenX, e.screenY, null, null, () => {\n contextMenu.show(() => {\n contextMenu.focus();\n });\n });\n });\n}", "function handleFocusIndexChange(newIndex,oldIndex){if(newIndex===oldIndex)return;if(!getElements().tabs[newIndex])return;adjustOffset();redirectFocus();}", "function changefocus()\n{\n\tfocusedBar=document.activeElement;\n}", "function save_sidebar_opened_status()\r\n{\r\n\tTitanium.App.Properties.setString('sidebar_opened_status', sidebar_opened_status.toString());\r\n}", "function sidebar_handle(clicked_id, state){\n\t \n\t var NavigationBar_ID = \"navigation_sidebar\";\n\t var AlarmingBar_ID = \"alarm_sidebar\";\n\t \n\t if(clicked_id.indexOf(NavigationBar_ID) >= 0 ){\n\t \n\t\t switch(state){\n\t\t\t case 0: {\n\t\t\t\t document.getElementById(\"id_navigation_sidebar\").style.width = \"20px\";\n\t\t\t\t document.getElementById(\"id_main_content\").style.marginLeft = \"20px\";\n \t\t\t\t break;\n\t \t\t }\n\t\t \t case 1: {\n\t\t\t \t document.getElementById(\"id_navigation_sidebar\").style.width = \"200px\";\n\t\t\t\t document.getElementById(\"id_main_content\").style.marginLeft = \"200px\";\n\t\t\t\t break;\n \t\t\t }\n\t \t\t case 2:{\n\t\t \t\t if(document.getElementById(\"id_navigation_sidebar\").clientWidth > 20){\n\t\t\t \t\t document.getElementById(\"id_navigation_sidebar\").style.width = \"20px\";\n\t\t\t\t document.getElementById(\"id_main_content\").style.marginLeft = \"20px\";\n\t\t\t\t }\n\t\t\t\t else{\n\t\t\t\t\t document.getElementById(\"id_navigation_sidebar\").style.width = \"200px\";\n\t\t\t\t document.getElementById(\"id_main_content\").style.marginLeft = \"200px\";\n\t\t\t\t }\n\t\t\t\t break;\n \t\t\t }\n\t \t\t default: {\n\t\t \t break;\n\t\t\t }\n\t\t }\t\t\n\t }\n \n //handle Alarm clicks\n \n if(clicked_id.indexOf(AlarmingBar_ID) >= 0 ){\n\t \n\t\t switch(state){\n\t\t\t case 0: {\n\t\t\t\t //document.getElementById(\"id_alarm_sidebar\").style.width = \"20px\";\n\n \t\t\t\t break;\n\t \t\t }\n\t\t \t case 1: {\n\t\t\t \t //document.getElementById(\"id_alarm_sidebar\").style.width = \"200px\";\n\n\t\t\t\t break;\n\t\t\t }\n \t\t\t case 2:{\n\t \t\t\t /*if(document.getElementById(\"id_alarm_sidebar\").clientWidth > 20){\n\t\t \t\t\t document.getElementById(\"id_alarm_sidebar\").style.width = \"20px\";\n\t\t\t \t }\n\t\t\t\t else{\n\t\t\t\t\t document.getElementById(\"id_alarm_sidebar\").style.width = \"200px\";\n\t\t\t\t }\n \t\t\t\t break;*/\n\t \t\t }\n\t\t \t default: {\n\t\t\t break;\n\t\t\t }\n\t\t }\t\n\t }\n}", "function handleWindowResize(){ctrl.lastSelectedIndex=ctrl.selectedIndex;ctrl.offsetLeft=fixOffset(ctrl.offsetLeft);$mdUtil.nextTick(function(){ctrl.updateInkBarStyles();updatePagination();});}", "preferencesFocused() {\n\t\tfinsembleWindow.removeEventListener('focused', this.preferencesFocused);\n\t\tthis.changePreferencesAlwaysOnTop(true);\n\t}", "function handleWindowWidthChange() {\n setWidth(window.innerWidth)\n }", "function handleWindowWidthChange() {\n setWidth(window.innerWidth)\n }", "_on_button_press(widget, event, w_box, ws_index, w) {\n \t// left-click: toggle window\n \tif (event.get_button() == 1) {\n\t\t\tif (w.has_focus() && !Main.overview.visible) {\n\t\t\t\tif (w.can_minimize()) {\n\t\t \t\t\tw.minimize();\n\t\t \t\t}\n\t\t \t} else {\t\n\t\t\t\tw.activate(global.get_current_time());\n\t\t\t}\n\t\t\tif (Main.overview.visible) {\n\t\t\t\tMain.overview.hide();\n\t\t\t}\n\t\t\tif (!w.is_on_all_workspaces()) {\n\t\t\t\tWM.get_workspace_by_index(ws_index).activate(global.get_current_time());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// right-click: toggle arrows\n\t\tif (RIGHT_CLICK && event.get_button() == 3 && !w.is_on_all_workspaces()) {\n\t\t\tif (!w_box.arrows) {\n\t\t\t\tif (w_box.get_child_at_index(1)) {\n\t\t\t\t\tw_box.get_child_at_index(1).show();\n\t\t\t\t}\n\t\t\t\tif (w_box.get_child_at_index(2)) {\n\t\t\t\t\tw_box.get_child_at_index(2).show();\n\t\t\t\t}\n\t\t\t\tw_box.arrows = true;\n\t\t\t} else {\n\t\t\t\tif (w_box.get_child_at_index(1)) {\n\t\t\t\t\tw_box.get_child_at_index(1).hide();\n\t\t\t\t}\n\t\t\t\tif (w_box.get_child_at_index(2)) {\n\t\t\t\t\tw_box.get_child_at_index(2).hide();\n\t\t\t\t}\n\t\t\t\tw_box.arrows = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// middle-click: close window\n\t\tif (MIDDLE_CLICK && event.get_button() == 2 && w.can_close()) {\n\t\t\tw.delete(global.get_current_time());\n\t\t\tthis.window_tooltip.hide();\n\t\t}\n\t\t\n }", "function onCloseSidebarButtonClicked(event)\n {\n this.hideSidebar();\n this.showEditor();\n }", "function focused() {\n var container = document.getElementById(\"container\");\n var sidepane = document.getElementById(\"sidepane\");\n\n container.classList.add(\"focusedContainer\");\n sidepane.classList.add(\"focusedSidepane\");\n}", "fixClientWindow() {\n ofAssoc(this.internalContext.getIf(Const_1.APPLIED_CLIENT_WINDOW).orElse({}).value)\n .forEach(([, value]) => {\n const namingContainerId = this.internalContext.getIf(Const_1.NAMING_CONTAINER_ID);\n const namedViewRoot = !!this.internalContext.getIf(Const_1.NAMED_VIEWROOT).value;\n const affectedForms = this.getContainerForms(namingContainerId)\n .filter(affectedForm => this.isInExecuteOrRender(affectedForm));\n this.appendClientWindowToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse(\"\").value);\n });\n }", "initWindowEvents() {\n /**\n * Several keyboard events.\n */\n window.addEventListener(\"keydown\", (event) => {\n if (event.shiftKey && event.ctrlKey && event.which === 83) {\n // ctrl+shift+s preview sync source\n return this.previewSyncSource();\n }\n else if (event.metaKey || event.ctrlKey) {\n // ctrl+c copy\n if (event.which === 67) {\n // [c] copy\n document.execCommand(\"copy\");\n }\n else if (event.which === 187 && !this.config.vscode) {\n // [+] zoom in\n this.zoomIn();\n }\n else if (event.which === 189 && !this.config.vscode) {\n // [-] zoom out\n this.zoomOut();\n }\n else if (event.which === 48 && !this.config.vscode) {\n // [0] reset zoom\n this.resetZoom();\n }\n else if (event.which === 38) {\n // [ArrowUp] scroll to the most top\n if (this.presentationMode) {\n window[\"Reveal\"].slide(0);\n }\n else {\n this.previewElement.scrollTop = 0;\n }\n }\n }\n else if (event.which === 27) {\n // [esc] toggle sidebar toc\n this.escPressed(event);\n }\n });\n window.addEventListener(\"resize\", () => {\n this.scrollMap = null;\n });\n window.addEventListener(\"message\", (event) => {\n const data = event.data;\n if (!data) {\n return;\n }\n // console.log('receive message: ' + data.command)\n if (data.command === \"updateHTML\") {\n this.totalLineCount = data.totalLineCount;\n this.sidebarTOCHTML = data.tocHTML;\n this.sourceUri = data.sourceUri;\n this.renderSidebarTOC();\n this.updateHTML(data.html, data.id, data.class);\n }\n else if (data.command === \"changeTextEditorSelection\" &&\n (this.config.scrollSync || data.forced)) {\n const line = parseInt(data.line, 10);\n let topRatio = parseFloat(data.topRatio);\n if (isNaN(topRatio)) {\n topRatio = 0.372;\n }\n this.scrollToRevealSourceLine(line, topRatio);\n }\n else if (data.command === \"startParsingMarkdown\") {\n /**\n * show refreshingIcon after 1 second\n * if preview hasn't finished rendering.\n */\n if (this.refreshingIconTimeout) {\n clearTimeout(this.refreshingIconTimeout);\n }\n this.refreshingIconTimeout = setTimeout(() => {\n if (!this.presentationMode) {\n this.refreshingIcon.style.display = \"block\";\n }\n }, 1000);\n }\n else if (data.command === \"openImageHelper\") {\n window[\"$\"](\"#image-helper-view\").modal();\n }\n else if (data.command === \"runAllCodeChunks\") {\n this.runAllCodeChunks();\n }\n else if (data.command === \"runCodeChunk\") {\n this.runNearestCodeChunk();\n }\n else if (data.command === \"escPressed\") {\n this.escPressed();\n }\n else if (data.command === \"previewSyncSource\") {\n this.previewSyncSource();\n }\n else if (data.command === \"copy\") {\n document.execCommand(\"copy\");\n }\n else if (data.command === \"zommIn\") {\n this.zoomIn();\n }\n else if (data.command === \"zoomOut\") {\n this.zoomOut();\n }\n else if (data.command === \"resetZoom\") {\n this.resetZoom();\n }\n else if (data.command === \"scrollPreviewToTop\") {\n if (this.presentationMode) {\n window[\"Reveal\"].slide(0);\n }\n else {\n this.previewElement.scrollTop = 0;\n }\n }\n }, false);\n }", "function closeCurrentWindow() {\n if(currentOpenWindow) {\n currentOpenWindow.showWindow = false;\n \n // a $digest is needed to close windows that were opened by clicking on a marker\n // while this same $digest will throw error if clicking on sidebar\n // this is a 'safe' way to prevent digest errors\n $timeout(function() { $scope.$apply(); }, 0); \n }\n }", "function onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n }", "function onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n }", "function openSidebar(activeTab) {\n vm.isSidebarOpen = true;\n\n // Activate specific tab\n if (activeTab) {\n vm.sidebarTab = activeTab;\n }\n }", "updateSidebarState(click) {\n // Start with the sidebar hidden on small screens\n if (window.innerWidth < 470) {\n this.setState({sidebar: 'sidenav'})\n // Hide sidebar to display infowindow on small screens\n if (click === true) {\n this.setState({sidebar: 'sidenav'})\n }\n } else {\n this.setState({sidebar: 'sidenav-active'})\n }\n }", "click(item, focusedWindow){\n focusedWindow.toggleDevTools();\n }", "function dataUpdated(changes, area) {\n\t// only do this when the active session data changes\n\tif(changes.hasOwnProperty(\"intention\")){\n\t\tlet newData = changes.intention.newValue\n\n\t\tchrome.tabs.query({\n\t\t\tactive: true\n\t\t}, function(tabs) {\n\t\t\ttabs.forEach(tab => {\n\t\t\t\tlet activeWindow = newData.windowId\n\t\t\t\tif (tab.windowId === activeWindow) {\n\t\t\t\t\tchrome.tabs.sendMessage(tab.id, {\n\t\t\t\t\t\tcontrol: \"updateData\",\n\t\t\t\t\t\tdata: newData\n\t\t\t\t\t}, async response => {})\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t} \n\n}", "function ts_WindowOnload()\r\n{\r\n\tts_AssignWindowName();\r\n\tts_AddEvent(window, 'focus', ts_AssignWindowName);\r\n}", "function handleToggleSidebar(e) {\n\t\t\tvar side = document.getElementById('sidebar');\n\n\t\t\t//when calling this for the first time on page startup, style.display attribute will be empty which corresponds to the default case of \"visible\"\n\t\t\tif (side.style.display == 'none') {\n\t\t\t\t//sidebar is not visible, show it\n\t\t\t\t$('#sidebar').css('display', 'inline');\n\t\t\t\t$('#map').css('left', '415px');\n\t\t\t\t$('#heightProfile').css('left', '415px');\n\t\t\t\t$('#toggleSidebar').attr('class', 'sidebarVisible');\n\t\t\t\t//trigger map update\n\t\t\t\ttheInterface.emit('ui:mapPositionChanged');\n\t\t\t} else {\n\t\t\t\t//sidebar is visible, hide it\n\t\t\t\t$('#sidebar').css('display', 'none');\n\t\t\t\t$('#map').css('left', '25px');\n\t\t\t\t$('#heightProfile').css('left', '25px');\n\t\t\t\t$('#toggleSidebar').attr('class', 'sidebarInvisible');\n\t\t\t\t//trigger map update\n\t\t\t\ttheInterface.emit('ui:mapPositionChanged');\n\t\t\t}\n\t\t}", "function globalUpdate() {\n document.querySelectorAll(\".note\").forEach((e) => e.remove()); //cleares window\n moveSelected(false);\n\n allNotes.forEach((element) => {\n if (element.titleOfNoteBook == openNotebook && element.delete != true) {\n main.prepend(element.noteElement);\n }\n });\n}", "function onClickedContextMenuHandler (info, tab) {\n let bnId = info.bookmarkId;\n//console.log(\"menu item clicked on <\"+bnId+\"> with contexts=\"+info.contexts+\" menuIds=\"+info.menuIds+\" menuItemId=\"+info.menuItemId+\" pageUrl=\"+info.pageUrl+\" targetElementId=\"+info.targetElementId+\" viewType=\"+info.viewType+\" tab=\"+tab);\n if (myMenu_open // This sidebar instance is the one which opened the context menu\n\t && ((info.viewType == \"sidebar\") || (info.viewType == \"tab\")) // Context menu inside of sidebar or insde BSP2 in a tab\n\t && (bnId != undefined) && (bnId.length > 0)\n\t ) {\n\t// Retrieve the clicked menu action\n\tlet menuItemId = info.menuItemId;\n\tlet pos = menuItemId.indexOf(\"-\");\n\tlet menuAction = menuItemId.substring(0, pos);\n\tswitch (menuAction) {\n\t case \"bsp2show\":\n\t\t// Show bookmark item in main pane\n\t\tmenuShow(bnId);\n\t\tbreak;\n\t case \"bsp2open\":\n\t\t// Open in tab\n\t\tmenuOpen(curRowList[bnId], INTAB);\n\t\tbreak;\n\t case \"bsp2opentab\":\n\t\t// Open in new tab\n\t\tmenuOpen(curRowList[bnId], NEWTAB);\n\t\tbreak;\n\t case \"bsp2openwin\":\n\t\t// Open in new window\n\t\tmenuOpen(curRowList[bnId], NEWWIN);\n\t\tbreak;\n\t case \"bsp2openpriv\":\n\t\t// Open in private window\n\t\tmenuOpen(curRowList[bnId], NEWPRIVWIN);\n\t\tbreak;\n\t case \"bsp2openall\":\n\t\t// Open all bookmarks in folder\n\t let is_shiftKey = (info.modifiers.indexOf(\"Shift\") != -1);\n\t\tmenuOpenAllInTabs(bnId, is_shiftKey);\n\t\tbreak;\n\t case \"bsp2opentree\":\n\t\t// Open parent folder of the .reshidden row\n\t\topenResParents(curRowList[bnId]);\n\t\tbreak;\n\t case \"bsp2goparent\":\n\t\t// Show parent of the row\n\t\tgoParent(curRowList[bnId]);\n\t\tbreak;\n\t case \"bsp2newbtab\":\n\t\t// Bookmark current tab here\n\t\tmenuNewBkmkItem(bnId, NEWBCURTAB, (info.modifiers.indexOf(\"Ctrl\") >= 0));\n\t\tbreak;\n\t case \"bsp2newb\":\n\t\t// New bookmark\n\t\tmenuNewBkmkItem(bnId, NEWB);\n\t\tbreak;\n\t case \"bsp2newf\":\n\t\t// New folder\n\t\tmenuNewBkmkItem(bnId, NEWF);\n\t\tbreak;\n\t case \"bsp2news\":\n\t\t// New separator\n\t\tmenuNewBkmkItem(bnId, NEWS);\n\t\tbreak;\n\t case \"bsp2cut\":\n\t\t// Cut selection to clipboard\n\t\tif (isResultMenu) { // A results table menu\n\t\t menuCutBkmkItem(rselection);\n\t\t}\n\t\telse {\n\t\t menuCutBkmkItem(selection);\n\t\t}\n\t\tbreak;\n\t case \"bsp2copy\":\n\t\t// Copy selection to clipboard\n\t\tif (isResultMenu) { // A results table menu\n\t\t menuCopyBkmkItem(rselection);\n\t\t}\n\t\telse {\n\t\t menuCopyBkmkItem(selection);\n\t\t}\n\t\tbreak;\n\t case \"bsp2paste\":\n\t\t// Paste clipboard before current bookmark\n\t\tmenuPasteBkmkItem(bnId, false);\n\t\tbreak;\n\t case \"bsp2pasteinto\":\n\t\t// Paste clipboard into current folder\n\t\tmenuPasteBkmkItem(bnId, true);\n\t\tbreak;\n\t case \"bsp2del\":\n\t\t// Delete selected bookmark item(s)\n\t\tmenuDelBkmkItem(selection);\n\t\tbreak;\n\t case \"bsp2sort\":\n\t\t// Sort folder content\n\t\tsendAddonMessage(\"sort:\"+bnId);\n\t\tbreak;\n\t case \"bsp2refreshfav\":\n\t\t// Refresh favicon\n\t\tmenuRefreshFav(bnId);\n\t\tbreak;\n\t case \"bsp2collapseall\":\n\t\t// Close folder and all subfolders\n\t\tcollapseAll(bnId, curRowList[bnId]);\n\t\tbreak;\n\t case \"bsp2expandall\":\n\t\t// Open folder and all subfolders\n\t\texpandAll(bnId, curRowList[bnId]);\n\t\tbreak;\n\t case \"bsp2prop\":\n\t\t// Show properties\n\t\tmenuProp(bnId);\n\t\tbreak;\n\t}\n }\n}", "function focusWindow(tabId, windowId, callback) {\n /**\n * Updating already focused window produces bug in Edge browser\n * https://github.com/AdguardTeam/AdguardBrowserExtension/issues/675\n */\n getActive(function (activeTabId) {\n if (tabId !== activeTabId) {\n // Focus window\n browser.windows.update(windowId, { focused: true }, function () {\n if (checkLastError(\"Update window \" + windowId)) {\n return;\n }\n callback();\n });\n }\n callback();\n });\n }", "function openSidebar() {\n docBar.style.width = '250px';\n document.getElementById('main').style.marginLeft = '250px';\n}", "function determineWindowState() {\n var self = this;\n var _previousState = _isMainWindow;\n _windowArray = localStorage.getItem(_LOCALSTORAGE_KEY);\n\n if (_windowArray === null || _windowArray === \"NaN\") {\n _windowArray = [];\n } else {\n _windowArray = JSON.parse(_windowArray);\n }\n\n if (_isFocusedPromotedToMain && document.hasFocus() && _initialized) {\n _windowArray.splice(_windowArray.indexOf(_windowId), 1);\n\n _windowArray.push(_windowId);\n\n _isMainWindow = true;\n localStorage.setItem(_LOCALSTORAGE_KEY, JSON.stringify(_windowArray));\n } else if (_initialized) {\n //Determine if this window should be promoted\n if (_windowArray.length <= 1 || (_isNewWindowPromotedToMain ? _windowArray[_windowArray.length - 1] : _windowArray[0]) === _windowId) {\n _isMainWindow = true;\n } else {\n _isMainWindow = false;\n }\n } else {\n if (_windowArray.length === 0) {\n _isMainWindow = true;\n _windowArray[0] = _windowId;\n localStorage.setItem(_LOCALSTORAGE_KEY, JSON.stringify(_windowArray));\n } else {\n _isMainWindow = false;\n\n _windowArray.push(_windowId);\n\n localStorage.setItem(_LOCALSTORAGE_KEY, JSON.stringify(_windowArray));\n }\n } //If the window state has been updated invoke callback\n\n\n if (_previousState !== _isMainWindow) {\n _onWindowUpdated.call(this, this);\n } //Perform a recheck of the window on a delay\n\n\n setTimeout(function () {\n determineWindowState.call(self);\n }, RECHECK_WINDOW_DELAY_MS);\n } //Remove the window from the global count", "function openContent(spacerefval) {\n // if one already shown:\n if( isOpenContentArea ) {\n hideSpace();\n spaceref = spacerefval;\n showSpace();\n }\n else {\n spaceref = spacerefval;\n openContentArea();\n }\n \n // remove class active (if any) from current list item\n const activeItem = spacesEl.querySelector('li.list__item--active');\n if( activeItem ) {\n activeItem.classList.remove('list__item--active');\n }\n // list item gets class active (if the list item is currently shown in the list)\n const listItem = spacesEl.querySelector('li[data-space=\"' + spacerefval + '\"]')\n if( listItem ) {\n listItem.classList.add('list__item--active');\n }\n\n // remove class selected (if any) from current space\n const activeSpaceArea = mallLevels[selectedLevel - 1].querySelector('svg > .map__space--selected');\n if( activeSpaceArea ) {\n activeSpaceArea.classList.remove('map__space--selected');\n }\n // svg area gets selected\n const mapselection = mallLevels[selectedLevel - 1].querySelector('svg > .map__space[data-space=\"' + spaceref + '\"]');\n if ( mapselection ) {\n mapselection.classList.add('map__space--selected');\n }\n }", "function w3_open() {\n document.getElementById(\"mySidebar\").style.width = \"100%\";\n document.getElementById(\"mySidebar\").style.display = \"block\";\n}", "function w3_open() {\r\n document.getElementById(\"mySidebar\").style.display = \"block\";\r\n}", "_onCurrentChanged(sender, args) {\n const oldWidget = args.previousTitle\n ? this._findWidgetByTitle(args.previousTitle)\n : null;\n const newWidget = args.currentTitle\n ? this._findWidgetByTitle(args.currentTitle)\n : null;\n if (oldWidget) {\n oldWidget.hide();\n }\n if (newWidget) {\n newWidget.show();\n }\n this._lastCurrent = newWidget || oldWidget;\n this._refreshVisibility();\n }", "function saveCurBnId (windowId, bnId) {\r\n options.lastcurbnid = sidebarCurId[windowId] = bnId;\r\n browser.storage.local.set({\r\n\tlastcurbnid_option: bnId\r\n });\r\n}", "function windowHashChange() {\n var $hashFilter = decodeHash();\n\n // Filter\n $notes.isotope( {\n filter: $hashFilter\n } );\n\n // Toggle the active class on the correct button\n var $filterBtns = $( \".filter-container\" );\n $filterBtns.find( \".btn\" ).removeClass( \"btn-active\" );\n\n $filterBtns.find( '[data-filter=\"' + $hashFilter + '\"]' ).addClass( \"btn-active\" );\n }", "syncChromeWindow (chromeWindow) {\n const prevTabWindow = this.windowIdMap.get(chromeWindow.id)\n /*\n if (!prevTabWindow) {\n log.log(\"syncChromeWindow: detected new chromeWindow: \", chromeWindow)\n }\n */\n const tabWindow = prevTabWindow ? TabWindow.updateWindow(prevTabWindow, chromeWindow) : TabWindow.makeChromeTabWindow(chromeWindow)\n const stReg = this.registerTabWindow(tabWindow)\n\n // if window has focus and is a 'normal' window, update current window id:\n const updCurrent = chromeWindow.focused && validChromeWindow(chromeWindow, true)\n const st = updCurrent ? stReg.set('currentWindowId', chromeWindow.id) : stReg\n\n if (updCurrent) {\n log.log('syncChromeWindow: updated current window to: ', chromeWindow.id)\n }\n\n return st\n }", "function onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n}", "function onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n}", "function onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n}", "function onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n}", "function onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n}", "function onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n}", "updateDimensions() {\n\t\tlet element = document.getElementById('main-wrapper');\n\t\tthis.setState({\n\t\t\twidth: window.innerWidth\n\t\t});\n\t\tif (this.state.width < 1170) {\n\t\t\telement.setAttribute(\"data-sidebartype\", \"mini-sidebar\");\n\t\t\telement.classList.add(\"mini-sidebar\");\n\t\t} else {\n\t\t\telement.setAttribute(\"data-sidebartype\", \"full\");\n\t\t\telement.classList.remove(\"mini-sidebar\");\n\t\t}\n\t}", "function _update_window_dimensions() {\n var uwidth;\n var uheight;\n if (main_outer_ref && main_outer_ref.current) {\n uheight = window.innerHeight - main_outer_ref.current.offsetTop;\n uwidth = window.innerWidth - main_outer_ref.current.offsetLeft;\n } else {\n uheight = window.innerHeight - USUAL_TOOLBAR_HEIGHT;\n uwidth = window.innerWidth - 2 * MARGIN_SIZE;\n }\n mDispatch({\n type: \"change_multiple_fields\",\n newPartialState: {\n usable_height: uheight,\n usable_width: uwidth\n }\n });\n }", "function addFeatureContentFocusListener() {\n var mousedown = false;\n $('#feature_content').on('mousedown', function(event) {\n mousedown = true;\n });\n $('#feature_content').on('focusin', function(e) {\n if (!mousedown) {\n adjustParentWindow();\n $('#feature_content').scrollTop(0);\n }\n mousedown = false;\n });\n}", "function w3_open() {\n document.getElementById(\"mySidebar\").style.width = \"100%\";\n document.getElementById(\"mySidebar\").style.display = \"block\";\n}", "function startResizingSidebar() {\n if (!sidebarCollapsed) {\n window.addEventListener('mousemove', resizeSidebar, false);\n window.addEventListener('mouseup', stopResizingSidebar, false);\n }\n }", "componentDidUpdate({ isSidePanelOpen }) {\n if (this.props.isSidePanelOpen !== isSidePanelOpen && this.component) {\n this.component.focus();\n }\n }", "update() {\n for( let sName in this.oIdMap ){\n this[sName].webContents.send('efm-window-update', this.oIdMap);\n }\n }", "function onWindowClick() {\n\n // If not hover the dropdown, close it\n if (!scope.isHover) {\n methods.onClick();\n\n // Required to refresh the DOM and see the change\n Methods.safeApply(scope);\n }\n }", "function unfocusWindows() {\n\t$(\".window:not(.windowunfocussed)\").addClass(\"windowunfocussed\");\n\tcloseModuleDrawer();\n}", "function windowKeydownListener (evt) {\n if (!tryDestroy()) {\n keydownHandler(function () {\n adjustCursorPosition()\n })(evt)\n }\n }", "function redraw_sidebar(){\n\n}", "handleWindowClosed(event) {\n const [id] = Array.from(this.windows).find(([id, window]) => {\n return window.window === event.sender;\n });\n\n if (id) {\n this.windows.delete(id);\n }\n }", "function onAppFocus () {\n mainView.send('application-focus');\n}", "function HB_Element_Sidebar() {\n\t \t$( '.hb-sidebar .icon-sidebar' ).click( function() {\n\t\t\t// Add class active\n\t\t\t$(this).closest( '.hb-sidebar' ).addClass( 'active' );\n\t\t\t$( 'html' ).addClass( 'no-scroll' );\n\t\t} );\n\n\t \t$( '.hb-sidebar .content-sidebar > .overlay' ).click( function() {\n\t\t\t// Remove class active\n\t\t\t$(this).closest( '.hb-sidebar' ).removeClass( 'active' );\n\t\t\t$( 'html' ).removeClass( 'no-scroll' );\n\t\t} );\n\t }", "_autoHideWindowCloseHandler() {\n const that = this,\n targetTabsWindow = that.$.autoHideWindow._tabsWindow,\n scrollElement = document.scrollingElement || document.documentElement,\n x = scrollElement.scrollLeft,\n y = scrollElement.scrollTop;\n\n targetTabsWindow._moveContent(targetTabsWindow._autoHideWindow.items[0], targetTabsWindow._autoHideWindow._tab);\n\n if (!that.$.autoHideWindow.opened) {\n targetTabsWindow.selectedIndex = null;\n\n if (document.activeElement !== targetTabsWindow.$.tabsElement) {\n targetTabsWindow.$.tabsElement.focus();\n window.scrollTo(x, y);\n }\n\n return;\n }\n\n if (!targetTabsWindow.allowToggle) {\n return;\n }\n\n if (targetTabsWindow.$.tabsElement.selectedIndex !== null) {\n targetTabsWindow.select(targetTabsWindow.$.tabsElement.selectedIndex);\n\n if (document.activeElement !== targetTabsWindow.$.tabsElement) {\n targetTabsWindow.$.tabsElement.focus();\n window.scrollTo(x, y);\n }\n }\n }", "function handleSideBar() { // e\n var breitSeite; // gets complete content-window-width\n if(sideBarToggle) {\n // jQuery(\"#sideBarControl\").css(\"cursor\", \"w-resize\");\n if (onBerlinDe && !fullWindow) breitSeite = 1036 - 5; // new layout\n else breitSeite = windowWidth() - 6; // 1339;//\n // breitSeite = windowWidth() - 5; // 1317;//\n jQuery(\"#sideBarControl\").css(\"left\", breitSeite);\n jQuery(\"#map\").css(\"width\", breitSeite);\n jQuery(\"#sideBar\").hide(\"fast\");\n jQuery(\"#helpFont\").hide(\"fast\");\n // jQuery(\"#kafooter\").css(\"opacity\", \"0.4\");\n jQuery(\"#kafooter\").css(\"background\", \"transparent\");\n jQuery(\"#kafooter\").css(\"top\", jQuery(\"#kafooter\").position().top - 20);\n // jQuery(\"#kafooter\").show();\n jQuery(\"#resizeButton\").attr(\"src\", \"http://www.kiezatlas.de/maps/embed/img/go-first.png\");\n if (!onBerlinDe) {\n jQuery(\"#resizeButton\").attr(\"height\", parseInt(jQuery(\"#kaheader\").css(\"height\"))-4);\n jQuery(\"#resizeButton\").attr(\"width\", parseInt(jQuery(\"#kaheader\").css(\"height\"))-4);\n } else {\n jQuery(\"#resizeButton\").attr(\"height\", 20);\n jQuery(\"#resizeButton\").attr(\"width\", 20);\n }\n jQuery(\"#resizeButton\").attr(\"title\", \"Seitenleiste einblenden\");\n sideBarToggle = false;\n } else {\n jQuery(\"#kafooter\").css(\"background\", \"#fff\");\n if (onBerlinDe && !fullWindow) breitSeite = 1036; // new layout\n else breitSeite = windowWidth() - 1; // 1339;//\n sideBarToggle = true;\n \t jQuery(\"#helpFont\").show(\"fast\");\n jQuery(\"#kafooter\").css(\"background\", \"white\");\n // jQuery(\"#kafooter\").css(\"bottom\", 3);\n jQuery(\"#kafooter\").css(\"top\", jQuery(\"#kafooter\").position().top + 20);\n //\n jQuery(\"#resizeButton\").attr(\"src\", \"http://www.kiezatlas.de/maps/embed/img/go-last.png\");\n if (!onBerlinDe) {\n jQuery(\"#resizeButton\").attr(\"height\", parseInt(jQuery(\"#kaheader\").css(\"height\"))-4);\n jQuery(\"#resizeButton\").attr(\"width\", parseInt(jQuery(\"#kaheader\").css(\"height\"))-4);\n } else {\n jQuery(\"#resizeButton\").attr(\"height\", 20);\n jQuery(\"#resizeButton\").attr(\"width\", 20);\n }\n jQuery(\"#resizeButton\").attr(\"title\", \"Seitenleiste ausblenden\");\n \t //\n handleResize(breitSeite);\n }\n // if (debug) log('[DEBUG] handleSidebar got: ' + e.type + ' at '+ posx+':'+posy + '');\n }", "function windowOpened(frame) {\n var iframe = frame.firstChild;\n\n if (displayedApp == iframe.dataset.frameOrigin) {\n frame.classList.add('active');\n windows.classList.add('active');\n\n if ('wrapper' in frame.dataset) {\n wrapperFooter.classList.add('visible');\n }\n\n // Take the focus away from the currently displayed app\n var app = runningApps[displayedApp];\n if (app && app.iframe)\n app.iframe.blur();\n\n if (!TrustedUIManager.isVisible() && !FtuLauncher.isFtuRunning()) {\n // Set homescreen visibility to false\n toggleHomescreen(false);\n }\n\n // Give the focus to the frame\n iframe.focus();\n }\n\n // Dispatch an 'appopen' event.\n var manifestURL = runningApps[displayedApp].manifestURL;\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent('appopen', true, false, {\n manifestURL: manifestURL,\n origin: displayedApp,\n isHomescreen: (manifestURL === homescreenManifestURL)\n });\n iframe.dispatchEvent(evt);\n }", "function openContent(spacerefval) {\n // if one already shown:\n if (isOpenContentArea) {\n hideSpace();\n spaceref = spacerefval;\n showSpace();\n } else {\n spaceref = spacerefval;\n openContentArea();\n }\n\n // remove class active (if any) from current list item\n var activeItem = spacesEl.querySelector('li.list__item--active');\n if (activeItem) {\n classie.remove(activeItem, 'list__item--active');\n }\n // list item gets class active\n classie.add(spacesEl.querySelector('li[data-space=\"' + spacerefval + '\"]'), 'list__item--active');\n\n // remove class selected (if any) from current space\n var activeSpaceArea = mallLevels[selectedLevel - 1].querySelector('svg > .map__space--selected');\n if (activeSpaceArea) {\n classie.remove(activeSpaceArea, 'map__space--selected');\n }\n // svg area gets selected\n classie.add(mallLevels[selectedLevel - 1].querySelector('svg > .map__space[data-space=\"' + spaceref + '\"]'), 'map__space--selected');\n }", "function _onWindowResize () {\n var newMenuCollapsed = sidebarService.shouldMenuBeCollapsed()\n var newMenuHeight = _calculateMenuHeight()\n if (newMenuCollapsed !== sidebarService.isMenuCollapsed() || scope.menuHeight !== newMenuHeight) {\n scope.$apply(function () {\n scope.menuHeight = newMenuHeight\n sidebarService.setMenuCollapsed(newMenuCollapsed)\n })\n }\n }", "function onMain() {\n //get a reference to the current Application.\n const app = fin.desktop.Application.getCurrent();\n\n //we will increment on child window creation.\n let winNumber = 0;\n\n //we get the current OpenFin version\n fin.desktop.System.getVersion(version => {\n const ofVersion = document.querySelector('#of-version');\n ofVersion.innerText = version;\n });\n\n //subscribing to the run-requested events will allow us to react to secondary launches, clicking on the icon once the Application is running for example.\n //for this app we will launch child windows everytime the user clicks on the desktop.\n app.addEventListener('run-requested', () => {\n const win = fin.desktop.Window.getCurrent();\n //Only launch new windows from the main window.\n if (win.name === app.uuid) {\n var cWin = new fin.desktop.Window({\n name: `childWindow_${++winNumber}`,\n url: location.href,\n defaultWidth: 320,\n defaultHeight: 320,\n defaultTop: 10,\n defaultLeft: 300,\n autoShow: true\n }, function () {\n console.log('Child Window created');\n }, function (error) {\n console.log(error);\n });\n }\n });\n}", "function set_sidebar() {\n\n\tset_sidebar_pos(\".main .outer .row01 .navi_outer\");\n\tif ($(window).width() > 767) {\n\t\tset_sidebar_pos(\".main .outer .row02 .countdown_div .countdown_outer\");\n\t}\n\t$(window).resize(function () {\n\t\tset_sidebar_pos(\".main .outer .row01 .navi_outer\");\n\t\tif ($(window).width() > 767) {\n\t\t\tset_sidebar_pos(\".main .outer .row02 .countdown_div .countdown_outer\");\n\t\t}\n\t});\n}", "function windowFocus(e) {\n\t\tvar classNames = document.body.className || '';\n\t\tif (WINDOW_TOP === WINDOW_SELF) {\n\t\t\tif (hasClass(classNames, 'thd-overlay__body--behind-mobile') && CURRENT_OVERLAY_TYPE === 'mobile' ) {\n\t\t\t\tremoveTo = setTimeout(function to() {\n\t\t\t\t\tif (IS_OPEN) {\n\t\t\t\t\t\tremoveClass(document.body, 'thd-overlay__body--behind-mobile');\n\t\t\t\t\t\tif (!!PARENT_WINDOW_POSITION) window.scrollTo(0, PARENT_WINDOW_POSITION);\n\t\t\t\t\t}\n\t\t\t\t}, 100);\n\n\t\t\t\topenTo = setTimeout(function to() {\n\t\t\t\t\tif (IS_OPEN) {\n\t\t\t\t\t\tPARENT_WINDOW_POSITION = window.pageYOffset;\n\t\t\t\t\t\taddClass(document.body, 'thd-overlay__body--behind-mobile');\n\t\t\t\t\t}\n\t\t\t\t}, 200);\n\t\t\t}\n\t\t} else {\n\t\t\t// so if the event is a focus event on an input field\n\t\t\tif (e.target !== WINDOW_SELF) {\n\t\t\t\tpostMessage(WINDOW_TOP, { action: 'cancel-refocus' }, '*');\n\t\t\t} else {\n\t\t\t\tpostMessage(WINDOW_TOP, { action: 'refocus' }, '*');\n\t\t\t}\n\t\t}\n\t}", "function w3_open() \n{\n \n if (document.getElementById(\"mySidebar\").style.display === 'block')\n {\n document.getElementById(\"mySidebar\").style.display = 'none';\n } \n else\n {\n\t\tdocument.getElementById(\"mySidebar\").style.display = 'block';\n }\n}", "_activeItemChanged(newValue,oldValue){if(newValue&&typeof newValue.id!==typeof void 0){this.set(\"queryParams.nodeId\",newValue.id);this.notifyPath(\"queryParams.nodeId\");// get fresh data if not published\nif(this.editorBuilder&&\"published\"!==this.editorBuilder.getContext()&&\"demo\"!==this.editorBuilder.getContext()){this.__timeStamp=\"?\"+Math.floor(Date.now()/1e3)}this.$.activecontent.generateRequest()}// we had something, now we don't. wipe out the content area of the theme\nelse if(oldValue&&!newValue){// fire event w/ nothing, this is because there is no content\nthis.dispatchEvent(new CustomEvent(\"json-outline-schema-active-body-changed\",{bubbles:!0,composed:!0,cancelable:!1,detail:null}))}}", "_move_to_previous_workspace() {\n\t\tthis.ws_count = WM.get_n_workspaces();\n this.active_ws_index = WM.get_active_workspace_index();\n this.focused_window = global.display.get_focus_window();\n if (this.focused_window && this.active_ws_index > 0) {\n \tthis.focused_window.change_workspace_by_index(this.active_ws_index - 1, false);\n \tthis.focused_window.activate(global.get_current_time());\n }\n\t}", "activate(id) {\n const widget = this._findWidgetByID(id);\n if (widget) {\n this._sideBar.currentTitle = widget.title;\n widget.activate();\n }\n }", "function handleFocusIndexChange (newIndex, oldIndex) {\n if (newIndex === oldIndex) return;\n if (!getElements().tabs[ newIndex ]) return;\n adjustOffset();\n redirectFocus();\n }", "function w3_open() {\n document.getElementById('portSidebar').style.display = 'block';\n}", "function opentab(num){\n\n\tvar wincur = currentWindow.id;\n\tvar wintab = found[num].windowId;\n\n\tif(wintab != wincur) {\n\n \t// switch tabs in these windows\t \n chrome.extension.getBackgroundPage().switchWindows(wintab,wincur,all,found[num].id);\n \n\n\t}\n\telse {\n\t chrome.tabs.update(Number(found[num].id), {selected: true});\n\t}\n\t\n\tif(localStorage['closechange'] !== undefined && localStorage['closechange'] == 1){\n\t window.close();\n\t}\n}", "function windowWatcher(subject, topic) {\n if (topic == \"domwindowopened\")\n runOnLoad(subject);\n }", "function toggleSidebar(){\n var opened = sidebar.classList.contains(\"opened\");\n opened ? sidebar.classList.remove(\"opened\") : sidebar.classList.add(\"opened\");\n config.sidebarOpened = !opened;\n saveConfigAfterDelay();\n }", "onWindowModeChange() {\n\t\tif (!this.element || !this._window) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.$powerUi.componentsManager.smallWindowMode) {\n\t\t\tthis.setSmallWindowModeSize();\n\t\t} else {\n\t\t\tthis.removeStyles();\n\t\t\tthis.element.style.width = this._currentWidth;\n\t\t\tthis.element.style.height = this._currentHeight;\n\t\t}\n\t}", "function w3_open() {\n\t if (mySidebar.style.display === 'block') {\n\t mySidebar.style.display = 'none';\n\t overlayBg.style.display = \"none\";\n\t } else {\n\t mySidebar.style.display = 'block';\n\t overlayBg.style.display = \"block\";\n\t }\n\t}", "function w3_open() {\n\t if (mySidebar.style.display === 'block') {\n\t mySidebar.style.display = 'none';\n\t overlayBg.style.display = \"none\";\n\t } else {\n\t mySidebar.style.display = 'block';\n\t overlayBg.style.display = \"block\";\n\t }\n\t}", "function _handleSidebarLink()\n {\n AppService.toggleSidebar('left');\n }", "w3_open() {\n var x = document.getElementById(\"mySidebar\");\n \n\n x.style.width = \"300px\";\n x.style.paddingTop = \"10%\";\n x.style.display = \"block\";\n \n }", "_move_to_next_workspace() {\n\t\tthis.ws_count = WM.get_n_workspaces();\n this.active_ws_index = WM.get_active_workspace_index();\n this.focused_window = global.display.get_focus_window();\n if (this.focused_window && this.active_ws_index < this.ws_count - 1) {\n \tthis.focused_window.change_workspace_by_index(this.active_ws_index + 1, false);\n \tthis.focused_window.activate(global.get_current_time());\n }\n\t}", "function closeHandler (e) {\n//console.log(\"Sidebar close: \"+e.type);\n\n // If running in sidebar, signal to background page we are going off\n if (isInSidebar) {\n\tif (backgroundPage != undefined) {\n\t backgroundPage.closeSidebar(myWindowId);\n\t}\n\telse {\n\t sendAddonMessage(\"Close:\"+myWindowId);\n\t}\n }\n}" ]
[ "0.57622784", "0.57622784", "0.5707427", "0.5674421", "0.5631589", "0.5615489", "0.5607207", "0.5587777", "0.5506651", "0.5482559", "0.54382694", "0.5414452", "0.5411722", "0.54102224", "0.53714263", "0.53623503", "0.5355416", "0.5355416", "0.5355416", "0.53215647", "0.5285492", "0.5260288", "0.52292013", "0.5214958", "0.5213049", "0.5205055", "0.51876616", "0.51866364", "0.51599276", "0.51599276", "0.51544875", "0.5133474", "0.51259476", "0.5123376", "0.5098118", "0.5093851", "0.50933576", "0.50933576", "0.50849694", "0.507473", "0.5053572", "0.50507635", "0.50446075", "0.5030431", "0.50181407", "0.50142884", "0.5012776", "0.5011316", "0.5008409", "0.50026715", "0.49966156", "0.49929887", "0.49925837", "0.49782568", "0.49756268", "0.49753353", "0.49696806", "0.49696806", "0.49696806", "0.49696806", "0.49696806", "0.49696806", "0.49677086", "0.49655482", "0.49595398", "0.4959209", "0.49515942", "0.49509323", "0.49491313", "0.4938691", "0.49355918", "0.4934502", "0.49319372", "0.4929519", "0.492875", "0.49161816", "0.49117446", "0.4901879", "0.4900118", "0.48962042", "0.48906916", "0.48883405", "0.48816922", "0.48815614", "0.48756397", "0.48739636", "0.48677772", "0.48676983", "0.48649603", "0.4859077", "0.48555103", "0.48531663", "0.48467216", "0.48437113", "0.48429236", "0.48429236", "0.48383614", "0.48338294", "0.48328972", "0.48321807" ]
0.70908797
0
Functions that process and display data from content script / getFormattedTitle: Extract page title from the page structure message sent by the content script, and return it embedded in an HTMLformatted string.
function getFormattedTitle (message) { return `<p>${message.title}</p>`; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPageTitle () {\n return title;\n }", "async pageTitle () {\n debug('getting pageTitle')\n return new Promise(resolve => {\n this.pageContext.evaluate(() => { return document.title },\n (err, result) => {\n if (err) {\n console.error(err)\n }\n resolve(result)\n })\n })\n }", "function getTitle() {\n try {\n var title = document.title;\n console.log(\"status pass : Current page title is \", title);\n return title;\n } catch (err) {\n console.log(err);\n }\n}", "function getTitle(text) {\r\n return text.match('<title>(.*)?</title>')[1];\r\n}", "function getTitle(text) {\n return text.match(\"<title>(.*)?</title>\")[1];\n}", "function titleText(title) {\n pageTitle.textContent = title;\n}", "function extractAllTitles() {\n insertHeader()\n\n rawArticle += setTitleSectionSeparator('TITLES')\n\n Array.from(document.querySelectorAll('h1,h2,h3,h4,h5,h6'))\n .map(x =>\n titleToSymbol(x.tagName, x.innerText, '----'))\n .filter(x => x.text.length > 0)\n .forEach(x => rawArticle += '|' + x.type + '|' + x.text + '\\n');\n\n // add separator after titles list\n rawArticle += '\\n\\n';\n console.log(rawArticle);\n\n injectPreInHTML(rawArticle, 'mediumpurple', 'pre-header')\n}", "function getPageTitle\n(\n)\n{\n var title = 'AirPnD - carpool for travelers going From and To AirPorts .';\n var editListingTitle = $.session.get('entityNameEditList') != null ?'Edit ' \n + $.session.get('entityNameEditList') : 'Edit';\n\n var pageTitles = \n { \n 'trustandsafety' : 'Trust and Safety',\n 'policy' : 'Privacy Policy',\n 'terms' : 'Terms of Service',\n 'ourlocation' : 'Our Locations',\n 'faq' : 'FAQ',\n 'howitworks' : 'How It Works',\n 'support' : 'Support',\n 'contactus' : 'Contact Us',\n 'insurance' : 'Insurance',\n 'blog' : 'Blog',\n 'postride' : 'Offer Ride',\n 'requestride' : 'Request Ride',\n 'bookride' : 'Book Ride',\n 'bookrider' : 'Book Rider',\n 'findride' : 'Search Driver',\n 'findrider' : 'Search Rider',\n 'activation' : 'Activation',\n 'reviews' : 'Reviews',\n 'profile' : 'My Profile',\n\t 'mybookings' : 'My Bookings',\n\t 'mylifts' : 'My Lifts'\n }\n var pageURL = window.location.pathname;\n var pageName = pageURL.substring((pageURL.lastIndexOf('/') + 1 )\n ,pageURL.length);\n var splittedPageName = (pageName.substring(0, \n pageName.lastIndexOf('.'))).toLowerCase();\n pageName = splittedPageName != \"\" ? splittedPageName : pageName; \n if(pageName != \"\")\n {\n title = pageTitles[pageName] || title;\n }\n document.title = title;\n}", "function get_page_title(){\n return jQuery(\"h1\").last().text();\n}", "function create_page_title(title)\n{\n return `\n <h1 class=\"page_title\">\n ${title}\n </h1>\n <hr>\n `;\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n}", "function setPageTitle() {\n const titleHTML = document.getElementById('title');\n titleHTML.innerText = pageTitle;\n}", "function getTitle()\n {\n return $(\"h1.thread-subject\").text().trim();\n }", "function getPageTitle(url) {\n return path.basename(url);\n}", "function getTitle(text) {\n return text.match('<title>(.*)?</title>')[1];\n }", "function parseData(data) {\n const { content, title } = data;\n let content_parsed = parseAndSplit(content);\n let title_parsed = parseAndSplit(title);\n let htmlstring = `<h1 class=\"pll-title\">${title_parsed}</h1><div>${content_parsed}</div>`;\n return htmlstring;\n }", "function setTitle() {\r\n var sHostName = window.location.href;\r\n var escChar = \"\\\\\";\r\n var sCache = /(\\/search?\\?q=cache:|\\/cache\\.aspx\\?q=|gigablast\\.com\\/get\\?q=|web\\.archive\\.org\\/web\\/)/i;\r\n\r\n if (sHostName.search(sCache) != -1) {\r\n // stop script execution\r\n return;\r\n }\r\n sHostName = window.location.hostname;\r\n\r\n var oTitle = document.title;\r\n var sFull = getDomainName(sHostName, false);\r\n var sText, sDomain = \"\", sTLD = \"\", sSub = \"\", pos = 0;\r\n if (sFull == getDomainName(sHostName, true)) {\r\n // no subdomains\r\n sDomain = sFull.slice(0, sFull.indexOf(\".\"));\r\n sTLD = sFull.slice(sFull.indexOf(\".\"));\r\n } else {\r\n var newHost = prepURL(sHostName);\r\n sTLD = getTLD(newHost);\r\n newHost = newHost.slice(0, newHost.length - sTLD.length);\r\n sDomain = newHost.slice(newHost.lastIndexOf(\".\") + 1);\r\n newHost = newHost.slice(0, newHost.lastIndexOf(\".\"));\r\n if (returnAllSubDoms) {\r\n var labels = getSubDomains(newHost);\r\n for (var i = 0; i < labels.length; i++) {\r\n sSub += labels[i] + (i + 1 < labels.length ? \".\" : \"\");\r\n }\r\n } else {\r\n sSub = getSubDomains(newHost);\r\n if (sSub.length > 0) sSub = sSub[sSub.length - 1];\r\n }\r\n }\r\n if (ignoreSubdomains) {\r\n sText = new RegExp(sDomain + escChar + sTLD, \"i\");\r\n } else {\r\n sText = new RegExp((sSub != \"\" ? sSub + escChar + \".\" : sSub) + sDomain + escChar + sTLD, \"i\");\r\n }\r\n\r\n if (!sText.test(oTitle)) {\r\n // if part of the name (second-level domain + tld) is already in the title ...\r\n if (oTitle.search(new RegExp(sDomain + escChar + sTLD, \"i\")) != -1) {\r\n // ... simply add the subdomain to it\r\n pos = oTitle.toLowerCase().indexOf(sDomain.toLowerCase());\r\n oTitle = oTitle.slice(0, pos) + sSub + \".\" + oTitle.slice(pos);\r\n } else {\r\n // if part of the name (second-level domain) is already in the title ...\r\n if (oTitle.search(new RegExp(sDomain, \"i\")) != -1) {\r\n // ... add subdomain and told to it\r\n var pos = oTitle.toLowerCase().indexOf(sDomain.toLowerCase());\r\n oTitle = oTitle.slice(0, pos) + (ignoreSubdomains ? \"\" : (sSub != \"\" ? sSub + \".\" : sSub)) + oTitle.slice(pos, pos + sDomain.length) + sTLD + oTitle.slice(pos + sDomain.length);\r\n } else {\r\n // add the complete hostname at the end\r\n if (ignoreSubdomains) {\r\n sFull = sDomain + sTLD;\r\n } else {\r\n sFull = (sSub != \"\" ? sSub + \".\" : sSub) + sDomain + sTLD;\r\n }\r\n oTitle += sDelimiter + sFull;\r\n }\r\n }\r\n document.title = oTitle;\r\n }\r\n}", "function setPageTitle() {\n const title = document.getElementById('title');\n title.innerText = pageTitle;\n}", "function setPageTitle() {\n const title = document.getElementById('title');\n title.innerText = pageTitle;\n}", "function getTitle(text) {\n\treturn text.match('<title>(.*)?</title>')[1];\n}", "function setPageTitle() {\n\n let h1 = document.getElementById('title');\n h1.innerText = pageTitle;\n}", "function dTitle(){return document.title;}", "function setPageTitle() {\n const titleElement = document.getElementById('title');\n titleElement.innerText = pageTitle;\n}", "function createTitlePages() {\n let titleInfo = [\n { num:'1', title:'General Provisions' },\n { num:'2', title:'Elections'},\n { num:'3', title:'Legislature'},\n { num:'4', title:'State Organization and Administration, Generally'},\n { num:'5', title:'State Financial Administration'},\n { num:'6', title:'County Organization and Administration'},\n { num:'7', title:'Public Officers and Employees'},\n { num:'8', title:'Public Proceedings and Records'},\n { num:'9', title:'Public Property, Purchasing and Contracting'},\n { num:'10', title:'Public Safety and Internal Security'},\n { num:'11', title:'Agriculture and Animals'},\n { num:'12', title:'Conservation and Resources'},\n { num:'13', title:'Planning and Economic Development'},\n { num:'14', title:'Taxation'},\n { num:'15', title:'Transportation and Utilities'},\n { num:'16', title:'Intoxicating Liquor'},\n { num:'17', title:'Motor and Other Vehicles'},\n { num:'18', title:'Education'},\n { num:'19', title:'Health'},\n { num:'20', title:'Social Services'},\n { num:'21', title:'Labor and Industrial Relations'},\n { num:'22', title:'Banks and Financial Institutions'},\n { num:'23', title:'Corporations and Partnerships'},\n { num:'23a', title:'Other Business Entities'},\n { num:'24', title:'Insurance'},\n { num:'25', title:'Professions and Occupations'},\n { num:'25a', title:'General Business Provisions'},\n { num:'26', title:'Trade Regulation and Practice'},\n { num:'27', title:'Uniform Commercial Code'},\n { num:'28', title:'Property'},\n { num:'29', title:'Decedents\\' Estates'},\n { num:'30', title:'Guardians and Trustees'},\n { num:'30a', title:'Uniform Probate Code'},\n { num:'31', title:'Family'},\n { num:'32', title:'Courts and Court Officers'},\n { num:'33', title:'Evidence'},\n { num:'34', title:'Pleadings and Procedure'},\n { num:'35', title:'Appeal and Error'},\n { num:'36', title:'Civil Remedies and Defenses and Special Proceedings'},\n { num:'37', title:'Hawaii Penal Code'},\n { num:'38', title:'Procedural and Supplementary Provisions'}\n ];\n\n let re = new RegExp(/^([0-9]+)/i);\n\n let allPromises = [];\n\n //loop thru titles\n for (let i=0; i<titleInfo.length; i++) {\n\n let division = '';\n let volume = '';\n\n let r = titleInfo[i].num.match(re);\n let titleNumOnly = parseInt(r[1]);\n \n if (titleNumOnly < 22) division = '1';\n else if (titleNumOnly < 28) division = '2';\n else if (titleNumOnly < 32) division = '3';\n else if (titleNumOnly < 37) division = '4';\n else division = '5';\n\n if (titleNumOnly < 6) volume = '1';\n else if (titleNumOnly < 10) volume = '2';\n else if (titleNumOnly < 13) volume = '3';\n else if (titleNumOnly < 15) volume = '4';\n else if (titleNumOnly < 19) volume = '5';\n else if (titleNumOnly < 20) volume = '6';\n else if (titleNumOnly < 22) volume = '7';\n else if (titleNumOnly < 24) volume = '8';\n else if (titleNumOnly < 25) volume = '9';\n else if (titleNumOnly < 26) volume = '10';\n else if (titleNumOnly < 27) volume = '11';\n else if (titleNumOnly < 32) volume = '12';\n else if (titleNumOnly < 37) volume = '13';\n else volume = '14';\n\n // Create meta\n let meta = {\n hrs_structure: {\n division: division,\n volume: volume,\n title: titleInfo[i].num,\n chapter: '',\n section: ''\n },\n type: 'title',\n menu: {\n hrs: {\n identifier: `title${titleInfo[i].num}`,\n name: `Title ${titleInfo[i].num}. ${titleInfo[i].title}`\n }\n },\n weight: (5 * (i + 1)),\n title: titleInfo[i].title,\n full_title: `Title ${titleInfo[i].num}. ${titleInfo[i].title}`\n };\n let allMeta = Object.assign({}, meta, addCustomMetaAllFiles);\n\n //write file\n let path = Path.join(destFileDir, `title-${titleInfo[i].num}`, '_index.md');\n allPromises.push(writeFile(path, \"---\\n\" + yaml.safeDump(allMeta) + \"---\\n\"));\n \n } \n\n return Promise.all(allPromises).then((val)=>val);\n}", "function determine_page_title(instrument, proposal) {\n // Determine if the URL is 'archive' or 'unlooked'\n var url = document.URL;\n var url_split = url.split('/');\n var url_title = url_split[url_split.length - 2];\n if (url_title == 'archive') {\n final_title = 'Archived ' + instrument + ' Images: Proposal ' + proposal\n } else if (url_title == 'unlooked') {\n final_title = 'Unlooked ' + instrument + ' Images';\n }\n\n // Update the titles accordingly\n document.getElementById('title').innerHTML = final_title;\n if (document.title != final_title) {\n document.title = final_title;\n }\n}", "async getTitlePage() {\n const pageTitle = await this.page.title();\n console.log('\\t HomePage Title =', pageTitle);\n assert.strictEqual(pageTitle, \"Home loan borrowing power calculator | ANZ\");\n console.log('\\t Home Page title validation successful \\t \\n \\t Browser is open \\t');\n }", "function extractTextFromMainBody() {\n //\n // RAW PART\n //\n rawArticle = setTitleSectionSeparator('MAIN CONTENT [ RAW ]')\n\n // html texts in page\n let htmlTexts = Array.from(document.querySelectorAll('h1,h2,h3,h4,h5,h6,p'))\n .map(x => {\n return {\n type: x.tagName,\n text: x.innerText.trim(),\n }\n })\n .filter(x => x.text.length > 0)\n .map(x => {\n // detect titles and set title with markdown style (ex: h1=#, h2=##, h3=###, ...)\n let t = x.type == 'P' ? x.text : '\\n' + titleToSymbol(x.type, x.text, '#').text\n return t\n })\n\n //\n // print text as full lines\n //\n rawArticle += htmlTexts\n .join('\\n')\n .replace(/(.+?[.!?)\\]}|][\\s\\r\\n])|(.+[\\s\\r\\n])/gmi, x => x + '\\n')\n rawArticle += '\\n\\n';\n console.log(rawArticle);\n\n injectPreInHTML(rawArticle, 'dodgerblue', 'pre-content-raw')\n\n\n\n //\n // SPLITTED PART\n //\n rawArticle = setTitleSectionSeparator('MAIN CONTENT [ SPLIT ]')\n\n //\n // print text as splitted lines according to \"ponctuation\" or \"special words\"\n //\n /**\n * PRONOUNS\n * ARTICLES\n * COORDINATING_CONJUNCTIONS\n * POSSESIVE\n * PREPOSITIONS\n * QUESTIONNING\n */\n rawArticle += htmlTexts\n .join('\\n')\n .replace(/(.+?[,:.!?)\\]}|][\\s\\r\\n])|(.+[\\s\\r\\n])/gmi, x => x + '\\n')\n .replace(new RegExp(`(\\\\b(${PRONOUNS[language]})\\\\b.+?[,.!?:)\\\\]}|])`, 'gmi'), x => '\\n' + x)\n .replace(new RegExp(`(\\\\b(${ARTICLES[language]})\\\\b.+?[,.!?:)\\\\]}|])`, 'gmi'), x => '\\n' + x)\n .replace(new RegExp(`(\\\\b(${COORDINATING_CONJUNCTIONS[language]})\\\\b.+?[,.!?:)\\\\]}|])`, 'gmi'), x => '\\n' + x)\n .replace(new RegExp(`(\\\\b(${POSSESIVE[language]})\\\\b.+?[,.!?:)\\\\]}|])`, 'gmi'), x => '\\n' + x)\n .replace(new RegExp(`(\\\\b(${PREPOSITIONS[language]})\\\\b.+?[,.!?:)\\\\]}|])`, 'gmi'), x => '\\n' + x)\n .replace(new RegExp(`(\\\\b(${QUESTIONNING[language]})\\\\b.+?[.!?:)\\\\]}|])`, 'gmi'), x => '\\n' + x)\n\n // always display results in console\n rawArticle += '\\n\\n';\n console.log(rawArticle);\n\n injectPreInHTML(rawArticle, 'lightpink', 'pre-content-split')\n}", "function setPageTitle() {\nconst title = document.querySelector('#title');\n\ntitle.innerText = pageTitle;\n\n}", "function get_site_name(page_title){\r\n\tif (page_title.indexOf('http://www.')!=-1){\r\n\t\tvar site_start = page_title.indexOf('http://www.')+11;\r\n\t} else {\r\n\t\tvar site_start = page_title.indexOf('http://')+7;\r\n\t}\r\n\tvar site_name= page_title.substring(site_start);\r\n\r\n\treturn site_name;\r\n}", "function getRealTitle (text) {\r\n // don't try to parse URL's\r\n if (urlParser.isURL(text)) {\r\n return text\r\n }\r\n\r\n var possibleCharacters = ['|', ':', ' - ', ' — ']\r\n\r\n for (var i = 0; i < possibleCharacters.length; i++) {\r\n var char = possibleCharacters[i]\r\n // match url's of pattern: title | website name\r\n var titleChunks = text.split(char)\r\n\r\n if (titleChunks.length >= 2) {\r\n var titleChunksTrimmed = titleChunks.map(c => c.trim())\r\n if (titleChunksTrimmed[titleChunksTrimmed.length - 1].length < 5 || titleChunksTrimmed[titleChunksTrimmed.length - 1].length / text.length <= 0.3) {\r\n return titleChunks.slice(0, -1).join(char)\r\n }\r\n }\r\n }\r\n\r\n // fallback to the regular title\r\n\r\n return text\r\n}", "getTitle() {\n let title = ''\n let pageConfig = Config.pages[this.page] || {}\n\n if(this.isBlogPost) {\n title = `${Config.baseUrl}: ${this.post.frontmatter.title}`\n }\n else {\n title = pageConfig.title || Config.title\n }\n \n return title\n }", "function getTitle(text)\r\n{\r\n var line_end = text.indexOf('\\n');\r\n\r\n if(line_end > 0 && line_end < 101)\r\n {\r\n return text.substring(0,line_end - 1);\r\n }\r\n\r\n if(text.length() > 100)\r\n {\r\n return text.substring(0,100);\r\n }\r\n\r\n return text;\r\n}", "getTitles() {\n\t\tconst\n\t\t\tlinks = this.props.config.layout_config.nav.links,\n\t\t\troute = this.props.router.route,\n\t\t\t{ title, subTitle, subTitleText } = links.filter(link => link.href === route)[0],\n\t\t\tsTitle = subTitle ? subTitleText : null\n\t\treturn { title, subTitle: sTitle }\n\t}", "function setPageTitle() {\n const page = document.getElementById('title');\n page.innerHTML = pageTitle;\n}", "updateTitle(){ \n let title = '';\n const { head, instance } = this.entry;\n\n if (head.hasOwnProperty('title')){\n let prop = head.title;\n\n title = head.title\n if (typeof prop === 'function'){\n title = head.title.apply(instance);\n }\n }\n\n if (title && title.length > 0){\n document.title = title;\n }\n }", "function buildPage() {\n // Set the title with the location name at the first\n // Gets the title element so it can be worked with\n let pageTitle = document.querySelector('#page-title');\n // Create a text node containing the full name\n let fullNameNode = document.createTextNode(sessStore.getItem('fullName'));\n // inserts the fullName value before any other content that might exist\n pageTitle.insertBefore(fullNameNode, pageTitle.childNodes[0]);\n // When this is done the title should look like this:\n // Soda Springs, Idaho | mybetterweather.com\n }", "async function getTitle(url) {\n try {\n const page = await axios.get(url);\n const $ = cheerio.load(page.data);\n const header = $(\"title\").text();\n return header;\n } catch (error) {\n return null;\n }\n}", "function getTitle()\n {\n\n var title = d(Posting.TITLE);\n var address = d(Posting.URL);\n\n if (title) {\n var sTitle = title.value;\n if (address && address.value.length>0) {\n sTitle = \"<a target=\\\"new\\\" href=\\\"\"\n +address.value\n +\"\\\">\"\n +sTitle\n +\"</a>\";\n }\n }\n\n return sTitle;\n }", "function getPrimeMediaTitle() {\n\tconsole.log(\"waiting to load\");\n\tsetTimeout(() => {chrome.tabs.query({active: true}, function(tabs){\n\t\tvar tab = tabs[0];\n\t\tchrome.tabs.executeScript(tab.id, {\n\t\t\tcode: 'var title = document.querySelector(\"h1[data-automation-id]\").textContent; var type = document.querySelector(\".Mr2JWZ\"); title+\"(#type)\"+type'\n\t\t}, function(results){ sendData(results.toString(), \"PrimeVideo\");});\n\t});}, 2000);\n}", "function getHotstarTitle() {\n\tsetTimeout(() => {chrome.tabs.query({active: true}, function(tabs){\n\t\tvar tab = tabs[0];\n\t\tchrome.tabs.executeScript(tab.id, {\n\t\t\tcode: 'document.getElementsByClass(\"meta-wrap\").querySelector(\"h1\").textContent'\n\t\t}, function(results){ sendData(results.toString(), \"Hotstar\");});\n\t});}, 2000);\n}", "function getPanelMetadataTitle()\n{ \n var elems = document.getElementsByTagName(\"Work\");\n\n if(elems != null)\n {\n for(var j = 0; j < elems.length; j++)\n {\n for(var i = 0; i < elems[j].childNodes.length; i++)\n {\n if(elems[j].childNodes[i] == '[object Element]')\n {\n if((elems[j].childNodes[i].nodeName == \"dc:title\") && (elems[j].childNodes[i].firstChild != null))\n return elems[j].childNodes[i].firstChild.nodeValue;\n }\n }\n }\n }\n \n return null;\n}", "function parseSimplePageHtml({\n title, mainText, link, linkText,\n}) {\n let html = simplePage;\n\n html = html.replace(/###TITLE###/g, title);\n html = html.replace(/###MAINTEXT###/g, mainText);\n html = html.replace(/###LINK###/g, link);\n html = html.replace(/###LINKTEXT###/g, linkText);\n\n return html;\n}", "function getTitle(markdown, filename) {\n // Try to extract a YAML frontmatter title using highly inefficient\n // string matching. Performance isn't too problematic as this is called\n // rarely, and I think it's still O(n), just with a large constant\n // TODO: can I use obsidian.parseFrontMatter* instead of doing it manually?\n markdown = markdown.trim();\n if (markdown.startsWith('---')) {\n const trailing = markdown.substring(3);\n const frontmatter = trailing.substring(0, trailing.indexOf('---')).trim();\n const lines = frontmatter.split('\\n').map(x => x.trim());\n for (const line of lines) {\n if (line.startsWith('title:')) {\n // Assume the title goes to the end of the line, and that\n // quotes are not intended to be in the filename\n // This certainly won't be YAML spec compliant\n let title = line.substring('title:'.length).trim();\n title.replace(/\"/g, '');\n return title;\n }\n }\n }\n // Fall back on file name\n return fileBaseName(filename);\n}", "function getTitle () {\n const titleClass = document.getElementsByTagName(\"h2\")[0];\n let title = titleClass.innerText;\n return title;\n}", "function processTitle(slide) {\n var fSlide = '\\n';\n fSlide = '\\t<div class=\"slide-'+slide['type']+'\">\\n';\n fSlide += '\\t\\t<hgroup>\\n';\n fSlide += '\\t\\t\\t<h1>' + slide['heading']+'</h1>\\n';\n fSlide += '\\t\\t\\t<h3></h3>\\n'; // could be for email\n fSlide += '<small>'+processItems(slide['items']) +'</small>';\n fSlide += '\\t\\t</hgroup>\\n';\n fSlide += '<small> present:<input type=\"checkbox\" id=\"print\" onclick=\"switchSlideBoxStyle()\"></small>'\n fSlide += '</div><!-- end .slide-title-->\\n'\n fSlide += '</section><!-- end .slide-box -->\\n'\n return fSlide\n }", "function getTitle(data) {\n\t\tvar title = \"\";\n\t\tif(data.title){\n\t\t\ttitle = data.title;\n\t\t}else if( data.username ){\n\t\t\ttitle = data.username;\n\t\t}else if( data.message_details ){\n\t\t\ttitle = data.message_details;\n\t\t}else if( data.details ){\n\t\t\ttitle = data.details;\n\t\t}else if( data.fullname ){\n\t\t\ttitle = data.fullname;\n\t\t}\n\t\t\n\t\treturn title;\n\t}", "function updateTitle(page) {\n $('#page-title').html(titles[page]);\n}", "function gotContent(data){\r\n let page = data.query.pages; \r\n //console.log(page);\r\n let pageID = Object.keys(data.query.pages)[0];\r\n console.log(pageID);\r\n\r\n let content = page[pageID].revisions[0][\"*\"];\r\n startOfContentChar = \"'''\"\r\n startCharIndex = content.search(startOfContentChar) + 3;\r\n console.log(startCharIndex);\r\n endCharIndex = startCharIndex + 200 + 1;\r\n description = content.substring(startCharIndex, endCharIndex) + '...'\r\n document.getElementById('contentDisplay').innerHTML =description;\r\n //console.log(content); \r\n // access summary brute force \r\n //let summary = page[pageID].revisions[0][\"*\"][10];\r\n //console.log('SUMMARY' + summary);\r\n }", "function getTitle($,selector){\n let title = $(selector).text();\n if (title == null || title == ''){\n throw new Error(\"GetTitle: Selector or webpage error\");\n return null;\n }else{\n //Remove invalid symbols for file name\n title = removeIllegalChar(title);\n return title;\n }\n}", "function ChangePageTitle(message) {\n if (message != '') {\n window.document.title = message.trim();\n }\n}", "function pageTitle(){\n\t\tif ( $(window).width() >= 1000 && pageTitleResized == false ) {\n\t\t $('#ins-page-title').each(function() {\n\t\t \tvar marginTop = 55;\n\t\t \tvar extra = 0;\n\t\t \tvar titleInner = $(this).find( '.ins-page-title-inner' );\n\t\t \tvar titleInnerHeight = titleInner.height();\n\t\t \t\n\t\t \tif( $('#header').length ) {\n\t\t \t\textra = 80 / 2;\n\t\t \t}\n\t\t \tif( $('#topbar').length ) {\n\t\t \t\textra += $('#topbar').height() / 2;\n\t\t \t}\n\t\t \tif( $('.bottom-nav-wrapper').length ) {\n\t\t \t\textra += $('.bottom-nav-wrapper').height() / 2;\n\t\t \t}\n\n\t\t \tmarginTop = extra;\n\t\t $(this).find( '.ins-page-title-inner' ).css( 'margin-top', marginTop );\n\t\t \n\t\t pageTitleResized = true;\n\t\t });\n\t\t}\n\t}", "function getMetaForTitle(html) {\n var result;\n\n result = getMeta_og(html, 'title');\n if (result.trim().length != 0) {\n return result;\n }\n\n result = getTitleOldWay(html);\n if (result.trim().length != 0) {\n return result;\n }\n\n result = getMeta_og(html, 'site_name');\n if (result.trim().length != 0) {\n return result;\n }\n return '';\n}", "function getPageTitle(wikiURL) {\n return wikiURL.split(\"/\").pop();\n }", "function PageTitle(_ref) {\n var title = _ref.title,\n subTitle = _ref.subTitle;\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n className: \"page-title-wrapper\"\n }, title && /*#__PURE__*/_react.default.createElement(\"label\", null, title), subTitle && /*#__PURE__*/_react.default.createElement(\"label\", null, \" - \", subTitle));\n}", "title (body) {\n const titleMatch = body.substr(body.indexOf('#')).match(/^#\\s+(.*)/)\n return titleMatch ? titleMatch[1] : ''\n }", "getFormattedTitle(){\n //.....this key word used to apply conversion logic to code (uppercase letter)\n return this.info.title.toUpperCase()\n }", "function setPageTitle() {\n document.getElementById('page-title').innerText = parameterUsername;\n document.title = parameterUsername + ' - User Page';\n}", "function refreshPageTitle() {\n if (!PlaneCountInTitle && !MessageRateInTitle) {\n document.title = PageName;\n return;\n }\n\n var aircraftCount = \"\";\n var rate = \"\";\n\n if (PlaneCountInTitle) {\n aircraftCount += TrackedAircraft;\n }\n\n if (MessageRateInTitle && MessageRate) {\n rate += ' - ' + MessageRate.toFixed(1) + ' msg/sec';\n }\n\n document.title = '(' + aircraftCount + ') ' + PageName + rate;\n}", "function getTitleOldWay(html) {\n var result = html.match(Regex.title);\n if (\n bvalid.isArray(result) &&\n bvalid.isString(result[1]) &&\n result[1].trim().length != 0\n ) {\n return result[1].trim();\n }\n return '';\n}", "function formatPageName() {\n customValues.pageName = customValues.sectionLevel1;\n customValues.hierarchy1 = customValues.pageName;\n if (subSections.length > 0) {\n customValues.parentSection = customValues.parentSection + \":\" + subSections[0];\n customValues.sectionLevel1 = customValues.sectionLevel1 + \":\" + subSections[0];\n\n for (var j = 0; j < subSections.length; j++) {\n customValues.pageName = customValues.pageName + \":\" + subSections[j];\n customValues.hierarchy1 = customValues.hierarchy1 + \"|\" + customValues.pageName;\n if (j + 1 == subSections.length) {\n customValues.pageName = pageTitleExists(customValues.pageName);\n customValues.hierarchy1 = customValues.hierarchy1 + \"|\" + customValues.pageName;\n if (j >= 1) {\n customValues.sectionLevel2 = customValues.sectionLevel1 + \":\" + subSections[1];\n if (siteData.bcLevel2 != \"\") {\n customValues.pageNameBreadCrumbs = customValues.pageNameBreadCrumbs + \":\" + siteData.bcLevel2;\n }\n if (j >= 2) {\n if (siteData.bcLevel3 != \"\") {\n customValues.pageNameBreadCrumbs = customValues.pageNameBreadCrumbs + \":\" + siteData.bcLevel3;\n }\n customValues.sectionLevel3 = customValues.sectionLevel2 + \":\" + subSections[2];\n if (j >= 3) {\n customValues.sectionLevel4 = customValues.sectionLevel3 + \":\" + subSections[3];\n if (j >= 4) {\n customValues.sectionLevel5 = customValues.sectionLevel4 + \":\" + subSections[4];\n }\n }\n }\n }\n }\n }\n } else {\n customValues.pageName = pageTitleExists(customValues.pageName);\n customValues.hierarchy1 = customValues.pageName;\n }\n }", "async getPageTitle() {\r\n return await browser.getTitle();\r\n }", "function buildPageTitle(a) {\n var pageTitleElement = document.getElementsByClassName(a)\n pageTitleElement[0].getElementsByTagName('h1')[0].setAttribute('class', a + '__title');\n pageTitleElement[0].getElementsByTagName('p')[0].setAttribute('class', a + '__sub-title');\n\n}", "function setPageTitle() {\n // First, get a reference to the DOM element\n let titleElement = document.querySelector(\"#page-title > span.name\");\n // Now set the inner text property so the content changes\n titleElement.innerText = name;\n}", "function getPanelDocumentTitle()\n{ \n return getElementTitle(\"title1\");\n}", "function getTitle() {\n return document.getElementById( \"eow-title\" ).title;\n}", "function setPageTitle() {\n document.getElementById('page-title').innerText = parameterUsername;\n document.title = parameterUsername + ' - User Page';\n}", "getFormattedTitle() {\n return this.info.title.toUpperCase();\n }", "function my_title_format (window) {\n return '{'+get_current_profile()+'} '+window.buffers.current.description;\n}", "function getPageTitle($location) {\n var name = $location.path().split(\"/\").slice(-1)[0].split(\".\")[0];\n var words = name.split('_');\n var title = '';\n for (var i = 0; i < words.length; i++) {\n title += ' ' + words[i].charAt(0).toUpperCase() + words[i].substr(1);\n }\n return title.substr(1);\n}", "function matter_title(t, m) {\n t = t.replace(/\\s\\s+/g, ' '); // replaces multiple spaces with single spaces\n t = t.replace(/[ \\t]+$/g, ''); // removes trailing spaces from title\n var title = escapeHtml(t) +'-'+ m;\n return title;\n }", "function getTitleNode()\r\n{\r\n\t// Amazon has a number of different page layouts that put the title in different tags\r\n // This is an array of xpaths that can contain an item's title\r\n var titlePaths = [\r\n \t\"//span[@id='btAsinTitle']/node()[not(self::span)]\",\r\n \"//h1[@id='title']/node()[not(self::span)]\"\r\n ];\r\n \r\n for(var i in titlePaths) {\r\n \tvar nodes = document.evaluate(titlePaths[ i ], document, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);\r\n\r\n\t\tvar thisNode = nodes.iterateNext(); \r\n\t\tvar titleNode;\r\n\t\t// Get the last node\r\n\t\twhile(thisNode){\r\n\t\t\tif(DEBUG) GM_log( thisNode.textContent );\r\n\t\t\ttitleNode = thisNode;\r\n \r\n if(titleNode) {\r\n \tbreak;\r\n \t}\r\n \r\n\t\t\tthisNode = nodes.iterateNext();\r\n\t\t}\r\n }\r\n\r\n\tif (titleNode == null || !nodes) {\r\n GM_log(\"can't find title node\");\r\n\t\treturn null;\r\n\t} else {\r\n if(DEBUG) GM_log(\"Found title node: \" + titleNode.textContent);\r\n\t}\r\n\treturn titleNode;\r\n}", "function preloadTitle(params){\n return new Promise((resolve, reject) => {\n $.get(params[\"urls\"][\"header\"])\n .done(\n (data) => {\n var html = sanitizeHTML(data);\n var result = $(html).find(\"td[nowrap=nowrap]\").html();\n\n if (result != undefined){\n resolve($.extend({}, params, {\"title\": result}));\n } else {\n reject(new Error(\"No title exists.\"))\n }\n }\n );\n });\n}", "get orderSuccessPageHeading() { return $('body > div.wrapper > div > div.main-container.col1-layout > div > div > div.page-title'); }", "get title() {\n if (this.isBrowserContext) {\n return document.title;\n }\n return this.mTitle;\n }", "function setPageTitle() {\n const pageTitle = document.getElementById('page-title');\n pageTitle.querySelector('.name').innerText = name;\n}", "function initTitle() {\n if (Vue.prototype.hasOwnProperty('$createTitle')) {\n return;\n }\n\n /**\n * Generates the document title out of the given VueComponent and parameters\n *\n * @param {String} [identifier = null]\n * @param {...String} additionalParams\n * @returns {string}\n */\n Vue.prototype.$createTitle = function createTitle(identifier = null, ...additionalParams) {\n const baseTitle = this.$tc('global.sw-admin-menu.textShopwareAdmin');\n const pageTitle = this.$tc(this.$route.meta.$module.title);\n\n const params = [baseTitle, pageTitle, identifier, ...additionalParams].filter((item) => {\n return item !== null && item.trim() !== '';\n });\n\n return params.reverse().join(' | ');\n };\n }", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n \n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n \n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function getStandardTitle ()\n// ---------------------------------------------------------------------\n{\n // Build the title for the offline web client\n if (g_aSettings.offline)\n {\n return g_aSettings.productData.productName + \" \"+getString(\"axw_html_publishing_window_title\");\n }\n \n // If we have no product data yet (because the aserver is not available yet),\n // just show the current window title.\n if (!g_aSettings.productData)\n {\n return document.title;\n }\n var sTitle = g_aSettings.productData.productName + \" \";\n sTitle+= \"Web Client\" + (g_aSettings.user && g_aSettings.user.loginName ? \" (\"+g_aSettings.user.loginName+\")\" : \"\");\n return sTitle;\n}", "get pageHeader() { return $('h1') }", "function gotContent(data){\r\n let page = data.query.pages; \r\n //console.log(page);\r\n let pageID = Object.keys(data.query.pages)[0];\r\n console.log(pageID);\r\n\r\n let followUpContent = page[pageID].revisions[0][\"*\"];\r\n startOfContentChar = \"'''\"\r\n startCharIndex = followUpContent.search(startOfContentChar) + 3;\r\n console.log(startCharIndex);\r\n endCharIndex = startCharIndex + 200 + 1;\r\n secondDescription = followUpContent.substring(startCharIndex, endCharIndex) + '...'\r\n document.getElementById('secondContentDisplay').innerHTML =secondDescription; \r\n }", "get title() {\n this._logger.trace(\"[getter] title\");\n\n return this._title;\n }", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length === 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "function rewriteTitle() {\n\tif( typeof( window.SKIP_TITLE_REWRITE ) != 'undefined' && window.SKIP_TITLE_REWRITE ) {\n\t\treturn;\n\t}\n\n\tif( $('#title-meta').length == 0 ) {\n\t\treturn;\n\t}\n\n\tvar newTitle = $('#title-meta').html();\n\tif( skin == \"oasis\" ) {\n\t\t$('header.WikiaPageHeader > h1').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('header.WikiaPageHeader > h1').attr('style','text-align:' + $('#title-align').html() + ';');\n\t} else {\n\t\t$('.firstHeading').html('<div id=\"title-meta\" style=\"display: inline;\">' + newTitle + '</div>');\n\t\t$('.firstHeading').attr('style','text-align:' + $('#title-align').html() + ';');\n\t}\n}", "updatePageTitle (state, title) {\n state.pageTitle = title\n }", "function inferTitle(frontmatter, strippedContent) {\n if (frontmatter.home) {\n return 'Home';\n }\n if (frontmatter.title) {\n return frontmatter.title\n }\n const match = strippedContent.trim().match(/^#\\s+(.*)/);\n if (match) {\n return match[1];\n }\n}", "function titlePage(){\n\t\t$('.title-page').html('<h2 class=\"text-center\">'+objet_concours[last_concours]+'</h2>');\n\t}", "function gotTitle(title, sender, sendResponse) {\n if(title.highway == 'wikititle') {\n WikiTitle = title.title;\n // alert('Title received: ' + title.title);\n search(WikiTitle);\n }\n}", "function get_title(overlay) {\n title = overlay.getElementsByClassName(\"bob-title\");\n if (title.length > 0) {\n return title[0].innerHTML;\n }\n\n return null;\n}", "videoTitleFix(video) {\n var parser = new DOMParser();\n let finalResult = parser.parseFromString(video.snippet.title, \"text/html\");\n return finalResult.body.innerText;\n }", "function title() {\n var elm\n \n elm = d.find(\"title\");\n elm.innerText = g.title;\n \n elm = d.tags(\"title\");\n elm[0].innerText = g.title;\n }" ]
[ "0.6802629", "0.67995685", "0.65375334", "0.6139926", "0.61212903", "0.6101654", "0.60911864", "0.6081117", "0.60763854", "0.606356", "0.6049944", "0.6049944", "0.6049944", "0.6049944", "0.6049944", "0.6049944", "0.6049944", "0.60484916", "0.6025819", "0.6016694", "0.60094", "0.60089046", "0.59923357", "0.59919715", "0.59854925", "0.59854925", "0.5977672", "0.5936626", "0.58978444", "0.5893422", "0.58926105", "0.5890011", "0.5875851", "0.5873071", "0.58690196", "0.5834618", "0.58328646", "0.5819216", "0.5818812", "0.58185273", "0.5809573", "0.58028376", "0.57982177", "0.5792747", "0.57917273", "0.57788044", "0.57711774", "0.5753978", "0.5747905", "0.57467514", "0.5744832", "0.57433105", "0.57257634", "0.5716725", "0.5712252", "0.5673006", "0.566538", "0.5662786", "0.56558657", "0.564056", "0.5609328", "0.5599553", "0.55995345", "0.55955803", "0.5580942", "0.5579031", "0.5571929", "0.5567934", "0.5555404", "0.5554476", "0.55539733", "0.55527437", "0.55505997", "0.5549524", "0.5548591", "0.5541801", "0.55374587", "0.55348104", "0.55340266", "0.55284953", "0.55239403", "0.55213743", "0.5519634", "0.55180204", "0.5512425", "0.5506266", "0.54961985", "0.5494909", "0.54948235", "0.54937977", "0.54937977", "0.54937977", "0.54937977", "0.54924715", "0.54870504", "0.5483759", "0.54817957", "0.5475247", "0.546158", "0.5461237" ]
0.6070131
9
Format the heading info as HTML, with the appropriate class names for the grid layout.
function getClassNames (name) { switch (name) { case 'H1': return ['h1-name', 'h1-text']; case 'H2': return ['h2-name', 'h2-text']; case 'H3': return ['h3-name', 'h3-text']; case 'H4': return ['h4-name', 'h4-text']; case 'H5': return ['h5-name', 'h5-text']; case 'H6': return ['h6-name', 'h6-text']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formatHeadline(text) {\n const categories = addCategory();\n const timeStamp = formatTimeAndDate(countryCode);\n const header = `<h4><a id=\"${timeStamp[1]}\" name=\"${timeStamp[1]}\"></a>${text} - ${timeStamp[0]} ${categories}</h4>`;\n return header;\n}", "heading(text, level) {\n\t\tlet tag = `h${level}`;\n\t\treturn `<${tag}>${text}</${tag}>\\n`;\n\t}", "header(name, info) {\n this.headingName.setContent(name)\n this.headingInfo.setContent(info)\n }", "function headingNumbering() {\n\n jQuery('h2,h3').each(function (i, e) {\n var hIndex;\n\n hIndex = parseInt(this.nodeName.substring(1)) - 2;\n\n // Getting deeper into the heading hierarchy\n if (indices.length - 1 > hIndex) {\n indices = indices.slice(0, hIndex + 1);\n }\n\n // Getting out of the heading hierarchy\n if (indices[hIndex] === undefined) {\n indices[hIndex] = 0;\n }\n\n // Increases the count for the current heading\n indices[hIndex]++;\n\n // Displays the heading numbering\n jQuery(this).prepend(indices.join(\".\") + \". \");\n });\n\n}", "function heading(level) {\n return {\n command: setBlockType(starSchema.nodes.heading, {level}),\n dom: icon(\"H\" + level, \"heading\")\n }\n}", "function buildHeader() {\r\n $(\"#header\").html(\r\n `\r\n A2 / ${meArr[0].fName} ${meArr[0].lName} / ${meArr[0].id} / ${meArr[0].user}\r\n <hr>\r\n `\r\n );\r\n $(\"#header\").addClass(\"header\");\r\n}", "function displayHeaderGrid() {\n console.log(`\\n\\n`);\n console.log(`=========================================================================================`);\n console.log(`| # | Product | Category | Price | Qty |`);\n console.log(`=========================================================================================`);\n}", "function RenderHeader() {\n var tabletext = AddTableHeader('Name');\n let click_periods = manual_periods.concat(limited_periods);\n let times_shown = GetShownPeriodKeys();\n times_shown.forEach((period)=>{\n let header = period_info.header[period];\n if (click_periods.includes(period)) {\n let is_available = CU.period_available[CU.usertag][CU.current_username][period];\n let link_class = (manual_periods.includes(period) ? 'cu-manual' : 'cu-limited');\n let header_class = (!is_available ? 'cu-process' : '');\n let counter_html = (!is_available ? '<span class=\"cu-display\" style=\"display:none\">&nbsp;(<span class=\"cu-counter\">...</span>)</span>' : '');\n tabletext += AddTableHeader(`<a class=\"${link_class}\">${header}</a>${counter_html}`,`class=\"cu-period-header ${header_class}\" data-period=\"${period}\"`);\n } else {\n tabletext += AddTableHeader(header,`class=\"cu-period-header\" data-period=\"${period}\"`);\n }\n });\n return AddTableHead(AddTableRow(tabletext));\n}", "getHeadingMarkup(heading) {\n if (heading && heading.trim().length > 0) {\n return `<h1>${heading}</h1>`;\n }\n\n return ``;\n }", "function htmlHeaders(k) {\n \n document.writeln(\"<h1>\" + gameHeader[k] + \"</h1>\");\n }", "function renderHeader(){\n // in Salmon Cookies, mkae this look like image in lab-07 instructions: iterate thru the hours array\n}", "function createHeading (headingNumber, text) {\n //console.log(\"Creating a heading : H\" + headingNumber);\n if (headingNumber > 6 || headingNumber < 1) {\n console.log(\"Error creating heading : H\" + headingNumber + \". Creating H1 instead.\");\n headingNumber = 1;\n }\n var temp = \"H\" + headingNumber;\n var element = document.createElement(temp);\n var textNode = document.createTextNode(text);\n element.appendChild(textNode);\n return element;\n }", "function heading(node) {\r\n var self = this\r\n var depth = node.depth\r\n var setext = self.options.setext\r\n var closeAtx = self.options.closeAtx\r\n var content = self.all(node).join('')\r\n var prefix\r\n\r\n if (setext && depth < 3) {\r\n return (\r\n content + lineFeed + repeat(depth === 1 ? equalsTo : dash, content.length)\r\n )\r\n }\r\n\r\n prefix = repeat(numberSign, node.depth)\r\n\r\n return prefix + space + content + (closeAtx ? space + prefix : '')\r\n}", "renderHeader(type, discipline, course, date, teacher, std_name, std_num) {\n var header = [\n { text: 'Exame ' + type, style: ['header', {alignment:'center'}] },\n { style: 'header_table',\n table: {\n widths: [ 'auto', '*' ],\n body: [\n [ \n { text: [ { text: 'Disciplina: ', bold:true }, discipline ] }, \n { text: [ { text: 'Curso: ', bold:true }, course ] },\n ],\n [ \n { text: [ { text: 'Data: ', bold:true }, date ] }, \n { text: [ { text: 'Professor: ', bold:true }, teacher ] },\n ],\n [ \n { text: [ { text: 'Aluno: ', bold:true }, std_name ] }, \n { text: [ { text: 'Numero: ', bold:true }, std_num] },\n ]\n\t\t\t\t\t]\n\t\t\t\t},\n layout: 'noBorders'\n\t\t\t}, \n ]\n return header;\n }", "function heading(node) {\n var self = this;\n var depth = node.depth;\n var setext = self.options.setext;\n var closeAtx = self.options.closeAtx;\n var content = self.all(node).join('');\n var prefix;\n\n if (setext && depth < 3) {\n return content + '\\n' + repeat(depth === 1 ? '=' : '-', content.length);\n }\n\n prefix = repeat('#', node.depth);\n\n return prefix + ' ' + content + (closeAtx ? ' ' + prefix : '');\n}", "function printHeader(){\n\t\t\t\t\t\t// title\n\t\t\t\t\t\tif (title !== \"\"){\n\t\t\t\t\t\t\tdoc.setFont(myFont,\"bold\");\n\t\t\t\t\t\t\tdoc.setFontSize(fontsize);\n\t\t\t\t\t\t\tdoc.myText(marginLeft, y, title, {underline: true});\n\t\t\t\t\t\t\t// header - grey outlined box with text\n\t\t\t\t\t\t\ty += 5;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdoc.setFillColor(204,204,204); // CCCCCC\n\t\t\t\t\t\tdoc.setDrawColor(0);\n\t\t\t\t\t\tdoc.rect(marginLeft,y,pageWidth,rowHt,'FD'); // Fill and outline rectangle\n\t\t\t\t\t\tvar x = marginLeft+4;\n\t\t\t\t\t\tdoc.setFont(myFont,\"normal\");\n\t\t\t\t\t\ty += lineHt;\n\t\t\t\t\t\t// add vertical lines between header column names\n\t\t\t\t\t\tfor (var i=0; i<header.length; i++) {\n\t\t\t\t\t\t\tif(header[i].displayname)\n\t\t\t\t\t\t\t\tdoc.text(x,y,header[i].displayname);\n\t\t\t\t\t\t\tx += header[i].width;\n\t\t\t\t\t\t\tif (i<header.length-1)\n\t\t\t\t\t\t\t\tdoc.line(x-4,y-lineHt,x-4,y+6);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ty+=rowHt;\n\t\t\t\t\t}", "renderHeader(headerContainerElement) {\n const {\n store,\n grid\n } = this;\n\n if (store.isGrouped) {\n // Sorted from start, reflect in rendering\n for (const groupInfo of store.groupers) {\n // Might be grouping by field without column, which is valid\n const column = grid.columns.get(groupInfo.field),\n header = column && grid.getHeaderElement(column.id); // IE11 doesnt support this\n //header && header.classList.add('b-group', groupInfo.ascending ? 'b-asc' : 'b-desc');\n\n if (header) {\n header.classList.add('b-group');\n header.classList.add(groupInfo.ascending ? 'b-asc' : 'b-desc');\n }\n }\n }\n }", "function printHeaders(parsedObject){\n for (const column of parsedObject.meta.fields){\n if (column === 'id' || column === 'image' || column === 'video' ||\n column === 'previewImageList') {\n continue; // don't print these column titles\n } else {\n let newHeaderDiv = createElementInside('div', 'game-data-container'); // TODO: columns should be accessible to screen readers, so maybe h3 or something\n newColumnDiv.innerHTML = column;\n newColumnDiv.className = 'game-column';\n }\n }\n}", "function headRender(index, key, label, columns) {\n return $('<div class=\"column col_' + index + ' col_' + key + '\" >' + label + '</div>');\n }", "renderHeader(headerContainerElement) {\n let me = this,\n grid = me.grid,\n groupers = me.store.groupers;\n\n // Sorted from start, reflect in rendering\n for (let groupInfo of groupers) {\n // Might be grouping by field without column, which is valid\n const column = grid.columns.get(groupInfo.field),\n header = column && grid.getHeaderElement(column.id);\n // IE11 doesnt support this\n //header && header.classList.add('b-group', groupInfo.ascending ? 'b-asc' : 'b-desc');\n if (header) {\n header.classList.add('b-group');\n header.classList.add(groupInfo.ascending ? 'b-asc' : 'b-desc');\n }\n }\n }", "function createBulkImportHeader() {\n var caption = '<span class=\"table-caption\">Bulk&nbsp;Import' +\n '&nbsp;Status</span><br>';\n\n $('<caption/>', {\n html: caption\n }).appendTo('#masterBulkImportStatus');\n\n var items = [];\n\n var columns = ['Directory&nbsp;', 'Age&nbsp;', 'State&nbsp;'];\n\n var titles = ['', descriptions['Import Age'], descriptions['Import State']];\n\n /*\n * Adds the columns, add sortTable function on click,\n * if the column has a description, add title taken from the global.js\n */\n for (i = 0; i < columns.length; i++) {\n var first = i == 0 ? true : false;\n items.push(createHeaderCell(first, 'sortTable(1,' + i + ')',\n titles[i], columns[i]));\n }\n\n $('<tr/>', {\n html: items.join('')\n }).appendTo('#masterBulkImportStatus');\n}", "function addSpanToTitle () {\r\n var colobj = document.getElementById ('ja-colwrap');\r\n if (!colobj) return;\r\n var modules = getElementsByClass ('moduletable.*', colobj, \"DIV\");\r\n if (!modules) return;\r\n for (var i=0; i<modules.length; i++) {\r\n var module = modules[i];\r\n var title = module.getElementsByTagName (\"h3\")[0]; \r\n if (title) {\r\n title.innerHTML = \"<span>\"+title.innerHTML+\"</span>\";\r\n module.className = \"ja-\" + module.className;\r\n }\r\n }\r\n}", "function createHeader() {\n var table = gAppState.checkId(\"dbmsTableID\", \"fsTableID\");\n\n var header = table.createTHead(); // creates empty tHead\n var row = header.insertRow(0); // inserts row into tHead\n\n var cell0 = row.insertCell(0); // inserts new cell at position 0 in the row\n var cell1 = row.insertCell(1); // inserts new cell at position 1 in the row\n var cell2 = row.insertCell(2); // inserts new cell at position 2 in the row\n\n cell0.innerHTML = \"<b>Subject</b>\"; // adds bold text\n cell1.innerHTML = \"<b>Predicate</b>\";\n cell2.innerHTML = \"<b>Object</b>\";\n}", "buildDataTableHeaderHtml() {\n\t\tgetComponentElementById(this,'DataTableHeaderHtml').html(\n\t\t\t'<th id=\"'+this.getUid()+'_MultiSelectColumn\" class=\"data_table_header\" scope=\"col\">\\n' +\n\t\t\t'<input id=\"'+this.getUid()+'_MultiSelectAll\" type=\"checkbox\" name=\"all\" value=\"all\">\\n' +\n\t\t\t'</th>');\n\n\t\tthis.included_attribute_array.forEach(function(attribute) {\n\t\t\tthis.column_name_obj[attribute] = attribute.replace(/([a-z0-9])([A-Z])/g, '$1 $2');\n\t\t\tgetComponentElementById(this,'DataTableHeaderHtml').append(\n\t\t\t\t'<th id=\"'+this.getUid()+'_SortBy'+attribute+'\" class=\"data_table_header\" scope=\"col\">'+this.column_name_obj[attribute]+'</th>'\n\t\t\t);\n\t\t}.bind(this));\n\t\tthis.included_relationship_array.forEach(function(relationship) {\n\t\t\tthis.column_name_obj[relationship] = relationship.replace(/([a-z0-9])([A-Z])/g, '$1 $2');\n\t\t\tgetComponentElementById(this,'DataTableHeaderHtml').append(\n\t\t\t\t'<th id=\"'+this.getUid()+'_SortBy'+relationship+'\" class=\"data_table_header\" scope=\"col\">'+this.column_name_obj[relationship]+'</th>'\n\t\t\t)\n\t\t}.bind(this));\n\t}", "function getHeader() {\n return This.headerTpl({\n date: date,\n teams: teams\n });\n }", "function createHeader(layout) {\n\n\t\tvar columns = [],\n\t\t\t$thead = $('<thead />');\n\n\t\tlayout.qHyperCube.qDimensionInfo.forEach(function(d) {\n\t\t\tcolumns.push(capitalizeFirstLetter(d.qFallbackTitle));\n\t\t})\n\n\t\tcolumns.push(layout.qHyperCube.qMeasureInfo[0].qFallbackTitle);\n\n\t\tcolumns.forEach(function(d, i) {\n\t\t\tif (i == 1) {\n\t\t\t\t$('<th colspan=\"2\" class=\"col col' + (i + 1) + '\">' + d + '</th>').appendTo($thead);\n\t\t\t} else {\n\t\t\t\t$('<th class=\"col col' + (i + 1) + '\">' + d + '</th>').appendTo($thead);\n\t\t\t}\n\t\t})\n\t\treturn $thead;\n\t}", "function populateHeader(obj) {\n const myH1 = document.createElement(\"h1\");\n myH1.textContent = obj[\"squadName\"];\n header.appendChild(myH1);\n\n const myPara = document.createElement(\"p\");\n myPara.textContent =\n \"Hometown: \" + obj[\"homeTown\"] + \" // Formed: \" + obj[\"formed\"];\n header.appendChild(myPara);\n}", "function createHeader() {\n var caption = [];\n\n caption.push('<span class=\"table-caption\">Master&nbsp;Status</span><br>');\n\n $('<caption/>', {\n html: caption.join('')\n }).appendTo('#masterStatus');\n\n var items = [];\n\n var columns = ['Master&nbsp;', '#&nbsp;Online<br>Tablet&nbsp;Servers&nbsp;',\n '#&nbsp;Total<br>Tablet&nbsp;Servers&nbsp;', 'Last&nbsp;GC&nbsp;',\n '#&nbsp;Tablets&nbsp;', '#&nbsp;Unassigned<br>Tablets&nbsp;',\n 'Entries&nbsp;', 'Ingest&nbsp;', 'Entries<br>Read&nbsp;',\n 'Entries<br>Returned&nbsp;', 'Hold&nbsp;Time&nbsp;',\n 'OS&nbsp;Load&nbsp;'];\n\n var titles = [descriptions['Master'], descriptions['# Online Tablet Servers'],\n descriptions['# Total Tablet Servers'], descriptions['Last GC'],\n descriptions['# Tablets'], '', descriptions['Total Entries'],\n descriptions['Total Ingest'], descriptions['Total Entries Read'],\n descriptions['Total Entries Returned'], descriptions['Max Hold Time'],\n descriptions['OS Load']];\n\n /*\n * Adds the columns, add sortTable function on click,\n * if the column has a description, add title taken from the global.js\n */\n for (i = 0; i < columns.length; i++) {\n var first = i == 0 ? true : false;\n items.push(createHeaderCell(first, 'sortMasterTable(' + i + ')',\n titles[i], columns[i]));\n }\n\n $('<tr/>', {\n html: items.join('')\n }).appendTo('#masterStatus');\n}", "function renderHeader(data) {\n return Object.keys(data).map((header) =>\n <th>{header}</th>\n );\n }", "function Heading() {\n\treturn(<div id='heading'>\n\t</div>);\n}", "renderSprintHeaderRow() {\n\n const template = markobj(`<table>\n <thead>\n <tr>\n <th class=\"left\">Member</th>\n <th>Role</th>\n <th>Time</th>\n <th>Hours</th>\n <!-- Inject Sprints -->\n </tr>\n </thead>\n <tbody>\n </tbody>\n </table>`);\n const container = document.querySelector('#team-data');\n container.innerHTML = \"\";\n container.appendChild(template);\n\n const header = container.querySelector('table thead tr');\n let sprintHeaders = '';\n this.sprintData.forEach( (sprint) => {\n sprintHeaders = markobj(`<th>${sprint.label}</th>`);\n header.appendChild(sprintHeaders);\n });\n sprintHeaders = markobj(`<th>Totals</th>`);\n header.appendChild(sprintHeaders);\n }", "createHeader() {\n let header = document.createElement('h1')\n header.innerText = this.capitalize(this.type)\n this.div.appendChild(header)\n }", "function display(heading,data){\n\tvar str=\"\";\n\tstr+='<table width=\"200\" border=\"1\">';\n\tstr+=\"<tr>\";\n\tfor(var col=0;col<heading.length;col++){\n\t\tstr+=\"<th>\"+heading[col]+\"</th>\";\n\t}\n\tstr+=\"</tr>\";\n\tfor(var year=1;year<data.length;year++){\n\t\tstr+=\"<tr>\";\n\t\tstr+=(\"<td>\"+year+\"</td>\");\n\t\tstr+=(\"<td>\"+retirement[year]+\"</td>\");\n\t\tstr+=\"</tr>\";\n\t}\n\tstr+=\"</table>\";\n\treturn str;\n}", "function createHeadName() {\n const thead =document.createElement(\"thead\");\n const tr = document.createElement(\"tr\");\n const div = document.querySelector(\"#details\");\n for (let i = 0; i <headerNames.length; i++) {\n\n const th1 = document.createElement(\"th\");\n // const th2 =document.createElement(\"th\");\n // const th3 = document.createElement(\"th\");\n // const th4 = document.createElement(\"th\");\n // const th5 = document.createElement(\"th\");\n th1.innerHTML=headerNames[i];\n // th2.innerHTML=headerNames[i+1];\n // th3.innerHTML=headerNames[i+2];\n // th4.innerHTML=headerNames[i+3];\n // th5.innerHTML=headerNames[i+4];\n tr.appendChild(th1);\n // tr.appendChild(th2);\n // tr.appendChild(th3);\n // tr.appendChild(th4);\n // tr.appendChild(th5);\n div.appendChild(tr);\n }\n\n }", "function headerDetails(data) {\n var headerDetails = data[0];\n $('.user-name').text(headerDetails.first_name + \" \" + headerDetails.last_name);\n }", "function appendStatHeader(table, headerText) {\n\tvar thead = document.createElement('thead');\n\tvar row = thead.insertRow(0);\n\tvar cell = row.insertCell(0);\n\tcell.colSpan = '2';\n\tcell.className = 'stats-head';\n\tcell.appendChild(document.createTextNode(headerText));\n\ttable.appendChild(thead);\n}", "function roundHeader() {\n let index = Glob.setup.me;\n let roundToDisplay = Glob.setup.round + 1;\n let myNameDiv = $(\"<div id='yourName'></div>\").append(emojiByIndex(index), \" \", Glob.setup.playerNames[index]);\n let currentRoundDiv = $(\"<div class='currentRound'></div>\").html(tr(\"Round\")+\" <b>\" + roundToDisplay + \"</b>\");\n let r = $('<div class=\"roundHeader\"></div>').css('background-color', playerColorByIndex(index))\n .append(currentRoundDiv, myNameDiv);\n\n return r;\n}", "function renderHeader() {\n var tableHeader = document.createElement('tr')\n table.append(tableHeader)\n var cityLabel = document.createElement('th');\n cityLabel.textContent = 'Store Location';\n tableHeader.append(cityLabel);\n for (var i = 0; i < hours.length; i++) {\n var headerCellHour = document.createElement('th');\n headerCellHour.textContent = hours[i];\n tableHeader.append(headerCellHour);\n }\n var dailyTotalLabel = document.createElement('th');\n dailyTotalLabel.textContent = 'End of day Sales'\n tableHeader.append(dailyTotalLabel)\n}", "function createHeading(headingObj) {\n\n // size, text, id\n\n let heading = headingObj.size >= 1 && headingObj.size <= 5 ? document.createElement(`h` + headingObj.size) : document.createElement(`h5`);\n\n heading.innerHTML = (typeof headingObj.text == `string`) ? headingObj.text : `>> No text <<`;\n\n heading.id = headingObj.id != undefined && document.getElementById(headingObj.id) == null ? headingObj.id : `>> No ID <<`;\n\n return heading\n\n}", "function renderHeader() {\n return div(\n {\n class: `${baseCss}__header`,\n },\n [\n span({ class: `${baseCss}__header_icon ${header.icon}` }),\n span({ class: `${baseCss}__header_label` }, header.label),\n ]\n );\n }", "function headingToText(h) {\n var t;\n if (typeof h !== \"number\") {\n t = ''; \n } else if (h >= 337.5 || (h >= 0 && h <= 22.5)) {\n t = 'N'; \n } else if (h >= 22.5 && h <= 67.5) {\n t = 'NE'; \n } else if (h >= 67.5 && h <= 112.5) {\n t = 'E'; \n } else if (h >= 112.5 && h <= 157.5) {\n t = 'SE'; \n } else if (h >= 157.5 && h <= 202.5) {\n t = 'S'; \n } else if (h >= 202.5 && h <= 247.5) {\n t = 'SW'; \n } else if (h >= 247.5 && h <= 292.5) {\n t = 'W'; \n } else if (h >= 292.5 && h <= 337.5) {\n t = 'NW'; \n } else {\n t = t;\n }\n return t;\n}", "prepareHeader() {\n let attributes = this.props.attributes;\n const models = this.props.models;\n const className = this.props.className;\n\n if (models !== undefined) {\n if (models.length === 0) {\n return this.preparePlaceholder();\n } else {\n return (\n <div key={\"grid-header\"} className={\"grid-container \" + (className !== undefined ? className : \"\") + \" grid-container-header\"}>\n {this.lineItems(attributes)}\n <div className={\"grid-item\"}>\n </div>\n </div>\n )\n }\n }\n }", "function renderHeader(){\n const currentContent = document.querySelector(\".header\");\n currentContent.style.fontSize = \"x-large\";\n const replaceWith = `<h1>Current Score: <br> Player 1: ${playerResult.player1} <br> Player 2: ${playerResult.player2}</h1>`;\n changeElementContent(currentContent ,replaceWith);\n}", "function logHeader(...params) {\n const totalWidth = 80;\n const fillWidth = totalWidth - 2;\n const headerText = params.join(' ').substr(0, fillWidth);\n const leftSpace = Math.ceil((fillWidth - headerText.length) / 2);\n const rightSpace = fillWidth - leftSpace - headerText.length;\n const fill = (count, content) => content.repeat(count);\n info(`┌${fill(fillWidth, '─')}┐`);\n info(`│${fill(leftSpace, ' ')}${headerText}${fill(rightSpace, ' ')}│`);\n info(`└${fill(fillWidth, '─')}┘`);\n}", "function header() {\n let tableHeadingRow = document.createElement('tr');\n table.append(tableHeadingRow);\n let tableHeading = document.createElement('th');\n tableHeadingRow.append(tableHeading);\n\n for (let i = 0; i<hours.length; i++){\n tableHeading = document.createElement('th');\n tableHeadingRow.append(tableHeading);\n tableHeading.textContent = ' '+hours[i]+ ' ';\n }\n // last heading\n let tableHeading2 = document.createElement('th');\n tableHeadingRow.append(tableHeading2);\n tableHeading2.textContent = 'Daily Location Total';\n}", "function header() {\n\tif (output.innerHTML === \"\"){\n\tlistHeading.innerHTML =\"\";\n} else {\n\tlistHeading.innerHTML =\"<h3> Capitalized name(s): </h3>\";\n}\n} // --- my solution", "function numberHeadingsIE7(doc, addClass) {\n doc = typeof doc !== 'undefined' ? doc : document;\n\n var $doc = jQuery(doc),\n\n $startNode = $doc.find('.' +\n WYMeditor.STRUCTURED_HEADINGS_START_NODE_CLASS),\n startHeadingLevel,\n headingSel = WYMeditor.HEADING_ELEMENTS.join(', '),\n\n $allHeadings,\n $heading,\n headingLabel,\n\n span,\n spanCharTotal = 0,\n\n counters = [0, 0, 0, 0, 0, 0],\n counterIndex,\n i,\n j;\n\n // If no start node is set and addClass is true, set the start node as the\n // first heading in doc by default.\n if (addClass) {\n $startNode = $doc.find(headingSel);\n if ($startNode.length) {\n $startNode = $startNode.eq(0);\n $startNode.addClass(WYMeditor.STRUCTURED_HEADINGS_START_NODE_CLASS);\n }\n }\n // If there are no headings in the document or if no start node is defined\n // and addClass is false, do nothing.\n if (!$startNode.length) {\n return;\n }\n\n // startHeadingType is the level of the heading that is the start node.\n // This is found out by looking at the last character of its nodeName.\n startHeadingLevel = getHeadingLevel($startNode[0]);\n $allHeadings = $startNode.nextAll(headingSel).add($startNode);\n\n // Remove any previously calculated heading numbering\n $doc.find('.' + WYMeditor.STRUCTURED_HEADINGS_NUMBERING_SPAN_CLASS).remove();\n\n for (i = 0; i < $allHeadings.length; ++i) {\n $heading = $allHeadings.eq(i);\n counterIndex = getHeadingLevel($heading[0]) - startHeadingLevel;\n\n // If the counterIndex is negative, it means the level of the current\n // heading is above the level of the start node, so heading numbering\n // should stop at this point.\n if (counterIndex < 0) {\n break;\n }\n\n // Calculate the heading label\n ++counters[counterIndex];\n headingLabel = '';\n for (j = 0; j <= counterIndex; ++j) {\n if (j === counterIndex) {\n headingLabel += counters[j];\n } else {\n headingLabel += counters[j] + '.';\n }\n }\n if (addClass) {\n $heading.addClass(\n WYMeditor.STRUCTURED_HEADINGS_LEVEL_CLASSES[counterIndex]);\n }\n\n // Prepend span containing the heading's label to heading\n span = doc.createElement('span');\n span.innerHTML = headingLabel;\n span.className = WYMeditor.STRUCTURED_HEADINGS_NUMBERING_SPAN_CLASS;\n if (addClass) {\n span.className += ' ' + WYMeditor.EDITOR_ONLY_CLASS;\n }\n $heading.prepend(span);\n spanCharTotal += (counterIndex * 2) + 1;\n\n // Reset counters below the heading's level\n for (j = counterIndex + 1; j < counters.length; ++j) {\n counters[j] = 0;\n }\n }\n\n return spanCharTotal;\n}", "function getHeader(title) {\n return `<h5>${title}</h5>`;\n}", "function draw_headers() \n{\n stroke(0);\n textSize(17);\n\n // Insertion Sort header\n alg_header(\"Insertion Sort\", 6, colors.Insertion);\n\n // Selection Sort header\n alg_header(\"Selection Sort\", 366, colors.Selection);\n\n // Gold's Poresort header\n alg_header(\"Gold's Poresort\", 723, colors.Poresort);\n\n // Mergesort header\n alg_header(\"Mergesort\", 1083, colors.Mergesort);\n\n // Quicksort header\n alg_header(\"Quicksort\", 1445, colors.Quicksort);\n}", "get headings() {\n return [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"];\n }", "function createNameHeader(name) {\n let h5 = document.createElement(\"h5\");\n h5.classList.add(\"d-flex\");\n h5.classList.add(\"justify-content-between\");\n h5.classList.add(\"align-items-center\");\n h5.textContent = name;\n\n return h5;\n}", "renderHeader() {\n const self = this;\n const headerRows = { left: '', center: '', right: '' };\n let uniqueId;\n\n // Handle Nested Headers\n const colGroups = this.settings.columnGroups;\n if (colGroups) {\n this.element.addClass('has-group-headers');\n\n const columns = this.settings.columns;\n const columnsLen = columns.length;\n const visibleColumnsLen = this.visibleColumns().length;\n const groups = colGroups.map(group => parseInt(group.colspan, 10));\n const getGroupsTotal = () => groups.reduce((a, b) => a + b, 0);\n const getDiff = () => {\n const groupsTotal = getGroupsTotal();\n return groupsTotal > columnsLen ? groupsTotal - columnsLen : columnsLen - groupsTotal;\n };\n\n headerRows.left += '<tr role=\"row\" class=\"datagrid-header-groups\">';\n headerRows.center += '<tr role=\"row\" class=\"datagrid-header-groups\">';\n headerRows.right += '<tr role=\"row\" class=\"datagrid-header-groups\">';\n\n const groupsTotal = getGroupsTotal();\n let diff;\n if (groupsTotal > columnsLen) {\n let move = true;\n for (let i = groups.length - 1; i >= 0 && move; i--) {\n diff = getDiff();\n if (groups[i] >= diff) {\n groups[i] -= diff;\n move = false;\n } else {\n groups[i] = 0;\n }\n }\n }\n\n let i = 0;\n let total = 0;\n groups.forEach((groupColspan, k) => {\n let colspan = groupColspan;\n for (let l = i + groupColspan; i < l; i++) {\n if (i < columnsLen && columns[i].hidden) {\n colspan--;\n }\n }\n const hiddenStr = colGroups[k].hidden || colspan < 1 ? ' class=\"is-hidden\"' : '';\n const colspanStr = ` colspan=\"${colspan > 0 ? colspan : 1}\"`;\n const groupedHeaderAlignmentClass = colGroups[k].align ? `l-${colGroups[k].align}-text` : '';\n uniqueId = self.uniqueId(`-header-group-${k}`);\n if (colspan > 0) {\n total += colspan;\n }\n\n const container = self.getContainer(self.settings.columns[k].id);\n headerRows[container] += `<th${hiddenStr}${colspanStr} id=\"${uniqueId}\" class=\"${groupedHeaderAlignmentClass}\"><div class=\"datagrid-column-wrapper\"><span class=\"datagrid-header-text\">${colGroups[k].name}</span></div></th>`;\n });\n\n if (total < visibleColumnsLen) {\n diff = visibleColumnsLen - total;\n const colspanStr = ` colspan=\"${diff > 0 ? diff : 1}\"`;\n if (self.hasRightPane) {\n headerRows.right += `<th${colspanStr}></th>`;\n } else {\n headerRows.center += `<th${colspanStr}></th>`;\n }\n }\n\n if (this.settings.spacerColumn) {\n headerRows.center += '<th class=\"datagrid-header-groups-spacer-column\"></th>';\n }\n\n headerRows.left += '</tr><tr>';\n headerRows.center += '</tr><tr>';\n headerRows.right += '</tr><tr>';\n } else {\n headerRows.left += '<tr role=\"row\">';\n headerRows.center += '<tr role=\"row\">';\n headerRows.right += '<tr role=\"row\">';\n }\n\n for (let j = 0; j < this.settings.columns.length; j++) {\n const column = self.settings.columns[j];\n const container = self.getContainer(column.id);\n const id = self.uniqueId(`-header-${j}`);\n const isSortable = (column.sortable === undefined ? true : column.sortable);\n const isResizable = (column.resizable === undefined ? true : column.resizable);\n const isExportable = (column.exportable === undefined ? true : column.exportable);\n const isSelection = column.id === 'selectionCheckbox';\n const headerAlignmentClass = this.getHeaderAlignmentClass(column);\n\n // Make frozen columns hideable: false\n if ((self.hasLeftPane || self.hasRightPane) &&\n (self.settings.frozenColumns.left &&\n self.settings.frozenColumns.left.indexOf(column.id) > -1 ||\n self.settings.frozenColumns.right &&\n self.settings.frozenColumns.right.indexOf(column.id) > -1)) {\n column.hideable = false;\n }\n\n // Ensure hidable columns are marked as such\n if (column.hideable === undefined) {\n column.hideable = true;\n }\n\n // Assign css classes\n let cssClass = '';\n cssClass += isSortable ? ' is-sortable' : '';\n cssClass += isResizable ? ' is-resizable' : '';\n cssClass += column.hidden ? ' is-hidden' : '';\n cssClass += column.filterType ? ' is-filterable' : '';\n cssClass += column.textOverflow === 'ellipsis' ? ' text-ellipsis' : '';\n cssClass += column?.headerIcon ? ' header-icon' : '';\n cssClass += column?.headerCssClass ? ` ${column.headerCssClass}` : '';\n cssClass += headerAlignmentClass !== '' ? headerAlignmentClass : '';\n\n // Apply css classes\n cssClass = cssClass !== '' ? ` class=\"${cssClass.substr(1)}\"` : '';\n let ids = utils.stringAttributes(this, this.settings.attributes, `col-${column.id?.toLowerCase()}`);\n\n if (!ids) {\n ids = `id=\"${id}\"`;\n }\n\n headerRows[container] += `<th scope=\"col\" role=\"columnheader\" ${ids} ${isSelection ? ' aria-checked= \"false\"' : ''} data-column-id=\"${column.id}\"${column.field ? ` data-field=\"${column.field}\"` : ''}${column.headerTooltip ? ` title=\"${column.headerTooltip}\"` : ''}${column.headerTooltipCssClass ? ` tooltipClass=\"${column.headerTooltipCssClass}\"` : ''}${column.reorderable === false ? ' data-reorder=\"false\"' : ''}${colGroups ? ` headers=\"${self.getColumnGroup(j)}\"` : ''} data-exportable=\"${isExportable ? 'yes' : 'no'}\"${cssClass}>`;\n\n let sortIndicator = '';\n if (isSortable) {\n sortIndicator = `${'<div class=\"sort-indicator\">' +\n '<span class=\"sort-asc\">'}${$.createIcon({ icon: 'dropdown' })}</span>` +\n `<span class=\"sort-desc\">${$.createIcon({ icon: 'dropdown' })}</div>`;\n }\n\n // If header text is center aligned, for proper styling,\n // place the sortIndicator as a child of datagrid-header-text.\n\n const svgHeaderTooltip = column?.headerIconTooltip !== undefined || column?.headerIconTooltip?.length > 0 ? column?.headerIconTooltip : '';\n const svgHeaderIcon = `\n <svg class=\"icon datagrid-header-icon\" focusable=\"false\" aria-hidden=\"true\" role=\"presentation\" title=\"${svgHeaderTooltip}\">\n <use href=\"#icon-${column.headerIcon}\"></use>\n </svg>\n `;\n\n headerRows[container] += `<div class=\"${isSelection ? 'datagrid-checkbox-wrapper ' : 'datagrid-column-wrapper'}${headerAlignmentClass}\">\n <span class=\"datagrid-header-text${column.required ? ' required' : ''}\">${self.headerText(this.settings.columns[j])}${headerAlignmentClass === ' l-center-text' ? sortIndicator : ''}</span>\n ${this.settings.columns[j]?.headerIcon ? svgHeaderIcon : ''}`;\n\n if (isSelection) {\n if (self.settings.showSelectAllCheckBox) {\n headerRows[container] += '<span class=\"datagrid-checkbox\" aria-label=\"Selection\" role=\"checkbox\" tabindex=\"0\"></span>';\n } else {\n headerRows[container] += '<span class=\"datagrid-checkbox\" aria-label=\"Selection\" role=\"checkbox\" style=\"display:none\" tabindex=\"0\"></span>';\n }\n }\n\n // Note the space in classname.\n // Place sortIndicator via concatenation if\n // header text is not center aligned.\n if (isSortable && headerAlignmentClass !== ' l-center-text') {\n headerRows[container] += sortIndicator;\n }\n\n headerRows[container] += `</div>${self.filterRowHtml(column, j)}</th>`;\n }\n\n // Set Up Spacer column\n if (this.settings.spacerColumn) {\n headerRows.center += '<th class=\"datagrid-header-spacer-column\"></th>';\n }\n\n headerRows.left += '</tr>';\n headerRows.center += '</tr>';\n headerRows.right += '</tr>';\n\n // Set Up Header Panes\n if (self.headerRow === undefined) {\n if (self.hasLeftPane) {\n self.headerRowLeft = $(`<thead class=\"datagrid-header left\" role=\"rowgroup\">${headerRows.left}</thead>`);\n self.tableLeft.find('colgroup').after(self.headerRowLeft);\n }\n\n self.headerRow = $(`<thead class=\"datagrid-header center\"> role=\"rowgroup\"${headerRows.center}</thead>`);\n self.table.find('colgroup').after(self.headerRow);\n\n if (self.hasRightPane) {\n self.headerRowRight = $(`<thead class=\"datagrid-header right\" role=\"rowgroup\">${headerRows.right}</thead>`);\n self.tableRight.find('colgroup').after(self.headerRowRight);\n }\n } else {\n if (self.hasLeftPane) {\n DOM.html(self.headerRowLeft, headerRows.left, '*');\n }\n\n DOM.html(self.headerRow, headerRows.center, '*');\n\n if (self.hasRightPane) {\n DOM.html(self.headerRowRight, headerRows.right, '*');\n }\n }\n\n if (colGroups && self.headerRow) {\n self.colGroups = $.makeArray(this.container.find('.datagrid-header-groups th'));\n }\n\n self.syncHeaderCheckbox(this.settings.dataset);\n self.setScrollClass();\n self.attachFilterRowEvents();\n\n if (self.settings.columnReorder) {\n self.createDraggableColumns();\n }\n\n this.restoreSortOrder = false;\n this.setSortIndicator(this.sortColumn.sortId, this.sortColumn.sortAsc);\n\n if (this.restoreFilter) {\n this.restoreFilter = false;\n this.applyFilter(this.savedFilter, 'restore');\n this.savedFilter = null;\n } else if (this.filterExpr && this.filterExpr.length > 0) {\n this.setFilterConditions(this.filterExpr);\n }\n\n this.activeEllipsisHeaderAll();\n\n // Set the color background header (light and dark)\n (self?.settings?.headerBackgroundColor === 'light') ? //eslint-disable-line\n (self?.headerRowLeft?.addClass('light'), self?.headerRow?.addClass('light'), self?.headerRowRight?.addClass('light')) :\n (self?.headerRow?.addClass('dark'), self?.headerRowRight?.addClass('dark'), self?.headerRowLeft?.addClass('dark'));\n }", "renderHeader(h, {\n column,\n $index\n }, tableTitle) {\n return h(\n 'el-tooltip', {\n props: {\n content: tableTitle,\n placement: 'bottom',\n },\n domProps: {\n innerHTML: tableTitle\n }\n }, [h('span')]\n )\n }", "function fn_header(strValue)\r\n{\r\n\treturn \"<H2> <center> <font color = \" + chr(34) + \"#2F4F4F\" + chr(34) + \">\" + strValue +\"</center></H2>\" + Chr(10);\r\n}", "function showTopHeaders() {\n var headerRow = document.createElement('TR');\n headerRow.innerHTML = '<th>' + name + '</th>';\n \n var firstKey = Object.keys(primary)[0];\n if (primary[firstKey]) {\n for (var header in primary[firstKey]) {\n if (primary[firstKey].hasOwnProperty(header)) {\n var newHeader = document.createElement('TH');\n newHeader.innerHTML = header;\n headerRow.appendChild(newHeader);\n }\n }\n }\n this.dom.appendChild(headerRow);\n }", "getGamesHeader() {\n if(this.state.team) {\n return (\n <h3 className='unselectable text-center'> {this.state.team.team_name} vs 76ers</h3>\n );\n }\n }", "function GenorateHeaderInfo(Data1) {\n var DivHeader = document.createElement(\"div\");\n DivHeader.setAttribute(\"class\", \"Header-Info\");\n var DivMapper = document.createElement(\"div\");\n DivMapper.innerHTML = Data1[0];\n var DivKey = document.createElement(\"div\");\n DivKey.innerHTML = Data1[1] + \" 🔑\";\n DivHeader.appendChild(DivMapper);\n DivHeader.appendChild(DivKey);\n return DivHeader;\n}", "function make_headers (table){\n\n var i = 0;\n var headers = d3.select(\"#\" + table).selectAll(\"th\");\n\n var length = headers.nodes().length;\n var lmi = [\"Indicator\", \"Value\"];\n var comm = [\"Commute\", \"Share\", \"\"];\n var edu = [\"Education\", \"Share\", \"\"];\n var occ = [\"National Occupational Classification\", \"Market Population\", \"Public Service\"];\n\n switch (table){\n case \"LMI\":\n for (i = 0; i < length; i++) {\n headers.nodes()[i].innerHTML = lmi[i];\n }\n break;\n\n case \"comm_tbl\":\n for (i = 0; i < length; i++) {\n headers.nodes()[i].innerHTML = comm[i];\n }\n break;\n\n case \"edu_tbl\":\n for (i = 0; i < length; i++) {\n headers.nodes()[i].innerHTML = edu[i];\n }\n break;\n\n case \"LMI_PS\":\n for (i = 0; i < length; i++) {\n headers.nodes()[i].innerHTML = occ[i];\n }\n break;\n }\n}", "function createModalHeader(headerText){\n let header = document.createElement('div');\n let title = document.createElement('h3');\n let info = document.createElement('h4');\n\n // let span = document.createElement('span');\n // span.className = 'col-sm-2 glyphicon glyphicon-remove pull-right';\n\n header.className = 'modal-header ' + headerText['grade'];\n title.innerText = headerText['title'];\n info.innerText = headerText['info'];\n header.appendChild(title);\n header.appendChild(info);\n\n return header\n}", "function formatData(d){\n html_text = \"<b>Name: </b> #name</br>\"+\n \"<b>Batting Average: </b> #avg</br>\"+\n \"<b>Home runs: </b> #HR</br>\";\n\n html_text = html_text.replace(/#(\\w+)/g, function(match, p1){\n return d[p1];\n });\n return html_text;\n }", "get heading () { return $('h1.page-title > span.base') }", "function headerTable() {\n\n\n\n let rawHeading = document.createElement('tr');\n table.appendChild(rawHeading);\n\n let th1 = document.createElement('th');\n rawHeading.appendChild(th1);\n th1.textContent = \" \";\n\n for (let i = 0; i < workingHours.length; i++) {\n let th = document.createElement('th');\n rawHeading.appendChild(th);\n th.textContent = workingHours[i];\n\n }\n\n\n let th2 = document.createElement('th');\n rawHeading.appendChild(th2);\n th2.textContent = \"Daily Location Total\";\n\n}", "function convertheading(str, p1, s) {\n //console.log(\"str\",str)\n //console.log(\"p1\",p1)\n\t\t\t\tp1 = p1.replace(/\\#\\#\\#/,'')\n\t\t\t\treturn '<h5>'+p1+'</h5>'\n\t\t\t\t}", "function createCourseHeaders() {\n var ranking = $('<td>', {class: \"ranking\", text: \"Ranking\"});\n var experience = $('<td>', {class: \"experience\", text: \"Experience\"});\n var status = $('<td>', {class: \"status\", text: \"Status\"});\n var gName = $('<td>', {class: \"given-name\", text: \"Given Name\"});\n var fName = $('<td>', {class: \"family-name\", text: \"Family Name\"});\n\n return $('<tr>', {class: \"table-headers\"}).append(ranking, [experience, status, gName, fName]);\n}", "function HTMLHeader(level, titleStr, center)\n{\n assert (\n typeof level === 'number' && level >= 1 && level <= 6,\n 'invalid header level'\n );\n\n var elem = new XMLElement('h' + level.toString());\n\n elem.title = new XMLText(titleStr);\n elem.addChild(elem.title);\n\n if (center)\n {\n ctrElem = new XMLElement('center');\n ctrElem.addChild(elem);\n elem = ctrElem;\n }\n\n return elem;\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 7;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function makeHeader() {\n //tr //th\n // Head\n let trow1 = document.createElement('tr');\n table1.appendChild(trow1);\n let tHead1 = document.createElement('th')\n trow1.appendChild(tHead1);\n tHead1.textContent='Name '\n \n // Working Hours\n for (let i = 0; i < workingHours.length; i++) {\n let tHead1 = document.createElement(\"th\")\n trow1.appendChild(tHead1);\n tHead1.textContent= workingHours[i];\n }\n \n let tHead2 = document.createElement(\"th\");\n trow1.appendChild(tHead2);\n tHead2.textContent= 'Daily Location Total' \n}", "function headerRenderFunction() {\n\n //create header row\n let headerRow = document.createElement('tr');\n table.appendChild(headerRow);\n\n //create header cells\n for (let i = 0; i < headerContent.length; i++) {\n\n let headerCell = document.createElement('th');\n headerRow.appendChild(headerCell);\n headerCell.textContent = headerContent[i];\n }\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 6;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function summaryTableHeader(header) {\r\n var newRow = header.insertRow(-1);\r\n newRow.className = \"tablesorter-no-sort\";\r\n var cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Requests\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 3;\r\n cell.innerHTML = \"Executions\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 7;\r\n cell.innerHTML = \"Response Times (ms)\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 1;\r\n cell.innerHTML = \"Throughput\";\r\n newRow.appendChild(cell);\r\n\r\n cell = document.createElement('th');\r\n cell.setAttribute(\"data-sorter\", false);\r\n cell.colSpan = 2;\r\n cell.innerHTML = \"Network (KB/sec)\";\r\n newRow.appendChild(cell);\r\n}", "function renderHeader() {\n\n var headerRow = document.createElement('tr');\ntable.appendChild(headerRow);\n\nvar emptyCell = document.createElement('td');\nheaderRow.appendChild(emptyCell);\n\n\nfor (let i = 0; i < hoursArray.length; i++) {\n var tableHeader = document.createElement('th')\n tableHeader.textContent = hoursArray[i];\n headerRow.appendChild(tableHeader);\n\n\n}\n\nvar totalHeader = document.createElement('th');\ntotalHeader.textContent = 'Daily Location Total';\nheaderRow.appendChild(totalHeader);\n\n \n \n}", "function headerGraphic() {\n clear();\n\n var table = new Table;({\n chars: { 'top': '═' , 'top-mid': '╤' , 'top-left': '╔' , 'top-right': '╗'\n , 'bottom': '═' , 'bottom-mid': '╧' , 'bottom-left': '╚' , 'bottom-right': '╝'\n , 'left': '║' , 'left-mid': '║' , 'mid': ' ' , 'mid-mid': ''\n , 'right': '║' , 'right-mid': '║' , 'middle': '' }\n });\n\n let firstWord = colors.brightMagenta.bold(\n figlet.textSync('Employee', { horizontalLayout: 'fitted' , font: 'Standard' })\n );\n\n let secondWord = colors.brightMagenta.bold(\n figlet.textSync('Tracker', { horizontalLayout: 'fitted' , font: 'Standard' })\n );\n\n table.push(\n [firstWord]\n , [secondWord]\n );\n \n let finalTable = table.toString();\n \n console.log(finalTable);\n \n}", "printSectionHeader(obj,sectionName){\n obj.insertAdjacentHTML('beforeend',`\n <div class= \"section\">\n <h2 class=\"section-name\">${sectionName}</h2>\n </div>\n `)\n\n }", "function renderTableHeader() {\r\n // table top\r\n const tableTop = document.createElement('tr')\r\n const Kleur = document.createElement('th')\r\n Kleur.setAttribute('colspan', '2')\r\n Kleur.classList.add('right')\r\n Kleur.textContent = 'Kleur'\r\n\r\n const Bloeiperiode = document.createElement('th')\r\n Bloeiperiode.textContent = 'Bloeiperiode'\r\n\r\n tableTop.appendChild(Kleur)\r\n tableTop.appendChild(Bloeiperiode)\r\n\r\n tableHead.appendChild(tableTop)\r\n\r\n\r\n // table monthes\r\n const tableMonths = document.createElement('tr')\r\n\r\n const emptyCol = document.createElement('td')\r\n emptyCol.setAttribute('colspan', '2')\r\n\r\n const monthsCol = document.createElement('td')\r\n const monthsDiv = document.createElement('div')\r\n monthsDiv.classList.add('months')\r\n\r\n months.forEach(month => {\r\n const monthBox = document.createElement('span')\r\n monthBox.classList.add('month-box')\r\n monthBox.classList.add('letter')\r\n monthBox.textContent = month\r\n\r\n monthsDiv.appendChild(monthBox)\r\n })\r\n\r\n monthsCol.appendChild(monthsDiv)\r\n\r\n tableMonths.appendChild(emptyCol)\r\n tableMonths.appendChild(monthsCol)\r\n\r\n tableHead.appendChild(tableMonths)\r\n }", "function generateHeadingSelector(headingIndexingLevel) {\n let headingsSelector = 'h1';\n for (let i = 2; i <= headingIndexingLevel; i += 1) {\n headingsSelector += `, h${i}`;\n }\n return headingsSelector;\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}", "function summaryTableHeader(header) {\n var newRow = header.insertRow(-1);\n newRow.className = \"tablesorter-no-sort\";\n var cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Requests\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 3;\n cell.innerHTML = \"Executions\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 6;\n cell.innerHTML = \"Response Times (ms)\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 1;\n cell.innerHTML = \"Throughput\";\n newRow.appendChild(cell);\n\n cell = document.createElement('th');\n cell.setAttribute(\"data-sorter\", false);\n cell.colSpan = 2;\n cell.innerHTML = \"Network (KB/sec)\";\n newRow.appendChild(cell);\n}" ]
[ "0.6722495", "0.66949224", "0.65797037", "0.63619673", "0.63292366", "0.63108075", "0.621045", "0.61502206", "0.61236465", "0.6111745", "0.6094731", "0.60766524", "0.6006179", "0.5971537", "0.59543294", "0.59520894", "0.59503317", "0.59446627", "0.59179926", "0.5911828", "0.59014165", "0.5896182", "0.5894793", "0.5867712", "0.5852045", "0.5845121", "0.58377224", "0.58221745", "0.58178955", "0.58102834", "0.579508", "0.5794537", "0.5794208", "0.57837737", "0.57757676", "0.57737434", "0.5768702", "0.5765757", "0.57595617", "0.5754103", "0.5752768", "0.5732379", "0.57300663", "0.57246834", "0.5723248", "0.57222337", "0.57201326", "0.5719348", "0.5716849", "0.57158834", "0.57110405", "0.5708754", "0.57077336", "0.5700826", "0.5693692", "0.56905514", "0.5685582", "0.5670403", "0.566598", "0.5656527", "0.5652525", "0.56380224", "0.56374997", "0.5634894", "0.56338406", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5630935", "0.5629464", "0.56237596", "0.56161904", "0.56161684", "0.56161684", "0.56161684", "0.5606754", "0.5588682", "0.5587366", "0.55803925", "0.55721295", "0.5568561", "0.5568561", "0.5568561", "0.5568561", "0.5568561", "0.5568561", "0.5568561", "0.5568561", "0.5568561", "0.5568561", "0.5568561", "0.5568561" ]
0.0
-1
Display the structure information collected by the content script
function updateSidebar (message) { let pageTitle = document.getElementById('page-title-content'); let headings = document.getElementById('headings-content'); if (typeof message === 'object') { const info = message.info; if (debug) { console.log('------------------------') console.log(`number of landmarks: ${info.landmarks.length}`); let count = 0; info.landmarks.forEach(landmark => console.log(`${++count}. ${landmark.role}: ${landmark.name}`)); console.log('------------------------') } // Update the page-title box pageTitle.innerHTML = getFormattedTitle(message); // Update the headings box if (info.headings.length) { headings.innerHTML = getFormattedHeadings(info.headings); listBox = new ListBox(headings, onListBoxAction); updateButton(true); } else { headings.innerHTML = `<div class="grid-message">${noHeadingElements}</div>`; } } else { pageTitle.textContent = message; headings.textContent = ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayContents() {\n\tif (contentsRequest.readyState === XMLHttpRequest.DONE) {\n\t\tif (contentsRequest.status === 200) {\n\t\t\tdocument.getElementById('tree').textContent = properties.showtree();\n\t\t\tdocument.getElementById('display').innerHTML = formatDirContents(contentsRequest.responseText);\n\t\t} else {\n\t\t\talert('There was a problem with the request.');\n\t\t}\n\t}\n}", "function contentProperties(){\r\nvar student = {name: \"David Aughan\", class: \"VI\", id: \"12\"};\r\nconsole.log (\"Show diferents properties: \\n\" + student.name + \"\\n\"+ student.class +\"\\n\" + student.id)\r\n}", "function displayData(dataStructure) {\n editorDisplay.innerHTML = `<pre class=\"display--data\"><code>${dataStructure}</code></pre>`;\n}", "function gotContent(data){\r\n let page = data.query.pages; \r\n //console.log(page);\r\n let pageID = Object.keys(data.query.pages)[0];\r\n console.log(pageID);\r\n\r\n let content = page[pageID].revisions[0][\"*\"];\r\n startOfContentChar = \"'''\"\r\n startCharIndex = content.search(startOfContentChar) + 3;\r\n console.log(startCharIndex);\r\n endCharIndex = startCharIndex + 200 + 1;\r\n description = content.substring(startCharIndex, endCharIndex) + '...'\r\n document.getElementById('contentDisplay').innerHTML =description;\r\n //console.log(content); \r\n // access summary brute force \r\n //let summary = page[pageID].revisions[0][\"*\"][10];\r\n //console.log('SUMMARY' + summary);\r\n }", "function printStructure( obj ){\r\tvar result = toStringObj( obj );\r\tif( result == null || result == undefined ) {\r\t\talert(\"non result\");\r\t\treturn;\r\t}\r\t\r\tvar outputPath = baseURL+ baseDir;\r\tvar filePath = outputPath;\r\t\r if(File.fs == \"Windows\" ) {\r filePath.replace(/([A-Za-z]+)\\:(.*)/,\"file:///\" +RegExp.$1+\"|\"+RegExp.$2 );\r filePath = \"file:///\" +RegExp.$1+\"|\"+RegExp.$2;\r }\r else {\r //dir.replace(/([A-Za-z]+)\\:(.*)/,\"file:///\" +RegExp.$1+\"|\"+RegExp.$2 );\r filePath = \"file://Macintosh HD\" + filePath;\r }\r\r var htmlFile = new File( outputPath + getNameRemovedExtendType(document) + \".html\");\r\thtmlFile.open(\"w\");\r\thtmlFile.encoding = \"utf-8\";\r \r var cssFileName = getNameRemovedExtendType(document) + \".css\";\r var cssFile = new File( outputPath + cssFileName);\r\tcssFile.open(\"w\");\r\tcssFile.encoding = \"utf-8\";\r var css = [];\r var html = [\r '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">',\r'<html>',\r'\t<head>',\r'\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />',\r'\t\t<title></title>',\r'\t\t<link rel=\"stylesheet\" charset=\"utf-8\" href=\"' + cssFileName + '\" media=\"all\" />',\r'\t</head>',\r'\t<body>'];\r \r css.push('.artlayer { position: absolute; overflow: hidden; }');\r css.push('.text { position: absolute; }');\r for (var i=0,l=obj.length;i<l;i++)\r {\r if (obj[i].type == \"image\")\r {\r html.push('\t\t<div id=\"image' + i + '\" class=\"artlayer\"></div>');\r css.push('#image' + i + ' { left:' + parseInt( obj[i].position[0] ) +'px; top: ' + parseInt( obj[i].position[1] ) +'px; width: ' + obj[i].width + 'px; height: ' + obj[i].height + 'px; background-image: url(\"' + unescape(obj[i].filename) + '\"); background-size: ' + obj[i].width + 'px ' + obj[i].height + 'px; }');\r }\r else\r {\r html.push('\t\t<div id=\"text' + i + '\" class=\"text\">' + obj[i].text +'</div>');\r css.push('#text' + i + ' { left:' + parseInt( obj[i].position[0] ) +'px; top: ' + parseInt( obj[i].position[1] ) +'px; width: ' + obj[i].width + 'px; height: ' + obj[i].height + 'px; }');\r }\r }\r \r html.push('\t</body>');\r html.push('</html>');\r htmlFile.write(html.join(\"\\n\"));\r htmlFile.close();\r cssFile.write(css.join(\"\\n\"));\r cssFile.close();\r \r}", "function displayNodeDetails(d) { \n $(\"#node-details\").empty();\n $(\"#node-details\").append('<h4>' + d.name + '</h4>');\n $(\"#node-details\").append('<hr>');\n $(\"#node-details\").append('<p><b>PSI:</b> ' + (d.psi ? d.psi : 0) + '</p>');\n $(\"#node-details\").append('<p><b>Size:</b> ' + (d.value ? d.value : 0) + '</p>');\n $(\"#node-details\").append('<p><b>Depth:</b> ' + d.depth + '</p>');\n if (d.children) {\n $(\"#node-details\").append('<p><b>Number of children:</b> ' + (d.children.length ? d.children.length : 0) + '</p>'); \n }\n if (d.parent.name) {\n $(\"#node-details\").append('<p><b>Parent:</b> ' + d.parent.name + '</p>'); \n } \n}", "function _renderCourseInfoMain() {\n\t\tpage.title.innerHTML = 'Expectations and FAQs for ' + settings.fulllayout.fullname;\n\t\tpage.title.style.display = 'block';\n\n\t\t_renderCourseInfoSubsections(page.contents);\n\t}", "function displayInfo(element) {\n const container = document.getElementById('container');\n const divInfo = createAndAppend('div', container, {\n id: 'leftSide',\n class: 'left-div whiteframe',\n });\n // Table info\n createAndAppend('table', divInfo, { id: 'table' });\n const table = document.getElementById('table');\n createAndAppend('tbody', table, { id: 'tbody' });\n function createTableRow(label, description) {\n const tableR = createAndAppend('tr', table);\n createAndAppend('td', tableR, { text: label, class: 'label' });\n createAndAppend('td', tableR, { text: description });\n }\n\n createTableRow('Repository: ', element.name);\n createTableRow('Description: ', element.description);\n createTableRow('Forks : ', element.forks);\n const newDate = new Date(element.updated_at).toLocaleString();\n createTableRow('Updated: ', newDate);\n }", "function displayContent(tag) {\n\t\n\tvar pagedisplay = document.getElementsByClassName(\"pagedisplay\")[0];\n\t\n\tswitch(tag) {\n\t\tcase \"projects\":\n\t\t\tvar projects = getProjects();\n\t\t\temptyDiv(\"pagedisplay\");\n\t\t\tpagedisplay.appendChild(projects);\n\t\t\tbreak;\n\t\tcase \"aboutus\":\n\t\t\tvar aboutus = getAboutUs();\n\t\t\temptyDiv(\"pagedisplay\");\n\t\t\tpagedisplay.appendChild(aboutus);\n\t\t\tbreak;\n\t\tcase \"becomemember\":\n\t\t\tvar becomemember = getBecomeMember();\n\t\t\temptyDiv(\"pagedisplay\");\n\t\t\tpagedisplay.appendChild(becomemember);\n\t\t\tbreak;\n\t\tcase \"members\":\n\t\t\tvar membersarea = getMembers();\n\t\t\temptyDiv(\"pagedisplay\");\n\t\t\tpagedisplay.appendChild(membersarea);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}", "function displayContent(tag) {\n\t\n\tvar pagedisplay = document.getElementsByClassName(\"pagedisplay\")[0];\n\t\n\tswitch(tag) {\n\t\tcase \"updateadmin\":\n\t\t\tvar admin = getAdmin();\n\t\t\temptyDiv(\"pagedisplay\");\n\t\t\tpagedisplay.appendChild(admin);\n\t\t\tgetAdminValues().then(function(success) {\n\t\t\t\tdocument.getElementsByName(\"adminemail\")[0].placeholder = success;\n\t\t\t}, function(error) { /* none */ });\n\t\t\tbreak;\n\t\tcase \"updatemembers\":\n\t\t\tvar members = getMembers();\n\t\t\temptyDiv(\"pagedisplay\");\n\t\t\tpagedisplay.appendChild(members);\n\t\t\tbreak;\n\t\tcase \"updateprojects\":\n\t\t\tvar projects = getProjects();\n\t\t\temptyDiv(\"pagedisplay\");\n\t\t\tpagedisplay.appendChild(projects);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}", "function course_articles_page() {\n try {\n var content = {};\n content.welcome = {\n \tmarkup: '<p style=\"text-align: center;\">' +\n \tt('Select a course for more information') +\n \t'</p>'\n \t\t\t};\n content['course_list'] = {\n theme: 'view',\n format: 'unformatted_list',\n path: 'json-out/course', /* the path to the view in Drupal */\n row_callback: 'course_articles_list_row',\n empty_callback: 'course_articles_list_empty',\n attributes: {\n id: 'course_list_view'\n }\n };\n return content;\n }\n catch (error) { console.log('course_articles_page - ' + error); }\n}", "info() {\n if (this.numOfPages > 0) {\n return this.title + '<br>' + ' by ' + this.author + '<br>' + this.numOfPages + ' pages';\n } \n return this.title + '<br>' + ' by ' + this.author + '<br>'; \n }", "generate() {\n let content = [];\n // add 'top' content above all other content\n if (this._top)\n content.push(this._addIdLinks(this._top), \"\");\n // piece all content together\n for (let i = 0; i < this.doc.content.length; i++) {\n let c = this.doc.content[i];\n // skip non-root namespace node\n if (c.id === this.doc.id + \".\" && i > 0)\n continue;\n // add horizontal line above all namespaced nodes\n if (c.spec.namespaced)\n content.push(\"---\", \"\");\n // add heading with icon and tag(s)\n let icon = \"/assets/icons/spec-\" + c.spec.type + \".svg\";\n let tags = \"\";\n if (c.spec.abstractModifier)\n tags += ` <span class=\"spec_tag\">abstract</span>`;\n if (c.spec.staticModifier)\n tags += ` <span class=\"spec_tag\">static</span>`;\n if (c.spec.protectedModifier)\n tags += ` <span class=\"spec_tag\">protected</span>`;\n if (c.spec.deprecated)\n tags += ` <span class=\"spec_tag spec_tag--deprecated\">deprecated</span>`;\n let name = this._getTypedName(c.spec).replace(/_/g, \"\\\\_\");\n content.push(`## ![](${icon})${name}${tags} {.spec ${navId(c.id)}}`, \"\");\n // add declaration spec and further documentation\n content.push(...(c.spec.spec && c.spec.type !== DeclarationFileParser_1.SpecNodeType.ClassDeclaration\n ? [\n \"\",\n c.spec.spec\n .split(\"\\n\")\n .map((s) => this._addIdLinks(\"`\" + s + \"`\"))\n .join(\"<br>\"),\n \"\",\n ]\n : c.spec.inherit\n ? [\n \"\",\n c.spec.inherit\n .map((s) => this._addIdLinks(\"`\" + s + \"`\"))\n .join(\"<code> </code>\"),\n \"\",\n ]\n : []));\n let params = [];\n let notes = [];\n for (let d of c.docs) {\n let txt = this._addIdLinks(d.doc).replace(/\\n(?!\\n)/g, \"\\n\\n\") + \"\\n\\n\";\n switch (d.tag) {\n case \"param\":\n params.push(`- \\`${d.name}\\` — ${txt}`);\n break;\n case \"return\":\n notes.push(`**Returns:** ${txt}`, \"\");\n break;\n case \"note\":\n notes.push(`**Note:** ${txt}`, \"\");\n break;\n case \"deprecated\":\n notes.push(`**Deprecated:** ${txt}`, \"\");\n break;\n default:\n notes.push(txt, \"\");\n }\n }\n content.push(...params, \"\", ...notes);\n // add miscellaneous content\n let misc = this._misc.getContentFor(c.id);\n if (misc) {\n content.push(this._addIdLinks(misc), \"\");\n }\n if (c.spec.spec && c.spec.type === DeclarationFileParser_1.SpecNodeType.ClassDeclaration) {\n content.push(\"### Constructor\", \"\", this._addIdLinks(\"`\" + c.spec.spec + \"`\"), \"\");\n }\n }\n // add nav and pageintro properties\n this._addNav();\n this._addPageIntro();\n // return markdown content itself\n return content;\n }", "function outputPageContent() {\n \n $('#APIdata').html(outhtml); // this prints the apidata in the blank div section in the html\n }", "function DisplayInfo(){\n\t$(\"#content\").html('');\n\t\n\t$(\"#content\").append(\"<div class='page-header'><h1>\"+Language[\"Hints\"]+\"</h1></div>\");\n\tif (Debug)\n\t\tAddWarning();\n\t$(\"#content\").append(Language[\"WelcomeText\"]);\n\t$(\"#content\").append(\"<a id='startTestButton' class='btn btn-primary btn-lg' role='button'>\"+Language[\"StartTest\"]+\"</a>\");\n\t$(\"#content\").fadeIn();\n\t$(\"#startTestButton\").click(function(){\n\t\tLoadQuestion(-1);\n\t});\n;}", "helpInfo () {\n\t\tlet me = this;\n\n\t\treturn [\n\t\t\t$('<h3>').append(\n\t\t\t\tt('Adicionar um novo equipamento à aventura')\n\t\t\t),\n\t\t\tEquipament.helpTypeMeaning()\n\t\t];\n\t}", "presentation() {\n\t\tconsole.log('Le personnage s\\'appelle : ' + this.NAME);\n\t\tconsole.log('current ID : ' + this.ID);\n\t\tconsole.log('IMG : ' + this.IMG);\n\t\tconsole.log('DESC : ' + this.DESC);\n\t\tconsole.log(\"-----------\");\n\t}", "function getInfoContent(infoSection) {\n // API Fetch\n fetch(\n \"https://cdn.contentful.com/spaces/9635uuvwn9dq/environments/master/entries?access_token=cgtQv23ag7qZw92QlPnJwslq6vWfK8sDwB8fNk62QTI&content_type=presentation\"\n )\n .then((resp) => resp.json())\n .then((data) => processInfo(data, infoSection));\n}", "function insertContentForMember() {\n /**\n * <div>Orbit Metrics (orbit level, reach, love)</div>\n */\n const detailsMenuOrbitMetrics = createOrbitMetrics(\n $orbit_level,\n $reach,\n $love\n );\n\n $detailsMenuElement.appendChild(detailsMenuOrbitMetrics);\n\n /**\n * <div>Tag list</div>\n */\n\n if ($tag_list.length > 0) {\n const detailsMenuTagList = createTagList($tag_list);\n\n $detailsMenuElement.appendChild(detailsMenuTagList);\n }\n\n /**\n * <span class=\"dropdown-divider\"></span>\n */\n const dropdownDivider1 = window.document.createElement(\"span\");\n dropdownDivider1.setAttribute(\"role\", \"none\");\n dropdownDivider1.classList.add(\"dropdown-divider\");\n $detailsMenuElement.appendChild(dropdownDivider1);\n\n /**\n * <span>Contributed X times to this repository</span>\n */\n if (isRepoInWorkspace) {\n const detailsMenuRepositoryContributions = createDropdownItem(\n $contributions_on_this_repo_total === 1\n ? \"First contribution to this repository\"\n : `Contributed ${getThreshold(\n $contributions_on_this_repo_total\n )} times to this repository`\n );\n $detailsMenuElement.appendChild(detailsMenuRepositoryContributions);\n }\n\n /**\n * <span>Contributed Y times to Z repository</span>\n */\n const detailsMenuTotalContributions = createDropdownItem(\n `Contributed ${getThreshold($contributions_total)} times on GitHub`\n );\n $detailsMenuElement.appendChild(detailsMenuTotalContributions);\n\n /**\n * <span class=\"dropdown-divider\"></span>\n */\n const dropdownDivider2 = window.document.createElement(\"span\");\n dropdownDivider2.setAttribute(\"role\", \"none\");\n dropdownDivider2.classList.add(\"dropdown-divider\");\n $detailsMenuElement.appendChild(dropdownDivider2);\n\n /**\n * <a href=\"…\">Add to to X’s content</a>\n */\n const detailsMenuLinkContent = window.document.createElement(\"a\");\n detailsMenuLinkContent.setAttribute(\"aria-label\", \"See profile on Orbit\");\n detailsMenuLinkContent.setAttribute(\"role\", \"menuitem\");\n detailsMenuLinkContent.classList.add(\n \"dropdown-item\",\n \"dropdown-item-orbit\",\n \"btn-link\"\n );\n detailsMenuLinkContent.textContent = `Add to ${gitHubUsername}’s content`;\n detailsMenuLinkContent.addEventListener(\"click\", handleAddCommentToMember);\n $detailsMenuElement.appendChild(detailsMenuLinkContent);\n\n /**\n * <a href=\"…\">See X’s profile on Orbit</a>\n */\n const detailsMenuLinkProfile = window.document.createElement(\"a\");\n detailsMenuLinkProfile.setAttribute(\"aria-label\", \"See profile on Orbit\");\n detailsMenuLinkProfile.setAttribute(\"role\", \"menuitem\");\n detailsMenuLinkProfile.setAttribute(\n \"href\",\n `${ORBIT_API_ROOT_URL}/${normalizedWorkspace}/members/${gitHubUsername}`\n );\n detailsMenuLinkProfile.setAttribute(\"target\", \"_blank\");\n detailsMenuLinkProfile.setAttribute(\"rel\", \"noopener\");\n detailsMenuLinkProfile.classList.add(\n \"dropdown-item\",\n \"dropdown-item-orbit\",\n \"btn-link\"\n );\n detailsMenuLinkProfile.textContent = `See ${gitHubUsername}’s profile on Orbit`;\n $detailsMenuElement.appendChild(detailsMenuLinkProfile);\n }", "function displayDOM(){\r\n\t\tvar str = '';\r\n\t\tcontainer.getChildren().each(function(item){\r\n\t\t\tstr += '<div style=\"' + item.style.cssText + '\">' + item.get('text') + '</div>\\n';\r\n\t\t});\r\n\t\tdocument.id('output').set('text', str);\r\n\t}", "static get_info() { \n\treturn {\n\t id : id , \n\t rules : [ \"get text chunk\"],\n\t vars : null \n\t}\n }", "function showContent(obj) {\n const content = `\n <section class=\"content-card\">\n <h2 class=\"card-title\" id=\"card-title\">${obj.name}</h2>\n <div class=\"card-info\">\n <img src=\"${obj.img}\" alt=\"img\" class=\"card-img\" id=\"card-img\">\n <p class=\"card-text\" id=\"card-text\">${obj.text}</p>\n </div>\n </section>\n `;\n mainContent.innerHTML = content;\n }", "function info() {\n\tseperator();\n\tOutput('<span>>info:<span><br>');\n\tOutput('<span>Console simulator by Mario Duarte https://codepen.io/MarioDesigns/pen/JbOyqe</span></br>');\n}", "function loadStructureHandler(text)\r\n\t{\r\n\t var content = text.split(\"\\n\");\r\n\t //console.log(content[1]);\r\n\t BuildStructure(name,content,callback, new ProgressDialog(\"Assimilating PDB file \"+name+\"...\"));\r\n\t}", "function displayInfo(raw){\n var info = document.getElementById('info');\n while(info.hasChildNodes()){\n info.removeChild(info.childNodes[0]);\n }\n if(typeof(raw)=='string'){\n info.innerHTML = raw;\n return;\n } \n // Triggers:\n if(raw.house){\n // ID and Label\n var d0 = document.createElement('div');\n d0.innerHTML = `\n <div class='listItem'>Name:&nbsp;${raw.label}</div>\n <div class='listItem'>ID:&nbsp;${raw.id}</div>\n `;\n \n var d1 = document.createElement('details');\n var s1 = document.createElement('summary');\n s1.innerHTML = 'Basic Info';\n d1.appendChild(s1);\n d1.open = true;\n const tags = raw.tags.join(',&nbsp')\n repeatType = raw.repeat==0 ? 'one time OR' : raw.repeat==1 ? 'one time AND' : 'repeating OR' ;\n d1.innerHTML += `\n <div class='listItem'>House: ${raw.house}</div> \n <div class='listItem'>Repeat: ${raw.repeat} (${repeatType})</div>\n <div class='listItem'>Tags: ${tags} </div>`\n if(raw.link.trim() != '<none>'){\n console.log(raw.link);\n d1.innerHTML += `\n <div class='listItem'>Link Trigger: ${raw.link}</div>`\n }\n easy = raw.easy?'green':'red';\n normal = raw.normal?'green':'red';\n hard = raw.hard?'green':'red';\n disabled = raw.disabled?'red':'green';\n d1.innerHTML += `<div class='listItem'>Difficulty:&nbsp;<span class='${easy}'>Easy</span>&nbsp;&nbsp;<span class='${normal}'>Normal</span>&nbsp;&nbsp;<span class='${hard}'>Hard</span></div>`;\n d1.innerHTML += `<div class='listItem'>Disabled:&nbsp;<span class='${disabled}'>${raw.disabled?\"True\":\"False\"}</span></div>`;\n \n // events\n var d2 = document.createElement('details');\n var s2 = document.createElement('summary');\n s2.innerHTML = `Events`;\n d2.appendChild(s2);\n d2.open = true;\n\n for(var i=0;i<raw.events.length;i++){\n var t = raw.events[i].type;\n var d = document.createElement('div');\n d.className = 'listItem';\n d.innerHTML += `Event ${i}: ${events[t].name}`;\n d.title = `${t}: ${events[t].description}`;\n // check if the events type has more than 2 variables in its parameter\n if(events[t].p[0] > 0){\n d.innerHTML += ` ${raw.events[i].p[0]} ${raw.events[i].p[1]}`;\n }else{\n d.innerHTML += ` ${raw.events[i].p[0]}`\n }\n d2.appendChild(d);\n }\n\n //actions\n var d3 = document.createElement('details');\n var s3 = document.createElement('summary');\n s3.innerHTML = `Actions`;\n d3.appendChild(s3);\n d3.open = true;\n for(var i=0;i<raw.actions.length;i++){\n var t = raw.actions[i].type;\n var d = document.createElement('div');\n d.innerHTML += `Action ${i}: ${actions[t].name}`;\n d.className = 'listItem';\n d.title = `${t}: ${actions[t].description}`;\n for(j=0;j<7;j++){\n if(actions[t].p[j]>0){\n if(j!=6) d.innerHTML += ` ${raw.actions[i].p[j]}`;\n else d.innerHTML += ` @${wp(raw.actions[i].p[j])}`;\n }\n }\n d3.appendChild(d);\n }\n info.appendChild(d0);\n info.appendChild(d1);\n info.appendChild(d2);\n info.appendChild(d3);\n /*\n var d4 = document.createElement('details');\n var s4 = document.createElement('summary');\n s4.className = 'collapsible';\n s4.innerHTML = 'Neighbouring Nodes'\n \n d4.appendChild(s4);\n for(var item of raw.neighbour){\n var d = document.createElement('div');\n d.className = 'listItem';\n d.innerHTML = `neighbour: ${item}`;\n d4.appendChild(d);\n }\n info.appendChild(d4);*/\n \n }else{\n info.innerHTML = `\n Variable <br> \n Name:&nbsp;${raw.label}<br>\n ID:&nbsp;${raw.id}<br>\n Initial Value:&nbsp;${raw.initValue}`;\n \n }\n}", "initializeDisplay() {\n for ( let i = 0; i < this['$content'].data.length; i++ ) {\n this['$content'].display[i] = {};\n }\n }", "function node_page_pageshow() {\n try {\n // Grab some recent content and display it.\n views_datasource_get_view_result(\n 'drupalgap/views_datasource/drupalgap_content', {\n success: function(content) {\n // Extract the nodes into items, then drop them in the list.\n var items = [];\n for (var index in content.nodes) {\n if (!content.nodes.hasOwnProperty(index)) { continue; }\n var object = content.nodes[index];\n items.push(l(object.node.title, 'node/' + object.node.nid));\n }\n drupalgap_item_list_populate('#node_listing_items', items);\n }\n }\n );\n }\n catch (error) { console.log('node_page_pageshow - ' + error); }\n}", "function display_vt(id, content) {\n try {\n json = JSON.parse(content);\n console.log(json);\n count = json.length; //count how many entries are in the JSON array\n var vt = \"\";\n var i;\n if (count == 0 || count == null) {\n vt = \"No VirusTotal Resolution Entries for IP\";\n } else {\n for (i=0; i < count; i++) {\n vt += \"Resolution \" \n + (i+1) \n + \": <br><div class='lead'>\" \n + json[i].attributes.host_name \n + \"</div><br>\\n\";\n }\n }\n } catch (e) {\n console.log(\"Error \" + e + \"Parsing VT JSON\");\n vt = \"Error retrieving Data\";\n } \n\n document.getElementById(id).innerHTML = vt;\n}", "function getInfoContent() {\n return [\n '# Using distributed files',\n '',\n 'All plotly.js bundles inject an object `Plotly` into the global scope.',\n '',\n 'Import plotly.js as:',\n '',\n '```html',\n '<script src=\"plotly.min.js\"></script>',\n '```',\n '',\n 'or the un-minified version as:',\n '',\n '```html',\n '<script src=\"plotly.js\" charset=\"utf-8\"></script>',\n '```',\n '',\n '### To include localization',\n '',\n 'Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.',\n 'Many other localizations are available - here is an example using Swiss-German (de-CH),',\n 'see the contents of this directory for the full list.',\n 'Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.',\n '',\n '*After* the plotly.js script tag, add:',\n '',\n '```html',\n '<script src=\"plotly-locale-de-ch.js\"></script>',\n '<script>Plotly.setPlotConfig({locale: \\'de-CH\\'})</script>',\n '```',\n '',\n 'The first line loads and registers the locale definition with plotly.js, the second sets it as the default for all Plotly plots.',\n 'You can also include multiple locale definitions and apply them to each plot separately as a `config` parameter:',\n '',\n '```js',\n 'Plotly.newPlot(graphDiv, data, layout, {locale: \\'de-CH\\'})',\n '```',\n ''\n ];\n}", "function displayAll() {\n\n\t// get information\n\tvar firstCorpus = getFirstCorpus();\n\tvar firstAlignType = getFirstAlignType();\n\tif (firstCorpus === 'error') console.log(\"[Error] 存取文獻集名稱錯誤,系統上已無文本。\");\n\tif (firstAlignType === 'error') console.log(\"[Error] 存取段落對讀設定錯誤,系統上已無文本。\");\n\n\t// para setting\n\t_para['metadata'] = 'filename';\n\t_para['aligntype'] = firstAlignType;\n\t_para['corpus'] = firstCorpus;\n\t_para['mode'] = 'DocOrder';\n\n\t// display\n\tdisplayDocuManager();\n\tdisplayMetadataList(_para['metadata']);\n\tdisplayAlignTypeList(_para['aligntype']);\n\tdisplaySearchCorpus(_para['corpus']);\n\tdisplaySearchMode(_para['mode']);\n\tdisplayCompareContent(_para['metadata'], _para['aligntype']);\n}", "function info_html(alist){\n\n var output = '';\n// output = output + '<div class=\"block\">';\n// output = output + '<h2>Intersection Information</h2>';\n output = output + group_info_html(alist); \n output = output + term_info_html(alist); \n output = output + gp_info_html(alist);\n// output = output + '</div>';\n return output;\n}", "displayInfo() {\n\t\t\tlet info = super.displayInfo() + ', разработчики: ' + this.getDevelopers() ;\n\t\t\tconsole.log( info );\n\t\t\treturn info\n\t\t\t}", "ShowDetails(typetype, dietype, sizetype) {\n let desc = `This is ${this.name} and they are a ${this.GetType(typetype)}. This creature has a ${this.GetDiet(dietype)}. ${this.name} is a ${this.GetSize(sizetype)} organism.`;\n }", "function node_page_pageshow() {\n try {\n // Grab some recent content and display it.\n views_datasource_get_view_result(\n 'drupalgap/views_datasource/drupalgap_content', {\n success: function(content) {\n // Extract the nodes into items, then drop them in the list.\n var items = [];\n $.each(content.nodes, function(index, object) {\n items.push(l(object.node.title, 'node/' + object.node.nid));\n });\n drupalgap_item_list_populate('#node_listing_items', items);\n }\n }\n );\n }\n catch (error) { console.log('node_page_pageshow - ' + error); }\n}", "function showInitialContent() {\n\n articleData('workingArea','initialContent.xml', 'initial.xsl');\n}", "function build_protein_info_panel(data, div) {\n div.empty();\n var protein = data.controller.get_current_protein();\n div.append(protein['description']);\n div.append(\"<br>----<br>\");\n div.append(dict_html(protein['attr']));\n}", "function displayPost() {\n console.log('Post Title');\n console.log('Post Content');\n}", "function displayDoctors() {\n\n // Reading Doctors file.\n var d = readFromJson('doc');\n\n // For loop to run till all the doctor's are printed.\n for (var i = 0; i < d.doctors.length; i++) {\n\n // Printing doctor's id, name & speciality.\n console.log(d.doctors[i].id + \". \" + d.doctors[i].name + \" (\" + d.doctors[i].special + \")\");\n }\n}", "display() {\n let o = {\n data: {},\n rawData: ''\n };\n this.getAllTrie(this.head, '', o, true);\n }", "function renderInfo(name, description){\n $name.textContent = name\n $description.textContent = description\n}", "function _display(){\n\t\t\t$(levelID).html(level);\n\t\t\t$(pointsID).html(points);\n\t\t\t$(linesID).html(lines);\n\t\t}", "function renderDataStructuresVersion1(curEntry, vizDiv) {\n // render data structures:\n\n $(vizDiv).empty(); // jQuery empty() is better than .html('')\n\n // render locals on stack:\n if (curEntry.stack_locals != undefined) {\n $.each(curEntry.stack_locals, function (i, frame) {\n var funcName = htmlspecialchars(frame[0]); // might contain '<' or '>' for weird names like <genexpr>\n var localVars = frame[1];\n\n $(vizDiv).append('<div class=\"vizFrame\">Local variables for <span style=\"font-family: Andale mono, monospace;\">' + funcName + '</span>:</div>');\n\n // render locals in alphabetical order for tidiness:\n var orderedVarnames = [];\n\n // use plain ole' iteration rather than jQuery $.each() since\n // the latter breaks when a variable is named \"length\"\n for (varname in localVars) {\n orderedVarnames.push(varname);\n }\n orderedVarnames.sort();\n\n if (orderedVarnames.length > 0) {\n $(vizDiv + \" .vizFrame:last\").append('<br/><table class=\"frameDataViz\"></table>');\n var tbl = $(\"#pyOutputPane table:last\");\n $.each(orderedVarnames, function(i, varname) {\n var val = localVars[varname];\n tbl.append('<tr><td class=\"varname\"></td><td class=\"val\"></td></tr>');\n var curTr = tbl.find('tr:last');\n if (varname == '__return__') {\n curTr.find(\"td.varname\").html('<span style=\"font-size: 10pt; font-style: italic;\">return value</span>');\n }\n else {\n curTr.find(\"td.varname\").html(varname);\n }\n renderData(val, curTr.find(\"td.val\"), false);\n });\n\n tbl.find(\"tr:last\").find(\"td.varname\").css('border-bottom', '0px');\n tbl.find(\"tr:last\").find(\"td.val\").css('border-bottom', '0px');\n }\n else {\n $(vizDiv + \" .vizFrame:last\").append(' <i>none</i>');\n }\n });\n }\n\n\n // render globals LAST:\n\n $(vizDiv).append('<div class=\"vizFrame\">Global variables:</div>');\n\n var nonEmptyGlobals = false;\n var curGlobalFields = {};\n if (curEntry.globals != undefined) {\n // use plain ole' iteration rather than jQuery $.each() since\n // the latter breaks when a variable is named \"length\"\n for (varname in curEntry.globals) {\n curGlobalFields[varname] = true;\n nonEmptyGlobals = true;\n }\n }\n\n if (nonEmptyGlobals) {\n $(vizDiv + \" .vizFrame:last\").append('<br/><table class=\"frameDataViz\"></table>');\n\n // render all global variables IN THE ORDER they were created by the program,\n // in order to ensure continuity:\n //\n // TODO: in the future, the back-end can actually pre-compute this\n // list so that the front-end doesn't have to do any extra work!\n\n var orderedGlobals = []\n\n // iterating over ALL instructions (could be SLOW if not for our optimization below)\n for (var i = 0; i <= curInstr; i++) {\n // some entries (like for exceptions) don't have GLOBALS\n if (curTrace[i].globals == undefined) continue;\n\n // use plain ole' iteration rather than jQuery $.each() since\n // the latter breaks when a variable is named \"length\"\n for (varname in curTrace[i].globals) {\n // eliminate duplicates (act as an ordered set)\n if ($.inArray(varname, orderedGlobals) == -1) {\n orderedGlobals.push(varname);\n curGlobalFields[varname] = undefined; // 'unset it'\n }\n }\n\n var earlyStop = true;\n // as an optimization, STOP as soon as you've found everything in curGlobalFields:\n for (o in curGlobalFields) {\n if (curGlobalFields[o] != undefined) {\n earlyStop = false;\n break;\n }\n }\n\n if (earlyStop) {\n break;\n }\n }\n\n var tbl = $(\"#pyOutputPane table:last\");\n\n // iterate IN ORDER (it's possible that not all vars are in curEntry.globals)\n $.each(orderedGlobals, function(i, varname) {\n var val = curEntry.globals[varname];\n // (use '!==' to do an EXACT match against undefined)\n if (val !== undefined) { // might not be defined at this line, which is OKAY!\n tbl.append('<tr><td class=\"varname\"></td><td class=\"val\"></td></tr>');\n var curTr = tbl.find('tr:last');\n curTr.find(\"td.varname\").html(varname);\n renderData(val, curTr.find(\"td.val\"), false);\n }\n });\n\n tbl.find(\"tr:last\").find(\"td.varname\").css('border-bottom', '0px');\n tbl.find(\"tr:last\").find(\"td.val\").css('border-bottom', '0px');\n }\n else {\n $(vizDiv + \" .vizFrame:last\").append(' <i>none</i>');\n }\n\n}", "displayFolderStructure() {\n // Set the app to loading\n this.isLoading = true;\n\n // Create an empty object\n const structure = {\n\tfolders: [],\n\tfiles: []\n }\n \n // Get the structure\n this.getFolderStructure(this.path).then(data => {\n\n\tfor (let entry of data) {\n\t // Check \".tag\" prop for type\n\t if(entry['.tag'] == 'folder') {\n\t structure.folders.push(entry);\n\t } else {\n\t structure.files.push(entry);\n\t }\n\t}\n\n\t// Update the data object\n\tthis.structure = structure;\n\tthis.isLoading = false;\n });\n }", "function dataHandle(data){\n\t\tdisplayed = true;\n\t\tvar sample = data.configurations;\n\t\tfor (var i = 0; i < sample.length; i++) {\n\t\t\tvar block = \"<ul><li><b>Name: </b>\" + sample[i].name + \"</li>\" +\n\t\t\t\t\t\t\"<li><b>Hostname: </b>\" + sample[i].hostname + \"</li>\" +\n\t\t\t\t\t\t\"<li><b>Port: </b>\" + sample[i].port + \"</li>\" +\n\t\t\t\t\t\t\"<li><b>Username: </b>\" + sample[i].username + \"</li>\" +\n\t\t\t\t\t\t\"</ul>\";\n\t\t\t$(\"#jquerycontent\").append(block);\n\t\t\t$(\"#jquerycontent\").css('display', 'block');\n\t\t}\n\t}", "function displayHeader() {\n log(chalk.yellow(figlet.textSync('Nodewood', { horizontalLayout: 'full' })));\n\n const packageObj = readJsonSync(resolve(__dirname, '../package.json'));\n log(`CLI Version ${packageObj.version}`);\n\n if (existsSync(resolve(process.cwd(), 'wood/package.json'))) {\n const nodewoodObj = readJsonSync(resolve(process.cwd(), 'wood/package.json'));\n log(`Library Version ${nodewoodObj.version}`);\n }\n\n log(''); // Final newline\n}", "prettify(){\n const contents = this.contents.map((o)=>{\n return o.prettify();\n });\n\n return {\n x: this.position.x,\n y: this.position.y,\n type: privateMembers.get(this).type,\n isBlocked: this.isBlocked,\n contents: contents\n };\n }", "function setup_showInfo() {\n\tdocument.getElementById(\"basic\").style.display = \"none\";\n\tdocument.getElementById(\"create\").style.display = \"none\";\n\tdocument.getElementById(\"source\").style.display = \"none\";\n\tdocument.getElementById(\"info\").style.display = \"block\";\n}", "function contents() {\n\n let tube_amp1 = { model: \"Marshall JCM800\", wattage: \"100W\"},\n tube_amp2 = { model: \"Fender '65 Twin Reverb\", wattage: \"85W\"};\n\n console.log(\"Amplifier Model: \" + tube_amp1.model + \" --- Total Wattage: \" + tube_amp1.wattage);\n console.log(\"Amplifier Model: \" + tube_amp2.model + \" --- Total Wattage: \" + tube_amp2.wattage);\n}", "function showExtensionDetails(name) {\n if ($('#extension_details').is(':visible') == false) {\n $('#extension_details').slideDown();\n }\n //The 'extensions' dict is loaded onto pages that have it\n //TODO: this is hacky and should be properly loaded in\n extDetails = extensions[name]\n\n $('#ext_description').text(extDetails.Description)\n $('#ext_author').text(extDetails.Author)\n\n}", "function loadInfo() {\r\n\t\tvar info = JSON.parse(this.responseText);\r\n\t\tdocument.getElementById(\"title\").innerHTML = info.title;\r\n\t\tdocument.getElementById(\"author\").innerHTML = info.author;\r\n\t\tdocument.getElementById(\"stars\").innerHTML = info.stars;\r\n\t}", "function info(d) {\n\n // Always first hide detail link\n $(\"#node_detail\").addClass(\"hidden\");\n $(\"#node_task\").addClass(\"hidden\")\n $(\"#node_contrast\").addClass(\"hidden\")\n $(\"#node_concepts\").addClass(\"hidden\")\n \n // Update the interface with name and description\n if (d.meta[0].description){\n $(\"#node_description\").text(d.meta[0].description);\n } else {\n $(\"#node_description\").text(\"\");\n }\n // Download Link\n if (d.meta[0].download){\n $(\"#node_download\").attr(\"href\",d.meta[0].download);\n $(\"#node_download\").removeClass(\"hidden\");\n } else {\n $(\"#node_download\").addClass(\"hidden\");\n }\n\n // Image Thumbnail\n if (d.meta[0].thumbnail){\n $(\"#node_image\").attr(\"src\",d.meta[0].thumbnail)\n $(\"#node_image_holder\").attr(\"href\",d.meta[0].url)\n $(\"#node_image_holder\").removeClass(\"hidden\")\n } else {\n $(\"#node_image_holder\").addClass(\"hidden\")\n }\n\n // ##### COGNITIVE ATLAS CONCEPT\n if (d.meta[0].type == \"concept\"){\n\n // Concept Name\n $(\"#node_name\").text(d.name);\n $(\"#node_name_link\").attr(\"href\",\"concept.html?id=\" + d.nid);\n \n // Always remove all collection tags\n $(\".collection_tag\").remove();\n\n // Reverse Inference scores and counts\n if (d.meta[0].scores){\n $(\"#scores\").removeClass(\"hidden\");\n $(\"#scores_count_in\").text(d.meta[0].scores[0].count_in);\n $(\"#scores_count_out\").text(d.meta[0].scores[0].count_out);\n $(\"#scores_binary_bayes\").text(d.meta[0].scores[0].ri_binary_bayes);\n $(\"#scores_binary_score_in\").text(d.meta[0].scores[0].ri_binary_score_in);\n $(\"#scores_binary_score_out\").text(d.meta[0].scores[0].ri_binary_score_out);\n $(\"#scores_binary_threshold\").text(d.meta[0].scores[0].ri_binary_threshold);\n $(\"#scores_range_bayes\").text(d.meta[0].scores[0].ri_range_bayes);\n $(\"#scores_range_score_in\").text(d.meta[0].scores[0].ri_range_score_in);\n $(\"#scores_range_score_out\").text(d.meta[0].scores[0].ri_range_score_out);\n $(\"#scores_score_binary\").text(d.meta[0].scores[0].ri_score_binary);\n //$(\"#scores_score_range\").text(d.meta[0].scores[0].ri_score_ranges);\n } else {\n $(\"#scores\").addClass(\"hidden\");\n }\n // Associated image set\n if (d.meta[0].images) {\n\n // We will show the concept details page\n $(\"#node_details\").attr(\"href\",\"concept.html?id=\" + d.nid);\n $(\"#node_details\").removeClass(\"hidden\")\n\n // We will show the images modal\n $(\"#node_images\").removeClass(\"hidden\");\n \n var collections = []\n // Add images to the modal\n $.each(d.meta[0].images, function(index,url) {\n var collection_id = url.split(\"images/\")[1].split(\"/\")[0]\n var image_link = url.split(\"/media\")[0] + \"/images/\" + url.split(\"/glass_brain_\")[1].split(\".\")[0]\n $('#brain_maps').prepend('<a href=\"'+ image_link +'\" target=\"_blank\"><img class=\"brain_map_image collectionID' + collection_id + '\" src=\"' + url +'\" width=\"200px\" /></a>');\n collections.push(collection_id)\n });\n\n // Get unique collections to render\n collections = $.unique(collections)\n\n // Update Modal Title\n $(\".modal-title\").text(\"images tagged with \" + d.name)\n\n // Add tags to hide/show collection images\n $('#collection_tags').prepend('<button type=\"button\" class=\"btn btn-xs btn-primary collection_tag\" onclick=showAllCollections() >reset</button>');\n $.each(collections, function(index,collection) {\n $('#collection_tags').prepend('<button type=\"button\" class=\"btn btn-xs btn-default collection_tag\" onclick=highlightCollection(' + collection + ')>'+ collection +'</button>');\n });\n\n } else {\n // Hide the modal, remove all images from it\n $(\"#node_images\").addClass(\"hidden\");\n $(\".brain_map_image\").remove();\n } \n\n \n // ##### NEUROVAULT IMAGE\n } else {\n\n // Start by removing all old concepts\n $(\".ca_concept\").remove()\n $(\"#node_images\").addClass(\"hidden\")\n $(\".brain_map_image\").remove();\n $(\"#scores\").addClass(\"hidden\"); \n\n // Name should have link\n $(\"#node_name\").text(d.name);\n $(\"#node_name_link\").attr(\"href\",\"neurovault.html?id=\" + d.name);\n\n // Link to detail page\n $(\"#node_details\").attr(\"href\",\"neurovault.html?id=\" + d.name);\n $(\"#node_details\").removeClass(\"hidden\");\n\n $(\"#node_task\").text(d.meta[0].task)\n $(\"#node_contrast\").text(d.meta[0].contrast)\n $(\"#node_task\").removeClass(\"hidden\")\n $(\"#node_contrast\").removeClass(\"hidden\")\n\n // Show list of concepts\n var concepts = d.meta[0].concept;\n concepts = $.unique(concepts)\n \n $.each(concepts, function(index,concept) {\n $('#node_concepts').prepend('<button class=\"btn btn-xs btn-default ca_concept\">'+ concept +'</button>');\n });\n $('#node_concepts').prepend('<h2 class=\"ca_concept\">Concepts</h2>');\n $(\"#node_concepts\").removeClass(\"hidden\")\n\n }\n }", "function content() \n\t{\n\t\t// init render\n\t\tvar forms = document.forms;\n\t\tvar links = document.querySelectorAll(\"a:not(.\"+Flink.settings.namespace+\")\");\n\t\tvar data = {\n\t\t\tForms: {\n\t\t\t\ttext: Say(\"Forms\")\n\t\t\t\t, value: \"<span class=\\\"count\\\">\" + forms.length + \"</span>\"\n\t\t\t}\n\t\t\t, Links: {\n\t\t\t\ttext: Say(\"Links\")\n\t\t\t\t, value: \"<span class=\\\"count\\\">\" + links.length + \"</span>\"\n\t\t\t}\n\t\t};\n\t\tvar template = {\n\t\t\trow: \"<tr>\"\n\t\t\t\t+ \"<td>\"\n\t\t\t\t\t+ \"<a class=\\\"%style%\\\"\"\n\t\t\t\t\t+ ' onclick=\"Flink[\\'%key%\\'].call()\">%text%</a>'\n\t\t\t\t\t+ \" <span style=\\\"float:right\\\">%value%</span>\"\n\t\t\t\t\t+ \"</td>\"\n\t\t\t\t+ \"</tr>\"\n\t\t}\n\t\t\n\t\tvar r = [];\t\t\n\t\tr.push( \"<h2 class=\\\"\" + namespace + \"\\\">\" + Say(moduleKEY) + \"</h2>\" );\n\t\tr.push( \"<table class=\\\"\" + namespace + \"\\\">\" );\t\t\n\t\tfor (var key in data) {\n\t\t\tvar obj = data[key];\n\t\t\tobj.key = key\n\t\t\tobj.style = Flink.settings.namespace\n\t\t\tr.push(Render(obj, template.row))\n\t\t}\n\n\t\t// end render\n\t\tr.push( \"</table>\" );\t\t\n\n\t\t// return\n\t\treturn r.join(\"\\n\");\t\t\n\t}", "function getContent() {\n\ttime = (10 - levelNumber) + 15 - currentStage;\n\n\tif (packageName == \"Numbers\") {\n\t\tcopyArray(numberCollection, tempNumberCollection);\n\t} else if (packageName == \"Letters\") {\n\t\tcopyArray(letterCollection, tempLetterCollection);\n\t} else if (packageName == \"Mixed\") {\n\t\tcopyArray(mixedCollection, tempMixedCollection);\n\t}\n\n\tcopyArray(positionArray, tempPositionCollection);\n\n\tif (currentStage <= getTotalStageCount(levelNumber)) {\n\t\tvar contentCount = getTotalStageCount(levelNumber) + 2;\n\n\t\tgetContentCollectionByStage(contentCount);\n\t}\n}", "function renderCurrent(contents){\n var contentHTML = '';\n \n for(i = 0; i < contents.length; i++){\n contentHTML += '<div class=\"content\">'\n contentHTML += '<div class=\"content-info\">';\n contentHTML += '<div class=\"content-title\">' + contents[i].title + '</div><br />';\n contentHTML += '<div class=\"content-time\">' + dt(contents[i].start) + ' - ' + dt(contents[i].end) + '</div>';\n contents[i].networks.forEach(function(network) {\n contentHTML += '<div class=\"content-network\">' + network + '</div>';\n });\n contents[i].streams.forEach(function(stream) {\n contentHTML += '<div class=\"content-stream\">' + stream + '</div>';\n });\n contents[i].hashtags.forEach(function(hashtag) {\n contentHTML += '<div class=\"content-hashtag\">' + hashtag + '</div>';\n });\n\t\tcontentHTML += '</div>';\n\t\tcontentHTML += '<div class=\"perma-image-screen\"></div><img class=\"content-image\" src=\"' +contents[i].image + '\">'\n contentHTML += '</div>';\n }\n \n return contentHTML;\n}", "function initialDisplay() {\n \tcountLinks();\n \tgetDropDowns();\n \tgetList(\"id\");\n }", "function renderInfo() {\n /** Get state */\n if (!wave.getState()) {\n return;\n }\n var state = wave.getState();\n \n /** Retrieve topics */\n var topics = toObject(state.get('topics','[]'));\n var votes = toObject(state.get('votes','[]'));\n \n /** Add topics to the canvas */\n var html = \"\";\n for (var i = 0; i < topics.length; i++){\n var id = \"topic\"+i;\n html += '<div class=\"topic\"><h4> ' + topics[i] + '</h4></div>';\n }\n document.getElementById('body').innerHTML = html;\n \n /** Create \"Add topic\" button to the footer */\n html += '<input type=\"text\" id=\"textBox\" value=\"\"/><button id=\"addInput\" onclick=\"addInput()\">Add Topic</button>';\n document.getElementById('footer').innerHTML = html;\n \n /** Adjust window size dynamically */\n gadgets.window.adjustHeight();\n}", "function renderContent() {\n var content = document.getElementById('content_' + selected);\n // Initialize the pane.\n if (content.id == 'content_blocks') {\n // If the workspace was changed by the XML tab, Firefox will have performed\n // an incomplete rendering due to Blockly being invisible. Rerender.\n Blockly.mainWorkspace.render();\n //Check if the arduino code peek is showing\n if(document.getElementById('arduino_code_peek').style.display != 'none' ) {\n renderArduinoCode(null);\n }\n } else if (content.id == 'content_xml') {\n // Initialize the pane.\n var xmlTextarea = document.getElementById('textarea_xml');\n var xmlDom = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace);\n var xmlText = Blockly.Xml.domToPrettyText(xmlDom);\n xmlTextarea.value = xmlText;\n xmlTextarea.focus();\n } else if (content.id == 'content_arduino') {\n var code = Blockly.Generator.workspaceToCode('Arduino');\n var arduinoTextarea = document.getElementById('textarea_arduino');\n arduinoTextarea.value = code\n arduinoTextarea.focus();\n }\n}", "displayInfo() {\n\t\t\tlet info = super.displayInfo() + ', менеджер: ' + this.manager.name ;\n\t\t\tconsole.log( info );\n\t\t\treturn info\n\t\t\t}", "function displayInfo(theSculpture) {\n var theName = theSculpture.name;\n var theDesc = theSculpture.description;\n var theYear = theSculpture.year;\n document.getElementById(\"location-container\").getElementsByTagName('h3')[0].innerHTML = theName;\n document.getElementById(\"location-container\").getElementsByTagName(\"p\")[0].innerHTML = theYear;\n document.getElementById(\"location-container\").getElementsByTagName(\"p\")[1].innerHTML = theDesc;\n document.getElementById(\"location-container\").style.display = \"block\";\n}", "function dynamicSummary(){\n fieldArray = [];\t//\tclear array so everytime this is called we update the data\n window.guideBridge.visit(function(cmp){\n var name = cmp.name;\n if(name && isVisible(cmp)){\n var grouped = isGrouped(cmp);\n var hideLabel = isHideLabel(cmp);\n var hideLink = isHideLink(cmp);\n\n if(name.indexOf(\"block_heading_\") == 0){//\tcheck if block heading (like for the address block fields)\n fieldArray.push({\"type\":\"block_heading\",\"size\":size(cmp),\"name\":cmp.name,\"value\":$(cmp.value).html(),\"grouped\":grouped, \"hideLink\":hideLink, \"className\":cmp.className, \"cssClassName\":cmp.cssClassName,\"id\":cmp.id,\"som\":cmp.somExpression});\n }\n else if(name.indexOf(\"block_\") == 0) {//\tcheck if object is a group panel\n fieldArray.push({\"type\":\"block\",\"size\":size(cmp),\"name\":cmp.name,\"title\":cmp.title, \"grouped\":grouped, \"className\":cmp.className, \"id\":cmp.id,\"som\":cmp.somExpression});\n }\n else if(name.indexOf(\"heading_\") == 0){//\tcheck if heading\n fieldArray.push({\"type\":\"heading\",\"size\":size(cmp),\"name\":cmp.name,\"value\":$(cmp.value).html(),\"grouped\":grouped, \"hideLink\":hideLink, \"className\":cmp.className, \"cssClassName\":cmp.cssClassName,\"id\":cmp.id,\"som\":cmp.somExpression});\n }\n else{\n //if(cmp.value != null){\n if(cmp.className == \"guideTextBox\"){\n fieldArray.push({\"type\":\"field\",\"name\":cmp.name,\"title\":cmp.title,\"grouped\":grouped,\"hideLabel\":hideLabel, \"hideLink\":hideLink, \"value\":((cmp.value)?cmp.value:\"Not provided\"),\"className\":cmp.className,\"id\":cmp.id,\"som\":cmp.somExpression});\n }\n if(cmp.className == \"guideRadioButton\" ||\n cmp.className == \"guideCheckBox\" ){\n fieldArray.push({\"type\":\"option\",\"name\":cmp.name,\"title\":cmp.title,\"grouped\":grouped,\"hideLabel\":hideLabel,\"hideLink\":hideLink, \"value\":((cmp.value)?cmp.value:\"Not provided\"), \"obj\":cmp,\"className\":cmp.className,\"id\":cmp.id,\"som\":cmp.somExpression});\n }\n //}\n }\n }\n });\n\n renderHTML();\t//\tthis generates the html inside the summary component\n}", "function metaOutput(data) {\n if (data !== \"\") {\n //search metadata from response\n var search_title = data.title;\n var search_link = data.link;\n //build heading output for metadata heading\n var metaHeading = '<h6>'+search_title+' | <a href=\"'+search_link+'\">Flickr</a></h6>';\n //render metadata to contextual-output\n $(\".contextual-output\").prepend(metaHeading);\n }\n }", "function display (data) {\n console.log(data.post);\n}", "function renderContent() {\n var content = document.getElementById('content_' + selected);\n // Initialize the pane.\n if (content.id == 'content_blocks') {\n // If the workspace was changed by the XML tab, Firefox will have performed\n // an incomplete rendering due to Blockly being invisible. Rerender.\n Blockly.mainWorkspace.render();\n } else if (content.id == 'content_xml') {\n var xmlTextarea = document.getElementById('textarea_xml');\n var xmlDom = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace);\n var xmlText = Blockly.Xml.domToPrettyText(xmlDom);\n xmlTextarea.value = xmlText;\n xmlTextarea.focus();\n } else if (content.id == 'content_javascript') {\n content.innerHTML = Blockly.Generator.workspaceToCode('JavaScript');\n } else if (content.id == 'content_python') {\n content.innerHTML = Blockly.Generator.workspaceToCode('Python');\n } else if (content.id == 'content_whalesong') {\n content.innerHTML = Blockly.Generator.workspaceToCode('Whalesong');\n } else if (content.id == 'content_ray') {\n content.innerHTML = Blockly.Generator.workspaceToCode('Ray');\n }\n}", "get structure () {\n\t\treturn this._structure;\n\t}", "function showContent(name) {\n let content = data.projects.find(i => {\n return i.name === name;\n });\n console.log(content);\n\n let fragment = document.createDocumentFragment();\n\n let nameDiv = document.createElement('div');//project name\n nameDiv.textContent = content.name;\n nameDiv.setAttribute('id', 'content-name');\n nameDiv.classList.add('content-name');\n\n fragment.appendChild(nameDiv);\n\n //list of tasks\n content.tasks.forEach(i => {\n let task = document.createElement('div');\n task.textContent = i;\n task.classList.add('task-item');\n let checkbox = document.createElement('input');\n checkbox.setAttribute('type', 'checkbox');\n task.insertAdjacentElement('afterbegin', checkbox);\n fragment.appendChild(task);\n }\n );\n contentContainer.appendChild(fragment);\n }", "function populatePokemanInfo(data){\n let html = \"<h2>\" + data.name + \"</h2><img src=http://pokeapi.co/media/img/\" + data.national_id + \".png><h4>Types</h4><ul>\"; //breaking to iterate through types\n for (let i = 0; i < data.types.length; i++){\n html += \"<li>\" + data.types[i].name + \"</li>\";\n }\n html += \"</ul><h4>Height</h4><p>\" + data.height + \"</p><h4>Weight</h4><p>\" + data.weight +\"</p>\";\n $(\".pokeman_info\").html(html);\n }", "function displayGuide() {\n my.html.guide.innerHTML = my.current.unit.guide\n }", "function render() {\n var ISML = require('dw/template/ISML');\n\n // Get Basket Info\n var BasketMgr = require('dw/order/BasketMgr');\n var basket = BasketMgr.getCurrentBasket();\n\n // Get Preferences\n var Site = require('dw/system/Site');\n var currentSite = Site.getCurrent();\n var preferences = Site.getCurrent().getPreferences();\n\n // GeoLocation Data\n var location = request.getGeolocation() || {};\n\n ISML.renderTemplate('rvw/devtools', {\n Debugger: {\n basket: serialize(basket),\n geolocation: serialize(location),\n messages: Debugger,\n preferences: serialize(preferences),\n session: serialize(session),\n site: serialize(currentSite)\n }\n });\n}", "lldisplayWordDefinition() {\r\n console.log(`\\nDefinition: ${this.definition}`);\r\n }", "function display_whois(id, content) {\n try {\n json = JSON.parse(content)\n var whois = \"Country: <br><div class='lead'>\" + json.regrinfo.network.country + \"</div><br>\\n\";\n whois += \"IP Range: <br><div class='lead'>\" + json.regrinfo.network.inetnum + \"</div><br>\\n\";\n whois += \"Organisation: <br><div class='lead'>\" + json.regrinfo.owner.organization + \"</div><br>\\n\";\n whois += \"Address: <br><div class='lead'>\" + json.regrinfo.tech.address + \"</div><br>\\n\";\n whois += \"Registered?: <br><div class='lead'>\" + json.regrinfo.registered + \"</div><br>\\n\";\n } catch (e) {\n whois = \"Whois Lookup failed\";\n }\n document.getElementById(id).innerHTML = whois;\n}", "function display(d) {\n // updateNodeInfo(d.properties.name, color(i));\n console.log(d.properties.name);\n updateNodeInfo(d);\n}", "function displayScene() {\n var para = document.querySelector (\"#descrip\");\n para.textContent = \"You are in the \" + player.currLoc.name + \"-\" + \"\\n\" + \n player.currLoc.description + \".\" + \"\\n\" +\n \"The items you can take are: \" + player.currLoc.items \n}", "function writeEktronCMSInfo()\r\n{\r\n\twith (document)\r\n\t{\r\n\t\twrite(\"<br><hr width='80%'>\");\r\n\t\twrite(\"<h2><a name='Ektron'>Ektron's Other Products</a></h2>\");\r\n\t\twrite('<a href=\"' + g_sCMS300Page + '\" target=\"_blank\"><img src=\"cms300.gif\" border=\"1\"></a>');\r\n\t\twrite('<li><a href=\"' + g_sCMS300Page + '\" target=\"_blank\">Ektron CMS300 Home Page</a><br>');\r\n\t\twrite('<li><a href=\"' + g_sCMS400Page + '\" target=\"_blank\">Ektron CMS400 Home Page</a><br>');\r\n\t\twrite('<li><a href=\"' + g_sDMS400Page + '\" target=\"_blank\">Ektron DMS400 Home Page</a><br>');\r\n\t\t/*write('<li><a href=\"' + GetAddress(sProduct) + '\" target=\"_blank\">Web Content Editors Home Page</a><br>');\r\n\t\twrite('<li><a href=\"http://www.ektron.com/webimagefx.aspx\" target=\"_blank\">Web Image Editor Home Page</a><br>');*/\r\n\t\twrite('<li><a href=\"http://www.ektron.com/support/index.aspx\" target=\"_blank\">Ektron Support Site</a><br>');\r\n\t\twrite('<li><a href=\"http://www.ektron.com/developers/index.cfm\" target=\"_blank\">Ektron Developers Site</a><br>');\r\n\t\twrite('<li><a href=\"http://www.ektron.com\" target=\"_blank\">Ektron Site</a><br>');\r\n\t\twriteln(\"<br>\");\r\n\t}\r\n}", "function renderLayout() {\n const events = Events.make(),\n content = [renderHeader()].concat(renderFileTypes(events)).join('');\n return {\n content,\n events,\n };\n }", "function display_collection_info(collJSON, textStatus){\n // if fail, then bail\n if ((collJSON.search(/Error/i) != -1) || (collJSON.search(/\\<b>Notice/i) != -1 )) {\n\t\tdocument.writeln(collJSON);\n\t\treturn false;\n\t}\n\n //console.log('into display_collection_info with collJSON = ', collJSON);\n\n var collections = JSON.parse(collJSON);\n var num_collections = collections.collectionList.length;\n\n if ( ! num_collections > 0){ return false; }\n\n var collection_list = '<ul class=\"edesiderata\">';\n\n for(var i=0; i < collections.collectionList.length; i++){\n if (collections.collectionList[i].collection_id != 1){ // not the default collection, which is no collection at all\n var coll_id = collections.collectionList[i].collection_id;\n var coll_org_id = collections.collectionList[i].collection_org_id;\n var coll_org_name = collections.collectionList[i].collection_org_name;\n var coll_org_title = collections.collectionList[i].collection_org_title;\n var coll_title_one = collections.collectionList[i].collection_title_one;\n var coll_title_two = collections.collectionList[i].collection_title_two;\n\n var org_profile_image_link = get_linked_profile_image( coll_org_id, coll_org_name );\n var org_profile_text_link = get_linked_profile_text( coll_org_id, coll_org_name );\n\n //var org_collections_link = '<a href=\"display_publications_by_org.php?org_name='+ coll_org_name +'\" ';\n var org_collections_link = '<a href=\"display_collections_by_org.php?org_id='+ coll_org_id +'\" ';\n //org_collections_link += 'class=\"profile_link\" ';\n //org_collections_link += 'title=\"View ICON titles held by '+ coll_org_name +'\" ';\n org_collections_link += 'title=\"View collections compiled by '+ coll_org_name +'\" ';\n org_collections_link += 'target=\"_blank\">'+ coll_org_title +'</a>';\n\n var this_collection_link = '<br/><a href=\"display_publications_by_collection.php?collection_id='+ coll_id +'\" ';\n this_collection_link += 'class=\"collection_title\" ';\n if (coll_title_one != coll_title_two){\n this_collection_link += 'title=\"View titles in '+ coll_title_one +', also known as '+ coll_title_two +'\" ';\n } else {\n this_collection_link += 'title=\"View titles in '+ coll_title_one +'\" ';\n }\n this_collection_link += 'target=\"_blank\">'+ coll_title_one +'</a>';\n\n collection_list += '<li>'+ org_collections_link +'&nbsp;&nbsp;'+ org_profile_image_link +':&nbsp;';\n //collection_list += '<span class=\"collection_title\" title=\"'+ coll_title_two +'\">'+ coll_title_one +'</span></li>';\n collection_list += this_collection_link;\n collection_list += '</li>';\n }//end if: is meaningful collection\n }//end for\n collection_list += '</ul>';\n\n //console.warn('display_collection_info returns collection_list as\\n', collection_list);\n\n $('#pub_info_first_list').after('<ul><li>Vendor collections: '+ collection_list +'</li></ul>');\n //$('#collections_container_sidebar').append(collection_list);\n $('#collections_chart_canvas_tab').html(collection_list);\n $('#collection_links_help_container').after(collection_list);\n $('#collection_sidebar_box').show(); // hidden by default\n //console.info('now, collection_sidebar_box has VIS: ', $('#collection_sidebar_box').css('visibility') ,' ; collection_sidebar_box has DISPLAY: ', $('#collection_sidebar_box').css('display'));\n\n\n\n return collection_list;\n\n}", "function loadContent() {\n \"use strict\";\n var comp, data;\n comp = Utils.adfFind$(mapPrefix + 'mapWindowData');\n if (comp) data = comp.getValue();\n if (!data) {\n console.debug('No data was loaded by loadEquipData');\n return;\n }\n data = JSON.parse(data);\n infowindow.setContent('Type : ' + data.type + ' ; ' + 'Key ' + data.key);\n }", "function renderContent() {\n var content = document.getElementById('content_' + selected);\n // Initialize the pane.\n if (content.id == 'content_blocks') {\n // If the workspace was changed by the XML tab, Firefox will have performed\n // an incomplete rendering due to Blockly being invisible. Rerender.\n Blockly.mainWorkspace.render();\n } else if (content.id == 'content_xml') {\n var xmlTextarea = document.getElementById('textarea_xml');\n var xmlDom = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace);\n var xmlText = Blockly.Xml.domToPrettyText(xmlDom);\n xmlTextarea.value = xmlText;\n xmlTextarea.focus();\n } else if (content.id == 'content_javascript') {\n content.innerHTML = Blockly.Generator.workspaceToCode('JavaScript');\n } else if (content.id == 'content_python') {\n content.innerHTML = Blockly.Generator.workspaceToCode('Python');\n }\n}", "function _buildPage( opt ){\r\nconsole.log(\"_buildPage()\");\r\n\r\n\tvar p = {\r\n\t\t//\"nid\": null,\r\n\t\t//\"templateID\" : \"tpl-page\"\r\n\t\t//\"title\" : \"\",\r\n\t\t//content : \"\"\r\n\t\t\"callback\": null\r\n\t};\r\n\t//extend options object\r\n\tfor(var key in opt ){\r\n\t\tp[key] = opt[key];\r\n\t}\r\n//console.log(p);\r\n\r\n//--------------------- BLOCK #sitename-block\r\n\tdraw.buildBlock({\r\n\t\t\"locationID\" : \"sitename-block\",\r\n\t\t\"templateID\" : \"tpl-block--sitename\"//,\r\n\t\t//\"content\" : \"<h1><a class='title' href='./'>my lib</a></h1>\" \r\n\t});\r\n//---------------------\r\n\r\n//--------------------- BLOCK\r\n\t\t\t//view alphabetical\r\n\r\n\t\t\tvar html = lib.taxonomy.view_termin({\r\n\t\t\t\t\"termins\": lib.vars[\"taxonomy\"][\"alphabetical_voc\"][\"termins\"],\r\n\t\t\t\t\"vid\": \"4\",\r\n\t\t\t\t\"tid\": \"116\",\r\n\t\t\t\t\"recourse\": true,\r\n\t\t\t\t\"show_only_children\": true,\r\n\t\t\t\t\"item_tpl\": lib.vars[\"templates\"][\"tpl-block--taxonomy_alpha_list\"],\r\n\t\t\t\t\"list_tpl\": lib.vars[\"templates\"][\"tpl-block--taxonomy_alpha\"]//,\r\n\t\t\t\t//\"url_tpl\": _vars[\"templates\"][\"taxonomy_url_tpl\"]\r\n\t\t\t});\r\nconsole.log(html);\r\n\t\t\t\r\n//---------------------\r\n\r\n}", "function displayExercise(exerciseStructure) {\n editorDisplay.innerHTML = `\n <div class=\"display--exercise\">\n ${exerciseStructure}\n </div>\n `;\n}", "function displayOkitJson() {\n // $(jqId(JSON_MODEL_PANEL)).html('<pre><code>' + JSON.stringify(okitJsonModel, null, 2) + '</code></pre>');\n // $(jqId(JSON_VIEW_PANEL)).html('<pre><code>' + JSON.stringify(okitJsonView, null, 2) + '</code></pre>');\n // $(jqId(JSON_REGION_PANEL)).html('<pre><code>' + JSON.stringify(regionOkitJson, null, 2) + '</code></pre>');\n}", "function displayMovieInfo() {\n\n // YOUR CODE GOES HERE!!! HINT: You will need to create a new div to hold the JSON.\n\n }", "function logSiteInfo() {\n\t\tvar siteName = $(document.body).data('site-name');\n\t\tvar siteNameStyles = 'font-family: sans-serif; font-size: 42px; font-weight: 700; color: #16b5f1; text-transform: uppercase;';\n\n\t\tvar siteDescription = $(document.body).data('site-description');\n\n\t\tconsole.log('%c%s', siteNameStyles, siteName);\n\t\tlog(siteDescription);\n log('Designed by: Nat Cheng http://natcheng.com/');\n log('Coded by: Den Isahac https://www.denisahac.xyz/');\n\t}", "function TemplateInfo() {\n\tthis.code = '';\n\tthis.type = '';\n\tthis.parent = '';\n\tthis.description = '';\n}", "function display(hits_out) {\n var htmlStr = \"\";\n htmlStr += \"<article class='result'>\";\n htmlStr += \"<p>The variable you selected is present in the dataset:</p>\";\n htmlStr += \"<h2>\" + hits_out[0].datasetName + \"</h2>\";\n htmlStr += \"<span class='result-label'>External dataset URL: </span> <a href='\" + hits_out[0].datasetUrl + \"'>\" + hits_out[0].datasetUrl + \"</a> <hr />\";\n htmlStr += \"<p><span class='result-label'>Publishing organization :</span>\" + hits_out[0].org + \"</p>\";\n htmlStr += \"<p><span class='result-label'>Tags :</span>\";\n if (hits_out[0].tagList != null) {\n\tfor(var jj = 0; jj < hits_out[0].tagList.length; jj++) {\n\t htmlStr += \"<span> \" + hits_out[0].tagList[jj] + \"&nbsp;&nbsp; </span>\"\n\t}\n }\n htmlStr += \"</p>\";\n htmlStr += \"<p><span class='result-label'>Available formats :</span>\";\n if (hits_out[0].formatList != null) {\n\tfor(var jj = 0; jj < hits_out[0].formatList.length; jj++) {\n htmlStr += \"<span> \" + hits_out[0].formatList[jj] + \"&nbsp;&nbsp; </span>\"\n\t}\n }\n htmlStr += \"</p>\";\n htmlStr += \"<p><span class='result-label'>Access dataset files directly from the following links:</span>\"\n if (hits_out[0].urlList != null) {\n\tfor(var jj = 0; jj < hits_out[0].urlList.length; jj++) {\n htmlStr += \"<div> <a href='\" + hits_out[0].urlList[jj] + \"'>\" + hits_out[0].urlList[jj] + \"&nbsp;&nbsp; </a></div>\"\n\t}\n }\n htmlStr += \"</p>\";\n htmlStr += \"</article>\";\n htmlStr += \"<article class='result'>\";\n htmlStr += \"<p><span class='result-label'>All variables in this dataset (count = \" + hits_out.length + \"):</span></p>\";\n for(var ii = 0; ii < hits_out.length; ii++ ) {\n htmlStr += hits_out[ii].name + \"<br />\"; \n }\n htmlStr += \"</article>\";\n $(\".results\").html(htmlStr);\n}", "function metadataStaticView() {\n html= HtmlService\n .createTemplateFromFile('staticMetadata')\n .evaluate()\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n DocumentApp.getUi().showSidebar(html);\n }", "printContent() {\n console.log(JSON.stringify(this, null, 4))\n }", "function showOverview() {\n var links = [];\n $.each(noteSelf.paragraphs, function(index, paragraph) {\n if (paragraph.paragraphClient.getDependencies != undefined) {\n var dependencies = paragraph.paragraphClient.getDependencies();\n $.each(dependencies.inputTables, function(index, inputTable) {\n links.push({ source: inputTable, target: dependencies.name });\n });\n $.each(dependencies.outputTables, function(index, outputTable) {\n links.push({ source: dependencies.name, target: outputTable });\n });\n }\n });\n\n utils.showModalPopup('Overview', utils.generateDirectedGraph(links), $());\n }", "displayScene() {\n if(this.nodeInfo)\n this.displayNode(this.nodeInfo[this.idRoot],this.defaultMaterialID,\"null\",{s:1,t:1},false);\n }", "function pageDisplay(iteration) {\n // save the info from this iteration in the appendages array\n var title = appendages[iteration].title;\n var intro = appendages[iteration].intro;\n var link = appendages[iteration].link;\n var video = decodeURI(appendages[iteration].video);\n\n // format the info\n var titleText = $('<h4>').text(title);\n var introText = $('<p>').text(intro);\n var wikiLink = $('<a>').text(\"Click here for more info\")\n .addClass('wiki-link')\n .attr('target', '_blank')\n .attr('href', link);\n var videoDiv = $('<div>').append(video)\n .addClass(\"embed-container\");\n\n // append it all to the proper divs\n $('#wikiSpot').empty().append(titleText, introText, wikiLink);\n $('#videoSpot').empty().append(videoDiv);\n}", "function displayItem(item) {\n // details will be details#error or details#warning\n const details = document.getElementById(item.type);\n const section = document.createElement('section');\n const h2 = document.createElement('h2');\n h2.innerHTML = item.title;\n section.appendChild(h2);\n const detailsDiv = document.createElement('div');\n detailsDiv.classList.add('details');\n detailsDiv.innerHTML = item.details;\n section.appendChild(detailsDiv);\n const learnMoreDiv = document.createElement('div');\n learnMoreDiv.classList.add('learn-more');\n learnMoreDiv.innerHTML = item.learnMore;\n section.appendChild(learnMoreDiv);\n details.appendChild(section);\n}", "function buildDetailInfoBlock(mainDirectory, subDirectory, infoData) {\n var field = cmap[mainDirectory][subDirectory]['detailField'];\n var basicInfo = field.basicInfo\n var detailInfo = field['detailInfo']\n console.log('basicInfo',basicInfo)\n var basicInfoHtml = ''\n var detailInfoHtml = ''\n $.each(basicInfo, function (index, val) {\n if (val in infoData) {\n switch (val)\n {\n case 'name':\n basicInfoHtml += '<div class=\"form-group col-md-6 formBlock wordBreak\">\\\n <label class=\"formItem\">*项目名称:</label>\\\n <input type=\"text\" class=\"form-control\" name=\"name\" value=\"\">\\\n <span class=\"originInfo name\"></span>\\\n </div>'\n }\n }\n })\n\n}", "function general(page){\n s.pageName='what-ever-you-want-static:'+page;\n s.prop1=s.pagename;\n s.server=window.location.hostname;\n s.charSet='UTF-8';\n s.channel=\"static-info\";\n s.pageType='';\n \n }", "function gather() {\n var structure = {\n map: {},\n children: []\n };\n\n /////\n // Is the specified control contained within an explicit parent. (affects padding)\n /////\n function isControlInExplicitContainer(parent) {\n if (!parent) {\n return false;\n }\n\n var controlInExplicitContainer = false;\n var parentAlias;\n\n while (parent) {\n parentAlias = parent.type.getAlias();\n if ((parent.name && parentAlias !== spFormBuilderService.containers.form && parentAlias !== spFormBuilderService.containers.screen) || (parentAlias === spFormBuilderService.containers.header)) {\n controlInExplicitContainer = true;\n break;\n }\n\n parent = structure.map[parent.id()].parentControl;\n }\n\n return controlInExplicitContainer;\n }\n\n /////\n // Get the desired display mode.\n /////\n function getDisplayMode(parentControl) {\n if (!parentControl) {\n return displayModes.block;\n }\n\n var parentAlias = parentControl.type.getAlias();\n\n if (spFormBuilderService.isHorizontalContainer(parentAlias)) {\n return displayModes.inlineBlock;\n } else {\n return displayModes.block;\n }\n }\n\n /////\n // Get the resize mode based on alias.\n /////\n function getResizeMode(alias) {\n switch (alias) {\n case 'resizeHundred':\n case 'resizeTwentyFive':\n case 'resizeThirtyThree':\n case 'resizeFifty':\n case 'resizeSixtySix':\n case 'resizeSeventyFive':\n case 'resizeManual':\n return resizeModes.manual;\n case 'resizeSpring':\n return resizeModes.spring;\n default:\n return resizeModes.automatic;\n }\n }\n\n /////\n // The gather callback.\n /////\n function gatherCallback(control, parentControl, domElement, options) {\n if (!control) {\n return;\n }\n\n if (_.has(structure.map, control.id())) {\n var ctrl = structure.map[control.id()];\n if (ctrl && ctrl.parentControl === parentControl && ctrl.control === control) {\n ctrl.repeatedElements.push(domElement);\n return;\n }\n }\n\n var controlAlias = control.type.getAlias();\n\n /////\n // Setup the structure control.\n /////\n var structureControl = {\n control: control,\n parentControl: parentControl,\n domElement: domElement,\n titleClass: options && options.titleClass,\n contentClass: options && options.contentClass,\n lineBreakClass: options && options.lineBreakClass,\n children: [],\n display: getDisplayMode(parentControl),\n inlineElements: options && options.inlineElements,\n repeatedElements: [],\n isField: !!(control.fieldToRender || control.relationshipToRender),\n isContainer: spFormBuilderService.isHorizontalContainer(controlAlias) || spFormBuilderService.isVerticalContainer(controlAlias),\n isTabContainer: spFormBuilderService.isTabContainer(controlAlias),\n isImplicitContainer: spFormBuilderService.isImplicitContainer(control),\n isExplicitContainer: spFormBuilderService.isExplicitContainer(control),\n isHorizontalContainer: spFormBuilderService.isHorizontalContainer(controlAlias),\n isVerticalContainer: spFormBuilderService.isVerticalContainer(controlAlias),\n size: {\n height: undefined,\n width: undefined\n },\n minSize: {\n height: undefined,\n width: undefined\n },\n resizeMode: {\n vertical: (control && control.renderingVerticalResizeMode && control.renderingVerticalResizeMode._id && getResizeMode(control.renderingVerticalResizeMode._id.getAlias())) || (spFormBuilderService.isContainer(controlAlias) && resizeModes.automatic) || resizeModes.automatic,\n horizontal: (control && control.renderingHorizontalResizeMode && control.renderingHorizontalResizeMode._id && getResizeMode(control.renderingHorizontalResizeMode._id.getAlias())) || (spFormBuilderService.isContainer(controlAlias) && resizeModes.spring) || resizeModes.automatic\n }\n };\n\n //console.log('gather for ', control.debugString, 'resize', structureControl.resizeMode);\n\n /////\n // Attach the parent structure.\n /////\n if (parentControl) {\n var parentStructureControl = structure.map[parentControl.id()];\n\n if (parentStructureControl) {\n parentStructureControl.children.push(structureControl);\n } else {\n console.error('Unknown parent entity');\n }\n } else {\n structure.children.push(structureControl);\n }\n\n /////\n // Implicit containers handle their display mode differently.\n /////\n if (structureControl.isImplicitContainer) {\n if (structureControl.isHorizontalContainer) {\n structureControl.display = displayModes.block;\n } else {\n structureControl.display = displayModes.inlineBlock;\n }\n\n }\n\n /////\n // Cache the content div so that the overflow can be disabled/enabled.\n /////\n if (structureControl.isContainer) {\n if (structureControl.contentClass) {\n var firstContentControl = structureControl.domElement.find(structureControl.contentClass).first();\n\n if (firstContentControl) {\n structureControl.firstContentControl = firstContentControl;\n }\n }\n }\n\n /////\n // Ensure the control has a renderingVerticalResizeMode and it is set appropriately.\n /////\n if (!control.renderingVerticalResizeMode) {\n control.registerLookup('console:renderingVerticalResizeMode');\n\n control.setRenderingVerticalResizeMode('console:resizeAutomatic');\n }\n\n /////\n // Ensure the control has a renderingHorizontalResizeMode and it is set appropriately.\n /////\n if (!control.renderingHorizontalResizeMode) {\n control.registerLookup('console:renderingHorizontalResizeMode');\n\n if (spFormBuilderService.isContainer(controlAlias)) {\n control.setRenderingHorizontalResizeMode('console:resizeSpring');\n } else {\n control.setRenderingHorizontalResizeMode('console:resizeAutomatic');\n }\n }\n\n /////\n // Add the control to the fast lookup map.\n /////\n structure.map[control.id()] = structureControl;\n }\n\n /////\n // Walk the entire structure gathering information for all scopes that subscribe to the 'gather' event.\n /////\n scope.$broadcast('gather', gatherCallback);\n\n return structure;\n }", "function productSpecific(content, data) {\n\n //check what it thinks is the target data (object)\n console.log(data[content].menu);\n\n}", "function load_page(data){\n $(\".block-container\").empty();\n var infos = data.Infos;\n var page = \"<block class='block'>\";\n for (var i = 0; i < infos.length; i++) {\n page += infos[i].html;\n }\n page += \"</div>\";\n $(\".block-container\").append(page);\n}", "function render_page_content( object ){\n\n // Function that decides whether or not to show the data table row (the one with 'tabs')\n should_show_data_table();\n\n // Hide all tabs so only one is shown at a time, or else the previous tab selection will be\n // showing\n $('#photos, #contacts, #photos, #site_links, #site_information, #lter_name').hide();\n\n $('#photos, #contacts, #photos, #site_links, #site_information, #lter_name').addClass( 'focus_table_background' );\n\n // Set all tab backgrounds to nothing\n $('.hover').removeClass('focus_hilight');\n\n // Show only the 'site_information' tab\n $(\"#site_information, #lter_name\").show();\n \n $('#table_content').addClass('table_content_border');\n\n // Set 'site info' tab to the same color as the highlight. Have to use inline css styling\n // rather than adding a class because it will not work properly in IE\n $('#site_info_tab').addClass('focus_hilight');\n\n // Inserting xml data into the html (The rest of the code in this function)\n ////////////////////////////////////\n\n // Insert site name into html \n $('#site_info').find('.site_name').html( object.attr('site_name') ); \n\n // Site Info Tab. Insert href location and target into html\n $('#site_content' ).find('.home_page').attr( { href: object.attr('home_page'), target: \"_blank\" } ); \n $('#site_content' ).find('.site_profile').attr( { href: 'http://www.lternet.edu/sites/' + object.attr('site_id').toLowerCase() , target: \"_blank\" } ); \n $('#site_content').find('.description').html( object.attr('description') ); \n\n // Photos tab. Insert image and href into html\n $('#site_content' ).find('.image').attr( { src: object.attr('image') , title: object.attr('site_id') + 'image' } ); \n $('#site_content' ).find('.gallery').attr( { href: 'http://www.lternet.edu/gallery/sites/' + object.attr('site_id') , target: \"_blank\"} ); \n\n // Contacts Tab. Insert into html\n $('#site_content' ).find('.principal').html( object.attr('principal') ); \n $('#site_content' ).find('.info_manager').html( object.attr('info_manager') ); \n $('#site_content' ).find('.primary_contact').html( object.attr('primary_contact') ); \n $('#site_content' ).find('.outreach').html( object.attr('education_contact') ); \n $('#site_content' ).find('.address1').html( object.attr('address1') ); \n $('#site_content' ).find('.address2').html( object.attr('address2') ); \n $('#site_content' ).find('.address3').html( object.attr('address3') ); \n $('#site_content' ).find('.city').html( object.attr('city') ); \n $('#site_content' ).find('.state').html( object.attr('state') ); \n $('#site_content' ).find('.zip').html( object.attr('zip') ); \n $('#site_content' ).find('.phone').html( object.attr('phone') ); \n $('#site_content' ).find('.fax').html( object.attr('fax') ); \n $('#site_content' ).find('.email').html( object.attr('email') ); \n\n // Site Links tab. Insert href and target info into html\n $('#site_content' ).find('.data_url').attr( { href: object.attr('data_url') , target: \"_blank\"} ); \n $('#site_content' ).find('.personnel_url').attr( { href: object.attr('personnel_url') , target: \"_blank\"} ); \n $('#site_content' ).find('.biblio_url').attr( { href: object.attr('biblio_url') , target: \"_blank\"} ); \n $('#site_content' ).find('.education_url').attr( { href: object.attr('education_url') , target: \"_blank\"} ); \n\n\n // Show the table data for each site. This needs to be here if we closing the table data div when a\n // user closes the associated infowindow \n $('#table_content').show();\n\n }", "function createMainContainer(obj){\n var container = document.getElementById('main-data');\n container.innerHTML = null;\n var charHeader = document.createElement('h2');\n charHeader.id='charHeader';\n charHeader.className='text-center';\n var title;\n if (~obj['url'].indexOf('planet')) {\n title = 'Planet '+ obj['name'];\n } else if (~obj['url'].indexOf('starships')){\n title = 'Starship '+ obj['name'];\n } else if (obj.episode_id) {\n title = 'Episode ' + obj.episode_id + ': '+ obj.title;\n };\n charHeader.textContent = title ? title : obj['name'];\n var infoBlock = document.createElement('div');\n infoBlock.className='infoBlock';\n container.appendChild(charHeader);\n container.appendChild(infoBlock);\n}", "getStructure() {\r\n const alias = this.getAliasNode();\r\n return callBaseGetStructure_1.callBaseGetStructure(common_1.Node.prototype, this, {\r\n kind: structures_1.StructureKind.ExportSpecifier,\r\n alias: alias ? alias.getText() : undefined,\r\n name: this.getNameNode().getText()\r\n });\r\n }", "helpData() {\n console.log(\"2) finsemble.bootConfig timeout values\");\n console.log(\"\\tstartServiceTimeout value\", this.startServiceTimeout);\n console.log(\"\\tstartComponentTimeout value\", this.startComponentTimeout);\n console.log(\"\\tstartTaskTimeout value\", this.startTaskTimeout);\n console.log(\"\");\n console.log(\"3) Current boot stage:\", this.currentStage);\n console.log(\"\");\n console.log(`4) Lastest/current status of dependencyGraph for ${this.currentStage} stage`, this.dependencyGraphs[this.currentStage].getCurrentStatus());\n console.log(\"\");\n console.log(\"5) Dependency graphs by stage\", this.dependencyGraphs);\n console.log(\"\");\n console.log(\"6) Boot config data by stage\", this.bootConfigs);\n console.log(\"\");\n console.log(\"7) Active Checkpoint Engines\", this.checkpointEngines);\n console.log(\"\");\n console.log(\"8) Registered tasks\", this.registeredTasks);\n console.log(\"\");\n console.log(\"9) List of outstanding start timers\", this.startTimers);\n console.log(\"\");\n console.log(\"10) Dependency graphs display by stage\");\n this.outputDependencyGraphs(this.dependencyGraphs);\n console.log(\"\");\n }", "get contents() {\n\t\tlet result = `\n <div class='container'>\n <header>\n <h1>${this.title}</h1>\n </header>\n <!-- Page specific content -->\n <div id='page-content'>${this.body}</div>\n </div>`;\n\t\treturn result;\n\t}", "function detail_result(json_parse) {\n\n document.getElementsByClassName('panel')[0].className = \"panel panel-default show\"\n document.getElementsByClassName('panel-heading')[0].innerHTML = '<strong>' + json_parse.Title + '</strong><br/>(' + json_parse.Released + ')'\n document.getElementsByClassName('panel-body')[0].innerHTML = '<div class=\"detail_holder\">' +\n '<div><strong>Genre:</strong>&nbsp;&nbsp;' + json_parse.Genre + '</div>' +\n '<div><strong>Starring:</strong>&nbsp;&nbsp;' + json_parse.Actors + '</div>' +\n '<div>' + json_parse.Plot + '</div>' +\n '</div>'\n \n \n \n}" ]
[ "0.6271606", "0.6152953", "0.6018301", "0.5802143", "0.57905054", "0.5771399", "0.5727607", "0.57216984", "0.56849325", "0.5683155", "0.56800497", "0.5651975", "0.55882937", "0.55713373", "0.556489", "0.55554736", "0.55457294", "0.5537492", "0.5529276", "0.5519981", "0.5516054", "0.54933923", "0.5479356", "0.5463023", "0.54607594", "0.5454502", "0.54475665", "0.54318523", "0.54262775", "0.54241407", "0.54206806", "0.5414812", "0.5405951", "0.539424", "0.53879714", "0.5377297", "0.5373352", "0.53715885", "0.53669286", "0.5366201", "0.5365342", "0.536398", "0.5361803", "0.5358538", "0.53583205", "0.5358067", "0.5348162", "0.5345858", "0.5344229", "0.5332546", "0.53284967", "0.5321773", "0.5314355", "0.53075266", "0.52979326", "0.5297658", "0.5297629", "0.52942497", "0.5284749", "0.52726036", "0.5268515", "0.52650005", "0.526225", "0.52600646", "0.5258689", "0.52554816", "0.5255174", "0.52449656", "0.5242173", "0.52371943", "0.5227806", "0.5225191", "0.52234226", "0.52125466", "0.52067775", "0.5205714", "0.520528", "0.52005756", "0.5196083", "0.5186507", "0.51832575", "0.5179122", "0.51757854", "0.5172381", "0.51686436", "0.516708", "0.51637924", "0.5161261", "0.5159962", "0.51542103", "0.5149598", "0.51478577", "0.51475567", "0.5143862", "0.5141483", "0.5139157", "0.5133012", "0.513238", "0.51306206", "0.5127001", "0.5126615" ]
0.0
-1
Functions that run the content scripts to initiate processing of the data to be sent via port message / runContentScripts: When content.js is executed, it established a port connection with this script (panel.js), which in turn has a port message handler listening for the 'info' message. When that message is received, the handler calls the updateSidebar function with the structure info.
function runContentScripts (callerFn) { if (debug) console.log(`runContentScripts invoked by ${callerFn}`); getActiveTabFor(myWindowId).then(tab => { if (tab.url.indexOf('http:') === 0 || tab.url.indexOf('https:') === 0) { browser.tabs.executeScript(tab.id, { file: '../utils.js' }); browser.tabs.executeScript(tab.id, { file: '../traversal.js' }); browser.tabs.executeScript(tab.id, { file: '../content.js' }); } else { updateSidebar (protocolNotSupported); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {\n\n var sidebarSkin = get('layout.sidebar-skin');\n\n if (!sidebarSkin) {\n sidebarSkin = 'control-sidebar-dark';\n }\n\n updateSidebarSkin(sidebarSkin);\n\n updateSidebarToggle(get('layout.sidebar-control-open'));\n\n\n\n var boxedLayout = get('layout.boxed');\n\n if (!boxedLayout) {\n boxedLayout = false;\n }\n\n updateBoxedLayout(boxedLayout);\n\n var fixedLayout = get('layout.fixed');\n\n if (!fixedLayout) {\n fixedLayout = false;\n }\n\n updateFixedLayout(fixedLayout);\n\n loadSidebarExpand();\n\n\n $('#sidebar-skin').on('click', function () {\n var sidebarSkin;\n if ($('.control-sidebar').hasClass('control-sidebar-dark')) {\n sidebarSkin = 'control-sidebar-light'\n } else {\n sidebarSkin = 'control-sidebar-dark';\n }\n setTimeout(function () {\n updateSidebarSkin(sidebarSkin);\n }, 20);\n });\n\n $('#boxed-layout .ui-chkbox-box, #boxed-layout-label').on('click', function () {\n var boxedLayout = !$('body').hasClass('layout-boxed');\n setTimeout(function () {\n changeLayout('layout-boxed');\n updateBoxedLayout(boxedLayout);\n }, 20);\n });\n\n $('#fixed-layout .ui-chkbox-box, #fixed-layout-label').on('click', function () {\n var fixedLayout = !$('body').hasClass('fixed');\n setTimeout(function () {\n changeLayout('fixed');\n updateFixedLayout(fixedLayout);\n }, 20);\n });\n\n $('#control-sidebar-toggle .ui-chkbox-box, #control-sidebar-toggle-label').on('click', function () {\n setTimeout(function () {\n changeLayout('control-sidebar-open');\n updateSidebarToggle($('body').hasClass('control-sidebar-open'));\n }, 20);\n\n });\n\n\n $('#sidebar-expand-hover .ui-chkbox-box, #sidebar-expand-hover-label').on('click', function () {\n setTimeout(function () {\n updateSidebarExpand();\n }, 20);\n });\n\n $('#sidebar-toggle .ui-chkbox-box, #sidebar-toggle-label').on('click', function () {\n $('.sidebar-toggle').click();\n });\n\n\n $('#content').click(function () {\n $('.control-sidebar').removeClass('control-sidebar-open');\n });\n\n loadSkin();\n\n }", "function initContent() {\n var msHide = document.querySelectorAll('.ms-hide');\n\n /**\n * Place the Yellow ribbon after the header.\n */\n $('#s4-workspace').prepend($('#DeltaPageStatusBar'));\n\n if (msHide.length > 0) {\n /**\n * Hide all right section web parts that are marked as \"hidden\".\n */\n if ($('.ms-hide').closest('.right-section')) {\n $('.right-section .ms-hide').parent().hide();\n }\n checkContentTypes();\n checkOrgChartZone();\n checkGatewayPage();\n }\n\n adjustArticleImageBlock();\n adjustWireStories();\n collapsibleList();\n customCheckboxes();\n howDoI();\n articleComments();\n startMyVMSNet();\n startUserControls();\n\n /**\n * Window Load Events.\n */\n window.addEventListener('load', function () {\n introText();\n wireStories();\n wireCatagory();\n updateMoreSearchText();\n });\n }", "function initServerviewSidebar(id) {\n document.getElementsByClassName('main-title')[0].innerHTML = ``;\n document.getElementsByClassName('title')[0].innerHTML = `Server ${id}`;\n document.getElementsByClassName('info')[0].remove();\n document.getElementsByClassName('preview')[0].remove();\n\n var info = document.createElement('div');\n info.className = 'info';\n info.style.overflowY = 'scroll';\n info.style.height = '85vh';\n info.style.marginBottom = '2vh';\n\n document.getElementsByClassName('sidebar')[0].appendChild(info);\n\n servers.transition() \n .duration(1000)\n .style('opacity', 0)\n .remove()\n .call(endAll, initPlayerList, id);\n}", "function doIt() {\n\n\n\n\t//// Feature #1 : Hide the sidebar. Fullsize the content.\n\n\t// Toggle the sidebar by clicking the \"page background\" (empty space outside\n\t// the main content). Sometimes clicking the content background is enough.\n\n\tif (toggleSidebar) {\n\n\t\tvar content = document.getElementById(\"content\")\n\t\t\t|| document.getElementById(\"column-content\");\n\t\tvar sideBar = document.getElementById(\"column-one\")\n\t\t\t|| document.getElementById(\"panel\")\n\t\t\t|| /* WikiMedia: */ document.getElementById(\"mw-panel\")\n\t\t\t|| /* forgot: */ document.getElementById(\"jq-interiorNavigation\")\n\t\t\t|| /* pmwiki: */ document.getElementById('wikileft');\n\t\tvar toToggle = [ document.getElementById(\"page-base\"), document.getElementById(\"siteNotice\"), document.getElementById(\"head\") ];\n\t\tvar cac = document.getElementById(\"p-cactions\");\n\t\tvar cacOldHome = ( cac ? cac.parentNode : null );\n\n\t\tfunction toggleWikipediaSidebar(evt) {\n\n\t\t\t// We don't want to act on all clicked body elements (notably not the WP\n\t\t\t// image). I detected two types of tag we wanted to click.\n\t\t\t/*if (!evt || evt.target.tagName == \"UL\" || evt.target.tagName == \"DIV\") {*/\n\n\t\t\t// That was still activating on divs in the content! (Gaps between paragraphs.)\n\t\t\t// This only acts on the header area.\n\t\t\tvar thisElementTogglesSidebar;\n\t\t\tvar inStartup = (evt == null);\n\t\t\tif (inStartup) {\n\t\t\t\tthisElementTogglesSidebar = true;\n\t\t\t} else {\n\t\t\t\tvar elem = evt.target;\n\t\t\t\tvar clickedHeader = (elem.id == 'mw-head');\n\t\t\t\t// For wikia.com:\n\t\t\t\tclickedHeader |= (elem.id==\"WikiHeader\");\n\t\t\t\t// For Wikimedia:\n\t\t\t\tvar clickedPanelBackground = elem.id == 'mw-panel' || elem.className.indexOf('portal')>=0;\n\t\t\t\tclickedPanelBackground |= elem.id == 'column-content'; // for beebwiki (old mediawiki?)\n\t\t\t\t// Hopefully for sites in general. Allow one level below body. Needed for Wikia's UL.\n\t\t\t\tvar clickedAreaBelowSidebar = (elem.tagName == 'HTML' || elem.tagName == 'BODY');\n\t\t\t\tvar clickedBackground = (elem.parentNode && elem.parentNode.tagName == \"BODY\");\n\t\t\t\tthisElementTogglesSidebar = clickedHeader || clickedPanelBackground || clickedAreaBelowSidebar || clickedBackground;\n\t\t\t}\n\t\t\tif (thisElementTogglesSidebar) {\n\n\t\t\t\tif (evt)\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\tif (debug) { GM_log(\"evt=\",evt); }\n\t\t\t\t// if (evt) GM_log(\"evt.target.tagName=\"+evt.target.tagName);\n\t\t\t\t/* We put the GM_setValue calls on timers, so they won't slow down the rendering. */\n\t\t\t\t// Make the change animate smoothly:\n\t\t\t\tcontent.style.transition = 'all 150ms ease-in-out';\n\t\t\t\tif (sideBar) {\n\t\t\t\t\tif (sideBar.style.display == '') {\n\t\t\t\t\t\t// Wikipedia's column-one contains a lot of things we want to hide\n\t\t\t\t\t\tsideBar.style.display = 'none';\n\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\tcontent.oldMarginLeft = content.style.marginLeft;\n\t\t\t\t\t\t\tcontent.style.marginLeft = minimisedSidebarSize+'px';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (var i in toToggle) {\n\t\t\t\t\t\t\tif (toToggle[i]) { toToggle[i].style.display = 'none'; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// but one of them we want to preserve\n\t\t\t\t\t\t// (the row of tools across the top):\n\t\t\t\t\t\tif (cac)\n\t\t\t\t\t\t\tsideBar.parentNode.insertBefore(cac,sideBar.nextSibling);\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\tGM_setValue(\"sidebarVisible\",false);\n\t\t\t\t\t\t},200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfunction unhide() {\n\t\t\t\t\t\t\tsideBar.style.display = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetTimeout(unhide,delayUnhide);\n\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\tcontent.style.marginLeft = content.oldMarginLeft;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (var i in toToggle) {\n\t\t\t\t\t\t\tif (toToggle[i]) { toToggle[i].style.display = ''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (cac && cacOldHome)\n\t\t\t\t\t\t\tcacOldHome.appendChild(cac); // almost back where it was :P\n\t\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t\tGM_setValue(\"sidebarVisible\",true);\n\t\t\t\t\t\t},200);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t// log(\"sideBar=\"+sideBar+\" and content=\"+content);\n\t\tif (sideBar) {\n\t\t\t// We need to watch window for clicks below sidebar (Chrome).\n\t\t\tdocument.documentElement.addEventListener('click',toggleWikipediaSidebar,false);\n\t\t} else {\n\t\t\tlog(\"Did not have sideBar \"+sideBar+\" or content \"+content); // @todo Better to warn or error?\n\t\t}\n\n\t\tif (!GM_getValue(\"sidebarVisible\",true)) {\n\t\t\ttoggleWikipediaSidebar();\n\t\t}\n\n\t\t// TODO: Make a toggle button for it!\n\n\t\t// Fix for docs.jquery.com:\n\t\t/*\n\t\tvar j = document.getElementById(\"jq-primaryContent\");\n\t\tif (j) {\n\t\t\tj.style.setAttribute('display', 'block');\n\t\t\tj.style.setAttribute('float', 'none');\n\t\t\tj.style.setAttribute('width', '100%');\n\t\t}\n\t\t*/\n\t\tGM_addStyle(\"#jq-primaryContent { display: block; float: none; width: 100%; }\");\n\n\t}\n\n\n\n\t//// Feature #2: Make Table of Contents float\n\n\tif (makeTableOfContentsFloat) {\n\n\t\t/* @consider If the TOC has a \"Hide/Show\" link (\"button\") then we could\n\t\t * fire that instead of changing opacity.\n\t\t */\n\n\t\t// document.getElementById('column-one').appendChild(document.getElementById('toc'));\n\n\t\t// createFader basically worked but was a little bit buggy. (Unless the bugs were caused by conflict with other TOC script.)\n\t\t// Anyway createFader() has now been deprecated in favour of CSS :hover.\n\n\t\tfunction createFader(toc) {\n\n\t\t\tvar timer = null;\n\n\t\t\t// BUG: this didn't stop the two fades from conflicting when the user wiggles the mouse to start both!\n\t\t\tfunction resetTimeout(fn,ms) {\n\t\t\t\tif (timer) {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t}\n\t\t\t\tsetTimeout(fn,ms);\n\t\t\t}\n\n\t\t\tfunction fadeElement(elem,start,stop,speed,current) {\n\t\t\t\tif (current == null)\n\t\t\t\t\tcurrent = start;\n\t\t\t\tif (speed == null)\n\t\t\t\t\tspeed = (stop - start) / 8;\n\t\t\t\tif (Math.abs(current+speed-stop) > Math.abs(current-stop))\n\t\t\t\t\tcurrent = stop;\n\t\t\t\telse\n\t\t\t\t\tcurrent = current + speed;\n\t\t\t\telem.style.opacity = current;\n\t\t\t\tif (current != stop)\n\t\t\t\t\tresetTimeout(function(){fadeElement(elem,start,stop,speed,current);},50);\n\t\t\t}\n\n\t\t\ttoc.style.opacity = 0.3;\n\t\t\tvar listenElement = toc;\n\t\t\t// var listenElement = toc.getElementsByTagName('TD')[0];\n\t\t\tvar focused = false;\n\t\t\tvar visible = false;\n\t\t\tlistenElement.addEventListener('mouseover',function(){\n\t\t\t\tif (!visible)\n\t\t\t\t\tsetTimeout(function(){ if (focused) { visible=true; fadeElement(toc,0.4,1.0,0.2); } },10);\n\t\t\t\tfocused = true;\n\t\t\t},false);\n\t\t\tlistenElement.addEventListener('mouseout',function(){\n\t\t\t\tif (visible)\n\t\t\t\t\tsetTimeout(function(){ if (!focused) { visible=false; fadeElement(toc,1.0,0.2,-0.1); } },10);\n\t\t\t\tfocused = false;\n\t\t\t},false);\n\n\t\t}\n\n\n\t\tfunction tryTOC() {\n\n\t\t\t// Find the table of contents element:\n\t\t\tvar toc = document.getElementById(\"toc\") /* MediaWiki */\n\t\t\t\t\t || document.getElementsByClassName(\"table-of-contents\")[0] /* BashFAQ */\n\t\t\t\t\t || document.getElementsByClassName(\"toc\")[0] /* LeakyTap */\n\t\t\t\t\t || document.getElementsByClassName(\"wt-toc\")[0]; /* Wikitravel */\n\n\t\t\tif (toc) {\n\n\t\t\t\taddButtonsConditionally(toc);\n\n\t\t\t\t// toc.style.backgroundColor = '#eeeeee';\n\t\t\t\t// alert(\"doing it!\");\n\t\t\t\ttoc.style.position = 'fixed';\n\t\t\t\ttoc.style.right = '16px';\n\t\t\t\t// toc.style.top = '16px';\n\t\t\t\t// A healthy gap from the top allows the user to access things fixed in the top right of the page, if they can scroll finely enough.\n\t\t\t\t// toc.style.top = '24px';\n\t\t\t\t//toc.style.right = '4%';\n\t\t\t\t//toc.style.top = '10%';\n\t\t\t\ttoc.style.right = '4px';\n\t\t\t\ttoc.style.top = '84px'; // We want to be below the search box!\n\t\t\t\t// toc.style.left = '';\n\t\t\t\t// toc.style.bottom = '';\n\t\t\t\ttoc.style.zIndex = '5000';\n\t\t\t\t// fadeElement(toc,1.0,0.4);\n\t\t\t\t// This might work for a simple toc div\n\t\t\t\ttoc.style.maxHeight = \"80%\";\n\t\t\t\ttoc.style.maxWidth = \"32%\";\n\n\t\t\t\t/* \n\t\t\t\t * Sometimes specifying max-height: 80% does not work, the toc won't shrink.\n\t\t\t\t * This may be when it's a table and not a div. Then we must set max-height on the content. (Maybe we don't actually need to set pixels if we find the right element.)\n\t\t\t\t */\n\t\t\t\ttoc.id = \"toc\";\n\t\t\t\tvar maxHeight = window.innerHeight * 0.8 | 0;\n\t\t\t\tvar maxWidth = window.innerWidth * 0.4 | 0;\n\n\t\t\t\t/*\n\t\t\t\t * WikiMedia tree looks like this: <table id=\"toc\" class=\"toc\"><tbody><tr><td><div id=\"toctitle\"><h2>Contents</h2>...</div> <ul> <li class=\"toclevel-1 tocsection-1\">\n\t\t\t\t Here is a long TOC: http://mewiki.project357.com/wiki/X264_Settings#Input.2FOutput\n\t\t\t\t */\n\t\t\t\t// GM_addStyle(\"#toc ul { overflow: auto; max-width: \"+maxWidth+\"px; max-height: \"+maxHeight+\"px; }\");\n\t\t\t\tvar rootUL = toc.getElementsByTagName(\"UL\")[0];\n\t\t\t\tif (!rootUL)\n\t\t\t\t\trootUL = toc;\n\t\t\t\t// DONE: If we can cleanly separate them, we might want to put a scrollbar on the content element, leaving the title outside it.\n\t\t\t\trootUL.style.overflow = \"auto\";\n\t\t\t\trootUL.style.maxWidth = maxWidth+'px';\n\t\t\t\trootUL.style.maxHeight = maxHeight+'px';\n\n\t\t\t\t// But if calc and vh are available, then we can make it adaptive\n\t\t\t\t// Of this 132px, 84px comes from the 'top', and the rest comes from the toc title and padding.\n\t\t\t\trootUL.style.maxHeight = \"calc(100vh - 128px)\";\n\n\t\t\t\t// Slide up into the corner as the page scrolls\n\t\t\t\twindow.addEventListener('scroll', checkSize);\n\t\t\t\twindow.addEventListener('resize', checkSize);\n\t\t\t\t\n\t\t\t\tfunction checkSize () {\n\t\t\t\t\tvar top = Math.min(84, Math.max(4, 84 - document.body.scrollTop));\n\t\t\t\t\tdocument.getElementById('toc').style.top = top + 'px';\n\t\t\t\t\trootUL.style.maxHeight = (window.innerHeight - top - 44) + 'px';\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\tcreateFader(toc);\n\t\t\t\t*/\n\t\t\t\t//// Alternative rules from table_of_contents_everywhere script:\n\t\t\t\ttoc.id = \"toc\";\n\t\t\t\t// GM_addStyle(\"#toc { position: fixed; top: 10%; right: 4%; background-color: white; color: black; font-weight: normal; padding: 5px; border: 1px solid grey; z-index: 5555; max-height: 80%; overflow: auto; }\");\n\t\t\t\tGM_addStyle(\"#toc { opacity: 0.2; }\");\n\t\t\t\tGM_addStyle(\"#toc:hover { opacity: 1.0; }\");\n\n\t\t\t\tvar tocID = \"toc\";\n\t\t\t\tvar resetProps = \"\";\n\t\t\t\t// This is a clone of the code in table_of_contents_everyw.user.js\n\t\t\t\tGM_addStyle(\n\t\t\t\t\t \"#\"+tocID+\" {\"\n\t\t\t\t\t+ \" position: fixed;\"\n\t\t\t\t\t+ \" top: 84px;\"\n\t\t\t\t\t+ \" right: 4px;\"\n\t\t\t\t\t+ \" background-color: #f4f4f4;\"\n\t\t\t\t\t+ \" color: black;\"\n\t\t\t\t\t+ \" font-weight: normal;\"\n\t\t\t\t\t+ \" padding: 5px;\"\n\t\t\t\t\t//+ \" border: 1px solid grey;\"\n\t\t\t\t\t+ \" z-index: 9999999;\"\n\t\t\t\t\t+ \" \"+resetProps\n\t\t\t\t\t+ \"}\"\n\t\t\t\t\t+ \"#\"+tocID+\" { opacity: 0.3; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" { border: 1px solid #0003; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" { border-radius: 3px; }\"\n\t\t\t\t\t+ \"#\"+tocID+\":hover { box-shadow: 0px 2px 12px 0px rgba(0,0,0,0.1); }\"\n\t\t\t\t\t+ \"#\"+tocID+\":hover { -webkit-box-shadow: 0px 2px 12px 0px rgba(0,0,0,0.1); }\"\n\t\t\t\t\t+ \"#\"+tocID+\":hover { opacity: 1.0; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" > * > * { opacity: 0.0; }\"\n\t\t\t\t\t+ \"#\"+tocID+\":hover > * > * { opacity: 1.0; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" , #\"+tocID+\" > * > * { transition: opacity; transition-duration: 400ms; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" , #\"+tocID+\" > * > * { -webkit-transition: opacity; -webkit-transition-duration: 400ms; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" { padding: 0; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" > div { padding: 4px 12px; }\"\n\t\t\t\t\t+ \"#\"+tocID+\" > ul { padding: 0px 12px 2px 12px; margin-top: 0; }\"\n\t\t\t\t);\n\n\t\t\t\t// For Wikia (tested in Chrome):\n\t\t\t\tif (getComputedStyle(toc)[\"background-color\"] == \"rgba(0, 0, 0, 0)\") {\n\t\t\t\t\ttoc.style.backgroundColor = 'white';\n\t\t\t\t}\n\n\t\t\t\tcheckSize();\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// Ideally we want to act before # anchor position occurs, but we may\n\t\t// need to wait for the toc if it is not added to the DOM until later.\n\t\tif (!tryTOC()) {\n\t\t\tsetTimeout(tryTOC,400);\n\t\t}\n\n\t}\n\n\n\n\t// In case you have * in your includes, only continue for pages which have\n\t// \"wiki\" before \"?\" in the URL, or who have both toc and content elements.\n\tvar isWikiPage = document.location.href.split(\"?\")[0].match(\"wiki\")\n\t\t|| ( document.getElementById(\"toc\") && document.getElementById(\"content\") );\n\n\tif (!isWikiPage)\n\t\treturn;\n\n\n\n\t// Delay. Feature 3 and 4 can run a bit later, without *too* much page\n\t// change, but with significant processor saving!\n\tsetTimeout(function(){\n\n\n\n\t//// Feature #3 : Indent the blocks so their tree-like structure is visible\n\n\t// Oct 2012: Disabled - was making a right mess of the header/nav on Wikia\n\tif (document.location.host.match(/wikia.com/)) {\n\t\tindentSubBlocks = false;\n\t}\n\n\tif (indentSubBlocks) {\n\n\t\tfunction indent(tag) {\n\t\t\t// By targetting search we avoid indenting any blocks in left-hand-column (sidebar).\n\t\t\tvar whereToSearch = document.getElementById('bodyContent') || document.getElementById('content') || document.getElementById('WikiaMainContent') || document.body;\n\t\t\tvar elems = whereToSearch.getElementsByTagName(tag);\n\t\t\tif (elems.length == 1)\n\t\t\t\treturn;\n\t\t\t// for (var i=0;i<elems.length;i++) {\n\t\t\tfor (var i=elems.length;i-->0;) {\n\t\t\t\tvar elem = elems[i];\n\t\t\t\t/* Don't fiddle with main heading, siteSub, or TOC. */\n\t\t\t\tif (elem.className == 'firstHeading')\n\t\t\t\t\tcontinue;\n\t\t\t\tif (elem.id == 'siteSub')\n\t\t\t\t\tcontinue;\n\t\t\t\tif (elem.textContent == 'Contents')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// We have found a \"heading\" element. Every sibling after this\n\t\t\t\t// element should be indented a bit.\n\n\t\t\t\t//// Current method of indenting: Create a UL and put everything\n\t\t\t\t//// inside that.\n\t\t\t\t// var newChild = document.createElement('blockquote');\n\t\t\t\t//// Unfortunately blockquotes tend to indent too much!\n\t\t\t\t// var newChild = document.createElement('DIV');\n\t\t\t\t//var newChild = document.createElement('UL'); // UL works better with my Folding script, but we must not do this to the TOC!\n\t\t\t\tvar newChild = document.createElement('div'); // <ul>s look wrong on bitbucket wikis (indent too much). And since I haven't used my folding script recently, I am switching back to a nice <div>.\n\t\t\t\tnewChild.style.marginLeft = '1.0em';\n\t\t\t\tvar toAdd = elem.nextSibling;\n\t\t\t\twhile (toAdd && toAdd.tagName != tag) {\n\t\t\t\t\t// That last condition means a h3 might swallow an h2 if they\n\t\t\t\t\t// are on the same level! But it *should* swallow an h4.\n\t\t\t\t\t// TODO: We should break if we encounter any marker with level\n\t\t\t\t\t// above or equal to our own, otherwise continue to swallow.\n\t\t\t\t\tvar next = toAdd.nextSibling;\n\t\t\t\t\tnewChild.appendChild(toAdd);\n\t\t\t\t\ttoAdd = next;\n\t\t\t\t}\n\t\t\t\telem.parentNode.insertBefore(newChild,elem.nextSibling);\n\n\t\t\t\t// CONSIDER: Alternative: Do not swallow at all, do not create\n\t\t\t\t// newChild and change the page's tree. Just modify\n\t\t\t\t// style.marginLeft, resetting it if an incompatible element style\n\t\t\t\t// already exists there, updating it if we have already indented\n\t\t\t\t// this element!\n\n\t\t\t\t// GM_log(\"Placed \"+newChild+\" after \"+elem);\n\t\t\t}\n\t\t}\n\n\t\tindent(\"H1\"); indent(\"H2\"); indent(\"H3\"); indent(\"H4\"); indent(\"H5\"); indent(\"H6\");\n\n\t}\n\n\n\n\t//// Feature #4: Change underlined headings to overlined headings.\n\n\tif (fixUnderlinesToOverlines) {\n\n\t\t// Hide any existing underlines\n\t\t// I made this !important to defeat the more specific `.markdown-body h*` rules on GitHub wikis.\n\t\tGM_addStyle(\"h1, h2, h3, h4, h5, h6 { border-bottom: 0 !important; }\");\n\n\t\t// Add our own overlines instead\n\t\tGM_addStyle(\"h1, h2, h3, h4, h5, h6 { border-top: 1px solid #AAAAAA; }\");\n\n\t\t// Do not use `text-decoration: underline;`. It will only appear as wide as the text (not filling the page width) and will make the text look like a hyperlink!\n\n\t}\n\n\n\n\t},1000);\n\n\n\n\n} // end doIt", "function updateSidebar (message) {\n let pageTitle = document.getElementById('page-title-content');\n let headings = document.getElementById('headings-content');\n\n if (typeof message === 'object') {\n const info = message.info;\n\n if (debug) {\n console.log('------------------------')\n console.log(`number of landmarks: ${info.landmarks.length}`);\n let count = 0;\n info.landmarks.forEach(landmark =>\n console.log(`${++count}. ${landmark.role}: ${landmark.name}`));\n console.log('------------------------')\n }\n\n // Update the page-title box\n pageTitle.innerHTML = getFormattedTitle(message);\n\n // Update the headings box\n if (info.headings.length) {\n headings.innerHTML = getFormattedHeadings(info.headings);\n listBox = new ListBox(headings, onListBoxAction);\n updateButton(true);\n }\n else {\n headings.innerHTML = `<div class=\"grid-message\">${noHeadingElements}</div>`;\n }\n }\n else {\n pageTitle.textContent = message;\n headings.textContent = '';\n }\n}", "function update_sidebar() {\n $('#app_type').text(esp8266.type);\n $('#dev-name').text(esp8266.name);\n switch (esp8266.type) {\n case \"ESPBOT\":\n $('#app_home').show();\n $('#th_history').hide();\n $('#th_ctrl_settings').hide();\n $('#st_relay').hide();\n $('#dev_journal').show();\n $('#dev_settings').show();\n $('#dev_gpio').show();\n $('#dev_debug').show();\n $('#dev_list').show();\n $('#app_info').show();\n break;\n case \"THERMOSTAT\":\n $('#app_home').show();\n $('#th_history').show();\n $('#th_ctrl_settings').show();\n $('#st_relay').hide();\n $('#dev_journal').show();\n $('#dev_settings').show();\n $('#dev_gpio').hide();\n $('#dev_debug').show();\n $('#dev_list').show();\n $('#app_info').show();\n break;\n case \"SMART_TIMER\":\n $('#app_home').show();\n $('#th_history').hide();\n $('#th_ctrl_settings').hide();\n $('#st_relay').show();\n $('#dev_journal').show();\n $('#dev_settings').show();\n $('#dev_gpio').show();\n $('#dev_debug').show();\n $('#dev_list').show();\n $('#app_info').show();\n break;\n default:\n $('#app_home').hide();\n $('#th_history').hide();\n $('#th_ctrl_settings').hide();\n $('#st_relay').hide();\n $('#dev_journal').hide();\n $('#dev_settings').hide();\n $('#dev_gpio').hide();\n $('#dev_debug').hide();\n $('#dev_list').show();\n $('#app_info').hide();\n break;\n }\n}", "function servePage(data, page, title){\n setActivePage(data);\n var template = HtmlService.createTemplateFromFile(page).evaluate().setTitle(title);\n DocumentApp.getUi().showSidebar(template);\n}", "function initialize() {\n google.script.run\n .withSuccessHandler(updateDisplay)\n .getSidebarDisplay();\n}", "function loadContent(){\n\t// Load Overview\n\tvar contentOverview = $(\n\t\t'<div id=\"content-Overview\" class=\"col-md-12 sub-contents\">'+\n\t\t'\t <div class=\"row\">'+\n\t\t'\t <div class=\"col-md-12\">'+\n\t\t' <h2 class=\"sub-header\">Overview</h2>'+\n\t\t' </div>'+\n\t\t'\t <div class=\"col-md-8 content-left\">'+\n\t\t' This webpage is an example of a dashboard.</div>'+\n\t\t'\t <div class=\"col-md-4 content-right\"></div>'+\n\t\t' </div>'+\n\t\t'</div>');\n\t$('div#content').append( contentOverview );\n\t\n\t// Load Reports\n\tvar contentReports = $(\n\t\t'<div id=\"content-Reports\" class=\"col-md-12 sub-contents\">'+\n\t\t'\t <div class=\"row\">'+\n\t\t'\t <div class=\"col-md-12\">'+\n\t\t' <h2 class=\"sub-header\">Reports</h2>'+\n\t\t' </div>'+\n\t\t'\t <div class=\"col-md-8 content-left\">'+\n\t\t' <h4>Links to Reports</h4>'+\n\t\t' <ul>'+\n\t\t' <li><a href=\"\">Link 1</a></li>'+\n\t\t' <li><a href=\"\">Link 2</a></li>'+\n\t\t' <li><a href=\"\">Link 3</a></li>'+\n\t\t' </ul>'+\n\t\t' </div>'+\n\t\t'\t <div class=\"col-md-4 content-right\"></div>'+\n\t\t' </div>'+\n\t\t'</div>');\n\tcontentReports.hide();\n\t$('div#content').append( contentReports );\n\t\n\t// Load Plots\n\tvar contentPlots = $(\n\t\t'<div id=\"content-Plots\" class=\"col-md-12 sub-contents\">'+\n\t\t'\t <div class=\"row\">'+\n\t\t'\t <div class=\"col-md-12\">'+\n\t\t' <h2 class=\"sub-header\">Plots</h2>'+\n\t\t' </div>'+\n\t\t'\t <div class=\"col-md-8 content-left\">'+\n\t\t' </div>'+\n\t\t'\t <div class=\"col-md-4 content-right\"></div>'+\n\t\t' </div>'+\n\t\t'</div>');\n\tcontentPlots.hide();\n\t$('div#content').append( contentPlots );\n\t\n\t\n\t// Load Export\n\tvar contentExport = $(\n\t\t'<div id=\"content-Export\" class=\"col-md-12 sub-contents\">'+\n\t\t'\t\t<div class=\"row\">'+\n\t\t'\t\t\t<div class=\"col-md-12\">'+\n\t\t'\t\t\t\t<h2 class=\"sub-header\">Export</h2>'+\n\t\t'\t\t\t</div>'+\n\t\t'\t\t\t<div class=\"col-md-6 content-left\">'+\n\t\t'\t\t\t<div class=\"table-responsive\">'+\n\t\t'\t\t\t\t<table class=\"table table-striped\">'+\n\t\t'\t\t\t\t\t<thead>'+\n\t\t'\t\t\t\t\t\t<tr>'+\n\t\t'\t\t\t\t\t\t\t<th>Time (UNIX)</th>'+\n\t\t'\t\t\t\t\t\t\t<th>Time (ISO 8601)</th>'+\n\t\t'\t\t\t\t\t\t\t<th>Value</th>'+\n\t\t'\t\t\t\t\t\t</tr>'+\n\t\t'\t\t\t\t\t</thead>'+\n\t\t'\t\t\t\t\t<tbody>'+\n\t\t'\t\t\t\t\t</tbody>'+\n\t\t'\t\t\t\t</table>'+\n\t\t'\t\t\t</div>'+\n\t\t'\t\t</div>'+\n\t\t'\t\t<div class=\"col-md-6 content-right\"></div>'+\n\t\t'\t\t</div>'+\n\t\t'</div>');\n\tcontentExport.hide();\n\t$('div#content').append( contentExport );\n}", "function showPushDataSidebar() {\n var ui = HtmlService.createTemplateFromFile('ConnectionDetailsSidebar')\n .evaluate()\n .setTitle('Send Data To Cluster');\n SpreadsheetApp.getUi().showSidebar(ui);\n}", "function setupMain() {\n\tupkeep();\n\tDRAW.newsBorder($('#news_border'));\n\t\n\tvar $a \t\t= $('#news_wrapper');\n\tvar loadNews \t= function(e) {\n\t\n\t\t// Change the load target based on which button is pressed\n\t\t// Changer la cible en fonction du bouton sur lequel on appuie sur\n\t\tswitch ( e.currentTarget.getAttribute('id') ) {\n\t\t\tcase 'news_main_button':\n\t\t\tvar path = 'include/sampleNews.html';\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'news_tag_button':\n\t\t\tvar path = 'include/sampleNewsTag.html';\n\t\t\tbreak;\n\t\t}\n\t\n\t\tvar b = $a.data('jsp');\n\t\t\n\t\tif ( b ) {\n\t\t\tvar c = b.getContentPane();\n\t\t\tc.load(path, function() {\n\t\t\t\t$('#news_window section.news-section').each(function() {\n\t\t\t\t\t$(this).height($(this).height());\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tb.reinitialise();\n\t\t\t});\n\t\t} else {\n\t\t\t$a.load(path, function() {\n\t\t\t\t$('#news_window section.news-section').each(function() {\n\t\t\t\t\t$(this).height($(this).height());\n\t\t\t\t});\n\t\t\t\n\t\t\t\t$a.jScrollPane({verticalGutter: 10});\n\t\t\t});\n\t\t}\n\t};\n\t\n\t// Button font scale\n\t//var b = $('#news_button_wrapper');\n\t//b.css('font-size', b.height()*0.20);\n\t\n\tvar c = $('#notification_list');\n\tc.css('font-size', c.children('div.notif-entry:first').height()*0.125);\n\t\n\t// Button event and load initial news\n\t$('#news_main_button').click(loadNews).click();\n\t$('#news_tag_button').click(loadNews);\n\t$('#notify_btn_refresh').click(function() {\n\t\talert('refresh');\n\t});\n\t$('#notify_btn_eraseall').click(function() {\n\t\talert('remove all');\n\t});\n\t\n\t// Draw the list window\n\tDRAW.notifications($('#notification_wrapper'));\n\tDRAW.mainBars($('#news_button_wrapper'));\n\t\n\t// Event for clicking on notification\n\t//$('#notification_list').on\n\t// Scale Bar\n\t//var r1 = $('#news_button_wrapper').width() / 627;\n\t//var r2 = $('#news_button_wrapper').height()/ 67;\n\t//$('#mainBar path:first').attr('transform', 'matrix('+r1+',0,0,'+r2+',0,0)');\n}", "function loadAdmin() {\n\t\n\tvar main = document.getElementById('content');\n\t\n\t/* top section */\n\tvar top = document.createElement(\"div\");\n\ttop.setAttribute(\"class\",\"top\");\n\t\n\tvar h1 = document.createElement(\"h1\");\n\th1.innerHTML = \"Computer Forge @ CU\";\n\t\n\tvar logolink = document.createElement(\"a\");\n\tlogolink.setAttribute(\"href\", \"http://128.138.202.115/\");\n\t\n\tvar logo = document.createElement(\"img\");\n\tlogo.src = \"cuboulder.png\";\n\t\n\tlogolink.appendChild(logo);\n\t\n\ttop.appendChild(logolink);\n\ttop.appendChild(h1);\n\t\n\t/* menu section */\n\tvar menu = document.createElement(\"div\");\n\tmenu.setAttribute(\"class\", \"menu\");\n\t\n\tvar projbtn = document.createElement(\"a\");\n\tprojbtn.setAttribute(\"class\", \"menubtn\");\n\tprojbtn.setAttribute(\"onclick\", \"displayContent('updateadmin');\");\n\tprojbtn.innerHTML = \"Admin & News\";\n\t\n\tvar li0 = document.createElement(\"li\");\n\tli0.appendChild(projbtn);\n\t\n\tvar aboutbtn = document.createElement(\"a\");\n\taboutbtn.setAttribute(\"class\", \"menubtn\");\n\taboutbtn.setAttribute(\"onclick\", \"displayContent('updatemembers');\");\n\taboutbtn.innerHTML = \"Members\";\n\t\n\tvar li1 = document.createElement(\"li\");\n\tli1.appendChild(aboutbtn);\n\t\n\tvar memberbtn = document.createElement(\"a\");\n\tmemberbtn.setAttribute(\"class\", \"menubtn\");\n\tmemberbtn.setAttribute(\"onclick\", \"displayContent('updateprojects');\");\n\tmemberbtn.innerHTML = \"Projects\";\n\t\n\tvar li2 = document.createElement(\"li\");\n\tli2.appendChild(memberbtn);\n\t\n\tvar logoutbtn = document.createElement(\"a\");\n\tlogoutbtn.setAttribute(\"class\", \"menubtn logoutbtn\");\n\tlogoutbtn.setAttribute(\"onclick\", \"logOut();\");\n\tlogoutbtn.innerHTML = \"Log Out\";\n\t\n\tvar li3 = document.createElement(\"li\");\n\tli3.appendChild(logoutbtn);\n\t\n\tvar ulmenu = document.createElement(\"ul\");\n\tulmenu.setAttribute(\"class\", \"menulist\");\n\t\n\tulmenu.appendChild(li0);\n\tulmenu.appendChild(li1);\n\tulmenu.appendChild(li2);\n\tulmenu.appendChild(li3);\n\t\n\tmenu.appendChild(ulmenu);\n\t\n\t/* view error div */\n\tvar viewerror = document.createElement(\"div\");\n\tviewerror.setAttribute(\"id\", \"viewerror\");\n\tviewerror.innerHTML = \"Your Screen Is Too Narrow To View The Site\";\n\t\n\tdocument.getElementsByTagName(\"body\")[0].appendChild(viewerror);\n\t\n\t/* div for different pages */\n\t\n\tvar pagedisplay = document.createElement(\"div\");\n\tpagedisplay.setAttribute(\"class\", \"pagedisplay\");\n\tpagedisplay.setAttribute(\"id\", \"pagedisplay\");\n\t\n\t/* default landing is members page */\n\tpagedisplay.appendChild(getMembers());\n\t\n\t/* append everything to main */\n\tmain.appendChild(top);\n\tmain.appendChild(menu);\n\tmain.appendChild(pagedisplay);\n}", "function updateSidePanelWithVars(){\n\n var x = document.getElementById(\"dispSysInfo\");\n clearNode(x);\n \n x.appendChild(document.createTextNode(\"Input Values\"));\n x.appendChild(document.createElement(\"br\")); \n for ( var key in inputDivs ){\n x.appendChild(document.createTextNode(inputDivs[key].varName + \" { \"));\n for ( var key2 in inputDivs[key].memFuncs ) {\n if ( isLastKey ( key2, inputDivs[key].memFuncs ) ) {\n x.appendChild(document.createTextNode(inputDivs[key].memFuncs[key2].funName)); \n } else {\n x.appendChild(document.createTextNode(inputDivs[key].memFuncs[key2].funName + \", \")); \n }\n \n } \n x.appendChild(document.createTextNode(\" }\"));\n x.appendChild(document.createElement(\"br\")); \n }\n x.appendChild(document.createElement(\"br\")); \n x.appendChild(document.createTextNode(\"Output Values\"));\n x.appendChild(document.createElement(\"br\")); \n for ( var key in outputDivs ){\n x.appendChild(document.createTextNode(outputDivs[key].varName + \" { \"));\n for ( var key2 in outputDivs[key].memFuncs ) {\n if ( isLastKey ( key2, outputDivs[key].memFuncs ) ) {\n x.appendChild(document.createTextNode(outputDivs[key].memFuncs[key2].funName)); \n \n } else {\n x.appendChild(document.createTextNode(outputDivs[key].memFuncs[key2].funName + \", \")); \n }\n }\n x.appendChild(document.createTextNode(\" }\"));\n x.appendChild(document.createElement(\"br\")); \n }\n\n}", "function initSidebar() {\n // Pick up sidebar components loaded by App.View\n Annotator.Elements.$sidebarContainer = $(\"#side-status-container\");\n Annotator.Elements.$sidebar = $('#side-status');\n\n // 1) Loads the initial HTML template for the sidebar\n Annotator.Elements.$sidebar.html(initSidebarHTML());\n\n // Cache more important DOM elements\n Annotator.Elements.$mainText = App.View.Elements.$mainText;\n Annotator.Elements.$sideStatusNav = $('#side-status-nav');\n Annotator.Elements.$sideStatusEventActive = $('#side-status-event-active');\n Annotator.Elements.$sideStatusEventTotal = $('#side-status-event-total');\n Annotator.Elements.$jumpButton = $('#jump-button');\n Annotator.Elements.$jumpID = $('#jump-id');\n Annotator.Elements.$prevButton = $('#prev-button');\n Annotator.Elements.$scrollButton = $('#scroll-button');\n Annotator.Elements.$nextButton = $('#next-button');\n\n if (App.Config.Annotator.newEvents && Annotator.annotateMode) {\n Annotator.Elements.$sideStatusEvents = $('#side-status-events');\n Annotator.Elements.$newEventButton = $('#new-event-button');\n }\n\n if (App.Config.Annotator.deleteManualEvents && Annotator.annotateMode) {\n Annotator.Elements.$deleteEventButton = $('#delete-event-button');\n }\n\n if (App.Config.Annotator.newContexts && Annotator.annotateMode) {\n Annotator.Elements.$sideStatusContexts = $('#side-status-contexts');\n Annotator.Elements.$newContextStartInterface = $('#new-context-start-interface');\n Annotator.Elements.$newContextStart = $('#new-context-start');\n Annotator.Elements.$newContextInterface = $('#new-context-interface');\n Annotator.Elements.$newContextText = $('#new-context-text');\n Annotator.Elements.$newContextCreate = $('#new-context-create');\n Annotator.Elements.$newContextCancel = $('#new-context-cancel');\n }\n\n if (parseInt(App.Paper.annotation_pass) == 2 && Annotator.annotateMode) {\n // False positive marking for Reach events\n Annotator.Elements.$sideStatusFp = $('#side-status-fp');\n Annotator.Elements.$markFpButton = $('#mark-fp-button');\n }\n\n Annotator.Elements.$sideStatusMain = $('#side-status-main');\n Annotator.Elements.$sideStatusSubmit = $('#side-status-submit');\n Annotator.Elements.$commentsButton = $('#comments-button');\n Annotator.Elements.$returnButton = $('#return-button');\n Annotator.Elements.$sideStatusHR = Annotator.Elements.$sidebar.find('hr').first();\n\n // 2) Refresh the list of contexts on the sidebar\n Annotator.refreshContextList();\n\n // 3) Resize the sidebar to fit the window\n resizeSidebar();\n\n // 4) Refresh the sticky sidebar position (to fix a Foundation bug)\n refreshSticky();\n\n // 5) Context list overflow shadow (to make overflows more obvious on OS X)\n contextOverflowShadow();\n\n // 7) Refresh active elements\n Annotator.refreshActiveElements();\n }", "function setDomain() {\n\n\t\n\tauth_token = Cookies.get('auth_token'); \n\t//console.log(auth_token);\n\tvar notifBar = \"\";\n\t// var notifBar2 = \"\";\n\tvar notifList;\n\tvar selectRequest = new XMLHttpRequest();\n\tselectRequest.onreadystatechange=function() {\n\t\tif(selectRequest.readyState===XMLHttpRequest.DONE && selectRequest.status===200) {\n\t\t\t//console.log('inside sidebar.js');\n\t\t\tnotifList = JSON.parse(selectRequest.responseText);\n\t\t\tvar n = notifList.length;\n\t\t\tfor(var i=0; i < n; i++) {\n\t\t\t\t/*var data = {\n\t\t\t\t\teventDetails : notifList[i].eventDetails,\n\t\t\t\t\teventOrgsr : notifList[i].eventOrgsr\n\t\t\t\t\t}*/\n\t\t\t\tnotifBar += CSDomainCardQueue3(notifList[i]);\n\t\t\t\t// notifBar2 += CSDomainCardQueue2(notifList[i]);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tif(notifBar === \"\") {\n\t\t\t\tnotifBar = \"<h3>No Course Added!</h3>\";\n\t\t\t}\n\t\t\tsidebarDomain.innerHTML = notifBar;\n\t\t}\n\t}\n\tselectRequest.open('POST', \"https://data.affirmatively33.hasura-app.io/v1/query\",true);\n\tselectRequest.setRequestHeader('Content-type','application/json');\n\tselectRequest.setRequestHeader('Authorization','Bearer '+auth_token);\n\tselectRequest.send(JSON.stringify({type: \"select\",args:{table: \"CSDomains\", columns:[\"*\"]}}));\n}", "function manager(args) {\n\n // get the actual page name\n var parts = args.split('&');\n var page = parts[0];\n // special is an additional parameter to render the same page in different ways\n // for istance, single_class.html can contains different informations based on\n // different values of special\n var special = parts[1];\n var id = parts[2];\n\n // enable script for calls to external php\n \n // load the page dinamycally inside the template\n $( \".mainContent\" ).load(page+'.html', function() {\n\n //************** SPECIFIC PAGE FUNCTIONS ****************//\n // after loading the whole page we should load the page manager for links inside the main div, this is because\n // the callback function\n switch (page) {\n case 'home':\n clickPageLinks();\n break;\n case 'allPromotions':\n getPromoIndex();\n clickPageLinks();\n break;\n case 'allSmartLifeServices':\n var categoria=\"smartlife\";\n getCategorie(categoria,function () { clickPageLinks(); });\n break;\n case 'allAssistanceServices':\n clickPageLinks();\n break;\n case 'assistanceServices':\n var tabella='assistanceservices';\n var categoria=special;\n var prevSection='allAssistanceServices';\n if(categoria=='promotions'){\n getIntro(tabella, categoria, function () { clickPageLinks(); });\n fillMultipleGroupDynamicButtons('allPromotions',categoria);\n loadSidebar('assistanceServicesPromo');\n }\n else{\n getIntro(tabella,categoria,function () { clickPageLinks(); });\n loadSidebar(special);\n fillMultipleGroupDynamicButtons(prevSection,categoria);\n }\n loadCategoryName(special);\n loadTableName(tabella);\n loadBreadCrumb(special);\n break;\n case 'assistanceServicesInfo':\n var tabella='assistanceservices';\n var prevSection='assistanceServices';\n getAssistanceInfo(tabella,special,id,function () { clickPageLinks(); });\n loadCategoryName(special);\n loadTableName(tabella);\n loadBreadCrumb(special);\n fillTopicDynamicButtons(prevSection,special,id);\n clickPageLinks();\n break;\n case 'smartlifeservices': //è da modificare: plans deve andare dentro la tabella smartlife\n var tabella='smartlifeservices';\n var categoria=special;\n var prevSection='allSmartLifeServices';\n if(categoria!='promotions') {\n getIntro(tabella,categoria,function () { clickPageLinks(); });\n loadSidebar(special);\n loadTableName(tabella);\n fillMultipleGroupDynamicButtons(prevSection,categoria);\n }\n else {\n getPromoIntro(tabella,function () { clickPageLinks(); });\n loadTableName(tabella);\n fillMultipleGroupDynamicButtons('allPromotions',categoria);\n loadSidebar('smartlifePromo');\n }\n loadCategoryName(special);\n loadBreadCrumb(special);\n break;\n case 'smartlifeInfo':\n var tabella='smartlifeservices';\n getPlanInfo(tabella,special,id,function () { clickPageLinks(); });\n loadCategoryName(special);\n loadTableName(tabella);\n loadBreadCrumb(special);\n fillTopicDynamicButtons(tabella,special,id);\n clickPageLinks();\n break;\n case 'devices':\n getIntro(page,special,function () { clickPageLinks(); });\n loadSidebar(special);\n loadCategoryName(special);\n loadBreadCrumb(special);\n loadTableName(page);\n if(special!='promotions')\n fillMultipleGroupDynamicButtons('allDevices',special);\n else\n fillMultipleGroupDynamicButtons('allPromotions',special);\n break;\n case 'transitionDeviceToSmartLife':\n getCombinedSmartLife(special,id,function () { clickPageLinks(); });\n loadBreadCrumb(special);\n break;\n case 'transitionDeviceToAssistantServices':\n getCombinedAssistantServices(special,id,function () { clickPageLinks(); });\n loadBreadCrumb(special);\n break;\n case 'deviceInfo':\n var tabella='devices';\n getDeviceInfo(tabella,special,id,function () { clickPageLinks(); });\n fillTopicDynamicButtons(tabella,special,id);\n loadBreadCrumb(special);\n break;\n case 'caratteristicheTecniche':\n clickPageLinks();\n break;\n case 'whoweare':\n loadStaticPageBreadCrumb('Innovation');\n clickPageLinks();\n break;\n case 'transitionSmartLifeToDevice':\n var tabella='smartlifeservices';\n loadCategoryName(special);\n loadTableName(page);\n loadBreadCrumb(special);\n getCombinedDevices(special,id,function () { clickPageLinks(); });\n break;\n case 'transitionAssistancetoDevices':\n var tabella='assistanceservices';\n loadCategoryName(special);\n loadTableName(page);\n loadBreadCrumb(special);\n getCombinedDevicesForAssistance(special,id,function () { clickPageLinks(); });\n break;\n case 'groupTelecomItalia':\n loadStaticPageBreadCrumb('Group Description');\n clickPageLinks();\n break;\n default:\n clickPageLinks();\n }\n //************** END SPECIFIC PAGE FUNCTIONS ***********//\n\n // scroll to top when loading a new page\n window.scrollTo(0,0);\n });\n\n}", "function renderContent() {\n var content = document.getElementById('content_' + selected);\n // Initialize the pane.\n if (content.id == 'content_blocks') {\n // If the workspace was changed by the XML tab, Firefox will have performed\n // an incomplete rendering due to Blockly being invisible. Rerender.\n Blockly.mainWorkspace.render();\n //Check if the arduino code peek is showing\n if(document.getElementById('arduino_code_peek').style.display != 'none' ) {\n renderArduinoCode(null);\n }\n } else if (content.id == 'content_xml') {\n // Initialize the pane.\n var xmlTextarea = document.getElementById('textarea_xml');\n var xmlDom = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace);\n var xmlText = Blockly.Xml.domToPrettyText(xmlDom);\n xmlTextarea.value = xmlText;\n xmlTextarea.focus();\n } else if (content.id == 'content_arduino') {\n var code = Blockly.Generator.workspaceToCode('Arduino');\n var arduinoTextarea = document.getElementById('textarea_arduino');\n arduinoTextarea.value = code\n arduinoTextarea.focus();\n }\n}", "setup(data) {\n //Load the sidebar-content into memory\n const sidebarView = $(data);\n\n //Find all anchors and register the click-event\n sidebarView.find(\"a\").on(\"click\", this.handleClickMenuItem);\n\n //TODO: Add logic here to determine which menu items should be visible or not\n\n //Empty the sidebar-div and add the resulting view to the page\n $(\".sidebar\").empty().append(sidebarView);\n }", "function updateContent() {\n //console.log(`SCROLL: ${scroll}`);\n\n if (scroll > 10) {\n bio.style.transform = \"translateY(-20vh)\";\n elliott.style.transform = \"translateY(25vh)\";\n welcome.style.transform = \"translateY(-60vh)\";\n menuBar.style.background = \"#262626\";\n } else {\n bio.style.transform = \"none\";\n elliott.style.transform = \"none\";\n welcome.style.transform = \"none\";\n menuBar.style.background = \"#2c2a2c\";\n }\n\n if(scroll > integerRect.top - window.innerHeight * (2/3))\n {\n document.body.style.background = \"black\";\n emberBehavior = false;\n }else{\n document.body.style.background = \"var(--bgColor)\";\n emberBehavior = true;\n }\n\n //defined in embers.js\n scrollEmbers();\n //defined in refraction.js\n scrollRefraction();\n //defined in navMenu.js\n closeMenu();\n}", "create() {\n let body = document.getElementsByTagName(\"body\")[0];\n let html = SideTools.HTML;\n html = html.replace(/{pathImage}/g, window.easySafeEditor.options.getValue(\"paths.images\"));\n html = html.replace(/{pageEditTitle}/g, window.easySafeEditor.options.getValue(\"labels.pageEditTitle\"));\n html = html.replace(/{openMenu}/g, window.easySafeEditor.options.getValue(\"labels.openMenu\"));\n html = html.replace(/{closeMenu}/g, window.easySafeEditor.options.getValue(\"labels.closeMenu\"));\n html = html.replace(/{close}/g, window.easySafeEditor.options.getValue(\"labels.close\"));\n \n let nodePanel = createElement(html);\n body.insertBefore(nodePanel, body.firstChild);\n\n this.panelTool = document.getElementById(\"easySafeTools\");\n this.pageTitle = document.getElementById(\"easySafeTools_PageTitle\");\n this.editableContainers = document.getElementById(\"easySafeTools_EditableContainers\");\n this.collapseButton = document.getElementById(\"easySafeTools_collapsePanel\");\n this.uncollapseButton = document.getElementById(\"easySafeTools_uncollapsePanel\");\n this.closeButton = document.getElementById(\"easySafeTools_closePanel\");\n this.buttonsContainer = document.getElementById(\"easySafeTools_sideButtons\");\n\n\n this.collapseButton.addEventListener(\"click\", (event) => this.onCollapseButtonClick(event), true);\n this.uncollapseButton.addEventListener(\"click\", (event) => this.onCollapseButtonClick(event), true);\n this.closeButton.addEventListener(\"click\", (event) => this.onCloseButtonClick(event), true);\n\n this.pageTitle.value = window.easySafeEditor.post.getTitle();\n this.pageTitle.addEventListener(\"input\", (event) => this.onChangeTitle(event), true);\n\n let buttons = window.easySafeEditor.options.getValue(\"sideBar.buttons\");\n buttons.forEach(button => {\n let element = null;\n \n if ((typeof button) == \"string\")\n element = createElement(button);\n else if ((typeof button) == \"HTMLElement\")\n element = button;\n\n if (element != null)\n this.buttonsContainer.append(element);\n });\n }", "function _init() {\n 'use strict';\n /* Layout\n * ======\n * Fixes the layout height in case min-height fails.\n *\n * @type Object\n * @usage $.PaperPanel.layout.activate()\n * $.PaperPanel.layout.fix()\n * $.PaperPanel.layout.fixSidebar()\n */\n\n\n var slimScroll = $(\".slimScroll\");\n\n //if page has header minus it from page height\n var headerDiv = 0;\n // if($('header')){\n // headerDiv = $('header').height();\n // }\n // if($('.navbar')){\n // headerDiv = $('.navbar').height();\n // }\n if (slimScroll.length) {\n slimScroll.each(function () {\n var $this = $(this);\n var attrData = $this.data();\n $this.slimscroll({\n height: attrData.height ? attrData.height + 'px' : ($(window).height() - headerDiv) + \"px\",\n color: attrData.color ? attrData.color : \"rgba(0,0,0,0.95)\",\n size: attrData.size ? attrData.size + 'px' : \"5px\"\n });\n });\n }\n\n\n $.PaperPanel.layout = {\n activate: function () {\n var _this = this;\n _this.fix();\n _this.fixSidebar();\n $(window, \".wrapper\").on('resize', function () {\n _this.fix();\n _this.fixSidebar();\n });\n },\n fix: function () {\n //Get window height and the wrapper height\n var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();\n var window_height = $(window).height();\n var sidebar_height = $(\".sidebar\").height();\n //Set the min-height of the content and sidebar based on the\n //the height of the document.\n if ($(\"body\").hasClass(\"fixed\")) {\n $(\".content-wrapper, .right-side\").css('min-height', window_height - $('.main-footer').outerHeight());\n } else {\n var postSetWidth;\n if (window_height >= sidebar_height) {\n $(\".content-wrapper, .right-side\").css('min-height', window_height - neg);\n postSetWidth = window_height - neg;\n } else {\n $(\".content-wrapper, .right-side\").css('min-height', sidebar_height);\n postSetWidth = sidebar_height;\n }\n\n //Fix for the control sidebar height\n var controlSidebar = $($.PaperPanel.options.controlSidebarOptions.selector);\n if (typeof controlSidebar !== \"undefined\") {\n if (controlSidebar.height() > postSetWidth)\n $(\".content-wrapper, .right-side\").css('min-height', controlSidebar.height());\n }\n\n }\n },\n fixSidebar: function () {\n //Make sure the body tag has the .fixed class\n if (!$(\".main-sidebar\").hasClass(\"fixed\")) {\n if (typeof $.fn.slimScroll != 'undefined') {\n $(\".sidebar\").slimScroll({destroy: true}).height(\"auto\");\n\n }\n return;\n } else if (typeof $.fn.slimScroll == 'undefined' && window.console) {\n window.console.error(\"Error: the fixed layout requires the slimscroll plugin!\");\n }\n //Enable slimscroll for fixed layout\n if ($.PaperPanel.options.sidebarSlimScroll) {\n if (typeof $.fn.slimScroll != 'undefined') {\n //Destroy if it exists\n $(\".sidebar\").slimScroll({destroy: true}).height(\"auto\");\n //Add slimscroll\n\n $(\".sidebar\").slimscroll({\n height: ($(window).height()) + \"px\",\n color: \"rgba(0,0,0,0.3)\",\n size: \"5px\"\n });\n }\n }\n }\n };\n\n\n /* PushMenu()\n * ==========\n * Adds the push menu functionality to the sidebar.\n *\n * @type Function\n * @usage: $.PaperPanel.pushMenu(\"[data-toggle='offcanvas']\")\n */\n $.PaperPanel.pushMenu = {\n activate: function (toggleBtn) {\n //Get the screen sizes\n var screenSizes = $.PaperPanel.options.screenSizes;\n\n\n //Enable sidebar toggle\n $(document).on('click', toggleBtn, function (e) {\n e.preventDefault();\n e.stopPropagation();\n //Enable sidebar push menu\n if ($(window).width() > (screenSizes.md - 1)) {\n if ($(\"body\").hasClass('sidebar-collapse')) {\n $(\".offcanvas\").parent().removeClass('sidebar-collapse');\n $(\"body\").removeClass('sidebar-collapse').trigger('expanded.pushMenu');\n // if ($('.sidebar-offcanvas-desktop').length) {\n // $(\"body\").addClass('sidebar-open').trigger('expanded.pushMenu');\n // }\n } else {\n $(\"body\").addClass('sidebar-collapse').trigger('collapsed.pushMenu');\n }\n }\n //Handle sidebar push menu for small screens\n else {\n if ($(\"body\").hasClass('sidebar-open')) {\n $(\"body\").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');\n } else {\n $(\"body\").addClass('sidebar-open').trigger('expanded.pushMenu');\n }\n }\n });\n\n $(\".page\").on('click', function () {\n\n //Enable hide menu when clicking on the content-wrapper on small screens\n if ($(window).width() <= (screenSizes.md - 1) && $(\"body\").hasClass(\"sidebar-open\")) {\n $(\"body\").removeClass('sidebar-open');\n }\n\n });\n //close sidebar when clicked outside\n $('#app').on('click', function (e) {\n if ($(e.target).closest('.control-sidebar').length) {\n // The click was somewhere inside .prevent, so do nothing\n } else {\n if ($(\".control-sidebar\").hasClass(\"control-sidebar-open\")) {\n $(\".control-sidebar\").removeClass('control-sidebar-open');\n }\n }\n if ($(e.target).closest('.main-sidebar').length) {\n // The click was somewhere inside .prevent, so do nothing\n } else {\n if ($('.sidebar-offCanvas-lg').length) {\n $(\"body\").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');\n $(\"body\").addClass('sidebar-collapse').trigger('collapsed.pushMenu');\n }\n }\n });\n //Enable expand on hover for sidebar mini\n\n if ($.PaperPanel.options.sidebarExpandOnHover || ($('body').hasClass('sidebar-expanded-on-hover') && $('body').hasClass('sidebar-mini'))) {\n this.expandOnHover();\n }\n\n },\n expandOnHover: function () {\n var _this = this;\n var screenWidth = $.PaperPanel.options.screenSizes.sm - 1;\n //Expand sidebar on hover\n $('.main-sidebar').on('mouseenter',function () {\n if ($('body').hasClass('sidebar-mini')\n && $(\"body\").hasClass('sidebar-collapse')\n && $(window).width() > screenWidth) {\n _this.expand();\n }\n }, function () {\n if ($('body').hasClass('sidebar-mini')\n && $('body').hasClass('sidebar-expanded-on-hover')\n && $(window).width() > screenWidth) {\n _this.collapse();\n }\n });\n },\n expand: function () {\n $(\"body\").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');\n },\n collapse: function () {\n if ($('body').hasClass('sidebar-expanded-on-hover')) {\n $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');\n }\n }\n };\n\n\n\n /* Tree()\n * ======\n * Converts the sidebar into a multilevel\n * tree view menu.\n *\n * @type Function\n * @Usage: $.PaperPanel.tree('.sidebar')\n */\n $.PaperPanel.tree = function (menu) {\n var _this = this;\n var animationSpeed = $.PaperPanel.options.animationSpeed;\n $(document).on('click', menu + ' li a', function (e) {\n //Get the clicked link and the next element\n var $this = $(this);\n var checkElement = $this.next();\n\n //Check if the next element is a menu and is visible\n if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {\n //Close the menu\n checkElement.slideUp(animationSpeed, function () {\n checkElement.removeClass('menu-open');\n //Fix the layout in case the sidebar stretches over the height of the window\n //_this.layout.fix();\n });\n checkElement.parent(\"li\").removeClass(\"active\");\n }\n //If the menu is not visible\n else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {\n //Get the parent menu\n var parent = $this.parents('ul').first();\n //Close all open menus within the parent\n var ul = parent.find('ul:visible').slideUp(animationSpeed);\n //Remove the menu-open class from the parent\n ul.removeClass('menu-open');\n //Get the parent li\n var parent_li = $this.parent(\"li\");\n\n //Open the target menu and add the menu-open class\n checkElement.slideDown(animationSpeed, function () {\n //Add the class active to the parent li\n checkElement.addClass('menu-open');\n parent.find('li.active').removeClass('active');\n parent_li.addClass('active');\n //Fix the layout in case the sidebar stretches over the height of the window\n _this.layout.fix();\n });\n }\n //if this isn't a link, prevent the page from being redirected\n if (checkElement.is('.treeview-menu')) {\n e.preventDefault();\n }\n });\n };\n}", "function main(){ \n\tinitDisplaySettings() \n\taddAllPageEvents()\n \n\t// initialize DataManager instance\n\tdataManager = new DataManager(null, null, null, null); \n\t//dataManager.init(); \n\n\t// stores reference to the budget slider and adds a change listener\n\tslider = document.getElementById(\"budgetSlider\");\n\tslider.onchange = updateBudget; \n\n\t// stores references to the information output areas \n\tinformation = document.getElementById(\"information\");\n\tsummary = document.getElementById(\"summary\");\n\n\t// initializes budget value. \n\tslider.value = 0;\n\tslider.max = 10000;\n\tdataManager.budget = slider.value;\n\n\tif (typeof localData !== 'undefined') {\n\t\t// Working locally: localData is a global variable loaded from localData.js\n\t\tdataManager.init(localData);\n\t\tdataManager.addEventsToAllBranches(dataManager.networkSource);\n\t}\n\telse {\n\t\t// Normal case: make async call for the data\n\t\tvar barrierFile = \"BarrierAndStreamInfoOpt.json\"; // change this to use different data\n\t\t//var barrierFile = \"BarrierAndStreamInfoOptReduced1.json\"; // smaller test network one (westfield) \n\t\t//var barrierFile = \"BarrierAndStreamInfoOptReduced2.json\"; // smallest test network two (in middle left area of the main one)\n\t\t//var barrierFile = \"BarrierAndStreamInfoOptReduced3.json\"; // largest test network three (top third of main watershed)\n\n\t\t$.get(barrierFile, function(data){ \n\t\t\tdataManager.init(data);\n\t\t\tdataManager.addEventsToAllBranches(dataManager.networkSource);\n\t\t});\n\t}\n}", "function loadContent() {\n// accessing the DOM by means of id-myApp (shell HTML page)\n var contentDiv = document.getElementById(\"myApp\"),\n //remove the # symbol from location hash and store the value in fragmentId\n fragmentId = location.hash.substr(1);\n // function call to getcontent\n getContent(fragmentId, function (content) {\n // call back \n // replace the content into Shell HTML\n contentDiv.innerHTML = content;\n });\n // On Load of shopping module \n if (fragmentId === \"shop\") {\n // function call to getFurnitureData - For function body, refer to shoppingList.js\n getFurnitureData();\n }\n}", "function main() {\n if (debug) console.log(`Main ran in ${window.name}`)\n // Whenever this is ran, an unload event (i.e. when the user loads a whatIf report)\n // triggers the collection of data needed to do a query for course information.\n // This isn't a listener because getting listeners to work inside iframes is hard.\n function setupWhatIfDataListener() {\n $(getWindow('frSelection')).on(\"unload\", fetchWhatIfData)\n }\n\n // It's ran 10 times per second because again, listeners on iframes are hard.\n // This means the app would break if the user managed to get through the\n // DegreeWorks WhatIf form in a 10th of a second.\n setInterval(setupWhatIfDataListener, 100);\n console.log(window.name)\n if (window.name === \"frBody\") {\n addModal();\n }\n if (window.name === \"frLeft\") {\n let button = addButton(`DegweeWorks Planner`, getDegreeInfo, null, \"genPossible\")\n // addNumberField('Min courses/semester', 'minCourses', 4)\n // addNumberField('Max courses/semester', 'maxCourses', 4);\n }\n }", "function updateSidebarLayout() {\n\tvar sidebar = $(\"#dataSelectUIContainer\");\n\t\n\t// The sidebar should never be taller than the window - 20px.\n\tsidebar.css(\"max-height\", function() {\n\t\treturn $(window).height() - 20;\n\t});\n\t\n // If the sidebar is overflown, make it wider to make room for the scrollbar.\n if(sidebar.overflown()) {\n\t\tsidebar.width(208);\n\t\t$(\"#showChartButton\").css(\"right\", 250);\n } else {\n\t\tsidebar.width(188);\n\t\t$(\"#showChartButton\").css(\"right\", 230);\n }\n}", "function loadSidebar() {\n $.ajax({\n type: \"GET\",\n url: \"loadvideos.php\",\n dataType: \"html\",\n success: function(response){\n sidebarContent(response);\n }\n });\n}", "function getSidebarContent(callback) {\n try {\n $.ajax({\n type: 'GET',\n url: location.protocol + '//' + location.host + getWorkSpace(location.pathname) + '?responder=tableOfContents',\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n success: contentArray => callback(contentArray),\n error: function (xhr) {\n console.log('Error code: ' + xhr.status, xhr);\n }\n });\n } catch(e) { }\n}", "function updatePage(data) {\n var existing, newStuff, i;\n var replacements = '.cwbdv, .bte, #ckey_spirit, #ckey_defend, #togpane_magico, #togpane_magict, #togpane_item, #quickbar, #togpane_log';\n var monsterReplacements = '#mkey_0, #mkey_1, #mkey_2, #mkey_3, #mkey_4, #mkey_5, #mkey_6, #mkey_7, #mkey_8, #mkey_9';\n\n // Replace `replacements` elements on live document with the newly obtained data\n existing = document.querySelectorAll(replacements);\n newStuff = data.querySelectorAll(replacements);\n i = existing.length;\n while (i--) {\n existing[i].parentNode.replaceChild(newStuff[i], existing[i]);\n }\n\n // Replace `monsterReplacements` elements on live document with the newly obtained data\n // Don't update dead monsters\n existing = document.querySelectorAll(monsterReplacements);\n newStuff = data.querySelectorAll(monsterReplacements);\n i = existing.length;\n while (i--) {\n if (existing[i].hasAttribute(\"onclick\") || newStuff[i].hasAttribute(\"onclick\")) {\n existing[i].parentNode.replaceChild(newStuff[i], existing[i]);\n }\n }\n\n var popup = data.getElementsByClassName('btcp');\n var navbar = data.getElementById('navbar');\n\n var popupLength = popup.length; // this is because popup.length is changed after insertBefore() is called for some reason.\n var navbarExists = !!navbar;\n\n // If there's navbar/popup in new content, show it\n if (navbarExists) {\n var mainpane = document.getElementById('mainpane');\n mainpane.parentNode.insertBefore(navbar, mainpane);\n window.at_attach(\"parent_Character\", \"child_Character\", \"hover\", \"y\", \"pointer\");\n window.at_attach(\"parent_Bazaar\", \"child_Bazaar\", \"hover\", \"y\", \"pointer\");\n window.at_attach(\"parent_Battle\", \"child_Battle\", \"hover\", \"y\", \"pointer\");\n window.at_attach(\"parent_Forge\", \"child_Forge\", \"hover\", \"y\", \"pointer\");\n }\n if (popupLength !== 0) {\n // Here we're loading popup to the page regardless of the skipNextRound / popupTime settings\n // even though it is \"skipped\" and not even visible; slightly increasing load time.\n // This is because OnPageReload() will later call scripts,\n // some of which will require popup in the document ( Counter Plus )\n var parent = document.getElementsByClassName('btt')[0];\n parent.insertBefore(popup[0], parent.firstChild);\n }\n\n // Run all script modules again\n OnPageReload();\n\n // Reload page if `skipToNextRound` and it is Round End\n // Round End detection: popup exists and navbar does not\n if ( popupLength !== 0 && !navbarExists ) {\n /*\n if ( settings.mouseMelee ) {\n localStorage.setItem('curX', curX);\n localStorage.setItem('curY', curY);\n }\n */\n // Skip to next round\n if ( settings.skipToNextRound ) {\n if (settings.popupTime === 0) {\n window.location.href = window.location.href;\n } else {\n setTimeout(function() {\n window.location.href = window.location.href;\n }, settings.popupTime);\n }\n }\n }\n\n // Remove counter datas on Game End\n // Game End detection: popup and navbar exists\n if ( popupLength !== 0 && navbarExists ) {\n localStorage.removeItem('record');\n localStorage.removeItem('rounds');\n }\n\n }", "function parse_sidebar_info(msg){\n\t///////////////////////////////// Parse individual info and go one if all entries are set /////////////\n\tif(msg[\"cmd\"]==\"get_areas\"){\n\t\t// save all areas as array in the global g_areas\n\t\tg_areas=[];\n\t\tfor(var i=0;i<msg[\"areas\"].length;i++){\n\t\t\tg_areas[i]=msg[\"areas\"][i];\n\t\t};\n\t} else if(msg[\"cmd\"]==\"get_cams\"){\n\t\t// save all cams as array \n\t\tfor(var i=0;i<msg[\"m2m\"].length;i++){\n\t\t\tg_m2m[i]=msg[\"m2m\"][i];\n\t\t};\n\t} else if(msg[\"cmd\"]==\"get_logins\"){\n\t\t// save all logins as array \n\t\tg_logins=[];\n\t\tfor(var i=0;i<msg[\"m2m\"].length;i++){\n\t\t\tg_logins[i]=msg[\"m2m\"][i];\n\t\t};\n\t} else if(msg[\"cmd\"]==\"get_rules\"){\n\t\tvar i=0;\n\t\tg_rules=[];\n\t\tfor(var a in msg[\"rules\"]){\n\t\t\tg_rules[i]=msg[\"rules\"][i+1];\n\t\t\ti++;\n\t\t};\n\t};\n\t///////////////////////////////// Parse individual info and go one if all entries are set /////////////\n\n\tif(g_areas.length && g_m2m.length && g_logins.length){\n\t\t/////////////////////// RM BOX ////////////////////\n\t\tvar field=$(\"#rm_box\");\n\t\tif(field.length){\n\t\t\tfield.text(\"\");\n\t\t\t// go through all areas\n\t\t\tfor(var a=0;a<g_areas.length;a++){\n\t\t\t\tg_areas[a][\"rules\"]=[];\n\t\t\t\tg_areas[a][\"subrules\"]=[];\n\t\t\t\t// join rules and adreas\n\t\t\t\tfor(var b=0;b<g_rules.length;b++){\n\t\t\t\t\tif(g_rules[b][\"name\"]==g_areas[a][\"area\"]){\n\t\t\t\t\t\tg_areas[a][\"rules\"]=g_rules[b][\"rules\"];\n\t\t\t\t\t\tg_areas[a][\"subrules\"]=g_rules[b][\"subrules\"];\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\tadd_rm_entry(field,g_areas[a]);\n\t\t\t};\n\t\t};\n\t\t/////////////////////// RM BOX ////////////////////\n\n\t\t/////////////////////// AREAS BOX ////////////////////\n\t\t// add m2m count to each area\n\t\tfor(var a=0;a<g_areas.length;a++){\n\t\t\tvar c=0;\n\t\t\tfor(var i=0; i<g_m2m.length; i++){\n\t\t\t\tif(g_m2m[i][\"area\"]==g_areas[a][\"area\"]){\n\t\t\t\t\tc++;\n\t\t\t\t}\n\t\t\t};\n\t\t\tg_areas[a][\"m2m_count\"]=c;\n\t\t};\n\t\t\t\n\t\t// start showing the areas\n\t\tvar field=$(\"#areas_box\");\n\t\tif(field.length){\n\t\t\tfield.text(\"\");\n\t\t\tfor(var a=0;a<g_areas.length;a++){\n\t\t\t\t//onsole.log(g_areas[a]);\n\t\t\t\tadd_area_entry(field,g_areas[a]);\n\t\t\t}\n\t\t\t// prepare vars for one empty new box\n\t\t\tm_area={};\n\t\t\tm_area[\"area\"]=\"\";\t\t\t\t\n\t\t\tm_area[\"id\"]=\"-1\";\n\t\t\tm_area[\"latitude\"]=\"52.479761\";\t\t\t\t\n\t\t\tm_area[\"longitude\"]=\"62.185661\";\t\t\t\t\n\t\t\tm_area[\"m2m_count\"]=0;\t\t\t\t\n\t\t\t// run it one more time\n\t\t\tadd_area_entry(field,m_area);\n\t\t}; // area box\n\t\t/////////////////////// AREAS BOX ////////////////////\n\n\t\t/////////////////////// CAMERA BOX ////////////////////\n\t\t// populate the camera box\n\t\tvar field=$(\"#cameras_box\");\n\t\tif(field.length){\n\t\t\tfield.text(\"\");\n\t\t\tfor(var a=0;a<g_m2m.length;a++){\n\t\t\t\tadd_camera_entry(g_m2m[a],field);\n\t\t\t\tcam_entry_button_state(g_m2m[a][\"mid\"],\"show\");\n\t\t\t}; // for each camera\n\t\t}; // camera box\n\t\t/////////////////////// CAMERA BOX ////////////////////\n\n\t\t/////////////////////// USER /////////////////////\n\t\tvar field=$(\"#users_box\");\n\t\tif(field.length){\n\t\t\tfield.text(\"\");\n\t\t\tfor(var a=0; a<g_logins.length; a++){\n\t\t\t\tadd_login_entry(field,g_logins[a]);\n\t\t\t}\n\t\t\t// add new entry to insert new entry\n\t\t\tvar last=[];\n\t\t\tlast[\"id\"]=-1;\n\t\t\tadd_login_entry(field,last);\n\t\t\t\n\n\t\t};\n\t\t/////////////////////// USER /////////////////////\n\n\t};\n}", "function render(evt) {\n var currentPage = typeof evt !== 'undefined' ? evt.detail.page : phonon.navigator().currentPage;\n var pageEl = document.querySelector(currentPage);\n var tabs = pageEl.querySelector('[data-tab-contents=\"true\"]');\n var i = sidePanels.length - 1;\n\n for (; i >= 0; i--) {\n var sb = sidePanels[i];\n var exposeAside = sb.el.getAttribute('data-expose-aside');\n\n if (sb.pages.indexOf(currentPage) === -1) {\n sb.el.style.display = 'none';\n sb.el.style.visibility = 'hidden';\n } else {\n // Is this page drag disabled\n var dragDisabled = sb.nodrag.indexOf(currentPage) >= 0; // #90: update the snapper according to the page\n\n sb.snapper.settings({\n element: pageEl\n });\n sb.el.style.display = 'block';\n sb.el.style.visibility = 'visible'; // If tabs are present, disable drag, then setup\n\n if (tabs) {\n sidePanels[i].snapper.disable();\n } // Expose side bar\n\n\n if (exposeAside === 'left' || exposeAside === 'right') {\n if (!pageEl.classList.contains(\"expose-aside-\".concat(exposeAside))) {\n pageEl.classList.add(\"expose-aside-\".concat(exposeAside));\n }\n } // On tablet, the sidebar is draggable only if it is not exposed on a side\n\n\n if (!isPhone) {\n if (!tabs && exposeAside !== 'left' && exposeAside !== 'right') {\n sb.snapper.settings({\n touchToDrag: !dragDisabled\n });\n sb.snapper.enable();\n } else {\n sb.snapper.settings({\n touchToDrag: false\n });\n sb.snapper.disable();\n }\n } // On phone, the sidebar is draggable only if tabs are not present\n\n\n if (!tabs && isPhone) {\n sb.snapper.settings({\n touchToDrag: !dragDisabled\n });\n sb.snapper.enable();\n }\n }\n }\n }", "function process_page() {\r\n\tconst loadPage = function(page) {\r\n\t\tconst main = $('#mdl-layout__content');\r\n\t\tmain.html(page);\r\n\t\tprocess_accordions(main);\r\n\t\tprocess_links(main);\r\n\t\tprocess_code_lines();\r\n\t\tcomponentHandler.upgradeDom();\r\n\t\t$(\".app-loading\").fadeOut();\r\n\t}\r\n\t\r\n\tswitch (window.location.hash) {\r\n\t\tcase '':\r\n\t\tcase '#apis':\r\n\t\t\t$(\"#apis\").addClass(\"is-active\");\r\n\t\t\t$(\"#guides\").removeClass(\"is-active\");\r\n\t\t\tloadPage(compileTemplate('apis'));\r\n\t\t\tbreak;\r\n\t\tcase '#guides':\r\n\t\t\t$(\"#apis\").removeClass(\"is-active\");\r\n\t\t\t$(\"#guides\").addClass(\"is-active\");\r\n\t\t\tloadPage(compileTemplate('guides'));\r\n\t\t\tbreak;\r\n\t\tdefault:\t\r\n\t\t\tconst hash = unescape(window.location.hash.substring(1));\r\n\t\t\tconst item = MEMBERS.find(it => it.signature == hash);\r\n\t\t\tif (item) {\r\n\t\t\t\tloadPage(compileTemplate('default', item));\r\n\t\t\t} else {\r\n\t\t\t\tconst guide = GUIDES[hash];\r\n\t\t\t\tif (guide) {\r\n\t\t\t\t\tif (!guide.processed) {\r\n\t\t\t\t\t\tguide.content = process_comment(undefined, guide.content);\r\n\t\t\t\t\t\tguide.processed = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tloadPage(Handlebars.compile(guide.content)());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tloadPage(compileTemplate('error'));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "function dataFrame(options) {\n\t\tvar o = $.extend({\n\t\t\t\t\"parent\" : 'body',\n\t\t\t}, options),\n\t\t\tkey = makeKey();\n\t\t\t\n\t\t$(\"body\").append('<div id=\"'+dataDivId||'dataDiv'+'\"></div>');\n\t\t\n\t\t// Fix! We'll want to instantiate a secondary frame for secure processing and communications.\n\t\t// v.dataFrame = new OmniCommFrame({\n\t\t\t// \"url\" : 'https://codapt.com/o/',\n\t\t\t// \"parent\" : o.parent,\n\t\t\t// \"visible\" : false,\n\t\t\t// \"query\" : { \n\t\t\t\t// \"a\" : Date.now(),\n\t\t\t\t// \"cmd\" : 'load',\n\t\t\t\t// \"Url\" : window.location.href,\n\t\t\t\t// \"Origin\" : window.location.origin,\n\t\t\t\t// \"Pub\" : key,\n\t\t\t\t// \"Old\" : localStore({\"cmd\":'get',\"key\":'Old'})\n\t\t\t// },\n\t\t\t// \"callback\" : function(data) {\n\t\t\t\t// var cmd = data.cmd;\n\t\t\t\t// if (cmd == \"ping\") {\n\t\t\t\t\t// adminUpdate(data);\n\t\t\t\t// } else if (cmd == \"msg\") {\n\t\t\t\t\t// adminMsg(data);\n\t\t\t\t// } else if (cmd == \"load\") {\n\t\t\t\t\t// adminLoad(data);\n\t\t\t\t// }\n\t\t\t// }\n\t\t// });\n\t\t\n\t\t\n\t\t\t\n\t\to.comm = new CommObj(); // Fix! Transition this into iframe.\n\t\t\n\t\t\n\t\t\n\t\tfunction adminUpdate(data) {\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfunction adminMsg(data) {\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfunction adminLoad(data) {\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\n\t\t// Used for all communications with central server, ACE, client server, etc. Abstracts mechanisms behind these transmissions to simplify use.\n\t\tfunction CommObj() { // Fix. We'll want to relay this through ACE in a secondary frame.\n\t\t\tvar _this = this,\n\t\t\t\tlog = [],\n\t\t\t\tque = { // Stores requests to be made to server and items returned but not loaded yet.\n\t\t\t\t\t\"wait\" : [], // a JSON containing callObjs that are to be sent to the server but in wait due to lack of connectivity or other cases. Ordered by time placed.\n\t\t\t\t\t\"out\" : [], // a JSON containing callObjs that have been sent to the server, ordered by time placed.\n\t\t\t\t\t\"back\" : [] // Array of sequentially returned aceObjs, to be processed locally and returned.\n\t\t\t\t};\n\t\t\t\n\t\t\tajaxInit();\n\t\t\n\t\t\n\t\t\t/////// CommObj Exposed Methods /////////////////////\n\t\t\n\t\t\n\t\t\t// Packages and initiates the actual call to the server.\n\t\t\tthis.send = function makeCall(dat, cmd) {\n\t\t\t\tvar timeNow = Date.now();\n\t\t\t\tlocalStore({\"cmd\":'set',\"key\":'Pub',\"val\":(key=makeKey())});\n\t\t\t\tvar callObj = {\n\t\t\t\t\t\"a\" : timeNow,\n\t\t\t\t\t\"cmd\" : cmd || 0,\n\t\t\t\t\t\"dat\" : dat,\n\t\t\t\t\t\"Pub\" : key,\n\t\t\t\t\t\"Old\" : localStore({\"cmd\":'get',\"key\":'Old'})\n\t\t\t\t};\n\t\t\t\tque.out[timeNow] = callObj;\n\t\t\t\t$.ajax({\"data\":callObj});\n\t\t\t\t// logMsg('makeCall() data sent.', callObj);\n\t\t\t};\n\t\t\t\n\t\t\t\n\t\t\t/////// CommObj Private Functions /////////////////////\n\t\t\n\t\t\t\n\t\t\t// Sets ajax defaults and establishes generic connection with an appropriate ACE server.\n\t\t\tfunction ajaxInit() {\n\t\t\t\t$.ajaxSetup({\n\t\t\t\t\turl : 'https://codapt.com/o/',\n\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\t// crossDomain: false,\n\t\t\t\t\tbeforeSend: ajaxPreCall,\n\t\t\t\t\tsuccess: ajaxSuccess,\n\t\t\t\t\terror: ajaxError,\n\t\t\t\t\tcomplete: ajaxComplete\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$.ajax({\"data\":{\n\t\t\t\t\t\"a\" : Date.now(),\n\t\t\t\t\t\"cmd\" : 'load',\n\t\t\t\t\t\"Url\" : window.location.href,\n\t\t\t\t\t\"Origin\" : window.location.origin,\n\t\t\t\t\t\"Pub\" : key,\n\t\t\t\t\t\"Old\" : localStore({\"cmd\":'get',\"key\":'Old'})\n\t\t\t\t}});\n\t\t\t}\n\t\n\t\n\t\t\t// Used for low level ajax call tracking and error handling.\n\t\t\tfunction ajaxPreCall(xhrObj, ajaxObj) {\n\t\t\t\t// var callObj = {\n\t\t\t\t\t// \"url\" : ajaxObj.url,\n\t\t\t\t\t// \"type\" : ajaxObj.type,\n\t\t\t\t\t// \"data\" : ajaxObj.data\n\t\t\t\t// };\n\t\t\t\t// logMsg('ajax pre-call...', callObj); // Fix?\n\t\t\t\t// if (!ajaxObj.data || !ajaxObj.data.a) {\n\t\t\t\t\t// var errorObj = {\n\t\t\t\t\t\t// \"error\" : \"ajaxObj.data.a is not set!\",\n\t\t\t\t\t\t// \"data\" : ajaxObj.data,\n\t\t\t\t\t\t// \"ajaxObj\" : ajaxObj\n\t\t\t\t\t// }\n\t\t\t\t\t// flagError(\"iframe ajaxPreCall error\", errorObj);\n\t\t\t\t// }\n\t\t\t}\n\t\n\t\n\t\t\t// Called on completion of each ajax request to handle returned data.\n\t\t\tfunction ajaxSuccess(data, status, xhrObj) {\n\t\t\t\tif (!data || !_.isObject(data)) {\n\t\t\t\t\tvar errorObj = {\n\t\t\t\t\t\t\"data\" : data,\n\t\t\t\t\t\t\"xhrObj\" : xhrObj,\n\t\t\t\t\t\t\"status\" : status\n\t\t\t\t\t};\n\t\t\t\t\t// flagError(\"iframe ajaxSuccess returned bad data.\", errorObj);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar backTime = Date.now(),\n\t\t\t\t\tdataObj = jsonToObj(data),\n\t\t\t\t\tcallTime = dataObj.a || 0,\n\t\t\t\t\tlag = backTime-callTime,\n\t\t\t\t\tcmd = dataObj.cmd;\n\t\t\t\t\n\t\t\t\tlocalStore({\"cmd\":'set',\"key\":'Old'});\n\t\t\t\t// if (!callTime) { flagError('No returned callTime for this ajax data.') }\n\t\t\t\tif (cmd == \"ping\") {\n\t\t\t\t\tadminUpdate(data);\n\t\t\t\t} else if (cmd == \"msg\") {\n\t\t\t\t\tadminMsg(data);\n\t\t\t\t} else if (cmd == \"load\") {\n\t\t\t\t\tadminLoad(data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Handles errors for iframe AJAX requests.\n\t\t\tfunction ajaxError(xhrObj, status, error) {\n\t\t\t\t// flagError(\"iframe AJAX eror\", {\n\t\t\t\t\t// \"error\" : error,\n\t\t\t\t\t// \"status\" : status,\n\t\t\t\t\t// \"xhrObj\" : xhrObj\n\t\t\t\t// });\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Called after all other handlers have been called for request.\n\t\t\tfunction ajaxComplete(jqXHR, status) {\n\t\t\t\t//logMsg('ajax completed. Status: ', status);\n\t\t\t\t// if (status != \"success\") {\n\t\t\t\t\t// logMsg(\"Problem with ajax call\", status);\n\t\t\t\t\t// // flagError(\"Problem initiating connection. Status: \"+status, jqXHR);\n\t\t\t\t// }\n\t\t\t}\n\t\t\t\n\t\n\t\t};//CommObj();\n\t\t\n\t\t\n\t}//dataFrame()", "function initDashboard() {\n\n // the 'layout' JSON array defines the internal structure of the layout\n // The sequence is always layoutGroup --> tabbedGroup --> layoutPanel\n // The layoutGroup has the orientation which tells whether to add child tabs (panels) in\n // verticle fashion or hoizontal fashion.\n var layout = [\n {\n // Main panel\n type: \"layoutGroup\",\n // Horrizontal orientation determines the layout of city search panel groups and the weather data panel groups\n orientation: \"horizontal\",\n width: \"100%\",\n height: \"100%\",\n items: [\n {\n // Search city panel group: Left parent panel (layout-group) that holds all tabs in left side of the splitter\n type: \"layoutGroup\",\n // Actually the orientation=verticle is not required as there is only one panel in this.items[]\n orientation: \"vertical\",\n allowPin: false,\n width: \"30%\",\n items: [\n {\n // 1st and the only Tab panel for 'Search City'\n type: \"tabbedGroup\",\n height: \"100%\",\n pinnedHeight: 30,\n items: [\n {\n // Layout pannel for the 'Search City' tab\n type: \"layoutPanel\",\n title: \"Search for a City\",\n contentContainer: \"SearchCityPanel\",\n initContent: function () {\n initCitiesTable();\n },\n },\n ],\n },\n ],\n },\n {\n // Weather data panel group: Right parent panel (layout-group) for displaying weather details\n type: \"layoutGroup\",\n // The orientation: \"vertical\" here ensures the Today's weather panel and the forecast panel are \n // laid out vertically - one above and one below \n orientation: \"vertical\",\n allowPin: false,\n width: \"70%\",\n items: [\n {\n // Tab group for today's weather panel\n type: \"tabbedGroup\",\n height: \"52%\",\n pinnedHeight: 30,\n items: [\n {\n type: \"layoutPanel\",\n title: \"Today's Weather\",\n contentContainer: \"TodaysWeatherPanel\",\n\n },\n ],\n },\n {\n // Tab group for forecast panel\n type: \"tabbedGroup\",\n height: \"48%\",\n pinnedHeight: 30,\n items: [\n {\n type: \"layoutPanel\",\n title: \"5 Day Forecast\",\n contentContainer: \"ForecastPanel\",\n\n },\n ],\n }\n ],\n }\n ],\n },\n ];\n $(\"#jqxLayout\").jqxLayout({\n width: 1250,\n //width: '100%',\n //width: getWidth(\"layout\"),\n height: 650,\n layout: layout,\n contextMenu: true,\n });\n //alert(\"initDashboardComp\");\n loadWeatherData(0);\n}", "function getDataUpdateSidebar() {\n var paragraphs = body.getParagraphs();\n var e2 = paragraphs[2];\n var e3 = paragraphs[3];\n var e4 = paragraphs[4];\n \n var e2Text = e2.getText();\n var e2TextSplit = e2Text.match(/^(.*)\\sVersion\\s(\\d\\.\\d+)$/);\n var initialdocname = e2TextSplit[1];\n var initialdocver = e2TextSplit[2]; \n \n var e3Text = e3.getText();\n var e3TextSplit = e3Text.match(/^(.*)\\s(\\d+)$/);\n var docstagelong = e3TextSplit[1];\n var initialdocstage = convertStageToShort(docstagelong);\n var initialdocrev = e3TextSplit[2];\n \n var docdate = e4.getText();\n var docparts = docdate.split(' ');\n // We have a spelled out monht like April, we need the month number like 04\n var month = convertMonthToNumber(docparts[1]);\n \n var initialdocdate = docparts[2] + \"-\" + month + \"-\" + docparts[0];\n return [initialdocname, initialdocver, initialdocstage, initialdocrev, initialdocdate];\n}", "function renderContent() {\n var content = document.getElementById('content_' + selected);\n // Initialize the pane.\n if (content.id == 'content_blocks') {\n // If the workspace was changed by the XML tab, Firefox will have performed\n // an incomplete rendering due to Blockly being invisible. Rerender.\n Blockly.mainWorkspace.render();\n } else if (content.id == 'content_xml') {\n var xmlTextarea = document.getElementById('textarea_xml');\n var xmlDom = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace);\n var xmlText = Blockly.Xml.domToPrettyText(xmlDom);\n xmlTextarea.value = xmlText;\n xmlTextarea.focus();\n } else if (content.id == 'content_javascript') {\n content.innerHTML = Blockly.Generator.workspaceToCode('JavaScript');\n } else if (content.id == 'content_python') {\n content.innerHTML = Blockly.Generator.workspaceToCode('Python');\n } else if (content.id == 'content_whalesong') {\n content.innerHTML = Blockly.Generator.workspaceToCode('Whalesong');\n } else if (content.id == 'content_ray') {\n content.innerHTML = Blockly.Generator.workspaceToCode('Ray');\n }\n}", "function createSidebar(thenCreateSidebarContent,recommendationData, searchTerm, showJoyride, displayChristmasBanner, showTopRow) {\n\n log(gvScriptName_CSMain + '.createSidebar: Start','PROCS');\n\n // Check in with some global variable settings\n\n gvIframe = window.frames.iFrameBaluSidebar;\n\n if(recommendationData) {\n if(searchTerm){\n gvRecommendationCount_manual = recommendationData.length;\n } else {\n gvRecommendationCount = recommendationData.length;\n }\n\n } else{\n gvRecommendationCount = 0;\n gvRecommendationCount_manual = 0;\n }\n\n // Position the user's page on the screen to make room for the sidebar\n\n // We assume that if the iframe already exists then the page has already been shifted over\n // If iframe is already there then skip straight on to content (end of function)\n if(!gvIframe) {\n var html;\n if(document.documentElement){\n html = document.documentElement;\n } else if (document.getElementsByTagName('html') && document.getElementsByTagName('html')[0]) {\n html = document.getElementsByTagName('html')[0];\n } else {\n log(gvScriptName_CSMain + '.createSidebar: No HTML element found on page','ERROR');\n }\n\n // If there are any fixed elements on the page (usually headers and footers, e.g. Next.co.uk)\n // then find them and change them to relative. Otherwise we can't push them over.\n /*\n var fixedElements = document.querySelectorAll(\"div, header, [style]\");\n var style;\n for(var i = 0; i < fixedElements.length; i++) {\n style = window.getComputedStyle(fixedElements[i]);\n if(style.position === 'fixed'){\n fixedElements[i].style.position = 'relative';\n }\n }\n */\n\n // Make sure the entire HTML is relative positioned too\n if(html.style.position === 'static' || html.style.position === '') {\n html.style.position = 'relative';\n }\n\n // And now shift the HTML element over 300 pixels to the left\n var currentRight = html.style.marginRight;\n if(currentRight === 'auto' || currentRight === '') {\n currentRight = 0;\n } else {\n currentRight = parseFloat(html.style.marginRight); // parseFloat removes any 'px'\n }\n html.style.marginRight = currentRight + 300 + 'px';\n\n\n // Create the iFrame\n\n gvIframe = document.createElement('iframe');\n\n gvIframe.id = 'iFrameBaluSidebar';\n //gvIframe.src = 'about:blank';\n gvIframe.className = 'sidebar';\n\n // Style the gvIframe\n gvIframe.style.position = 'fixed';\n gvIframe.style.height = '100%';\n gvIframe.style.zIndex = '2147483647'; // max\n gvIframe.style.right = '0px';\n gvIframe.style.width = '300px';\n gvIframe.style.top = '0px';\n\n gvIframe.style.display = 'block';\n gvIframe.style.background = 'white';\n\n gvIframe.style.borderLeftColor = 'black';\n gvIframe.style.borderLeftStyle = 'solid';\n gvIframe.style.borderLeftWidth = '1px';\n\n // append gvIframe to document (in doing so, contentWindow etc are created)\n html.appendChild(gvIframe);\n //gvIframe.contentDocument.body.height = '80%';\n\n }\n\n createSidebarTemplate(thenCreateSidebarContent,recommendationData, searchTerm, showJoyride, displayChristmasBanner, showTopRow);\n\n}", "function homeContentData(sourcefile){\r\n\t\r\n\tdocument.getElementById('contentdiv').innerHTML = `\r\n\t\t\t<div class='middlepanel' id=\"aboutmepanel\" style='padding-top:50px; padding-bottom:100px;'>\r\n\t\t\t\t\t<div class='myheading2' style='font-size:20px;position: relative; z-index: 200;'> \r\n\t\t\t\t\t\t<img src='../img/mypic.png' class='infopic' alt='PIC' height=150 width=150><br/>\r\n\t\t\t\t\t\t<div style='padding:45px 0 66px 0'>ROBERT J. CALAMARI JR</div> \t\t\t\t\r\n\t\t\t\t\t</div><br/>\r\n\t\t\t\t\t<div style=\"text-align:justify; font-size:15px; color: #5b5858; margin:auto;\">\r\n\t\t\t\t\t\tWelcome to my website! This website was developed by me as a way to show off everything I can do, whether it is from painting, or to my coding experiences. I have experience with <b>Javascript, HTML5, CSS3, Node.JS, MongodDB, SQL, Adobe Products (Photoshop, After Effects, Premiere, Illustrator), and GIT.</b> As well as minor experience in <b>Socket.IO, SQL, React, WordPress, and PHP.</b> I have been painting since 2015 and coding since 2014. Below are all the projects that I have been working on. If you have any questions about freelance work or anything else, please feel free to email me at <b>[email protected]</b>.\t\t\r\n\t\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class='blogpanel' id=\"blogpanel\" style='padding:100px 0 100px 0; background-color:#0505051a;'>\r\n\t\t\t\t<div class='myheading1'>Projects</br>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div >\r\n\t\t\t\t\t` + printAllProjects(sourcefile) + `\r\n\t\t\t\t</div>\r\n\t\t \t</div>\r\n\t\t\t\r\n\t\t`;\r\n\r\n\t\t// <div class='blogpanel' id=\"blogpanel\" style='padding:50px 0 50px 0; background-color:#0505051a;'>\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t// \t</div>\r\n\t\t// \t<div class='paintingpanel' style='padding:60px 0 60px 0;'>\r\n\t\t\t\t\r\n\t\t// \t</div>\r\n\t// setTimeout(function() {\r\n\t// \tstartPictureFading(vpWidth, sourcefile, allpaintings, 0);\t\r\n\t// }, 1000);\r\n}", "function ciniki_web_pages() {\n //\n // Panels\n //\n this.childFormat = {\n '5':{'name':'List'},\n '8':{'name':'Image List'},\n '10':{'name':'Name List'},\n '11':{'name':'Thumbnails'},\n '12':{'name':'Buttons'},\n\n// '6':{'name':'Menu'},\n// '32':{'name':'List'},\n };\n this.parentChildrenFormat = {\n '5':{'name':'List'},\n '6':{'name':'Menu'},\n '7':{'name':'Page Menu'},\n '8':{'name':'Image List'},\n '11':{'name':'Thumbnails'},\n '12':{'name':'Buttons'},\n// '32':{'name':'List'},\n };\n this.menuFlags = {\n '1':{'name':'Header'},\n '2':{'name':'Footer'},\n };\n this.init = function() {\n }\n\n this.createEditPanel = function(cb, pid, parent_id, rsp) {\n var pn = 'edit_' + pid;\n //\n // Check if panel already exists, and reset for use\n //\n if( this.pn == null ) {\n //\n // The panel to display the edit form\n //\n this[pn] = new M.panel('Page', 'ciniki_web_pages', pn, 'mc', 'medium', 'sectioned', 'ciniki.web.pages.edit');\n this[pn].data = {}; \n this[pn].modules_pages = {};\n this[pn].stackedData = [];\n this[pn].page_id = pid;\n this[pn].page_type = (rsp.page != null && rsp.page.page_type != null ? rsp.page.page_type : 10);\n this[pn].showSelect = function() {\n M.ciniki_web_pages['edit_'+pid].editSelect('details', 'parent_id', 'yes');\n }\n this[pn].sections = {\n 'details':{'label':'', 'aside':'yes', 'fields':{\n 'parent_id':{'label':'Parent Page', 'type':'select', 'options':{},\n 'editable':'afterclick',\n 'confirmMsg':'Are you sure you want to move this page on your website?',\n 'confirmButton':'Move Page',\n 'confirmFn':this[pn].showSelect,\n },\n 'title':{'label':'Menu Title', 'type':'text'},\n 'article_title':{'label':'Page Title', 'visible':'no', 'type':'text'},\n 'sequence':{'label':'Page Order', 'type':'text', 'size':'small'},\n '_flags_1':{'label':'Visible', 'type':'flagtoggle', 'bit':0x01, 'field':'flags_1', 'default':'on'},\n '_flags_2':{'label':'Private', 'type':'flagtoggle', 'bit':0x02, 'field':'flags_2', 'default':'off',\n 'active':function() { return M.modFlagAny('ciniki.customers', 0x03); },\n },\n '_flags_3':{'label':'Members Only', 'type':'flagtoggle', 'bit':0x04, 'field':'flags_3', 'default':'off',\n 'active':function() { return M.modFlagSet('ciniki.customers', 0x02); },\n },\n 'menu_flags':{'label':'Menu Options', 'type':'flags', 'flags':this.menuFlags},\n '_flags_4':{'label':'Password', 'type':'flagtoggle', 'bit':0x08, 'field':'flags_4', 'default':'off',\n 'active':(M.modFlagSet('ciniki.web', 0x2000)),\n 'on_fields':['page_password'],\n },\n 'page_password':{'label':'', 'type':'text', 'visible':(M.modFlagOn('ciniki.web', 0x2000) && (rsp.page.flags&0x08) == 0x08 ? 'yes' : 'no')},\n }},\n '_page_type':{'label':'Page Type', 'aside':'yes', 'visible':'hidden', 'fields':{\n 'page_type':{'label':'', 'hidelabel':'yes', 'type':'toggle', 'toggles':{}, 'onchange':'M.ciniki_web_pages[\\'' + pn + '\\'].setPageType();'},\n }},\n '_redirect':{'label':'Redirect', 'visible':'hidden', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_redirect'); },\n 'fields':{\n 'page_redirect_url':{'label':'URL', 'type':'text'},\n }},\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'content', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_tabs'); },\n 'tabs':{\n 'content':{'label':'Content', 'fn':'M.ciniki_web_pages[\\'' + pn + '\\'].switchTab(\"content\");'},\n 'files':{'label':'Files', 'fn':'M.ciniki_web_pages[\\'' + pn + '\\'].switchTab(\"files\");'},\n 'gallery':{'label':'Gallery', 'fn':'M.ciniki_web_pages[\\'' + pn + '\\'].switchTab(\"gallery\");'},\n 'children':{'label':'Child Pages', 'fn':'M.ciniki_web_pages[\\'' + pn + '\\'].switchTab(\"children\");'},\n }},\n '_module':{'label':'Module', 'visible':'hidden', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_module'); },\n 'fields':{\n 'page_module':{'label':'Module', 'type':'select', 'options':{}, 'onchangeFn':'M.ciniki_web_pages[\\'' + pn + '\\'].setModuleOptions();'},\n }},\n '_module_options':{'label':'Options', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_module_options'); },\n 'fields':{\n }},\n '_image':{'label':'', 'type':'imageform', 'aside':'yes',\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_image'); },\n 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', \n 'controls':'all', 'history':'no', \n 'addDropImage':function(iid) {\n M.ciniki_web_pages[pn].setFieldValue('primary_image_id', iid, null, null);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':'M.ciniki_web_pages.'+pn+'.deletePrimaryImage',\n },\n }},\n '_image_caption':{'label':'', 'aside':'yes',\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_image_caption'); },\n 'fields':{\n '_flags_15':{'label':'Show Image', 'type':'flagtoggle', 'field':'flags_15', 'reverse':'yes', 'bit':0x4000},\n 'primary_image_caption':{'label':'Caption', 'type':'text'},\n // 'primary_image_url':{'label':'URL', 'type':'text'},\n }},\n '_synopsis':{'label':'Synopsis', 'aside':'yes', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_synopsis'); },\n 'fields':{\n 'synopsis':{'label':'', 'type':'textarea', 'size':'small', 'hidelabel':'yes'},\n }},\n '_content':{'label':'Content', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_content'); },\n 'fields':{\n 'content':{'label':'', 'type':'textarea', 'size':'xlarge', 'hidelabel':'yes'},\n }},\n 'files':{'label':'Files', // 'aside':'yes', //'visible':'hidden', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('files'); },\n 'type':'simplegrid', 'num_cols':1,\n 'headerValues':null,\n 'cellClasses':[''],\n 'addTxt':'Add File',\n 'addFn':'M.ciniki_web_pages.'+pn+'.editComponent(\\'ciniki.web.pagefiles\\',\\'M.ciniki_web_pages.'+pn+'.updateFiles();\\',{\\'file_id\\':\\'0\\'});',\n },\n '_files':{'label':'', // 'aside':'yes', //'visible':'hidden', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_files'); },\n 'fields':{\n '_flags_13':{'label':'Reverse Order', 'type':'flagtoggle', 'bit':0x1000, 'field':'flags_13', 'default':'on'},\n }},\n 'images':{'label':'Gallery', 'type':'simplethumbs',\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('images'); },\n },\n '_images':{'label':'', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_images'); },\n 'addTxt':'Add Image',\n 'addFn':'M.ciniki_web_pages.'+pn+'.editComponent(\\'ciniki.web.pageimages\\',\\'M.ciniki_web_pages.'+pn+'.addDropImageRefresh();\\',{\\'add\\':\\'yes\\'});',\n },\n '_children':{'label':'Child Pages', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_children'); },\n 'fields':{\n 'child_title':{'label':'Heading', 'type':'text'},\n 'child_format':{'label':'Format', 'active':'yes', 'type':'flags', 'toggle':'yes', 'none':'no', 'join':'yes', 'flags':this.childFormat},\n }},\n 'pages':{'label':'', 'type':'simplegrid', 'num_cols':1, \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('pages'); },\n 'seqDrop':function(e,from,to) {\n M.ciniki_web_pages[pn].savePos();\n M.api.getJSONCb('ciniki.web.pageUpdate', {'tnid':M.curTenantID, \n 'page_id':M.ciniki_web_pages[pn].data.pages[from].page.id,\n 'parent_id':M.ciniki_web_pages[pn].page_id,\n 'sequence':M.ciniki_web_pages[pn].data.pages[to].page.sequence, \n }, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_web_pages[pn].updateChildren();\n });\n },\n 'addTxt':'Add Child Page',\n 'addFn':'M.ciniki_web_pages.'+pn+'.childEdit(0);',\n },\n 'sponsors':{'label':'Sponsors', 'type':'simplegrid', 'visible':'hidden', 'num_cols':1,\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('sponsors'); },\n 'addTxt':'Manage Sponsors',\n 'addFn':'M.ciniki_web_pages.'+pn+'.sponsorEdit(0);',\n },\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_web_pages.'+pn+'.savePage();'},\n 'delete':{'label':'Delete', 'visible':(pid==0?'no':'yes'), 'fn':'M.ciniki_web_pages.'+pn+'.deletePage();'},\n }},\n };\n this[pn].fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.web.pageHistory', 'args':{'tnid':M.curTenantID,\n 'page_id':this.page_id, 'field':i}};\n };\n this[pn].sectionData = function(s) { \n return this.data[s];\n };\n this[pn].sectionVisible = function(s) {\n if( s == '_tabs' && this.page_type == 10 ) {\n return 'yes';\n }\n// this.sections._image.visible = (pt=='10' || ((pt==20 || pt==30) && this.data.parent_id > 0) ?'yes':'hidden');\n// this.sections._image_caption.visible = (pt=='10'?'yes':'hidden');\n if( s == '_synopsis' && (this.page_type == 10 || (this.page_type == 11 && this.data.parent_id > 0)) ) {\n return 'yes';\n }\n if( s == '_synopsis' && this.page_type == 20 && this.data.parent_id > 0 ) {\n return 'yes';\n }\n if( s == '_content' && ((this.page_type == 10 && this.sections._tabs.selected == 'content') || this.page_type == 11) ) {\n return 'yes';\n }\n if( (s == '_image' || s == '_image_caption') && (this.page_type == 10 )) {\n return 'yes';\n }\n if( s == '_image' && (this.page_type == 11 || this.page_type == 20) && this.data.parent_id > 0 ) {\n return 'yes';\n }\n if( (s == 'images' || s == '_images') && this.page_type == 10 && this.sections._tabs.selected == 'gallery' ) {\n return 'yes';\n }\n if( (s == 'files' || s == '_files') && this.page_type == 10 && this.sections._tabs.selected == 'files' ) {\n return 'yes';\n }\n if( (s == '_children' || s == 'pages') && this.page_type == 10 && this.sections._tabs.selected == 'children' ) {\n return 'yes';\n }\n if( s == 'pages' && this.page_type == 11 ) {\n return 'yes';\n }\n if( s == '_redirect' && this.page_type == 20 ) {\n return 'yes';\n }\n if( (s == '_module' || s == '_module_options') && this.page_type == 30 ) {\n return 'yes';\n }\n return 'hidden';\n }\n this[pn].switchTab = function(t) {\n this.sections._tabs.selected = t;\n this.refreshSection('_tabs');\n this.showHideSections(['_synopsis', '_redirect', '_image', '_image_caption', '_content', 'images', '_images', 'files', '_files', '_children', 'pages', 'sponsors', '_modules', '_module_options']);\n }\n this[pn].fieldValue = function(s, i, j, d) {\n if( i == 'parent_id' ) { return ' ' + this.data[i]; }\n return this.data[i];\n };\n this[pn].cellValue = function(s, i, j, d) {\n if( s == 'pages' ) {\n return d.page.title;\n } else if( s == 'files' ) {\n return d.file.name;\n } else if( s == 'sponsors' && j == 0 ) { \n return '<span class=\"maintext\">' + d.sponsor.title + '</span>';\n }\n };\n this[pn].rowFn = function(s, i, d) {\n if( s == 'pages' ) {\n return 'M.ciniki_web_pages.'+pn+'.childEdit(\\'' + d.page.id + '\\');';\n } else if( s == 'files' ) {\n return 'M.startApp(\\'ciniki.web.pagefiles\\',null,\\'M.ciniki_web_pages.'+pn+'.updateFiles();\\',\\'mc\\',{\\'file_id\\':\\'' + d.file.id + '\\'});';\n } else if( s == 'sponsors' ) {\n return 'M.startApp(\\'ciniki.sponsors.ref\\',null,\\'M.ciniki_web_pages.'+pn+'.updateSponsors();\\',\\'mc\\',{\\'ref_id\\':\\'' + d.sponsor.ref_id + '\\'});';\n }\n };\n this[pn].thumbFn = function(s, i, d) {\n return 'M.startApp(\\'ciniki.web.pageimages\\',null,\\'M.ciniki_web_pages.'+pn+'.addDropImageRefresh();\\',\\'mc\\',{\\'page_id\\':M.ciniki_web_pages.'+pn+'.page_id,\\'page_image_id\\':\\'' + d.image.id + '\\'});';\n };\n this[pn].deletePrimaryImage = function(fid) {\n this.setFieldValue(fid, 0, null, null);\n return true;\n };\n this[pn].addDropImage = function(iid) {\n if( this.page_id == 0 ) {\n var c = this.serializeForm('yes');\n var rsp = M.api.postJSON('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c);\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n this.page_id = rsp.id;\n }\n var rsp = M.api.getJSON('ciniki.web.pageImageAdd', \n {'tnid':M.curTenantID, 'image_id':iid, 'page_id':this.page_id});\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n return true;\n };\n this[pn].addDropImageRefresh = function() {\n if( M.ciniki_web_pages[pn].page_id > 0 ) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID, \n 'page_id':M.ciniki_web_pages[pn].page_id, 'images':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_web_pages[pn];\n p.data.images = rsp.page.images;\n p.refreshSection('images');\n p.show();\n });\n }\n return true;\n };\n this[pn].editComponent = function(a,cb,args) {\n if( this.page_id == 0 ) {\n var p = this;\n var c = this.serializeFormData('yes');\n M.api.postJSONFormData('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n p.page_id = rsp.id;\n args['page_id'] = rsp.id;\n M.startApp(a,null,cb,'mc',args);\n });\n } else {\n args['page_id'] = this.page_id;\n M.startApp(a,null,cb,'mc',args);\n }\n };\n\n this[pn].updateFiles = function() {\n if( this.page_id > 0 ) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID, \n 'page_id':this.page_id, 'files':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_web_pages[pn];\n p.data.files = rsp.page.files;\n p.refreshSection('files');\n p.show();\n });\n }\n return true;\n };\n\n this[pn].updateChildren = function() {\n if( this.page_id > 0 ) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID, \n 'page_id':this.page_id, 'children':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_web_pages[pn];\n p.data.pages = rsp.page.pages;\n p.refreshSection('pages');\n p.show();\n });\n }\n return true;\n };\n this[pn].updateSponsors = function() {\n if( this.page_id > 0 ) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID, \n 'page_id':this.page_id, 'sponsors':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_web_pages[pn];\n p.data.sponsors = rsp.page.sponsors;\n p.refreshSection('sponsors');\n p.show();\n });\n }\n return true;\n };\n\n this[pn].childEdit = function(cid) {\n if( this.page_id == 0 ) {\n // Save existing data as new page\n var p = this;\n var c = this.serializeFormData('yes');\n M.api.postJSONFormData('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n p.page_id = rsp.id;\n M.ciniki_web_pages.pageEdit('M.ciniki_web_pages.'+pn+'.updateChildren();',cid,p.page_id);\n });\n } else {\n M.ciniki_web_pages.pageEdit('M.ciniki_web_pages.'+pn+'.updateChildren();',cid,this.page_id);\n }\n };\n this[pn].sponsorEdit = function(cid) {\n if( this.page_id == 0 ) {\n // Save existing data as new page\n var p = this;\n var c = this.serializeFormData('yes');\n M.api.postJSONFormData('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n p.page_id = rsp.id;\n// M.ciniki_web_pages.pageEdit('M.ciniki_web_pages.'+pn+'.updateChildren();',cid,p.page_id);\n M.startApp('ciniki.sponsors.ref',null,p.panelRef+'.updateSponsors();','mc',{'object':'ciniki.web.page','object_id':p.page_id});\n });\n } else {\n M.startApp('ciniki.sponsors.ref',null,this.panelRef+'.updateSponsors();','mc',{'object':'ciniki.web.page','object_id':this.page_id});\n }\n };\n // \n // Add or remove sections based on page type\n //\n this[pn].setPageType = function() {\n var pt = this.formValue('page_type');\n this.page_type = pt;\n var p = M.gE(this.panelUID);\n if( pt == '10' ) { //|| (pt == 11 && this.data.parent_id > 0) ) {\n p.children[0].className = 'large mediumaside';\n } else if( pt == '11' ) {\n p.children[0].className = 'large mediumaside';\n } else if( pt == '20' ) {\n p.children[0].className = 'medium';\n } else {\n p.children[0].className = 'medium mediumaside';\n }\n// this.sections._module_options.visible = 'hidden';\n// this.sections._image.visible = (pt=='10' || ((pt==20 || pt==30) && this.data.parent_id > 0) ?'yes':'hidden');\n// this.sections._image_caption.visible = (pt=='10'?'yes':'hidden');\n// this.sections._synopsis.visible = (pt=='10' || ((pt==20 || pt==30) && this.data.parent_id > 0)?'yes':'hidden');\n// this.sections._content.visible = ((pt=='10'||pt==11)?'yes':'hidden');\n// this.sections.files.visible = (pt=='10'?'yes':'hidden');\n// this.sections._files.visible = (pt=='10'?'yes':'hidden');\n// this.sections.images.visible = (pt=='10'?'yes':'hidden');\n// this.sections._images.visible = (pt=='10'?'yes':'hidden');\n// this.sections._children.visible = (pt=='10'?'yes':'hidden');\n// this.sections.pages.visible = (pt=='10'||pt=='11'?'yes':'hidden');\n// this.sections.sponsors.visible = (pt=='10'?'yes':'hidden');\n// this.sections._redirect.visible = (pt=='20'?'yes':'hidden');\n// this.sections._module.visible = (pt=='30'?'yes':'hidden');\n// this.sections._module_options.visible = (pt=='30'?'yes':'hidden');\n if( pt == '30' ) { \n this.setModuleOptions();\n }\n this.refreshSection('_tabs');\n this.showHideSections(['_synopsis', '_redirect', '_image', '_image_caption', '_content', 'images', '_images', 'files', '_files', '_children', 'pages', 'sponsors', '_module', '_module_options']);\n this.refreshSection('_module');\n/* for(i in this.sections) {\n var e = M.gE(this.panelUID + '_section_' + i);\n if( e != null && this.sections[i].visible != null && this.sections[i].visible != 'no' ) {\n if( this.sections[i].visible == 'hidden' ) {\n e.style.display = 'none';\n } else if( this.sections[i].visible == 'yes' ) {\n e.style.display = 'block';\n }\n }\n } */\n var e = M.gE(this.panelUID + '_article_title');\n if( pt == 10 || pt == 11 ) {\n this.sections.details.fields.article_title.visible = 'yes';\n e.parentNode.parentNode.style.display = '';\n } else {\n this.sections.details.fields.article_title.visible = 'no';\n e.parentNode.parentNode.style.display = 'none';\n }\n };\n this[pn].setModuleOptions = function() {\n// this.sections._module_options.visible = 'hidden';\n var mod = this.formValue('page_module');\n this.sections._module_options.fields = {};\n for(var i in this.modules_pages) {\n if( i == mod ) {\n if( this.modules_pages[i].options != null ) {\n for(var j in this.modules_pages[i].options) {\n// this.sections._module_options.visible = 'yes';\n this.setModuleOptionsField(this.modules_pages[i].options[j]);\n }\n }\n break;\n }\n }\n this.refreshSection('_module_options');\n// var e = M.gE(this.panelUID + '_section__module_options');\n// if( e != null && this.sections._module_options.visible == 'yes' && this.sections._module.visible == 'yes' ) {\n// e.style.display = 'block';\n// this.refreshSection('_module_options');\n// } else {\n// e.style.display = 'none';\n// }\n };\n this[pn].setModuleOptionsField = function(option) {\n this.sections._module_options.fields[option.setting] = {'label':option.label, 'type':option.type, 'hint':(option.hint!=null?option.hint:'')};\n if( option.type == 'toggle' ) {\n this.sections._module_options.fields[option.setting].toggles = {};\n for(var i in option.toggles) {\n this.sections._module_options.fields[option.setting].toggles[option.toggles[i].value] = option.toggles[i].label;\n }\n }\n else if( option.type == 'select' ) {\n this.sections._module_options.fields[option.setting].options = {};\n for(var i in option.options) {\n this.sections._module_options.fields[option.setting].options[option.options[i].value] = option.options[i].label;\n }\n }\n else if( option.type == 'image_id' ) {\n this.sections._module_options.fields[option.setting].addDropImage = function(iid) {\n M.ciniki_web_pages[pn].setFieldValue(option.setting, iid, null, null);\n return true;\n };\n if( option.controls != null ) {\n this.sections._module_options.fields[option.setting].controls = option.controls;\n } else {\n this.sections._module_options.fields[option.setting].controls = 'all';\n }\n }\n this.data[option.setting] = option.value;\n };\n this[pn].addButton('save', 'Save', 'M.ciniki_web_pages.'+pn+'.savePage();');\n this[pn].addClose('Cancel');\n this[pn].addLeftButton('website', 'Preview', 'M.ciniki_web_pages.'+pn+'.previewPage();');\n this[pn].savePage = function(preview) {\n var p = this;\n var flags = this.formValue('child_format');\n if( this.formValue('_flags_1') == 'on' ) {\n flags |= 0x01;\n } else {\n flags &= ~0x01;\n }\n if( this.formValue('_flags_2') == 'on' ) {\n flags |= 0x02;\n } else {\n flags &= ~0x02;\n }\n if( this.formValue('_flags_3') == 'on' ) {\n flags |= 0x04;\n } else {\n flags &= ~0x04;\n }\n if( this.formValue('_flags_4') == 'on' ) {\n flags |= 0x08;\n } else {\n flags &= ~0x08;\n }\n if( this.formValue('_flags_13') == 'on' ) {\n flags |= 0x1000;\n } else {\n flags &= ~0x1000;\n }\n if( this.formValue('_flags_15') == 'on' ) {\n flags |= 0x4000;\n } else {\n flags &= ~0x4000;\n }\n if( this.page_id > 0 ) {\n var c = this.serializeFormData('no');\n if( c != null || flags != this.data.flags ) {\n if( c == null ) { c = new FormData; }\n if( flags != this.data.flags ) {\n c.append('flags', flags);\n }\n M.api.postJSONFormData('ciniki.web.pageUpdate', \n {'tnid':M.curTenantID, 'page_id':this.page_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n if( preview != null ) {\n M.showWebsite(preview);\n } else {\n p.close();\n }\n });\n } else {\n if( preview != null ) {\n M.showWebsite(preview);\n } else {\n this.close();\n }\n }\n } else {\n var c = this.serializeFormData('yes');\n c.append('flags', flags);\n M.api.postJSONFormData('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n if( preview != null ) {\n M.showWebsite(preview);\n } else {\n p.close();\n }\n });\n }\n };\n this[pn].previewPage = function() {\n this.savePage(this.data.full_permalink);\n };\n this[pn].deletePage = function() {\n var p = this;\n M.confirm('Are you sure you want to delete this page? All files and images will also be removed from this page.',null,function() {\n M.api.getJSONCb('ciniki.web.pageDelete', {'tnid':M.curTenantID, \n 'page_id':p.page_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n p.close();\n });\n });\n };\n }\n\n// this[pn].sections.details.fields.parent_id.options = {'0':'None'};\n if( rsp.parentlist != null && rsp.parentlist.length > 0 ) {\n this[pn].sections.details.fields.parent_id.active = 'yes';\n this[pn].sections.details.fields.parent_id.options = {};\n this[pn].sections.details.fields.parent_id.options[' ' + 0] = 'None';\n for(var i in rsp.parentlist) {\n if( rsp.parentlist[i].page.id != this[pn].page_id ) {\n this[pn].sections.details.fields.parent_id.options[' ' + rsp.parentlist[i].page.id] = rsp.parentlist[i].page.title;\n }\n }\n } else {\n this[pn].sections.details.fields.parent_id.active = 'no';\n }\n this[pn].data = rsp.page;\n this[pn].modules_pages = rsp.modules_pages;\n // Remove child_format flags\n this[pn].data.flags_1 = (rsp.page.flags&0xFFFFFF0F);\n this[pn].data.flags_2 = (rsp.page.flags&0xFFFFFF0F);\n this[pn].data.flags_3 = (rsp.page.flags&0xFFFFFF0F);\n this[pn].data.flags_4 = (rsp.page.flags&0xFFFFFF0F);\n this[pn].data.flags_13 = (rsp.page.flags&0x00001000);\n this[pn].data.flags_15 = (rsp.page.flags&0x00004000);\n this[pn].data.child_format = (rsp.page.flags&0x00000FF0);\n this[pn].sections.details.fields.parent_id.active = 'yes';\n if( this[pn].page_id == 0 && parent_id != null ) {\n this[pn].data.parent_id = parent_id;\n if( parent_id == 0 ) {\n this[pn].data.title = '';\n }\n }\n this[pn].sections._page_type.visible = 'hidden';\n this[pn].sections._page_type.fields.page_type.toggles = {'10':'Custom'};\n // Check if flags for page menu and page redirects\n if( (M.curTenant.modules['ciniki.web'].flags&0x0640) > 0 ) {\n this[pn].sections._page_type.visible = 'yes';\n if( (M.curTenant.modules['ciniki.web'].flags&0x0800) > 0 ) {\n this[pn].sections._page_type.fields.page_type.toggles['11'] = 'Manual';\n }\n if( (M.curTenant.modules['ciniki.web'].flags&0x0400) > 0 ) {\n this[pn].sections._page_type.fields.page_type.toggles['20'] = 'Redirect';\n }\n if( (M.curTenant.modules['ciniki.web'].flags&0x0240) > 0 ) {\n this[pn].sections._page_type.fields.page_type.toggles['30'] = 'Module';\n this[pn].sections._module.fields.page_module.options = {};\n if( rsp.modules_pages != null ) {\n for(i in rsp.modules_pages) {\n this[pn].sections._module.fields.page_module.options[i] = rsp.modules_pages[i].name;\n }\n }\n }\n } else {\n this[pn].data.page_type = 10;\n }\n if( this[pn].data.parent_id == 0 ) {\n // Give them the option of how to display sub pages\n this[pn].sections._children.fields.child_format.flags = this.parentChildrenFormat;\n this[pn].sections.details.fields.menu_flags.visible = 'yes';\n } else {\n this[pn].sections._children.fields.child_format.flags = this.childFormat;\n this[pn].sections.details.fields.menu_flags.visible = 'no';\n }\n if( M.curTenant.modules['ciniki.sponsors'] != null \n && (M.curTenant.modules['ciniki.sponsors'].flags&0x02) ) {\n this[pn].sections.sponsors.visible = 'hidden';\n } else {\n this[pn].sections.sponsors.visible = 'no';\n }\n \n this[pn].refresh();\n this[pn].show(cb);\n this[pn].setPageType();\n }\n\n //\n // Arguments:\n // aG - The arguments to be parsed into args\n //\n this.start = function(cb, appPrefix, aG) {\n args = {};\n if( aG != null ) { args = eval(aG); }\n\n //\n // Create the app container if it doesn't exist, and clear it out\n // if it does exist.\n //\n var appContainer = M.createContainer(appPrefix, 'ciniki_web_pages', 'yes');\n if( appContainer == null ) {\n M.alert('App Error');\n return false;\n } \n\n this.pageEdit(cb, args.page_id, args.parent_id); \n }\n\n this.pageEdit = function(cb, pid, parent_id) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID,\n 'page_id':pid, 'parent_id':parent_id, 'images':'yes', 'files':'yes', \n 'children':'yes', 'parentlist':'yes', 'sponsors':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_web_pages.createEditPanel(cb, pid, parent_id, rsp); \n });\n };\n}", "function bindEventsAdmin()\n{\n /* para ocultar msgTop 10 segundos despues que se termina de cargar la pagina */\n setTimeout(function(){\n $(\"#msg_top\").hide('drop', {direction: \"up\"}, 1000)\n }, 5000);\n\n // Notification Close Button\n $(\".close-notification\").live(\"click\", function(){\n $(this).parent().fadeTo(350, 0, function () {$(this).slideUp(600);});\n return false;\n });\n\n // jQuery Tipsy\n $('[rel=tooltip], #main-nav span, .loader').tipsy({gravity:'s', fade:true}); // Tooltip Gravity Orientation: n | w | e | s\n\n // jQuery Facebox Modal\n $('a[rel*=modal]').facebox();\n\n // jQuery jWYSIWYG Editor\n //$('.wysiwyg').wysiwyg({ iFrameClass:'wysiwyg-iframe' });\n\n // jQuery dataTables\n $('.datatable').dataTable();\n\n // Check all checkboxes\n $('.check-all').click(\n function(){\n $(this).parents('form').find('input:checkbox').attr('checked', $(this).is(':checked'));\n }\n )\n\n // IE7 doesn't support :disabled\n $('.ie7').find(':disabled').addClass('disabled');\n\n // Widget Close Button\n $(\".close-widget\").click(\n function () {\n $(this).parent().fadeTo(350, 0, function () {$(this).slideUp(600);});\n return false;\n }\n );\n\n // Image actions\n $('.image-frame').hover(\n function() { $(this).find('.image-actions').css('display', 'none').fadeIn('fast').css('display', 'block'); }, // Show actions menu\n function() { $(this).find('.image-actions').fadeOut(100); } // Hide actions menu\n );\n\n // Content box tabs\n $('.tab').hide(); // Hide the content divs\n $('.default-tab').show(); // Show the div with class \"default-tab\"\n $('.tab-switch a.default-tab').addClass('current'); // Set the class of the default tab link to \"current\"\n\n $('.tab-switch a').click(\n function() {\n var tab = $(this).attr('href'); // Set variable \"tab\" to the value of href of clicked tab\n $(this).parent().siblings().find(\"a\").removeClass('current'); // Remove \"current\" class from all tabs\n $(this).addClass('current'); // Add class \"current\" to clicked tab\n $(tab).siblings('.tab').hide(); // Hide all content divs\n $(tab).show(); // Show the content div with the id equal to the id of clicked tab\n return false;\n }\n );\n\n // Content box side tabs\n $(\".sidetab\").hide();// Hide the content divs\n $('.default-sidetab').show(); // Show the div with class \"default-sidetab\"\n $('.sidetab-switch a.default-sidetab').addClass('current'); // Set the class of the default tab link to \"current\"\n\n $(\".sidetab-switch a\").click(\n function() {\n var sidetab = $(this).attr('href'); // Set variable \"sidetab\" to the value of href of clicked sidetab\n $(this).parent().siblings().find(\"a\").removeClass('current'); // Remove \"current\" class from all sidetabs\n $(this).addClass('current'); // Add class \"current\" to clicked sidetab\n $(sidetab).siblings('.sidetab').hide(); // Hide all content divs\n $(sidetab).show(); // Show the content div with the id equal to the id of clicked tab\n return false;\n }\n );\n\n //Minimize Content Article\n $(\"article header h2\").css({ \"cursor\":\"s-resize\" }); // Minizmie is not available without javascript, so we don't change cursor style with CSS\n $(\"article header h2\").click( // Toggle the Box Content\n function () {\n $(this).parent().find(\"nav\").toggle();\n $(this).parent().parent().find(\"section, footer\").toggle();\n }\n );\n}", "function injectContent() {\r\n\tvar data = require(\"sdk/self\").data;\r\n\trequire('sdk/page-mod').PageMod({\r\n\t\tinclude: [\"*.gaiamobile.org\"],\r\n\t\tcontentScriptFile: [\r\n\t\t\tdata.url(\"ffos_runtime.js\"),\r\n\t\t\tdata.url(\"hardware.js\"),\r\n\r\n\t\t\tdata.url(\"lib/activity.js\"),\r\n\t\t\tdata.url(\"lib/apps.js\"),\r\n\t\t\tdata.url(\"lib/bluetooth.js\"),\r\n\t\t\tdata.url(\"lib/cameras.js\"),\r\n\t\t\tdata.url(\"lib/idle.js\"),\r\n\t\t\tdata.url(\"lib/keyboard.js\"),\r\n\t\t\tdata.url(\"lib/mobile_connection.js\"),\r\n\t\t\tdata.url(\"lib/power.js\"),\r\n\t\t\tdata.url(\"lib/set_message_handler.js\"),\r\n\t\t\tdata.url(\"lib/settings.js\"),\r\n\t\t\tdata.url(\"lib/wifi.js\")\r\n\t\t],\r\n\t\tcontentScriptWhen: \"start\",\r\n\t\tattachTo: ['existing', 'top', 'frame']\r\n\t})\r\n\r\n\trequire('sdk/page-mod').PageMod({\r\n\t\tinclude: [\"*.homescreen.gaiamobile.org\"],\r\n\t\tcontentScriptFile: [\r\n\t\t\tdata.url(\"apps/homescreen.js\")\r\n\t\t],\r\n\t\tcontentScriptWhen: \"start\",\r\n\t\tattachTo: ['existing', 'top', 'frame']\r\n\t})\r\n\r\n}", "function populateSidePanel(node, array)\n {\n console.log(\"node is this: \"+node)\n $(\"#accordion\").html(\"\");\n if(array.Topic != \"Contact\")\n {\n $(\"#sidepanelTitle\").html(\"<h2>\"+nodes[node].label+\"</h2>\");\n }\n else\n {\n $(\"#sidepanelTitle\").html(\"<h2>\"+nodes[node].label+\"</h2>\")\n }\n console.log(\"Title: \"+$(\"#sidepanelTitle\").text());\n if((array.hasOwnProperty('Name')))\n {\n $(\"#accordion\").html('<div class=\"panel panel-default\"><div class=\"panel-heading\"><h3 data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#collapse1\" class=\"panel-title\">Details</h3></div><div id=\"collapse1\" class=\"panel-collapse collapse\"><div id=\"details\" class=\"panel-body\" style=\"max-height: 50vh;overflow-y: scroll;\"></div></div></div>');\n $(\"#details\").html(\"Email Address: \" + array.emailAddress);\n }\n if((array.hasOwnProperty('Facebook')))\n {\n $(\"#accordion\").html('<div class=\"panel panel-default\"><div class=\"panel-heading\"><h3 data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#collapse2\" class=\"panel-title\">Facebook</h3></div><div id=\"collapse2\" class=\"panel-collapse collapse\"><div id=\"facebook\" class=\"panel-body\" style=\"max-height: 50vh;overflow-y: scroll;\"></div></div></div>');\n for(var i = 0 ; i < array.Facebook.length; i++ )\n {\n $(\"#facebook\").append(\"<div>\"+array.Facebook[i]+\"</div>\");\n }\n }\n if((array.hasOwnProperty('Gmail')))\n {\n $(\"#accordion\").append('<div class=\"panel panel-default\"><div class=\"panel-heading\"><h3 data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#collapse3\" class=\"panel-title\">Gmail</h3></div><div id=\"collapse3\" class=\"panel-collapse collapse\"><div id=\"gmail\" class=\"panel-body\" style=\"max-height: 50vh;overflow-y: scroll;\"></div></div></div>');\n for(var i = 0 ; i < array.Gmail.length; i++ )\n {\n $(\"#gmail\").append(\"<div class='email panel'><h3>\"+array.Gmail[i].subject +\"</h3><br />\"+array.Gmail[i].data+\"</div>\");\n }\n }\n if((array.hasOwnProperty('Twitter')))\n {\n $(\"#accordion\").append('<div class=\"panel panel-default\"><div class=\"panel-heading\"><h3 data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#collapse4\" class=\"panel-title\">Twitter</h3></div><div id=\"collapse4\" class=\"panel-collapse collapse\"><div id=\"twitter\" class=\"panel-body\" style=\"max-height: 50vh;overflow-y: scroll;\"></div></div></div>');\n for(var i = 0 ; i < array.Twitter.length; i++ )\n {\n $(\"#twitter\").html(\"<div>\"+array.Twitter.data+\"</div>\");\n }\n }\n if((array.hasOwnProperty('LinkedIn')))\n {\n $(\"#accordion\").append('<div class=\"panel panel-default\"><div class=\"panel-heading\"><h3 data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#collapse5\" class=\"panel-title\">LinkedIn</h3></div><div id=\"collapse5\" class=\"panel-collapse collapse\"><div id=\"linkedIn\" class=\"panel-body\" style=\"max-height: 50vh;overflow-y: scroll;\"></div></div></div>');\n for(var i = 0 ; i < array.LinkedIn.length; i++ )\n {\n $(\"#linkedIn\").html(\"<div>\"+array[i].data+\"</div>\");\n }\n }\n\n\n }", "function createLogInSidebarContent(a,b,c,d) {\n var lvFunctionName = 'createLogInSidebarContent';\n log(gvScriptName_CSMain + '.' + lvFunctionName + ': Start','PROCS');\n\n var lvHtml = '';\n lvHtml += '<div class=\"grid-x grid-padding-x text-center\" style=\"margin-top: 70px\">';\n lvHtml += ' <div class=\"small-10 small-centered cell\">';\n lvHtml += ' <p class=\"logInSideBarText\">Log back in to Balu to see amazing ethical products while you shop</p>';\n lvHtml += ' <a id=\"showLogInPageButton\" class=\"button radius signInScreenButtons\">Log in</a>';\n lvHtml += ' </div>';\n lvHtml += '</div>';\n\n gvIframe.contentWindow.document.getElementById(\"contentDiv\").innerHTML = lvHtml;\n gvIframe.contentWindow.document.getElementById('showLogInPageButton').addEventListener('click',showOptionsLogInPageWindow_listener);\n\n}", "function Start() {\n // local variable\n let title = document.title;\n\n ///Displaying to console to confirm that the javascript file works.\n console.log(\n \"%c javascript works, Nice\",\n \"font-weight:bold; font-size: 20px;\"\n );\n console.log(\n \"%c ----------------------------\",\n \"font-weight:bold; font-size: 20px;\"\n );\n console.log(\"Title: \" + title);\n console.log();\n\n ///try catch any possible error!\n //Try various functions and if any of them doesn't exists, \n //it skips to catch block and then displays the content from the catch block.\n try {\n switch (title) {\n case \"COMP125 - Home\":\n content.HomeContent();\n\n break;\n\n case \"COMP125 - About\":\n content.AboutContent();\n break;\n\n case \"COMP125 - Contact\":\n content.ContactContent();\n break;\n\n default:\n throw \"Title not Defined\";\n break;\n }\n } catch (err) {\n console.log(err);\n console.warn(\"Oops\");\n }\n\n //injecting files by calling function\n insertHTML(\"../Scripts/View/content/header.html\", \"header\");\n insertHTML(\"../Scripts/View/content/footer.html\", \"footer\");\n }", "function bindHandlers() {\n // set the handler for the run button\n $j(' #execute-structure-command ').click(function() {\n if ($j(' #structure-command-line ').val().length != 0) {\n Jmol.script(jmolViewer, $j(' #structure-command-line ').val());\n } \n });\n // do the toggle spin button\n $j(' #spin-structure ').click(function() {\n if (jmolSpin) {\n jmolSpin = false;\n Jmol.script(jmolViewer, 'spin off');\n }\n else {\n jmolSpin = true;\n Jmol.script(jmolViewer, 'spin on'); \n }\n });\n\n // do the display model stuff\n $j(' input:radio[name=display-model] ').click(function() {\n var dmv = $j(this).val();\n if (dmv == 'bs') {\n Jmol.script(jmolViewer, 'select *; cartoons off; spacefill 23%; wireframe 0.15');\n }\n else if (dmv == 'w') {\n Jmol.script(jmolViewer, 'select *; cartoons off; wireframe -0.1');\n }\n else if (dmv == 'c') {\n Jmol.script(jmolViewer, 'select protein or nucleic; cartoons only; set cartoonFancy true');\n }\n else if (dmv == 'sf') {\n Jmol.script(jmolViewer, 'select *; cartoons off; spacefill only');\n } \n });\n\n // do the export\n $j(' #export-structure ').click(function() {\n Jmol.script(jmolViewer, 'write IMAGE PNGJ \"jmol.png\"');\n });\n\n // do the solvent accessible surface\n $j(' #toggle-solvent-surface ').click(function() {\n if (solventSurface === true) {\n Jmol.script(jmolViewer, 'isoSurface off');\n solventSurface = false;\n }\n else {\n Jmol.script(jmolViewer, 'isoSurface solvent');\n solventSurface = true;\n }\n });\n\n // handle the known functional sites\n $j(' #show-known-residues ').click(function() {\n Jmol.script(jmolViewer, 'select *; color ' + unrankedResidueColor);\n if (csaResidues.length>0) {Jmol.script(jmolViewer, 'select ' + csaResidues + ';color ' + knownResidueColor);}\n });\n\n // handle the highlight\n $j(' #highlight-top-k').click(function() {\n var thisScript = getHighlightingScript();\n Jmol.script(jmolViewer, thisScript);\n });\n}", "function clickHandler(d) {\n\n //highlight path from node to root\n function flatten(root) {\n var nodes = [],\n i = 0;\n\n function recurse(node) {\n if (node.children) node.children.forEach(recurse);\n if (node._children) node._children.forEach(recurse);\n if (!node.id) node.id = ++i;\n nodes.push(node);\n }\n\n recurse(root);\n return nodes;\n }\n\n var select = d.data.name;\n\n //find selected data from flattened root record\n var find = flatten(root).find(function (d) {\n if (d.data.name == select)\n return true;\n });\n\n //reset all the data to have color undefined.\n flatten(root).forEach(function (d) {\n d.color = undefined;\n })\n\n //iterate over the selected node and set color as green until it reaches it reaches the root\n while (find.parent) {\n find.color = \"#42b983\";\n find = find.parent;\n }\n update(find);\n\n // if the component inspector is already open, remove it and create a new one\n if (panel.document.getElementById('sidebar')) {\n closeSidebar();\n }\n const sidebar = document.createElement('section');\n sidebar.setAttribute('id', 'sidebar');\n\n const topLink = panel.document.getElementById('viz-link');\n topLink.innerHTML = \"<a href='#'>Component Inspector</a>\";\n topLink.classList.add('active');\n\n // populate the section with our headings\n const contentdiv = document.createElement('div');\n contentdiv.setAttribute('id', 'app_content');\n contentdiv.innerHTML = `\n <a href=\"#\" id=\"close_sidebar\"></a>\n <h3>${d.data.name.slice(0, d.data.name.lastIndexOf(\"-\"))}</h3>\n <h4><a href=\"#\" id=\"methods_handler\">Methods</a><span></span></h4>\n <ul id=\"${d.data.name}Methods\" class=\"methods-list\">\n\n </ul>\n <h4><a href=\"#\" id=\"props_handler\">Props</a><span></span></h4>\n <ul id=\"${d.data.name}Props\" class=\"props-list\">\n\n </ul>\n <h4><a href=\"#\" id=\"vars_handler\">Variables/Data</a><span></span></h4>\n <ul id=\"${d.data.name}Variables\" class=\"vars-list\">\n\n </ul>\n <h4 id='slot_handler'>Slot</h4>\n <ul id=\"slot-list\" class=\"slot-list opened\">\n <li><p>${(d.data.slots) ? d.data.slots : \"No slot/data\"}</p></li>\n </ul>\n `;\n panel.document.getElementById('contentContainer').appendChild(sidebar);\n panel.document.getElementById('sidebar').appendChild(contentdiv);\n panel.document.getElementById('props_handler').addEventListener('click', propToggle);\n panel.document.getElementById('vars_handler').addEventListener('click', varToggle);\n panel.document.getElementById('methods_handler').addEventListener('click', methodToggle);\n\n // click handlers for sidebar sections\n function propToggle(e) {\n e.preventDefault();\n panel.document.getElementById('props_handler').classList.toggle('active-sidebar');\n var element = panel.document.querySelector('.props-list').classList.toggle('opened');\n console.log(element)\n }\n\n function methodToggle(e) {\n e.preventDefault();\n panel.document.getElementById('methods_handler').classList.toggle('active-sidebar');\n var element = panel.document.querySelector('.methods-list').classList.toggle('opened');\n console.log(element)\n }\n\n function varToggle(e) {\n e.preventDefault();\n panel.document.getElementById('vars_handler').classList.toggle('active-sidebar');\n panel.document.querySelector('.vars-list').classList.toggle('opened');\n }\n\n // add an event listener to close sidebar button\n panel.document.getElementById('close_sidebar').addEventListener('click', closeSidebar)\n\n // populate methods on sidebar\n let methodList = panel.document.getElementById(d.data.name + \"Methods\");\n if (d.data.methods === \"undefined\") {\n let method = document.createElement(\"li\");\n method.setAttribute('id', d.data.name + 'MethodUndefined');\n method.innerHTML = \"undefined\";\n method.appendChild(method);\n } else {\n for (let i = 0; i < d.data.methods.length; i += 1) {\n let method = document.createElement(\"li\");\n method.setAttribute('id', d.data.name + 'Method');\n method.innerHTML = d.data.methods[i];\n methodList.appendChild(method);\n }\n const methodLength = document.createElement('span');\n methodLength.innerHTML = ` (${d.data.methods.length})`;\n panel.document.getElementById('methods_handler').appendChild(methodLength);\n };\n\n //popular variables on sidebar\n let variableList = panel.document.getElementById(d.data.name + \"Variables\");\n if (d.data.variables === \"undefined\") {\n let variable = document.createElement(\"li\");\n variable.setAttribute('id', d.data.name + 'VariableUndefined');\n variable.innerHTML = \"undefined\";\n variableList.appendChild(variable);\n } else {\n for (let i = 0; i < d.data.variables.length; i += 1) {\n let variable = document.createElement(\"li\");\n variable.setAttribute('id', d.data.name + 'Variable');\n variable.innerHTML = d.data.variables[i];\n variableList.appendChild(variable);\n }\n const varLength = document.createElement('span');\n varLength.innerHTML = ` (${d.data.variables.length})`;\n panel.document.getElementById('vars_handler').appendChild(varLength);\n };\n\n //populate props on sidebar\n let propList = panel.document.getElementById(d.data.name + \"Props\");\n if (d.data.props === \"undefined\") {\n let prop = document.createElement(\"li\");\n prop.setAttribute('id', d.data.name + 'PropUndefined');\n prop.innerHTML = \"undefined\";\n propList.appendChild(prop);\n } else {\n for (let i = 0; i < d.data.props.length; i += 1) {\n let prop = document.createElement(\"li\");\n prop.setAttribute('id', d.data.name + 'Prop');\n prop.innerHTML = d.data.props[i];\n propList.appendChild(prop);\n }\n const propLength = document.createElement('span');\n propLength.innerHTML = ` (${d.data.props.length})`;\n panel.document.getElementById('props_handler').appendChild(propLength);\n };\n\n function closeSidebar() {\n const remove = panel.document.getElementById(\"sidebar\");\n const topLink = panel.document.getElementById('viz-link');\n topLink.innerHTML = \"<a href='#'>App Visualization</a>\";\n topLink.classList.remove('active');\n panel.document.getElementById('contentContainer').removeChild(remove);\n }\n\n // only runs if there are changes to the component\n // create array of strings of state changes - e.g. 'CommentCount changed from 0 to 1'\n if (d.data.changes) {\n console.log(d.data.name, 'has changes');\n let changeArray = [];\n for (let i = 0; i < d.data.changes.length; i += 1) {\n let changes = d.data.changes[i];\n if (changes.path.includes(\"html\") || changes.path.includes(\"top\") || changes.path.includes(\"bottom\") || changes.path.includes(\"left\") || changes.path.includes(\"right\")) {\n d.data.changes.splice(i, 1)\n } else {\n let prop = JSON.stringify(changes.path[0]).slice(1, changes.path[0].length + 1);\n console.log(prop)\n let oldVal = (typeof changes.rhs === 'number') ? Math.floor(changes.rhs) : changes.rhs.slice(0, changes.rhs.length);\n let newVal = (typeof changes.lhs === 'number') ? Math.floor(changes.lhs) : changes.lhs.slice(0, changes.lhs.length);\n let changeText = (prop === 'height' || prop === 'width') ? `${prop} changed from ${oldVal} to ${newVal}` : `${oldVal} changed to ${newVal}`;\n changeArray.push(changeText)\n }\n }\n\n // create UL consisting of changes\n let htmlString = '<ul class=\"opened\">';\n if (changeArray.length === 0) {\n return\n } else {\n for (let i = 0; i < changeArray.length; i += 1) {\n htmlString = htmlString + '<li>' + changeArray[i] + '</li>'\n }\n }\n htmlString = htmlString + '</ul>'\n\n // attach changes to inspector\n const changesDiv = document.createElement('div');\n changesDiv.setAttribute('id', 'change_content');\n changesDiv.innerHTML = `\n <h4><a href=\"#\" class=\"changed active-sidebar\">Changes</a></h4>\n ${htmlString}\n `;\n panel.document.getElementById('app_content').appendChild(changesDiv);\n\n }\n\n }", "function renderContent() {\n var content = document.getElementById('content_' + selected);\n // Initialize the pane.\n if (content.id == 'content_blocks') {\n // If the workspace was changed by the XML tab, Firefox will have performed\n // an incomplete rendering due to Blockly being invisible. Rerender.\n Blockly.mainWorkspace.render();\n } else if (content.id == 'content_xml') {\n var xmlTextarea = document.getElementById('textarea_xml');\n var xmlDom = Blockly.Xml.workspaceToDom(Blockly.mainWorkspace);\n var xmlText = Blockly.Xml.domToPrettyText(xmlDom);\n xmlTextarea.value = xmlText;\n xmlTextarea.focus();\n } else if (content.id == 'content_javascript') {\n content.innerHTML = Blockly.Generator.workspaceToCode('JavaScript');\n } else if (content.id == 'content_python') {\n content.innerHTML = Blockly.Generator.workspaceToCode('Python');\n }\n}", "function createUI() {\n //Creating the sidebar\n sidebar = L.control.sidebar({\n //autopan: true, // whether to maintain the centered map point when opening the sidebar\n closeButton: true, // whether t add a close button to the panes\n container: 'sidebar', // the DOM container or #ID of a predefined sidebar container that should be used\n position: 'left', // left or right\n }).addTo(map);\n\n //Creates and adds the search pane to the sidebar\n searchSidebarPane = {\n id: 'searchPane', // UID, used to access the panel\n tab: '<i class=\"fa fa-search\"></i>', // content can be passed as HTML string,\n pane: \"<div class=\\\"search_bar\\\">\\n\" +\n \" <div class=\\\"search-container\\\">\\n\" +\n \" <input type=\\\"text\\\" placeholder=\\\"Search a club, a player...\\\" name=\\\"search\\\" onkeyup=\\\"onSearchSubmit(this)\\\">\\n\" +\n \" </div>\\n\" +\n \" <div id=\\\"search-results-holder\\\">\\n\" +\n \"Type in the name of a club or a player and we'll find it for you!\" +\n \" </div>\\n\" +\n \"</div>\", // an optional pane header\n title: 'Search', // an optional pane header\n };\n sidebar.addPanel(searchSidebarPane);\n\n // Creates and adds the info pane to the sidebar\n infoSidebarPane = {\n id: 'infoPane', // UID, used to access the panel\n tab: '<i class=\"fa fa-info\"></i>', // content can be passed as HTML string,\n pane: \"Click on a data point to get more info about it.\", // DOM elements can be passed, too\n title: 'Info', // an optional pane header\n };\n sidebar.addPanel(infoSidebarPane);\n\n // Creates and adds the stats pane to the sidebar\n statsSidebarPane = {\n id: 'statsPane', // UID, used to access the panel\n pane: \"<div id= \\\"stacked-chart-div\\\">\" +\n \"<div id= \\\"stacked-chart-title\\\" class='legend'></div>\" +\n \"<svg id=\\\"figure\\\"></svg>\" + // DOM elements can be passed, too\n \"<div id= \\\"stacked-chart-legend\\\" class='legend'></div>\" +\n \"</div>\",\n tab: '<i class=\"fa fa-chart-bar \"></i>', // content can be passed as HTML string,\n title: 'Statistics', // an optional pane header\n };\n sidebar.addPanel(statsSidebarPane);\n\n //Creates and adds the loading bar to the view\n loadingBar = L.control.custom({\n position: 'bottomleft',\n content: htmlLoadingBar(0),\n classes: 'panel panel-default',\n style:\n {\n width: '200px',\n margin: '20px',\n padding: '0px',\n },\n });\n\n // France button to recenter on the map\n const htmlFranceButton = '<button type=\"button\" class=\"btn btn-france\" id=\"franceButton\">' +\n ' <img src=\"svg/fr.svg\" alt=\"fr\" width=\"15\" height=\"15\" >' +\n '</button>';\n\n // Create placeholder for buttons and them on map\n L.control.custom({\n position: 'bottomright',\n content: htmlFranceButton,\n classes: 'btn-group-vertical',\n style:\n {\n opacity: 1,\n },\n datas:\n {\n 'foo': 'bar',\n },\n events:\n {\n click: function (data) {\n switch (data.target.id) {\n case \"franceButton\":\n stackChart.update(topClubs, \"Top 10 Clubs: France\");\n map.setView(INITIAL_COORD, INITIAL_ZOOM);\n activeLayer.deselectAllDepartments();\n break;\n default:\n break;\n\n }\n },\n }\n }).addTo(map);\n}", "function load_sidebar_options(menu_option,sidebar_option) {\n\tcontent = $(\"#\"+menu_option);\n\n\tif (typeof sidebar_option === 'undefined') { sidebar_option = menu_option+\"-main-panel\"; }\n\n\tconsole.log('load_sidebar_options menu_option = '+menu_option);\n\tconsole.log('load_sidebar_options sidebar_option = '+sidebar_option);\n\n\ttry {\n\t\t//first level: button is found on top bar\n\t\tif (menu_option in menu_options) {\n\t\t\t//sidebar is cleared, to be filled again\n\t\t\t$('#side-menu > a').remove();\n\n\t\t\t// menu = second level\n\t\t\tmenu = menu_options[menu_option];\n\t\t\tconsole.log('load_sidebar_options menu: '+JSON.stringify(menu));\n\t\t\tconsole.log(\"load_sidebar_options sidebar option: \"+JSON.stringify(menu[sidebar_option]));\n\n\t\t\tsidebar_options = menu[sidebar_option];\n\t\t\t//third level\n\t\t\tfor (var i=0;i<=sidebar_options.length-1;i++) {\n\n\t\t\t\tconsole.log('load_sidebar_options sidebar[i]:' + JSON.stringify(sidebar_options[i]));\n\n\t\t\t\toption = sidebar_options[i];\n\n\t\t\t\tname = option['name'];\n\t\t\t\tlink = option['link'];\n\t\t\t\tdescription = option['description'];\n\n\t\t\t\tconsole.log('name = '+name);\n\t\t\t\tconsole.log('link = '+link);\n\t\t\t\tconsole.log('description = '+description);\n\n\t\t\t\t//sidebar element is created\n\t\t\t\telement = $('<a href=\"' + link +'\"><div class=\"side-menu-option\">'+ name +'</div></a>');\n\n\t\t\t\t//sidebar element is added\n\t\t\t\t$(\"#side-menu\").append(element);\n\n\t\t\t\t//if there is a funct on the third level, it's bound to a click event\n\t\t\t\tif ('funct' in option) {\n\t\t\t\t\tfunct = option['funct'];\n\t\t\t\t\tadd_sidebar_funct(element,option['funct']);\n\t\t\t\t}\n\n\t\t\t\tif('description' in option) {\n\t\t\t\t\tadd_sidebar_description(element,description);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//load_menu_links method binds the click events to the new sidebar options\n\t\t\t//menu, menu_option are passed further for recursivity:\n\t\t\t//\tif \"link\" is in menu, that means a newly created sidebar item is also on level 2\n\t\t\t//\t so it actually runs load_sidebar_options again for his own sidebar elements\n\t\t\tload_menu_links(menu, menu_option);\n\n\t\t}\n\n\t} catch(err) {\n\t\tconsole.log('No menu options for element '+err);\n\t}\n}", "function run () {\n load_userinfo();\n if (url.includes(\"discuss\")) {\n load_images();\n load_scratchblockcode();\n load_bbcode();\n add_bbbuttons();\n }\n }", "function panelHandling() {\n\tvar currentId = window.localStorage.getItem(\"divIdGlobal\");\n\t$(\"#panelMenu\" + currentId).panel({\n\t\topen: function () {\n\t\t\twindow.localStorage.setItem(\"panelLeft\", 'open');\n\t\t\thideNonContextButtons('panel');\n\t\t\tpanelMenuLeftOpened();\n\t\t}\n\t});\n\t$(\"#panelMenu\" + currentId).panel({\n\t\tclose: function () {\n\t\t\twindow.localStorage.setItem(\"panelLeft\", 'closed');\n\t\t\tshowNonContextButtons('panel');\n\t\t\tpanelMenuLeftClosed();\n\t\t}\n\t});\n\t$(\"#panelMenu\" + currentId + \"UL\").on(\"click\", \"li\", function () {\n\t\t$('#panelMenu' + currentId).panel(\"close\");\n\t});\n\t$(\"#panelMenuRight\" + currentId).panel({\n\t\topen: function () {\n\t\t\twindow.localStorage.setItem(\"panelRight\", 'open');\n\t\t\thideNonContextButtons('panel');\n\t\t}\n\t});\n\t$(\"#panelMenuRight\" + currentId).panel({\n\t\tclose: function () {\n\t\t\twindow.localStorage.setItem(\"panelRight\", 'closed');\n\t\t\tshowNonContextButtons('panel');\n\t\t}\n\t});\n\t$(\"#panelMenuRight\" + currentId + \"UL\").on(\"click\", \"li\", function () {\n\t\t$('#panelMenuRight' + currentId).panel(\"close\");\n\t});\n\tif ($.mobile.pageContainer.pagecontainer(\"getActivePage\")[0].id === 'wallpaperFullscreenImagePage') {\n\t\t$(\"#panelMenuWall\" + currentId).panel({\n\t\t\topen: function () {\n\t\t\t\twindow.localStorage.setItem(\"panelWall\", 'open');\n\t\t\t\thideNonContextButtons('wallpaper');\n\t\t\t}\n\t\t});\n\t\t$(\"#panelMenuWall\" + currentId).panel({\n\t\t\tclose: function () {\n\t\t\t\twindow.localStorage.setItem(\"panelWall\", 'closed');\n\t\t\t\tshowNonContextButtons('wallpaper');\n\t\t\t}\n\t\t});\n\t\t$(\"#actionList\" + currentId).on(\"click\", \"li\", function () {\n\t\t\t$('#panelMenuWall' + currentId).panel(\"close\");\n\t\t});\n\t}\n\tif ($.mobile.pageContainer.pagecontainer(\"getActivePage\")[0].id === 'overviewWallsPage') {\n\t\t$(\"#panelMenuFilter\" + currentId).panel({\n\t\t\topen: function () {\n\t\t\t\twindow.localStorage.setItem(\"panelFilter\", 'open');\n\t\t\t\thideNonContextButtons('filter');\n\t\t\t}\n\t\t});\n\t\t$(\"#panelMenuFilter\" + currentId).panel({\n\t\t\tclose: function () {\n\t\t\t\twindow.localStorage.setItem(\"panelFilter\", 'closed');\n\t\t\t\tshowNonContextButtons('filter');\n\t\t\t}\n\t\t});\n\t}\n\tif ($.mobile.pageContainer.pagecontainer(\"getActivePage\")[0].id === 'uriRingtonePage' || $.mobile.pageContainer.pagecontainer(\"getActivePage\")[0].id === 'searchRingtones' || $.mobile.pageContainer.pagecontainer(\"getActivePage\")[0].id === 'topicPage' || $.mobile.pageContainer.pagecontainer(\"getActivePage\")[0].id === 'rtFavoritesPage' || $.mobile.pageContainer.pagecontainer(\"getActivePage\")[0].id === 'overviewRingsPage') {\n\t\t$(\"#panelMenuRing\" + currentId).panel({\n\t\t\topen: function () {\n\t\t\t\twindow.localStorage.setItem(\"panelRing\", 'open');\n\t\t\t\tgetRingSpecs();\n\t\t\t\tplaceFavoriteStarRings(window.localStorage.getItem(\"ringtoneUrl\"), window.localStorage.getItem(\"ringtoneName\"), window.localStorage.getItem(\"ringtoneType\"));\n\t\t\t\tplayAudio();\n\t\t\t\thideNonContextButtons('ringtone');\n\t\t\t}\n\t\t});\n\t\t$(\"#panelMenuRing\" + currentId).panel({\n\t\t\tclose: function () {\n\t\t\t\twindow.localStorage.setItem(\"panelRing\", 'closed');\n\t\t\t\tclearRingSpecs();\n\t\t\t\treleaseAudio();\n\t\t\t\tcurrentRingtone(window.localStorage.getItem(\"ringtoneType\"), \"stop\", emptyCallback);\n\t\t\t\tshowNonContextButtons('ringtone');\n\t\t\t}\n\t\t});\n\t}\n}", "function CreateControlPanel() {\n // Create the Album info Content Item\n albumInfoObject = new ContentItem();\n albumInfoObject.heading = strInstructions;\n albumInfoObject.layout = gddContentItemLayoutNews;\n albumInfoObject.flags = gddContentItemFlagStatic; // dont take clicks\n pluginHelper.AddContentItem(albumInfoObject, gddItemDisplayInSidebar);\n \n // Create Controls\n ctrlFileOpen = new ContentItem();\n ctrlPlayPause = new ContentItem();\n ctrlStop = new ContentItem();\n ctrlPrev = new ContentItem();\n ctrlNext = new ContentItem();\n \n // Set the images\n ctrlFileOpen.image = utils.LoadImage(\"open.gif\");\n ctrlStop.image = utils.LoadImage(\"stop.gif\");\n ctrlPrev.image = utils.LoadImage(\"prev.gif\");\n ctrlNext.image = utils.LoadImage(\"next.gif\");\n ctrlPlayPause.image = imgPlay;\n \n // Tooltips\n ctrlFileOpen.tooltip = strTooltipOpen;\n ctrlStop.tooltip = strTooltipStop;\n ctrlPrev.tooltip = strTooltipPrev;\n ctrlNext.tooltip = strTooltipNext;\n ctrlPlayPause.tooltip = strTooltipPlay;\n\n // OnDetailsview is called on single clicks, so use that to do various tasks\n ctrlFileOpen.onDetailsView = OpenFileButtonClicked;\n ctrlPlayPause.onDetailsView = PlayPauseButtonClicked;\n ctrlStop.onDetailsView = StopButtonClicked;\n ctrlPrev.onDetailsView = PrevButtonClicked;\n ctrlNext.onDetailsView = NextButtonClicked;\n\n // Now add the items\n pluginHelper.SetFlags(gddPluginFlagNone, gddContentFlagManualLayout + gddContentFlagHaveDetails);\n pluginHelper.AddContentItem(ctrlFileOpen, gddItemDisplayInSidebar);\n pluginHelper.AddContentItem(ctrlPlayPause, gddItemDisplayInSidebar);\n pluginHelper.AddContentItem(ctrlStop, gddItemDisplayInSidebar);\n pluginHelper.AddContentItem(ctrlPrev, gddItemDisplayInSidebar);\n pluginHelper.AddContentItem(ctrlNext, gddItemDisplayInSidebar);\n}", "loadWidgetData() {\n\n /**\n * Get local scope\n * @type {Widget}\n */\n const scope = this.scope;\n\n /**\n * Get widget page\n * @type {Workspace}\n */\n const workspace = this.getWorkspace();\n\n /**\n * Get current page\n * @type {Page}\n */\n const page = workspace.controller.isLoadPageContent();\n\n if (page) {\n\n scope.observer.batchPublish(\n scope.eventManager.eventList.loadContent,\n scope.eventManager.eventList.loadPreferences\n );\n scope.logger.debug('Content start loading');\n }\n }", "function updateFromSidebar() {\n\n let city = $(this).attr(\"dataCity\");\n\n updatePage(city);\n \n}", "function setup() {\n var tmp = get('skin');\n if (tmp && $.inArray(tmp, my_skins))\n change_skin(tmp);\n\n //Add the change skin listener\n $(\"[data-skin]\").on('click', function (e) {\n e.preventDefault();\n change_skin($(this).data('skin'));\n });\n\n //Add the layout manager\n $(\"[data-layout]\").on('click', function () {\n change_layout($(this).data('layout'));\n });\n\n $(\"[data-controlsidebar]\").on('click', function () {\n change_layout($(this).data('controlsidebar'));\n var slide = !AdminLTE.options.controlSidebarOptions.slide;\n AdminLTE.options.controlSidebarOptions.slide = slide;\n if (!slide)\n $('.control-sidebar').removeClass('control-sidebar-open');\n });\n\n $(\"[data-sidebarskin='toggle']\").on('click', function () {\n var sidebar = $(\".control-sidebar\");\n if (sidebar.hasClass(\"control-sidebar-dark\")) {\n sidebar.removeClass(\"control-sidebar-dark\")\n sidebar.addClass(\"control-sidebar-light\")\n } else {\n sidebar.removeClass(\"control-sidebar-light\")\n sidebar.addClass(\"control-sidebar-dark\")\n }\n });\n \n $(\"[data-enable='expandOnHover']\").on('click', function () {\n $(this).attr('disabled', true); \n AdminLTE.pushMenu.expandOnHover();\n if(!$('body').hasClass('sidebar-collapse'))\n $(\"[data-layout='sidebar-collapse']\").click();\n });\n \n // Reset options\n if($('body').hasClass('fixed')) {\n $(\"[data-layout='fixed']\").attr('checked', 'checked');\n }\n if($('body').hasClass('layout-boxed')) {\n $(\"[data-layout='layout-boxed']\").attr('checked', 'checked');\n }\n if($('body').hasClass('sidebar-collapse')) {\n $(\"[data-layout='sidebar-collapse']\").attr('checked', 'checked');\n }\n \n }", "function qll_module_hotchicks_sidebar()\r\n{\r\n\tif(!qll_GMSupport)\r\n\t{\treturn;\t}\r\n\t\r\n\tobject = document.createElement(\"div\");\r\n\tobject.setAttribute('class', 'QLLBoxModHotChicks');\r\n\tobject.setAttribute('id', 'QLLBoxModHotChicks');\r\n\tobject.innerHTML=\"<img class='QLLIMGLoading' src='\" + qll_loadingImg + \"'>\";\r\n\tadv=document.getElementById('eads');\r\n\tadv.parentNode.insertBefore(object,adv);\r\n\tGM_xmlhttpRequest(\r\n\t{\r\n\t\tmethod: 'GET',\r\n\t\turl: qll_serverURI + '/modules/hotchicks/request.php',\r\n\t\t\tonload:function(responseDetails)\r\n\t\t\t{\t\t\r\n\t\t\t\tvar responseText = responseDetails.responseText;\r\n\t\t\t\turi=responseText.substring(responseText.lastIndexOf(\"http\"));\r\n\t\t\t\tobj=document.getElementById('QLLBoxModHotChicks');\r\n\t\t\t\tobj.innerHTML = \"<img alt='\" + uri + \"' src='\" + uri + \"' border='0'>\";\r\n\t\t\t\t$(\"#QLLBoxModHotChicks\").click(function(){qll_fun_showDisplayBox(qll_lang[19], \"<a href='\" + uri + \"' target='_blank'><img alt='\" + uri + \"' src='\" + uri + \"' border='0'></a>\");});\r\n\t\t\t}\r\n\t});\t\t\r\n}", "function loadCourseStatusSidebar() {\n var html = HtmlService.createHtmlOutputFromFile('courseStatusSidebar').setTitle('U3A Tools')\n SpreadsheetApp.getUi().showSidebar(html)\n}", "function update() {\n const $constructionContent = $(\".application .tab-contents .tab-content-construction\");\n\n updateProjectButtons($constructionContent);\n updateQueueWidget($constructionContent);\n}", "function main() {\n //your widget code goes here\n jQueryBeacon(document).ready(function () {\n console.log('Realgraph Beacon Loaded');\n var currentURL = window.location.href; // Returns full URL\n pingListener(currentURL);\n getAndRenderEntitiesData(currentURL);\n\n //example load css\n //loadCss(\"http://example.com/widget.css\");\n\n //example script load\n //loadScript(\"http://example.com/anotherscript.js\", function() { /* loaded */ });\n });\n }", "function main() {\r\n $('#header > div.ads-header').remove();\r\n\r\n $('#contendor > div.iframe').remove();\r\n $('#contendor > div.banners').remove();\r\n\r\n $('#contenido > div.contenedor-banner-item').remove();\r\n\r\n $('#sidebar > div').each(function(i, e){\r\n\r\n if ($(this).text() == 'Anuncios')\r\n {\r\n $(this).next().next().remove();\r\n $(this).next().remove();\r\n $(this).remove();\r\n }\r\n\r\n });\r\n\r\n $('#footer').remove();\r\n\r\n if (location.pathname.indexOf('/peliculas') >= 0)\r\n {\r\n $('#contenido > div[style*=\"float: right;\"]').remove();\r\n $('#contenido > h2').eq(1).remove();\r\n $('#contenido > div.texto-pelicula').eq(0).remove();\r\n $('#contenido > div.texto-ver').remove();\r\n }\r\n\r\n if (location.pathname.indexOf('/modulos') >= 0)\r\n {\r\n $('div[id*=\"imagecont\"]').eq(0).remove();\r\n $('div[id*=\"embedcont\"]').eq(0).css('visibility', 'visible');\r\n }\r\n}", "function initInterface(){\n $(\"#docsTitleBlock\").height($(window).height());\n $(\"#docsTitleBlock .content\").height($(window).height()-80);\n $(\"#docsTitleBlock .content\").css('line-height', $(window).height()-80+\"px\");\n $('#docsTitleBlock .content span, .material-icons').css(\"opacity\", 1);\n\n if(widthWindow>992){\n var topMarginSidenav = $(\"#docsTitleBlock .content\").height()-$(window).scrollTop()+80;\n if(topMarginSidenav < 0){\n topMarginSidenav = 0;\n }\n $(\".sidenav\").css('top', topMarginSidenav);\n $(\"#sidebar .sidenav\").css('max-height', $(window).height());\n $(\"#sidebar .sidenav\").css('max-width', widthWindow-$('#content').width()-60);\n $(\"#sidebar .sidenav\").css('min-width', widthWindow-$('#content').width()-60);\n }else{\n $(\".sidenav\").css('top', '0');\n $(\"#sidebar .sidenav\").css('max-width', 'initial');\n $(\"#sidebar .sidenav\").css('min-width', 'initial');\n $(\"#sidebar .sidenav\").css('max-height', 'initial');\n }\n }", "function init_details_panel() {\n\tvar panel_y = null;\n\tvar content_y = null;\n\tvar window_scroll_top = $(window).scrollTop();\n\t// Hide the panel initially and set its position\n\t$('.details-panel').hide().css('left', 20);\n\t$('.streams.current').delegate('.stream:not(.active)', 'click', function() {\n\t\t// Make the current item the only active item\n\t\t$('.details-panel-item').html('');\n\t\t//clear previous content\n\t\tgetEventDetails($('.hover input[name=event_id]').val());\n\t\t$('.stream-shell .active').removeClass('active');\n\t\t$(this).addClass('active');\n\t\t// Add some content to the reading panel\n\t\t// $('.details-panel-item').html($('.stream.active .stream-content').html());\n\n\t\t// Calculate panel and panel content height then show it\n\t\tpanel_y = $(window).height() - 100;\n\t\tcontent_y = panel_y - /*parseInt($('.details-panel-close').height())*/14 - 12;\n\t\tshowPanel();\n\t});\n\t$('.streams.current').delegate('.stream.active', 'click', function() {\n\t\t$(this).removeClass('active');\n\t\t// hide the details panel\n\t\thidePanel();\n\t});\n\n\t// Mouse hover over above & leaves the stream entries\n\t$('.streams').delegate('.stream', 'hover', function() {\n\t\t$(this).toggleClass('hover');\n\t});\n\n\t// Mouse press down on the stream entries\n\t$('.streams').delegate('.stream', 'mousedown', function() {\n\t\t$(this).addClass('mouse-down');\n\t});\n\t// Mouse release up on the stream entries, mouseout also triggers this event\n\t$('.streams').delegate('.stream', 'mouseup', function() {\n\t\t$(this).removeClass('mouse-down');\n\t});\n\t$('.streams').delegate('.stream', 'mouseout', function() {\n\t\t$(this).removeClass('mouse-down');\n\t});\n\n\t// Details panel close btn actions\n\t$('.details-panel-close').delegate('.close', 'click', function() {\n\t\t$('.stream-shell .active').removeClass('active');\n\t\thidePanel();\n\t});\n\n\t// Stream delete btn actions\n\t$(\".streams\").delegate('.stream-del', 'click', function(e) {\n\t\te.preventDefault();\n\t\t// prevent default <a> tag from firing\n\t\te.stopPropagation();\n\t\t// prevent other events from firing, in this case the details panel animation\n\t\thidePanel();\n\t\treview_id = $(this).find('.stream-del-identity').val();\n\t\t$(this).append('<input type=\\\"hidden\\\" />').load(\"reviews/delete\", \"review_id=\" + review_id, function() {\n\t\t\t$(this).closest(\".stream-shell\").animate({\n\t\t\t\theight : 'toggle',\n\t\t\t\topacity : 'toggle',\n\t\t\t}, 800, function() {\n\t\t\t\t$(this).closest(\".stream-shell\").remove();\n\t\t\t});\n\t\t});\n\t});\n\n\t// Window scrolling actions\n\t$(window).scroll(function() {\n\t\tif (window_scroll_top == $(window).scrollTop()) {\n\t\t\tif ($('.details-panel').hasClass('active')) {\n\t\t\t\t$('.details-panel').css('left', 580 - $(window).scrollLeft());\n\t\t\t} else {\n\t\t\t\t$('.details-panel').css('left', 20 - $(window).scrollLeft());\n\t\t\t}\n\n\t\t}\n\t\twindow_scroll_top = $(window).scrollTop();\n\t});\n\t// Window resizing actions\n\t$(window).resize(function() {\n\t\t// Calculate panel and its content height\n\t\tpanel_y = $(window).height() - 100;\n\t\tcontent_y = panel_y - parseInt($('.details-panel-close').height()) - 12;\n\t\t// Resize the details panel\n\t\tsetTimeout(browserResizeDetailsPanel, 200);\n\t});\n\n\tfunction showPanel() {\n\t\t// Set panel and its content height\n\t\t$('.details-panel').css('height', panel_y);\n\t\t$('.details-panel-content').css('height', content_y);\n\t\t// Show the panel and animate it into view\n\t\t$('.details-panel').stop().show().animate({\n\t\t\tleft : 580 - $(window).scrollLeft()\n\t\t}, function() {\n\t\t\t$('.details-panel').addClass('active');\n\t\t});\n\t\t// Hide the dashboard\n\t\t$('.dashboard').css('display', 'none');\n\t}\n\n\tfunction hidePanel() {\n\t\t// Move the panel off the screen and hide it when done\n\t\t$('.details-panel').stop().animate({\n\t\t\tleft : 20 - $(window).scrollLeft()\n\t\t}, function() {\n\t\t\t$(this).hide();\n\t\t\t$('.details-panel').removeClass('active');\n\t\t});\n\t\t// Show the dashboard\n\t\t$('.dashboard').css('display', 'block');\n\t}\n\n\tfunction browserResizeDetailsPanel() {\n\t\t// Set panel and its content height\n\t\t$('.details-panel').css('height', panel_y);\n\t\t$('.details-panel-content').css('height', content_y);\n\t\tif ($('.details-panel').hasClass('active')) {\n\t\t\t$('.details-panel').css('left', 580 - $(window).scrollLeft());\n\t\t} else {\n\t\t\t$('.details-panel').css('left', 20 - $(window).scrollLeft());\n\t\t}\n\t}\n\n\tfunction getEventDetails(eid) {\n\t\t// Ajax get the clicked event details\n\t\t$('.details-panel-item').html(\"loading\").load(\"/users/event_details\", {\n\t\t\teid : eid\n\t\t});\n\t}\n\n}", "function setup() {\n var tmp = get('skin');\n if (tmp && $.inArray(tmp, my_skins))\n change_skin(tmp);\n\n //Add the change skin listener\n $(\"[data-skin]\").on('click', function (e) {\n e.preventDefault();\n change_skin($(this).data('skin'));\n });\n\n //Add the layout manager\n $(\"[data-layout]\").on('click', function () {\n change_layout($(this).data('layout'));\n });\n\n $(\"[data-controlsidebar]\").on('click', function () {\n change_layout($(this).data('controlsidebar'));\n var slide = !AdminLTE.options.controlSidebarOptions.slide;\n AdminLTE.options.controlSidebarOptions.slide = slide;\n if (!slide)\n $('.control-sidebar').removeClass('control-sidebar-open');\n });\n\n $(\"[data-sidebarskin='toggle']\").on('click', function () {\n var sidebar = $(\".control-sidebar\");\n if (sidebar.hasClass(\"control-sidebar-dark\")) {\n sidebar.removeClass(\"control-sidebar-dark\")\n sidebar.addClass(\"control-sidebar-light\")\n } else {\n sidebar.removeClass(\"control-sidebar-light\")\n sidebar.addClass(\"control-sidebar-dark\")\n }\n });\n\n $(\"[data-enable='expandOnHover']\").on('click', function () {\n $(this).attr('disabled', true);\n AdminLTE.pushMenu.expandOnHover();\n if (!$('body').hasClass('sidebar-collapse'))\n $(\"[data-layout='sidebar-collapse']\").click();\n });\n\n // Reset options\n if ($('body').hasClass('fixed')) {\n $(\"[data-layout='fixed']\").attr('checked', 'checked');\n }\n if ($('body').hasClass('layout-boxed')) {\n $(\"[data-layout='layout-boxed']\").attr('checked', 'checked');\n }\n if ($('body').hasClass('sidebar-collapse')) {\n $(\"[data-layout='sidebar-collapse']\").attr('checked', 'checked');\n }\n\n }", "function setup() {\n var tmp = get('skin');\n if (tmp && $.inArray(tmp, my_skins))\n change_skin(tmp);\n\n //Add the change skin listener\n $(\"[data-skin]\").on('click', function (e) {\n e.preventDefault();\n change_skin($(this).data('skin'));\n });\n\n //Add the layout manager\n $(\"[data-layout]\").on('click', function () {\n change_layout($(this).data('layout'));\n });\n\n $(\"[data-controlsidebar]\").on('click', function () {\n change_layout($(this).data('controlsidebar'));\n var slide = !AdminLTE.options.controlSidebarOptions.slide;\n AdminLTE.options.controlSidebarOptions.slide = slide;\n if (!slide)\n $('.control-sidebar').removeClass('control-sidebar-open');\n });\n\n $(\"[data-sidebarskin='toggle']\").on('click', function () {\n var sidebar = $(\".control-sidebar\");\n if (sidebar.hasClass(\"control-sidebar-dark\")) {\n sidebar.removeClass(\"control-sidebar-dark\")\n sidebar.addClass(\"control-sidebar-light\")\n } else {\n sidebar.removeClass(\"control-sidebar-light\")\n sidebar.addClass(\"control-sidebar-dark\")\n }\n });\n\n $(\"[data-enable='expandOnHover']\").on('click', function () {\n $(this).attr('disabled', true);\n AdminLTE.pushMenu.expandOnHover();\n if (!$('body').hasClass('sidebar-collapse'))\n $(\"[data-layout='sidebar-collapse']\").click();\n });\n\n // Reset options\n if ($('body').hasClass('fixed')) {\n $(\"[data-layout='fixed']\").attr('checked', 'checked');\n }\n if ($('body').hasClass('layout-boxed')) {\n $(\"[data-layout='layout-boxed']\").attr('checked', 'checked');\n }\n if ($('body').hasClass('sidebar-collapse')) {\n $(\"[data-layout='sidebar-collapse']\").attr('checked', 'checked');\n }\n\n }", "function main() {\n // Specify jQuery UI easing method\n jQuery.easing.def = 'easeInOutQuad';\n\n // Google+ DOM check\n var $gbar = $(_ID_GBAR);\n var mappingKey = '';\n if ($gbar.length)\n mappingKey = $gbar.parent().attr('class');\n if (! $gbar.length || (' ' + mappingKey + ' ').indexOf(' ' + C_GBAR + ' ') < 0) {\n error(\"Google+ has changed is layout again (DOM CSS), breaking G+me. Please report the problem to http://huyz.us/gpme-release/ and I will fix it right away.\");\n getAppDetailsFromBackground(function(theAppDetails) {\n appDetails = theAppDetails;\n injectNews(mappingKey);\n });\n }\n\n // Listen for when there's a total AJAX refresh of the stream,\n // on a regular page\n var $contentPane = $(_ID_CONTENT_PANE);\n if ($contentPane.length) {\n var contentPane = $contentPane.get(0);\n $contentPane.bind('DOMNodeInserted', function(e) {\n // This happens when a new stream is selected\n if (e.relatedNode.parentNode == contentPane) {\n // We're only interested in the insertion of entire content pane\n onContentPaneUpdated(e);\n return;\n }\n\n var id = e.target.id;\n // ':' is weak optimization attempt for comment editing\n if (id && id.charAt(0) == ':')\n return;\n\n // This happens when posts' menus get inserted.\n // Also Usability Boost's star\n //debug(\"DOMNodeInserted: id=\" + id + \" className=\" + e.target.className);\n if (e.target.className == C_MENU || e.target.className == CF_MENU || e.target.className == C_UBOOST_STAR)\n onItemDivInserted(e);\n // This happens when a new post is added, either through \"More\"\n // or a new recent post.\n // Or it's a Start G+ post\n else if (id && (id.substring(0,7) == 'update-'))\n onItemInserted(e);\n else if (settings.nav_compatSgp && id.substring(0,9) == ID_SGP_POST_PREFIX )\n onSgpItemInserted(e);\n // This happens when switching from About page to Posts page\n // on profile\n else if (e.relatedNode.id.indexOf('-posts-page') > 0)\n onContentPaneUpdated(e);\n });\n } else {\n // This can happen if we're in the settings page for example\n warn(\"main: Can't find content pane\");\n }\n\n // Listen when status change\n // WARNING: DOMSubtreeModified is deprecated and degrades performance:\n // https://developer.mozilla.org/en/Extensions/Performance_best_practices_in_extensions\n var $status = $(_ID_STATUS_FG);\n if ($status.length)\n $status.bind('DOMSubtreeModified', onStatusUpdated);\n else\n // Sometimes this happens with G+ for some reason. Happened at times when I was\n // reloading a profile page.\n debug(\"main: Can't find status node; badges won't work.\");\n\n // Listen to incoming messages from background page\n chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {\n if (request.action == \"gpmeTabUpdateComplete\") {\n // Handle G+'s history state pushing when user clicks on different streams (and back)\n onTabUpdated();\n } else if (request.action == \"gpmeModeOptionUpdated\") {\n // Handle options changes\n onModeOptionUpdated(request.mode);\n } else if (request.action == \"gpmeResetAll\") {\n onResetAll();\n } else if (request.action == \"gpmeBrowserActionClick\") {\n onBrowserActionClick();\n }\n });\n\n // Listen for scrolling events\n //$(window).scroll($.throttle(500, 50, function(e) { onScroll(e); }));\n\n //injectNewFeedbackLink();\n\n // The initial update\n if (isEnabledOnThisPage()) {\n updateAllItems();\n\n // Listen to keyboard shortcuts\n $(window).keydown(onKeydown);\n\n // Set up a lscache cleanup in 5 minutes, keeping 30 days of history\n setTimeout(function() { lscache.removeOld(30 * 24 * 60, LS_HISTORY_); }, 5 * 60000);\n }\n}", "function parseSites() {\r\n var sidebarHTML = \"\";\r\n for (var siteID in MAP_SITES) {\r\n sidebarHTML += generateButtonHTML(siteID);\r\n createMapMarker(siteID);\r\n }\r\n document.getElementById(\"sidebar\").innerHTML += sidebarHTML;\r\n}", "function buildContentText(_id){\n\t\tif(branchType != \"graphicOnly\"){\n\t $('<div id=\"scrollableContent\" class=\"antiscroll-wrap\"><div class=\"box\"><div id=\"contentHolder\" class=\"overthrow antiscroll-inner\"><div id=\"content\"></div></div></div></div>').insertAfter(\"#pageTitle\");\n\t\t addLayoutCSS(branchType);\n\t\t $(\"#contentHolder\").height(stageH - ($(\"#scrollableContent\").position().top + audioHolder.getAudioShim()));\n\t\t // WTF? scrollableContent.position.top changes after contentHolder.height is set for the first time\n\t\t // So we do it twice to get the right value -- Dingman's famous quantum variable!\n\t\t $(\"#contentHolder\").height(stageH - ($(\"#scrollableContent\").position().top + audioHolder.getAudioShim()));\n\n\t\t if(isMobilePhone){\n\t\t\t\t$(\"#contentHolder\").prepend(myContent);\n\t\t\t}else{\n\t\t\t\t$(\"#content\").width($(\"#contentHolder\").width()-15);\n\t\t\t\t$(\"#content\").append(myContent);\n\t\t\t\t$(\"#content\").attr(\"aria-label\", $(\"#content\").text());\n\t\t\t\t//pageAccess_arr.push($(\"#content\"));\n\t\t }\n\t }\n\t if(branchType != \"textOnly\" && branchType != \"sidebar\" && branchType != \"branching\"){\n\t\t mediaHolder = new C_VisualMediaHolder(null, branchType, currentMedia, _id);\n\t mediaHolder.loadVisualMedia();\n\t }else if(branchType == \"sidebar\"){\n\t\t var mySidebar = $(data).find(\"page\").eq(currentPage).children(\"branch\").eq(currentBranch).find(\"sidebar\").first().text();\n\t\t $('#stage').append('<div id=\"sidebarHolder\" class=\"antiscroll-wrap\"><div class=\"box\"><div id=\"sidebar\" class=\"sidebar antiscroll-inner\"></div></div></div>');\n\t\t\t$('#sidebar').append(mySidebar);\n\n\t\t\tif($('#sidebar').height() > stageH - ($('#sidebarHolder').position().top + audioHolder.getAudioShim() + 40)){\n\t\t\t\t$(\".sidebar\").height(stageH - ($('#sidebarHolder').position().top + audioHolder.getAudioShim() + 40));\n\t\t\t}else{\n\t\t\t\t$(\".sidebar\").height($('#sidebar').height());\n\t\t\t}\n\n\t\t\t$('#sidebar').height($('#sidebarHolder').height());\n\t\t\t$('#sidebar').attr('aria-label', $('#sidebar').text());\n\t\t\tif(transition == true){\n\t\t\t\t// fade stage in\n\t\t\t\t$('#stage').velocity({\n\t\t\t\t\topacity: 1\n\t\t\t\t}, {\n\t\t\t\t\tduration: transitionLength\n\t\t\t\t});\n\t\t\t}\n\t\t}else{\n\t\t if(transition == true){\n\t\t\t\t// fade stage in\n\t\t\t\t$('#stage').velocity({\n\t\t\t\t\topacity: 1\n\t\t\t\t}, {\n\t\t\t\t\tduration: transitionLength\n\t\t\t\t});\n\t\t\t}\n\t }\n\n\t}", "function setup() {\n var tmp = get('skin');\n if (tmp && $.inArray(tmp, my_skins))\n change_skin(tmp);\n\n //Add the change skin listener\n $(\"[data-skin]\").on('click', function (e) {\n if($(this).hasClass('knob'))\n return;\n e.preventDefault();\n change_skin($(this).data('skin'));\n });\n\n //Add the layout manager\n $(\"[data-layout]\").on('click', function () {\n change_layout($(this).data('layout'));\n });\n\n $(\"[data-controlsidebar]\").on('click', function () {\n change_layout($(this).data('controlsidebar'));\n var slide = !AdminLTE.options.controlSidebarOptions.slide;\n AdminLTE.options.controlSidebarOptions.slide = slide;\n if (!slide)\n $('.control-sidebar').removeClass('control-sidebar-open');\n });\n\n $(\"[data-sidebarskin='toggle']\").on('click', function () {\n var sidebar = $(\".control-sidebar\");\n if (sidebar.hasClass(\"control-sidebar-dark\")) {\n sidebar.removeClass(\"control-sidebar-dark\")\n sidebar.addClass(\"control-sidebar-light\")\n } else {\n sidebar.removeClass(\"control-sidebar-light\")\n sidebar.addClass(\"control-sidebar-dark\")\n }\n });\n\n $(\"[data-enable='expandOnHover']\").on('click', function () {\n $(this).attr('disabled', true);\n AdminLTE.pushMenu.expandOnHover();\n if (!$('body').hasClass('sidebar-collapse'))\n $(\"[data-layout='sidebar-collapse']\").click();\n });\n\n // Reset options\n if ($('body').hasClass('fixed')) {\n $(\"[data-layout='fixed']\").attr('checked', 'checked');\n }\n if ($('body').hasClass('layout-boxed')) {\n $(\"[data-layout='layout-boxed']\").attr('checked', 'checked');\n }\n if ($('body').hasClass('sidebar-collapse')) {\n $(\"[data-layout='sidebar-collapse']\").attr('checked', 'checked');\n }\n\n }", "function _init() {\n 'use strict';\n /* Layout\n * ======\n * Fixes the layout height in case min-height fails.\n *\n * @type Object\n * @usage $.Planisto.layout.activate()\n * $.Planisto.layout.fix()\n * $.Planisto.layout.fixSidebar()\n */\n $.Planisto.layout = {\n activate: function () {\n var _this = this;\n _this.fix();\n _this.fixSidebar();\n $(window, \".wrapper\").resize(function () {\n _this.fix();\n _this.fixSidebar();\n });\n },\n fix: function () {\n //Get window height and the wrapper height\n var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();\n var window_height = $(window).height();\n var sidebar_height = $(\".sidebar\").height();\n //Set the min-height of the content and sidebar based on the\n //the height of the document.\n if ($(\"body\").hasClass(\"fixed\")) {\n $(\".content-wrapper, .right-side\").css('min-height', window_height - $('.main-footer').outerHeight());\n } else {\n var postSetWidth;\n if (window_height >= sidebar_height) {\n $(\".content-wrapper, .right-side\").css('min-height', window_height - neg);\n postSetWidth = window_height - neg;\n } else {\n $(\".content-wrapper, .right-side\").css('min-height', sidebar_height);\n postSetWidth = sidebar_height;\n }\n\n //Fix for the control sidebar height\n var controlSidebar = $($.Planisto.options.controlSidebarOptions.selector);\n if (typeof controlSidebar !== \"undefined\") {\n if (controlSidebar.height() > postSetWidth)\n $(\".content-wrapper, .right-side\").css('min-height', controlSidebar.height());\n }\n\n }\n },\n fixSidebar: function () {\n //Make sure the body tag has the .fixed class\n if (!$(\"body\").hasClass(\"fixed\")) {\n if (typeof $.fn.slimScroll != 'undefined') {\n $(\".sidebar\").slimScroll({destroy: true}).height(\"auto\");\n }\n return;\n } else if (typeof $.fn.slimScroll == 'undefined' && window.console) {\n window.console.error(\"Error: the fixed layout requires the slimscroll plugin!\");\n }\n //Enable slimscroll for fixed layout\n if ($.Planisto.options.sidebarSlimScroll) {\n if (typeof $.fn.slimScroll != 'undefined') {\n //Destroy if it exists\n $(\".sidebar\").slimScroll({destroy: true}).height(\"auto\");\n //Add slimscroll\n $(\".sidebar\").slimscroll({\n height: ($(window).height() - $(\".main-header\").height()) + \"px\",\n color: \"rgba(0,0,0,0.2)\",\n size: \"3px\"\n });\n }\n }\n }\n };\n\n /* PushMenu()\n * ==========\n * Adds the push menu functionality to the sidebar.\n *\n * @type Function\n * @usage: $.Planisto.pushMenu(\"[data-toggle='offcanvas']\")\n */\n $.Planisto.pushMenu = {\n activate: function (toggleBtn) {\n //Get the screen sizes\n var screenSizes = $.Planisto.options.screenSizes;\n\n //Enable sidebar toggle\n $(toggleBtn).on('click', function (e) {\n e.preventDefault();\n\n //Enable sidebar push menu\n if ($(window).width() > (screenSizes.sm - 1)) {\n if ($(\"body\").hasClass('sidebar-collapse')) {\n $(\"body\").removeClass('sidebar-collapse').trigger('expanded.pushMenu');\n } else {\n $(\"body\").addClass('sidebar-collapse').trigger('collapsed.pushMenu');\n }\n }\n //Handle sidebar push menu for small screens\n else {\n if ($(\"body\").hasClass('sidebar-open')) {\n $(\"body\").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');\n } else {\n $(\"body\").addClass('sidebar-open').trigger('expanded.pushMenu');\n }\n }\n });\n\n $(\".content-wrapper\").click(function () {\n //Enable hide menu when clicking on the content-wrapper on small screens\n if ($(window).width() <= (screenSizes.sm - 1) && $(\"body\").hasClass(\"sidebar-open\")) {\n $(\"body\").removeClass('sidebar-open');\n }\n });\n\n //Enable expand on hover for sidebar mini\n if ($.Planisto.options.sidebarExpandOnHover\n || ($('body').hasClass('fixed')\n && $('body').hasClass('sidebar-mini'))) {\n this.expandOnHover();\n }\n },\n expandOnHover: function () {\n var _this = this;\n var screenWidth = $.Planisto.options.screenSizes.sm - 1;\n //Expand sidebar on hover\n $('.main-sidebar').hover(function () {\n if ($('body').hasClass('sidebar-mini')\n && $(\"body\").hasClass('sidebar-collapse')\n && $(window).width() > screenWidth) {\n _this.expand();\n }\n }, function () {\n if ($('body').hasClass('sidebar-mini')\n && $('body').hasClass('sidebar-expanded-on-hover')\n && $(window).width() > screenWidth) {\n _this.collapse();\n }\n });\n },\n expand: function () {\n $(\"body\").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');\n },\n collapse: function () {\n if ($('body').hasClass('sidebar-expanded-on-hover')) {\n $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');\n }\n }\n };\n\n /* Tree()\n * ======\n * Converts the sidebar into a multilevel\n * tree view menu.\n *\n * @type Function\n * @Usage: $.Planisto.tree('.sidebar')\n */\n $.Planisto.tree = function (menu) {\n var _this = this;\n var animationSpeed = $.Planisto.options.animationSpeed;\n $(document).on('click', menu + ' li a', function (e) {\n //Get the clicked link and the next element\n var $this = $(this);\n var checkElement = $this.next();\n\n //Check if the next element is a menu and is visible\n if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) {\n //Close the menu\n checkElement.slideUp(animationSpeed, function () {\n checkElement.removeClass('menu-open');\n //Fix the layout in case the sidebar stretches over the height of the window\n //_this.layout.fix();\n });\n checkElement.parent(\"li\").removeClass(\"active\");\n }\n //If the menu is not visible\n else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {\n //Get the parent menu\n var parent = $this.parents('ul').first();\n //Close all open menus within the parent\n var ul = parent.find('ul:visible').slideUp(animationSpeed);\n //Remove the menu-open class from the parent\n ul.removeClass('menu-open');\n //Get the parent li\n var parent_li = $this.parent(\"li\");\n\n //Open the target menu and add the menu-open class\n checkElement.slideDown(animationSpeed, function () {\n //Add the class active to the parent li\n checkElement.addClass('menu-open');\n parent.find('li.active').removeClass('active');\n parent_li.addClass('active');\n //Fix the layout in case the sidebar stretches over the height of the window\n _this.layout.fix();\n });\n }\n //if this isn't a link, prevent the page from being redirected\n if (checkElement.is('.treeview-menu')) {\n e.preventDefault();\n }\n });\n };\n\n /* ControlSidebar\n * ==============\n * Adds functionality to the right sidebar\n *\n * @type Object\n * @usage $.Planisto.controlSidebar.activate(options)\n */\n $.Planisto.controlSidebar = {\n //instantiate the object\n activate: function () {\n //Get the object\n var _this = this;\n //Update options\n var o = $.Planisto.options.controlSidebarOptions;\n //Get the sidebar\n var sidebar = $(o.selector);\n //The toggle button\n var btn = $(o.toggleBtnSelector);\n\n //Listen to the click event\n btn.on('click', function (e) {\n e.preventDefault();\n //If the sidebar is not open\n if (!sidebar.hasClass('control-sidebar-open')\n && !$('body').hasClass('control-sidebar-open')) {\n //Open the sidebar\n _this.open(sidebar, o.slide);\n } else {\n _this.close(sidebar, o.slide);\n }\n });\n\n //If the body has a boxed layout, fix the sidebar bg position\n var bg = $(\".control-sidebar-bg\");\n _this._fix(bg);\n\n //If the body has a fixed layout, make the control sidebar fixed\n if ($('body').hasClass('fixed')) {\n _this._fixForFixed(sidebar);\n } else {\n //If the content height is less than the sidebar's height, force max height\n if ($('.content-wrapper, .right-side').height() < sidebar.height()) {\n _this._fixForContent(sidebar);\n }\n }\n },\n //Open the control sidebar\n open: function (sidebar, slide) {\n //Slide over content\n if (slide) {\n sidebar.addClass('control-sidebar-open');\n } else {\n //Push the content by adding the open class to the body instead\n //of the sidebar itself\n $('body').addClass('control-sidebar-open');\n }\n },\n //Close the control sidebar\n close: function (sidebar, slide) {\n if (slide) {\n sidebar.removeClass('control-sidebar-open');\n } else {\n $('body').removeClass('control-sidebar-open');\n }\n },\n _fix: function (sidebar) {\n var _this = this;\n if ($(\"body\").hasClass('layout-boxed')) {\n sidebar.css('position', 'absolute');\n sidebar.height($(\".wrapper\").height());\n $(window).resize(function () {\n _this._fix(sidebar);\n });\n } else {\n sidebar.css({\n 'position': 'fixed',\n 'height': 'auto'\n });\n }\n },\n _fixForFixed: function (sidebar) {\n sidebar.css({\n 'position': 'fixed',\n 'max-height': '100%',\n 'overflow': 'auto',\n 'padding-bottom': '50px'\n });\n },\n _fixForContent: function (sidebar) {\n $(\".content-wrapper, .right-side\").css('min-height', sidebar.height());\n }\n };\n\n /* BoxWidget\n * =========\n * BoxWidget is a plugin to handle collapsing and\n * removing boxes from the screen.\n *\n * @type Object\n * @usage $.Planisto.boxWidget.activate()\n * Set all your options in the main $.Planisto.options object\n */\n $.Planisto.boxWidget = {\n selectors: $.Planisto.options.boxWidgetOptions.boxWidgetSelectors,\n icons: $.Planisto.options.boxWidgetOptions.boxWidgetIcons,\n animationSpeed: $.Planisto.options.animationSpeed,\n activate: function (_box) {\n var _this = this;\n if (!_box) {\n _box = document; // activate all boxes per default\n }\n //Listen for collapse event triggers\n $(_box).on('click', _this.selectors.collapse, function (e) {\n e.preventDefault();\n _this.collapse($(this));\n });\n\n //Listen for remove event triggers\n $(_box).on('click', _this.selectors.remove, function (e) {\n e.preventDefault();\n _this.remove($(this));\n });\n },\n collapse: function (element) {\n var _this = this;\n //Find the box parent\n var box = element.parents(\".box\").first();\n //Find the body and the footer\n var box_content = box.find(\"> .box-body, > .box-footer, > form >.box-body, > form > .box-footer\");\n if (!box.hasClass(\"collapsed-box\")) {\n //Convert minus into plus\n element.children(\":first\")\n .removeClass(_this.icons.collapse)\n .addClass(_this.icons.open);\n //Hide the content\n box_content.slideUp(_this.animationSpeed, function () {\n box.addClass(\"collapsed-box\");\n });\n } else {\n //Convert plus into minus\n element.children(\":first\")\n .removeClass(_this.icons.open)\n .addClass(_this.icons.collapse);\n //Show the content\n box_content.slideDown(_this.animationSpeed, function () {\n box.removeClass(\"collapsed-box\");\n });\n }\n },\n remove: function (element) {\n //Find the box parent\n var box = element.parents(\".box\").first();\n box.slideUp(this.animationSpeed);\n }\n };\n}", "function folder_content(){\n\n\t$.ajax({\n\t\t type: \"POST\",\n\t\t url: \"website_code/php/folderproperties/folder_content.php\",\n\t\t data: {folder_id: String(window.name).substr(0,String(window.name).indexOf(\"_\"))},\n\t})\n\t.done(function(response){\n\t\ttab_stateChanged(response, 'panelContent');\n\t})\n\n}", "function showSidebar() {\n var ui = HtmlService.createHtmlOutputFromFile('index')\n .setTitle('UNC MTC Simplifier');\n DocumentApp.getUi().showSidebar(ui);\n}", "function updateBodyChecklist(data){\n // Create new div to house nested checklist drodown menu\n var div = document.createElement('div');\n div.id = 'new-content1';\n\n // Replace existing checklist dropdown with new div\n document.getElementById(\"mySidebar1\").replaceChild(div, document.getElementById(\"content1\"));\n div.id = 'content1'; // important\n document.getElementById(\"content1\").setAttribute(\"class\", \"content1\");\n\n // Mapping of planet bodies and their natural satellites\n // i.e. categories[\"mars\"] = [\"deimos\", \"phobos\"]\n var categories = {\n \"sun\" : new Set(),\n \"mercury\" : new Set(),\n \"venus\" : new Set(),\n \"earth\" : new Set(),\n \"mars\" : new Set(),\n \"jupiter\" : new Set(),\n \"saturn\" : new Set(),\n \"uranus\" : new Set(),\n \"neptune\" : new Set(),\n \"pluto\" : new Set(),\n \"spacecraft\": new Set(),\n \"asteroid\" : new Set(),\n \"comet\" : new Set(),\n \"misc\" : new Set(),\n };\n\n // Iterate over API results in order to populate the above mapping\n for(let index in data){\n categories[data[index][\"category\"]].add(data[index][\"body name\"]);\n }\n\n // Add the html for the nested checkbox list for each overarching category of body\n for(const primary_body in categories){\n div.appendChild(createSubElements(primary_body, categories[primary_body]));\n }\n \n // Set up the right-click context menu for the dropdown items\n let boxes = document.querySelectorAll(\".checkbox_and_label\");\n boxes.forEach(function(item){\n let itemID = item.id;\n // Add the event listener\n item.addEventListener(\"contextmenu\" , function(e){\n e.preventDefault();\n let contextMenu = document.getElementsByClassName(\"context-menu\")[0];\n contextMenu.style.top = e.clientY + \"px\";\n contextMenu.style.left = e.clientX + \"px\";\n contextMenu.style.display = \"block\";\n contextMenu.id = itemID + \"-context-menu\";\n contextMenu.name = itemID;\n });\n });\n\n // SET GLOBAL VARIABLE FOR BODY METADATA\n // i.e. body name, category, has radius data, has rotation data, is user-uploaded, spice id, range(s) of valid ephemeris times\n body_meta_data = data;\n}", "function loadIndexPage() {\n // Create url object to check status of current workflow\n const queryString = window.location.search;\n $('.slidecontainer').hide();\n let urlParams = new URLSearchParams(queryString);\n // Select electrodes\n if (urlParams.has(\"electrodes\")) {\n openElectrodeSelect();\n }\n // Display time series graph\n if (urlParams.has(\"display\")) {\n displayData(0);\n }\n // Display current file name\n if (urlParams.has(\"filename\")) {\n const title = document.createElement('h3')\n title.innerText = urlParams.get('filename');\n document.getElementById('title').appendChild(title);\n }\n // ???????\n if (urlParams.has(\"annotations\")) {\n displayData(0);\n }\n // Set up event listeners to step through data using arrow keys\n document.getElementById('body').addEventListener('keydown', function(event) {\n event.preventDefault();\n const key = event.code;\n if (key === \"ArrowLeft\") {\n displayData(-1);\n }\n else if (key === \"ArrowRight\") {\n displayData(1);\n }\n });\n // Set up left side bar\n // TODO: FIX HOVER TO AVOID CLOSING EARLY\n $('#sidebarItems').fadeOut();\n $('#sidebarMenu').animate({'width' : '3%'});\n $('#sidebarMenu').mouseenter(function () {\n $('#sidebarMenu').animate({'width' : '13%'});\n $('#sidebarItems').fadeIn();\n\n });\n $('#sidebarMenu').mouseleave(function () {\n $('#sidebarItems').fadeOut();\n $('#sidebarMenu').animate({'width' : '3%'});\n })\n // Hide annotation menu\n // TODO: FIX STYLING\n $('#annotation-items').hide();\n $('.annotation-menu').animate({'width': '0%', 'left': '100%'});\n //Set up time select event handler\n $('#time-select').mouseup(function () {\n $.post('/select-offset', {new_value: this.value},\n function (response) {\n displayData(0);\n });\n });\n $('#color-select').hide();\n document.getElementById('time-select').oninput = function () {\n let timelabel = new Date();\n timelabel.setTime(startTime.getTime());\n timelabel.setMilliseconds(this.value);\n $('#sliderdisplay').text(timelabel.toLocaleTimeString());\n }\n $('#filter-input-lower').change(function (event) {\n const lower = parseInt($('#filter-input-lower').val());\n const upper = parseInt($('#filter-input-upper').val());\n if (lower >= upper) {\n alert(\"The filter lower bound must be greater than the upper bound\");\n return;\n }\n const query = '/filter?lower=' + lower.toString() + '&upper=' + upper.toString();\n $.post(query, function () {\n displayData(0);\n })\n });\n $('#filter-input-upper').change(function (event) {\n const lower = parseInt($('#filter-input-lower').val());\n const upper = parseInt($('#filter-input-upper').val());\n if (lower >= upper && lower > 0 && upper > 0 ) {\n alert(\"The filter lower bound must be greater than the upper bound\");\n return;\n }\n const query = '/filter?lower=' + lower.toString() + '&upper=' + upper.toString();\n $.post(query, function () {\n displayData(0);\n })\n });\n $('#duration-input').change(function (event) {\n const val = $('#duration-input').val().toString();\n const query = '/upload_duration?new-value=' + val;\n $.post(query, function () {\n $('#time_series').empty();\n displayData(0);\n })\n });\n $('#montage').change(function (event) {\n const val = $('#montage').val().toString();\n const query = '/montage?montage=' + val;\n $.post(query, function() {\n displayData(0);\n })\n });\n $('#reference-input').hide();\n $('#ml-progress').hide();\n $('#electrode_form_container').hide();\n}", "function executeScripts() {\r\n\r\n // Accessabiluty changes for SharePoint\r\n webAccessibility($);\r\n checkAccessability();\r\n\r\n // Web part tagging - adds web-part-name attribute and wp-[web part name] to ms-webpartzone-cell\r\n webPartZoneTagging($);\r\n\r\n // Add class for edit mode to HTML tag\r\n markEditMode();\r\n\r\n //Add parallax to a band\r\n $('.rowBand').spParallax({\r\n callBack: null\t\t\t\t\t// Add additional functions to exicute after parallax is run.\r\n });\r\n $('#s4-workspace').stellar({\r\n horizontalScrolling: false, \t// Set scrolling to be in either one or both directions\r\n verticalScrolling: true, \t\t// Set scrolling to be in either one or both directions\r\n horizontalOffset: 0, \t\t\t// Set the global alignment offsets\r\n verticalOffset: 40, \t\t\t// Set the global alignment offsets\r\n responsive: false, \t\t\t\t// Refreshes parallax content on window load and resize\r\n scrollProperty: 'scroll', \t\t// Select which property is used to calculate scroll. Choose 'scroll', 'position', 'margin' or 'transform'.\r\n positionProperty: 'position' \t// Select which property is used to position elements. Choose between 'position' or 'transform'\r\n });\r\n\r\n // Social Media\r\n cdphSocialMedia();\r\n\r\n // EDIT MODE: Run scripts for edit mode\r\n if ($('.ms-SPZoneLabel, .edit-mode-panel, .ewiki-margin').length) {\r\n\r\n // Give web parts a drop down for width, to help with responsive design\r\n responsiveWebPartWidthSelectionEditMode($, {\r\n webPartName: 'Page Content,Content Editor'\t\t\t\t// List out the names of the web parts that should have this added. Coma delimited.\r\n });\r\n\r\n // Make web part tool pane fixed in view\r\n webPartToolPanePlacement($, {\r\n webPartHighlight: '#f2f5a9',\t\t// Color to highlight the web part selected.\r\n webPartContent: '#ffffff',\t\t\t// Color to highlight the content of the web part.\r\n positionLeftRight: 'right',\t\t\t// Position the tool pane either left or right.\r\n distanceLeftRight: '20px',\t\t\t// Distance from the left or right.\r\n distanceTop: '164px',\t\t\t\t// Distance from the top.\r\n heightMax: '500px',\t\t\t\t\t// Height of the tool pane as it will need to scroll.\r\n sideBar: '260px',\t\t\t\t\t// Width to give the area where the tool pane goes.\r\n webPartZIndex: 3000\t\t\t\t\t// Index to ensure the tool pane is above the page.\r\n });\r\n\r\n // Return to web part zone when adding, deleting or returning after saving\r\n webPartZoneJumpTo($);\r\n\r\n // Remove class from web part zone\r\n $('#MSOZone .ms-webpart-cell-horizontal:first-child')\r\n .removeClass('ms-webpart-cell-horizontal')\r\n .addClass('horizontal-webpart-zone');\r\n\r\n // DISPLAY MODE: Run scripts for display mode\r\n } else {\r\n\r\n // Adjusts the coloring of the row bands\r\n $('.rowBand').bandAdjustments({\r\n pageMode: '', //Indicate what mode this should executed in, view or edit. Leave blank for view and add edit for edit mode. Default: ''\r\n contentLength: 0, // Number of characters or less to hide band Default: 0\r\n webPartLength: 0, // Number of web parts or less to hide band Default: 0\r\n imageLength: 0, // Number of images or less to hide band Default: 0\r\n googleMapLength: 0, // Number of google maps or less to hide band Default: 0\r\n parallaxLength: 0 // Number of parallax web parts or less to hide band Default: 0\r\n });\r\n\r\n // Changes the horizontal web parts to be responsive\r\n responsiveWebPartZoneHorizontal($, {\r\n webPartBreakPoint: 'lg' // Bootstrap breakpoint - xs, sm, md, lg\r\n });\r\n\r\n }\r\n\r\n}", "function setup() {\n var tmp = get('skin')\n if (tmp && $.inArray(tmp, mySkins))\n changeSkin(tmp)\n\n // Add the change skin listener\n $('[data-skin]').on('click', function (e) {\n if ($(this).hasClass('knob'))\n return\n e.preventDefault()\n changeSkin($(this).data('skin'))\n })\n\n // Add the layout manager\n $('[data-layout]').on('click', function () {\n changeLayout($(this).data('layout'))\n })\n\n $('[data-controlsidebar]').on('click', function () {\n changeLayout($(this).data('controlsidebar'))\n var slide = !$controlSidebar.options.slide\n\n $controlSidebar.options.slide = slide\n if (!slide)\n $('.control-sidebar').removeClass('control-sidebar-open')\n })\n\n $('[data-sidebarskin=\"toggle\"]').on('click', function () {\n var $sidebar = $('.control-sidebar')\n if ($sidebar.hasClass('control-sidebar-dark')) {\n $sidebar.removeClass('control-sidebar-dark')\n $sidebar.addClass('control-sidebar-light')\n } else {\n $sidebar.removeClass('control-sidebar-light')\n $sidebar.addClass('control-sidebar-dark')\n }\n })\n\n $('[data-enable=\"expandOnHover\"]').on('click', function () {\n $(this).attr('disabled', true)\n $pushMenu.expandOnHover()\n if (!$('body').hasClass('sidebar-collapse'))\n $('[data-layout=\"sidebar-collapse\"]').click()\n })\n\n // Reset options\n if ($('body').hasClass('fixed')) {\n $('[data-layout=\"fixed\"]').attr('checked', 'checked')\n }\n if ($('body').hasClass('layout-boxed')) {\n $('[data-layout=\"layout-boxed\"]').attr('checked', 'checked')\n }\n if ($('body').hasClass('sidebar-collapse')) {\n $('[data-layout=\"sidebar-collapse\"]').attr('checked', 'checked')\n }\n\n }", "function openPanel(msg){\t \t \r\n var bot = $('iframe#canvas_frame', parent.document).contents().find('div.J-Zh-I.J-J5-Ji.bot'); //get the button recentily created\r\n\t\t if(bot.is('*')){\r\n\t\t\t\tbot.remove();\r\n\t\t }\r\n\t\t \r\n\t\t Panel = $('iframe#canvas_frame', parent.document).contents().find('div.aC').find('div.no');//Takes the Div where the panel will be\r\n if(Panel.is('*')){ //take a div to put the panel\r\n\t\t\r\n\t\t\t\tvar tab = $('iframe#canvas_frame', parent.document).contents().find('div.no').find('div#filterPanel');\r\n\t\t\t\tif(tab.is('*')){ //test if the panel is already present and remove it if it's truth\r\n\t\t\t\t\ttab.remove();\r\n\t\t\t\t}\r\n\t\t\t\tvar modulos;//this variable will store the modules in use for each state.\r\n\t\t\t\tswitch (state){\r\n\t\t\t\t\tcase 0: // unloged filterMenu state\r\n\t\t\t\t\t\tupdateModules();\r\n\t\t\t\t\t\tmodulos = userPswd; \r\n\t\t\t\t\t\tPanel.append(drawPanel(modulos));\r\n\t\t\t\t\t\taccess_panel_handler();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1: // loged and waiting filterMenu state\r\n\t\t\t\t\t\tmsgLog = \"Select SuggestFilter in a Label Menu\";\r\n\t\t\t\t\t\tupdateModules();\r\n\t\t\t\t\t\tmodulos = logMsg;\r\n\t\t\t\t\t\tPanel.append(drawPanel(modulos));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2: // loged and processing filterMenu state\r\n\t\t\t\t\t\tmsgLog = msg;\r\n\t\t\t\t\t\tupdateModules();\r\n\t\t\t\t\t\tmodulos = logMsg;\r\n\t\t\t\t\t\tPanel.append(drawPanel(modulos));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3: // loged and conclude filterMenu state\r\n\t\t\t\t\t\tmsgLb = msg;\r\n\t\t\t\t\t\tupdateModules();\r\n\t\t\t\t\t\tmodulos = apply;\r\n\t\t\t\t\t\tPanel.append(drawPanel(modulos));\r\n\t\t\t\t\t\tapply_panel_handler();\r\n\t\t\t\t\t\tremove_panel_handler();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4: // login ERROR filterMenu state\r\n\t\t\t\t\t\tupdateModules();\r\n\t\t\t\t\t\tmodulos = erroPswd+userPswd;\r\n\t\t\t\t\t\tPanel.append(drawPanel(modulos));\r\n\t\t\t\t\t\taccess_panel_handler();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 5: // general error filterMenu state\r\n\t\t\t\t\t\tmsgError = msg;\r\n\t\t\t\t\t\tupdateModules();\r\n\t\t\t\t\t\tmodulos = erroMsg;\r\n\t\t\t\t\t\tPanel.append(drawPanel(modulos));\r\n\t\t\t\t\t\treturn_panel_handler();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tclose_panel_handler();\r\n\r\n\t\t } else{GM_log(\"Div for the panel was not found\");} \r\n\t\t}", "function main(){\n // 1\n changeTitle('index.html', 'Webprogramming (LIX019P05) - Index');\n changeTitle('second.html', 'Webprogramming (LIX019P05) - Second');\n\n // 2\n const mainCol = document.getElementsByClassName('col-md-12');\n const newArticleHeader = 'This is my second article';\n const newArticleText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In eget eros ultrices, dapibus lacus ultrices, ultrices tortor. Nam tincidunt blandit neque, at ornare sapien ultricies ut. Integer eget ultricies velit. Cras eu tellus ex. Integer bibendum nisi neque, sed auctor odio blandit sit amet. Aenean augue tellus, tincidunt vel commodo bibendum, rutrum nec augue. Donec pulvinar sem in purus congue sodales. Nam magna urna, maximus ut eros vel, rutrum semper sem. Duis a efficitur mauris. Nunc a aliquam nisi, vel iaculis justo. Donec lacus nulla, sollicitudin vitae lectus vel, tempus vestibulum ipsum. In dignissim consequat pellentesque. Pellentesque eget eleifend velit. Aenean aliquam auctor nibh vitae tristique. Nulla facilisi.';\n addArticle(mainCol, newArticleHeader, newArticleText, 'index.html');\n\n // 3\n const link = changeLink();\n\n // 4\n linkBlank(link);\n\n // 5\n redMaker('nav-link');\n\n // 6\n // insertTable();\n\n // 7\n addSidebar();\n}", "function sidebar() {\n\tif (!hasClass(document.getElementById('main'), 'nosidebar')) {\n\t\tvar c = document.getElementById('content').getElementsByTagName('div')[0];\n\t\tif (!hasClass(c, 'contextual')) {\n\t\t\t$(document.getElementById('content')).insert({top: '<div class=\"contextual\"></div>'});\n\t\t\tc = document.getElementById('content').getElementsByTagName('div')[0];\n\t\t}\n\t\tvar m = $(document.createElement('a'));\n\t\tm.href = '#sidebar';\n\t\tm.className = 'icon icon-meta';\n\t\tm.innerText = 'Meta';\n\t\tc.appendChild(m);\n\t\tmoveNode('sidebar', 'main');\n\t}\n}", "function mainLoaded() {\n if (typeof(executeOnContentLoad) == \"function\") {\n if (contentLoadDestination && location.hash != contentLoadDestination) return;//wait til we are on the correct page\n var fn = executeOnContentLoad;\n executeOnContentLoad = null;\n contentLoadDestination = null;\n fn();\n }\n }", "function updatePanel() {\n // Variables\n var data = attributeData;\n var sTempMeters = \"\";\n var iTempMeters = 0;\n var sLightMeters = \"\";\n var iLightMeters = 0;\n var sOnOffers = \"<div class='section'>\";\n var iOnOffers = 0;\n var sDimmers = \"\";\n var sIrColors = \"\";\n var sColorController = \"\";\n var sDoorWindowSensor = \"\";\n $(\"#warning\").empty();\n $(\"#warnings\").hide();\n var goforrefreshnexttime = false;\n // empty all the content\n $(\"#temps\").empty();\n $(\"#lums\").empty();\n $(\"#onoffs\").empty();\n $(\"#doorWindowSensor\").empty();\n\n sRes = true;\n\n // Adding content\n $.each(data, function (i, obj) {\n\n sRes = true;\n try {\n sRoom = \"\";\n try {\n sRoom = obj.clusterEndpoint.room;\n } catch (err) {\n sRoom = 0;\n }\n\n if (isRoomToBeShown(sRoom)) {\n var sRoomName = getRoomNameFromId(sRoom);\n\n // Adding the ir sensor (remote controller)\n if (obj.clusterEndpoint.name.toLowerCase().indexOf(\"infra\") != -1) {\n sColorController += \"<div id='colorWheel'></div>\";\n sIrColors += addRemoteController(obj.uuid);\n }\n\n else if ((obj.device.name.toLowerCase().indexOf(\"water\") != -1) || (obj.device.name.toLowerCase().indexOf(\"flood\") != -1)) {\n var sValue = obj.value.value;\n var sAgo = getReadingAgo(obj.value.timestamp);\n var sName = obj.clusterEndpoint.name;\n var sGuide = obj.clusterEndpoint.description;\n if (sGuide.indexOf(\"guide:\") != -1) {\n // If there is a guide, show it.\n sGuide = sGuide.replace(\"guide:\", \"\");\n } else {\n sGuide = \"\";\n }\n\n var sHtml = \"<p id='\" + obj.uuid + \"' class='leak'>\" + sName + \" \" + sValue + \" \" + sAgo + \"</p>\";\n if (showSensors) {\n sLightMeters += addOrChangeControl(obj.uuid, sHtml, sRoomName);\n }\n\n if ((obj.value.value === true) || (obj.value.value) === \"true\") {\n // There is leak, so show the warning\n issueWarning(sName, sGuide);\n }\n } else if ((obj.clusterEndpoint.name.toLowerCase().indexOf(\"off\") != -1) || (obj.clusterEndpoint.name.toLowerCase().indexOf(\"switch\") != -1)) {\n sOnOffers += addOrChangeOnOffControl(obj.uuid, obj.endpoint.name, obj.value.value, sRoomName, obj.device.uuid);\n iOnOffers++;\n if (iOnOffers >= switchcolumnheight) {\n sOnOffers += \"</div><div class='section'>\";\n iOnOffers = 0;\n }\n } else if (obj.clusterEndpoint.name.toLowerCase().indexOf(\"wall\") != -1) {\n sOnOffers += addOrChangeOnOffControl(obj.uuid, obj.endpoint.name, obj.value.value, sRoomName, obj.device.uuid);\n iOnOffers++;\n\n if (iOnOffers >= switchcolumnheight) {\n sOnOffers += \"</div><div class='section'>\";\n iOnOffers = 0;\n }\n\n } else if (obj.clusterEndpoint.name.toLowerCase().indexOf(\"dimmer\") != -1) {\n sDimmers += addOrChangeDimmerControl(obj.uuid, obj.endpoint.name, obj.value.value, sRoomName);\n } else if (obj.uiType.endpointType.toLowerCase().indexOf(\"temp\") != -1) {\n var sValue = getTempAdjusted(obj.value.value);\n var sAgo = getReadingAgo(obj.value.timestamp);\n var sUnit = obj.config.unit;\n var sName = obj.endpoint.name;\n var batteryLevel = getBatteryLevel(obj.device.uuid);\n\n var sHtml = \"<div id='\" + obj.uuid + \"' class='tempholder'><div class='batteryIconHolder'>\" + getBatteryStatus(batteryLevel, sName) + \"</div><div class='tempfigure'><font color='\" + getTempColor(sValue) + \"' size='40px'>\" + sValue + \" \" + sUnit + \"</font></div><div class='agotext'>\" + sName + \" \" + sAgo + \"</div></div>\";\n\n sTempMeters += addOrChangeControl(obj.uuid, sHtml, sRoomName, batteryLevel);\n\n\n } else if (showSensors && (obj.uiType.endpointType.toLowerCase().indexOf(\"light\") != -1)) {\n var sValue = getTempAdjusted(obj.value.value);\n var sAgo = getReadingAgo(obj.value.timestamp);\n var sUnit = obj.config.unit;\n var sName = obj.endpoint.name;\n\n var sHtml = \"<p id='\" + obj.uuid + \"' class='light'>\" + sName + \" \" + sValue + \" \" + sUnit + \" \" + sAgo + \"</p>\";\n sLightMeters += addOrChangeControl(obj.uuid, sHtml, sRoomName);\n } else if (obj.clusterEndpoint.name.toLowerCase().indexOf(\"door\") != -1) {\n\n var sDoorSensorImage = \"\";\n if (obj.value.value === \"true\") {\n // It's true, so door/window is open. Add the door open image\n sDoorSensorImage = \"<img class='doorWindowImg' src='images/dooropen.png'/>\";\n } else {\n // it's false, so it's closed. Add the door closed image.\n sDoorSensorImage = \"<img class='doorWindowImg' src='images/doorclosed.png'/>\";\n }\n\n\n sHtml = \"<div id=\" + obj.uuid + \" class='doorWindowDiv'><div>\" + obj.endpoint.name + \"</div>\" + sDoorSensorImage + \"</div>\";\n sDoorWindowSensor += addOrChangeControl(obj.uuid, sHtml, sRoomName);\n\n }\n\n } else {\n $(\"#\" + obj.uuid).remove();\n }\n\n\n } catch (err) {\n\n }\n\n\n });\n\n // Appending controllers\n $(\"#temps\").append(sTempMeters);\n $(\"#lums\").append(sLightMeters);\n $(\"#onoffs\").append(sOnOffers + \"</div>\" + sDimmers);\n $(\"#irContainer\").append(sIrColors);\n $(\"#colorWheelDiv\").append(sColorController);\n $(\"#doorWindowSensor\").append(sDoorWindowSensor);\n if (!showSensors) {\n $(\"#sensorcolumn\").hide();\n } else {\n $(\"#sensorcolumn\").show();\n }\n\n\n updating = false;\n\n return sRes;\n}", "onClickedSidePanelBtn() {\n console.log(\"Clicked Side Panel Button!!!\")\n Base._iSDK.Global.addSidebarContentPanel({\n el: createDOM(\"<div>asdfasdfasdfa</div>\"),\n title: \"sdfasdfasd\",\n iconUrl: SIDE_PANEL_BTN_IC\n })\n }", "function display_sidebar() {\n\n data = [\"Deployments\", \"Images\", \"Sites\", \"Help\", \"Logout\"];\n d3.select(\".links\")\n .append(\"div\")\n .selectAll(\"div\")\n .data(data)\n .enter().append(\"p\")\n .text(function(d) { return d; })\n .on(\"mouseover\", function() {\n this.style.textDecoration=\"underline\";\n this.style.background=\"#ECECEC\"\n } )\n .on(\"mouseout\", function() {\n this.style.textDecoration=\"none\";\n this.style.background=\"white\";\n } )\n .on(\"click\", function(d) {\n var href = window.location.href;\n if (d == \"Deployments\") {\n window.location = href.replace(/profile\\/.*$/, \"profile/\");\n } else if (d == \"Images\") {\n window.location = href.replace(/profile\\/.*$/, \"profile/images/\");\n } else if (d == \"Sites\") {\n window.location = href.replace(/profile\\/.*$/, \"profile/sites/\");\n } else if (d == \"Help\") {\n window.location = href.replace(/profile\\/.*$/, \"profile/help/\");\n } else if (d == \"Logout\") {\n window.location = href.replace(/profile\\/.*$/, \"profile/logout/\");\n }\n });\n\n}", "function main() {\r\n initFlags();\r\n fixMarkup();\r\n changeLayout();\r\n initConfiguration();\r\n}", "function main() {\n window.addEventListener('load', onBodyLoad)\n\n NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach\n\n useCompanion = (location.href.indexOf('?companion') != -1) ||\n (location.href.indexOf('&companion') != -1)\n useLocalServer = (location.href.indexOf('?local') != -1) ||\n (location.href.indexOf('&local') != -1)\n\n slideEls = document.querySelectorAll('.presentation > div')\n}", "function main() { //your widget code goes here\n\n jQuery(document).ready(function ($) {\n\n var socket = io('http://0.0.0.0:3000');\n socket.on('msg', function(msg){\n console.log('msg: ' + JSON.stringify(msg));\n if (msg.pollId) {\n const streamDivId = 'streamDivId' + msg.pollId;\n //const streamDivId = 'streamDivId' + 1;\n console.log('streamDivId: ' + streamDivId);\n $(\"#\"+streamDivId).html(JSON.stringify(msg));\n setTimeout(function() {\n $(\"#\"+streamDivId).html('...');\n }, 3000);\n }\n });\n\n var pollCache = {};\n var pollResultsCache = {};\n\n function scrapePolls() {\n var polls = {};\n $( \".survio_poll\" ).each(function() {\n var id = $(this).attr('id');\n polls[id] = { id: id };\n //console.log($(this).attr('id'))\n });\n return polls;\n }\n\n function getPageInfo() {\n var pageInfo = {};\n pageInfo.pathname = window.location.pathname; // Path only\n pageInfo.url = window.location.href; // Full URL\n return pageInfo;\n }\n\n function stale(timestamp, timeout) {\n var to = timeout || 5;\n return (Date.now() - timestamp) / 1000 > to;\n }\n\n function getPollById(id, callback) {\n\n if (pollCache[id] && !stale(pollCache[id].lastUpdated)) {\n\n console.log('Getting Cached poll ' + id);\n callback(null, pollCache[id].poll);\n\n } else {\n console.log('Getting Server poll ' + id);\n $.ajax({\n url: 'http://127.0.0.1:3000/api/test/polls/' + id,\n success: function(data) {\n var poll = data.data;\n pollCache[id] = {\n lastUpdated: Date.now(),\n poll: poll\n };\n callback(null, poll)\n }\n })\n .fail(function(err) { callback(err); })\n\n }\n\n }\n\n function getPollResultsById(id, callback) {\n\n if (pollResultsCache[id] && !stale(pollResultsCache[id].lastUpdated)) {\n\n console.log('Getting Cached poll ' + id);\n callback(null, pollResultsCache[id].poll);\n\n } else {\n console.log('Getting Server poll ' + id);\n $.ajax({\n url: 'http://127.0.0.1:3000/api/test/polls/' + id + '/results',\n success: function(data) {\n var poll = data.data;\n pollResultsCache[id] = {\n lastUpdated: Date.now(),\n poll: poll\n };\n callback(null, poll)\n }\n })\n .fail(function(err) { callback(err); })\n\n }\n\n }\n\n function submitVote(pollId, userId, data, callback) {\n\n $.ajax({\n type: \"POST\",\n url: 'http://127.0.0.1:3000/api/test/polls/' + pollId + '/vote',\n data: JSON.stringify(data),\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n success: function(d) { callback(null, d); },\n failure: function(errMsg) { callback(errMsg, null); }\n })\n .fail(function(response) { callback(response, null); });\n\n }\n\n function addSubmitButtonListener(pollId, buttonId, divId) {\n var submitButton = document.getElementById(buttonId);\n submitButton.addEventListener('click', function() {\n console.log('Clicked ' + submitButton);\n var pageInfo = getPageInfo()\n\n var selected = $(\"#\"+divId+\" input[type='radio']:checked\");\n var selectedVal = selected.length > 0 ? selected.val() : null;\n\n if (!selectedVal) return;\n\n var userId = 'e9a6a03b-2b0f-4988-a39a-50694921e144';\n var data = {\n value: selectedVal,\n choice: 'f8d917a3-89db-49c1-863a-7762a554c588',\n user: userId,\n meta: {\n pageInfo\n }\n };\n\n submitVote(pollId, userId, data, function(err, res) {\n if (err) { return alert('Error: ' + response.responseText); }\n\n $(\"#\"+buttonId).html('Vote Submitted!');\n $(\"#\"+buttonId).prop(\"disabled\",true);\n $(\".radio-pick-\"+pollId).hide();\n })\n\n }, false);\n }\n\n function updatePollResults(id) {\n setInterval(function() {\n console.log('Updating ' + id)\n getPollResultsById(id, function(err, pollResultsObj) {\n for (var i = 0; i < pollResultsObj.choices.length; i++) {\n const p = pollResultsObj.choices[i];\n const choiceResultDivId = 'choiceResultDiv' + p.id;\n $('#' + choiceResultDivId).html(p.votes);\n }\n });\n }, 5000)\n }\n\n function createPollContainer(poll) {\n const id = poll.id;\n const pollContainerId = 'pollContainer' + id;\n const formId = 'form' + id;\n const streamDivId = 'streamDivId' + id;\n const resultsDivId = 'resultsDiv' + id;\n const optionsDivId = 'optionsDiv' + id;\n const submitButtonId = 'pollSubmit' + id;\n\n const existingPolls = []\n $( \".pollContainer\" ).each(function() {\n var id = $(this).attr('id');\n existingPolls.push(id)\n //console.log($(this).attr('id'))\n });\n\n getPollById(id, function(err, pollObj) {\n\n if (!existingPolls.includes(pollContainerId)) {\n\n //append a new form element with id mySearch to <body>\n $('#pollsContainer').append('<div class=\"pollContainer\" id=\"'+pollContainerId+'\"></div>');\n $('#' + pollContainerId).append('<h2>'+pollObj.name+'</h2>');\n $('#' + pollContainerId).append('<div class=\"streamContainer\" id=\"'+streamDivId+'\">...</div>');\n\n // Results Section\n $('#' + pollContainerId).append('<div class=\"resultsContainer\" id=\"'+resultsDivId+'\"></div>');\n $('#' + resultsDivId).html(JSON.stringify(pollObj.results));\n\n // Options Section\n $('#' + pollContainerId).append('<div class=\"optionsContainer\" id=\"'+optionsDivId+'\"></div>');\n $('#' + optionsDivId).append('<form action=\"\" id=\"'+formId+'\"></form>');\n // console.log(pollObj.choices);\n for (var i = 0; i < pollObj.choices.length; i++) {\n const p = pollObj.choices[i];\n\n const pickDivId = 'pickDiv' + p.id;\n const choiceResultDivId = 'choiceResultDiv' + p.id;\n $('#' + formId).append('<div class=\"pick\" id=\"'+pickDivId+'\"></div>');\n $('#' + pickDivId).append(p.name + ': ');\n $('#' + pickDivId).append('<div class=\"choice-result\" id=\"'+choiceResultDivId+'\">--</div>');\n }\n\n updatePollResults(id); // Async interval update of poll results\n\n }\n\n // Results Section\n console.log('Updating results')\n //$('#' + resultsDivId).html(JSON.stringify(pollObj.results.map(function(x) { var o = {}; o[x.name] = x.votes; return o; })));\n\n })\n\n }\n\n function createPollContainers(polls) {\n //$('#pollsContainer').length ? $('#pollsContainer') : $('<div id=\"pollsContainer\"></div>').appendTo('body');\n for (let i = 0; i < polls.length; i++) {\n createPollContainer({ id: polls[i] }, function(err, data) {\n //console.log(JSON.stringify(data))\n });\n }\n }\n\n $('body').on('click', function(event) {\n // console.log('Click: ' + event.target)\n //$('#pollsContainer').append('Clicked<br/>');\n })\n\n function surv() {\n console.log('Surving');\n\n var polls = scrapePolls();\n //console.log('Polls: ' + JSON.stringify(polls));\n\n var pageInfo = getPageInfo();\n //console.log('Page info: ' + JSON.stringify(pageInfo));\n\n createPollContainers([\n '11111111-1111-1111-1111-111111111111',\n '22222222-2222-2222-2222-222222222222',\n '33333333-3333-3333-3333-333333333333',\n '44444444-4444-4444-4444-444444444444'\n ]);\n }\n\n surv();\n setInterval(function () {\n surv();\n }, 3000)\n\n //example jsonp call\n //var jsonp_url = \"www.example.com/jsonpscript.js?callback=?\";\n //$.getJSON(jsonp_url, function(result) { alert(\"win\"); });\n\n //example load css\n loadCss(\"http://127.0.0.1:8887/survio-portal.css\");\n\n //example script load\n // loadScript(\"http://code.jquery.com/jquery-1.11.1.min.js\", function() { /* loaded */ });\n // loadScript(\"http://code.jquery.com/ui/1.11.1/jquery-ui.min.js\", function() { /* loaded */ });\n\n });\n\n }", "function glueMainPageData(data) {\n console.log(typeof data);\n life = data.Life;\n console.assert(life !== undefined, \"Life is undefined.\");\n resolutionUnit = data.ResolutionUnit;\n if(life.Notes == null){\n life.Notes = [];\n }\n lifeService.datifyLifeObject(life);\n console.log(\"life\");\n console.log(life);\n visibleNotes = life.Notes;\n //createMomentsFromDataAttrs(); // Done here in the beginning so only need to create Moments once (performance problems).\n updateLifeComponents();\n zoomLifeCalendar();\n refreshDragSelectObject();\n}", "function AddSidebar() \n {\n\t// Vaiable sidebar is set to a newly created HTML element\n\t// This div element is used to display the side bar\n\t// (Type: HTML element, tag: <div>) \n var sidebar = document.createElement('div');\n\t\n\t// Sidebar is given a class name so it can be later addressed to append \n\t// The required values in the element later, sidebar.className is set to \n\t// 'sidebar.className cld-sidebar' since sidebar is \n\t// Newly created it has no class name thus the result would be:\n\t// cld-sidebar\n\t// (Type: HTML class name, attribute: class = \"\") \n sidebar.className = sidebar.className + 'cld-sidebar';\n \n\t// Variable MonthList is set to a newly created HTML element\n\t// This ul element is used to add an unordered list of all the months\n\t// (Type: HTML element, tag: <ul>) \n var monthList = document.createElement('ul');\n\n\t// MonthList is given a class name so it can be later addressed to append\n // The requiered values in the element later, monthList.className is set to\n\t// 'monthList.className + cld-monthList' since monthList is\n\t// Newly created it has no class name thus the result would be:\n\t// cld-monthList \n\t// (Type: HTML class name, attribute: class = \"\") \n monthList.className = monthList.className + 'cld-monthList';\n\n\t// Looping the length of the months array - 3\n\t// The months are stored as 0 - 11 (12 values) and the return value of months.length\n\t// Is 12 - 3 = 9 so we only loop only 9 times\n\t// The greatest value reached by i = 8 since i < 9\n\t//\n\t// It is speculated that this is because the months\n\t// January and December are fixed at the starting and end respectively\n\t//\n\t// (Type: forLoop, iterations: 9)\n for ( var i = 0; i < ( months.length - 3 ); i++ )\n\t{\n // Variable x is set to a newly created HTML element\n\t // This li element will be used later to add data to the HTML page\n\t // X creates a new HTML element of li every time the loop iterates\n\t // These elements are used for various purposes later \n\t // (Type: HTML element, tag: <li>) \n var x = document.createElement('li');\n\n // X is given a class name so it can be later addressed to append\n // The requiered values in the element later, x.classname is set to\n\t // 'x.className + cld-month' since x is\n\t // Newly created it has no class name thus the result would be:\n\t // cld-month\n\t // (Type: HTML class name, attribute = class = \"\")\n x.className = x.className + 'cld-month';\n\t\t\n\t // Variable n is set to i - (4 - calendar.Selected.Month)\n\t // This value is used to prevent over flow of the months\n\t // \n\t // How or why this specific formula ? are yet to be answered\n\t //\n\t // The lowest possible value could be when i = 0 and Selected.Month = 0 (January)\n\t // 0 - (4 - 0) = - 4\n\t // The highest possible value could be when i = 9 and Selected.Month = 11 (December)\n\t // 8 - (4 - 11) = 15\n\t // (Type: integer, range: - 4 - 15)\n\n\t // Months and their over flow:\n\t //\n\t // 0 ( January ) for 4 loops\n\t // All n values ( - 4, - 3, - 2, - 1, 0, 1, 2, 3, 4 ) \n\t // Over flow months ( 8 ( September ) - 11 ( December ) )\n\t // Months without Over flow ( 0 ( January ) - 4 ( May ) ) \n\t // \n\t // 1 ( February ) for 3 loops \n\t // All n values ( - 3, - 2, - 1, 0, 1, 2, 3, 4, 5 ) \n\t // Over flow months ( 9 ( October ) - 11 ( December ) )\n\t // Months without over flow ( 0 ( January ) - 5 ( June ) ) \n\t // \n\t // 2 ( March ) for 2 loops \n\t // All values of n ( - 2, - 1, 0, 1, 2, 3, 4, 5, 6 ) \n\t // Over flow months ( 10 ( November ), 11 ( December ) )\n\t // Months without over flow ( 0 ( January ) - 6 ( July ) ) \n\t //\n\t // 3 ( April ) for 1 loop \n\t // All n values ( - 1, 0, 1, 2, 3, 4, 5, 6, 7 )\n\t // Over flow month ( 11 ( December ) )\n\t // Months without over flow ( 0 ( January ) - 7 ( August ) )\n\t // \n\t // 4 ( May ) no over flow\n\t // All n values ( 0, 1, 2, 3, 4, 5, 6, 7, 8 )\n\t // Months without over flow ( 0 ( January ) - 8 ( September ) )\n\t // \n\t // 5 ( June ) no over flow \n\t // All n values ( 1, 2, 3, 4, 5, 6, 7, 8, 9 )\n\t // Months wihtout over flow ( 1 ( February ) - 9 ( October ) )\n\t //\n\t // 6 ( July ) no over flow\n\t // All n values ( 2, 3, 4, 5, 6, 7, 8, 9, 10 )\n\t // Months without over flow ( 2 ( March ) - 11 ( November ) )\n\t //\n\t // 7 ( August ) no over flow\n // All n values ( 3, 4, 5, 6, 7, 8, 9, 10, 11 )\n\t // Months without over flow ( 3 ( April ) - 11 ( December ) )\n\t //\n\t // 8 ( September ) for 1 loop\n\t // All n values ( 4, 5, 6, 7, 8, 9, 10, 11, 12 )\n\t // Over flow month ( 0 ( January ) )\n\t // Months without over flow ( 4 ( May ) - 11 ( December ) ) \n\t // \n\t // 9 ( October ) for 2 loops\n\t // All n values ( 5, 6, 7, 8, 9, 10, 11, 12, 13 )\n\t // Over flow months ( 0 ( January ), 1 ( Febuary ) )\n\t // Months without over flow ( 5 ( June ) - 11 ( December ) )\n\t //\n\t // 10 ( November ) for 3 loops\n\t // All n values ( 6, 7, 8, 9, 10, 11, 12, 13, 14 )\n\t // Over flow months ( 0 ( January ) - 2 ( March ) )\n // Months without over flow ( 6 ( July ) - 11 ( December ) )\n\t //\n\t // 11 ( December ) for 4 loops\n\t // All n values ( 7, 8, 9, 10, 11, 12, 13, 14, 15 )\n\t // Over flow months ( 0 ( January ) - 3 ( April ) )\n\t // Months without over flow ( 7 ( August ) - 11 ( December ) ) \n var n = i - ( 4 - calendar.Selected.Month );\n\n // Account for overflowing month values\n\t // Checking if n is a negative number\n\t // A number below 0 would be out of our month range 0 - 11\n\t // Similarly a number above 11 would be out of our month range 0 - 11\n\t // Hence these values need to be fixed\n if ( n < 0 )\n\t {\n\t\t// Variable n is set to the value of 'n + 12'\n\t\t// The lowest possible value would be when n = - 4\n\t\t// - 4 + 12 = 8 (September) \n\t\t// The highest possible value would be when n = -1\n\t\t// - 1 + 12 = 11 (December)\n\t\t// Range for the over flow correction:\n\t\t// ( 8 ( September ) - 11 ( December ) ) \n\t\t// Months that will need this:\n\t\t// 0 ( January ) 4 times for ( 8 ( September ), 9 ( October ), 10 ( November ), 11 ( December ) )\n\t\t// 1 ( Febuary ) 3 time for ( 9 ( October ), 10 ( November ), 11 ( December ) )\n\t\t// 2 ( March ) 2 times for ( 10 ( November ), 11 ( December ) )\n\t\t// 3 ( April ) 1 time for ( 11 ( December ) )\n\t\t// (Type: integer, range: 8 - 11)\n n = n + 12;\n\t }\n else if ( n > 11 )\n\t {\n\t\t// Variable n is set to the value of 'n - 12'\n\t\t// The lowest possible value would be when n = 12\n\t\t// 12 - 12 = 0 (January)\n\t\t// The highest possible value would be when n = 16\n\t\t// 16 - 12 = 4 (May) \n\t\t// Month range:\n\t\t// (January - May)\n\t\t// (Type: integer, range: 0 - 4) \n n = n - 12;\n\t }\n\n\t // Add appropriate class to the HTML elements we created earlier\n\t // On every run for this loop a new li element with\n\t // The significance of i = 0 is that it only covers row 0\n\t // And sets the elements according to row 0\n if ( i == 0 ) \n\t {\n\t\t// Variable x had a class name of cld-month which is being\n\t\t// Added to here for assigning a specific function to it\n\t\t// Since x has class name of 'cld-month' the result here would be:\n\t\t// cld-month cld-rwd cld-nav\n\t\t// (Type: HTML class name, attribute: class = \"\") \n x.className = x.className + ' cld-rwd cld-nav';\n\t\t\n\t\t// Adding an event listner on x\n\t\t// The event listner executes a function when x is clicked\n\t\t// (Type: EventListner, action: click) \n x.addEventListener ( 'click', function ()\n\t\t{\n\t\t // If our calendar's Options.ModelChange is set to a function\n\t\t // We set the values that we obtain after running that function\n\t\t // As the Model of our calendar\n if ( typeof calendar.Options.ModelChange == 'function' )\n\t\t {\n\t\t\t// Calendar.Options.ModelChange() is computed and the values\n\t\t // Are set as our calendar's new Model \n\t\t calendar.Model = calendar.Options.ModelChange();\n\t\t }\n\t\t else\n\t\t {\n\t\t\t// If our calendar's Options.ModelChange is not a function\n\t\t\t// Then we set out calendar.Model to calendar.Options.ModelChange\n\t\t // In this case the same model gets set as the model for the calendar\n\t\t // Again \n\t\t\tcalendar.Model = calendar.Options.ModelChange;\n\t\t }\n\t\t\t\n\t\t // A new calendar is created with the same values as the current one\n\t\t // With the only difference in adjuster that is -1 this time\n\t\t // So when this calendar gets created it will be one month behind the\n\t\t // Current one each time \n createCalendar( calendar, element, -1 );\n\t\t});\n\n\t\t// HTML element x gets its inner text set to an Scalable Vector Graphics tag\n\t\t// This is used to make it look like the back arrow\n\t\t// (Type: HTML element, tag: <svg>) \n x.innerHTML += '<svg height=\"15\" width=\"15\" viewBox=\"0 0 100 75\" fill=\"rgba(255,255,255,0.5)\"><polyline points=\"0,75 100,75 50,0\"></polyline></svg>';\n }\n\t // This condition is executed when i equals 8\n\t // The significance of this statement is that it only\n\t // Executes for the last row ( row 8 )\n\t // And sets the elements accordingly \n else if ( i == ( months.length - 4 ) )\n\t {\n\t\t// This element is being prepared to be converted into the forward\n\t\t// Arrow button\n\t\t// HTML element x had a class name 'cld-month' which is appended here\n\t\t// With ' cld-fwd cld-nav' the class name after this would be:\n\t\t// cld-month cld-fwd cld-nav\n\t\t// (Type: HTML element, attribute: class = \"\") \n x.className = x.className + ' cld-fwd cld-nav';\n\n\t\t// Adding an EventLister on x\n\t\t// The event listner listens for a click on x\n\t\t// (Type: EventListner, action: click) \n x.addEventListener ( 'click', function ()\n\t\t{\n\t // Checking to see if our calendar's Options.ModelChange is a function \t\t\n if( typeof calendar.Options.ModelChange == 'function' )\n\t\t {\n\t\t\t// If it is a function then send the function to our\n\t\t\t// Calendar.Model \n\t\t\tcalendar.Model = calendar.Options.ModelChange();\n\t\t }\n\t\t else\n\t\t {\n\t\t\t// If not a function then set calendar.Model to\n\t\t // Whatever the Options.ModelChange was \n\t\t\tcalendar.Model = calendar.Options.ModelChange;\n\t\t }\n\n\t\t // A new Calendar is created with the same values with and\n\t\t // Exception of adjuster set to 1 which ads one to the month\n\t\t // And loads the new calendar\n createCalendar( calendar, element, 1 );\n\t\t});\n\t\t\n\t\t// The inner text of the HTML element x is set to\n\t\t// SVG to make it look like a forward arrow\n\t\t// (Type: HTML element, tag: <tag>) \n x.innerHTML += '<svg height=\"15\" width=\"15\" viewBox=\"0 0 100 75\" fill=\"rgba(255,255,255,0.5)\"><polyline points=\"0,0 100,0 50,75\"></polyline></svg>';\n }\n\t // If the value for i is ( 1, 2, 3, 4, 5, 6, 7 )\n\t // These are all the rows between that need to show dates \n else\n\t {\n\t\t// If i smaller than 4 \n if ( i < 4 )\n\t\t{\n\t // HTML element had a class name of 'cld-month'\n\t\t // Here its being appended the value after the appending will be:\n\t\t // cld-month cld-pre\n\t\t // (Type: HTML class name, attribute: class = \"\") \n\t\t x.className = x.className + ' cld-pre';\n\t\t}\n\t\t// If i is greater than 4 \n else if ( i > 4 )\n\t\t{\n\t // cld-month cld-post\t\t\n\t\t x.className = x.className + ' cld-post';\n\t\t}\n\t\t// If non of the above conditions are satisfied \n else\n\t\t{\n\t\t // cld-month cld-curr\t\n\t x.className += ' cld-curr';\n\t\t}\n\n // Prevent losing var adj value ( for whatever reason that is happening )\n ( function ()\n\t\t{\n\t\t // adj is set to i - 4\t\n var adj = ( i - 4 );\n\n\t\t // Adding event listner \t\n x.addEventListener ( 'click', function ()\n\t {\n\t\t\t//\n if ( typeof calendar.Options.ModelChange == 'function')\n\t\t\t{\n\t\t\t calendar.Model = calendar.Options.ModleChange();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t calendar.Model = calendar.Options.ModelChange;\n\t\t\t}\n createCalendar(calendar, element, adj);\n\t\t });\n\t \n\t // Setting attributes for HTML element x\n\t\t // To lower the opacity of cells that are not current\n x.setAttribute ( 'style', 'opacity:' + ( 1 - (Math.abs(adj)/4) ) );\n\t\t \n\t // The value of n is used to stuff \t\t\n x.innerHTML = x.innerHTML + months[ n ].substr( 0, 3 );\n }()); // immediate invocation of the method\n\n if ( n == 0 )\n\t {\n\t // \n var y = document.createElement('li');\n\n\t\t // \n y.className += 'cld-year';\n if(i<5)\n\t\t {\n\t\t // \n y.innerHTML += calendar.Selected.Year;\n }\n\t\t else\n\t\t {\n\t\t\t// \n y.innerHTML += calendar.Selected.Year + 1;\n }\n\n\t //\t\t\n monthList.appendChild(y);\n }\n }\n\n //\t\t\n monthList.appendChild(x);\n }\n\n //\t \n sidebar.appendChild(monthList);\n\t \n //\t \n if ( calendar.Options.NavLocation )\n {\n\t // \n document.getElementById( calendar.Options.NavLocation ).innerHTML = \"\";\n\t \n\t // \n document.getElementById( calendar.Options.NavLocation ).appendChild( sidebar );\n }\n else\n {\n\t // \n\t element.appendChild(sidebar);\n }\n }", "function refreshContent(){\n $('#gap_fluxo').load(document.URL + ' #gap_fluxo');\n $('#panel0').load(document.URL + ' #panel0');\n $('#panel1').load(document.URL + ' #panel1');\n $('#panelEspera').load(document.URL + ' #panelEspera');\n }", "function monitorScroll() {\n SidebarActions.monitorScroll()\n}", "function bindContentEvents() {\n //touch content to hide nav pane and left panel\n bindTapEvtHandler(classSelector(CONTENT_CLASS_NAME), hidePageContainers);\n }", "function createDynamicContent(html, index) {\n console.log(\"createDynamicContent in the sidebar...\");\n \n _(\".pb-dynamicArea .pb-populateValues\").innerHTML = html;\n if (html) {\n _(\".debugging-bar .pb-dynamicArea\").classList.add(\"active\");\n } else {\n _(\".debugging-bar .pb-dynamicArea\").classList.remove(\"active\");\n }\n //_(\".debugging-bar .pb-dynamicArea\").classList.toggle(\"active\");\n //console.log(_(\".pb-dynamicArea .pb-populateValues\").innerHTML);\n \n }//end createDynamicContent", "function main() {\n verb(\"BetaBoards!\")\n\n var s = style()\n\n if (isTopic()) {\n iid = getPage()\n cid = iid\n\n initEvents()\n remNextButton()\n postNums()\n floatQR()\n hideUserlists()\n\n quotePyramid(s)\n\n ignore()\n\n beepAudio()\n\n addIgnoredIds(document.querySelectorAll(\".ignored\"))\n\n var f = function(){\n pageUpdate()\n\n loop = setTimeout(f, time)\n }\n\n var bp = readify('beta-init-load', 2)\n , lp = isLastPage([0, 2, 5, 10, NaN][bp])\n\n verb(\"bp \" + bp + \", lp: \" + lp)\n\n if (lp || bp === 4) loop = setTimeout(f, time)\n\n } else if (isPage(\"post\")) {\n addPostEvent()\n\n } else if (isPage(\"msg\")) {\n try {\n addPostEvent()\n } catch(e) {\n addQuickMsgEvent()\n }\n\n } else if (isForum()) {\n hideUserlists()\n\n var f = function(){\n forumUpdate()\n\n loop = setTimeout(f, time)\n }\n\n loop = setTimeout(f, time)\n\n } else if (isHome()) {\n optionsUI()\n ignoreUI()\n\n // Hint events\n addHintEvents()\n\n }\n}", "function updateSidebarContainers(amount, category_name) {\n $('#newsContainer').empty(); // remove all previous results \n var count = 0;\n if( amount < 10 ){\n count = amount;\n }else{\n count = 10;\n }\n var sidebar = \"<div id=\\\"testSidebar\\\" style=\\\"opacity:0;\\\" class=\\\"panel-group\\\" role=\\\"tablist\\\" aria-multiselectable=\\\"true\\\">\" +\n \"<div id=\\\"testSidebar-title\\\">\" +\n \"<div style=\\\"display:inline-block;width:100%;text-align:center\\\"><h2 style=\\\"color:whitesmoke;padding-bottom:10px;\\\"><span style=\\\"color:darkgray;font-size:25px;margin: 0 15px 0 -30px\\\"class=\\\"glyphicon \" + category_icons[category_name] + \" bigger\\\" aria-hidden=\\\"true\\\"></span>Top Stories</h2></div>\" +\n \"</div>\";\n var i = 0;\n while (i < count) {\n sidebar +=\n \"<div class=\\\"panel panel-default\\\">\" + \n \"<div class=\\\"panel-heading\\\" id=\\\"heading\"+i.toString()+\"\\\" role=\\\"tab\\\" value=\\\"\"+i.toString()+\"\\\">\" + \n \"<h4 class=\\\"panel-title\\\"><a id=\\\"news\"+i.toString()+\"title\\\" role=\\\"button\\\" data-toggle=\\\"collapse\\\" data-parent=\\\"#testSidebar\\\" href=\\\"#collapse\"+i.toString()+\"\\\" aria-expanded=\\\"false\\\" aria-controls=\\\"collapse\"+i.toString()+\"\\\" style=\\\"text-decoration:none\\\"></a></h4>\" + \n \"</div>\" +\n \"<div id=\\\"collapse\"+i.toString()+\"\\\" class=\\\"panel-collapse collapse\\\" role=\\\"tabpanel\\\" aria-labelledby=\\\"heading\"+i.toString()+\"\\\">\" + \n \"<div class=\\\"panel-body\\\" id=\\\"news\"+i.toString()+\"abstract\\\"></div>\" + \n \"</div>\" + \n \"</div>\";\n i++;\n }\n sidebar += \"</div>\";\n\n $('#newsContainer').append(sidebar); // add raw html to the newsContainer\n //$('#newsContainer').html(sidebar); // add raw html to the newsContainer\n $( function() {\n $('.panel-heading').click( function() {\n setTimeout(function() {\n try {\n /* try to get category name if that was what was clicked */\n var newVal = parseInt(Cookies.get(category_name))+ 1;\n Cookies.expire(category_name);\n console.log(\"cookie value: \" + newVal);\n Cookies.set(category_name, newVal);\n } catch (e) {\n /* else ignore cookies */\n }\n selected = $('.active');\n selected_index = selected.attr('value');\n console.log(\"selected number: \" + selected_index);\n var heading = Cesium.Math.toRadians(0);\n var pitch = Cesium.Math.toRadians(-30);\n var range = 10000000; // 10000km\n viewer.zoomTo(pin[selected_index], new Cesium.HeadingPitchRange(heading, pitch, range));\n viewer.selectedEntity = undefined;\n }, 50);\n });\n });\n\n $(document).ready(function() {\n $('.panel-collapse').on('show.bs.collapse', function () {\n $(this).siblings('.panel-heading').addClass('active');\n });\n\n $('.panel-collapse').on('hide.bs.collapse', function () {\n $(this).siblings('.panel-heading').removeClass('active');\n selected_index = undefined;\n $('.twitter').hide();\n $('.youtube').hide();\n });\n\n /* function to link \"read more\" icon in news list to pop articles and highlight pins */\n $('#testSidebar').click(function () {\n console.log(\"testSidebar got clicked!\");\n $('.twitter').hide();\n $('.youtube').hide();\n\n viewer.selectedEntity = pin[selected_index];\n //console.log(\"article selected is \" + selected_index);\n });\n });\n}", "function register_event_handlers()\n {\n \n \n /* button .uib_w_3 */\n \n \n /* button #sidebar_button */\n $(document).on(\"click\", \"#sidebar_button\", function(evt)\n {\n /*global uib_sb */\n /* Other possible functions are: \n uib_sb.open_sidebar($sb)\n uib_sb.close_sidebar($sb)\n uib_sb.toggle_sidebar($sb)\n uib_sb.close_all_sidebars()\n See js/sidebar.js for the full sidebar API */\n \n uib_sb.toggle_sidebar($(\"#sidebar\")); \n });\n \n /* button #sidebar_close */\n $(document).on(\"click\", \"#sidebar_close\", function(evt)\n {\n /*global uib_sb */\n /* Other possible functions are: \n uib_sb.open_sidebar($sb)\n uib_sb.close_sidebar($sb)\n uib_sb.toggle_sidebar($sb)\n uib_sb.close_all_sidebars()\n See js/sidebar.js for the full sidebar API */\n \n uib_sb.toggle_sidebar($(\"#sidebar\")); \n });\n \n /* button #scene2_sidebar_button */\n $(document).on(\"click\", \"#scene2_sidebar_button\", function(evt)\n {\n /*global uib_sb */\n /* Other possible functions are: \n uib_sb.open_sidebar($sb)\n uib_sb.close_sidebar($sb)\n uib_sb.toggle_sidebar($sb)\n uib_sb.close_all_sidebars()\n See js/sidebar.js for the full sidebar API */\n \n uib_sb.toggle_sidebar($(\"#scene2_sidebar\")); \n });\n \n /* button #scene2_sidebar_close */\n $(document).on(\"click\", \"#scene2_sidebar_close\", function(evt)\n {\n /*global uib_sb */\n /* Other possible functions are: \n uib_sb.open_sidebar($sb)\n uib_sb.close_sidebar($sb)\n uib_sb.toggle_sidebar($sb)\n uib_sb.close_all_sidebars()\n See js/sidebar.js for the full sidebar API */\n \n uib_sb.toggle_sidebar($(\"#scene2_sidebar\")); \n });\n \n /* button #transition_cont */\n \n \n /* button #scene_2_sidebar */\n $(document).on(\"click\", \"#scene_2_sidebar\", function(evt)\n {\n audio_pauser(2); \n /*global activate_subpage */\n activate_subpage(\"#scene_1_transition\"); \n });\n \n /* button #scene_1_sidebar */\n \n \n /* button #transition_cont */\n $(document).on(\"click\", \"#transition_cont\", function(evt)\n {\n /*global activate_subpage */\n activate_subpage(\"#scene_2_sub\");\n //init the audio element\n var scene2_audio = document.getElementById(\"s2_audio\");\n var supp = scene2_audio.canPlayType(\"audio/mpeg\");\n var supp0 = scene2_audio.canPlayType(\"audio/wav\");\n if(supp === \"\"){\n if(supp0 === \"\"){\n scene2_audio.src=\"media/scnen2/audio/001.ogg\";\n }else{\n scene2_audio.src=\"media/scene2/audio/001.wav\";\n }\n } else {\n scene2_audio.src=\"media/scene2/audio/001.mp3\";\n }\n \n \n var bgm2 = document.getElementById(\"bgm2\");\n supp = bgm2.canPlayType(\"audio/mpeg\");\n supp0 = bgm2.canPlayType(\"audio/wav\");\n if(supp === \"\"){\n if(supp0 === \"\"){\n //ogg\n bgm2.src=\"media/scene2/bgm/001.ogg\";\n }else{\n //wav\n bgm2.src=\"media/scene2/bgm/001.wav\";\n }\n } else {\n //mp3\n bgm2.src=\"media/scene2/bgm/001.mp3\";\n }\n document.getElementById(\"bgm2\").volume = 0.3;\n document.getElementById(\"bgm2\").play();\n document.getElementById(\"s2_audio\").play();\n });\n \n /* button #scene_1_sidebar */\n \n \n /* button #button_to_s1 */\n $(document).on(\"click\", \"#button_to_s1\", function(evt)\n {\n /*global activate_subpage */\n activate_subpage(\"#page_37_52\");\n console.log(\"button to s1 pressed\");\n //init img and audio\n $('div#s1_img1').fadeIn(2000);\n document.getElementById(\"audio0\").pause();\n document.getElementById(\"audio1_1\").play();\n var bgm1_1 = document.getElementById(\"bgm1_1\");\n bgm1_1.volume = 0.3;\n document.getElementById(\"bgm1_1\").play();\n });\n \n /* button #scene_1_sidebar */\n $(document).on(\"click\", \"#scene_1_sidebar\", function(evt)\n {\n audio_pauser(1); \n /*global activate_subpage */\n activate_subpage(\"#transition_to_s1\"); \n });\n \n /* button .uib_w_3 */\n $(document).on(\"click\", \".uib_w_3\", function(evt)\n {\n /*global activate_subpage */\n activate_subpage(\"#transition_to_s1\"); \n });\n \n /* button Button */\n $(document).on(\"click\", \".uib_w_28\", function(evt)\n {\n /* Other options: .modal(\"show\") .modal(\"hide\") .modal(\"toggle\")\n See full API here: http://getbootstrap.com/javascript/#modals \n */\n \n $(\".uib_w_25\").modal(\"toggle\"); \n });\n \n }", "function setUpPage(){\r\n displayHeader();\r\n displayFooter();\r\n displaySideBar();\r\n\r\n createEventListeners();\r\n}", "function showSidebar() {\n Plugins.init();\n \n var template = HtmlService.createTemplateFromFile('sidebar/index');\n \n // Print list of icons\n template['iconList'] = JSON.stringify(IconLists);\n \n // Apply config to template\n for (var key in app.sidebarConfig) {\n template[key] = app.sidebarConfig[key];\n }\n \n // Display sidebar\n var sidebarUi = template.evaluate().setTitle('Insert icons');\n app.getUi().showSidebar(sidebarUi);\n}", "function setUpPage(){\r\n displayHeader();\r\n displayFooter();\r\n displaySideBar();\r\n createEventListeners();\r\n}", "function process(message) {\n // document.getElementById(\"test\").innerHTML=message;\n // window.castReceiverManager.setApplicationState(message);\n\n //$(\".test\").html(message);\n json = JSON.parse(message);\n \n if(json.action == \"login\") {\n var u = json.user;\n $.post( \"/api/validate\", {\n email: u.email,\n password: u.password\n }, function( data ) {\n \n }, \"json\");\n } else if (json.action == \"update\") {\n \n $(\".widget\").remove();\n $.get( \"/api/widgets\", function( data ) {\n $.each(data.docs, function(key, doc) {\n $(\".dashboard\").append(\n \"<div class='\" + doc.type + \" widget' id='\" + doc._id + \"'>\" +\n \"<div class='data type'>\" + doc.type + \"</div>\" +\n \"<div class='data type_id'>\" + doc.type_id + \"</div>\" +\n \"<div class='data rev'>\" + doc._rev + \"</div>\" +\n \"<div class='widget_content'></div>\" +\n \"</div>\"\n );\n\n if (doc.type == \"weather\") {\n var urlNow = \"http://api.openweathermap.org/data/2.5/weather?q=EastLansing,MI&appid=269cf0387e2d75cb2d84effa38819bd2\"\n var url5Day = \"http://api.openweathermap.org/data/2.5/forecast/daily?q=EastLansing,MI&count=5&appid=269cf0387e2d75cb2d84effa38819bd2\"\n\n $.getJSON(urlNow).then(function(dataNow) {\n $.getJSON(url5Day).then(function(data5Day) {\n console.log( dataNow );\n console.log( data5Day );\n\n var description = \"<![CDATA[<BR />\\n<b>Current Conditions : \"+dataNow.name+\"</b>\\n<BR />\" + Math.round((9.0 / 5.0) * (dataNow.main.temp - 273.15) + 32) + \" - \" + dataNow.weather[0].main + \"\\n<BR />\\n \\\n <BR />\\n<b>Forecast:</b>\\n\";\n\n for(var i = 0; i < 5; i++) {\n description += \"<BR /> \"+new Date(data5Day.list[i].dt * 1000).toString().split(' ')[0]+\" : \"+data5Day.list[i].weather[0].main+\" - High: \"+Math.round((9.0 / 5.0) * (data5Day.list[i].temp.max - 273.15) + 32)+\" Low: \"+Math.round((9.0 / 5.0) * (data5Day.list[i].temp.max - 273.15) + 32)+\"\\n\";\n }\n description += \"\\n \\<BR />\";\n\n\n $('.weather > .widget_content').html(\n \"<span>\" + description + \"</span>\"\n );\n });\n });\n }\n\n if (doc.type == \"news\") {\n $('.news > .widget_content').html(\n \"<span><h1>\"+newsTitle+\"</h1><BR />\"+newsDescription+\"</span>\"\n );\n }\n\n if (doc.type == \"text\" && json.text) {\n $('.text > .widget_content').html(\n \"<span>\" + json.text + \"</span>\"\n );\n }\n\n if (doc.type == \"twitter\") {\n $('.twitter > .widget_content').html(\n \"<a class=\\\"twitter-timeline\\\" data-width=\\\"220\\\" data-height=\\\"200\\\" href=\\\"https://twitter.com/Speceottar\\\">Tweets by Speceottar</a> <script async src=\\\"//platform.twitter.com/widgets.js\\\" charset=\\\"utf-8\\\"></script>\"\n );\n }\n\n if (doc.type == \"video\") {\n $('.video > .widget_content').html(\n \"<span><div id='player'></div></span>\" +\n \"<script>\" +\n \"var tag = document.createElement('script');\" +\n \"tag.src = 'https://www.youtube.com/iframe_api';\" +\n \"var firstScriptTag = document.getElementsByTagName('script')[0];\" +\n \"firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\" +\n \"var player;\"+\n \"function onYouTubeIframeAPIReady() {\"+\n \"player = new YT.Player('player', {\"+\n \"height: '200',\"+\n \"width: '300',\"+\n \"videoId: 'M7lc1UVf-VE',\"+\n \"events: {\"+\n \"'onReady': onPlayerReady,\"+\n \"'onStateChange': onPlayerStateChange\"+\n \"}\"+\n \"});\"+\n \"}\"+\n \"function onPlayerReady(event) {\"+\n \"event.target.playVideo();\"+\n \"}\"+\n \"var done = false;\"+\n \"function onPlayerStateChange(event) {\"+\n \"if (event.data == YT.PlayerState.PLAYING && !done) {\"+\n \"done = true;\"+\n \"}\"+\n \"}\"+\n \"function stopVideo() {\"+\n \"player.stopVideo();\"+\n \"}\"+\n \"</script>\"+\n \");\")\n }\n\n var widget = $(\"#\" + doc._id);\n widget.css(\"height\", ((parseFloat(doc.y2) - parseFloat(doc.y1))*100) + \"%\");\n widget.css(\"width\", ((parseFloat(doc.x2) - parseFloat(doc.x1))*100) + \"%\");\n widget.css( \"left\", (parseFloat(doc.x1)*100) + \"%\");\n widget.css( \"top\", (parseFloat(doc.y1)*100) + \"%\");\n $(\"#\" + doc._id + \" > .widget_content\").css(\"line-height\", (widget.height() - 50) + \"px\");\n });\n });\n }\n }", "function openContent() {\n $(\"#sidebar\").css(\"display\",\"block\");\n $(\"#content\").css(\"display\",\"flex\");\n $(\"#overlay\").css(\"display\",\"block\");\n}", "constructor(options) {\n super();\n /**\n * A message hook for child add/remove messages on the main area dock panel.\n */\n this._dockChildHook = (handler, msg) => {\n switch (msg.type) {\n case 'child-added':\n msg.child.addClass(ACTIVITY_CLASS);\n this._tracker.add(msg.child);\n break;\n case 'child-removed':\n msg.child.removeClass(ACTIVITY_CLASS);\n this._tracker.remove(msg.child);\n break;\n default:\n break;\n }\n return true;\n };\n this._activeChanged = new Signal(this);\n this._cachedLayout = null;\n this._currentChanged = new Signal(this);\n this._currentPath = '';\n this._currentPathChanged = new Signal(this);\n this._modeChanged = new Signal(this);\n this._isRestored = false;\n this._layoutModified = new Signal(this);\n this._layoutDebouncer = new Debouncer(() => {\n this._layoutModified.emit(undefined);\n }, 0);\n this._restored = new PromiseDelegate();\n this._tracker = new FocusTracker();\n this._mainOptionsCache = new Map();\n this._sideOptionsCache = new Map();\n this.addClass(APPLICATION_SHELL_CLASS);\n this.id = 'main';\n const trans = ((options && options.translator) || nullTranslator).load('jupyterlab');\n const headerPanel = (this._headerPanel = new BoxPanel());\n const menuHandler = (this._menuHandler = new Private.PanelHandler());\n menuHandler.panel.node.setAttribute('role', 'navigation');\n menuHandler.panel.node.setAttribute('aria-label', trans.__('main'));\n const topHandler = (this._topHandler = new Private.PanelHandler());\n topHandler.panel.node.setAttribute('role', 'banner');\n const bottomPanel = (this._bottomPanel = new BoxPanel());\n bottomPanel.node.setAttribute('role', 'contentinfo');\n const hboxPanel = new BoxPanel();\n const vsplitPanel = (this._vsplitPanel = new Private.RestorableSplitPanel());\n const dockPanel = (this._dockPanel = new DockPanelSvg());\n MessageLoop.installMessageHook(dockPanel, this._dockChildHook);\n const hsplitPanel = (this._hsplitPanel = new Private.RestorableSplitPanel());\n const downPanel = (this._downPanel = new TabPanelSvg({\n tabsMovable: true\n }));\n const leftHandler = (this._leftHandler = new Private.SideBarHandler());\n const rightHandler = (this._rightHandler = new Private.SideBarHandler());\n const rootLayout = new BoxLayout();\n headerPanel.id = 'jp-header-panel';\n menuHandler.panel.id = 'jp-menu-panel';\n topHandler.panel.id = 'jp-top-panel';\n bottomPanel.id = 'jp-bottom-panel';\n hboxPanel.id = 'jp-main-content-panel';\n vsplitPanel.id = 'jp-main-vsplit-panel';\n dockPanel.id = 'jp-main-dock-panel';\n hsplitPanel.id = 'jp-main-split-panel';\n downPanel.id = 'jp-down-stack';\n leftHandler.sideBar.addClass(SIDEBAR_CLASS);\n leftHandler.sideBar.addClass('jp-mod-left');\n leftHandler.sideBar.node.setAttribute('aria-label', trans.__('main sidebar'));\n leftHandler.sideBar.contentNode.setAttribute('aria-label', trans.__('main sidebar'));\n leftHandler.sideBar.node.setAttribute('role', 'complementary');\n leftHandler.stackedPanel.id = 'jp-left-stack';\n rightHandler.sideBar.addClass(SIDEBAR_CLASS);\n rightHandler.sideBar.addClass('jp-mod-right');\n rightHandler.sideBar.node.setAttribute('aria-label', trans.__('alternate sidebar'));\n rightHandler.sideBar.contentNode.setAttribute('aria-label', trans.__('alternate sidebar'));\n rightHandler.sideBar.node.setAttribute('role', 'complementary');\n rightHandler.stackedPanel.id = 'jp-right-stack';\n dockPanel.node.setAttribute('role', 'main');\n hboxPanel.spacing = 0;\n vsplitPanel.spacing = 1;\n dockPanel.spacing = 5;\n hsplitPanel.spacing = 1;\n headerPanel.direction = 'top-to-bottom';\n vsplitPanel.orientation = 'vertical';\n hboxPanel.direction = 'left-to-right';\n hsplitPanel.orientation = 'horizontal';\n bottomPanel.direction = 'bottom-to-top';\n SplitPanel.setStretch(leftHandler.stackedPanel, 0);\n SplitPanel.setStretch(downPanel, 0);\n SplitPanel.setStretch(dockPanel, 1);\n SplitPanel.setStretch(rightHandler.stackedPanel, 0);\n BoxPanel.setStretch(leftHandler.sideBar, 0);\n BoxPanel.setStretch(hsplitPanel, 1);\n BoxPanel.setStretch(rightHandler.sideBar, 0);\n SplitPanel.setStretch(vsplitPanel, 1);\n hsplitPanel.addWidget(leftHandler.stackedPanel);\n hsplitPanel.addWidget(dockPanel);\n hsplitPanel.addWidget(rightHandler.stackedPanel);\n vsplitPanel.addWidget(hsplitPanel);\n vsplitPanel.addWidget(downPanel);\n hboxPanel.addWidget(leftHandler.sideBar);\n hboxPanel.addWidget(vsplitPanel);\n hboxPanel.addWidget(rightHandler.sideBar);\n rootLayout.direction = 'top-to-bottom';\n rootLayout.spacing = 0; // TODO make this configurable?\n // Use relative sizing to set the width of the side panels.\n // This will still respect the min-size of children widget in the stacked\n // panel. The default sizes will be overwritten during layout restoration.\n vsplitPanel.setRelativeSizes([3, 1]);\n hsplitPanel.setRelativeSizes([1, 2.5, 1]);\n BoxLayout.setStretch(headerPanel, 0);\n BoxLayout.setStretch(menuHandler.panel, 0);\n BoxLayout.setStretch(topHandler.panel, 0);\n BoxLayout.setStretch(hboxPanel, 1);\n BoxLayout.setStretch(bottomPanel, 0);\n rootLayout.addWidget(headerPanel);\n rootLayout.addWidget(topHandler.panel);\n rootLayout.addWidget(hboxPanel);\n rootLayout.addWidget(bottomPanel);\n // initially hiding header and bottom panel when no elements inside,\n this._headerPanel.hide();\n this._bottomPanel.hide();\n this._downPanel.hide();\n this.layout = rootLayout;\n // Connect change listeners.\n this._tracker.currentChanged.connect(this._onCurrentChanged, this);\n this._tracker.activeChanged.connect(this._onActiveChanged, this);\n // Connect main layout change listener.\n this._dockPanel.layoutModified.connect(this._onLayoutModified, this);\n // Connect vsplit layout change listener\n this._vsplitPanel.updated.connect(this._onLayoutModified, this);\n // Connect down panel change listeners\n this._downPanel.currentChanged.connect(this._onLayoutModified, this);\n this._downPanel.tabBar.tabMoved.connect(this._onTabPanelChanged, this);\n this._downPanel.stackedPanel.widgetRemoved.connect(this._onTabPanelChanged, this);\n // Catch current changed events on the side handlers.\n this._leftHandler.sideBar.currentChanged.connect(this._onLayoutModified, this);\n this._rightHandler.sideBar.currentChanged.connect(this._onLayoutModified, this);\n // Catch update events on the horizontal split panel\n this._hsplitPanel.updated.connect(this._onLayoutModified, this);\n // Setup single-document-mode title bar\n const titleHandler = (this._titleHandler = new Private.TitleHandler(this));\n this.add(titleHandler, 'top', { rank: 100 });\n if (this._dockPanel.mode === 'multiple-document') {\n this._topHandler.addWidget(this._menuHandler.panel, 100);\n titleHandler.hide();\n }\n else {\n rootLayout.insertWidget(2, this._menuHandler.panel);\n }\n // Skip Links\n const skipLinkWidget = (this._skipLinkWidget = new Private.SkipLinkWidget(this));\n this.add(skipLinkWidget, 'top', { rank: 0 });\n this._skipLinkWidget.show();\n // Wire up signals to update the title panel of the simple interface mode to\n // follow the title of this.currentWidget\n this.currentChanged.connect((sender, args) => {\n let newValue = args.newValue;\n let oldValue = args.oldValue;\n // Stop watching the title of the previously current widget\n if (oldValue) {\n oldValue.title.changed.disconnect(this._updateTitlePanelTitle, this);\n }\n // Start watching the title of the new current widget\n if (newValue) {\n newValue.title.changed.connect(this._updateTitlePanelTitle, this);\n this._updateTitlePanelTitle();\n }\n if (newValue && newValue instanceof DocumentWidget) {\n newValue.context.pathChanged.connect(this._updateCurrentPath, this);\n }\n this._updateCurrentPath();\n });\n }", "function onReadyMainContainer() {\n $article = $('#article-block').find('div.article').eq(0);\n\n $('#nav-article-page').doOnce(function () {\n this.buildNav({\n content:$article\n });\n });\n\n // enable the floating nav for non-touch-enabled devices due to issue with\n // zoom and position:fixed.\n // FIXME: temp patch; needs more refinement.\n if (!$.support.touchEvents) {\n $('#nav-article-page').doOnce(function () {\n this.floatingNav({\n sections:$article.find('a[toc]').closest('div')\n });\n });\n }\n\n $('#figure-thmbs').doOnce(function () {\n this.carousel({\n access:true\n });\n });\n\n $('#article-block').find('div.btn-reveal').doOnce(function () {\n this.hoverEnhanced({\n trigger:'span.btn'\n });\n });\n\n $('.article a[href^=\"#\"]').on('click', function (e) {\n e.preventDefault();\n var href = $(this).attr('href').split('#')[1];\n var b = $('a[name=\"' + href + '\"]');\n\n window.history.pushState({}, document.title, $(this).attr('href'));\n\n $('html,body').animate({scrollTop:b.offset().top - 100}, 500, 'linear', function () {\n // see spec\n // window.location.hash = '#' + href;\n });\n });\n\n if (!$.support.touchEvents) {\n $article.doOnce(function () {\n this.scrollFrame();\n });\n }\n\n if (typeof selected_tab != \"undefined\") {\n $(\"#print-article\").css(\"display\", selected_tab == \"article\" ? \"list-item\" : \"none\");\n }\n}" ]
[ "0.60545754", "0.5989085", "0.59802514", "0.58650345", "0.58299387", "0.5683305", "0.5666823", "0.55882424", "0.55803436", "0.5557971", "0.5511649", "0.5503348", "0.54717195", "0.54550123", "0.54331017", "0.54302764", "0.5421875", "0.5413457", "0.539683", "0.5384487", "0.5365525", "0.5357512", "0.53483874", "0.5341167", "0.53108734", "0.52945596", "0.5278885", "0.5271689", "0.5264626", "0.5264389", "0.52568716", "0.5247911", "0.5247524", "0.5244865", "0.5238247", "0.520051", "0.5195833", "0.5188595", "0.518341", "0.51660985", "0.51605886", "0.51600176", "0.51574165", "0.51570255", "0.51503175", "0.51411647", "0.51326615", "0.51098627", "0.5099915", "0.50978994", "0.5089938", "0.50885653", "0.50807333", "0.50614417", "0.5051282", "0.50466573", "0.5038407", "0.5037116", "0.5036537", "0.5035086", "0.5033848", "0.50310653", "0.50310653", "0.50286996", "0.5022833", "0.5020549", "0.50139123", "0.5013111", "0.5012969", "0.50102264", "0.5005683", "0.50004834", "0.50002545", "0.49996907", "0.49989283", "0.49801463", "0.49784446", "0.49714178", "0.4970382", "0.49601653", "0.49553964", "0.4955333", "0.49528402", "0.4943275", "0.4937048", "0.49341324", "0.49336174", "0.49276534", "0.4922531", "0.49222317", "0.49196616", "0.49179703", "0.4915594", "0.49060434", "0.49058264", "0.4900826", "0.4897219", "0.48961636", "0.48954272", "0.48926046" ]
0.54516345
14
getActiveTabFor: expected argument is ID of window with focus. The module variable myWindowId is updated by handleWindowFocusChanged event handler.
function getActiveTabFor (windowId) { return new Promise (function (resolve, reject) { let promise = browser.tabs.query({ windowId: windowId, active: true }); promise.then( tabs => { resolve(tabs[0]) }, msg => { reject(new Error(`getActiveTabInWindow: ${msg}`)); } ) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getTabWindowByChromeTabId (tabId) {\n const tw = this.windowIdMap.find(w => w.findChromeTabId(tabId))\n return tw\n }", "getTabWindowByChromeId (windowId) {\n return this.windowIdMap.get(windowId)\n }", "function getActiveTabId(e) {\n\t\tvar query = { active: true, currentWindow: true };\n\t\tfunction callback(tabs) {\n\t\t\tvar tab = tabs[0];\n\t\t\te(tab);\n\t\t\treturn tabs[0];\n\t\t}\n\t\tchrome.tabs.query(query, callback);\n\t}", "function getActiveTab() {\n return browser.tabs.query({active: true, currentWindow: true});\n }", "function focusWindow(tabId, windowId, callback) {\n /**\n * Updating already focused window produces bug in Edge browser\n * https://github.com/AdguardTeam/AdguardBrowserExtension/issues/675\n */\n getActive(function (activeTabId) {\n if (tabId !== activeTabId) {\n // Focus window\n browser.windows.update(windowId, { focused: true }, function () {\n if (checkLastError(\"Update window \" + windowId)) {\n return;\n }\n callback();\n });\n }\n callback();\n });\n }", "function getActiveTab() {\n return browser.tabs.query({currentWindow: true, active: true});\n}", "function getActiveTab() {\n return browser.tabs.query({ currentWindow: true, active: true })\n}", "function onGetWindow(win)\n{\n chrome.tabs.getSelected(win.id, onGetTab); \n}", "function GetModuleTabHostTab(tabId) {\n\t\tvar _result = null;\n\t\t\n\t\tif(typeof(_ActiveModules) !== \"undefined\" && _ActiveModules != null) {\n\t\t\tfor (var key in _ActiveModules) {\n\t\t\t\tif(typeof(_ActiveModules[key]) !== \"undefined\" && _ActiveModules[key] != null && _ActiveModules[key].ActiveTabs && _ActiveModules[key].ActiveTabs != null && _ActiveModules[key].HostTabId) {\n\t\t\t\t\tfor(var i = 0; i < _ActiveModules[key].ActiveTabs.length; i++) {\n\t\t\t\t\t\tif(_ActiveModules[key].ActiveTabs[i] == tabId) {\n\t\t\t\t\t\t\t_result = _ActiveModules[key];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(_result != null)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn _result;\n\t}", "function activateTab(window_id, tab_id) {\n chrome.tabs.update(tab_id, {active: true});\n chrome.windows.update(window_id, {focused: true});\n\n}", "function getCurrentTab(cb) {\n chrome.tabs.query({\n 'active': true,\n 'windowId': chrome.windows.WINDOW_ID_CURRENT\n }, function (tabs) {\n cb(tabs[0]);\n });\n}", "function getActiveTab() {\n return lt.objs.tabs.active_tab();\n }", "function getFocusedTabId() {\n var focusedTab = ctrl.tabs[ctrl.focusIndex];\n if (!focusedTab || !focusedTab.id) {\n return null;\n }\n return 'tab-item-' + focusedTab.id;\n }", "function handleWindowFocusChanged (windowId) {\n if (windowId !== myWindowId) {\n let checkingOpenStatus = browser.sidebarAction.isOpen({ windowId });\n checkingOpenStatus.then(onGotStatus, onInvalidId);\n }\n\n function onGotStatus (result) {\n if (result) {\n myWindowId = windowId;\n runContentScripts('onFocusChanged');\n if (debug) console.log(`Focus changed to window: ${myWindowId}`);\n }\n }\n\n function onInvalidId (error) {\n if (debug) console.log(`onInvalidId: ${error}`);\n }\n}", "function findActiveTab() {\n\n //get information about this tab\n chrome.tabs.query({ active: true, status: \"complete\", lastFocusedWindow: true }, function (tabs) {\n\n //we may have more than one result if the tab has dev tools open\n tabs.forEach(function (tab) {\n\n setActiveTabIfValidUrl(tab);\n\n });\n\n });\n\n}", "async function getActiveTab() {\n\tlet tabs = await browser.tabs.query({currentWindow: true, active: true});\n\tfor (let tab of tabs) {\n\t\tif (tab.active) {\n\t\t\treturn tab;\n\t\t}\n\t}\n}", "function CurrentTab(func) {\n chrome.tabs.query({\n 'active': true,\n 'windowId': chrome.windows.WINDOW_ID_CURRENT\n },\n function (tabs) {\n if (tabs[0]) {\n func(tabs[0]);\n }\n });\n}", "function getCurrentTab () {\n return new Promise((resolve, reject) => {\n chrome.tabs.query({active: true, currentWindow: true}, tabs => {\n let tab = tabs[0];\n if (!tab || typeof tab.id === 'undefined' || (tab.url || '').startsWith('chrome://')) {\n reject('notAllowed');\n }\n resolve(tab);\n });\n });\n}", "static queryActiveTab() {\r\n return Utils.queryTab({\r\n active: true,\r\n currentWindow: true,\r\n })\r\n }", "function GetModuleHostTab(moduleId) {\n\t\tvar _result = null;\n\t\t\n\t\tif(typeof(_ActiveModules) !== \"undefined\" && _ActiveModules != null) {\n\t\t\tfor (var key in _ActiveModules) {\n\t\t\t\tif(key == moduleId && typeof(_ActiveModules[key]) !== \"undefined\" && _ActiveModules[key] != null && _ActiveModules[key].HostTabId) {\n\t\t\t\t\t_result = _ActiveModules[key].HostTabId;\n\t\t\t\t}\n\t\t\t\tif(_result != null)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn _result;\n\t}", "function getTabId(tabId) {\n let id = tabId.id;\n if (!id) {\n id = tabId;\n }\n return id;\n}", "function getCurrentTab(callback)\n\t\t{\n\t\t\tif (window.chrome && chrome.tabs)\n\t\t\t{\n\t\t\t\tchrome.tabs.query({ active: true, lastFocusedWindow: true}, function(tabs) { callback(tabs[0]); });\n\t\t\t}\n\t\t}", "function doInCurrentTab(tabCallback) {\n browser.tabs.query(\n { currentWindow: true, active: true },\n function (tabArray) {tabCallback(tabArray[0]);}\n );\n}", "function doInCurrentTab(tabCallback) {\n chrome.tabs.query(\n { currentWindow: true, active: true },\n function (tabArray) { tabCallback(tabArray[0]);}\n );\n}", "getTabIndex(id) {\n for (let i = 0; i < this._tabs.length; i++) {\n if (this._tabs[i].sessionId === id) {\n return i\n }\n }\n return -1\n }", "function activeTabChanged(activeInfo) {\n if (activeInfo) {\n var tabId = activeInfo.tabId;\n if (tabId) {\n getCurrentTabUrl();\n }\n }\n}", "function getSelectedTab(tabs) {\n const childId = window.location.hash.split(\"=\")[1];\n return tabs.find((tab) => tab.actor.includes(childId));\n}", "function updateActiveTab () {\n let gettingActiveTab = browser.tabs.query({active: true, currentWindow: true})\n gettingActiveTab.then(updateTab, onError)\n}", "syncChromeWindow (chromeWindow) {\n const prevTabWindow = this.windowIdMap.get(chromeWindow.id)\n /*\n if (!prevTabWindow) {\n log.log(\"syncChromeWindow: detected new chromeWindow: \", chromeWindow)\n }\n */\n const tabWindow = prevTabWindow ? TabWindow.updateWindow(prevTabWindow, chromeWindow) : TabWindow.makeChromeTabWindow(chromeWindow)\n const stReg = this.registerTabWindow(tabWindow)\n\n // if window has focus and is a 'normal' window, update current window id:\n const updCurrent = chromeWindow.focused && validChromeWindow(chromeWindow, true)\n const st = updCurrent ? stReg.set('currentWindowId', chromeWindow.id) : stReg\n\n if (updCurrent) {\n log.log('syncChromeWindow: updated current window to: ', chromeWindow.id)\n }\n\n return st\n }", "getCurrentTab() {\n return window.location.pathname.split('/')[2];\n }", "isActive (id) {\n console.log( this.state.selectedPanelTabId, id)\n return this.state.selectedPanelTabId;\n }", "function findTab() {\n var tabs = browser.tabs.query({\n currentWindow: true,\n active: true\n })\n return tabs;\n}", "function getCurrentTab() {\n return currentTab;\n}", "function getCurrentTab() {\n return currentTab;\n}", "function getCurrentTab() {\n return currentTab;\n}", "checkTabFocus(target) {\n const focused = document.activeElement;\n\n if (target === focused) {\n this.activateTab(target, false);\n };\n }", "get tab() {\n var index = Application.activeWindow.activeTab.index;\n return new Tab(Application.activeWindow.tabs[index]);\n }", "function getActiveTab() {\n var wrapper = document.body.querySelector(\"fs-person-page\").shadowRoot;\n var tabs = [\"fs-tree-person-details\", \"fs-tree-person-sources\"];\n for (var i in tabs) {\n if (wrapper.querySelector(tabs[i]).classList.contains(\"iron-selected\")) {\n return tabs[i];\n }\n }\n return false;\n}", "checkTabFocus(target) {\n let focused = document.activeElement;\n\n if (target === focused) {\n this.activateTab(target, false);\n }\n }", "function focusTab(tab) {\n console.log(\"focusTab(\"+ tab.windowId +\", \" + JSON.stringify(tab) + \")\");\n chrome.windows.update(tab.windowId,{focused:true}, function(window) {\n chrome.tabs.highlight({windowId:tab.windowId, tabs:tab.index});\n\n //this is no longer a new tab\n newTabs.delete(tab.id);\n });\n}", "function getCurrentTabUrl() {\n var queryInfo = {\n active: true,\n currentWindow: true\n };\n\n api.tabs.query(queryInfo, (tabs) => {\n if (tabs) {\n var tab = tabs[0];\n if (tab) {\n var url = tab.url;\n if (url) {\n currentTabUrl = url;\n }\n }\n }\n });\n}", "function getTab() {\n return new Promise(function(resolve) {\n chrome.tabs.query({\n active: true,\n currentWindow: true\n },\n function(tabs) {\n resolve(tabs[0])\n })\n })\n }", "function updateLastTab(windowId, currentTabId) {\n let winKey = genWindowLastTabKey(windowId);\n // Backup tabs are never considered\n chrome.storage.local.get('backup_id', items => {\n if (items.hasOwnProperty('backup_id') && items.backup_id === currentTabId) {\n return;\n }\n\n chrome.storage.local.get(winKey, items => {\n if (!items.hasOwnProperty(winKey)) {\n chrome.storage.local.set({\n [winKey]: {\n current: currentTabId.tabId,\n last: null\n }\n });\n return;\n }\n\n let data = items[winKey];\n data.last = data.current;\n data.current = currentTabId;\n chrome.storage.local.set({[winKey]: data});\n });\n });\n}", "async function getCurrentTab() {\n \"use strict\";\n const queryInfo = {\n active: true,\n lastFocusedWindow: true\n };\n // New Syntax\n const tabs = await new Promise(resolve => chrome.tabs.query(queryInfo, tabs => resolve(tabs)))\n var currentTab = tabs[0];\n if (currentTab === undefined) {\n throw \"ERROR: Cannot get the current tab, it is not defined!\";\n } else {\n return currentTab;\n }\n}", "function _sendMsgCurrentTab( successCallback ) {\n chrome.tabs.query( { active: true, currentWindow: true }, function( tabs ) {\n successCallback( tabs[ 0 ].id );\n });\n }", "function focusTab(tab) {\n let browserWindow = tab.ownerDocument.defaultView;\n browserWindow.focus();\n browserWindow.gBrowser.selectedTab = tab;\n}", "function getActiveTab() {\n return $('.nav.nav-tabs .active')\n }", "function tabSwitched (activeInfo) {\r\n let tabId = activeInfo.tabId;\r\n let winId = activeInfo.windowId;\r\n/*\r\n trace('-------------------------------------');\r\n trace(\"A tab was switched.\\r\\n\"\r\n\t +\"activeInfo.previousTabId: \"+activeInfo.previousTabId+\"\\r\\n\"\r\n\t +\"activeInfo.tabId: \"+activeInfo.tabId+\"\\r\\n\"\r\n\t +\"activeInfo.windowId: \"+winId+\"\\r\\n\"\r\n\t );\r\n*/\r\n browser.tabs.get(tabId)\r\n .then(\r\n\tfunction (tab) {\r\n\t let tabUrl = tab.url;\r\n\t // Verify this is a searchable url - If not, we get exception:\r\n\t // Type error for parameter query (Value must either: be a string value, or .url must match the format \"url\")\r\n\t if ((tabUrl != undefined)\r\n\t\t && (!tabUrl.startsWith(\"view-source:\"))\r\n\t\t) {\r\n\t\ttry {\r\n\t\t // Handle specific wyciwyg:// case\r\n\t\t if (tabUrl.startsWith(\"wyciwyg://\")) { // Cached URL wyciwyg://x/.... Cf. https://en.wikipedia.org/wiki/WYCIWYG\r\n\t\t\t// Find start of real URL, which is after the first \"/\" after \"wyciwyg://x\"\r\n\t\t\tlet pos = tabUrl.indexOf(\"/\", 10) + 1;\r\n\t\t\ttabUrl = tabUrl.substring(pos);\r\n\t\t }\r\n\t\t // Look for a bookmark matching the url\r\n\t\t // It seems that parameters can make the search API fail and return 0 results sometimes, so strip them out,\r\n\t\t // we will really compare on gotten results.\r\n\t\t let simpleUrl;\r\n\t\t let paramsPos = tabUrl.indexOf(\"?\");\r\n\t\t if (paramsPos >= 0) {\r\n\t\t\tsimpleUrl = tabUrl.slice(0, paramsPos);\r\n\t\t }\r\n\t\t else {\r\n\t\t\tsimpleUrl = tabUrl;\r\n\t\t }\r\n//\t\t browser.bookmarks.search({url: tabUrl})\r\n\t\t browser.bookmarks.search(decodeURI(simpleUrl)) // Search workaround to avoid exceptions on about:, file: ... URLs, cf. https://bugzilla.mozilla.org/show_bug.cgi?id=1352835\r\n\t\t .then(\r\n\t\t\tfunction (a_BTN) { // An array of BookmarkTreeNode\r\n\t\t\t let len = a_BTN.length;\r\n//console.log(\"A tab was switched to 2 - tabUrl: \"+tabUrl);\r\n//console.log(\"Results: \"+len);\r\n\t\t\t if (len > 0) { // This could be a bookmarked tab\r\n\t\t\t\t// If there is a favicon and we are collecting them, refresh all coorresponding BookmarkNodes with it\r\n\t\t\t\tlet tabFaviconUrl = tab.favIconUrl;\r\n\t\t\t\tlet is_refreshFav = !options.disableFavicons\t\t // Ignore if options.disableFavicons is set\r\n/*\t\t\t\t\t\t\t\t\t&& !options.pauseFavicons\t // Ignore if options.pauseFaviconsis set */\r\n\t\t\t\t\t\t\t\t\t&& (tabFaviconUrl != undefined) // Need a favicon URI\r\n\t\t\t\t\t\t\t\t\t&& (tabUrl != \"about:blank\") // Do not refresh about:blank bookmarks\r\n\t\t\t\t\t\t\t\t\t;\r\n\t\t\t\tlet foundBN_id = refreshBTNArrayFavicon(a_BTN, len, tabFaviconUrl, tabUrl, is_refreshFav);\r\n \t\t\t\tbaFoundBN_id[winId] = foundBN_id; // Forget about previous found one\r\n\t\t\t\t// Show a bookmarked BSP2 star for this tab, if we found a corresponding bookmark not in BSP2 trash\r\n\t\t\t\tif (foundBN_id != undefined) {\r\n\t\t\t\t browser.browserAction.setIcon(\r\n\t\t\t\t\t{path: \"icons/star2bkmked.png\",\r\n\t\t\t\t\t tabId: tabId\r\n\t\t\t\t\t}\r\n\t\t\t\t );\r\n\t\t\t\t}\r\n\t\t\t\telse { // Reset to unbookmarked BSP2 icon\r\n\t\t\t\t browser.browserAction.setIcon(\r\n\t\t\t\t\t{tabId: tabId\r\n\t\t\t\t\t}\r\n\t\t\t\t );\r\n\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t else { // Reset to unbookmarked BSP2 icon\r\n\t\t\t\tbaFoundBN_id[winId] = undefined;\r\n\t\t\t\tbrowser.browserAction.setIcon(\r\n\t\t\t\t {tabId: tabId\r\n\t\t\t\t }\r\n\t\t\t\t);\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t );\r\n\t\t} catch (err) {\r\n\t\t // Reset to unbookmarked BSP2 icon\r\n\t\t baFoundBN_id[winId] = undefined;\r\n\t\t browser.browserAction.setIcon(\r\n\t\t\t{tabId: tabId\r\n\t\t\t}\r\n\t\t );\r\n\r\n\t\t let msg = \"Error in searching url \"+tabUrl+\" on tabModified : \"+err;\r\n\t\t console.log(msg);\r\n\t\t if (err != undefined) {\r\n\t\t\tlet fn = err.fileName;\r\n\t\t\tif (fn == undefined) fn = err.filename; // Not constant :-( Some errors have filename, and others have fileName \r\n\t\t\tconsole.log(\"fileName: \"+fn);\r\n\t\t\tconsole.log(\"lineNumber: \"+err.lineNumber);\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t else { // Reset to unbookmarked BSP2 icon\r\n\t\tbaFoundBN_id[winId] = undefined;\r\n\t\tbrowser.browserAction.setIcon(\r\n\t\t {tabId: tabId\r\n\t\t }\r\n\t\t);\r\n\t }\r\n\t}\r\n );\r\n}", "focusSelectedTab() {\n this.selectedTab.element.focus();\n }", "function withTab(f) {\n chrome.tabs.query({ active: true, currentWindow: true }, tabs => {\n f(tabs[0]);\n });\n}", "_defaultTab() {\n return this.$tabContents.first().attr('id');\n }", "function getCurrentTabButtonId() {\n return $('#navbar .current').attr('id');\n }", "function focusTab(idToShow, idToHighlight){\n\n\t//need to grab the parent so we can loop through tabs and palette content\n\tvar highlightId = dojo.byId(idToHighlight);\n\tvar tabListParent = dojo.byId(highlightId.parentNode);\n\tvar paletteRoot = dojo.byId(tabListParent.parentNode);\n\t//grabing palette content and tabs\n\tvar subpalettes = dojo.query('.palette_tab',paletteRoot);\n\tvar tabs = dojo.query('.tab',tabListParent);\n\n\t//hide all palettes\n\tfor (var i=0; i < subpalettes.length; i++){\n\t\tdojo.style(subpalettes[i], 'display', 'none');\n\t}\n\n\t//remove the focus from currently focused tab\n\tfor (var i=0; i < tabs.length; i++){\n\t\tdojo.removeClass(tabs[i], 'focusedTab');\n\t}\n\n\t//show new palette content\n\tvar paletteTab = dojo.byId(idToShow);\n\tdojo.style(paletteTab, 'display', 'block');\n\n\t//focus on proper tab\n\tif (highlightId) {\n\t\tdojo.style(highlightId, 'display', 'inline');\n\t\tdojo.addClass(highlightId, 'focusedTab');\n\t}\n\n\tsubpalettes = null;\n\ttabs = null;\n\thighlightId = null;\n\ttabListParent = null;\n\tpaletteRoot = null;\n}", "function getActiveLocation(){\n var tabIndex = $(\"#location_tabs\").tabs('option', 'active');\n switch(tabIndex){\n case 0: return $(\"#tab-one\").val();\n case 1: return $(\"#tab-two\").val();\n case 2: return $(\"#tab-three\").val();\n case 3: return $(\"#tab-four\").val();\n case 4: return $(\"#tab-five\").val();\n default: console.log(\"no active tab found\");\n return;\n }\n}", "get _tab( )\n\t{\n\t\tif (!this._valid) return(null);\n\n\t\tif (!(\"tab\" in this._ctx))\n\t\t{\n\t\t\tthis._ctx.tab = null;\n\n\t\t\tfor (var i = 0; i < gBrowser.mTabs.length; ++i)\n\t\t\t{\n\t\t\t\tif (gBrowser.mTabs[i].linkedBrowser == this._ctx.browser)\n\t\t\t\t{\n\t\t\t\t\tthis._ctx.tab = gBrowser.mTabs[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn(this._ctx.tab);\n\t}", "function getSelectedTabIndex()\r\n{\r\n return $('#tabs').tabs('option', 'active');\r\n}", "function get_win_id(object_id)\n{\n if (!object_id) object_id = '';\n else if (typeof object_id.id != 'undefined') object_id = object_id.id;\n \n var match = /function (.*)\\(/i.exec(get_win_id.caller.toString());\n \n var win_id = match[1] + object_id;\n \n // check if not already open\n var win = Ext.WindowMgr.get(win_id);\n if (win)\n {\n Ext.fly(win.getEl()).frame(\"ff0000\");\n win.toFront();\n return false;\n }\n \n return win_id;\n}", "function getCurrentTabUrl(callback) {\n var queryInfo = {\n \tactive: true,\n \tcurrentWindow: true\n };\n\n chrome.tabs.query(queryInfo, function(tabs) {\n var tab = tabs[0];\n var url = tab.url;\n callback(url);\n});\n}", "get isCurrentTabActive() {\n const { mainRouter: { routes: mainRoutes }, tabId, variant } = this.props;\n const { index: mainIndex, routes: tabNavRoutes } = _.find(mainRoutes, { routeName: ROOT_ROUTES.MAIN });\n\n if (variant === OVERALL_SCHEDULES) {\n if (mainIndex !== OVERALL_SCHEDULES_INDEX || tabNavRoutes == null) return false;\n\n const { routes: tabRoutes } = tabNavRoutes[mainIndex];\n const { index } = tabRoutes[0];\n return tabId === index;\n }\n \n if (variant === MY_SESSIONS) {\n if (mainIndex !== MY_SESSIONS_INDEX || tabNavRoutes == null) return false;\n \n const { routes: tabRoutes } = tabNavRoutes[mainIndex];\n const { index } = tabRoutes[0];\n return tabId === [UPCOMING, PAST][index];\n }\n\n if (variant === STUDIO_SCHEDULES) {\n const { index } = _.find(mainRoutes, { routeName: STUDIO_SCHEDULES }) || {};\n return tabId === index;\n }\n\n return false;\n }", "function indexOfTab(tabId) {\n for (var i = 0; i < tabs.length; i++) {\n if (tabId === tabs[i].id) {\n return i;\n }\n }\n return -1;\n}", "function getActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function getActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function getActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n }", "function getCurrentTab() {\n return $currentTab;\n}", "function getCurrentTabUrl(callback) {\n\tvar queryInfo = {\n\t\tactive: true,\n\t\tcurrentWindow: true\n\t};\n\n\tchrome.tabs.query(queryInfo, function(tabs) {\n\t\tvar url = tabs[0].url;\n\t\tconsole.assert(typeof url == 'string', 'tab.url should be a string');\n\t\tcallback(url);\n\t});\n}", "function getCurrentTabUrl(callback){\n var queryInfo = {\n active: true,\n currentWindow: true\n };\n\n chrome.tabs.query(queryInfo, function(tabs){\n var tab = tabs[0];\n var url = tab.url;\n callback(url);\n });\n}", "function launchMyAccountTab(sessionId, authuserID) {\n // The my account bundle view url.\n const myAccountURL = `https://myaccount.google.com/u/${authuserID}/permissions`;\n\n // Check whether the my account tab exists or not.\n if (myAccountTab === undefined) {\n // If the my account tab does not exist: Create the my account tab and corresponding listeners.\n chrome.tabs.create({ url: myAccountURL }, (tab) => {\n myAccountTab = tab;\n\n // Register the listeners.\n chrome.tabs.onRemoved.addListener((tabId) => {\n if (myAccountTab && tabId === myAccountTab.id) {\n myAccountTab = undefined;\n }\n });\n\n let callOnceFlag = 0;\n chrome.tabs.onUpdated.addListener((tabId, changeInfo) => {\n // If the my account page tab has completed loading then execute the content script.\n if (myAccountTab && tabId === myAccountTab.id && changeInfo.status === 'complete' && callOnceFlag == 0) {\n // Send a message to the my account page content script to activate my account page banner.\n chrome.tabs.sendMessage(tabId, { type: 'ACTIVATE_MY_ACCOUNT_PAGE_CONTENT' })\n callOnceFlag = 1;\n\n /**\n * Commenting out the part below because we have disabled the launch button\n * after the user clicks it once. Thus, no need to check if a specific\n * sessionId has already launched the page.\n */\n // // If the session id has not been added to the session id array,\n // // then add the session id to the array and start the count down timer.\n // if (!sessionIdArray.includes(sessionId)) {\n // // Add the session id to the session id array.\n // sessionIdArray.push(sessionId);\n\n // // // Start the count down timer.\n // // startCountDownTimer();\n // }\n\n // Start the count down timer.\n startCountDownTimer();\n }\n });\n });\n } else {\n // If the my account tab does exist activate it.\n chrome.tabs.update(myAccountTab.id, { active: true }, () => {});\n }\n}", "function delegate_to(tab_id)\n {\n menu_tab_id = tab_id;\n browser.browserAction.setPopup({ popup: \"\" });\n browser.browserAction.onClicked.addListener(focus_menu_tab);\n }", "function getCurrentTab() {\r\n try {\r\n var li = jQuery(\".tabOn\");\r\n if (li.length != 1) return -1;\r\n var links = jQuery('a', li);\r\n if (links.length != 1) return -1;\r\n var p = new SimpleParser(links[0].href);\r\n var tab = new Number(p.extract(\"javascript:goToTab(\", \");\"));\r\n if (tab < 1 || tab > 9) return -1;\r\n return tab;\r\n } catch (ex) {\r\n return -1;\r\n }\r\n}", "function lockTab() {\n bgLog(\"tabButton\")\n chrome.tabs.query({active: true,currentWindow:true},function(tabs){\n //save the tab locally\n myTab = tabs[0].id\n let message = {tab:true, id:myTab}\n sendMessage(message)\n bgLog(\"Tab id: \" + myTab) //the locked tab id\n });\n}", "function getActiveElement() {\r\n try {\r\n return document.activeElement;\r\n } catch (err) {}\r\n }", "function SetActiveTab(iTabID) {\n if (tTabs === undefined) return;\n if (tTabs !== undefined && tTabs.length >= 0 && iTabID != null && parseInt(iTabID) >= 0) {\n tTabs.tabs(\"option\", \"selected\", parseInt(iTabID));\n }\n}", "get activeTab() {\n var _a;\n return (_a = this.getAttribute('active-tab')) !== null && _a !== void 0 ? _a : '';\n }", "function focusChange(windowId) {\n\t\tgetIntentionData().then(intentionData => {\n\t\tif (intentionData.focus && windowId !== intentionData.windowId) {\n\t\t\tintentionData.focus = false\n\t\t\tintentionData.focusLost.push({\n\t\t\t\tstart: Date.now(),\n\t\t\t\tend: undefined\n\t\t\t})\n\t\t} else if (!intentionData.focus && windowId === intentionData.windowId) {\n\t\t\tlet focusIndex = intentionData.focusLost.length - 1\n\t\t\tintentionData.focus = true\n\t\t\tintentionData.focusLost[focusIndex].end = Date.now()\n\t\t}\n\n\t\tupdateIntentionData('focusChange', intentionData)\n\t})\n}", "open(tabId = null) {\n\t\t\tif (tabId && this.has_tabs) {\n\t\t\t\t// Find tab with wanted id.\n\t\t\t\tlet openingTabs = this.tabs.filter((tab) => {return tab.id === tabId})\n\t\t\t\tif (openingTabs.length > 0) {\n\t\t\t\t\t// Set current tab to first match.\n\t\t\t\t\tthis.currentTab = this._changeTab(openingTabs[0])\n\t\t\t\t} else {\n\t\t\t\t\t// Try opening index instead of id as an alternative.\n\t\t\t\t\tlet openingTab = this.tabs[tabId]\n\t\t\t\t\tif (openingTab) {\n\t\t\t\t\t\tthis.currentTab = this._changeTab(openingTab)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.is_open = true\n\t\t\tthis._lockBody()\n\t\t\tthis._animateIcon()\n\n\t\t\tsetTimeout(() => this.visible = true, 30)\n\t\t\tthis.$emit('open')\n\t\t}", "updateVisibleTab(tabid) {\n if (this.props.setLocation) {\n const url = `${this._window.location.origin}${this._window.location.pathname}#${tabid}`;\n this._window.history.replaceState(null, 'change-tab', url);\n }\n\n this.setState({ selectedTabId: tabid });\n\n if (this.props.onTabChange) {\n this.props.onTabChange(tabid);\n }\n }", "function handleActivated(activeInfo) {\r\n chrome.tabs.query({ active: true, currentWindow: true}, function(tabs) {\r\n setIcon(tabs[0].url);\r\n //https://stackoverflow.com/questions/6451693/chrome-extension-how-to-get-current-webpage-url-from-background-html\r\n \r\n});\r\n}", "function handleActivated(activeInfo) {\n\t// console.log(\"Tab \" + activeInfo.tabId +\" was activated\");\n\t// sendMessageToContentScript(\"task_detect\");\n}", "attachChromeWindow (tabWindow, chromeWindow) {\n // log.log('attachChromeWindow: ', tabWindow.toJS(), chromeWindow)\n\n // Was this Chrome window id previously associated with some other tab window?\n const oldTabWindow = this.windowIdMap.get(chromeWindow.id)\n\n // A store without oldTabWindow\n const rmStore = oldTabWindow ? this.handleTabWindowClosed(oldTabWindow) : this\n\n const attachedTabWindow = TabWindow.updateWindow(tabWindow, chromeWindow).remove('expanded')\n\n // log.log('attachChromeWindow: attachedTabWindow: ', attachedTabWindow.toJS())\n\n return rmStore.registerTabWindow(attachedTabWindow)\n }", "focusTab(ref) {\n const domNode = ReactDOM.findDOMNode(ref); // eslint-disable-line react/no-find-dom-node\n domNode.focus();\n }", "function getActiveElement() {\n try {\n return document.activeElement;\n } catch (e) {\n }\n}", "async function getTabWindow(tabUrl, windowId, callback) {\n console.log(\"getTabWindow: \" + tabUrl + \" windowId: \" + windowId);\n\n if (windowId) windowId = parseInt(windowId); //needs to be a number for chrome.tabs.get\n\n //are we dealing with a new regex?\n var match = false;\n const urlsToGroup = await getObjectFromLocalStorage(\"urlsToGroup\");\n console.log(\"urlsToGroup:\");\n console.log(urlsToGroup);\n for (var i = 0; i < urlsToGroup.length; i++) {\n var rule = urlsToGroup[i];\n console.log(\"rule: \" + JSON.stringify(rule));\n if (matchRuleShort(tabUrl, rule.urlPattern)) {\n //the new tab URL matches an existing group.\n console.log(\"MATCH!\");\n match = true;\n\n //if we have a new window ID passed in, use that\n if (windowId) {\n console.log(\"Setting windowId to: \" + windowId);\n rule.window = windowId;\n console.log(\"updated rule: \");\n console.log(rule);\n console.log(\"urlsToGroup:\");\n console.log(urlsToGroup);\n\n await saveObjectInLocalStorage(\"urlsToGroup\", urlsToGroup);\n }\n\n //check that the window still exists\n console.log(\"checking for existing window for rule: \");\n console.log(rule);\n if (rule.window === undefined) {\n rule.window = 0; //handle default case\n }\n chrome.windows.get(rule.window, {populate:true}, function(foundWindow){\n if (foundWindow) {\n console.log(\"FOUND! \" + foundWindow);\n callback(foundWindow);\n } else {\n //create a new window with the new tab\n chrome.windows.create({}, async function(newWindow){ //\"tabId\":tab.id\n console.log(\"CREATED NEW! \" + JSON.stringify(newWindow));\n\n //reassign the group pattern to the new window\n rule.window = newWindow.id\n await saveObjectInLocalStorage(\"urlsToGroup\", urlsToGroup);\n callback(newWindow);\n });\n }\n });\n }\n }\n\n //no matching rule was found\n if (!match) {\n console.log(\"No match to existing rule\");\n //if we have a new window ID passed in, try to use that\n if (windowId) {\n //check that the window still exists\n console.log(\"checking whether window \" + windowId + \" exists\");\n chrome.windows.get(windowId, {populate: true}, async function(foundWindow) {\n if (foundWindow) {\n console.log(\"Existing window FOUND! \" + foundWindow);\n callback(foundWindow);\n\n //associate the pattern with the new window\n let rule = new Object();\n rule.urlPattern = tabUrl;\n rule.window = windowId;\n urlsToGroup.push(rule);\n await saveObjectInLocalStorage(\"urlsToGroup\", urlsToGroup);\n\n } else {\n //window does not exist, return null and a new window will be created\n console.log(\"Window \" + windowId + \" DOES NOT exist\");\n callback(null);\n }\n });\n } else {\n //windowId not passed, return null and a new window will be created\n console.log(\"windowId is null\");\n callback(null);\n }\n }\n}", "openRequestInTab() {\n let win = Services.wm.getMostRecentWindow();\n win.openUILinkIn(this.selectedRequest.url, \"tab\", { relatedToCurrent: true });\n }", "async function focus_menu_tab()\n {\n const tab = await browser.tabs.get(menu_tab_id);\n\n browser.tabs.update(tab.id, { active: true });\n browser.windows.update(tab.windowId, { focused: true });\n }", "function getActiveElement() {\n try {\n return document.activeElement\n } catch ( err ) { }\n}", "function getActiveElement() {\n try {\n return document.activeElement\n } catch ( err ) { }\n}", "function getActiveElement() {\n try {\n return document.activeElement\n } catch ( err ) { }\n}", "function getActiveElement() {\n try {\n return document.activeElement\n } catch ( err ) { }\n}", "function getActiveElement() {\n try {\n return document.activeElement\n } catch ( err ) { }\n}", "function getActiveElement() {\n try {\n return document.activeElement\n } catch ( err ) { }\n}", "function getActiveElement() {\n try {\n return document.activeElement\n } catch ( err ) { }\n}", "function getActiveElement() {\n try {\n return document.activeElement\n } catch ( err ) { }\n}", "getTabIndex(ID, opened = false) {\r\n return (opened ? this.state.tabs : this.settings.tabs).findIndex(tab => tab.ID == ID);\r\n }", "function getTabSelectedIndex()\n{\n\treturn $(\"#tabs\").tabs('option').active;\n}", "function activateVisualizationTab( tab_id, tab_canvas_id ) {\n\n var strDebug = 'activateVisualizationTab( '+ tab_id +', '+ tab_canvas_id +') begin\\n';\n strDebug += 'li.active.attr(\"id\")= '+ $('li.active').attr('id');\n console.log(strDebug);\n\n\t//if ($('li.active').attr('id') != 'issueDateTab') {\n\tif ($('li.active').attr('id') != tab_id.replace('#', '') ) {\n //console.log('IF li.active in activateVisualizationTab with tab_id = ', tab_id, ' ; replace = ', tab_id.replace('#', ''));\n\n\t\t$('li.active').css('display','none');\n\t\t$('.active').addClass('deselected');\n\t\t$('.active').removeClass('active');\n // previous line disables the whole visualizations block, so\n\t\t$('#visualizations_tab').addClass('active');\n\t\t/* $('#visualizations_tab').css('display','block'); */\n\t\t$('#visualizations_canvas').addClass('active');\n\t\t$('#visualizations_canvas').css('display','block');\n\n\t\t//Activate specific tab\n\t\t//$('#issue_info_tab').addClass('active');\n\t\t$(tab_id).addClass('active');\n\t\t$(tab_id).css('display','block');\n\t\t$(tab_canvas_id).addClass('active');\n\t\t$(tab_canvas_id).css('display','block');\n\t}\n} // end activateVisualizationTab **********************************/", "_tab(event){\n event.preventDefault(); // always?\n\n // get list of all children elements:\n const o = Array.from(this.querySelectorAll('*'));\n\n // get list of focusable items\n const focusableItems = o.filter((e)=>UIDialog._isVisibleElement(e));\n\n // get currently focused item\n const focusedItem = document.activeElement;\n\n // get the number of focusable items\n const numberOfFocusableItems = focusableItems.length;\n\n if (numberOfFocusableItems === 0) return;\n\n // get the index of the currently focused item\n const focusedItemIndex = focusedItem ? focusableItems.indexOf(focusedItem) : -1;\n\n if (event.shiftKey) {\n // back tab\n // if focused on first item and user preses back-tab, go to the last focusable item\n if (focusedItemIndex === 0) {\n focusableItems[numberOfFocusableItems - 1].focus();\n //event.preventDefault();\n }\n } else {\n // forward tab\n // if focused on the last item and user preses tab, go to the first focusable item\n if (focusedItemIndex === numberOfFocusableItems - 1) {\n focusableItems[0].focus();\n //event.preventDefault();\n }\n }\n }", "async function focus_menu_tab()\n {\n const tab = await browser.tabs.get(menu_tab_id);\n\n await browser.tabs.update(tab.id, { active: true });\n await browser.windows.update(tab.windowId, { focused: true });\n }", "function activatePanelByHash() {\n const hash = document.location.hash;\n const panelId = hash.replace('#', '');\n\n if (hash && window.nbApp.utils.arrayIncludes(tabList, panelId)) {\n activatePanel(panelId, false);\n }\n }", "function activateTab() {\n var activeTab = $('[href=' + window.location.hash.replace('/', '') + ']');\n activeTab && activeTab.tab('show');\n }", "function calcWindowIndex(elt) {\n let idx=null;\n const c = elt.parentElement.children;\n for (let i=1; i < c.length; ++i) {\n if (c[i].id === elt.id) {\n idx = parseInt(i-1);\n }\n }\n if (idx == null) {\n console.log(\"ERROR: didn't find tab in it's supposed assigned window\")\n }\n return idx+1; // inserted below => index is 1 + index of entry above\n}" ]
[ "0.74438876", "0.74290186", "0.6755566", "0.66839886", "0.6648591", "0.655822", "0.64862543", "0.64339864", "0.6389305", "0.6357002", "0.6334173", "0.6326636", "0.62317747", "0.6226168", "0.6186943", "0.6168544", "0.61467344", "0.61053", "0.60988045", "0.6039023", "0.60050756", "0.59295344", "0.5871654", "0.585558", "0.5854682", "0.58291847", "0.5815294", "0.57867986", "0.57650536", "0.57532537", "0.57278246", "0.5708468", "0.5693254", "0.5693254", "0.5693254", "0.5689667", "0.5662613", "0.5652452", "0.56454724", "0.56400806", "0.5632215", "0.556742", "0.55621547", "0.55570716", "0.5551031", "0.553635", "0.5434474", "0.5434212", "0.54298335", "0.5422329", "0.53960454", "0.5386672", "0.53788877", "0.53729814", "0.53697866", "0.5366388", "0.5352207", "0.53510356", "0.5350385", "0.5341604", "0.53376627", "0.53376627", "0.53376627", "0.53293127", "0.53170407", "0.5314575", "0.5290481", "0.5285124", "0.52770823", "0.52752733", "0.5261291", "0.52428967", "0.52265096", "0.5221901", "0.5220472", "0.5215766", "0.5213234", "0.5211397", "0.5207354", "0.5196609", "0.51920444", "0.51839256", "0.5178994", "0.5177428", "0.5172701", "0.5172701", "0.5172701", "0.5172701", "0.5172701", "0.5172701", "0.5172701", "0.5172701", "0.5169828", "0.51666504", "0.5165158", "0.51639223", "0.51621747", "0.5159157", "0.51575875", "0.51574403" ]
0.7634702
0
Adding a new entry
function addEntry(e) { // Preventing form submission e.preventDefault(); // Getting the value of the new entry const previousEntries = choreContainer.innerHTML; const newEntry = document.getElementById('chore').value; // Check if chore is empty if (newEntry != "") { checkState(); // If chore is not empty, append the new entry above the old ones const newEntryTemplate = "<li class = \"singleChore\"><input type=\"checkbox\"><span>" + newEntry + "</span></input><span class = \"delete-single-chore\" onclick = \"removeOne(event)\" >&times;</span></li>"; choreContainer.innerHTML = newEntryTemplate + previousEntries; restoreChkbxStatus(entryList.length - 1, 1); checkState(); // Clean up the textarea box document.getElementById('chore').value = ""; // Data persistence -- Local storage localStorage.setItem('previousState', choreContainer.innerHTML); // localStorage.setItem('previousStyles', window.getComputedStyle(choreContainer)); // console.log(window.getComputedStyle(choreContainer)); // console.log(allEntries); showRemoveBtn(); } // If chore is empty, intimate the user else { alert("You have not entered anything."); // This won't work because document.body.style can only access inline css values. // document.body.style.backgroundColor = #ff0000; // Even the following is not working for some reason. Let's find out later. // window.getComputedStyle(document.body, null).backgroundColor = #ff0000; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static addEntry(data) {\n if (!data || (typeof data) !== 'object') {\n return this.badRequest('the data pass are not right,pleas pass right data');\n }\n const error = DummyDataHelpers.validateEntry(data);\n if (!error) {\n if (DummyDataHelpers.titleExists(dummyEntries, data.title)) {\n return this.conflictError('title already exist,change title');\n }\n // const entryid = (dummyEntries.length - 1) + 1;\n const entryid = dummyEntries[dummyEntries.length - 1].id + 1;\n const newEntry = {\n id: entryid,\n title: data.title,\n note: data.note,\n imageUrl: data.imageUrl,\n createdAt: new Date(),\n updatedAt: new Date(),\n isFavourite: data.isFavourite,\n };\n dummyEntries.push(newEntry);\n return this.createdSuccessfully('A new Entry created successfully', newEntry);\n }\n return this.badRequest(error);\n }", "add_entry(entry) {\n this.dictionary.push(entry)\n }", "function addEntries() {\n\n}", "function addEntry(entry, callback){\n var id = generateEntryID();\n conn.query('INSERT INTO Entries (entry_id, collection_id, entry_number, author, title, '+\n 'date_submitted, subject, content)' + \n 'VALUES ($1, $2, $3, $4, $5, $6, $7, $8)', \n [\n id,\n entry.collection_id,\n entry.entry_number,\n entry.author, \n entry.title,\n entry.date_submitted,\n entry.subject,\n entry.content\n ]).on('error', console.error).on('end', function() {\n callback(id);\n });\n}", "function storeNewEntry() {\r\n dojo.xhrPost({\r\n url: \"/rpc/insert\",\r\n content: {\r\n \"board_id\": boardID,\r\n \"name\": newName,\r\n \"rotations\": newRotations\r\n },\r\n load: storeNewEntrySucceeded,\r\n error: storeNewEntryFailed\r\n });\r\n }", "function putEntry(data) {\n db.get(\"data_entries_point\").push(data).write();\n}", "function saveEntry(entry) {\n const transaction = db.transaction(['new_budget_entry'], 'readwrite');\n\n const budgetObjectStore = transaction.objectStore('new_budget_entry');\n\n budgetObjectStore.add(entry);\n}", "function saveNewOp() {\n let newEntry = {\n date: new Date().toJSON(),\n cat: pageDialog.category.value,\n amount: pageDialog.amount.value,\n desc: pageDialog.desc.value\n };\n entriesDb.insert(newEntry);\n displayEntries();\n }", "addEntry(entry) {\n if (this.getFileId(entry.name) == null) {\n this.entries.push(entry);\n this.content += entry.text;\n\n Net.updateFile(this.id, btoa(this.content));\n\n return true;\n } else {\n return false;\n }\n }", "function addEntry() {\n //get the pace and date from input boxes\n let paceEntry = parsePace();\n let dateEntry = parseDate();\n\n //don't add entry if the input is wrong format, exits the function\n if (paceEntry == null || dateEntry == null) { return; }\n\n //create new entry object and push to data array\n let entry = new Entry(paceEntry, dateEntry, true);\n entries.push(entry);\n\n //sorts entries array by date\n sortEntries();\n\n //save to local storage\n localStorage['entries-local'] = JSON.stringify(entries);\n\n //refresh the list\n createList();\n //reset and then draw chart\n ctx.clearRect(0, 0, canvas.width, canvas.height); //clear existing canvas\n drawAxis();\n drawChart();\n}", "function addEntry(req, res) {\n // console.log(req.body)\n newEntry = {\n date: req.body.date,\n emoji: req.body.emoji,\n feelings: req.body.feelings,\n zipcode: req.body.zipcode,\n weather: req.body.weather \n }\n \n projectData.push(newEntry)\n res.send(projectData)\n console.log(projectData)\n}", "function addEntry(entry){\n jsfile.readFile(dbFile,(err,data)=>{\n if(!err){\n console.log(\"Read DB Success!\");\n data.push(entry);\n jsfile.writeFile(dbFile,data,(err)=>{\n if(err){\n console.log(\"Added Entry Failure!\");\n }else{\n console.log(\"Added Entry Success!\");\n }\n });\n }else{\n console.log(\"Read DB Failure!\");\n }\n })\n}", "function newEntry(id) {\n let idString = id;\n formatEntry(idString, true);\n increment();\n $(`#formatted${counter-1}`).after(generateNewEntryHtml());\n\n}", "addEntry(window, url = window.location.href, pushState = undefined) {\n const entry = new Entry(window, url, pushState);\n if (this.current) {\n this.current.append(entry);\n this.current = entry;\n } else {\n this.first = entry;\n this.current = entry;\n }\n this.focus(window);\n }", "function saveEntry(entry) {\n return rest.post(entry);\n }", "function addEntry(name,number){\r\n\treadFile((res)=>{\r\n\t\tvar contactList = JSON.parse(res);\r\n\t\tvar contact = {\"name\":name,\"number\":number};\r\n\t\tcontactList.push(contact);\r\n\t\twriteFile(contactList);\r\n\t});\r\n\r\n}", "add(entry) {\n this.amount.add(entry.amount);\n this.count += 1;\n this.dbUpdater.update();\n }", "async addEntry() {\n\t\tconst { entryType, dateSelected, amount, notes } = this.state;\n\n\t\t//Tests that all entries have been compoleted adequetly\n\t\tif (\n\t\t\t(entryType === 'expense' || entryType === 'revenue') &&\n\t\t\tdateSelected !== '' &&\n\t\t\tamount.trim().length > 0\n\t\t) {\n\t\t\tthis.setState({ isLoading: true });\n\t\t\tconst numAmount = parseFloat(amount);\n\t\t\tawait FirebaseFunctions.call('addEntry', {\n\t\t\t\ttype: entryType,\n\t\t\t\tdate: dateSelected,\n\t\t\t\tamount: numAmount,\n\t\t\t\tnotes: notes,\n\t\t\t\tuserID: this.props.navigation.state.params.userID\n\t\t\t});\n\t\t\t//Resets the fields\n\t\t\tthis.setState({ isLoading: false, isEntryAdded: true, amount: '', notes: '' });\n\t\t} else {\n\t\t\tthis.setState({ fieldsError: true });\n\t\t}\n\t}", "function addNewEntry() {\n let new_entry = document.createElement('textarea');\n new_entry.className = \"entry\";\n new_entry.cols = 50;\n new_entry.addEventListener('input', autoScroll);\n new_entry.addEventListener('keypress', checkEnterKey);\n new_entry.addEventListener('keydown', checkDelete);\n new_entry.addEventListener('blur', checkBlur);\n main.appendChild(new_entry);\n}", "function addEntry(events, squirrel) {\n JOURNAL.push({ events, squirrel });\n}", "function addEntry() {\n var title = document.getElementById(\"add_title\").value;\n var date = document.getElementById(\"add_date\").value;\n date = formatDate(date);\n\n var content = document.getElementById(\"add_content\").value; \n \n if (!isInputError(title, date, content)) {\n todos.push(new Entry(title, date, \"\", content));\n // reset field values and hide add panel\n document.getElementById(\"add_title\").value = \"\";\n document.getElementById(\"add_date\").value = \"\";\n document.getElementById(\"add_content\").value = \"\";\n // refresh todo list\n displayEntries();\n }\n}", "function addLogEntry(worker, entry) {\n if (entry != null) {\n datastore.createLogEntry(entry);\n }\n}", "function _createEntry() {\n\t\ttry {\n\t\t\t//Get the Request Body\n\t\t\tvar oBody = JSON.parse($.request.body.asString());\n\n\t\t\t//Get the Latest ID Number\n\t\t\tvar lvId;\n\t\t\tif (!oBody.CONDITION_ID) {\n\t\t\t\tlvId = _getNextId();\n\t\t\t} else {\n\t\t\t\tlvId = oBody.CONDITION_ID;\n\t\t\t}\n\n\t\t\t//Item Number\n\t\t\tvar lvItem = 0;\n\n\t\t\t//Get the Database connection\n\t\t\tvar oConnection = $.db.getConnection();\n\n\t\t\t//Build the Statement to insert the entries\n\t\t\tvar oStatement = oConnection.prepareStatement('INSERT INTO \"' + gvSchemaName + '\".\"' + gvTableName +\n\t\t\t\t'\" VALUES (?, ?, ?, ?, ?, ?)');\n\n\t\t\t//Loop through the items to be added to the database\n\t\t\tfor (var i = 0; i < oBody.ITEMS.length; i++) {\n\t\t\t\t//Populate the fields with values from the incoming payload\n\t\t\t\t//Id\n\t\t\t\toStatement.setInt(1, parseFloat(lvId));\n\t\t\t\t//Item\n\t\t\t\tlvItem = lvItem + 1;\n\t\t\t\toStatement.setInt(2, lvItem);\n\t\t\t\t//Structure\n\t\t\t\toStatement.setString(3, oBody.ITEMS[i].STRUCTURE);\n\t\t\t\t//Field\n\t\t\t\toStatement.setString(4, oBody.ITEMS[i].FIELD);\n\t\t\t\t//Operator\n\t\t\t\toStatement.setString(5, oBody.ITEMS[i].OPERATOR);\n\t\t\t\t//Value\n\t\t\t\toStatement.setString(6, oBody.ITEMS[i].VALUE);\n\t\t\t\t//Add Batch process to executed on the database\n\t\t\t\toStatement.addBatch();\n\t\t\t}\n\t\t\t//Execute the Insert\n\t\t\toStatement.executeBatch();\n\n\t\t\t//Close the connection\n\t\t\toStatement.close();\n\t\t\toConnection.commit();\n\t\t\toConnection.close();\n\n\t\t\tgvTableUpdate = \"Table entries created successfully: \" + gvTableName + \";\";;\n\t\t\tgvConditionId = lvId;\n\t\t\tgvStatus = \"Success\";\n\t\t} catch (errorObj) {\n\t\t\tif (oStatement !== null) {\n\t\t\t\toStatement.close();\n\t\t\t}\n\t\t\tif (oConnection !== null) {\n\t\t\t\toConnection.close();\n\t\t\t}\n\t\t\tgvTableUpdate = \"There was a problem inserting entries into the Table: \" + gvTableName + \", Error: \" + errorObj.message + \";\";\n\t\t\tgvStatus = \"Error\";\n\t\t}\n\t}", "function addEntry(entry){\n jsfile.readFile(dbFile,(err,data)=>{\n if(!err){\n console.log(\"Read DB Success!\");\n data.push(entry);\n jsfile.writeFile(dbFile,data,(err)=>{\n if(err){\n res.writeHead(200, {'Content-Type': 'text/html'});\n res.write(pug.renderFile('erro.pug',{e: \"Erro: não foi possivel escrever na Base de dados!\"}));\n res.end();\n console.log(\"Added Entry Failure!\");\n }else{\n console.log(\"Added Entry Success!\");\n }\n });\n }else{\n res.writeHead(200, {'Content-Type': 'text/html'});\n res.write(pug.renderFile('erro.pug',{e: \"Erro: na leitura da base de dados!\"}));\n res.end();\n console.log(\"Read DB Failure!\");\n }\n })\n}", "function add(todoText) {\n let obj = { todo: todoText };\n database.push(obj);\n}", "handleNewEntry() {\n\t\tlet newEntry = {\n\t\t\tQualification: '',\n\t\t\tOrganization: '',\n\t\t\tFrom: '',\n\t\t\tEnd: ''\n\t\t}\n\t\tlet newEntryArray = this.state.entries.concat(newEntry)\n\t\tthis.setState({ entries: newEntryArray })\n\t}", "function addEntry(tableName, entry) {\n $(tableName).append(\"<tr><td>\" + entry + \"</td></tr>\");\n}", "function add(item) {\n data.push(item);\n console.log('Item Added...');\n }", "function new_entry(id, content, result, user) {\n db.query('CREATE TABLE IF NOT EXISTS submissions(id BIGINT NOT NULL AUTO_INCREMENT, problem TEXT, content TEXT, result TEXT, user TEXT, PRIMARY KEY (id))', function(err, r) {\n if (err) throw err;\n db.query('INSERT INTO submissions (problem, content, result, user) value (?, ?, ?, ?)', [id, content, result, user], function(err, r) {\n if (err) throw err;\n });\n });\n}", "addNewEntry(entryDetails) {\n this.props.addEntryCallback(entryDetails);\n }", "function addEntry() {\n var name = document.getElementById(\"add_name\").value;\n var tel = document.getElementById(\"add_tel\").value;\n var email = document.getElementById(\"add_email\").value;\n \n if (!isInputError(name, tel, email)) {\n contacts.push(new Entry(name, tel, email));\n // reset field values and hide add panel\n document.getElementById(\"add_name\").value = \"\";\n document.getElementById(\"add_tel\").value = \"\";\n document.getElementById(\"add_email\").value = \"\";\n hide(\"addentry\");\n // refresh contact list\n displayEntries();\n }\n}", "function addEntry(t, n, s)\n{\n\t// build the JSON data field\n\tvar params = {\n\t \tmode: 'AddEntry',\n\t \ttable: t,\n\t\tid: n,\n\t\tstaff: s\n\t};\n\t// build the JSON AJAX statement\n\t$.ajax({\n\t\turl: 'php/insert.php',\n\t\tdata: $.param(params),\n\t\ttype: 'POST',\n\t\tdataType: 'json',\n\t\terror: function(xhr, textStatus, errorThrown) {\n\t\t\tdisplayError(textStatus);\n\t\t},\n\t\tsuccess: function(data, textStatus) {\n\t\t\tif (data.errno != null) {\n\t\t\t\tdisplayPHPError(data);\n\t\t\t} else {\n\t\t\t\tif (t == 'projectT') {\n\t\t\t\t\tgetStaffProjectDetail(s);\n\t\t\t\t} else {\n\t\t\t\t\tgetStaffCourseDetail(s);\n\t\t\t\t\tgetCategoriesGraph(s, $('#progress p select').val());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}", "function createEntry(title, travelDate, coverPhoto) {\n // create variable that holds what a new entry object should include\n const newEntry = {\n title,\n travelDate,\n coverPhoto\n };\n // create ajax POST call that uses entries in url value\n $.ajax({\n type: \"POST\",\n url: \"/api/entries\",\n dataType: \"json\",\n contentType: \"application/json\",\n data: JSON.stringify(newEntry),\n\n headers: {\n Authorization: `Bearer ${jwt}`\n }\n })\n .done(function() {\n getUserDashboard();\n })\n .fail(function(jqXHR, error, errorThrown) {\n console.error(jqXHR);\n console.error(error);\n console.error(errorThrown);\n });\n}", "function add (name, text) {\n data.push({ name: name, text: text, id: String(data.length) });\n}", "addEntry(){\n var that = this;\n\n fetch(that.props.createApiUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n device_name: that.state.deviceName,\n device_model: that.state.deviceModel,\n mac_address: that.state.macAddress\n })\n })\n }", "function addNote() {\n // formatter, to render date in polish format\n const formatter = new Intl.DateTimeFormat('pl');\n // create note object\n const note = {\n body: noteBody.value,\n img: noteImg.value,\n alt: noteAlt.value,\n date: formatter.format(new Date)\n }\n\n // create HTML node from note object\n const node = createItem(note);\n // append created node in HTML\n noteList.appendChild(node);\n // put created node in Map to match it with note\n map.set(node, note);\n // push current note to notes object\n notes.push(note);\n // overwrite notes in indexedDB with notes\n idbKeyval.set('notes', notes)\n .catch(err => console.error('submit failed: ', err));\n // reset input values\n noteBody.value = '';\n noteImg.value = '';\n noteAlt.value = '';\n }", "function addNewItem () {\n\t\"use strict\";\n\tvar addInputText = addInput.value;\n\tif (addInputText !== \"\") {\n\t\t\n\t\tvar newLabel = addNewLabel(addInputText, this);\t\n\t\tvar newEditButton = addNewEditButton();\n\t\tvar newDeleteButton = addNewDeleteButton();\n\t\t\n\t\tinsertAfter(newLabel, h6List[1]);\n\t\tinsertAfter(newEditButton, newLabel);\n\t\tinsertAfter(newDeleteButton, newEditButton);\n\t\t\n\t\t//Attaching the event handlers to the new elements\n\t\tnewEditButton.onclick = toggleEdit;\n\t\tnewLabel.firstChild.onclick = toggleCompletion;\n\t\tnewDeleteButton.onclick = deleteItem;\n\t}\n}", "function addEntry(entry, mode) {\n console.log('addEntry entry = ' + angular.toJson(entry));\n //console.log('addItemToList listOpenEntries = ' + angular.toJson(entries.listOpenEntries));\n console.log('addEntry global.currentList = ' + angular.toJson(global.currentList));\n var defer = $q.defer();\n //search the item in the listOpen Entries\n var insertFlag = false;\n if (mode == 'S') {\n insertFlag = true;\n } else {\n var openIdx = itemExitInList(entry.itemLocalId, global.currentListEntries.listOpenEntries.entries);\n if (openIdx == -1) {\n insertFlag = true;\n }\n }\n console.log('addEntry insertFlag = ' + angular.toJson(insertFlag));\n if (insertFlag) {\n entry.origin = mode == 'L' ? 'L' : 'S';\n if (mode == 'S') {\n checkEntryExists(entry.entryServerId).then(function (exists) {\n if (!exists) {\n insertEntry2(entry,'FE_CREATED').then(function (res) {\n defer.resolve();\n }, function (err) {\n console.error('addEntry insertEntry err = ' + angular.toJson(err));\n defer.reject();\n });\n }\n else {\n console.log('addEntry ALREADY EXISTS ');\n defer.resolve();\n }\n }, function (err) {\n console.error('addEntry checkEntryExists err = ' + angular.toJson(err));\n defer.reject();\n })\n }\n else {\n entry.entryServerId = '';\n entry.userServerId = global.userServerId;\n insertEntry2(entry,'CREATED').then(function (res) {\n defer.resolve();\n }, function (err) {\n console.error('addEntry insertEntry err = ' + angular.toJson(err));\n defer.reject();\n });\n }\n }\n return defer.promise;\n }", "function create() {\n if (document.getElementById('compose').value == '') {\n showModal('Error', 'Please compose your entry above before submitting.')\n return\n }\n \n let entryContent = document.getElementById('compose').value\n\n if (tagLocation) {\n entryContent += ` @_location ${lat} ${lon}`\n }\n\n entryContent += ` @_time ${getCurrentTimeString()}`\n\n postFromButton('submitEntryButton', 'Submitting...', '/jrnlAPI/create',\n {\n entry: entryContent\n },\n (data)=>{\n if (data.success == true) {\n document.getElementById('compose').value = ''\n let tagGPS = document.getElementById('tagGPS')\n tagGPS.checked = false\n tagCurrentLocation(tagGPS)\n showModal('Entry added', `<strong>Your entry has been added successfully.</strong><br /><small>stdout: \"${data.stdo}\" stderr: \"${data.stde}\"</small>`)\n }\n })\n}", "function addEntry(object, key, value) {\r\n var newObject = clone(object);\r\n newObject[key] = value;\r\n return newObject;\r\n}", "function postEntry() {\n var entry = cfg.defaultEntry(),\n useLocation = $(cfg.select.ids.formLocation).prop('checked');\n\n entry.entryID = cfg.counter + 1;\n entry.title = $(cfg.select.ids.formTitle).val();\n entry.description = $(cfg.select.ids.formDesc).val();\n\n if (!entry.title || !entry.description) {\n return;\n }\n\n addEntryToDOM([entry]);\n storeEntry(entry);\n addMarker(entry);\n notifyUser('Your entry was posted successfully!');\n\n if (true === useLocation) {\n updateLocation(entry.entryID);\n }\n }", "function addEntry(int){\n pct = false;\n entries.push(int);\n updateScreen(convertEntries(entries));\n} // addEntry(int)", "function addNewItem() {\n log.debug('[TodoList] : addNewItem');\n\n var formValues = getFormValues();\n var id;\n // Edit or create new\n if (todo_id) {\n todoItem.set(formValues);\n todoItem.save();\n id = todo_id;\n } else {\n var newModel = Alloy.createModel(\"ToDo\", formValues);\n newModel.save();\n id = newModel.get(\"todo_id\");\n }\n\n // Make sure the collection is current\n todo.fetch();\n\n //alert(\"Saved this model: \" + JSON.stringify(newModel, null, 4));\n\n Alloy.Globals.Menu.setMainContent('TodoListDetail', {todo_id: id});\n\n}", "function add ( name, text ) {\n data.push( { id: data.length, name: name, text: text } );\n}", "function addTestEntry() {\n //random variable generation section\n let min = Math.floor(Math.random() * 9);\n let sec = Math.floor(Math.random() * 60);\n let paceEntry = min + \":\" + sec;\n\n let dateEntry = new Date();\n dateEntry.setDate(dateEntry.getDate() - Math.floor(Math.random() * 364) + 1);\n //same as in addEntry function\n // entries.push(new Entry('5:57', '2020-02-09', true));\n let entry = new Entry(paceEntry, dateEntry, false);\n entries.push(entry);\n //sorts entries array by date\n sortEntries();\n //save to local storage\n localStorage['entries-local'] = JSON.stringify(entries);\n createList();\n ctx.clearRect(0, 0, canvas.width, canvas.height); //clear existing canvas\n drawAxis();\n drawChart();\n}", "function addWorldEntry(keys, entry){\r\n worldEntries.push({keys: keys, entry:entry})\r\n}", "add(name, surname, id, gender, drivers_license, contact_number, address, vehicle_make, vehicle_series_name, license_plate, colour, year) {\n\t\tconsole.log('Sending',name, surname, id, gender, drivers_license, contact_number, address, vehicle_make, vehicle_series_name, license_plate, colour, year)\n\t\treturn $.ajax({\n\t\ttype: 'PUT',\n\t\turl: `${apiUrl}/entries`,\n\t\tcontentType: 'application/json; charset=utf-8',\n\t\tdata: JSON.stringify({\n \tname,\n\t\t\tsurname,\n\t\t\tid,\n\t\t\tgender,\n\t\t\tdrivers_license,\n\t\t\tcontact_number,\n\t\t\taddress, vehicle_make,\n\t\t\tvehicle_series_name,\n\t\t\tlicense_plate,\n\t\t\tcolour, \n\t\t\tyear,\n\t\t\t}),\n\t\t\tdataType: 'json',\n });\n}", "function addItem(data) {\n console.log(` Adding: ${data.lastName} (${data.owner})`);\n Items.insert(data);\n}", "function addItem(data) {\n console.log(` Adding: ${data.lastName} (${data.owner})`);\n Items.insert(data);\n}", "function addToCatalogue(){\n\tvar entry = createEntryFromTextbox();\n\tvar entryKey = createCatalogueKey(entry);\n\tsaveEntryToLocalStorage(entry, entryKey);\n\tcreateCatalogueTable();\n}", "function EditLogItemInsert () {}", "create(dn, entry, callback) {\n this.ldapClient.add(dn, entry, callback);\n }", "function addEntry(name, number, cellNumber, company, address, email, birthday, url){\n console.log(\"add entry was called\")\n //CREATRING OBJ\n //* conatct {\n // name: Nikhil\n // number: 646\n // ...\n// }\n var contact = {};\n contact['name'] = name;\n contact['number'] = number;\n contact['cellNumber'] = cellNumber;\n contact['company'] = company;\n contact['address'] = address;\n contact['email'] = email;\n contact['url'] = url;\n contact['birthday'] = birthday;\n contacts.push(contact);\n var index = contacts.length-1;\n\n let updateString = \"<tr onclick='loadDetails(\" + index + \")'><td>\" + name + \"</td></tr>\"\n\n //HTML code gets appended to left panel, adding rows to contact list <tr>\n $('#contactlist').append(updateString)\n}", "function addItem( entry ) {\n $http.post( storelist_url, entry ).then(\n function(response) {\n console.log(\"POST success\");\n console.log(response);\n deferred.resolve(response);\n },\n function(error) {\n console.log(\"POST error\");\n deferred.reject(error);\n }\n );\n return deferred.promise;\n }", "function saveEntry(newEntry) {\n console.log(JSON.stringify(newEntry));\n // create ajax PUT call with new entry id\n $.ajax({\n type: \"PUT\",\n url: `/api/entries/${newEntry.id}`,\n dataType: \"json\",\n contentType: \"application/json\",\n data: JSON.stringify(newEntry),\n\n headers: {\n Authorization: `Bearer ${jwt}`\n }\n })\n .done(function() {\n getUserDashboard();\n })\n .fail(function(jqXHR, error, errorThrown) {\n console.error(jqXHR);\n console.error(error);\n console.error(errorThrown);\n });\n}", "static addEntryToList(entry) {\n const list = document.querySelector('#journal-list');\n\n const row = document.createElement('tr');\n\n row.innerHTML = `\n <td>${entry.date}</td>\n <td>${entry.title}</td>\n <td>${entry.post}</td>\n `;\n\n list.appendChild(row);\n }", "function entryAddSuccess(entry) {\n entryAddRow(entry);\n formClear();\n}", "function insertInto(entry, db){\n if (entry.type =='node'){\n db.nodes.insert(entry)\n }\n else if (entry.type == 'edge'){\n db.edges.insert(entry)\n }\n else{\n console.log(\"attempt made to insert entry of unspecified type. Ignoring...\");\n }\n}", "function addEntry(search) {\nmongo.connect(url, function(err, db) {\n if (err) throw err;\n db.createCollection('searches'); // creates collection or ignores if already exists\n var searches = db.collection('searches');\n searches.insert({\n search: search\n }, function(err,data) {\n if (err) throw err;\n db.close();\n });\n}); \n}", "addFeed(feed) {\n this.add(feed.key, feed.value);\n }", "function add(key, value) {\r\nthis.datastore[key] = value;\r\n}", "addTask() {\n const input = qs('#addTask');\n saveTask(input.value, this.key);\n this.showList();\n }", "function add(){\n var name = $('#name').val();\n var count = $('#count').val();\n var value = $('#value').val();\n var room = $('#room').val();\n var condition = $('#condition').val();\n var date = $('#date').val();\n\n var item = {};\n item.name = name;\n item.count = count;\n item.value = value;\n item.room = room;\n item.condition = condition;\n item.date = date;\n\n items.push(item);\n Δitems.set(items);\n}", "insert(entry) {\n\t\tif(this.verifyShape(entry)){\n\t\t\t// entry is of the proper form, need to generate id\n\t\t\tlet id = this.generateID(entry.st);\n\t\t\t\n\t\t\t// Generate new object and inject id\n\t\t\tlet modifiedEntry = Object.assign({},entry,{_id:id})\n\t\t\t\n\t\t\t// Insert new entry to the hash (id : entry) and to the heap\n\t\t\tthis.hashTable[id] = modifiedEntry;\n\t\t\tthis.minHeap.insert(modifiedEntry);\n\t\t\treturn id;\n\t\t}else{\n\t\t\tthrow 'Entry is not of proper form!'\n\t\t}\n\t}", "async create(entryData) {\n // Test validity of data\n if(!entryData[config.FIELD_TITLE] || !entryData[config.FIELD_BODY]){\n throw new Error(config.ERROR_MALFORMEDDATA);\n }\n let entryId;\n if(config.DATABASE_ENVIRONMENT === config.ENVIRONMENT_PRODUCTION) {\n entryId = (await database\n .insert(entryData)\n .into(this.table)\n .returning(config.FIELD_ID)\n )[0];\n }\n else {\n entryId = (await database\n .insert(entryData)\n .into(this.table)\n )[0];\n }\n return this.get(entryId);\n }", "function addNominee(\n\tentry1,\n\tentry2,\n\tentry3,\n\tentry4,\n\tentry5,\n\tentry6,\n\tentry7,\n\tentry8,\n\tentry9,\n\tentry10\n) {\n\tif (\n\t\tentry1 != \"\" ||\n\t\tentry2 != \"\" ||\n\t\tentry3 != \"\" ||\n\t\tentry4 != \"\" ||\n\t\tentry5 != \"\" ||\n\t\tentry6 != \"\" ||\n\t\tentry7 != \"\" ||\n\t\tentry8 != \"\" ||\n\t\tentry9 != \"\" ||\n\t\tentry10 != \"\"\n\t) {\n\t\tlet nominee = {\n\t\t\tid: Date.now(),\n\t\t\temail: entry1,\n\t\t\tfname: entry2,\n\t\t\tlname: entry3,\n\t\t\tdistrict: entry4,\n\t\t\tposition: entry5,\n\t\t\taddress: entry6,\n\t\t\tcity: entry7,\n\t\t\tstate: entry8,\n\t\t\tzip: entry9,\n\t\t\teducation: entry10,\n\t\t\tstatus: \"Pending\",\n\t\t\tvotecount: 0,\n\t\t};\n\t\tnomineeArr.push(nominee);\n\t\tconsole.log(nomineeArr);\n\t\tinsertNominee(nomineeArr);\n\t\tconsole.log(nomineeArr);\n\t\talert(\"Success\");\n\t\tentry1.value = \"\";\n\t\tentry2.value = \"\";\n\t\tentry3.value = \"\";\n\t\tentry4.value = \"\";\n\t\tentry5.selectedIndex = 0;\n\t\tentry6.value = \"\";\n\t\tentry7.value = \"\";\n\t\tentry8.selectedIndex = 0;\n\t\tentry9.value = \"\";\n\t\tentry10.selectedIndex = 0;\n\t} else {\n\t\talert(\"Error! Please Try Again!\");\n\t}\n}", "function add() {}", "function addData(data) {\n console.log(` Adding: ${data.title} (${data.owner})`);\n Foods.insert(data);\n}", "function updateClick() {\n // Build entry object from inputs\n Entry = new Object();\n Entry.Name = $(\"#friendName\").val();\n Entry.LentDate = $(\"#introdate\").val();\n Entry.Amount = $(\"#amount\").val();\n if ($(\"#updateButton\").text().trim() ==\n \"Add\") {\n entryAdd(Entry);\n }\n}", "function postEntries (req, res) {\n return new Promise((resolve, reject) => {\n logger.debug('Request recieved to save new entry', {loggerModule, URL: req.originalUrl, value: req.body})\n // Creates a new account\n const newEntry = new Schema(req.body)\n // Save it into the DB.\n newEntry.save((err, entry) => {\n if (err) {\n logError(err, `Error creating entry ${req.originalUrl}`, loggerModule)\n sendStack ? res.send(err) : res.send({error: true, msg: 'An error has occoured'}) // Only send stack in dev\n reject(err)\n } else { // If no errors, send it back to the client\n res.json({ message: 'Entry successfully added!', success: true, entry })\n resolve(entry)\n }\n })\n })\n }", "function addData(e) {\n // prevent default - we don't want the form to submit in the conventional way\n e.preventDefault();\n\n // grab the values entered into the form fields and store them in an object ready for being inserted into the DB\n let newItem = { title: titleInput.value, body: bodyInput.value };\n\n // open a read/write db transaction, ready for adding the data\n let transaction = db.transaction(['notes_os'], 'readwrite');\n\n // call an object store that's already been added to the database\n let objectStore = transaction.objectStore('notes_os');\n\n // Make a request to add our newItem object to the object store\n let request = objectStore.add(newItem);\n request.onsuccess = function() {\n // Clear the form, ready for adding the next entry\n titleInput.value = '';\n bodyInput.value = '';\n };\n\n // Report on the success of the transaction completing, when everything is done\n transaction.oncomplete = function() {\n console.log('Transaction completed: database modification finished.');\n\n // update the display of data to show the newly added item, by running displayData() again.\n displayData();\n };\n\n transaction.onerror = function() {\n console.log('Transaction not opened due to error');\n };\n}", "function _add(e) {\n var index = e.getAttribute(\"id\");\n e.getElementsByTagName(\"img\")[0].setAttribute(\"class\", \"liked\");\n \n var entry;\n if (index >= entries.length) {\n entry = preferred[index - entries.length];\n } else {\n entry = entries[index];\n }\n\n if (!containsEntry(toAdd, entry)) {\n toAdd.push(entry);\n e.getElementsByTagName(\"h2\")[0].innerHTML = \"Remove <br> from <br> calendar\";\n e.getElementsByClassName(\"inner\")[0].className += \"show\";\n } else {\n removeEntry(toAdd, entry);\n e.getElementsByTagName(\"h2\")[0].innerHTML = \"Add <br> to <br> calendar\";\n e.getElementsByClassName(\"inner\")[0].className = \"inner four columns \";\n }\n}", "function _addEntries() {\n\t\ttry {\n\t\t\t//Get the Request Body\n\t\t\tvar oBody = JSON.parse($.request.body.asString());\n\n\t\t\t//Get the Next Item Number available\n\t\t\tvar lvItem;\n\t\t\tlvItem = _getNextItem(oBody.CONDITION_ID);\n\n\t\t\t//Get the Database connection\n\t\t\tvar oConnection = $.db.getConnection();\n\n\t\t\t//Build the Statement to insert the entries\n\t\t\tvar oStatement = oConnection.prepareStatement('INSERT INTO \"' + gvSchemaName + '\".\"' + gvTableName +\n\t\t\t\t'\" VALUES (?, ?, ?, ?, ?, ?)');\n\n\t\t\t//Loop through the items to be added to the database\n\t\t\tfor (var i = 0; i < oBody.ITEMS.length; i++) {\n\t\t\t\t//Populate the fields with values from the incoming payload\n\t\t\t\t//Id\n\t\t\t\toStatement.setInt(1, parseFloat(oBody.CONDITION_ID));\n\t\t\t\t//Item\n\t\t\t\tlvItem = lvItem + 1;\n\t\t\t\toStatement.setInt(2, lvItem);\n\t\t\t\t//Structure\n\t\t\t\toStatement.setString(3, oBody.ITEMS[i].STRUCTURE);\n\t\t\t\t//Field\n\t\t\t\toStatement.setString(4, oBody.ITEMS[i].FIELD);\n\t\t\t\t//Operator\n\t\t\t\toStatement.setString(5, oBody.ITEMS[i].OPERATOR);\n\t\t\t\t//Value\n\t\t\t\toStatement.setString(6, oBody.ITEMS[i].VALUE);\n\t\t\t\t//Add Batch process to executed on the database\n\t\t\t\toStatement.addBatch();\n\t\t\t}\n\t\t\t//Execute the Insert\n\t\t\toStatement.executeBatch();\n\n\t\t\t//Close the connection\n\t\t\toStatement.close();\n\t\t\toConnection.commit();\n\t\t\toConnection.close();\n\n\t\t\tgvTableUpdate = \"Table entries created successfully: \" + gvTableName + \";\";;\n\t\t\tgvStatus = \"Success\";\n\t\t} catch (errorObj) {\n\t\t\tif (oStatement !== null) {\n\t\t\t\toStatement.close();\n\t\t\t}\n\t\t\tif (oConnection !== null) {\n\t\t\t\toConnection.close();\n\t\t\t}\n\t\t\tgvTableUpdate = \"There was a problem inserting entries into the Table: \" + gvTableName + \", Error: \" + errorObj.message + \";\";\n\t\t\tgvStatus = \"Error\";\n\t\t}\n\t}", "function addEntry() {\n const title = $entryForm.querySelector('[name=\"title\"]').value;\n const body = $entryForm.querySelector('[name=\"bodyTextarea\"]').value;\n const entryObject = { title, body };\n console.log(entryObject);\n console.log(\"title: \", title);\n console.log(\"body: \", body);\n // entries.push({\n // title: title,\n // body: body\n // });\n\n fetch('/new', {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\"\n },\n body: JSON.stringify(entryObject)\n })\n .then(response => {\n console.log(response);\n if (response.ok) {\n // return response.text();\n return \n }\n alert('Error: ' + response.statusText);\n\n // response.redirect('/');\n })\n .then(postResponse => {\n console.log(postResponse);\n alert(\"Thanks for adding an entry!\");\n });\n\n}", "function postEntry(req, res) {\n //Check if entry a duplicate by title\n Entry.find({title: req.body.title}, function(err, entries) {\n\n if (entries.length === 0) {\n var reqEntry = new Entry(req.body);\n reqEntry.save(function(err, reqEntry) {\n if (err) {\n console.log(err);\n res.sendStatus(500);\n } else {\n res.sendStatus(200);\n }\n });\n } else {\n res.sendStatus(409);\n }\n });\n}", "createUserFish(newEntry){\n\t\treturn db.one(`INSERT INTO user_information(user_id, user_fish_id, user_fish_weight, user_fish_loc_id, user_fish_info) VALUES ($[user_id], $[user_fish_id], $[user_fish_weight], $[user_fish_loc_id], $[user_fish_info]) RETURNING id`, newEntry)\n\t}", "function add() {\n input = document.getElementById(\"input\");\n\n if (input.value == \"\") {\n return false;\n }\n\n let obj = {\n text: input.value,\n category: 'todo',\n id: getRandomId()\n }\n\n input.value = \"\";\n\n arr.todo.push(obj);\n writeone(arr.todo, todoList, obj)\n\n setChart();\n}", "function add(item){\n repository.push(item);\n }", "function addFriendEntry(el) {\n let template = document.querySelector(\"#friends-current\").content;\n let parent = document.querySelector(\".friends_current-parent\");\n let clone = template.cloneNode(true);\n clone.querySelector(\".paragraph\").textContent = el.username;\n // Add id to user\n clone.querySelector(\".button\").dataset.uuid = el._id;\n clone.querySelector(\"button\").addEventListener(\"click\", removeFriend);\n parent.appendChild(clone);\n // Create array for the friend for later use\n fluidFriendObject = {};\n}", "function createEntry(pokeTerm) {\r\n return (\r\n <Entry\r\n key={pokeTerm.id}\r\n img={pokeTerm.image}\r\n name={pokeTerm.name}\r\n description={pokeTerm.description}\r\n Evolutions={pokeTerm.Evolutions}\r\n />\r\n );\r\n}", "function addNewEntry() {\n \n $('.add').on('click', function(event){\n event.preventDefault();\n\t\t\n const activity = $('#new_activity').val();\n $('#new_activity').val('');\n const distanceCovered = $('#new_distance').val();\n\t\t$('#new_distance').val('');\n const timeElapsed = $('#new_time').val()\n $('#new_time').val('')\n const location = $('#new_location').val()\n $('#new_location').val('')\n const comment = $('#new_comment').val()\n $('#new_comment').val('')\n\t\t\n let data = {activity, distanceCovered, timeElapsed, location, comment};\n\t\t console.log(data.activity, data.timeElapsed);\n if (data.activity === '' || data.timeElapsed === '' || data.location === '') {\n \n\t\t\t $('.errorMsg3').show();\n\t\t }\n else {\t\t \n\t\t \n\t\t\t\t\n let settings = {\n method: \"POST\",\n body: JSON.stringify(data),\n headers: {\n \"Authorization\" : \"Bearer \" + token,\n \"Content-Type\": \"application/json\"\n }\n \n };\n fetch('/sports/create', settings)\n .then(response => {\n if (response.ok){\n return response.json();\n }\n\t\t else{\n throw new Error(\"You need to be authenticated\");\n }\n })\n .then(responseJson => {\n\t\t\t\t addLoadPage();\n\t \n })\n\t\t\t \n .catch(err => { \n\t\t\t $('.errorMsg3').show();\n\t\n });\n\t\t }\n\t\t\t\n })\n }", "function add() {\n console.warn(event);\n const input = document.getElementById('todo-input');\n\n // Emit the new todo as some data to the server\n if(input.value != \"\"){\n server.emit('add', {\n title : input.value\n });\n } else{\n alert(\"Please add something to do\");\n }\n // Clear the input\n input.value = '';\n}", "function entry(type, key, value) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: type,\n\t\t\t\t\tkey: key,\n\t\t\t\t\tvalue: value\n\t\t\t\t};\n\t\t\t}", "function createEntry(name, kicks, regain, addr, onFail, onSucceed) {\n const url = addr + \"/new\";\n const now = new Date();\n let entry = JSON.stringify(\n { name: name\n , activeKicks: kicks\n , lastHeartbeat: now\n , recoveryRate: regain.rate\n , recoveryHurdle: regain.hurdle\n , maxRecovery: regain.maximum\n , canNextSetKicks: now\n });\n createRequest(url, entry, \"POST\", onFail, onSucceed);\n\n}", "'submit .entity-entry'(event){\n\t\tevent.preventDefault();\n\n\t\tvar mtd = event.target.mtd.value;\n\t\tvar entityAddr = event.target.entityAddr.value;\n\t\tvar entityName = event.target.entityName.value;\n\n\t\tvar template = Template.instance();\n\n\t\tmyContract.addEntity(mtd, entityAddr, entityName, {data: code}, function (err, res){\n\t\t\tconsole.log(err);\n\t\t});\n\n\t\tevent.target.mtd.value = \" \";\n\t\tevent.target.entityAddr.value = \" \";\n\t\tevent.target.entityName.value = \" \";\n\t}", "function addData(data) {\n console.log(` Adding: ${data.title}`);\n console.log(` Adding: ${data.date}`);\n console.log(` Adding: ${data.image}`);\n console.log(` Adding: ${data.category}`);\n console.log(` Adding: ${data.price}`);\n console.log(` Adding: ${data.description}`);\n console.log(` Adding: ${data.location}`);\n console.log(` Adding: ${data.owner}`);\n Items.insert(data);\n}", "addEntry() {\r\n this.alterArrayMemberObjectDetails(\r\n 0,\r\n \"registerDate\",\r\n generateDate.formattedDate(new Date(Date.now()))\r\n );\r\n\r\n this.setTicker(true); //Adds a ticker\r\n\r\n axios({\r\n url: ROUTE,\r\n method: \"POST\",\r\n data: this.state.details[0],\r\n })\r\n //If there is a successful response, rebuild the table\r\n .then((_response) => {\r\n this.componentDidMount();\r\n })\r\n //If it fails, log & reflect on screen.\r\n .catch(() => {\r\n this.setTicker(false);\r\n console.error(\"CharitiesCMS: Error using POST route.\");\r\n document.getElementById(\"message\").innerText = \"Failed to add.\";\r\n });\r\n }", "function addData(data) {\n console.log(` Adding: ${data.name} (${data.icon})`);\n Reports.insert(data);\n}", "createRecord(){\n const logObject = {...this.response };\n var db = admin.database();\n var submissions = db.ref(\"advice/submissions\");\n const newSubmission = submissions.push(logObject);\n this.submissionId = newSubmission.key;\n this.response.submissionId = newSubmission.key;\n }", "function listingEntryCreate (listingEntry) {\n console.log(className+\".listingEntryCreate(\"+listingEntry+\")\");\n\n debugObject(listingEntry);\n\n var listingEntryHash = commit(\"listingEntry\", listingEntry);\n\n console.log(\"listingEntryHash = \"+listingEntryHash);\n\n // On the DHT, put a link from my hash to the hash of the new post\n var me = App.Agent.Hash;\n\n commit(\"listing_links\",{ Links: [ { Base: listingEntryHash,Link: me, Tag: \"listing_source\" } ] });\n\n return listingEntryHash;\n}", "function add() {\n\t\tvar item = document.getElementById(\"item\").value;\n\t\t$(\"#entry\").clone(true).appendTo(\"#list\").val('').removeClass(\"hidden\");\n\t\t$('li:last').text(item);\n\t\t}", "function addNew(){\n //ask new infomation \n var name = read.question('name: ');\n var phoneNum = read.question('phone number: ');\n //create object\n var newPhoneDir ={\n Name : name,\n phoneNumber : parseInt(phoneNum) // change from string to int\n }\n // push in telephone direction\n phoneDir.push(newPhoneDir);\n}", "add(key: K, val: V) {\n var ok = this.tree.insert([key, val]);\n if (!ok) {\n throw \"Key was already present.\";\n }\n }", "async createNewEntry(title, publicationDate, expiryDate, message, priority, pictureArray, otherDocArray) {\n\n\tconst _pubDate = publicationDate || -1;\n\tconst _expDate = expiryDate || -1;\n\t\n\tassert.equal(typeof(title), 'string', 'Title should be a string');\n\tassert.equal(typeof(message), 'string', 'Message should be a string');\n\tassert.equal(typeof(priority), 'number', 'priority should be 1, 2 or 3');\n\n\ttry {\n\t const sameTitle = await EntrySchema.findOne({title: title});\n\t if (sameTitle != null) {\n\t\tLogger.info('Entry with same title already exists');\n\t\treturn null;\n\t }\n\n\t const entry = {\n\t\ttitle: title,\n\t\tmessage: message,\n\t\tpriority: priority,\n\t\tcreation_date: Date.now(),\n\t\tpublication_date: _pubDate,\n\t\texpiry_date: _expDate,\n\t\tpictures: pictureArray,\n\t\tother_documents: otherDocArray\t\t\n\t };\n\n\t const entry_db = new EntrySchema(entry);\n\t const entry_inserted = await entry_db.save();\n\t Logger.info('Entry '+ title + ' has been created');\n\t return entry_inserted;\n\t}\n\tcatch (err) {\n\t Logger.error('Error occured while creating a new entry: ' + err);\n\t throw err;\n\t}\t\n }", "function add() {\n vm.error = undefined;\n service.add({\n description: vm.description\n }, function() {\n _fetch();\n }, function() {\n vm.error = 'An error occurred when adding a todo';\n });\n vm.description = '';\n }", "handleAddEntry() {\n this.setState((state,props) => {\n var entriesUpdate = state.numberOfEntries + 1;\n var nextEntryID = state.nextEntryID + 1;\n return {\n numberOfEntries: entriesUpdate,\n nextEntryID: nextEntryID,\n entries: Object.assign(state.entries, {[nextEntryID]:{\n name: \"\",\n value: null,\n tags: []\n }}),\n entriesErrors: Object.assign(state.entriesErrors, {[nextEntryID]:{\n name: null,\n value: null,\n }})\n }\n });\n }", "function add() {\n console.warn(event);\n const input = document.getElementById('todo-input');\n\n // Emit the new todo as some data to the socket\n socket.emit('make', {\n title : input.value,\n completed : false\n });\n\n // Clear the input\n input.value = '';\n input.focus();\n}", "function addContact(){\n var name = readLineSync.question('name: ');\n var phoneNum = readLineSync.question('phone: ');\n var contact = {\n Name: name,\n Phone: phoneNum\n };\n listContact.push(contact);\n save();\n console.log(\"\\nthem thanh cong nhe!\");\n}", "function buildNewEntryButton(journalSelf, entrySelf){\n\tvar button = document.createElement(\"button\");\n\tvar buttonLabel = document.createTextNode(\"Add Entry\");\n\tbutton.appendChild(buttonLabel);\n\n\tbutton.addEventListener('click', function(event){\t\n\t\tvar entriesData = new EntriesData ();\n\t\tvar entriesRelation = currentJournal.data.relation(\"userEntries\");\n\t\tparseInt(currentNumEntries, 10);\n\t\tcurrentNumEntries++;\n\t\tvar newEntryTitle = \"Entry\" + currentNumEntries;\n\t\tnewEntryTitle.toString();\n\t\t\n\t\tentriesData.save({\n\t\t\tentryTitle: newEntryTitle,\n\t\t\tentryText: \"\"\n\t\t}, \n\t\t{\n\t\t\tsuccess: function(results){\n\t\t\t\tconsole.log(\"Created new entry\");\n\t\t\t\tentriesRelation.add(entriesData);\n\t\t\t\tcurrentEntry = entrySelf;\n\t\t\t\tcurrentEntryIndex = 0;\n\t\t\t\tcurrentJournal.data.save(null, {\n\t\t\t\t\tsuccess: function (results){\n\t\t\t\t\t\trefreshEntriesSection(journalSelf, entrySelf);\n\t\t\t\t\t},\n\t\t\t\t\terror:function(error){\n\t\t\t\t\t\talert(\"Something went wrong: error is \" + error.message);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\terror: function(error){\n\t\t\t\tconsole.log(\"Error creating new entry. Error: \" + error);\n\t\t\t}\n\t\t});\n\n\t});\n\tnewEntryButton.appendChild(button);\n}", "_addItem () {\n if (this.state.input === '' ) return\n realm.write(() => {\n realm.create('Categories', { name: this.state.input })\n })\n }", "function recordAdded(title, ep) {\n added.push({title: title, ep: ep});\n }" ]
[ "0.7460456", "0.7325927", "0.7170439", "0.7136014", "0.70926416", "0.70185554", "0.6993922", "0.6872985", "0.68356615", "0.6819675", "0.67857546", "0.6768144", "0.6713991", "0.6699737", "0.6678103", "0.66315114", "0.66156495", "0.65291137", "0.6485474", "0.6456781", "0.6454897", "0.6446766", "0.64244276", "0.63962716", "0.6389104", "0.6360872", "0.6339778", "0.6335616", "0.63212967", "0.6319028", "0.6314412", "0.6301011", "0.62953085", "0.6288543", "0.6269309", "0.62514025", "0.62426674", "0.62415963", "0.6239466", "0.6229884", "0.62277246", "0.6210525", "0.61978066", "0.6193459", "0.61703354", "0.61680603", "0.6160618", "0.61515254", "0.61515254", "0.61259466", "0.6112865", "0.6092079", "0.6087659", "0.60832846", "0.60776573", "0.60619915", "0.60583", "0.60567313", "0.6049987", "0.6046359", "0.602821", "0.6010674", "0.6008667", "0.59990853", "0.5997113", "0.59849715", "0.59789383", "0.59675145", "0.59666663", "0.59665936", "0.59608996", "0.59542316", "0.59495956", "0.59482694", "0.59238166", "0.592038", "0.5920246", "0.59189206", "0.5906342", "0.5901873", "0.58973956", "0.587908", "0.58716565", "0.5870426", "0.5868012", "0.5867227", "0.5866086", "0.5858981", "0.58491254", "0.5839395", "0.5839231", "0.5837367", "0.5834138", "0.58311176", "0.58260375", "0.58257353", "0.58252275", "0.58236915", "0.5816286", "0.58158356", "0.5813666" ]
0.0
-1
Storing the attribute values of the checkboxes
function checkState() { for (var j = 0; j < entryList.length; j++) { checkedAttribs[j] = entryList[j].checked; // Verify the checked values with a console statement // console.log(entryList[j].checked + "" + j); classHidden[j] = entryList[j].parentNode.style.display; } console.log(classHidden); localStorage.setItem('checkboxStatuses', JSON.stringify(checkedAttribs)); localStorage.setItem('displayStatuses', JSON.stringify(classHidden)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCheckboxValues() {\n includeLowercase = lowerCaseCheckbox.checked;\n includeUppercase = uppercaseCheckbox.checked;\n includeNumeric = numericCheckbox.checked;\n includeSpecial = specialCheckbox.checked;\n}", "saveAttributes() {\n let newMarkedAttri = [];\n ElementHandler.getAllCheckboxesWithClass(\"attributeCheckboxes\").each(function () {\n if (this.checked) {\n newMarkedAttri.push($(this).val());\n }\n });\n\n this.client.attrMinMaxToggled.forEach(attr => {\n const min = ElementHandler.getElementFromId(\"input_min_\" + attr);\n const max = ElementHandler.getElementFromId(\"input_max_\" + attr);\n // Retrieve that attribute's min/max value\n const minValue = ElementHandler.getElementVal(min);\n const maxValue = ElementHandler.getElementVal(max);\n\n // Throw error if no value\n if (minValue == \"\" || maxValue == \"\") {\n throw new RangeError(\"Custom \"+ attr +\n \" attribute min/max error: Must enter min/max values\");\n }\n // Throw error if value can't be parsed to parseFloat\n if (isNaN(parseFloat(minValue)) || isNaN(parseFloat(maxValue))) {\n throw new RangeError(\"Custom \"+ attr +\n \" attribute min/max error: Value cannot be parsed to float\");\n }\n\n // Throw error if min is higher than max\n if (parseFloat(minValue) > parseFloat(maxValue)) {\n throw new RangeError(\"Custom \"+ attr +\n \" attribute min/max error: min value is higher than max value\");\n }\n\n this.client.attrMinMax[attr] = [minValue, maxValue];\n\n });\n this.client.attributeMarkedForTraining = newMarkedAttri;\n this.hide();\n }", "function getCheckboxValues(){//gets the values of whatever is checked among the tag checkboxes\n let checkedVals = [];\n $('input[type=checkbox]:checked').each(function(){\n checkedVals.push($(this).val());\n });\n return checkedVals;\n}", "getCheckedValues() {\n var checkedValues = $('input[name=' + this.props.inputProps.name + ']:checked').map(function (index, domElement) {\n return $(domElement).val();\n });\n return $.map(checkedValues, function (value, index) {\n return [value];\n }).join();\n }", "function populateAttributeList(msg) {\n msg.forEach(function(attr) {\n $('#attributeList').append(\"<li>\" + attr.content.stringValue + \"<input type='checkbox' value='\" + attr.content.stringValue + \"' id='\" + attr.value + \"'></li>\");\n $('#' + attr.value).click(function(e) {\n if ($(this)[0] && $(this)[0].checked) {\n console.log($(this)[0]);\n attributeNameValues.push($(this)[0].defaultValue);\n attributeDataValues.push($(this)[0].id);\n } else if ($(this)[0] && (!$(this)[0].checked)) {\n console.log($(this)[0]);\n attributeNameValues.splice(attributeNameValues.indexOf($(this)[0].defaultValue), 1);\n attributeDataValues.splice(attributeDataValues.indexOf($(this)[0].id), 1);\n }\n })\n });\n }", "function CheckBox_GetData()\n{\n\t//create an array for the result and return it with our value\n\treturn new Array(this.InterpreterObject.Properties[__NEMESIS_PROPERTY_CHECKED]);\n}", "function process_checkboxes(items,namespace) {\n $(':checkbox').each(function () {\n // enable checkboxes\n $(this).prop('disabled', false);\n\n // set checkbox value attribute\n if ($(this).val() === 'on') {\n // Find first sibling with a value or data-value attribute\n const sib = $(this).siblings('span[data-value],a[value],span[value],a[data-value]');\n let v = sib.attr('data-value');\n if (typeof v === 'undefined') {\n v = sib.attr('value');\n }\n\n if (typeof v === 'undefined') {\n // Fall back to the href of a link element\n v = $(this).siblings('a').attr('href');\n }\n\n if (typeof v === 'undefined') {\n v = 'skip';\n }\n\n $(this).val(v);\n }\n\n // apply stored settings\n if (items[$(this).val()]) {\n $(this).prop('checked', true);\n } else {\n $(this).prop('checked', false);\n }\n\n // create function to update on click\n $(this).click(function () {\n const v = $(this).val()\n if (v !== 'skip') {\n if ($(this).prop('checked')) {\n items[v] = true;\n $(':checkbox[value=\"' + v + '\"]').prop('checked', true);\n } else {\n items[v] = false;\n $(':checkbox[value=\"' + v + '\"]').prop('checked', false);\n }\n try {\n CarnapServerAPI.putAssignmentState(namespace,items);\n } catch {\n console.log('Unable to access CarnapServerAPI');\n }\n }\n });\n });\n}", "function turkeyValue() {\n if(tu.checked){\n meat.push(tu.value)\n }\n }", "function getcheckedvalues()\r\n {\r\n var arr = new Array();\r\n var inputs = $('.niceCheck').children('input');\r\n inputs.each(function() {\r\n var inp = $(this);\r\n if (inp.attr('checked') === 'checked')\r\n {\r\n if (inp.attr('value') != 'On') {\r\n arr.push(inp.attr('value'));\r\n }\r\n }\r\n });\r\n return arr;\r\n }", "function checkSave(){\n var cIDs = [];\n $('input:checkbox').each(function(){\n if(!!this.className && this.className.length>0){\n cIDs.push(this.className);\n }\n });\n var v={};\n for(const cID of [...new Set(cIDs)]){\n var notCK = [];\n for(const one of $(\".\"+cID+\":checkbox:not(:checked)\")){\n notCK.push(one.value);\n }\n v[cID] = notCK;\n }\n return v;\n}", "static get observedAttributes() {\n return ['checked', 'disabled'];\n }", "function updateCheckBoxes() {\n const checkboxes = [];\n\n checkboxes.push(document.querySelector('#inspiration'));\n\n checkboxes.push(document.querySelector('#dss1'));\n checkboxes.push(document.querySelector('#dss2'));\n checkboxes.push(document.querySelector('#dss3'));\n\n checkboxes.push(document.querySelector('#dsf1'));\n checkboxes.push(document.querySelector('#dsf2'));\n checkboxes.push(document.querySelector('#dsf3'));\n\n checkboxes.forEach((ele) => {\n if (ele.value === 'true') {\n ele.setAttribute('checked', 'checked');\n } else {\n ele.removeAttribute('checked');\n }\n });\n}", "function getAttributes(node) {\n var attrs = node.attributes;\n if (node.checked) {\n attrs = Array.prototype.slice.call(attrs);\n attrs.push({name: 'checked', value: node.checked});\n }\n return attrs;\n}", "function group_val_unchecked(klass){\n\n var approve = document.getElementsByClassName(klass);\n var values = [];\n for(var i=0; i < approve.length; i++){\n if(approve[i].checked){ \n }else{\n values.push(approve[i].value);\n }\n }\n return values;\n }", "function getSelectedCheckedBoxes() {\n if (getElements('flea').checked) {\n fleaValue = getElements('flea').value;\n } else {\n fleaValue = \"No\"\n };\n if (getElements('heartworm').checked){\n heartwormValue = getElements('heartworm').value;\n } else {\n heartwormValue = \"No\"\n };\n if (getElements('other').checked) {\n otherValue = getElements('other').value;\n } else{\n otherValue = \"No\"\n };\n }", "function tiendaStoreFormInputs(form) {\r\n\tvar values = new Array();\r\n\tfor ( i = 0; i < form.elements.length; i++) {\r\n\t\tvalue = {\r\n\t\t\tvalue : form.elements[i].value,\r\n\t\t\tchecked : form.elements[i].checked\r\n\t\t};\r\n\t\tvalues[form.elements[i].name] = value;\r\n\t}\r\n\treturn values;\r\n}", "function getCheckBoxesValue(checkboxNodeList)\n{\n let checkboxesArray = [];\n for (let i = 0; i < checkboxNodeList.length; i++)\n {\n if(checkboxNodeList[i].checked)\n {\n checkboxesArray.push(checkboxNodeList[i].value);\n }\n }\n\n //if nothing has been chosen\n if(checkboxesArray.length == 0)\n {\n checkboxesArray.push(\"none\");\n }\n\n return checkboxesArray;\n\n}", "function setCheckValues() {\n // setting the values for merchant options\n var options = document.getElementById(\"merchant-options\").getElementsByClassName(\"fancy-checkbox\");\n var inputs = options[0].getElementsByTagName(\"input\");\n var labels = options[0].getElementsByTagName(\"label\");\n\n for (var i = 0; i < labels.length; i++) {\n if (selectedOptions[\"MerchantOptions\"].indexOf(labels[i].innerText) > -1) {\n inputs[i].checked = true;\n }\n else {\n inputs[i].checked = false;\n }\n }\n\n // setting the values for buyer options\n var options = document.getElementById(\"buyer-options\").getElementsByClassName(\"fancy-checkbox\");\n var inputs = options[0].getElementsByTagName(\"input\");\n var labels = options[0].getElementsByTagName(\"label\");\n\n for (var i = 0; i < labels.length; i++) {\n if (selectedOptions[\"BuyerOptions\"].indexOf(labels[i].innerText) > -1) {\n inputs[i].checked = true;\n }\n else {\n inputs[i].checked = false;\n }\n }\n}", "function checkCategory(){\n let value; \n category.forEach(e=>{\n if(e.checked){\n value = e.value\n }\n })\n return value\n}", "function getValues() {\n\t\tvar values = {\n\t\t\tenabledTools: getCheckboxArray( 'enabled' ),\n\t\t\tphpcsStandards: getCheckboxArray( 'phpcs-standards' ),\n\t\t\tphpmdRulesets: getCheckboxArray( 'phpmd-rulesets' )\n\t\t};\n\t\t\n\t\treturn values;\n\t}", "function getSelectedCheckBoxValues(frmObj) {\n var checked = \"\";\n for (var i = 0; i < frmObj.elements.length; i++) {\n var elm = frmObj.elements[i];\n\n if ((elm.checked) && (elm.type == 'checkbox')) {\n checked = checked + elm.value + \"|\";\n }\n }\n return checked;\n}", "function _collectChecks() {\n var lReturn = [];\n var lSelect = $x_FormItems( that.spreadsheet_id, 'CHECKBOX' );\n for(var i=0,l=lSelect.length;i<l;i++){\n if(lSelect[i].checked && lSelect[i].id){\n lReturn[lReturn.length]=lSelect[i].value;\n }\n }\n return lReturn;\n }", "handleCheckboxes(){\n\n for(let cb of this.checkboxes){\n\n if(cb.selected){\n cb.element.classList.add(SELECTED_CLASS);\n }\n else{\n cb.element.classList.remove(SELECTED_CLASS);\n }\n\n cb.element.checked = cb.selected;\n }\n }", "checkboxEvent(name, checkedValue) {\n\n let updatedDecisionCards = {};\n Object.keys(this.state.decision_cards).forEach((v, i) => {\n if (v === name) {\n this.updateFinaleOutputWhenCheckboxIsChecked(name, i, checkedValue);\n updatedDecisionCards[name] = (checkedValue);\n }\n else {\n updatedDecisionCards[v] = this.state.decision_cards[v]\n }\n });\n\n this.updateDecisionCardsAndCheckedStorageWhenCheckboxIsChecked(updatedDecisionCards)\n\n }", "function citruscartStoreFormInputs(form) {\r\n\tvar values = new Array();\r\n\tfor ( i = 0; i < form.elements.length; i++) {\r\n\t\tvalue = {\r\n\t\t\tvalue : form.elements[i].value,\r\n\t\t\tchecked : form.elements[i].checked\r\n\t\t};\r\n\t\tvalues[form.elements[i].name] = value;\r\n\t}\r\n\treturn values;\r\n}", "function updateAttributeFields(checkbox) {\n checkbox = jQuery(checkbox);\n var preset = checkbox.is(\":checked\");\n\n var parent = checkbox.parents(\".attribute\");\n var maxLength = parent.find(\".max_length\");\n var choices = parent.find(\".choices\");\n var choiceLink = parent.find(\".add_choice_link\");\n var multiple = parent.find(\".multiple\");\n\n if (preset) {\n multiple.hide().find(\"input\").attr(\"checked\", false);\n maxLength.hide().find(\"input\").val(\"\");\n choices.show();\n choiceLink.show();\n }\n else {\n multiple.show();\n maxLength.show();\n choices.hide().html(\"\");\n choiceLink.hide();\n }\n}", "function getCheckboxIds() {\n var catIds = $(\"#gssi-checkbox-filter input:checked\").map(function () {\n return $(this).val();\n });\n\n catIds = catIds.get();\n catIds = catIds.join(',');\n\n return catIds;\n }", "function updateAttributeFields(checkbox) {\n checkbox = jQuery(checkbox);\n var preset = checkbox.is(\":checked\");\n\n var parent = checkbox.parents(\".attribute\");\n var maxLength = parent.find(\".max_length\");\n var choices = parent.find(\".choices\");\n var choiceLink = parent.find(\".add_choice_link\");\n var multiple = parent.find(\".multiple\");\n\n if (preset) {\n\tmultiple.hide().find(\"input\").attr(\"checked\", false);\n\tmaxLength.hide().find(\"input\").val(\"\");\n\tchoices.show();\n\tchoiceLink.show();\n }\n else {\n\tmultiple.show();\n\tmaxLength.show();\n\tchoices.hide().html(\"\");\n\tchoiceLink.hide();\n }\n}", "function serviceAnswers(){\n\tif(this.hasAttribute('checked')) {\n\t\tthis.removeAttribute('checked');\n\t\tanswer1List.splice( answer1List.indexOf(this.value), 1 );\n\t} else {\n\t\tthis.setAttribute('checked', 'checked');\n\t\tanswer1List.push(this.value);\n\t}\n\tconsole.log(answer1List);\n}", "function group_val(klass){\n\n var approve = document.getElementsByClassName(klass);\n var values = [];\n for(var i=0; i < approve.length; i++){\n if(approve[i].checked){\n values.push(approve[i].value);\n }\n }\n return values;\n }", "checkQuestBoxes(event) {\n event.preventDefault();\n const checkboxes = document.querySelector('#questCheckBoxes');\n const quest = checkboxes.querySelectorAll('input[type=\"checkbox\"]');\n const rewards = {};\n\n for (let i = 0; i < quest.length; i += 1) {\n quest[i].checked = 'checked';\n rewards[quest[i].name] = true;\n }\n this.setState({ rewards });\n }", "function checkboxVals() {\n var boxes = document.getElementsByName(\"emotion\");\n var retArr = [];\n\n for (var i = 0; i < boxes.length; i++) {\n if (boxes[i].checked) {\n retArr.push(boxes[i].value);\n }\n }\n\n return retArr.length > 0 ? retArr : null;\n}", "function getSelectedCheckboxValues(name) {\n const checkboxes = document.querySelectorAll(`input[name=\"${name}\"]:checked`);\n let values = [];\n checkboxes.forEach((checkbox) => {\n values.push(checkbox.value);\n });\n return values;\n}", "function assignPriceValue(tag){\n for (item of tag) {\n if (item.checked) {\n request.price_level = parseFloat(item.value); //assign the checked value\n }\n }\n}", "function displayCheckboxes() {\n $('#checkbox').text('');\n\n for (let i = 0; i < ingredientsArray.length; i++) {\n let pContainer = $(\"<p class=label>\");\n let labelContainer = $(\"<label class=option>\");\n let inputContainer = $(\"<input type=checkbox>\");\n let spanContainer = $('<span>');\n\n pContainer.addClass('col s2')\n inputContainer.addClass('filled-in checked=\"unchecked\"');\n spanContainer.text(ingredientsArray[i]);\n inputContainer.attr('value', ingredientsArray[i]);\n\n $('#checkbox').append(pContainer);\n pContainer.append(labelContainer);\n labelContainer.append(inputContainer);\n labelContainer.append(spanContainer);\n\n }\n}", "updateCheckboxes() {\n for (const id of this.compareList.keys()) {\n this._checkCheckbox(id);\n }\n }", "function populateCheckboxes(element) {\n var value = localStorage.getItem(element.attr('id'));\n\n // Make sure we're getting passed a checkbox\n if (element.attr('type') != 'checkbox')\n return;\n\n // If there is a value in localStorage, then set it,\n // otherwise unchecked it\n if (value == 'true') {\n element.attr('checked', true);\n } else {\n element.attr('checked', false);\n }\n}", "function loopForm(form) {\n var checkedArray = new Array();\n var uncheckedArray = new Array();\n \n for (var i = 0; i < form.elements.length; i++ ) {\n if (form.elements[i].type == 'checkbox') {\n if (form.elements[i].checked == true) {\n checkedArray.push(form.elements[i].value);\n \n } else {\n \t\tuncheckedArray.push(form.elements[i].value);\n \t\t\n }\n }\n }\n document.getElementById(\"checkedValues\").value=checkedArray;\n document.getElementById(\"unCheckedValues\").value=uncheckedArray;\n}", "function get_selected_checkboxes_array(){\n var ch_list=[]\n $(\"input:checkbox[type=checkbox]:checked\").each(function(){\n ch_list.push($(this).val());\n });\n return ch_list;\n}", "handleCheckboxes(){\n\n for(let cb of this.checkboxes){\n\n if(cb.selected){\n cb.element.classList.add(SELECTED_CLASS);\n }\n else{\n cb.element.classList.remove(SELECTED_CLASS);\n }\n }\n }", "function MultiChoice_submitHandler(element) {\n var checkboxes = element.checkboxes;\n\n // get all the values of checked checkboxes\n var checkboxValues = new Array();\n for(var i = 0; i < checkboxes.length; i++)\n if(checkboxes[i].checked)\n checkboxValues[checkboxValues.length] = checkboxes[i].value;\n\n // save the value\n element.value = top.code.arrayPacker_arrayToString(checkboxValues);\n\n return true;\n}", "function amenities(amenities){\n\tvar list = [];\n\tfor(i = 0; i < amenities.length; i++){\n\t\tif(amenities[i].checked){\n\t\t\tlist.push(amenities[i].value);\n\t\t}\n\t}\n\treturn list;\n}", "get checkbox(){ return this.__checkbox; }", "function getCheckboxArray( name ) {\n\t\t// Return values of checked checkboxes.\n\t\treturn $( 'input[ name=\"' + name + '[]\" ]:checked', $dialog ).map( function() {\n\t\t\treturn this.value;\n\t\t} ).get();\n\t}", "function CheckBox() {\n return (\n <div\n css={css`\n display: innli;\n flex-direction: column;\n align-content: center;\n text-align: center;\n `}\n >\n <form class=\"checkList\">\n <ul style={{padding: 0}}>\n {checkboxList.list.map(checkbox => (\n <React.Fragment>\n <input value={checkbox.Cname} style={{margin: '1px', background: 'black', color: 'white'}} id=\"input\" type=\"button\" onClick={(e) => {\n //true or false value\n checkbox.value = !checkbox.value\n categoryName.splice(0, categoryName.length)\n categoryName.push(checkbox.Cname)\n categoryCTag = categoryName \n // console.log(checkboxList) //FOR DEBUGGING\n // console.log(\"checbklsit_: \", categoryName)//FOR DEBUGGING\n }}\n />\n {/* <label>{checkbox.Cname}</label> */}\n </React.Fragment>\n ))\n }\n <input value=\"Clear\" style={{margin: '1px', background: 'black', color: 'white'}} id=\"input\" type=\"button\" onClick={(e) => {\n categoryName = []\n categoryCTag = categoryName\n }}\n />\n </ul>\n </form>\n </div>\n )\n\n}", "function checkBox() {\n var foobar = $('#foobar'),\n checkbox;\n\n for (var key in FamilyGuy) {\n foobar.append('<input type=\"checkbox\" id=\"' + key + '\"/>' +\n '<label for=\"' + key + '\">' + FamilyGuy[key].last_name + '</label>')\n }\n\n foobar.append('<p><a href=\"#\" id=\"enable\">Enable All</a></div><br /><div><a href=\"#\" id=\"disable\">Disable All</a></p>');\n\n $('#enable').on('click', function () {\n en_dis_able(true);\n });\n\n $('#disable').on('click', function () {\n en_dis_able(false);\n });\n\n function en_dis_able(value) {\n checkbox = $('input[type=\"checkbox\"]');\n for (var i = 0, s = checkbox.length; i < s; i++) {\n checkbox[i].checked = value;\n }\n }\n }", "get selectedCheckboxes() {\n return this.checkboxes.filter((checkbox) => checkbox.checked === true);\n }", "function setCheckboxValues()\r\n{\r\n if(document.getElementById(\"population\").checked) sessionStorage.setItem(\"population\",true); else sessionStorage.setItem(\"population\",false);\r\n if(document.getElementById(\"capital\").checked) sessionStorage.setItem(\"capital\",true); else sessionStorage.setItem(\"capital\",false);\r\n if(document.getElementById(\"demonym\").checked) sessionStorage.setItem(\"demonym\",true); else sessionStorage.setItem(\"demonym\",false);\r\n if(document.getElementById(\"languages\").checked) sessionStorage.setItem(\"languages\",true); else sessionStorage.setItem(\"languages\",false);\r\n if(document.getElementById(\"borders\").checked) sessionStorage.setItem(\"borders\",true); else sessionStorage.setItem(\"borders\",false);\r\n if(document.getElementById(\"currencies\").checked) sessionStorage.setItem(\"currencies\",true); else sessionStorage.setItem(\"currencies\",false);\r\n if(document.getElementById(\"latlng\").checked) sessionStorage.setItem(\"latlng\",true); else sessionStorage.setItem(\"latlng\",false);\r\n if(document.getElementById(\"area\").checked) sessionStorage.setItem(\"area\",true); else sessionStorage.setItem(\"area\",false);\r\n if(document.getElementById(\"flag\").checked) sessionStorage.setItem(\"flag\",true); else sessionStorage.setItem(\"flag\",false);\r\n if(document.getElementById(\"regionalBlocs\").checked) sessionStorage.setItem(\"regionalBlocs\",true); else sessionStorage.setItem(\"regionalBlocs\",false);\r\n if(document.getElementById(\"gini\").checked) sessionStorage.setItem(\"gini\",true); else sessionStorage.setItem(\"gini\",false);\r\n if(document.getElementById(\"numericCode\").checked) sessionStorage.setItem(\"numericCode\",true); else sessionStorage.setItem(\"numericCode\",false);\r\n if(document.getElementById(\"region\").checked) sessionStorage.setItem(\"region\",true); else sessionStorage.setItem(\"region\",false);\r\n if(document.getElementById(\"topLevelDomain\").checked) sessionStorage.setItem(\"topLevelDomain\",true); else sessionStorage.setItem(\"topLevelDomain\",false);\r\n}", "set_values(){\n this.state.data.forEach(row => {\n let panel_row = {};\n let id = this.state.data.indexOf(row)\n if(this.props.editable)\n panel_row['checkbox'] = <MDBInput size=\"sm\" label=\" \" type=\"checkbox\" onClick={b=>this.check_row(b)} id={id} />;\n for (const key in row) {\n if(key !== 'checkbox' || key !== '__proto__')\n panel_row[key] = row[key] \n } \n this.state.data_panel.push(panel_row);\n });\n\n }", "function UIValues(options2)\n{\n\t$(\"#imdbe_age\").prop(\"checked\", options2.age);\n\t$(\"#imdbe_genre\").prop(\"checked\", options2.genre);\n\t$(\"#imdbe_trailer\").prop(\"checked\", options2.trailer);\n\t$(\"#imdbe_connections\").prop(\"checked\", options2.connections);\n\t$(\"#imdbe_additionalRatings\").prop(\"checked\", options2.additionalRatings[\"on\"]);\n\t$(\"#imdbe_kinopoisk\").prop(\"checked\", options2.additionalRatings[\"kinopoisk\"]);\n\t$(\"#imdbe_rottenTomatoes\").prop(\"checked\", options2.additionalRatings[\"rottenTomatoes\"]);\n\t$(\"#imdbe_rMovies\").prop(\"checked\", options2.additionalRatings[\"rMovies\"]);\n\t$(\"#imdbe_tmdb\").prop(\"checked\", options2.additionalRatings[\"tmdb\"]);\n\t$(\"#imdbe_popupM\").prop(\"checked\", options2.popupM);\n\t$(\"#imdbe_popupP\").prop(\"checked\", options2.popupP);\n\t$(\"#imdbe_debug\").prop(\"checked\", options2.debug);\n}", "selectAll(event) {\n let selectedIntents = [];\n let updatedIntents = this.state.intents.map((intent) => {\n intent.checked = event.target.checked;\n return intent;\n })\n if(event.target.checked){\n selectedIntents = this.state.intents;\n } \n this.setState({\n intents: updatedIntents,\n selectedIntents: selectedIntents\n })\n console.log('selected intents', selectedIntents);\n }", "function save_inport_form(){\n var inport_form = document.getElementById(\"inportant_container\");\n //Reference all the CheckBoxes in Table.\n var checks = inport_form.getElementsByTagName(\"input\");\n for (var i = 0; i < checks.length; i++) {\n if (checks[i].checked) {\n selected_questions.push(checks[i].id);\n }\n }\n checkResults();\n}", "function updateCheckboxes(){\n\t$(\"table.benchmarks input\").each(function(i,obj){\n\t\t$(obj).attr('checked',(checked_benchmarks.indexOf(obj.value)!=-1));\n\t});\n}", "createOptions() {\n const checkboxArray = [];\n searchLabels.map(item => checkboxArray.push(\n <Checkbox\n key={item}\n className=\"madeBoxes\"\n subKey={item}\n checked={item === this.state.selectedItem}\n handleCheck={e => this.handleOptionCheck(e, item)}\n label={item}\n />,\n ));\n return checkboxArray;\n }", "function tomatoValue(){\n if(tm.checked){\n other.push(tm.value)\n }\n }", "function getValueForCheckbox(currentValue,checked,valueProp){// If the current value was a boolean, return a boolean\nif(typeof currentValue==='boolean'){return Boolean(checked);}// If the currentValue was not a boolean we want to return an array\nvar currentArrayOfValues=[];var isValueInArray=false;var index=-1;if(!Array.isArray(currentValue)){// eslint-disable-next-line eqeqeq\nif(!valueProp||valueProp=='true'||valueProp=='false'){return Boolean(checked);}}else {// If the current value is already an array, use it\ncurrentArrayOfValues=currentValue;index=currentValue.indexOf(valueProp);isValueInArray=index>=0;}// If the checkbox was checked and the value is not already present in the aray we want to add the new value to the array of values\nif(checked&&valueProp&&!isValueInArray){return currentArrayOfValues.concat(valueProp);}// If the checkbox was unchecked and the value is not in the array, simply return the already existing array of values\nif(!isValueInArray){return currentArrayOfValues;}// If the checkbox was unchecked and the value is in the array, remove the value and return the array\nreturn currentArrayOfValues.slice(0,index).concat(currentArrayOfValues.slice(index+1));}// React currently throws a warning when using useLayoutEffect on the server.", "function americanValue(){\n if(ac.checked){\n cheese.push(ac.value)\n }\n }", "function checkBox() {\n var checkboxes = document.getElementsByName(\"hobbies\"); \n let values = [];\n checkboxes.forEach((checkbox) => {\n if (checkbox.checked) {\n values.push(checkbox.value);\n } \n });\n // if(values.length < 3){\n \n // }\n return values;\n}", "get checked() {\n return this.hasAttribute(\"checked\");\n }", "function getChecks(){\n var keyword = d3.select(\"#keyword\").property(\"checked\"); \n var mesh = d3.select(\"#mesh\").property(\"checked\"); \n var mined = d3.select(\"#mined\").property(\"checked\"); \n\n return [keyword, mesh, mined]; \n}", "function selectedItems() {\n $('input').on('click', function () {\n console.log($(this).val())\n var checked = ($(this).val());\n selectedIngredients.push(checked)\n })\n}", "function getSelectedCheckboxes() {\n\n var checkboxes = document.getElementsByName('checkbox-data');\n var checkboxValues = [];\n\n for (var checkbox of checkboxes) {\n if (checkbox.checked) {\n checkboxValues.push(checkbox.value.toUpperCase());\n }\n }\n\n return checkboxValues;\n}", "function populate_roles_checkboxes() {\n // Populate all the roles checkboxes from the hidden fields.\n for (var i in roles) {\n var users = $('#'+roles[i]).val().split(',');\n for (var j in users) {\n $('#checkbox-'+roles[i]+'-'+users[j]).attr('checked', 'checked');\n }\n }\n}", "function populate_roles_checkboxes() {\n // Populate all the roles checkboxes from the hidden fields.\n for (var i in roles) {\n var users = $('#'+roles[i]).val().split(',');\n for (var j in users) {\n $('#checkbox-'+roles[i]+'-'+users[j]).attr('checked', 'checked');\n }\n }\n}", "function createData(){\n\tvar checkBoxArray = [];\n\t$('#qaTable').find('input[type=\"checkbox\"]').each(function () {\n\t\tvar checkBox = this;\n\n\t\tif(checkBox.checked == true){\n\t\t\tcheckBoxArray.push({\n\t\t\t\tid: checkBox.id,\n\t\t\t\tchecked: true\n\t\t\t})\n\n\t\t}else{\n\t\t\tcheckBoxArray.push({\n\t\t\t\tid: checkBox.id,\n\t\t\t\tchecked: false\n\t\t\t})\n\t\t}\n\t});\n\n\twaitForGetObjects(checkBoxArray);\n}", "function CheckBox_GetUserInputChanges()\n{\n\t//default result\n\tvar result = null;\n\t//we have input\n\tif (this.InterpreterObject.HasUserInput)\n\t{\n\t\t//get it\n\t\tresult = new Array({ Property: __NEMESIS_PROPERTY_CHECKED, Value: this.InterpreterObject.Properties[__NEMESIS_PROPERTY_CHECKED] });\n\t}\n\t//return the result\n\treturn result;\n}", "function getCheckbox() {\n let days = [];\n $(\"input[type=checkbox]:checked\").each(function () {\n days.push($(this).prop(\"id\"));\n });\n return days;\n}", "get checked() {\n return this.hasAttribute('checked');\n }", "function updatePersonalizedFeatures() {\n let options = document.querySelectorAll('input');\n\n for (let i=0; i<options.length; i++) {\n\n if (options[i].checked) {\n personalizedLens = options[i].value;\n }\n }\n return personalizedLens;\n}", "get fillAttrs() {\n return this.makeMap(\"checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected\")\n }", "function fillBehaviorCheckList ()\n {\n for (var i = 0; i < catLadyBehaviors.length; i++) {\n var description = catLadyBehaviors[i].description;\n var points = catLadyBehaviors[i].pointValue;\n var option = '<div class=\"checkbox\"><label><input type= \"checkbox\" class= \"behavior-checklist\"value=\"' + points +'\">'\n + description + '</label></div>';\n console.log(option);\n $('#checklist').append(option);\n }\n }", "checkAllEvent(checkedValue) {\n let updatedDecisionCards = {};\n Object.keys(this.state.decision_cards).forEach((dc, i) => {\n this.updateFinaleOutputWhenCheckboxIsChecked(dc, i, checkedValue);\n updatedDecisionCards[dc] = (checkedValue);\n });\n this.updateDecisionCardsAndCheckedStorageWhenCheckboxIsChecked(updatedDecisionCards)\n }", "function displayInfo(e){\n e.preventDefault();\n var checkedval = []\n\n var checked1 = document.travform.diet\n \n for(var i = 0; i < checked1.length; i++){\n if(checked1[i].checked == true){\n checkedval.push(checked1[i].value)\n }\n }\n\n\n alert(\"Firstname: \" + firstname.value + \" Lastname: \" + lastName.value + \"\\n Age: \" + age.value + \"\\nSex: \" + gender.value + \"\\nLocation: \" + selection.value + \"\\nDietary Restriction: \" + checkedval);\n \n \n}", "getFormDataToKeyValue(form) {\n let formData = [];\n for (let i = 0; i < form.elements.length; i++) {\n let element = form.elements[i];\n\n //HTML custom attribute\n let elementName = element.getAttribute(\"data-name\");\n let elementValue = element.value;\n if (elementName !== null) {\n\n\n //anticipate checkbox validation\n if (element.type === \"checkbox\") {\n if (element.checked === false) {\n elementValue = \"frCheckBoxNoValue\";\n }\n }\n\n\n //anticipate radio validation\n if (element.type === \"radio\") {\n if (element.checked === false) {\n elementValue = \"frRadioNoValue\";\n }\n }\n\n\n formData.push(elementName + \"=\" + elementValue);\n }\n }\n return formData;\n }", "function makeAttendersAjax() {\n var res = [];\n var attendersInputs = $(attendersListInput);\n\n for (var i = 0, lim = attendersInputs.length; i < lim; i += 1) {\n if (attendersInputs.eq(i).get()[0].checked) {\n res.push(attendersInputs.eq(i).attr(\"data-attender-id\"));\n }\n }\n\n return res;\n }", "function saveCheckbox(name) {\n\tlocalStorage[name] = ($('#' + name).is(':checked') ? 'true' : 'false');\n}", "function addItems(type, vals){\n var myModel = document.getElementById(type);\n var nameLabel = document.createElement('label');\n nameLabel.innerHTML = \"<b>\"+ type +\"</b><br />\";\n myModel.appendChild(nameLabel);\n \n for(var x=0; x<vals.length; x++){\n var makeLabel = document.createElement('label');\n makeLabel.innerHTML = vals[x];\n var makeCb = document.createElement(\"input\");\n makeCb.name = vals[x];\n makeCb.id = vals[x];\n makeCb.value = type;\n makeCb.type = \"checkbox\";\n myModel.appendChild(makeLabel);\n myModel.appendChild(makeCb);\n }\n myModel.innerHTML += \"<br /><br />\"; \n}", "function checkBox(){\n if($(\"action\" && \"sci-fi\").checked){\n genreValue = $(\"action\" && \"sci-fi\").value;\n \n \n }\n }", "function checkingValuesOfRadioBtns() {\n for (var i = 0; i < 10; i++) {\n var radioValues = $(\"input[name=quest_\" + i + \"]:checked\").data(\n \"reference\"\n );\n valuesFromRadio.push(radioValues);\n }\n console.log(\"the values are:\" + valuesFromRadio);\n }", "isChecked() {\n return this.hasAnyAttribute('checked');\n }", "writeValue(value) {\n this.setProperty('checked', value);\n }", "handleCheckboxChange(e) {\n\n\n if (e.detail.checked) {\n\n if (this.selectedList.find(element => element.value == e.target.value) == null) {\n this.selectedList = [\n ...this.selectedList,\n {\n label: e.target.label,\n value: e.target.value,\n selected: e.detail.checked\n }\n ]\n }\n } else // unchecked \n {\n this.selectedList = this.selectedList.filter(\n item => item.value != e.target.value\n );\n }\n\n this.displayList.map(element => {\n\n if (element.value == e.target.value) {\n\n element.selected = e.detail.checked;\n\n }\n\n });\n\n }", "handleChecked(event){\n const tempProduto = this.state.produto\n tempProduto[event.target.name] = event.target.checked;\n this.setState({ produto : tempProduto })\n console.log(this.state);\n }", "function saveToLocalStorage(e) {\r\n checked.length = 0;\r\n if($(e.target).is($checkboxes)) {\r\n $('.items li').each(function() {\r\n if($(this).find($checkboxes).prop('checked') === true) {\r\n checked.push($(this).find('label').text());\r\n }\r\n });\r\n }\r\n const checkedToJSON = JSON.stringify(checked);\r\n localStorage.setItem(`trip${tripId}`, checkedToJSON);\r\n}", "function getSelectedCateFilterItems() {\n let i = 0;\n let selected = [];\n $('#catFilter input:checked').each(function () {\n selected[i++] = $(this).val();\n });\n return selected;\n }", "function checkedAll()\n\t{\n\t \t var pollchecks = document.getElementsByTagName(\"INPUT\");\n\t\t var _return = false;\t \n\t\t for (var i = 0; i < pollchecks.length; i++)\n\t\t {\t\t\t\n\t\t\tif(pollchecks[i].type == \"checkbox\")\n\t\t\t{\n\t\t\t\t pollchecks[i].checked = true ;\n\t\t\t\t\n\t\t\t}\n\t\t }\n\t\t \n\t}", "get selected() {\n return this.checkboxTargets.filter(target => target.checked)\n }", "function setCheckBoxValues() {\n // finding the popup element\n var popUp = document.getElementById(\"popUpTime\");\n var checkBoxes = popUp.getElementsByClassName('fancy-checkbox');\n // iterating through all the checkboxes and setting the checkstatus to true if the value is stored in the array\n for (i = 0; i < checkBoxes.length; i++) {\n checkBoxes[i].childNodes[1].checked = checkBoxStatus[i];\n }\n}", "function storeLoadedParams() {\n // store top parameters\n $(\"#simulator-parameters-top\").find(\"input\").each(function(){\n switch ($(this).attr(\"class\")) {\n case \"PREM\":\n topParams[$(this).attr(\"class\")] = $(this).attr(\"checked\");\n break;\n default:\n topParams[$(this).attr(\"class\")] = $(this).val();\n break;\n }\n });\n // store bottom parameters\n $(\"#simulator-parameters-bottom\").find(\"input\").each(function(){\n switch ($(this).attr(\"class\")) {\n case \"PREM\":\n case \"CAPITOL\":\n case \"VID_KREPOST\":\n bottomParams[$(this).attr(\"class\")] = $(this).attr(\"checked\");\n break;\n default:\n bottomParams[$(this).attr(\"class\")] = $(this).val();\n break;\n }\n });\n}", "function selectCheckboxes(fm, v)\r\n\t{\r\n\t for (var i=0;i<fm.elements.length;i++) {\r\n\t var e = fm.elements[i];\r\n\t\t if (e.name.indexOf('active') < 0 &&\r\n\t\t e.type == 'checkbox')\r\n e.checked = v;\r\n\t }\r\n\t}", "function checkboxSelected(inputID){\n let outputArray = [];\n for(let i = 0; i < inputID.length; i++){\n if(inputID[i].checked === true){\n outputArray.push(inputID[i].value);\n }\n }\n return outputArray;\n}", "getAttributeData(val) {\r\n let product;\r\n let allSelected = true;\r\n // deep cloning\r\n product = JSON.parse(JSON.stringify(this.state.product));\r\n product.attributes[val[0]].selectedvalue = val[1];\r\n for (let i = 0; i < product.attributes.length; i++) {\r\n if (product.attributes[i].selectedvalue === -1) {\r\n allSelected = false;\r\n }\r\n }\r\n this.setState({ product: product });\r\n if (allSelected) {\r\n this.setState({ allowAddingToCart: true });\r\n }\r\n }", "checkboxMapping() {\n if (!this.state.loadingProject && !this.state.loadingYear) {\n let checkedYears = {};\n\n let yearsConcerned = this.state.project.study_year.map(year => year._id);\n\n this.state.years.forEach(year => {\n if (yearsConcerned.indexOf(year._id) !== -1) checkedYears[year._id] = true;\n else checkedYears[year._id] = false;\n });\n\n this.setState({\n checkedYears: checkedYears\n });\n }\n }", "function getCheckboxVal(classname) {\r\n\t\t\tvar checkboxes = []; //array will contain all checkboxes\r\n\t\t\tvar checked = []; //array will contain all checked checkboxes\r\n\t\t\tvar checks = document.getElementsByClassName(classname);\r\n\t\t\t// loop through list of checkboxes\r\n\t\t\tfor (var cNum=0; cNum<checks.length; cNum++) {\r\n\t\t\t\tif (checks[cNum].type == \"checkbox\") { //redundant piece of code that I included as I see future use for it in this function. \r\n\t\t\t\t\tcheckboxes.push(checks[cNum]);\r\n\t\t\t\t\tif (checks[cNum].checked) { // checkbox checked?\r\n\t\t\t\t\tchecked.push(checks[cNum].value);//Adds checked checkbox values (Topping names in this case) into an array.\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn checked; //return array of checked checkboxes or undefined if none checked.\r\n\t\t}", "function productosSeleccionados(){\n var seleccionados = new Array();\n $('input[type=checkbox]:checked').each(function() {\n seleccionados.push($(this).val());\n });\n return seleccionados;\n}", "function updateCheckboxes() {\n\t$('input[type=checkbox').each(function() {\n\t\tif($(this).is(':checked') )\n\t\t\t$(this).next().removeClass().addClass('fas fa-check-square');\n\t\telse\n\t\t\t$(this).next().removeClass().addClass('far fa-square');\n\t});\n}", "otherAttributeStates() {\n let state = {};\n for (var i in this.props.defaultAttributes) {\n state[\"batch_\" + this.props.defaultAttributes[i][\"name\"]]=false;\n state[\"editing_\" + this.props.defaultAttributes[i][\"name\"]]=false;\n }\n return state;\n }", "attributeChange(e) {\n\n var values = this.state.values;\n var value = e.target.value;\n var name = e.target.name;\n var index = e.target.attributes.getNamedItem('index').value;\n\n var tmp = [name, value];\n\n for (var i in values) {\n\n if (tmp[0] !== values[i][0] && values.length >= i) {\n values[i][index] = tmp;\n break;\n }\n }\n }", "componentDidMount() {\n let props = this.props;\n if (!props.eReq) {\n props.formSetValue(props.inputProps.name, '', true, false);\n }\n if (props.iSelectedValue) {\n const valueField = props.valueField;\n const name = props.inputProps.name;\n const filterData = this.data.filter(d => props.iSelectedValue.match(new RegExp(\"(?:^|,)\" + d[valueField] + \"(?:,|$)\")));\n\n $.each(filterData, function (index, data) {\n const value = data[valueField];\n document.getElementById(name + value).checked = true;\n });\n\n var value = this.getCheckedValues();\n props.formSetValue(name, value, true, false);\n }\n }", "input(e) { this.setState({ checkedAns: e.target.value }) }" ]
[ "0.68100977", "0.6715273", "0.65708226", "0.65407306", "0.641484", "0.6322653", "0.62947714", "0.6236526", "0.62242967", "0.61811966", "0.6178914", "0.61457574", "0.6120232", "0.6074181", "0.60731626", "0.60670966", "0.6061513", "0.6043491", "0.60344166", "0.60044694", "0.599294", "0.59806687", "0.5970046", "0.5965269", "0.5943714", "0.5937883", "0.58969957", "0.5886437", "0.5885795", "0.5877856", "0.5859415", "0.5849228", "0.58434117", "0.58284664", "0.581785", "0.5798402", "0.5796622", "0.5795212", "0.5789701", "0.57817495", "0.57776064", "0.57754064", "0.57547915", "0.5730383", "0.5720644", "0.5698061", "0.569699", "0.5694209", "0.5693135", "0.5691053", "0.56900793", "0.5681842", "0.56766254", "0.5676126", "0.56734675", "0.566967", "0.5654659", "0.5652705", "0.56377035", "0.5634551", "0.5632086", "0.56276345", "0.5624776", "0.5624776", "0.562265", "0.5614856", "0.5612006", "0.5607019", "0.55987346", "0.55963254", "0.55946046", "0.5588337", "0.5582224", "0.55771387", "0.5576692", "0.556758", "0.55623657", "0.5562062", "0.5556414", "0.5545114", "0.55350995", "0.55226487", "0.5507263", "0.5503249", "0.5485988", "0.54802346", "0.54718304", "0.5460213", "0.545568", "0.544818", "0.54396266", "0.5439512", "0.54363525", "0.543519", "0.5435158", "0.5430669", "0.54214317", "0.5418669", "0.5416031", "0.541541" ]
0.5662455
56
Restoring the checkbox statuses
function restoreChkbxStatus(len, increment) { const testArray = JSON.parse(localStorage.getItem('checkboxStatuses')); const anotherArray = JSON.parse(localStorage.getItem('displayStatuses')); for (var k = 0; k < len; k++) { entryList[k + increment].checked = testArray[k]; entryList[k + increment].parentNode.style.display = anotherArray[k]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function syncronizeCheckboxes(clicked, pri, pub) {\n pri.checked = false;\n pub.checked = false;\n clicked.checked = true;\n }", "function restore() {\n var i = 0;\n var list;\n while (that.data.lists[i] !== undefined) {\n list = that.data.lists[i];\n if (list.tChecked) {\n that.data.lists.splice(i, 1);\n removeListOnStorage(list.id, that.config.listKey);\n // make sure the list won't be checked if it ends in trash can again\n resetTchecked(list);\n gevent.fire(\"updateList\", list);\n } else {\n i++;\n }\n }\n }", "function checkState() {\n for (var j = 0; j < entryList.length; j++) {\n checkedAttribs[j] = entryList[j].checked;\n // Verify the checked values with a console statement\n // console.log(entryList[j].checked + \"\" + j);\n classHidden[j] = entryList[j].parentNode.style.display;\n }\n console.log(classHidden);\n localStorage.setItem('checkboxStatuses', JSON.stringify(checkedAttribs));\n localStorage.setItem('displayStatuses', JSON.stringify(classHidden));\n}", "function updateQuestions() {\n for (var i = 0; i < sortingCheckboxes.length; i++) {\n sortingCheckboxes[i].checked = false;\n }\n}", "function setCheckBoxStatus(index, id) {\r\n\tvar checked = true;\r\n document.getElementById('' + id + index).checked = checked;\r\n nlapiSetLineItemValue('custpage_list', id + 'val', index, (checked ? 'T'\r\n : 'F'));\r\n var val = nlapiGetLineItemValue('custpage_list', id + 'val', index);\r\n if(val == 'T'){\r\n unload_flag++;\r\n }\r\n else{\r\n unload_flag--;\r\n }\r\n\t/*\r\n if(unload_flag != 0){\r\n window.onbeforeunload = function () {\r\n return \"You have some unsubmitted data.\";\r\n };\r\n }\r\n else{\r\n window.onbeforeunload = null;\r\n }\r\n\t*/\r\n\r\n}", "toggleCheckedOutStatus() {\n this._isCheckedOut = !this._isCheckedOut;\n }", "function resetTchecked(list) {\n list.tChecked = undefined;\n }", "function clearPendingValueStatus(){\n _.each(pendingValueStatus, function(value){\n value.save({\"status\": \"ok\"}, {wait: true});\n });\n}", "function applyCheckbox(box)\n{\n\tif (box.checked)\n\t{\n\t\tuncheckedCount--\n\t\tupdateUnchecked()\n\t}\n\telse\n\t{\t\n\t\tuncheckedCount++\n\t\tupdateUnchecked()\n\t}\n}", "function unit_chkboxchange(status) {\r\n\tfor (i in trackerunitchk) {\r\n\t\t$(trackerunitchk[i]).checked = status;\r\n\t}\r\n}", "function deselectCBs() {\n d3.selectAll('.type-checkbox')\n .property('checked', false)\n update();\n d3.select('.kasiosCheckbox')\n .property('checked', false)\n kasios_update();\n}", "function deSelectAnswers(){\r\n answer1.forEach((e) =>{\r\n e.checked=false;\r\n });\r\n}", "function mouveLeaveCheckBoxes() {\n highlight.bubble = -1;\n highlight.inHist = null;\n refreshDisplay();\n}", "function updateCheckboxes(){\n\t$(\"table.benchmarks input\").each(function(i,obj){\n\t\t$(obj).attr('checked',(checked_benchmarks.indexOf(obj.value)!=-1));\n\t});\n}", "function updateCheckUncheck() {\n checkedState = !checkedState;\n if (checkedState) {\n browser.menus.update(\"check-uncheck\", {\n title: browser.i18n.getMessage(\"menuItemUncheckMe\"),\n });\n } else {\n browser.menus.update(\"check-uncheck\", {\n title: browser.i18n.getMessage(\"menuItemCheckMe\"),\n });\n }\n}", "updateCheckboxes() {\n for (const id of this.compareList.keys()) {\n this._checkCheckbox(id);\n }\n }", "toggleCheckOutStatus() {\n this._isCheckedOut ? this._isCheckedOut = false : this._isCheckedOut = true;\n }", "clearStates() {\n // applications should extend this to actually do something, assuming they can save locally\n }", "unCheckAll() {\n this.$selectAllCheckbox.prop('checked', false);\n this.$checkboxes.prop('checked', false);\n }", "function saveIndividualCheckbox() {\n if (saveIndividualID.checked == false) {\n saveLocalCheckboxID.disabled = true;\n saveLocalID.classList.add(\"greyOut\");\n saveLocalCheckboxID.checked = false;\n } else {\n saveLocalCheckboxID.checked = userSettings.saveLocal;\n saveLocalCheckboxID.disabled = false;\n saveLocalID.classList.remove(\"greyOut\");\n }\n}", "function setCheckButtonToInactive() {\n\t\t_myDispatcher.dispatch(\"iteration.checkbutton\", {\"state\":\"inactive\"});\n\t}", "clearEventLogRecordingsCheckbox() {\n this.packetRoot_.getElementsByTagName('input')[0].checked = false;\n }", "function uncheck(e) {\n // console.log(e);\n e.forEach((x) => x.checked = false)\n}", "function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({\n panel: true,\n remove: true,\n notify: true,\n restyle: true,\n console: false,\n console_deep: false,\n }, (items) => {\n for (let item in items) {\n document.getElementById(item).checked = items[item];\n }\n });\n}", "function cbChange(obj) {\nvar instate=(obj.checked);\n var cbs = document.getElementsByClassName(\"cb\");\n for (var i = 0; i < cbs.length; i++) {\n cbs[i].checked = false;\n }\n if(instate)obj.checked = true;\n}", "function update_status(context){\n let group = $(context).attr('data-check-selector-group');\n let checked = 0;\n let unchecked = 0;\n\n console.log('Checkbox Changed!');\n\n // check state of all checkboxes in the group\n $(`input[type=\"checkbox\"][data-check-selector-group=\"${group}\"]`).each(function(index){\n if($(this).prop('checked')) {\n checked += 1;\n } else {\n unchecked += 1;\n }\n });\n\n if( checked <= unchecked ) {\n select(group);\n } else {\n unselect(group);\n }\n }", "function clearAllCheckbox() {\n\t\tvar checkbox \t= 'input:checkbox';\n\t\tvar tr \t\t\t= 'tr';\n\t\t\n\t\t$(checkbox).removeAttr('checked');\n\t\t$(tr).removeClass(\"highlight\");\n\t\t$(checkbox).removeAttr('indeterminate');\n\t\t$(checkbox).prop(\"indeterminate\", false); \n\t\treset_check = true;\n\t\tkeepDirectionCheckboxes();\n\t}", "function restore_options() {\n document.getElementById(\"no_count\").checked = localStorage[\"tweet_nocount\"] == 1;\n document.getElementById(\"no_via\").checked = localStorage[\"tweet_novia\"] == 1;\n}", "function resetCheckbox(event) {\n event.target.checked = event.target.hasAttribute('checked');\n}", "function restore_options() {\n $('input:checkbox').click(function() {\n localStorage[this.id] = this.checked;\n chrome.tabs.sendRequest(parseInt(localStorage[\"tabID\"]), {'action' : 'restore_settings'}, function(response) {\n\n });\n show_success();\n if (this.id == 'notifications') {\n $('#mini_player').attr('disabled', !this.checked);\n $('#mini_player').parents('blockquote').toggleClass('disabled');\n }\n });\n $('input:checkbox').each(function(index) {\n if (localStorage[this.id] === undefined && this.id != 'support' && this.id != 'mini_player') {\n // console.log('first run, setting to true');\n localStorage[this.id] = 'false';\n }\n if (localStorage[this.id] == 'true') {\n this.checked = true;\n\n }\n else {\n this.checked = false;\n }\n });\n\n }", "function uncheck() {\n document.querySelector(\"#mcp1\").checked = false;\n document.querySelector(\"#mcp2\").checked = false;\n document.querySelector(\"#mcp3\").checked = false;\n document.querySelector(\"#mcp4\").checked = false;\n\n }", "function checkUncheck(e) {\n const itemId = e.target.id;\n\n if (list[itemId].done == false) {\n list[itemId].done = true;\n } else {\n list[itemId].done = false;\n }\n\n updateLocalStore();\n loadList();\n}", "function changeStatusForAll(form_name,chBox)\r\n{\r\n/*\r\n\tchBox corresponds to the check box name\r\n*/\r\n\r\n//var displayField=eval('document.'+form_name+'.' + chBox);\r\nvar objArray = eval('document'+'.'+form_name+'.'+chBox);\r\nif(objArray.length)\r\n{\r\n for(var i=0; i<objArray.length; i++){\r\n\t\tstatusFlag=eval('document.'+form_name+'.statusFlag')[i].value\r\n\t\t//alert(\"before statusFlag =\" + eval('document.'+form_name+'.statusFlag')[rowCont].value);\r\n\t\tif ((statusFlag==\"X\" || statusFlag==\"U\")&& eval('document.'+form_name+'.'+chBox)[i].checked)\r\n\t\t{ \r\n\t\t\teval('document.'+form_name+'.statusFlag')[i].value=\"D\";\r\n\t\t}\r\n\t\tif ((statusFlag==\"X\") && (! (eval('document.'+form_name+'.'+chBox)[i].checked)) )\r\n\t\t{\r\n\t\t\teval('document.'+form_name+'.statusFlag')[i].value=\"U\";\r\n\t\t}\r\n\t\t\r\n\t\tif (statusFlag==\"I\" && eval('document.'+form_name+'.'+chBox)[i].checked)\r\n\t\t{\r\n\t\t\teval('document.'+form_name+'.statusFlag')[i].value=\"C\";\r\n\t\t}\r\n\t\tif ((statusFlag==\"C\" && !(eval('document.'+form_name+'.'+chBox)[i].checked)))\r\n\t\t{\r\n\t\t\teval('document.'+form_name+'.statusFlag')[i].value=\"I\";\r\n\t\t}\r\n\t\tif ((statusFlag==\"D\" && !(eval('document.'+form_name+'.'+chBox)[i].checked)))\r\n\t\t{\r\n\t\t\teval('document.'+form_name+'.statusFlag')[i].value=\"U\";\r\n\t\t}\r\n\t\t//alert(\"after statusFlag =\" + eval('document.'+form_name+'.statusFlag')[rowCont].value);\r\n }\r\n}\r\nelse\r\n{\r\n\tstatusFlag=eval('document.'+form_name+'.statusFlag').value\r\n\tif ((statusFlag==\"X\" || statusFlag==\"U\")&& eval('document.'+form_name+'.'+chBox).checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"D\";\r\n\t}\r\n\tif ((statusFlag==\"X\") && (! (eval('document.'+form_name+'.'+chBox).checked)) )\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"U\";\r\n\t}\r\n\tif (statusFlag==\"I\" && eval('document.'+form_name+'.'+chBox).checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"C\";\r\n\t}\r\n\tif ((statusFlag==\"C\" && !(eval('document.'+form_name+'.'+chBox).checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"I\";\r\n\t}\r\n\tif ((statusFlag==\"D\" && !(eval('document.'+form_name+'.'+chBox).checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"U\";\r\n\t}\r\n}\r\n}", "restoreFormState() {\n \n // Set the appropriate button flags\n\n const reportItems = JSON.parse(localStorage.getItem(\"reportItems\"));\n \n if (reportItems != null) {\n\n reportItems.forEach(reportItem => {\n if (reportItem.question_text == this.props.question_text) {\n \n this.setState({\n button_flag: reportItem.button_flag,\n current_frequency_value: reportItem.current_frequency_value,\n current_severity_value: reportItem.current_severity_value,\n select_disable: reportItem.select_disable\n });\n\n return;\n }\n });\n\n }\n }", "function updateCheckboxes() {\n\t$('input[type=checkbox').each(function() {\n\t\tif($(this).is(':checked') )\n\t\t\t$(this).next().removeClass().addClass('fas fa-check-square');\n\t\telse\n\t\t\t$(this).next().removeClass().addClass('far fa-square');\n\t});\n}", "function resetCheckboxes(){\n $(\"#exitPop\").prop('checked', true);\n $(\"#autoplay\").prop('checked', false);\n $(\"#buyButton\").prop('checked', false);\n $(\"#salesText\").prop('checked', false);\n// $(\"#autoplay\").val('checked')[0].checked=false;\n// var attr = $(\"#autoplay\").val('checked')[0].checked;\n// console.log(attr);\n}", "toggleCheckOutStatus() {\n this.isCheckedOut = !this.isCheckedOut;\n }", "function changeStatus(form_name,chBox,src)\r\n{\r\n/*\r\n\tchBox corresponds to the check box name\r\n*/\r\n\r\nvar displayField=src.name;\r\nvar rowCont=getFieldInArray(src,displayField,form_name)\r\n\r\nif (rowCont!=null)\r\n{\r\n\t\r\n\tstatusFlag=eval('document.'+form_name+'.statusFlag')[rowCont].value\r\n\tPKValue=eval('document.'+form_name+'.PKValue')[rowCont].value\r\n}\r\nelse \r\n{\r\n\tstatusFlag=eval('document.'+form_name+'.statusFlag').value\r\n\tPKValue=eval('document.'+form_name+'.PKValue').value\r\n}\r\n\r\n\r\nif (rowCont!=null)\r\n{\r\n\t//alert(\"before statusFlag =\" + eval('document.'+form_name+'.statusFlag')[rowCont].value);\r\n\tif ((statusFlag==\"X\" || statusFlag==\"U\")&& eval('document.'+form_name+'.'+chBox)[rowCont].checked)\r\n\t{ \r\n\t\teval('document.'+form_name+'.statusFlag')[rowCont].value=\"D\";\r\n\t}\r\n\tif ((statusFlag==\"X\") && (! (eval('document.'+form_name+'.'+chBox)[rowCont].checked)) )\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag')[rowCont].value=\"U\";\r\n\t}\r\n\t\r\n\tif (statusFlag==\"I\" && eval('document.'+form_name+'.'+chBox)[rowCont].checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag')[rowCont].value=\"C\";\r\n\t}\r\n\tif ((statusFlag==\"C\" && !(eval('document.'+form_name+'.'+chBox)[rowCont].checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag')[rowCont].value=\"I\";\r\n\t}\r\n\tif ((statusFlag==\"D\" && !(eval('document.'+form_name+'.'+chBox)[rowCont].checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag')[rowCont].value=\"U\";\r\n\t}\r\n\t//alert(\"after statusFlag =\" + eval('document.'+form_name+'.statusFlag')[rowCont].value);\r\n\r\n}\r\nelse\r\n{\r\n\tif ((statusFlag==\"X\" || statusFlag==\"U\")&& eval('document.'+form_name+'.'+chBox).checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"D\";\r\n\t}\r\n\tif ((statusFlag==\"X\") && (! (eval('document.'+form_name+'.'+chBox).checked)) )\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"U\";\r\n\t}\r\n\tif (statusFlag==\"I\" && eval('document.'+form_name+'.'+chBox).checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"C\";\r\n\t}\r\n\tif ((statusFlag==\"C\" && !(eval('document.'+form_name+'.'+chBox).checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"I\";\r\n\t}\r\n\tif ((statusFlag==\"D\" && !(eval('document.'+form_name+'.'+chBox).checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.statusFlag').value=\"U\";\r\n\t}\r\n}\r\n}", "function ksFileBrowserUncheckAll(){\n $('.ksFileBrowserCheckbox').attr('checked', false);\n $('.ksFolderBrowserCheckbox').attr('checked', false);\n}", "function CHMcheckUncheckAll(isCheck, formName, fieldName)\r\n{\r\n var obj = eval('document.'+formName+'.'+fieldName);\r\n\tvar len ;\r\n\t\r\n\tif(obj) len = obj.length;\r\n\telse return;\r\n\t\r\n\tif( len == null )\r\n\t\t{\r\n\t\t\tif(! obj.disabled)\r\n\t\t\t{\r\n\t\t\t\tobj.checked = isCheck;\r\n\t\t\t\tchangeStatus(formName,fieldName,obj)\r\n\t\t\t}\r\n\t\t}\r\n\telse\r\n\t{\r\n\t\tfor(var lvar_Cnt=0; lvar_Cnt < len; lvar_Cnt++)\r\n\t\t{\r\n\t\t if(! obj[lvar_Cnt].disabled) {\r\n\t\t\t obj[lvar_Cnt].checked = isCheck;\r\n \t\t\t changeStatus(formName,fieldName,obj[lvar_Cnt])\r\n\t\t }\r\n\t\t}\r\n\t}\r\n\treturn;\r\n}", "function restoreOptions() {\n // Default values.\n chrome.storage.sync.get({\n notifications: true,\n counters: true,\n buttons: true,\n }, function(items) {\n $(INPUT_NOTIFICATIONS_SELECTOR).prop('checked', items.notifications);\n $(INPUT_COUNTERS_SELECTOR).prop('checked', items.counters);\n $(INPUT_BUTTONS_SELECTOR).prop('checked', items.buttons);\n });\n}", "updateCheckedSetting() {\n\t\tthis.switchControl.$input.prop( 'checked', this.currentValues.inset );\n\t}", "function ReverseCheckAllCategoryCheckBoxes ()\n{\n\tvar checkAllCat = document.getElementById (\"checkAllCat\");\n\tvar categoryCheckBox=document.getElementsByName(\"CategoryCheckBox\");\n\tvar flag = true;\n\tif (categoryCheckBox.length > 0)\n\t{\n\t\tfor (var j = 0; j < categoryCheckBox.length; j++)\n\t\t{\n\t\t\tif (categoryCheckBox[j].checked != 1)\n\t\t\t{\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (flag)\n\t\tcheckAllCat.checked = 1;\n\telse\n\t\tcheckAllCat.checked = 0;\n}", "function save(){\n var checkbox1 = document.getElementById('onoffswitch1');\n localStorage.setItem('onoffswitch1', checkbox1.checked);\n\n var checkbox2 = document.getElementById('onoffswitch2');\n localStorage.setItem('onoffswitch2', checkbox2.checked);\n}", "toggleCheckOutStatus() {\n this._isCheckedOut = !this._isCheckedOut;\n }", "function restore_options() {\n $('#options-list input[type=\"checkbox\"]').each(function() {\n var obj = {};\n var check = $(this);\n obj[$(this).attr('id')] = 1;\n chrome.storage.sync.get(obj,\n function(item) {\n $(\"#\" + check.attr('id')).prop(\"checked\", item[check.attr('id')]);\n }\n );\n });\n $('#options-list input[type=\"text\"]').each(function() {\n var obj = {};\n var text = $(this);\n obj[$(this).attr('id')] = $(this).text();\n chrome.storage.sync.get(obj,\n function(item) {\n $(\"#\" + text.attr('id')).prop(\"value\", item[text.attr('id')]);\n }\n );\n });\n}", "function save_checkbox(id){\n\nvar checkbox_status = document.getElementById(id).checked;\n\n if(window.localStorage){//if localStorage exists\n window.localStorage.clear('checked_status');\n window.localStorage.setItem('checked_status', checkbox_status);\n console.log('Checkbox has been set to '+ checkbox_status);\n }\n}", "function uncheckOnInit(){\r\n\t\t\r\n\t\tvar objCheckboxes = g_objWrapper.find(\".uc-filelist-checkbox\");\r\n\r\n\t\tobjCheckboxes.each(function(){\r\n\t\t\tvar checkbox = jQuery(this);\r\n\t\t\tvar initChecked = checkbox.data(\"initchecked\");\r\n\t\t\t\r\n\t\t\tif(!initChecked)\r\n\t\t\t\tcheckbox.prop('checked', false);\r\n\t\t});\r\n\t\t\r\n\t}", "function uncheckAll(){\n $('#exploration').find('input[type=\"checkbox\"]:checked').prop('checked',false);\n for (var filter in checkboxFilters) {\n checkboxFilters[filter].active = false;\n }\n createDistricts();\n }", "function changeStatusForMultipleDetail(form_name,chBox,src, status)\r\n{\r\n/*\r\n\tchBox corresponds to the check box name\r\n*/\r\n\r\nvar displayField=src.name;\r\nvar rowCont=getFieldInArray(src,displayField,form_name)\r\nif (rowCont!=null)\r\n{\r\n\tstatusFlag=eval('document.'+form_name+'.' + status)[rowCont].value\r\n}\r\nelse \r\n{\r\n\tstatusFlag=eval('document.'+form_name+'.' + status).value\r\n}\r\n\r\n\r\nif (rowCont!=null)\r\n{\r\n\t//alert(\"before statusFlag =\" + eval('document.'+form_name+'.statusFlag')[rowCont].value);\r\n\tif ((statusFlag==\"X\" || statusFlag==\"U\")&& eval('document.'+form_name+'.'+chBox)[rowCont].checked)\r\n\t{ \r\n\t\teval('document.'+form_name+'.' + status)[rowCont].value=\"D\";\r\n\t}\r\n\tif ((statusFlag==\"X\") && (! (eval('document.'+form_name+'.'+chBox)[rowCont].checked)) )\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status)[rowCont].value=\"U\";\r\n\t}\r\n\t\r\n\tif (statusFlag==\"I\" && eval('document.'+form_name+'.'+chBox)[rowCont].checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status)[rowCont].value=\"C\";\r\n\t}\r\n\tif ((statusFlag==\"C\" && !(eval('document.'+form_name+'.'+chBox)[rowCont].checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status)[rowCont].value=\"I\";\r\n\t}\r\n\tif ((statusFlag==\"D\" && !(eval('document.'+form_name+'.'+chBox)[rowCont].checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status)[rowCont].value=\"U\";\r\n\t}\r\n\t//alert(\"after statusFlag =\" + eval('document.'+form_name+'.statusFlag')[rowCont].value);\r\n\r\n}\r\nelse\r\n{\r\n\tif ((statusFlag==\"X\" || statusFlag==\"U\")&& eval('document.'+form_name+'.'+chBox).checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"D\";\r\n\t}\r\n\tif ((statusFlag==\"X\") && (! (eval('document.'+form_name+'.'+chBox).checked)) )\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"U\";\r\n\t}\r\n\tif (statusFlag==\"I\" && eval('document.'+form_name+'.'+chBox).checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"C\";\r\n\t}\r\n\tif ((statusFlag==\"C\" && !(eval('document.'+form_name+'.'+chBox).checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"I\";\r\n\t}\r\n\tif ((statusFlag==\"D\" && !(eval('document.'+form_name+'.'+chBox).checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"U\";\r\n\t}\r\n}\r\n}", "function uncheckedAll()\n\t{\n\t \t var pollchecks = document.getElementsByTagName(\"INPUT\");\n\t\t var _return = false;\t \n\t\t for (var i = 0; i < pollchecks.length; i++)\n\t\t {\t\t\t\n\t\t\tif(pollchecks[i].type == \"checkbox\")\n\t\t\t{\n\t\t\t\t pollchecks[i].checked = false;\n\t\t\t\t\n\t\t\t}\n\t\t }\n\t\t \n\t}", "function cancelSetting() {\n $('input:checkbox').each(function (i, elem) {\n $(this).next('label').removeClass('without-pay');\n $(this).next('label').removeClass('paid');\n $(this).attr('checked', false);\n document.getElementById($(this).attr('id')).disabled = false;\n });\n}", "function changeState(id) {\n 'use strict';\n for (var key in checkboxStates){\n if (key == id ){\n checkboxStates[key] = !checkboxStates[key];\n sessionStorage.setItem(\"checkBoxStates\", JSON.stringify(checkboxStates));\n // console.log(checkboxStates);\n }\n }\n}", "function excluyentes(seleccionado) {\n programador_web.checked = false; \n logistica.checked = false;\n peon.checked = false;\n \n seleccionado.checked = true; \n}", "function ReverseCheckAllSocialNetworkCategoryCheckBoxes ()\n{\n\tvar checkAllSocialNetworkCat = document.getElementById (\"checkAllSocialNetworkCat\");\n\tvar categoryCheckBox=document.getElementsByName(\"SocialNetworkCategoryCheckBox\");\n\tvar flag = true;\n\tif (categoryCheckBox.length > 0)\n\t{\n\t\tfor (var j = 0; j < categoryCheckBox.length; j++)\n\t\t{\n\t\t\tif (categoryCheckBox[j].checked != 1)\n\t\t\t{\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif(checkAllSocialNetworkCat!=null)\n\t{\n\t\tif (flag)\n\t\t\tcheckAllSocialNetworkCat.checked = 1;\n\t\telse\n\t\t\tcheckAllSocialNetworkCat.checked = 0;\n\t}\n}", "function checkUncheckAllForMultipleDetail(isCheck, formName, fieldName, statusFlag)\r\n{\r\n var obj = eval('document.'+formName+'.'+fieldName);\r\n\tvar len ;\r\n\t\r\n\tif(obj) len = obj.length;\r\n\telse return;\r\n\t\r\n\tif( len == null )\r\n\t{\r\n\t\tif(!obj.disabled)\r\n\t\t{\r\n\t\t\tobj.checked = isCheck;\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tfor(var lvar_Cnt=0; lvar_Cnt < len; lvar_Cnt++)\r\n\t\t{\r\n\t\t if(! obj[lvar_Cnt].disabled) {\r\n\t\t\t obj[lvar_Cnt].checked = isCheck;\r\n \t\t\t changeStatusForMultipleDetail(formName,fieldName,obj[lvar_Cnt], statusFlag)\r\n\t\t }\r\n\t\t}\r\n\t}\r\n\treturn;\r\n}", "function reloadChkDisplay() {\n\n\tclearChkField('clearAllChk');\n\timportXML('','files/xml/checklist.xml',true);\n\tgoToAnchor('#checkList');\n}", "updateChecked(state, checked) {\r\n state.checked = checked;\r\n }", "function restore_options(obj) {\n document.getElementById(\"filter\").checked = obj[\"filter_enabled\"] == undefined ? true : obj[\"filter_enabled\"];\n document.getElementById(\"stats\").checked = obj[\"stats_enabled\"] == undefined ? true : obj[\"stats_enabled\"];\n}", "function prepareInitialCheckboxes() {\n\tfor (var i = 1; i <= $v(\"totalLines\");) {\n\t\tif (cellValue(i, \"application\") == 'All') {\n\t\t\tvar topRowId = i;\n\t\t\tvar preCompanyId = cellValue(topRowId, \"companyId\");\n\t\t\tvar preFacilityId = cellValue(topRowId, \"facilityId\");\n\t\t\tfor (i++; i <= $v(\"totalLines\"); i++) {\n\t\t\t\tif (preCompanyId == cellValue(i, \"companyId\") && preFacilityId == cellValue(i, \"facilityId\")) { //check if the row is still within scope\n\t\t\t\t\tfor (var j = 0; j <= $v(\"headerCount\"); j++) {\n\t\t\t\t\t\tvar colName = config[5 + 2 * j].columnId;\n\t\t\t\t\t\t//Note: 5 being the no. of columns before the Permission columns (starting from 0)\n\t\t\t\t\t\t// 2 * j is the index of the columns contain check boxes (skipping preceding hidden columns)\n\t\t\t\t\t\tif (cell(topRowId, colName).isChecked()) {\n\t\t\t\t\t\t\tif (cell(i, colName).isChecked())\n\t\t\t\t\t\t\t\tcell(i, colName).setChecked(false);\n\t\t\t\t\t\t\tcell(i, colName).setDisabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tpreCompanyId = cellValue(i, \"companyId\");\n\t\t\t\t\tpreFacilityId = cellValue(i, \"facilityId\");\n\t\t\t\t} else\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else\n\t\t\ti++;\n\t}\n}", "function undo() \r\n {\r\n addressRef.value = address;\r\n roomNumberRef.value = roomNumber;\r\n seatsUsedRef.value = seatsUsed;\r\n seatsTotalRef.value = seatsTotal;\r\n updateTextfieldClasses();\r\n useAddress ? useAddressClassRef.MaterialCheckbox.check() : \"\";\r\n lightsOn ? lightsClassRef.MaterialSwitch.on() : \"\";\r\n heatingCoolingOn ? heatingCoolingClassRef.MaterialSwitch.on() : \"\"; \r\n \r\n snackbarContainer.MaterialSnackbar.cleanup_();\r\n }", "function retrieveCurrentProgress(){\n const checkboxes = document.querySelectorAll(\".checkboxSquare\");\n for(let i=0;i<checkboxes.length-1;i++){\n console.log(localStorage.getItem(checkboxes[i].id))\n\n if(localStorage.getItem(checkboxes[i].id)==\"true\"){\n checkboxes[i].checked = true;\n addProgress()\n } else {\n checkboxes[i].checked = false;\n // console.log(localStorage.getItem(checkboxes[i]), \"Retrieved true\")\n }\n };\n \n}", "function setSubmitsFromCheckboxes () {\n\tvar upd = $(\"update\");\n\tvar del = $(\"delete\");\n\tvar isAnyRowChecked = $$(\"input[type='checkbox']\"). any (function (c) {\n\t\treturn c.checked;\n\t});\n\tupd.disabled = (! isAnyRowChecked) || upd.fieldValidationSaysDoNotEnable;\n\tdel.disabled = (! isAnyRowChecked) || del.fieldValidationSaysDoNotEnable;\n\tupd.mainSaysDoNotEnable = ! isAnyRowChecked;\n\tdel.mainSaysDoNotEnable = ! isAnyRowChecked;\t\t\n}", "function checkAllTask(e){\n\n var status = false;\n if(e.target.checked){\n status = true;\n }\n\n for(var i = 0 ; i < loginUser.tasks.length; i++){\n loginUser.tasks[i].status = status;\n }\n collectionOfUser.update(\n {\n id : loginUser.id,\n tasks : loginUser.tasks\n },\n function(user){\n loginUser = user;\n $('#containerShowTask').html('');\n showAllTasks(loginUser.tasks);\n },\n error \n );\n }", "setToscheckbox() {\n\n if (config.debug==true) { console.log(\"in BecomeOwnerApp/setToscheckbox\"); }\n\n if (this.state.toschecked)\n {\n //unchecked\n this.setState({toschecked: false});\n\n }\n else\n {\n //checked\n this.setState({toschecked: true});\n this.setState({ forgottochecktos: false });\n }\n }", "function changeStatusForAllForMultipleDetail(form_name,chBox,status)\r\n{\r\n/*\r\n\tchBox corresponds to the check box name\r\n*/\r\n\r\n//var displayField=eval('document.'+form_name+'.' + chBox);\r\nvar objArray = eval('document'+'.'+form_name+'.'+chBox);\r\nif(objArray.length)\r\n{\r\n for(var i=0; i<objArray.length; i++){\r\n\t\t//statusFlag=eval('document.'+form_name+'.statusFlag')[i].value\r\n\t\tstatusFlag=eval('document.'+form_name+'.' + status)[i].value\r\n\t\t//alert(\"before statusFlag =\" + eval('document.'+form_name+'.statusFlag')[rowCont].value);\r\n\t\tif ((statusFlag==\"X\" || statusFlag==\"U\")&& eval('document.'+form_name+'.'+chBox)[i].checked)\r\n\t\t{ \r\n\t\t\teval('document.'+form_name+'.' + status)[i].value=\"D\";\r\n\t\t}\r\n\t\tif ((statusFlag==\"X\") && (! (eval('document.'+form_name+'.'+chBox)[i].checked)) )\r\n\t\t{\r\n\t\t\teval('document.'+form_name+'.' + status)[i].value=\"U\";\r\n\t\t}\r\n\t\t\r\n\t\tif (statusFlag==\"I\" && eval('document.'+form_name+'.'+chBox)[i].checked)\r\n\t\t{\r\n\t\t\teval('document.'+form_name+'.' + status)[i].value=\"C\";\r\n\t\t}\r\n\t\tif ((statusFlag==\"C\" && !(eval('document.'+form_name+'.'+chBox)[i].checked)))\r\n\t\t{\r\n\t\t\teval('document.'+form_name+'.' + status)[i].value=\"I\";\r\n\t\t}\r\n\t\tif ((statusFlag==\"D\" && !(eval('document.'+form_name+'.'+chBox)[i].checked)))\r\n\t\t{\r\n\t\t\teval('document.'+form_name+'.' + status)[i].value=\"U\";\r\n\t\t}\r\n\t\t//alert(\"after statusFlag =\" + eval('document.'+form_name+'.statusFlag')[rowCont].value);\r\n }\r\n}\r\nelse\r\n{\r\n\t//statusFlag=eval('document.'+form_name+'.statusFlag').value\r\n\tstatusFlag=eval('document.'+form_name+'.' + status).value\r\n\tif ((statusFlag==\"X\" || statusFlag==\"U\")&& eval('document.'+form_name+'.'+chBox).checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"D\";\r\n\t}\r\n\tif ((statusFlag==\"X\") && (! (eval('document.'+form_name+'.'+chBox).checked)) )\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"U\";\r\n\t}\r\n\tif (statusFlag==\"I\" && eval('document.'+form_name+'.'+chBox).checked)\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"C\";\r\n\t}\r\n\tif ((statusFlag==\"C\" && !(eval('document.'+form_name+'.'+chBox).checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"I\";\r\n\t}\r\n\tif ((statusFlag==\"D\" && !(eval('document.'+form_name+'.'+chBox).checked)))\r\n\t{\r\n\t\teval('document.'+form_name+'.' + status).value=\"U\";\r\n\t}\r\n}\r\n}", "function uncheck(check)\n{\n var c1 = document.getElementById(\"c1\");\n var c2 = document.getElementById(\"c2\");\n var c3 = document.getElementById(\"c3\");\n var c4 = document.getElementById(\"c4\");\n var c5 = document.getElementById(\"c5\");\n var c6 = document.getElementById(\"c6\");\n var c7 = document.getElementById(\"c7\");\n var c8 = document.getElementById(\"c8\");\n\n var s1 = document.getElementById(\"s1\");\n var s2 = document.getElementById(\"s2\");\n var s3 = document.getElementById(\"s3\");\n var s4 = document.getElementById(\"s4\");\n var s5 = document.getElementById(\"s5\");\n var s6 = document.getElementById(\"s6\");\n var s7 = document.getElementById(\"s7\");\n var s8 = document.getElementById(\"s8\");\n \n if (c8.checked == true && check == 1)\n {\n c1.checked = false;\n c2.checked = false;\n c3.checked = false;\n c4.checked = false;\n c5.checked = false;\n c6.checked = false;\n c7.checked = false;\n checkRefresh(); \n }\n \n if (check == 2)\n {\n \tc8.checked = false;\n \tcheckRefresh();\n }\n\n if (s8.checked == true && check == 3)\n {\n s1.checked = false;\n s2.checked = false;\n s3.checked = false;\n s4.checked = false;\n s5.checked = false;\n s6.checked = false;\n s7.checked = false;\n checkRefresh(); \n }\n \n if (check == 4)\n {\n \ts8.checked = false;\n \tcheckRefresh();\n }\n}", "function onStageListUnChecked(){\n document.getElementById(\"onstagelistMsg\").value='off';\n}", "checkAllEvent(checkedValue) {\n let updatedDecisionCards = {};\n Object.keys(this.state.decision_cards).forEach((dc, i) => {\n this.updateFinaleOutputWhenCheckboxIsChecked(dc, i, checkedValue);\n updatedDecisionCards[dc] = (checkedValue);\n });\n this.updateDecisionCardsAndCheckedStorageWhenCheckboxIsChecked(updatedDecisionCards)\n }", "function clearFilterTags() {\n\t\t$('.location-filter-wrap').find(':checked').prop(\"checked\", false);\n\t\tclearBtnState();\n\t}", "function toggleTickAllRows(e){\n e.preventDefault();\n var status = this.checked;\n console.log(status);\n\n $(\".checkbox input\").each(function(){\n this.checked = status;\n });\n }", "function process_checkboxes(items,namespace) {\n $(':checkbox').each(function () {\n // enable checkboxes\n $(this).prop('disabled', false);\n\n // set checkbox value attribute\n if ($(this).val() === 'on') {\n // Find first sibling with a value or data-value attribute\n const sib = $(this).siblings('span[data-value],a[value],span[value],a[data-value]');\n let v = sib.attr('data-value');\n if (typeof v === 'undefined') {\n v = sib.attr('value');\n }\n\n if (typeof v === 'undefined') {\n // Fall back to the href of a link element\n v = $(this).siblings('a').attr('href');\n }\n\n if (typeof v === 'undefined') {\n v = 'skip';\n }\n\n $(this).val(v);\n }\n\n // apply stored settings\n if (items[$(this).val()]) {\n $(this).prop('checked', true);\n } else {\n $(this).prop('checked', false);\n }\n\n // create function to update on click\n $(this).click(function () {\n const v = $(this).val()\n if (v !== 'skip') {\n if ($(this).prop('checked')) {\n items[v] = true;\n $(':checkbox[value=\"' + v + '\"]').prop('checked', true);\n } else {\n items[v] = false;\n $(':checkbox[value=\"' + v + '\"]').prop('checked', false);\n }\n try {\n CarnapServerAPI.putAssignmentState(namespace,items);\n } catch {\n console.log('Unable to access CarnapServerAPI');\n }\n }\n });\n });\n}", "function checkmark() {\n if ($scope.loginData.isChecked = false) {\n $('.radio-content input:text').val(\"\");\n }\n }", "function reset(){\n localStorage.removeItem(\"checkbox1\", checkbox.checked);\n localStorage.removeItem('checkbox2', checkboxProfil.checked); \n localStorage.removeItem('selectOptions', selectTimeCity.value);\n document.querySelector('.mailSettings input').checked = false;\n document.querySelector('.profilSettings input').checked = false;\n document.querySelector('#time').value = 'null';\n}", "unCheck() {\n let checkboxes = document.getElementsByTagName('input');\n for (var i=0; i<checkboxes.length; i++) {\n if (checkboxes[i].type === 'checkbox') {\n checkboxes[i].checked = false;\n }\n }\n }", "function restoreFromLocalStorage() {\r\n if(localStorage.getItem(`trip${tripId}`) && tripId) {\r\n const savedCheckboxesJSON = localStorage.getItem(`trip${tripId}`);\r\n const savedCheckboxes = JSON.parse(savedCheckboxesJSON);\r\n $('.items li').each(function() {\r\n if(savedCheckboxes.includes( $(this).find('label').text() )) {\r\n $(this).find($checkboxes).prop('checked', true);\r\n }\r\n });\r\n }\r\n}", "checkChanged(indx){\n //update checkbox status when checkboxes are checked... \n this.props.selectionChanged(indx);\n }", "function reset_filters() {\r\r\n\t\t\t\t$(\"#input_filter_cat\").val(\"no_filter\");\r\r\n\t\t\t\t$(\"#input_filter_tangible\").val(\"no_filter\");\r\r\n\t\t\t\t$('#is_bundle').prop( \"checked\", false );\r\r\n\t\t\t\t$('#is_featured').prop( \"checked\", false );\r\r\n\t\t\t\t$('#is_ls_donation').prop( \"checked\", false );\r\r\n\t\t\t\treset_filter_values();\r\r\n\t\t\t}", "handleCheckboxes(){\n\n for(let cb of this.checkboxes){\n\n if(cb.selected){\n cb.element.classList.add(SELECTED_CLASS);\n }\n else{\n cb.element.classList.remove(SELECTED_CLASS);\n }\n\n cb.element.checked = cb.selected;\n }\n }", "restore() {\r\n this.deleted = false;\r\n }", "uncheckAll() {\n this.toggleCheckedAll(false);\n }", "function restore_options() {\n chrome.storage.sync.get({\n settingEnabled: true //default = true\n }, function (items) {\n settingsCheckboxObj.checked = items.settingEnabled;\n });\n}", "resetStatus() {\n this.busy = false;\n this.errors.forget();\n this.successful = false;\n }", "function restoreOptions() {\n chrome.storage.local.get('chromeNotifications',function(data){\n document.getElementById(\"chromeNotifications\").checked=data.chromeNotifications;\n });\n}", "function resetSelect() {\n\t\tselectedSaves = Array();\n\t\tselectAllStatus = false;\n\t\t$('.myList-single').prop('checked', false);\n\t\t$('#myList-select-all').prop('checked', false);\n\t}", "function restore_options() {\n $(\"input[name=etym][value=\"+localStorage[\"etym\"]+\"]\").attr(\"checked\",true);\n $(\"input[name=click2s][value=\"+localStorage[\"click2s\"]+\"]\").attr(\"checked\",true);\n $(\"input[name=root2note][value=\"+localStorage[\"root2note\"]+\"]\").attr(\"checked\",true);\n $(\"input[name=afx2note][value=\"+localStorage[\"afx2note\"]+\"]\").attr(\"checked\",true);\n $(\"input[name=hide_cn][value=\"+localStorage[\"hide_cn\"]+\"]\").attr(\"checked\",true);\n $(\"input[name=web_en][value=\"+localStorage[\"web_en\"]+\"]\").attr(\"checked\",true);\n var hider=localStorage[\"hider\"]\n if(undefined==hider) hider=[]\n else hider=hider.split(',')\n $(\"input[name=hider]:checkbox\").val(hider)\n}", "function restore_options() {\n // Use default value color = 'red' and likesColor = true.\n chrome.storage.sync.get({\n add_rmp_links: true,\n highlight_easy_classes: true,\n hide_full_classes: false\n }, function(items) {\n document.getElementById('add_rmp_links').checked = items.add_rmp_links;\n document.getElementById('highlight_easy_classes').checked = items.highlight_easy_classes;\n document.getElementById('hide_full_classes').checked = items.hide_full_classes;\n });\n }", "function switchAllItemCheckboxes(flag) {\n\t$$('.itemCheckBox').each(function(checkbox) {\n\t\tif (!checkbox.disabed && isCheckboxVisible(checkbox)) {\n\t \tcheckbox.checked = flag;\n\t \tadaptGraphCheckBox(checkbox);\n\t } else {\n\t \tcheckbox.checked = false;\n\t }\n\t});\n\n\tif ($('graphs')) {\n\t\t$('graphs').checked=flag;\n\t}\n\t\n\tswitchGraphButtons(flag);\n\tswitchCommonFields(flag);\n}", "function save() {\t\n\tvar checkbox = document.getElementById(\"checkbox\");\n localStorage.setItem(\"checkbox\", checkbox.checked);\t\n}", "handleChecked() {\n this.setState(prevState => ({\n saveIdChecked: !prevState.saveIdChecked,\n }));\n }", "checkAll() {\n this.toggleCheckedAll(true);\n }", "function facetsOff() {\n $('#solrquest-facets .facetFilter:input').prop(\"checked\", false);\n }", "_changeCheckStateInGroup(elements, changeType) {\n const that = this;\n\n for (let i = 0; i < elements.length; i++) {\n elements[i]._isUpdating = true;\n\n if (elements[i] === that) {\n that.checked = true;\n that.$.fireEvent('change', { 'value': true, 'oldValue': false, 'changeType': changeType });\n }\n else if (elements[i].checked) {\n elements[i].checked = false;\n }\n\n elements[i]._isUpdating = false;\n }\n }", "_changeCheckStateInGroup(elements, changeType) {\n const that = this;\n\n for (let i = 0; i < elements.length; i++) {\n elements[i]._isUpdating = true;\n\n if (elements[i] === that) {\n that.checked = true;\n that.$.fireEvent('change', { 'value': true, 'oldValue': false, 'changeType': changeType });\n }\n else if (elements[i].checked) {\n elements[i].checked = false;\n }\n\n elements[i]._isUpdating = false;\n }\n }", "function toggleChecked(status) {\n jQuery(\".checkbox\").each( function() {\n jQuery(this).attr(\"checked\",status);\n });\n}", "function setCheckboxValue(pos) {\n if (vm.tableData[pos][\"check\"]) {\n vm.borrowerNumber++;\n } else {\n var el = $('#select-all').get(0);\n if (el && el.checked && ('indeterminate' in el)) {\n // Set visual state of \"Select all\" control \n // as 'indeterminate'\n el.indeterminate = true;\n }\n vm.borrowerNumber--;\n }\n }", "function saveCheckbox(name) {\n\tlocalStorage[name] = ($('#' + name).is(':checked') ? 'true' : 'false');\n}", "function unselect(){\r\n answerEls.forEach((answerEl)=>{\r\n answerEl.checked = false\r\n })\r\n}", "_changeCheckState(optionalValue) {\n const that = this;\n let oldValue = that.checked;\n\n if ((oldValue === null) && (optionalValue !== undefined)) {\n that.$.fireEvent('change', { 'value': optionalValue, 'oldValue': null });\n that.checked = optionalValue;\n that._updateThumbPosition();\n return;\n }\n\n if (that.checked === null) {\n that.checked = true;\n }\n else {\n that.checked = !that.checked;\n }\n\n that._updateThumbPosition();\n\n that.$.fireEvent('change', { 'value': that.checked, 'oldValue': oldValue });\n that._updateHidenInputNameAndValue();\n }", "function unapply() {\n status.applied = false;\n validationOptionElement.classList.remove(\"gallery-filter-button-selected\");\n }" ]
[ "0.6916666", "0.6393776", "0.6352745", "0.63186836", "0.6316324", "0.62939316", "0.6279714", "0.62796664", "0.62531996", "0.62198687", "0.6215878", "0.6199987", "0.6190296", "0.61751896", "0.6167841", "0.6148121", "0.6143057", "0.61397487", "0.6138587", "0.6122321", "0.61201364", "0.6098491", "0.6092392", "0.60754985", "0.605519", "0.6037653", "0.6027816", "0.60247815", "0.60190904", "0.6009829", "0.60083365", "0.6004194", "0.6002366", "0.59999657", "0.5995406", "0.59838855", "0.597272", "0.59674877", "0.59604377", "0.5960127", "0.59515715", "0.5946754", "0.5940472", "0.59244835", "0.59162617", "0.5914519", "0.59110993", "0.5905142", "0.59011614", "0.58992594", "0.5899254", "0.5897476", "0.58965707", "0.58931303", "0.5892175", "0.5880887", "0.588061", "0.5873731", "0.5868949", "0.58483136", "0.58396214", "0.5837074", "0.5835251", "0.583466", "0.582923", "0.582693", "0.58194995", "0.57919866", "0.57878417", "0.57803535", "0.57750225", "0.57679296", "0.5763108", "0.57527864", "0.5751934", "0.5748578", "0.5745852", "0.5745232", "0.57431287", "0.57350504", "0.57327485", "0.57311213", "0.57254505", "0.57230896", "0.57156575", "0.57075644", "0.57038784", "0.56965446", "0.56932104", "0.56914645", "0.5688846", "0.56876194", "0.5685707", "0.5685707", "0.5677717", "0.567544", "0.5672676", "0.5671856", "0.56665325", "0.5664604" ]
0.70359266
0
Removing a single entry use e.target Also read up event bubbling for making this event binding a relatively inexpensive affair.
function removeOne(event) { // Using this method instead of the removeChild method because of the ease of data persistence. I am sure I could do persistence with removeChild too, but the solution hasn't yet presented itself to me. const thisChore = event.target.parentNode; thisChore.style.display = 'none'; // event.target.parentNode.classList.toggle("hide"); // thisChore.parentNode.removeChild(thisChore); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeItem(e) {\n e.target.parentElement.removeChild(e.target);\n}", "_removeItem(e) {\n e.preventDefault();\n e.stopPropagation();\n\n const $target = $(e.target);\n const $entry = $target.closest('.djblets-c-list-edit-widget__entry');\n\n if (this._numItems > 1) {\n $entry.remove();\n this._numItems -= 1;\n this._$list.find('.djblets-c-list-edit-widget__entry')\n .each((idx, el) => {\n const $el = $(el);\n $el.attr('data-list-index', idx);\n this._updateEntryInputName($el, idx);\n });\n $(`input[name=\"${this._fieldName}_num_rows\"]`)\n .val(this._numItems);\n } else {\n const $defaultEntry = this._createDefaultEntry(0);\n $entry.replaceWith($defaultEntry);\n }\n }", "function disableEntry(event) {\n if (this.getAttribute(\"id\") == \"toRemove\") {\n this.removeEventListener(\"click\", expandOrCollapse, false);\n this.setAttribute(\"id\", \"\");\n if (instanceOf(obj, Match)) {\n clearAll(chromeWindow, obj);\n this.removeEventListener(\"click\", highlightMatch, false);\n chromeWindow.content.wrappedJSObject.removeEventListener(\"click\", function(event) {clearAll(chromeWindow, obj);}, false);\n this.title = \"\";\n }\n this.removeEventListener(\"mouseup\", disableEntry, false);\n }\n else { return; }\n }", "function removeElement(e) {\n $(e.currentTarget).remove();\n}", "function remove(e) {\n // e.target contains the specific element moused over so let's\n // save that into a variable for clarity.\n let pixel = e.target;\n // Change the opacity value to 0\n pixel.style.opacity = \"0\";\n}", "_remove(event) {\n event.stopPropagation();\n this.remove();\n }", "function deleteAfterClick(event){\n event.target.parentNode.remove();\n }", "function delete_element(event) {\n\tvar el = event.target.parentElement;\n\tel.remove();\n}", "function memeDeletion(event) {\n event.target.parentNode.remove();\n}", "function clickDelete (event) {\n console.log(event.target);\n if (event.target.id === 'delete') {\n console.log(event.target);\n event.target.parentNode.remove();\n }\n}", "function removeElement(e){\n e.target.parentElement.parentElement.remove();\n}", "function Delete(ev) {\r\n mainList.remove(ev.target.parentNode);\r\n }", "function remove(event) {\n let button = event.target;\n let li = button.parentElement;\n li.remove();\n return false;\n}", "function removeListEntry() {\n\t$(this).closest(\".list_entry\").remove();\n}", "function removeTask(e) {\n e.currentTarget.parentNode.remove();\n}", "function removeInstruction(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n e.target.parentElement.removeChild(e.target);\r\n}", "function removeFromList(){\n event.target.parentNode.remove();\n\n}", "function removeHandler(e) {\n const removeId = e.target.parentElement.getAttribute(\"data-task-id\");\n\n if (confirm(\"Are you sure ?!\")) {\n const foundIndex = toDoList.findIndex((el) => {\n return el.idNum === removeId;\n });\n\n toDoList.splice(foundIndex, 1);\n\n commitToLocalStorage(toDoList);\n reRender();\n }\n}", "function hapus(e)\n{\n\te.parentNode.parentNode.removeChild(e.parentNode);\n}", "function deleteEntry(ENTRY){\n ENTRY_LIST.splice(ENTRY.id,1)\n updateUI()\n}", "function deleteItem(e) {\n // console.log(e.target);\n console.log(e.currentTarget);\n // console.log(e.target.parentElement.remove());\n e.currentTarget.closest('.playerCard').remove();\n}", "function deleteItem(e){\n console.log('delete item');\n console.log(e.target);\n }", "function removeWork(e) {\n target = e.target;\n if(!target.classList.contains(\"remove\")) {\n return 0;\n }\n target.closest(\".todos\").remove()\n}", "function removeParent(e){\r\n e.target.parentNode.remove();\r\n}", "removeTask(e) {\n const index = e.target.parentNode.dataset.key;\n this.tasks.removeTask(index);\n this.renderTaskList(this.tasks.tasks);\n this.clearInputs();\n }", "function removeParent(e){\n\te.target.parentNode.remove();\n}", "function removeProduct(event) {\n const target = event.currentTarget;\n console.log('The target in remove is:', target);\n //... your code goes here\n}", "function removeTask(e){\n // get the parent list item to remove\n var taskItem = e.target.parentElement;\n taskList.removeChild(taskItem);\n}", "function removeContact(event) {\n let target = event.target;\n if (target.tagName.toLowerCase() === \"i\") { //if the icon is clicked\n target = target.parentNode; //set the target as the button anyway\n }\n addressBook.deleteAt(target.attributes[\"i\"].value);\n addressBook.display(); //redisplay the contact container\n}", "function objectRemovedLtn(e){\n }", "function deleteItem(event) {\r\n event.parentNode.remove();\r\n}", "function removeTask(e) {\n\tupdateSidebar(e);\n\t\n\t//updating task description\n\tupdateTaskDescription(e);\n\t\n\te.target.parentElement.parentNode.removeChild(e.target.parentElement);\n}", "function delAdditForm(event) {\n event.target.parentNode.remove();\n}", "function removeTodo(event) {\n var todoIndex = parseInt(event.target.parentElement.getAttribute(\"data-index\"));\n todos.splice(todoInput,1);\n updateLocalStorage();\n renderTodos();\n}", "function removeStuff(e) {\n let ui = new UI();\n ui.removeBooksFromLs(e.target.parentElement.previousElementSibling.textContent);\n ui.removeFromDom(e.target);\n}", "function removeTask(e) {\n\te.target.parentElement.parentNode.removeChild(e.target.parentElement);\n}", "_remove(e) {\n\t\t// Assert component wasn't unrendered by another event handler\n\t\tif (!this._rel) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet cont = this.components[e.idx];\n\t\tthis.components.splice(e.idx, 1);\n\t\tthis.removedComponents.push(cont);\n\n\t\tanim.stop(cont.token);\n\t\tcont.token = anim[this.animType](cont.li, false, {\n\t\t\tcallback: () => {\n\t\t\t\tlet idx = this.removedComponents.indexOf(cont);\n\t\t\t\tif (idx >= 0) {\n\t\t\t\t\tthis.removedComponents.splice(idx, 1);\n\t\t\t\t\tthis._removeComponent(cont);\n\t\t\t\t}\n\t\t\t},\n\t\t\tduration: this.duration\n\t\t});\n\n\t\tthis._checkSync();\n\t}", "function removeTodo(e) {\n if(!e.target.matches('#remove')) return\n e.target.parentNode.parentNode.remove()\n el = e.target\n const index = el.dataset.index\n items.splice(index, 1)\n localStorage.setItem('items', JSON.stringify(items))\n populateList(items, todoList)\n }", "function removeEntry(entryId) {\n return Restangular.one(foodDiaryEndpoint, entryId).remove();\n }", "function removeElement(evt) {\n selectedElement = evt.target.parentElement;\n selectedElement.remove();\n}", "function removeSingleItem(event) {\n event.preventDefault();\n // console.log(event.target);\n // console.log(event.target.parentElement);\n let link = event.target.parentElement;\n // console.log(\"Logged Output: removeSingleItem -> link\", link)\n if(link.classList.contains('grocery-item__link')){\n // previous element sibling <h4 class='grocery-item__title'>text</h4>\n let text = link.previousElementSibling.innerHTML;\n // parent element <div class='grocery-item'></div>\n let groceryItem = event.target.parentElement.parentElement;\n // remove groceryItem from the list\n list.removeChild(groceryItem);\n showAction(displayItemsAction, `${text} removed from the list`, true);\n // remove groceryItem from local storage\n editStorage(text);\n }\n}", "function removeIngredient(e) {\n if(e.target.parentElement.classList.contains('delete-item')){\n e.target.parentElement.parentElement.remove();\n }\n}", "function deleteIssueFromUI(e) {\r\n if (e.target.classList.contains('btn-danger')) {\r\n\r\n var issue = e.target.parentElement;\r\n issueList.removeChild(issue);\r\n };\r\n}", "function removeTodo(e){\n e.preventDefault();\n let eTarget = e.target;\n if(eTarget.classList[0] === 'remove-btn'){\n let eParent = eTarget.parentElement.parentElement;\n let thisTodoText = eParent.children[0];\n removeLocalTodo(thisTodoText.innerText);\n eParent.classList.add('slideRight');\n eParent.addEventListener('transitionend', function(){\n eParent.remove();\n });\n }\n}", "function removeItemAfterClick(e){\n\t // if (e.target.tag === deleteElementList){\n\t \t// console.log(e.target.tagName);\n\t \t// deleteElementList.querySelector(\"li\").remove();\n\t \te.target.parentNode.remove();\n\t\t// e.deleteElementList.remove();\n\t\t// deleteElementList.removeChild(deleteElementList.childNodes[i]);\n\t\n\n}", "deleteAnEntry() {\n document.querySelector(\".entryLog\").addEventListener(\"click\", function (e) {\n console.log(e.target.id)\n if (event.target.id.startsWith(\"delete-button\")) {\n const entryToDelete = event.target.id.split(\"--\")[1]\n console.log(`Please delete entry number! ${entryToDelete}`)\n API.deleteJournalEntry(entryToDelete)\n API.getJournalEntries()\n }\n })\n }", "function removeParent(event){\n \t event.target.parentNode.remove();\n }", "function removeItem(event){\n if(event.target.classList.contains('del')){\n var li = event.target.parentElement;\n taskList.removeChild(li);\n }\n}", "function removeItem() {\n var parentRow = event.target.parentNode.parentNode;\n parentRow.remove();\n totalAmount();\n}", "function deleteTaskFromToDoList(event) {\n event.target.parentElement.remove();\n}", "function deleteItem(event) {\n var myButton = event.currentTarget\n var myInput = myButton.previousSibling\n var myBr = myButton.nextSibling\n\n myInput.remove()\n myButton.remove()\n myBr.remove()\n}", "function deleteentry(event)\n{\n //alert(jQuery(event.target).attr(\"id\"));\n if(confirm(\"Are you sure to delete?\") == false)\n return;\n var id_str = jQuery(event.target).attr(\"id\").substring(jQuery(event.target).attr(\"id\").indexOf(\"deletebutton\")+12);//get the influencer's id\n var id = parseInt(id_str);\n //delete the influencer with this id\n var i;\n for(i = 0;i<newJsonObj.influencers.length;i++)\n {\n if(newJsonObj.influencers[i].id == id)\n break;\n }\n newJsonObj.influencers.splice(i,1);\n parseJSON(newJsonObj);\n}", "function dropToRemove(ev, el) {\n ev.preventDefault();\n var id = ev.dataTransfer.getData(\"text\");\n var node = document.getElementById(id);\n document.getElementById('canvas').removeChild(node);\n ev.stopPropagation();\n return false;\n}", "function handleRemoveEvent(event) {\n\n const target = event.currentTarget;\n const item = target.closest(selectors.item);\n const productId = Number(target.getAttribute('data-product-id'));\n\n item.classList.add('is-removing');\n\n removeProduct(productId);\n }", "function deleteTodo(e) {\n // delete the todo item from DOM\ne.target.parentNode.remove();\n\n // delete the todo element from todos array\n console.log(e.target.parentNode.id)\n let index = e.target.parentNode.id\n todos.splice(index, 1)\n console.log(todos)\n}", "function eliminarBox(event) { \n event.target.parentNode.parentNode.remove();\n}", "function removeShoe(e) {\r\n let shoe, shoeId;\r\n if (e.target.classList.contains('remove')) {\r\n e.target.parentElement.parentElement.remove();\r\n shoe = e.target.parentElement.parentElement;\r\n shoeId = shoe.querySelector('a').getAttribute('data-id');\r\n }\r\n\r\n //remove from local storage\r\n removeShoeLocalStorage(shoeId);\r\n}", "function delSpanEvent(event){\n axios.delete(`http://localhost:3000/tags/${event.target.parentNode.id}`) // Remove item from database\n .then(res => {\n event.target.parentNode.remove(); // Remove tag from the list\n })\n .catch(err => {\n console.log(err);\n })\n}", "function deleteTodo(e){\n if(e.target.classList == 'fa fa-trash'){\n console.log('Item Removed...');\n e.target.parentNode.remove();\n }\n}", "function deleteItem(e) {\n e.preventDefault();\n if (e.target.localName == 'svg') {\n let parentBtn = e.target.parentElement;\n parentBtn.parentElement.remove();\n } if (e.target.localName == 'button') {\n e.target.parentElement.remove();\n }\n }", "function onDelete(e)\n{\n var evt = e ? e : event;\n var sel = evt.target ? evt.target : evt.srcElement;\n if(evt.keyCode && evt.keyCode == 46 || evt.which == 46) {\n var val = sel.value;\n if(sel.id==\"paletteList\")\n {\n removePalette(val);\n updatePaletteDom();\n redraw();\n }\n else if(sel.id==\"spriteList\")\n {\n removeSheet(val);\n updateSheetDom();\n redraw();\n }\n else if(sel.id==\"tileList\")\n {\n removeTiles(val);\n updateTileDom();\n redraw();\n }\n \n }\n \n}", "function removeclickevent(evt){\n evt.target.removeEventListener('click',clicktarget);\n}", "function removeButtonClickHandler(e) {\n removeTrigger(e.target.closest('.trigger'));\n }", "function handleRemove(event) {\r\n const removedSeries = parseInt(event.currentTarget.id); //selecciono serie clickada por el id\r\n const favouriteFoundIndexInArrayFavourites = arrayFavourites.findIndex(\r\n (favourite) => favourite.id === removedSeries\r\n ); //busco si está en arrayFavourites\r\n arrayFavourites.splice(favouriteFoundIndexInArrayFavourites, 1); // lo quito,-1 quiere decir solo 1 elemento\r\n\r\n setInLocalStorage();\r\n paintFavouriteSeries();\r\n listenFavouritesEvents();\r\n}", "function deleteEntry(entry){\n ENTRY_LIST.splice(entry.id, 1);\n// after we call the deleteEntry funciton we need to update the Total values again\n updateUI();\n }", "function delClick(e) {\n const index = getItemIndex(\n srcList,\n e.target.parentElement.getAttribute('name'),\n );\n\n if (index < 0) return;\n\n srcList.splice(index, 1);\n chrome.storage.sync.set({ storageSrcKey: srcList }, () =>\n console.log(`${storageSrcKey} value saved. List : ${srcList}`),\n );\n e.target.closest('tr').remove();\n }", "function remove(){\n addEventListener('click',function(e){\n if(e.target.className==='delete'){\n const li= e.target.parentElement;\n\n li.parentNode.removeChild(li);\n }\n });\n}", "function removeTable(e) {\n e.target.parentElement.parentElement.parentElement.parentElement\n .removeChild(e.target.parentElement.parentElement.parentElement);\n}", "function del (e) {\r\n var parent = $(e.target).parent();\r\n var id = parent.attr('id');\r\n parent.remove();\r\n $.ajax({\r\n url: \"core/delete.php\",\r\n type: \"POST\",\r\n dataType: \"text\",\r\n data: \"id=\" + id\r\n });\r\n}", "remove() {\r\n if (this.removed) {\r\n throw new Error(\"This entry has already been removed\");\r\n }\r\n this.set.remove(this.data[this.nextIndex - 1]);\r\n this.removed = true;\r\n }", "function deleteList(e){\n const targetItem = e.target;\n const todo = targetItem.parentElement;\n\n if(targetItem.tagName == \"I\"){\n removeTodos(todo);\n targetItem.parentElement.remove();\n }\n\n}", "function deleteMe(event) {\n\tdocument.getElementById(\"controls\").removeChild(event.target.parentNode.parentNode);\n}", "function removeTodo(e) {\n if (e.target.parentElement.classList.contains('delete-item')) {\n e.target.parentElement.parentElement.classList.add('fadeOut');\n setTimeout(() => {\n e.target.parentElement.parentElement.remove()\n }, 990);\n e.stopPropagation();\n } else if (e.target.tagName = 'li') {\n e.target.classList.toggle('done');\n }\n}", "function handleDeleteItem(e) {\n console.log('click');\n if (e.target.nodeName === 'BUTTON') {\n // removeClass();\n // removeListener();\n localStorage.removeItem('json');\n }\n}", "function deleteItem(e){\n \n console.log(e.target)\n // we use conditional to fire event only when we click desired items\n // However we want to target the element above it (i and not just the link)\n if(e.target.parentElement.classList.contains('delete-item') ){\n console.log('delete item');\n // Afer clicking i we want to removbe li which is two levels up\n e.target.parentElement.parentElement.remove()\n }\n}", "function removeItem(e) {\n var wdlist = Array.from(gList);\n let identifier = null;\n let idElement = e.currentTarget.id.split(\"-\")[0];\n console.log(idElement);\n for (var i = 0; i < list.length; i++) {\n if (list[i].id === parseInt(idElement)) {\n identifier = i;\n console.log(identifier);\n }\n }\n console.log(identifier);\n wdlist.splice(identifier, 1);\n gSetList(wdlist);\n }", "function deleteEvents(e) {\n //console.log(\"delete button clicked\");\n const eventID = e.target.value;\n delEvent(eventID);\n}", "_onClickRemoveAddress(event) {\n DebugUtil.log(\"Remove address button click\", event, this.props.address);\n event.preventDefault();\n this.props.removeAddressClickHandler(this.props.address);\n }", "remove(el) {\n const key = el.target.getAttribute(\"data-key\");\n Storage.removeSavedStops(key);\n el.target.parentNode.remove();\n\n const stops = Storage.getSavedStops();\n if(Object.keys(stops).length === 0) {\n this.renderNoStops();\n }\n }", "function removeTask(e) {\n e.stopPropagation();\n /*\n e.target || this === <i class=\"fas fa-times\"></i>\n e.target.parentElement === <a class=\"delete-item secondary-content\">\n e.target.parentElement.parentElement === <li>\n */\n if(confirm('Are you sure?') === true) { \n\n e.target.parentElement.parentElement.remove(); \n }\n }", "remove (event) {\n\n if (event) {\n event.preventDefault();\n }\n\n this.node.parentNode.removeChild(this.node);\n }", "function removeCartItem(event) {\n var buttonClicked = event.target;\n buttonClicked.parentElement.parentElement.remove();\n updateCartTotal();\n}", "function partyRemoval(e) {\n let partyForRemoval = e.target.parentElement;\n partySelection.removeChild(partyForRemoval);\n parties.forEach((party, index) => {\n if (party.id == partyForRemoval.id) {\n parties.splice(index, 1);\n }\n });}", "function removeTask(e) {\n e.parentNode.parentNode.parentNode.removeChild(e.parentNode.parentNode)\n}", "function removeCartItem(event) {\n\tvar buttonClicked = event.target;\n\tbuttonClicked.parentElement.parentElement.remove();\n\tupdateCartTotal()\n}", "function pRemoveEvent(target,type,listner,useCapature) {\n if(target.detachEvent) \n target.detachEvent(type[0], listner); \n else \n target.removeEventListener([1], listner, useCapature);\n}", "function destroyClickedElement(event) {\n document.body.removeChild(event.target);\n }", "function addRemoveEL(addRemove) {\n if (addRemove) {\n theGrid.addEventListener('click', onClickComputer);\n } else {\n theGrid.removeEventListener('click', onClickComputer);\n }\n}", "function delTask(e) {\n e.parentNode.remove()\n}", "function removeCartItem(event) {\r\n var buttonClicked = event.target;\r\n buttonClicked.parentElement.parentElement.remove();\r\n updateCartTotal();\r\n }", "function deleteItem(e){\n var productRow = e.currentTarget.parentNode.parentNode;\n body.removeChild(productRow);\n getTotalPrice();\n }", "function deletePerson1(e) {\n var person = e.srcElement.parentNode.parentNode;\n document.getElementById('tblPerson').removeChild(person);\n}", "deleteLine(ev){\n this.nameTarget(`lineCell-${ev.target.parentElement.id}`).remove()\n }", "deleteLine(ev){\n this.nameTarget(`lineCell-${ev.target.parentElement.id}`).remove()\n }", "function fnRemoveFabric(e) {\n\n //remove option item\n e.parentNode.remove();\n\n}", "function addRemoveTodoItemClickHandler(e) { \r\n var $el = $(this).off(\"click\", addRemoveTodoItemClickHandler);\r\n var $item = $el.parent().parent();\r\n var val = parseInt($item.find(\".work-todo-list-item-checkbox\").attr(\"data-item-id\"));\r\n var txt = $item.find(\".work-todo-list-item-title\").text();\r\n if(!isNaN(val) && val) {\r\n if(typeof SYNC == \"object\") SYNC.deleteToDo({id:val, title:txt});\r\n \r\n BRW_sendMessage({command: \"deleteTodoItemDb\", \"id\": val});\r\n \r\n $item.fadeOut(100, function() {\r\n $item.remove();\r\n \r\n reCalculateTodoItemsCount();\r\n $(\"#todo-footer-input\").focus();\r\n \r\n //todoPopupState(\"no-all-done\");\r\n todoPopupState();\r\n \r\n });\r\n }\r\n}", "function deleteItem(e) {\r\n var btn = e.target;\r\n\r\n while (btn && (btn.tagName != \"A\" || !/\\bdelete\\b/.test(btn.className))) {\r\n btn = btn.parentNode;\r\n if (btn === this) {\r\n btn = null;\r\n }\r\n }\r\n if (btn) {\r\n var btnParent = btn.parentNode.parentNode.parentNode\r\n this.removeChild(btnParent);\r\n updateNotesListOnRemoveItem(btn);\r\n }\r\n}", "function elementRemoved(e) {\n var element = query(e.target),\n instanceKey = element.data(\"instance\");\n\n if (instanceKey) {\n //lock gc if adding elements to garbage list\n gc.lock = true;\n gc.push(instanceKey);\n gc.lock = false;\n }\n if (e.target && e.target.innerHTML) {\n element.find(\"[data-instance]\").each(function (childComponent) {\n var childInstanceKey = query(childComponent).data(\"instance\");\n gc.push(childInstanceKey);\n });\n gc.lock = false;\n }\n }", "function removeMe(e){\r\n var linkToRemove = e.target.getAttribute(\"myid\");\r\n bookMarksArray.splice(linkToRemove,1)\r\n saveBookMarks();\r\n updateBookMarkList();\r\n}", "function delete_task(e) {\n console.log('delete task btn pressed...');\n e.target.parentElement.remove();\n\n }" ]
[ "0.68944114", "0.6860733", "0.68070024", "0.6783093", "0.6556286", "0.6512268", "0.6508953", "0.6480316", "0.64483815", "0.6447342", "0.6417734", "0.6404331", "0.6388853", "0.63610953", "0.6320248", "0.6285292", "0.6265647", "0.62632126", "0.6262439", "0.6255217", "0.6251802", "0.62387484", "0.6230887", "0.620179", "0.61916566", "0.6179376", "0.6156892", "0.61525273", "0.6123805", "0.6118214", "0.61126995", "0.609093", "0.6089367", "0.60870636", "0.6078763", "0.6047064", "0.6037659", "0.6034592", "0.60317737", "0.6025462", "0.60078233", "0.60046256", "0.59842783", "0.5983103", "0.59791875", "0.5978847", "0.59675753", "0.5960957", "0.5938389", "0.5927396", "0.5924196", "0.5923022", "0.5912995", "0.59099966", "0.5909559", "0.59076095", "0.59068745", "0.59067005", "0.59066325", "0.5886906", "0.5876311", "0.5870755", "0.5870136", "0.58650875", "0.58569497", "0.58488965", "0.5839584", "0.5838283", "0.5835066", "0.58346736", "0.58327943", "0.58239704", "0.5811087", "0.58017796", "0.5788014", "0.57878137", "0.57809573", "0.57807815", "0.5780261", "0.57792014", "0.5773986", "0.57684135", "0.5768045", "0.5766598", "0.57596105", "0.575794", "0.57574695", "0.5753212", "0.57525045", "0.5747785", "0.57461274", "0.57440364", "0.5742984", "0.5742984", "0.5740603", "0.5737503", "0.57372236", "0.5736734", "0.5730267", "0.5717192" ]
0.67959684
3
Removing all the entries at once.
function removeAll() { localStorage.clear(); window.location.reload(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "clear() {\n log.map(\"Clearing the map of all the entries\");\n this._map.clear();\n }", "clear() {\n\t\tlet e = this.first();\n\t\twhile (e != 0) { this.delete(e); e = this.first(); }\n\t}", "function removeEntries() {\n // Find all entries\n var $entries = $schedule.find('.entry');\n\n // Delete them\n $entries.fadeOut(function () {\n $entries.remove();\n });\n\n return false;\n }", "clear() {\n for (const key of Object.keys(this.datastore)) {\n delete this.datastore[key];\n // this.remove(key);\n }\n }", "function clearAll(){\r\n\tObject.keys(this.datastore).forEach((key)=>\r\n\t{\r\n\t\tdelete this.datastore[key];\r\n\t});\t\r\n}", "remove() {\n for (var key of this.keys) {\n this.elements[key].remove();\n }\n }", "function clear() {\n while( ids.length > 0 ) {\n ids.pop();\n }\n while( titles.length > 0 ) {\n titles.pop();\n }\n while( types.length > 0 ) {\n types.pop();\n }\n while( uris.length > 0 ) {\n uris.pop();\n }\n while( thumbUris.length > 0 ) {\n thumbUris.pop();\n }\n}", "clear() {\n var map = this._map;\n var keys = Object.keys(map);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n map[key].clear();\n }\n }", "function clear()\r{\r\tvar end = mapping_names.length;\r\r\tfor(var i=end-1; i>=0; i--){\r\t\tremove(mapping_names[i]);\r\t}\r\twhile(mapping_names.pop());\r\twhile(mapping_sources.pop());\r\twhile(mapping_destinations.pop());\r\twhile(mapping_algorithms.pop());\r}", "removeAll(silent) {\n const me = this,\n storage = me.storage;\n\n // No reaction to the storage Collection's change event.\n if (silent) {\n storage.suspendEvents();\n\n // If silent, the storage Collection won't fire the event we react to\n // to unjoin, and we allow the removing flag in remove() to be true,\n // so *it* will not do the unJoin, so if silent, so do it here.\n const allRecords = Object.values(me.idRegister);\n\n for (let i = allRecords.length - 1, rec; i >= 0; i--) {\n rec = allRecords[i];\n if (rec && !rec.isDestroyed) {\n rec.unJoinStore(me);\n }\n }\n }\n\n me.clear();\n\n if (silent) {\n storage.resumeEvents();\n }\n }", "removeAll() {\r\n\t\t\tthis.remove();\r\n\t\t}", "static RemoveAll() {}", "function clearObjects() {\n setMapOnAll(null);\n}", "clear() {\n for (let i = 0; i < this.sizeNum; i++) {\n this.remove(i);\n }\n }", "function clearSoFarThisEntry() {\n while (soFarThisEntry.length > 0) {\n soFarThisEntry.shift();\n }\n}", "__removeOlderEntries() {\n const itemsToClear = Array.from(lastReadTimeForKey.keys()).slice(0, CACHE_ITEMS_TO_CLEAR_COUNT);\n itemsToClear.forEach((k)=>{\n cache.delete(k);\n lastReadTimeForKey.delete(k);\n });\n }", "function clean_maps() {\n var count;\n list_maps();\n\n for (var k in maps) {\n for (var i = 0; i < maps[k].length; i++) {\n var map = maps[k][i];\n count++;\n\n // if map render job is idle and last render process is older than\n // an hour, remove map\n if (map.renderer_idle && (time() - map.renderer_stop > 3600000)) {\n console.log(k + '/' + i + ': garbage collector removes map');\n maps[k].splice(i, 1);\n i--;\n }\n }\n }\n}", "function clearAll() {\n window.localStorage.clear();\n var objectStore = db.transaction(window.GLOBALS.DATABASE_NAME, 'readwrite').objectStore(window.GLOBALS.OBJECT_STORE_NAME);\n\n objectStore.openCursor().onsuccess = function(event) {\n var cursor = event.target.result;\n if (cursor) {\n cursor.continue();\n } else {\n console.log('No more entries!');\n }\n };\n }", "function clearAll() {\n while (taskContainer.firstChild) {\n taskContainer.removeChild(taskContainer.firstChild);\n }\n browser.storage.local.clear();\n}", "function sched_clear() {\n\tfor (let name in schedule.list) {\n\t\t// Remove summary sidebar elements.\n\t\tdiv.summary_tbody.removeChild(schedule.list[name].tr);\n\n\t\t// Remove cards.\n\t\tfor (let i in schedule.list[name].cards)\n\t\t\tdiv.deck.removeChild(schedule.list[name].cards[i]);\n\n\t\tdelete schedule.list[name];\n\t}\n}", "deleteAll(){\n for(var i = 0;i<this.array.length;i++){\n this.array[i].body.remove()\n }\n this.array = [];\n }", "function clean()\t{\n\tmyName = null;\n\tmyType = null;\n\tmyMin = null;\n\tmyMax = null;\n\twhile (items.length > 0)\t{\n\t\tthis.patcher.remove(items.shift());\n\t}\n}", "compact() {\n return this._push(CLEAR, this.entries());\n }", "function flush_historial(){\n // get list of chldren elements\n let hist = document.getElementsByClassName('historial')[0];\n let hist_list = hist.children;\n // loop and destroy, but only from index 1 onwards\n for (let i = 1; i < hist_list.length; i++) {\n hist_list[i].remove();\n }\n}", "function deleteObjects() {\n clearObjects();\n mapObjects = [];\n}", "removeAll() {\n this.loaderCounter = 0;\n this.errorCounter = 0;\n this._remove(true);\n }", "clear() {\n // let elements = $.all('.mt-log-item')\n // let parentNode = $.one('.mt-log')\n // for(let i = elements.length - 1; i >= 0; i--) {\n // parentNode.removeChild(elements[i]);\n // }\n\n $.remove($.one('.mt-log'))\n }", "function clear() {\n this.keys.forEach((key) => {\n this._store[key] = undefined;\n delete this._store[key];\n });\n}", "clearSilent() {\n let me = this;\n\n me._items.splice(0, me.getCount());\n me.map.clear();\n }", "function removeOldEntries(){\n for(key in localStorage){\n if(key.indexOf(keyPrefix) === 0){\n var data = getSavedData(key);\n if(now() - data._autosaveTime > lifetime){\n localStorage.removeItem(key);\n\n log('Key ' + key + ' removed.');\n }\n }\n }\n}", "function m_removeall()\n{\n\twhile(c_alldata.length>0)\n\t{\n\t\tc_alldata[c_alldata.length-1].c_disp.innerHTML=\"\";\n\t\tc_alldata.pop();\n\t}\n\t ref_thumb();\n}", "static cleanup() {\n const now = new Date().getTime();\n const all = IDMapping.allSync();\n const toRemove = _.filter(all, mapping => mapping.lastActivity < (now - config.mappings.timeout));\n if (!_.isEmpty(toRemove)) {\n Logger.info(\"[IDMapping] expiring the mappings:\", _.map(toRemove, map => map.print()));\n toRemove.forEach(mapping => {\n UserMapping.removeMappingMeetingId(mapping.internalMeetingID);\n mapping.destroy()\n });\n }\n }", "function clearMarkers() {\n markers.forEach(function(marker) {\n marker.removeFrom(mymap);\n });\n markers = [];\n}", "function clearPeople() {\n for (var x = 0; x < people_to_remove.length; x++) {\n var remove_id = people_to_remove[x];\n for (var i = 0; i < people.length; i++) {\n if (people[i].id == remove_id) {\n people.splice(i, 1);\n break;\n }\n }\n }\n people_to_remove = new Array();\n}", "prune() {\n\t\tlet count = this.entries.length;\n\t\tthis.entries = this.entries.filter(e => !e.isExpired());\n\n\t\tif (count - this.entries.length > 0) {\n\t\t\tLogger.info('cache', 'Pruned ' + (count - this.entries.length) + ' entries from cache');\n\t\t}\n\t}", "clear () {\n\t\treturn this.cache.keys().then(keys =>\n\t\t\tPromise.all(keys.map(this.delete.bind(this)))\n\t\t);\n\t}", "wipe() {\n\t\tfor (node of this.nodes) {\n\t\t\tfor (let box of node.boxes) {\n\t\t\t\tbox.destruct()\n\t\t\t}\n\t\t}\n\t\tthis.nodes = new Set()\n\t}", "clean() {\n this.recentRemovedElements.clear();\n let validElementCount = 0;\n for (let i = 0; i < this.length; i += 1) {\n this.array[i].clean();\n if (this.array[i].isToBeRemoved) {\n this.recentRemovedElements.push(this.array[i]);\n continue;\n }\n this.array[validElementCount] = this.array[i];\n validElementCount += 1;\n }\n this.length = validElementCount;\n }", "clean() {\n this.recentRemovedElements.clear();\n let validElementCount = 0;\n for (let i = 0; i < this.length; i += 1) {\n this.array[i].clean();\n if (this.array[i].isToBeRemoved) {\n this.recentRemovedElements.push(this.array[i]);\n continue;\n }\n this.array[validElementCount] = this.array[i];\n validElementCount += 1;\n }\n this.length = validElementCount;\n }", "clean() {\n this.recentRemovedElements.clear();\n let validElementCount = 0;\n for (let i = 0; i < this.length; i += 1) {\n this.array[i].clean();\n if (this.array[i].isToBeRemoved) {\n this.recentRemovedElements.push(this.array[i]);\n continue;\n }\n this.array[validElementCount] = this.array[i];\n validElementCount += 1;\n }\n this.length = validElementCount;\n }", "clear() {\n while (this.items.length) {\n this.items.pop();\n }\n }", "function removeAllRegistrosIndexedDb() {\n\n registros = [];\n var request = db.transaction([constDbObject], \"readwrite\")\n .objectStore(constDbObject)\n .clear();\n request.onsuccess = function(event) {\n fillTable(registros);\n drawGraficos(registros);\n };\n\n}", "clear() {\n this.count_ = 0;\n this.entries_ = {};\n this.oldest_ = null;\n this.newest_ = null;\n }", "removeAll() {\n for (const id of this.compareList.keys()) {\n this._removeItem(id);\n }\n }", "clearToLastMarker() {\n const markerIdx = this.entries.indexOf(MARKER);\n if (markerIdx >= 0) {\n this.entries.splice(0, markerIdx + 1);\n }\n else {\n this.entries.length = 0;\n }\n }", "function removeAll() {\n stationList = [];\n saveToDatabase();\n }", "remove (queries, multi = false) {\n let removed = [];\n if (Helpers.is(queries, '!Object')) {\n for (let key of (Array.isArray(queries) ? queries : [queries])) {\n if (this.has(key) && this.delete(key)) {\n removed.push(key);\n }\n }\n } else {\n let _queries = this.compile(queries);\n if (!!_queries.list.length) {\n for (let entry of this.entries()) {\n if (this._validate(entry, _queries)) {\n if (this.delete(entry[0])) {\n if (!multi) {\n return [entry[0]];\n } else {\n removed.push(entry[0]);\n }\n }\n }\n }\n }\n }\n return removed;\n }", "clearEntry() {\n this.destroyLastOperator();\n this.updateDisplay();\n }", "_onTempDelete(entry) {\n this._removeEntries([entry])\n }", "function clearAll() {\n\n\t\t\t// Clear the sorts and filters, defer the query\n \tclearAllSorts();\n \tclearAllFilters();\n\n }", "function cleanGrid(){\n trList.forEach(function (tr) {\n tr.remove();\n });\n}", "function clearAll() {\n recipeArea.empty();\n recipeTitle.empty();\n }", "function deleteAllMarkers() {\r\n if (_markersArray) {\r\n for (i in _markersArray) {\r\n _markersArray[i].setMap(null);\r\n }\r\n _markersArray.length = 0;\r\n }\r\n }", "function clearEntry () {\n\n nextValue = null;\n}", "clearMarkers()\n {\n while (this.markers.length > 0)\n {\n let marker = this.markers.pop();\n marker.setMap(null);\n }\n }", "removeAll() {\n this._removeAll();\n }", "function clear() {\n while (list.hasChildNodes()) {\n list.removeChild(list.lastChild);\n }\n }", "function wipe() {\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n}", "reset() {\n this.entities().forEach(e => e.delete());\n }", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n for(i = 0; i < heatmaps.length; i++){\r\n heatmaps[i].setMap(null)\r\n }\r\n heatmaps = [];\r\n crimeID = [];\r\n }", "function clearData() {\n for (var key in markers_map) {\n var marker = markers_map[key];\n var json = markers_dict[key];\n // if the data is over a minute old\n if (!isNotTooOld(json)) {\n deleteMarker(key, marker);\n }\n }\n}", "function clean() {\n wrappers.splice(0, wrappers.length);\n plugins.splice(0, plugins.length);\n}", "remove() {\n // Determine new length.\n const n = ftables.length - 1;\n\n // Remove existing tables.\n for (let ft of ftables) {\n ft._tab.remove();\n ft._table.remove();\n }\n ftables = [];\n\n // Clear static fields.\n FlightTable.res = [];\n FlightTable.single = null;\n\n // Create new tables.\n for (let i = 0; i < n; i++) {\n new FlightTable(this._tabs, this._columns, this._tables, this._book);\n }\n FlightTable.displayResults();\n }", "function removeMarkers()\n{\n // TODO\n // удаление всех маркеров\n for (var i = 0, n = markers.length; i < n; i++) \n {\n markers[i].setMap(null);\n }\n \n // обнуление указателя размера массива существующих маркеров\n markers.length = 0;\n}", "function clear() {\n data = [];\n $grid.find('.row').remove();\n }", "purge() {\n // the object vector is not purged right away, because if this method is called\n // from an 'advanceTime' call, this would make the loop crash. Instead, the\n // vector is filled with 'null' values. They will be cleaned up on the next call\n // to 'advanceTime'.\n\n const { _objects, _objectIDs } = this\n\n for (let i = _objects.length - 1; i >= 0; --i) {\n const object = _objects[i]\n const dispatcher = object\n if (dispatcher)\n dispatcher.removeEventListener(Event.REMOVE_FROM_JUGGLER, this.onRemove)\n _objects[i] = null\n _objectIDs.delete(object)\n }\n }", "unAll() {\n this.handlers = null;\n }", "static DeleteAll() {}", "purgeSets() {\n this.children.forEach((subTrie) => {\n subTrie.wordSet.clear();\n subTrie.purgeSets();\n });\n }", "function cleanUp() {\n\n\t// before version 1.0.12, datacache was in {posttype}.data.cache.json\n\tfor ( var index in posts ) {\n\t\tStorage.deleteSync( index + '.data.cache.json' );\n\t}\n\n}", "function clearBoats() {\n for (var x = 0; x < boats_to_remove.length; x++) {\n var remove_id = boats_to_remove[x];\n for (var i = 0; i < boats.length; i++) {\n if (boats[i].id == remove_id) {\n boats.splice(i, 1);\n break;\n }\n }\n }\n boats_to_remove = new Array();\n}", "function clearAllMarkers() {\n setAllMap(null);\n}", "function clear() {\n\n\t// IF the legacy logs has too many elements, start shifting the first item on each clear.\n\tif (_legacy.length > options.limit) {\n\t\t_legacy.shift()\n\t}\n\n\t_legacy.push(_logs)\n\n\t_logs = []\n\n}", "function clearAll() {\n while (service.heroes.length > 0) {\n service.heroes.splice(0, 1);\n }\n }", "function clearAll(){\n\tlet ul = document.getElementById('feed');\n\tlet li = document.getElementsByClassName('post');\n//\tlet ul = li[0].parentNode;\n\tfor (let i = li.length-1;i >=0; i--){\r\n\t\tli[i].parentNode.removeChild(li[i]);\r\n\t}\n\tif(ul){\n\t\tfor (let i=ul.childNodes.length;i>1;i--){\n\t\t\tif (ul.childNodes[i]){\n\t\t\t\tul.removeChild(ul.childNodes[i]);\n\t\t\t}\n\t\t}\n\t}\n\t\n}", "removeAllMarkers() {\n\t\tthis.markers.forEach( marker => marker.delete() );\n\t\tthis.markers = [];\n\t\tif( this.markerClusterer ) {\n\t\t\tthis.markerClusterer.clearMarkers();\n\t\t}\n\t}", "function removeMarkers()\n {\n var next;\n while (markerHead)\n {\n next = markerHead[marker].prev;\n delete markerHead[marker];\n markerHead = next;\n }\n }", "function deleteMarkers() {\r\n setMapOnAll(null);\r\n markers = [];\r\n }", "function clearEntries() {\n filters = {};\n\n // Sets every input field to empty\n filterInputs._groups[0].forEach(entry => {\n if (entry.value != 0) {\n d3.select('#' + entry.id).node().value = \"\";\n }\n });\n}", "clear() {\n for (const index of this.#rindexes({ allowStale: true })) {\n const v = this.#valList[index];\n if (this.#isBackgroundFetch(v)) {\n v.__abortController.abort(new Error('deleted'));\n }\n else {\n const k = this.#keyList[index];\n if (this.#hasDispose) {\n this.#dispose?.(v, k, 'delete');\n }\n if (this.#hasDisposeAfter) {\n this.#disposed?.push([v, k, 'delete']);\n }\n }\n }\n this.#keyMap.clear();\n this.#valList.fill(undefined);\n this.#keyList.fill(undefined);\n if (this.#ttls && this.#starts) {\n this.#ttls.fill(0);\n this.#starts.fill(0);\n }\n if (this.#sizes) {\n this.#sizes.fill(0);\n }\n this.#head = 0;\n this.#tail = 0;\n this.#free.length = 0;\n this.#calculatedSize = 0;\n this.#size = 0;\n if (this.#hasDisposeAfter && this.#disposed) {\n const dt = this.#disposed;\n let task;\n while ((task = dt?.shift())) {\n this.#disposeAfter?.(...task);\n }\n }\n }", "clearEntry() {\n this._operation.pop();\n this.lastNumberToDisplay();\n }", "async clear() {\n this.logger.trace(\"Clearing cache entries created by MSAL\");\n // read inMemoryCache\n const cacheKeys = this.getKeys();\n // delete each element\n cacheKeys.forEach(key => {\n this.removeItem(key);\n });\n this.emitChange();\n }", "function free()\n\t{\n\t\tvar i, count = _list.length;\n\n\t\tfor (i = 0; i < count; ++i) {\n\t\t\t_list[i].clean();\n\t\t}\n\n\t\t_list.length = 0;\n\t}", "function clearAllHandler() {\n trash = toDoList.filter((task) => task.isDone == true);\n toDoList = toDoList.filter((task) => task.isDone == false);\n commitToLocalStorage(toDoList);\n reRender();\n}", "function deleteMarkers() {\n\n // for (var i = 0; i < markers.length; i++) {\n // markers[i].setMap(null);\n // }\n // markers = [];\n\n while (markers.length) {\n var pop = markers.pop();\n pop.setMap(null);\n }\n\n if (markerCluster) {\n markerCluster.clearMarkers();\n }\n\n console.debug(\"Markers cleared\");\n}", "clearAll() {\n let that = this;\n Object.keys(this._repository).forEach(function(key) {\n delete that._repository[key];\n });\n }", "function disposeEntries() {\n if (disposeCount) {\n for (let loop = 0; loop < requestList.length;) {\n if (requestList[loop].disposing) {\n requestList.splice(loop, 1);\n } else {\n loop += 1;\n }\n }\n\n disposeCount = 0;\n }\n}", "function clearSearch(){\n for(var i=0;i<reporter_path.length;i++){\n reporter_path[i].setMap(null);\n }\n for(var i=0;i<reporter_record.length;i++){\n reporter_record[i].setMap(null);\n }\n reporter_path=[];\n reporter_record=[];\n}", "function clearMarkers() {\n\t\t\t \n\t\t\t setAllMap(null);\n\t\t\t\n\t\t\t}", "clear() {\n\t\twhile (this.getElement().firstChild) {\n\t\t\tthis.getElement().removeChild(this.getElement().firstChild)\n\t\t}\n\t}", "function deleteAll(query,type) {\n closeMapWindows();\n closeDeleteAll();\n showMamufasMap();\n \n if (convex_hull.isVisible()) {\n mamufasPolygon();\n }\n \n var remove_markers = [];\n var occsCopy = $.extend(true,{},occurrences);\n \n \n function asynRemoveMarker(query,type) {\n for (var i in occsCopy) {\n if ((occsCopy[i].data.geocat_kind == type) && (!occsCopy[i].data.geocat_removed) && (occsCopy[i].data.geocat_query == query)) {\n points.deduct(query,type);\n remove_markers.push(occurrences[i].data);\n occurrences[i].data.geocat_removed = true;\n occurrences[i].setMap(null);\n }\n delete occsCopy[i];\n break;\n }\n \n if (i==undefined) {\n actions.Do('remove', null, remove_markers);\n hideMamufasMap(false);\n delete occsCopy;\n if (convex_hull.isVisible()) {\n $(document).trigger('occs_updated');\n }\n } else {\n setTimeout(function(){asynRemoveMarker(query,type)},0); \n }\n }\n asynRemoveMarker(query,type);\n\t\t\t}", "function removeAllMarkers() {\n for(var i = 0 ; i < allMarkers.length ; i++)\n map.removeLayer(allMarkers[i]);\n \n allMarkers = [];\n}", "function deleteMarkers() {\n clearMarkers();\n clearRows();\n markers = [];\n}", "function clearList(){\n let clearArr = Array.from(document.querySelectorAll('.player-record'));\n let clearPages = Array.from(document.querySelectorAll('.page'));\n\n clearArr.forEach(function(playerRecord) {\n playerRecord.parentNode.removeChild(playerRecord);\n });\n clearPages.forEach(function(page) {\n page.parentNode.removeChild(page);\n });\n}", "function clearAll(){\n var divList = [\"#pie\", \"#bubble\", \"#gauge\", \"#smpl-meta\"];\n divList.forEach(div => {\n d3.select(div).selectAll(\"*\").remove();\n })\n}", "function deleteAllMarkers() {\n //console.log('[DEV] deletemarkers fired : length : %s',markers.length);\n if (markers.length == 0) return;\n\n // close the card\n closeCard();\n\n // remove active markers\n deleteActiveMarker();\n\n //reset markerclusterers \n markerclusterer.clearMarkers();\n markerclusterer.removeMarkers(markers);\n\n //remove markers from google map\n for (var i = 0; i < markers.length; i++) {\n markers[i].setMap(null);\n }\n // reset google marker array\n markers = [];\n\n //get rid of infowindows content\n infowindow.close();\n infowindowContents = [];\n\n //reset bounds to init values\n bounds = new google.maps.LatLngBounds();\n \n // show the loading animation\n onReady(function () {\n show('loading', true);\n });\n}", "function clearAllMarkers() {\n setMarkersOnMap(null);\n}", "function deleteMarkers() {\n for (var i = 0; i < allMarkers.length; i++) {\n allMarkers[i].setMap(null);\n }\n allMarkers = [];\n}", "function deleteMarkers() {\r\n clearMarkers();\r\n markers = [];\r\n for (i = 0; i < heatmaps.length; i++) {\r\n heatmaps[i].setMap(null)\r\n }\r\n heatmaps = [];\r\n}", "function clearDeleted() {\n for (let i = 0; i < allNotes.length; i++) {\n if (allNotes[i].delete == true) {\n allNotes.splice(i, 1);\n }\n }\n}", "function removeAll() {\n\t$(\"*\").off();\n}" ]
[ "0.713801", "0.71156275", "0.6852535", "0.6799216", "0.67984176", "0.66575223", "0.6620862", "0.6564253", "0.656139", "0.6518557", "0.65134984", "0.64874005", "0.64594734", "0.6456778", "0.64506996", "0.6428316", "0.6421387", "0.63880116", "0.6386418", "0.63764954", "0.63525724", "0.63428634", "0.6338787", "0.633857", "0.6335389", "0.6315965", "0.6303031", "0.6282461", "0.6278927", "0.6278588", "0.62747043", "0.62695193", "0.6258916", "0.62469494", "0.62338686", "0.62286985", "0.6222423", "0.6214302", "0.6214302", "0.6214302", "0.62116605", "0.6211247", "0.6210672", "0.6210139", "0.6204945", "0.6201428", "0.6192877", "0.61921906", "0.61892986", "0.61865413", "0.6180996", "0.6175793", "0.6158276", "0.61574763", "0.61555773", "0.6155384", "0.61536336", "0.61466247", "0.6146605", "0.61464816", "0.6145762", "0.6123397", "0.61201495", "0.6113571", "0.6109311", "0.610731", "0.61063147", "0.61037815", "0.6101769", "0.60900474", "0.60875744", "0.6078266", "0.60752016", "0.6073468", "0.6072521", "0.60703117", "0.6065848", "0.6065496", "0.6063037", "0.6061217", "0.6060341", "0.60568136", "0.6056672", "0.60565096", "0.6050519", "0.60471225", "0.60448843", "0.6040714", "0.6040035", "0.6037849", "0.60359347", "0.6035612", "0.60353404", "0.60335183", "0.60313916", "0.6030255", "0.6030247", "0.6027321", "0.6023341", "0.60231745", "0.6021191" ]
0.0
-1
Show the Remove All button if there are more than one entries.
function showRemoveBtn() { if (document.getElementById('entries').childElementCount > 1) { document.getElementById('removeBtn').style.display = 'initial'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "displayDeleteAll() {\n const deleteAllBtn = document.querySelector('.deleteAll');\n // add button if guest array bigger than zero and no deleteAllButton\n if (party.guests.length && !deleteAllBtn) {\n const tableContainer = document.querySelector('#tableContainer');\n tableContainer.appendChild(this.createDeleteButton());\n // remove button if guest array zero and deleteAllButton exists\n } else if (!party.guests.length && deleteAllBtn) {\n deleteAllBtn.remove();\n }\n }", "function handleRemoveButtons() {\n var removeButtons = $('.remove_search');\n if (removeButtons.length <= 1) {\n removeButtons.attr('disabled', 'disabled').hide();\n } else {\n removeButtons.removeAttr('disabled').show();\n }\n }", "function addClear() {\n\t\tif (toDoList.length >= 1) {\n\t\t\t$(\"button#add\").addClass(\"add\");\n\t\t\t$(\"button#clear\").show().addClass(\"clear\");\n\t\t}\n\t\tif (toDoList.length < 1){\n\t\t\t$(\"button#add\").removeClass(\"add\");\n\t\t\t$(\"button#clear\").hide().removeClass(\"clear\");\n\t\t}\n\t}", "onStoreRemoveAll() {\n // GridSelection mixin does its job on records removing\n super.onStoreRemoveAll && super.onStoreRemoveAll(...arguments);\n\n if (this.rendered) {\n this.renderRows();\n this.showEmptyText();\n }\n }", "checkToShowAddButton() {\n const hasResult = this.hasQuery && (! this.hasUsers && ! this.hasDepartment);\n\n this.setShowAddButton( hasResult );\n }", "function btnExcludeAll() {\n const eraseAll = document.querySelectorAll('.li-options');\n for (let erase of eraseAll) {\n if (confirm('Tem certeza de que deseja excluir TODAS as atividades?')) {\n erase.remove();\n }\n } \n archiveSet();\n }", "function clearAllHandler() {\n trash = toDoList.filter((task) => task.isDone == true);\n toDoList = toDoList.filter((task) => task.isDone == false);\n commitToLocalStorage(toDoList);\n reRender();\n}", "function editAllTags(){\n var counter = 0\n $('#all-tags-button').on('click', function(e){\n if(counter == 0){\n $('.tags').show();\n $('.del').show()\n counter = 1\n }else{\n $('.tags').hide();\n $('.del').hide();\n counter = 0\n };\n })\n}", "function removeButton(){\n $(\"#car-view\").empty();\n var topic = $(this).attr('data-name');\n var itemindex = topics.indexOf(topic);\n if (itemindex > -1) {\n topics.splice(itemindex, 1);\n renderButtons();\n }\n }", "function toggleRemoveButtonsVisibility() {\n if ($('.load-cars-editing-item').length > 1) {\n $('.remove-load-car-model').removeClass('hidden');\n } else {\n $('.remove-load-car-model').addClass('hidden');\n }\n}", "function delete_all() {\n\n $(document).on('click', '.del_all', function() {\n $('#form_data').submit();\n });\n \n\n $(document).on('click', '.delBtn', function() {\n var item_checked = $('input[class=\"item_checkbox\"]:checkbox').filter(':checked').length;\n if ( item_checked > 0 ) {\n\n $('.notEmptyRecord').removeClass('hidden') ;\n $('.record_count').text(item_checked);\n $('.emptyRecord').addClass('hidden') ;\n } else {\n $('.emptyRecord').removeClass('hidden') ;\n $('.notEmptyRecord').addClass('hidden') ;\n }\n $('#multipleDelete').modal('show');\n //alert('done');\n });\n}", "function handleRemoveButtons(buttonParentTr) {\n var removeButtons = $('.remove_search');\n if (buttonParentTr.find(removeButtons).length <= 1) {\n buttonParentTr.find(removeButtons).hide();\n } else {\n buttonParentTr.find(removeButtons).show();\n }\n }", "function removeShowAllLink() {\n\t$('.show-all').remove();\n}", "function showAddNewIfNeeded(allSessions) {\n if (allSessions.length == 0) {\n showAddNewButton();\n }\n}", "function m_removeall()\n{\n\twhile(c_alldata.length>0)\n\t{\n\t\tc_alldata[c_alldata.length-1].c_disp.innerHTML=\"\";\n\t\tc_alldata.pop();\n\t}\n\t ref_thumb();\n}", "function removeAll() {\n var deleteAll = confirm(\"Do you really want to remove all the tasks?\");\n //if user clicks okay returns true. Gives and empty strings for both lists\n if (deleteAll == true) {\n document.getElementById(\"tasksTodo\").innerHTML =\"\"\n document.getElementById(\"tasksDone\").innerHTML=\"\"\n //Saved in local storage and updating taskCount\n updateLocalStorage()\n taskCount();\n }\n}", "function hideDeleteButtons(){\n $('li').find('.delmark').hide();\n }", "function removeEntries() {\n // Find all entries\n var $entries = $schedule.find('.entry');\n\n // Delete them\n $entries.fadeOut(function () {\n $entries.remove();\n });\n\n return false;\n }", "function processCollections() {\n var collections = $('.collection');\n if (collections.length > 1) {\n $('.showHideButton').show();\n }\n}", "function showDelete(listItems, deleteAll){\n if (listItems.length > 0) {\n deleteAll.classList.remove('task_close-js');\n }else{\n deleteAll.classList.add('task_close-js');\n }\n}", "function showDialogForDeleteAll(amountOfSaves) {\n\t\tvar dialog = new Dialog({\n\t\t\ttitle: 'Remove all ' + amountOfSaves + ' save(s)?',\n\t\t\ttype: 'confirm',\t\t\t\t\n\t\t\tmessage: 'Are you sure you want to remove all ' + amountOfSaves + ' save(s) from your My List?',\t\t\t\n\t\t\tbuttonsCssClass: 'my-list',\n\t\t\tshowCloseIcon: false,\n\t\t\tcloseButtonCssClass: 'btn-default',\n\t\t\tkeyboard: false,\n\t\t\tmoveable: true,\n\t\t\tbuttons: {\n\t\t\t\t'Remove': function() {\n\t\t\t\t\t// Remove all saves from the session.\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\turl: contextPath + '/myList/all/remove',\n\t\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\t\tdialog.hide();\t\n\t\t\t\t\t\t\twindow.location.href = context + '/myList';\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function() {\n\t\t\t\t\t\t\tMessages.addMessage({\n\t\t\t\t\t\t\t\tmessage: \"Error removing all your items from your My List.\",\n\t\t\t\t\t\t\t\tseverity: 'ERROR'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t\t\n\t\tdialog.show();\n\t}", "function clickOnRemoveAll(event)\n {\n event.stopPropagation();\n event.preventDefault();\n\n if (options.removeAllConfirmation) {\n if ( confirm(options.removeAllConfirmationMsg) ) {\n removeAllForms();\n }\n } else {\n removeAllForms();\n }\n }", "function clearAll(e) {\n e.preventDefault();\n while (table.rows.length > 1) {\n table.deleteRow(1);\n }\n}", "function removeAll() {\n $('tbody').empty();\n $('.strike-all').prop('checked', false);\n $(this).parent().hide();\n}", "function trashOption() {\n let posts = document.getElementsByClassName(\"trash\");\n let delButton = document.getElementById(\"delete\");\n let change = \"none\";\n if (delButton.textContent == \"Delete one of your Posts\") {\n delButton.textContent = \"Go back to Posting Mode\";\n change = \"block\";\n document.getElementById(\"add\").disabled = true;\n document.getElementById(\"upload\").disabled = true;\n }\n else {\n delButton.textContent = \"Delete one of your Posts\";\n document.getElementById(\"add\").disabled = false;\n document.getElementById(\"upload\").disabled = false;\n }\n for (let i = 0; i < posts.length; i++) {\n posts.item(i).style.display = change;\n }\n}", "function changeDeleteButtonVisibility() {\n if (checkedCheckboxes.length > 0) {\n showDeleteButton();\n } else {\n hideDeleteButton();\n }\n}", "function SupprimerDuPanier(button) {\n\tdocument.getElementById(\"searchbar\").value = \"\";\n\tvar name = $(button).parent().find(\".title\").html();\n\tfor (var i = 0; i < panier.length; i++) {\n\t\tif(panier[i].name == name) {\n\t\t\tpanier.splice(i, 1);\n\t\t\tRefreshPanier();\n\t\t\treturn;\n\t\t}\n\t}\n}", "function removeall() {\r\n //remove all entities\r\n\t viewer.entities.removeAll();\r\n\t //reset RankMark\r\n\t FlagandNames = new Array();\r\n\t RankMark = new Array();\r\n\t\t//Redraw floatLabel\r\n floatlabel = viewer.entities.add({\r\n\t\t\tlabel : {\r\n\t\t\t\tshow : true,\r\n\t\t\t\tstyle: Cesium.LabelStyle.FILL_AND_OUTLINE,\r\n\t\t\t\tscale : 0.4,\r\n\t\t\t\thorizontalOrigin: Cesium.HorizontalOrigin.CENTER,\r\n\t\t\t\tverticalOrigin : Cesium.VerticalOrigin.CENTER,\r\n\t\t\t\tfillColor : Cesium.Color.WHITE,\r\n\t\t\t\toutlineColor : Cesium.Color.GRAY,\r\n\t\t\t\teyeOffset : new Cesium.ConstantProperty(new Cesium.Cartesian3(0,0, -1200000)),\r\n\t\t\t\t//translucencyByDistance : new Cesium.NearFarScalar(1e7,1.0,12e6,0.0)\r\n\t\t\t},\r\n\t\t\tbillboard :{\r\n\t\t\t\tshow : true,\r\n\t\t\t\twidth : 150,\r\n\t\t\t\theight: 50,\r\n\t\t\t\thorizontalOrigin: Cesium.HorizontalOrigin.CENTER,\r\n\t\t\t\tverticalOrigin : Cesium.VerticalOrigin.CENTER,\r\n\t\t\t\tcolor : 'images/black.png',\r\n\t\t\t\teyeOffset : new Cesium.ConstantProperty(new Cesium.Cartesian3(0,0, -1100000)),\r\n\t\t\t}\r\n\t\t});\r\n\t}", "function delAll(){\n document.getElementById(\"taskList\").innerHTML = '';\n}", "resetDeleteButtons() {\n const buttonsDelete = this.elements.content.getElementsByClassName('button-delete');\n\n buttonsDelete.forEach((e) => {\n e.style.display = 'block';\n });\n\n const buttonsReallyDelete = this.elements.content.getElementsByClassName('button-really-delete');\n\n buttonsReallyDelete.forEach((e) => {\n e.style.display = 'none';\n });\n }", "function delete_all() {\r\n\t$('#drag_resize').css({\"display\":\"none\"});\r\n\t$('.note').css({\"display\":\"none\"});\r\n}", "function handleClearAll(e) {\n setError(\"\");\n setList([]);\n }", "function clearAll() {\n recipeArea.empty();\n recipeTitle.empty();\n }", "function removeButton() {\n topics.pop(topics); \n renderButtons(); \n return false; \n}", "function initClearButton(){\n getComponent('clear').addEventListener('click',function () {\n filterArray.forEach(function (item) {\n var itemElem = getComponent('todo'+item.id)\n if(itemElem.classList.contains(CL_COMPLETED)){\n itemElem.classList.add(CL_REMOVED);\n update();\n }\n })\n\n })\n}", "function removePosters(){\n\t\t$('.choices_container').empty();\n\t}", "function clearAll(){\n let deleteOne = document.getElementById(\"user-output\");\n let deleteOneValue = deleteOne.value;\n if(deleteOneValue.length > 0){\n deleteOneValue = deleteOneValue.substring(0, deleteOneValue.length- deleteOneValue.length);\n deleteOne.value = deleteOneValue;\n const notifyArea = document.getElementById(\"match-notification\");\n notifyArea.style.display = \"none\";\n const notifyAreaTwo = document.getElementById(\"do-not-Match-notification\");\n notifyAreaTwo.style.display = \"none\";\n \n }\n}", "function removeAll(){\n\t$(\"input[type=text],input[type=date],textarea,select,input[type=button]\").css(\"display\",\"none\");\n}", "function handleAllRemoveButtons() {\n var trs = $('tr');\n trs.each(function(i){\n handleRemoveButtons($( this ));\n });\n }", "function checkList() {\n\tif (getList.childNodes.length > 0) {\n\t\tgetDeleteAll.style.visibility = \"visible\";\n\t} else if (getList.childNodes.length <= 0) {\n\t\tgetDeleteAll.style.visibility = \"hidden\";\n\t}\n}", "function removeCongrats(){\n\tif(openItems.length > 1){\n\t\t$(\".applaud\").remove()\n\t}\n}", "function deleteMoreButton() {\n var deleteMore = document.getElementById(\"moreButton\");\n deleteMore.remove();\n}", "function deleteAll() {\n var itemList = document.getElementsByClassName('modal-item');\n for (item = 0; item < itemList.length; item++) {\n itemList[item].style.display = 'none';\n }\n balance = 0;\n document.getElementById('amountTotal').innerHTML = balance;\n}", "function removeBtn(){\n for (galleryButton of galleryButtons){\n galleryButton.style.display = 'none';\n }\n}", "function delAll() {\n container.innerHTML = \"\"\n}", "removeAll() {\n return spPost(this.clone(ViewFields, \"removeallviewfields\"));\n }", "function deleteAll(){\n\t\n\tanimateButtons('deleteAll');\n\t\n\tresText=\"\";\n\tresNum=0;\n\tnumberInstMemo=0;\n\tdocument.getElementById(\"resNum\").innerHTML = resNum;\n\n\tprevTypeOperator='sum';\n\toperations('z');\n\tprevTypeOperator='sum';\n\n\tdocument.getElementById(\"resText\").innerHTML = \"___\";\n}", "function eventDeleteAll(e){\n\t\te.preventDefault();\n\t\tlet filas = document.querySelectorAll(\".btn-delete\");\n\t\tfor (let i = 0; i < filas.length-1; i++) {\n\t\t\tdel(filas[i], false);\n\t\t}\n\t\tdel(filas[filas.length-1], true);\t//suponiendo que los del() no se ejecutan antes por asincronismo\n\t\t/*get();*/\n\t}", "function clearAllBtn() {\n let $div = document.createElement(\"div\");\n let $clrBtn = document.createElement(\"button\");\n let cmpltSec = document.querySelector(\".cmpltTasksSec\");\n\n $clrBtn.appendChild(document.createTextNode(\"Clear All\"));\n $div.classList.add(\"clr-btn\");\n\n $clrBtn.addEventListener(\"click\", clearAllHandler);\n cmpltSec.after($div);\n $div.appendChild($clrBtn);\n}", "function removeButtonDisabled() {\n return (vm.options.length <= 1);\n }", "function hiddenButton() {\n\t// detail page\n\tif (selected.length < 1) {\n\t\t$('#deletes').attr(\"style\",\n\t\t\t\t\"pointer-events: none; cursor: default; opacity:0.5; margin-bottom: 10px; width: 100px\");\n\t} else {\n\t\t$('#deletes').attr(\"style\", \"margin-bottom: 10px; width: 100px\");\n\t}\n}", "function renderButtons() {\n $('#searchList').html(' ');\n allCities = [...new Set(allCities)]\n //creating, setting, & appending button text as from list items in []\n for (i = 0; i < allCities.length; i++) {\n // var btn = $('<button>');\n // btn.text(allCities[i]);\n var btn = `<button id=btn>${allCities[i]}</button>`\n var removeBtn = `<button data-index='${i}' id='iconTrashCan'><i class='fa fa-trash'></i></button>`;\n $('#searchList').append(btn);\n $('#searchList').append(removeBtn);\n }\n}", "function showAll() {\n UI.list.find('li').show();\n UI.showMore.hide();\n }", "function fMoreThanOne(oTableObj) {\n var aSOM = oTableObj.somExpression;\n var vList = fGetAllTableRows(aSOM);\n var iCount = vList.length;\n if (iCount <= 1) {\n app.alert(msgAlertNoRemove);\n }\n return iCount > 1;\n}", "_removeItem(e) {\n e.preventDefault();\n e.stopPropagation();\n\n const $target = $(e.target);\n const $entry = $target.closest('.djblets-c-list-edit-widget__entry');\n\n if (this._numItems > 1) {\n $entry.remove();\n this._numItems -= 1;\n this._$list.find('.djblets-c-list-edit-widget__entry')\n .each((idx, el) => {\n const $el = $(el);\n $el.attr('data-list-index', idx);\n this._updateEntryInputName($el, idx);\n });\n $(`input[name=\"${this._fieldName}_num_rows\"]`)\n .val(this._numItems);\n } else {\n const $defaultEntry = this._createDefaultEntry(0);\n $entry.replaceWith($defaultEntry);\n }\n }", "onStoreRemoveAll() {\n // GridSelection mixin does its job on records removing\n super.onStoreRemoveAll && super.onStoreRemoveAll(...arguments);\n\n if (this.isPainted) {\n this.rowManager.clearKnownHeights();\n this.renderRows();\n this.toggleEmptyText();\n }\n }", "function checkSelectedFilterStats() {\n $(\".selected-filters\").each(function() {\n var $this = $(this);\n if ($this.find(\"div\").length <= 0) {\n $this.removeClass(\"showing\");\n $this.closest(\".accordion-level\").children(\"a\").find(\"span\").removeClass(\"applied\");\n }\n });\n if ( $(\".applied\").length === 0 ) {\n $(\".clearall\").hide();\n }\n}", "function canRemoveForm()\n {\n return (getFormsCount() > options.minFormsCount) ? true : false;\n }", "function deleteEntry(entry){\n ENTRY_LIST.splice(entry.id, 1);\n// after we call the deleteEntry funciton we need to update the Total values again\n updateUI();\n }", "function clearList() {\n store.clearAll();\n output = \"All course registration are removed.\";\n document.getElementById('showInfo').innerHTML = output;\n}", "clearAll()\r\n { \r\n this.selectedItems=[];\r\n this.display = null;\r\n this.value = null;\r\n this.results = null;\r\n this.error = null;\r\n this.icon = false;\r\n this.Focusinputbox = false;\r\n this.source.forEach(function (item) {\r\n item.invisible = false;\r\n });\r\n\r\n this.$emit(\"clear\");\r\n \r\n }", "function hideBtnInList(event) {\n $(event).children(\".deleteBtnInList\").hide();\n}", "function hideAllProductBtns(){\n addProductBtnVisible(false);\n deleteProductBtnVisible(false);\n updateProductBtnVisible(false);\n }", "function showBtnInList(event) {\n $(event).children(\".deleteBtnInList\").show();\n}", "function handleRemove(){\r\n //making sure it does not remove if there are 0 items\r\n if (quantity.innerHTML !== \"0\"){\r\n quantity.innerHTML = parseInt(quantity.innerHTML)-1;\r\n }\r\n //disabling the \"agree\" button when there are no items\r\n if (quantity.innerHTML === \"0\"){\r\n agree.disabled = true;\r\n } \r\n }", "function ClearFields() {\n $(\"#showDetails\").addClass(\"noDetails\");\n while (repositoriesList.length > 0) {\n repositoriesList.pop(); \n }\n document.getElementById('response').innerHTML = '';\n}", "clearEntry() {\n this.destroyLastOperator();\n this.updateDisplay();\n }", "function clearBtnToggle(){\n if(groceryItem.innerHTML == ''){\n clearBtn.style.display = 'none'\n }else{\n clearBtn.style.display = 'block'\n }\n}", "function delAll() {\n let taskBox = document.getElementById(\"tasksBox\");\n\n if (taskBox.innerHTML !== \"\" && confirm(\"Are you sure you want to clear all the tasks?\")) {\n // delete all items with 'task' key prefix from localStorage\n localStorage.removeItem(\"task\");\n arrayTask = [];\n // task box\n taskBox.innerHTML = \"\";\n // filter text box\n document.tasksForm.txtFilterTasks.value = \"\";\n }\n}", "function clearFilters() {\n let filtersList = document.getElementById('filtersList');\n // while there are entries in the list,\n while (filtersList.firstChild) {\n // remove the last one in the list\n filtersList.removeChild(filtersList.lastChild);\n }\n document.getElementById('filtersCount').innerHTML = `Applying ${filtersList.children.length} filters`;\n document.getElementById('featuresCount').innerHTML = '';\n }", "function addRemoveButtons() {\n\t\t\t\tvar dl = $(this),\n\t\t\t\tguzik = $('<div class=\"miniButton\">remove</div>');\n\t\t\t\t// remove old buttons\n\t\t\t\tdl.remove('div.miniButton');\n\t\t\t\tguzik.css('float', 'right');\n\t\t\t\tguzik.click(removeListItem);\n\t\t\t\tdl.append(guzik);\n\t\t\t}", "function displayValid(entryItem) {\n entryItem.removeClass();\n}", "handleDeleteButtonClick() {\n Alert.alert(\"Hold on!\", \"Are you sure you want to clear all data?\", [\n {\n text: \"Cancel\",\n onPress: () => null,\n style: \"cancel\"\n },\n { text: \"YES\", onPress: () => this.deleteAll() }\n ]);\n return true;\n }", "function checkListClear() {\n if (CHAT_LIST.childElementCount > 100) {\n // remove 50 in a row\n while (CHAT_LIST.childElementCount > 50) {\n CHAT_LIST.firstElementChild.remove();\n }\n }\n}", "allDelete(){\n\n}", "function myRemoveFunc() {\n var size = $(\"#appendform > input\").length;\n if(size <=2)\n {\n $(\"#addAnswers\").removeClass('hidde');\n alertify.alert(\"There should be more than two questions\")\n }else\n {\n $(\"#appendform label\").last().remove();\n $(\"#appendform input\").last().remove();\n } \n }", "function updateClearAll(component) {\n component.$dropdown.find('[data-aui-checkbox-multiselect-clear]').prop('disabled', function () {\n return getSelectedDescriptors(component).length < 1;\n });\n}", "function clearAllListItems(){\n $('#todo li').remove();\n\n // reset count to 0 since we removed all of the list items\n count = 0;\n\n // update the new count in the DOM\n $('.count').html(count);\n }", "_closeAll() {\n this._closeItems();\n this._toggleShowMore(false);\n }", "function clearResults() {\n if (savedQueries.count > 0){\n savedQueries.count = 0;\n savedQueries.items = [];\n $(\"#downloadSavedQueries\").text('Download (0)').removeClass(\"buttonIcons\").addClass(\"uploadShapeButton-disabled\");\n $(\"#clearResults\").removeClass(\"buttonIcons\").addClass(\"uploadShapeButton-disabled\");\n }\n }", "clearReceiptSearchResults () {\n $(\"#receipts-lists\").html('');\n $(\"#receipts-lists\").parent('.table-responsive').find('.panel').remove();\n }", "function removeItem() {\n $(this).parent().parent().remove();\n if ($('.shop-list tbody').children().length == 0) {\n $('.strike-all').prop('checked', false);\n $('table thead').hide();\n }\n}", "function onRemoveClicked(button){\n index = button.parentElement.className.split(\" \")[1].substring(5);\n clearSearchTerm(index);\n}", "function handleRemoveAll(_event) {\n for (let i = 0; i < carticles.length; i++) {\n document.getElementById(\"div\" + i).remove();\n }\n warenkorbsumme = 0;\n gesamtSumme.innerText = \"Gesamtsumme: \" + warenkorbsumme.toLocaleString(\"de-DE\", { style: \"currency\", currency: \"EUR\" });\n localStorage.clear();\n }", "function onClickClearAll() {\n strDisplay = \"\";\n opHidden = [];\n opHiddenIndex = 0;\n operandoType = 0;\n openParIndex = 0;\n closeParIndex = 0;\n refreshDisplay();\n}", "function cancelDeleteButton() {\n document.getElementById(\"sensitiveAccountsData\").style.display = \"block\";\n document.getElementById(\"addNewButton\").style.display = \"none\";\n }", "function btnExcludeSelected() {\n const eraseOnlySelected = document.querySelectorAll('.selected');\n for (let erase of eraseOnlySelected) {\n if (confirm('Tem certeza de que deseja excluir TODAS as atividades SELECIONADAS?')) {\n const nextParent = erase.parentNode;\n const theLastParent = nextParent.parentNode\n theLastParent.remove();\n }\n }\n archiveSet();\n }", "function removeItems(){\n enableBtn();\n $inputName.removeChild(InputItem);\n $inputName.removeChild(btnGuardar);\n $inputName.removeChild(btnCancel);\n }", "function filterPageDisplayAll() {\n $record_lines.show();\n $no_record_lines.hide();\n }", "function borrarProductos(){\n $(\"#listaProductos\").html(\"\");\n}", "function deleteAll() {\r\n todoList.innerHTML = \"\";\r\n alert(\"Deleted Successfully\");\r\n}", "function gererSupprimerButton()\n {\n if (itinChoisiArray.length >0)\n supprimerItinChoisiBtn.disabled = false;\n else\n supprimerItinChoisiBtn.disabled = true;\n }", "function del_all_item(){\n\n Swal.fire({\n title: 'Are you sure?',\n text: \"You Want to Delete Whole TODO List!\",\n icon: 'warning',\n showCancelButton: true,\n confirmButtonColor: '#3085d6',\n cancelButtonColor: '#d33',\n confirmButtonText: 'Yes, delete it!'\n }).then((result) => {\n if (result.value) {\n li.innerHTML=\"\";\n Swal.fire(\n 'Deleted!',\n 'Your TODO List Has Been Deleted.',\n 'success'\n )\n }\n })\n}", "function checkSearchSubmitBtn() {\r\n // Hide add to collection button in collection modal when no collections are selected\r\n var checkboxes = $(\"#collectionSearchObjects > input\");\r\n var submitButt = $(\".collectionSearchSubmit\");\r\n\r\n if (checkboxes.is(\":checked\")) {\r\n submitButt.show();\r\n isAnyChecked = 1;\r\n }\r\n else {\r\n submitButt.hide();\r\n isAnyChecked = 0;\r\n }\r\n}", "function remFieldRow(e) {\n e.stopPropagation();\n var btn = this\n , $ul = getUl(btn);\n $(btn).parent().remove();\n if ($ul.children().length == 0) {\n setToggleField($ul, false);\n $ul.removeClass('visible');\n emptyStableVar($ul);\n } else {\n refreshStableVar(getName($ul));\n }\n render();\n}", "function renderButtons(entries) {\n $('#buttons').empty();\n for (let i = 0; i < entries.length; i++) {\n const element = entries[i];\n createButton(element, i);\n }\n}", "function removeItemBasedOnPermission() {\n var hide = true;\n angular.forEach(JSON.parse(attrs.hasAnyPermission), function (value, key) {\n if (permissions.hasPermission(value)) {\n hide = false;\n }\n });\n if (hide === true) {\n element[0].remove();\n }\n }", "function showClearFilterBtn(tag) {\n forEach(\".clear-filter-text\", function (node) {\n node.innerHTML = \"filter on \" + tag;\n });\n SetNodesVisibility(\".clear-filter\", true);\n}", "function removeAllEventsFromDisplay() {\n cosmo.view.cal.itemRegistry.each(removeEventFromDisplay);\n return true;\n }", "function clearFilters() {\n\n $('#filters-container').children('div').each(function(i) {\n if (i > 0) {\n $(this).remove();\n }\n \n });\n \n $('.dropdown_filter, .dropdown_operator, .textfield_value, .dropdown_relation').val('');\n $('.dropdown_filter').change();\n $('.dropdown_relation').last().hide();\n $('.span_add').last().show(); \n \n //Titulo\n $('#form_filtros h4').html(\"Nueva búsqueda avanzada:\");\n \n //Ocultar el botón guardar\n $('#filter-save2').parent('div').hide();\n \n //ocultar alert si está\n $(\".alert\").fadeOut('slow');\n \n}" ]
[ "0.72400993", "0.66364855", "0.6522446", "0.62390465", "0.6174773", "0.61586815", "0.61159176", "0.60888386", "0.6069556", "0.6066277", "0.6054565", "0.590161", "0.5832153", "0.5826949", "0.5823255", "0.58211416", "0.58107257", "0.58070296", "0.5759274", "0.5747089", "0.5741348", "0.5739693", "0.57284415", "0.5723943", "0.5714319", "0.5703777", "0.56979555", "0.5697865", "0.56941664", "0.5692441", "0.56777495", "0.5674572", "0.567359", "0.5671573", "0.5645251", "0.5644447", "0.5644149", "0.5635706", "0.5633232", "0.56314766", "0.56282735", "0.5624257", "0.56154376", "0.5579205", "0.55740446", "0.55711323", "0.5564074", "0.5563133", "0.5561375", "0.5555247", "0.55458605", "0.5541556", "0.55376023", "0.55335283", "0.5519738", "0.5518674", "0.55082846", "0.5506951", "0.5503951", "0.5501292", "0.5489041", "0.54751354", "0.5471361", "0.5470223", "0.5453832", "0.5446201", "0.5440686", "0.54384905", "0.5438211", "0.543293", "0.5431411", "0.5419391", "0.54187006", "0.54162395", "0.54147995", "0.5413755", "0.5412041", "0.54050976", "0.53995997", "0.53990096", "0.5394711", "0.5393535", "0.5392322", "0.5391844", "0.53913873", "0.5391066", "0.5389498", "0.53847045", "0.53844494", "0.5382887", "0.5378699", "0.5377887", "0.53742564", "0.5369021", "0.53627354", "0.5361204", "0.5359265", "0.53587854", "0.53530496", "0.5348798" ]
0.71412474
1
an array of numbers as arg. The Fn should return an arr containing any shortest combination of element that add up exactly the targetSum. If there is a tie, you may return any single one
function bestSum(targetSum, numbers, memo = {}) { // Time complexity O(m^2*n) // Space complexity O(m^2) if (targetSum in memo) return memo[targetSum]; if (targetSum === 0) return []; if (targetSum < 0) return null; let shortestCombination = null; for (const num of numbers) { const remainder = targetSum - num; const remainderResult = bestSum(remainder, numbers, memo); if (remainderResult !== null) { const combination = [...remainderResult, num]; if ( shortestCombination === null || combination.length < shortestCombination.length ) shortestCombination = combination; } } return (memo[targetSum] = shortestCombination && shortestCombination); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function targetSum(arr, sumTarget){\n \n}", "function solution1(array, targetSum) {\n array.sort((a,b) => a - b);\n const result = [];\n for (let i = 0; i < array.length; i++) {\n const x = array[i];\n for (let j = i+1; j < array.length; j++) {\n const y = array[j];\n for (let k = j+1; k < array.length; k++) {\n const z = array[k];\n if (x + y + z === targetSum) {\n result.push([x, y, z]);\n }\n }\n }\n }\n return result;\n }", "function findTargetSum(arr, target) {\n for (let i=0; i < arr.length - 1; i++) {\n // for every number in arr check to see if sum with any other number is the target\n for (let j=i; j < arr.length; j++) {\n if (arr[i] + arr[j] === target) {\n \t// return first solution found\n return [ arr[i], arr[j] ];\n }\n }\n }\n return 'No solution'\n}", "function bestSum(targetSum, numbers) {\n const table = Array(targetSum + 1).fill(null);\n table[0] = [];\n\n for (let i = 0; i <= targetSum; i++) {\n if (table[i] !== null) {\n for (let num of numbers) {\n const combination = [...table[i], num];\n // we should store the combination only if it is shorter than already existing\n if (!table[i + num] || table[i + num].length > combination.length) {\n table[i + num] = combination;\n }\n }\n }\n }\n return table[targetSum];\n}", "function bestSum(targetSum, numbers, memo = {}) {\n if (targetSum in memo) return memo[targetSum];\n if (targetSum === 0) return [];\n if (targetSum < 0) return null;\n let shortest = null;\n\n for (let num of numbers) {\n const remainder = targetSum - num;\n let remainderResult = bestSum(remainder, numbers, memo);\n if (remainderResult !== null) {\n let combination = [...remainderResult, num];\n if (shortest === null || combination.length < shortest.length) {\n shortest = combination;\n }\n }\n }\n memo[targetSum] = shortest;\n return memo[targetSum];\n}", "function bestSum(targetSum, numbers, memo = {}) {\n if (targetSum in memo) return memo[targetSum];\n\n if (targetSum === 0) return [];\n if (targetSum < 0) return null;\n\n let shortestCombination = null;\n\n for (let num of numbers) {\n const remainder = targetSum - num;\n const remainderCombination = bestSum(remainder, numbers, memo);\n if (remainderCombination !== null) {\n const combination = [...remainderCombination, num];\n if (shortestCombination === null || combination.length < shortestCombination.length) {\n shortestCombination = combination;\n }\n }\n }\n memo[targetSum] = shortestCombination;\n return shortestCombination;\n}", "function solution2(array, targetSum) {\n array.sort((a,b) => a -b );\n const result = [];\n for (let i = 0; i < array.length; i++) {\n let x = array[i];\n let leftPtr = i + 1;\n let rightPtr = array.length - 1;\n \n while (leftPtr < rightPtr) {\n let y = array[leftPtr];\n let z = array[rightPtr];\n let currentSum = x + y + z;\n if (currentSum === targetSum) {\n result.push([x, y , z]);\n leftPtr++;\n rightPtr = array.length - 1;\n } else if (currentSum < targetSum) {\n leftPtr++;\n } else if (currentSum > targetSum) {\n rightPtr--;\n }\n }\n }\n\n return result;\n }", "function bestSum(target, nums, memo={}){\n if (target in memo) return memo[target]\n if (target === 0) return []\n if (target < 0) return null\n\n let minWays = null\n\n for (let num of nums){\n const remainder = target - num,\n remainderResult = bestSum(remainder, nums, memo)\n\n if (remainderResult){\n const combination = [...remainderResult, num]\n if (!minWays || combination.length < minWays.length){\n minWays = combination\n }\n } \n }\n memo[target] = minWays\n return minWays\n}", "function combinationSum(candidates, target) {\n let dp=[...Array(candidates.length+1)].map(d=>[...Array(target+1)].map(d=>[]))\n // dp[i][sum]= #ways to reach sum with the first i items\n\n dp[0][0]=[[]]// we can reach sum 0 with 0 items in 1 way\n for (let i = 1; i <= candidates.length; i++) {\n let ele=candidates[i-1]\n for (let s = 0; s <=target; s++) {\n if(ele<=s)\n dp[i][s-ele].forEach(d=> dp[i][s].push( [...d.concat([ele])]))\n dp[i-1][s].forEach(d=>dp[i][s].push([...d]))\n } \n }\n return dp[candidates.length][target]\n}", "function bestSum(targetSum, numbers, memoize = {}) {\n if (targetSum in memoize) return memoize[targetSum];\n if (targetSum == 0) return [];\n if (targetSum < 0) return null;\n\n let bestResult = null;\n for (const num of numbers) {\n const remainder = targetSum - num;\n const result = bestSum(remainder, numbers, memoize);\n if (result !== null) {\n const updatedResult = result.slice();\n updatedResult.push(num);\n if (bestResult === null || updatedResult.length < bestResult.length) {\n bestResult = updatedResult;\n }\n }\n }\n\n memoize[targetSum] = bestResult;\n return bestResult;\n}", "function targetSum(arr, sum){\n\tlet result = [];\n\n\t/*we use nested loops to compare elements and search for a matching sum*/\n\n\tarr.find((elem, index) => { // use find for out loop\n\t\tfor(let i = 0; i < arr.length; i++){ // use for for inner loop\n\t\t\tif(index !== i && elem + arr[i] === sum){ // check if 2 differnt elems sum match arg\n\t\t\t\tresult.push(elem, arr[i]) // if we find a match put the elems in result\n\t\t\t\treturn true // stop searching\n\t\t\t}\n\t\t}\n\t})\n\treturn result\n}", "function findPairForSum(arr, target){\n // Create array for output\n var output = [];\n // Filter out numbers bigger than target sum\n var filteredArray = arr.filter(function(number){\n return number < target;\n });\n // Iterate through the array to find the first number\n for(var i = 0; i < filteredArray.length; i++){\n var firstNumber = filteredArray[i];\n for(var j = 0; j < filteredArray.length; j++){\n // Iterate through the filteredArrayay to find the second number\n if(firstNumber + filteredArray[j] === target){\n var secondNumber = filteredArray[j];\n // Push output to output array\n output.push(firstNumber, secondNumber);\n return output;\n }\n }\n }\n}", "function canSumTeachers(targetSum, numArry) {\n\n const targetSumArr = Array(targetSum + 1).fill(false);\n targetSumArr[0] = true;\n\n // making the value of the targetSumArr true if that exists in numArr\n for(let i = 1; i <= targetSumArr.length; i++) {\n for(let j = 0; j < numArry.length; j++) {\n if(numArry[j] === i) {\n targetSumArr[i] = true; \n break; \n } \n }\n }\n \n for(let i = 0; i < targetSumArr.length; i++) {\n if(targetSumArr[i] === true) {\n for(let j = 0; j < numArry.length; j++) {\n if(targetSumArr[i + numArry[j]] !== undefined) {\n targetSumArr[i + numArry[j]] = true; \n }\n }\n } \n }\n\n return targetSumArr[targetSumArr.length - 1];\n}", "function sumToTarget(array, target){\n\tif(array.length === 0){\n\t\treturn false;\n\t}\n\t\n\tfor(let i = 0; i < array.length; i++){\n\t\tlet sum = array[i];\n\t\tlet j = i + 1;\n\t\t\n\t\twhile(sum < target && j < array.length){\n\t\t\tsum += array[j];\n\t\t\tif(sum === target){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tj ++;\n\t\t}\n\t\t\n\t\tif(j === array.length && sum < target){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}\n\treturn false;\n}", "function combinationSum(candidates, target) {\n let dp=[...Array(candidates.length+1)].map(d=>[...Array(target+1)].map(d=>0))\n // dp[sum][i]= #ways to reach sum with the first i items\n\n dp[0][0]=1// we can reach sum 0 with 0 items in 1 way\n for (let i = 1; i <= candidates.length; i++) {\n let ele=candidates[i-1]\n for (let s = 0; s <=target; s++) {\n if(ele<=s){\n dp[i][s]+=dp[i][s-ele] //this line allows repetition,\n // if it was +=dp[i-1][s-ele], it would mean that i m only picking an element once\n }\n dp[i][s]+=dp[i-1][s]\n \n } \n }\n\n dp.forEach(d=>console.log(d+''))\n let result=[...Array(dp[candidates.length][target])].map(d=>[])\n //reconstruction ezpz only through dp table\n let recursion=(i,j,left)=>{\n if(i<=0||j<=0||dp[i][j]==0)return\n let num=dp[i][j]-dp[i-1][j]\n if(num>0){\n for (let ii = left; ii <left+num; ii++) \n result[ii].push(candidates[i-1]) \n recursion(i,j-candidates[i-1],left)\n }\n recursion(i-1,j,left+num)\n }\n recursion(candidates.length,target,0)\n return result\n}", "_sumToTarget(arr, target) { console.log(\"_sumToTarget reducing for target \", target);\r\n let sum = 0, x = 0, l = arr.length;\r\n while(x<l) {\r\n sum += arr[x++].value;\r\n if (sum >= target) {\r\n if (this.config.debug) console.log(\"_sumToTarget reduced \", l, \" to \", x);\r\n return x;\r\n }\r\n }\r\n return l;\r\n }", "function get2NumSum(inputArr, targetSum) {\n var results = [],\n potentials = {};\n for (let num of inputArr) {\n var potentialMatch = targetSum - num;\n if (potentials[num]) {\n return [potentialMatch, num];\n } else {\n potentials[potentialMatch] = true;\n }\n }\n}", "function pair_with_target_sum(arr, targetSum) {\n\t// TODO:write code here\n\t// given sorted array, return the indices of the two numbers that sum up to the targetSum\n\t// use two pointers, one starting at index 0 and the other starting from last index\n\t// move left pointer of the sum is < targetSum, move right pointer of sum is > targetSum\n\t// keeping moving until we find targetSum or until the pointers meet\n\n\t//edge cases: if no sum was found, return empty array\n\t//\t\t\t\t\t\tif length if less than 2 return empty array (since we need a pair)\n\n\t//using hashmap, check if the map has the complement, if not continue\n\tlet map = new Map();\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tif (map.has(targetSum - arr[i])) {\n\t\t\treturn [ map.get(targetSum - arr[i]), i ];\n\t\t} else {\n\t\t\tmap.set(arr[i], i);\n\t\t}\n\t}\n\treturn [];\n}", "function findConsqSums(nums, targetSum) {\n // code here\n}", "function targetSum2(arr, value) {\n let firstIndex = 0;\n let lastIndex = arr.length - 1;\n\n while (firstIndex < lastIndex) {\n let sum = arr[firstIndex] + arr[lastIndex];\n\n if (value < sum) {\n lastIndex--;\n } else if (value > sum) {\n firstIndex++;\n } else {\n return [arr[firstIndex], arr[lastIndex]];\n }\n }\n\n return [];\n}", "function twoNumberSum(array, targetSum) {\n\tvar result = [];\n\tfor (var i = 0; i < array.length; i++) {\n\t\tfor (var j = i+1; j < array.length; j++) {\n\t\t\tif (array[i] + array[j] === targetSum) {\n\t\t\t\tresult.push(array[i], array[j]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n}", "function pair_with_target_sum(arr, targetSum) {\n const nums = {}; // to store numbers and their indices\n for (let i = 0; i < arr.length; i++) {\n const num = arr[i];\n if (targetSum - num in nums) {\n return [nums[targetSum - num], i];\n }\n nums[arr[i]] = i;\n }\n return [-1, -1];\n}", "function threeSumAlt(array, target) {\n let results = [];\n if (!array.length) return results;\n\n array.sort((a, b) => {\n return a - b;\n });\n let current_sum = 0;\n\n // if we change the second constraint to current < array.length instead\n // of current < array.lenght - 2, on the last iteration, current = the\n // last element of the array, left will exceed the array bound, and right\n // right will still be the last element of the array\n for (let current = 0; current < array.length - 2; current++) {\n // since we only want to add unique magic triplets,\n if (current > 0 && array[current] === array[current - 1]) continue;\n\n let L = current + 1;\n let R = array.length - 1;\n\n while (L < R) {\n current_sum = array[L] + array[current] + array[R];\n\n if (current_sum === target) {\n results.push([array[L], array[current], array[R]]);\n L += 1;\n } else if (current_sum < target) {\n L += 1;\n }\n\n // current_sum > target -> biggest number is too big -> R -= 1\n else {\n R -= 1;\n }\n }\n }\n\n return results;\n}", "function twoSum(arr = [], target = 0) {\n if (!Array.isArray(arr) || typeof target !== \"number\") {\n return undefined\n }\n\n for (let i = 0; i < arr.length; i++) {\n if (sumCheck(i, arr, target)){\n return sumCheck(i, arr, target)\n }\n }\n}", "function combinationSum(candidates, target) {\n let memo = [] // Array of solutions for different targets\n for (let current_target = 0; current_target <= target; current_target++) {\n let set_for_current_target = []\n let cache_for_current_target = {}\n for (let k = 0; k < candidates.length; k++) {\n let candidate = candidates[k]\n if (candidate == current_target) {\n set_for_current_target.push([candidate])\n }\n let distance_from_0 = current_target - candidate\n if (distance_from_0 > 0) {\n for (let j = 0; j < memo[distance_from_0].length; j++) {\n let new_set = [...memo[distance_from_0][j]]\n new_set.push(candidate)\n new_set.sort()\n if (!cache_for_current_target[new_set]) {\n cache_for_current_target[new_set] = true\n set_for_current_target.push(new_set)\n }\n }\n }\n }\n memo[current_target] = set_for_current_target\n }\n return memo[target]\n}", "function subsetSum(array, target) {\n\tvar sum;\n\tfor (let i = 0; i < array.length; i++) {\n\t\tsum = array[i];\n\n\t\tfor (let i = 0; i < array.length; i++) {\n\t\t\tif (array[i] < target) {\n\t\t\t\tif (sum + array[i] <= target) {\n\t\t\t\t\tsum += array[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function twoNumberSum(array, targetSum) {\n // take every number in the array (except the last one)\n for (let i = 0; i < array.length - 1; i++) {\n // take every following number in the array (so obvs not the first, but incl the last one)\n for (let j = i + 1; j < array.length; j++) {\n // if the two selected numbers give the needed sum\n if (array[i] + array[j] === targetSum) {\n // return the two numbers in a sorted array\n // you have to provide compareFn to sort, because JS sort casts values to string\n // so [3,4,30] becomes [3,30,4]\n return [array[i], array[j]].sort((a, b) => a - b);\n }\n }\n }\n // return [] if no numbers in the array add up to the required sum\n return [];\n}", "function hasTargetSum(arr, target){\n // takes an array and a target, and for all pairs of numbers\n // that equal that target, console log 'FOUND'\n for(let first=0; first < arr.length; first++){\n for(let second=0; second < arr.length; second++){\n console.log('looking at', first, second)\n if(first + second === target){\n console.log('FOUND')\n}}}}", "function findPairSum(arr, target) {\r\n var result = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n for (var j = 1; j < arr.length; j++) {\r\n if (arr[i] + arr[j] === target) {\r\n result.push(i,j);\r\n }\r\n }\r\n }\r\n console.log(result)\r\n return result.slice(2,4);\r\n}", "function twoNumberSum(array, targetSum) {\n // Write your code here.\n for(let i = 0; i < array.length - 1; i++){\n const firstNum = array[i]\n for(let j = i + 1; j < array.length; j++){\n const secondNum = array[j]\n if(firstNum + secondNum === targetSum){\n return [firstNum , secondNum]\n }\n }\n }\n return [];\n \n }", "function sumOfTwo(array, target) {\r\n let answers = [];\r\n for (let i = 0; i < array.length; i++) {\r\n let firstNum = array[i];\r\n for (let j = 1; j < array.length; j++) {\r\n let secondNum = array[j];\r\n if (firstNum + secondNum === target && i != j) {\r\n answers.push(i, j);\r\n return answers;\r\n }\r\n }\r\n\r\n }\r\n}", "function twoNumberSum(array, targetSum) {\n\tlet answer = [];\n\tfor (let i = 0; i < array.length; i++) {\n for (let j = i + 1; j < array.length; j++) {\n if (array[i] + array[j] === targetSum) {\n answer.push(array[i], array[j]);\n } \n }\n }\n return answer;\n}", "function twoNumberSum(array, targetSum) {\n let hash = [];\n for (const element of array) {\n let targetVal = targetSum - element;\n if (hash.indexOf(targetVal) !== -1) {\n return [targetVal, element];\n } else {\n hash.push(element);\n }\n }\n\n return [];\n}", "function solve(startIndex, currentSum, targetSum, inputArray, trackArray, callback){\n if (currentSum === targetSum && isFunction(callback)) {\n callback(selectTrackedItems(inputArray, trackArray));\n }\n if (currentSum === Infinity) {\n currentSum = 0;\n }\n for (var i = startIndex; i < inputArray.length; i++) {\n var currentItem = inputArray[i];\n var prevItem = inputArray[i-1];\n if (currentSum + currentItem > targetSum) {\n continue;\n }\n if (i > 0 && currentItem === prevItem && ! trackArray[i-1]) {\n continue; \n }\n trackArray[i] = true;\n solve(i + 1, currentSum + currentItem, targetSum, inputArray, trackArray, callback);\n trackArray[i] = false;\n } \n }", "function twoSum(array, target){\n let temp = 0;\n let newArr = [];\n for(let i = 0; i < array.length; i ++){\n if(array[i] < target){\n newArr.push(array[i]);\n }\n }\n for(let i = 0; i < newArr.length; i ++){\n for(let j = 0; j < newArr.length; j ++){\n if(target == newArr[i] + newArr[j]){\n return [i, j];\n }\n }\n }\n}", "function search_triplets(arr) {\n\t// TODO: Write your code here\n\t// given unsorted array, find all triplets that add up to zero, return array with all triplets that sum up to zero\n\t// sort the array first\n\t// start from both ends of the array\n\t//\n\ttriplets = [];\n\n\tlet sumTarget = 0;\n\n\tif (arr.length < 3) {\n\t\treturn triplets;\n\t}\n\n\tarr.sort((a, b) => a - b);\n\tfor (let i = 0; i < arr.length - 2; i++) {\n\t\tif (arr[i] === arr[i - 1]) continue;\n\t\tif (arr[i] > sumTarget) {\n\t\t\t//if the first target is already greater than zero and since it's increasing, there's no way to add up to zero\n\t\t\treturn triplets;\n\t\t}\n\t\tlet leftPointer = i + 1;\n\t\tlet rightPointer = arr.length - 1;\n\n\t\twhile (leftPointer < rightPointer) {\n\t\t\tif (arr[leftPointer] + arr[rightPointer] + arr[i] === sumTarget) {\n\t\t\t\ttriplets.push([ arr[leftPointer], arr[rightPointer], arr[i] ]);\n\t\t\t\twhile (arr[leftPointer] === arr[leftPointer + 1]) leftPointer++;\n\t\t\t\twhile (arr[rightPointer] === arr[rightPointer - 1]) rightPointer--;\n\t\t\t\tleftPointer++;\n\t\t\t\trightPointer--;\n\t\t\t} else if (arr[leftPointer] + arr[rightPointer] + arr[i] < sumTarget) {\n\t\t\t\tleftPointer++;\n\t\t\t} else {\n\t\t\t\trightPointer--;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn triplets;\n}", "function get2NumSum(inputArr, targetSum){\n\tinputArr.sort((a,b) => a-b)\nvar sum;\n\tvar left = 0, leftVal;\n\tvar right = inputArr.length -1, rightVal;\nwhile(left < right){\n\t\tleftVal = inputArr[left]\n\t\trightVal = inputArr[right]\n\t\tsum = leftVal + rightVal\n\t\tif(sum === targetSum){\n\t\t\treturn [leftVal, rightVal]\n\t\t}else if(sum < targetSum){\n\t\t\tleft++;\n\t\t}else if(sum > targetSum){\n\t\t\tright--;\n\t\t}\n\t}\n \n return [];\n}", "function canSum(targetSum, numbers) {\n const table = new Array(targetSum + 1).fill(false);\n table[0] = true; \n\n for (let i = 0; i <= targetSum; i++) {\n if (table[i] === true) {\n for (let num of numbers) {\n table[i + num] = true;\n // console.log('i', i, table)\n }\n }\n }\n return table[targetSum];\n}", "function twoSum(numArray, target) {\n\n for (let i in numArray) {\n let number = numArray[i];\n let supplementIndex = numArray.indexOf(target - number);\n\n if (supplementIndex !== -1 && supplementIndex !== parseInt(i)) {\n return [parseInt(i), supplementIndex];\n }\n }\n}", "function twoSums (num, target) {\n output = [];\n for(i = 0; i < num.length -1; i++){\n for(j = i + 1; j < num.length; j++ ){\n if(num[i] + num[j] === target){\n output.push(i);\n output.push(j);\n return output;\n }\n }\n }\n}", "function threeNumberSum(array, targetSum) {\n array.sort((a, b) => a - b);\n\n let result = [];\n let i = 0;\n let j = 1;\n let k = array.length - 1;\n\n while (i < array.length - 2) {\n const currentSum = array[i] + array[j] + array[k];\n\n if (currentSum === targetSum) {\n result.push([array[i], array[j], array[k]]);\n j += 1;\n k -= 1;\n }\n\n if (currentSum < targetSum) {\n j += 1;\n }\n\n if (currentSum > targetSum) {\n k -= 1;\n }\n\n if (j >= k) {\n i += 1;\n j = i + 1;\n k = array.length - 1;\n }\n }\n\n return result;\n}", "function judge(arr, target) {\n if (target === 0) { // this is very important!!!!!!\n return [];\n }\n\n if (target < 0) { // this is very important!!!!!!!!!!\n return false;\n }\n\n if (arr.length === 1) {\n if (arr[0] !== target) {\n return false;\n }\n return arr;\n }\n\n // Due to sum of elements of arr > target, there must be at least one element left.\n // The very deepest 'state' that the recursion can reach should be [elem1, elem2],\n // for the goal to be accomplished, either elem1 or elem2 should be equal to the updated target.\n // Otherwise, it fails.\n // However, in most of time, it never reach that deep, it will stop at updated target <= 0.\n\n // if (arr.length === 2) {\n // if (arr[0] === target) {\n // return [arr[0]];\n // }\n // if (arr[1] === target) {\n // return [arr[1]];\n // }\n // return false;\n // }\n\n for (var i = 0; i < arr.length; i++) {\n let newArr = arr.slice();\n newArr.splice(i);\n var t = judge(newArr, target - arr[i]);\n if (t) {\n return t.concat(arr[i]);\n }\n }\n\n return false;\n}", "function threeNumberSum(array, targetSum) {\n //O(n*log(n)) time\n array.sort((a, b) => a - b);\n\n const triplets = [];\n for (let i = 0; i < array.length - 2; i++) {\n let left = i + 1;\n let right = array.length - 1;\n while (left < right) {\n let curSum = array[i] + array[left] + array[right];\n if (curSum === targetSum) {\n triplets.push([array[i], array[left], array[right]]);\n left++;\n right--;\n } else if (curSum < targetSum) {\n left--;\n } else {\n right--;\n }\n }\n }\n\n return triplets;\n}", "function twoSum(arr, target) {\n for (let outerIdx = 0; outerIdx < arr.length; outerIdx += 1) {\n for (let innerIdx = outerIdx + 1; innerIdx < arr.length; innerIdx += 1) {\n if (arr[outerIdx] + arr[innerIdx] === target) return [outerIdx, innerIdx];\n }\n }\n \n return undefined;\n}", "function twoNumberSum(array, targetSum) {\n const numbers = {};\n for(const number of array){\n const potentialMatch = targetSum - number;\n if(potentialMatch in numbers){\n return [potentialMatch, number];\n } else {\n numbers[number] = true;\n }\n }\n\treturn [];\n}", "function twoNumberSum(array, targetSum) {\n //sort array small to big N(log)N operation will mutate the array\n array.sort(function (a, b) { return a - b; });\n var left = 0;\n var right = array.length - 1;\n //quicksort \n while (left < right) {\n if (array[left] + array[right] === targetSum) {\n return [array[left], array[right]];\n }\n if (array[left] + array[right] > targetSum) {\n right--;\n }\n if (array[left] + array[right] < targetSum) {\n left++;\n }\n }\n return [];\n}", "function twoNumberSum(array, targetSum) {\n array.sort((a, b) => a - b);\n let left = 0;\n let right = array.length - 1;\n\n while (left < right) {\n let currentSum = array[left] + array[right];\n if (currentSum === targetSum) return [array[left], array[right]];\n else if (currentSum < targetSum) {\n left += 1;\n } else if (currentSum > targetSum) {\n right -= 1;\n }\n }\n\n return [];\n}", "function twoNumberSum(array, targetSum) {\n // Write your code here.\n\tlet seenHash = {};\n\t\n\tfor(let i = 0; i < array.length; i++){\n\t\tlet value = array[i];\n\t\tlet target = targetSum - value;\n\t\t\n\t\tif(seenHash[target]){\n\t\t\treturn [target, value]\n\t\t} else {\n\t\t\tseenHash[value] = true;\n\t\t}\n\t}\n\treturn [];\n}", "function Xsum() {\n\tvar collection = [1, 2, 3, 4, 5, 6, 7, 8, 9, -2, -3, -5];\n\tvar solutions = [];\n\tvar searchTemp = [];\n\tvar target = 10;\n\tcollection.sort();\n\n\tfunction xSum(collections, index) {\n\t\tif (sum(searchTemp) === target) {\n\t\t\tsolutions.push(collection.filter((item, index) => {\n\t\t\t\treturn searchTemp[index] === 1;\n\t\t\t}));\n\t\t\treturn;\n\t\t}\n\t\tif (index > collections.length - 1) {\n\t\t\treturn;\n\t\t}\n\t\tfor (let i = 0; i < 2; i++) {\n\t\t\tsearchTemp[index] = i;\n\t\t\txSum(collections, index + 1);\n\t\t}\n\t}\n\n\tfunction sum(temp) {\n\t\tif (temp.length > 0) {\n\t\t\treturn collection.filter((item, index) => {\n\t\t\t\treturn temp[index] === 1;\n\t\t\t}).reduce((acc, val) => {\n\t\t\t\treturn acc + val;\n\t\t\t}, 0);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\txSum(collection, 0);\n\tconsole.log(solutions);\n}", "function bestSum(targerSum, numbers) {\n const table = new Array(targerSum + 1).fill(null);\n table[0] = [];\n\n for (let i = 0; i <= targerSum; i++) {\n if (table[i] !== null) {\n for (let num of numbers) {\n let combination = [...table[i], num];\n if (!table[i + num] || combination.length < table[i + num].length) {\n table[i + num] = combination; \n // console.log('comb', combination, table)\n }\n }\n }\n }\n return table[targerSum];\n}", "function twoNumberSum(array, targetSum) {\n // in v8 uses timsort, worst case is O(nlogn)\n // sort the values\n array.sort((a, b) => a - b);\n\n // take leftmost value\n let leftIndex = 0;\n // and rightmost value\n let rightIndex = array.length - 1;\n\n while (leftIndex < rightIndex) {\n // sum left and and right\n const runningSum = array[leftIndex] + array[rightIndex]\n // if matches the target\n if (runningSum === targetSum) {\n // bingo, no need to sort, it's already done\n return [array[leftIndex], array[rightIndex]]\n // if the running sum is less\n } else if (runningSum < targetSum) {\n // take next item from the left side\n leftIndex++;\n // so the running sum is more\n } else {\n // take next item from the right, so going this <-- way\n rightIndex--;\n }\n }\n // oops didn't find anything\n return []\n}", "function fourSum(nums, target) {\n const result = [];\n\n nums.sort((a, b) => a - b);\n\n const findThreeSum = (firstIndex) => {\n const firstNumber = nums[firstIndex];\n for (let i = firstIndex + 1; i < nums.length - 2; i++) {\n const secondNumber = nums[i];\n const prevSecondNumber = nums[i - 1];\n\n if (i - 1 !== firstIndex && prevSecondNumber === secondNumber) continue;\n if (target > 0 && firstNumber > target) continue;\n if (target < 0 && firstNumber > 0) continue;\n\n let leftPointer = i + 1;\n let rightPointer = nums.length - 1;\n\n while (leftPointer < rightPointer) {\n const thirdNumber = nums[leftPointer];\n const prevThirdNumber = nums[leftPointer - 1];\n\n if (leftPointer - 1 !== i && prevThirdNumber === thirdNumber) {\n leftPointer++;\n continue;\n }\n\n const fourthNumber = nums[rightPointer];\n const sum = firstNumber + secondNumber + thirdNumber + fourthNumber;\n\n if (sum < target) leftPointer++;\n else if (sum > target) rightPointer--;\n else {\n leftPointer++;\n rightPointer--;\n result.push([firstNumber, secondNumber, thirdNumber, fourthNumber]);\n }\n }\n }\n };\n\n for (let i = 0; i < nums.length - 3; i++) {\n const firstNumber = nums[i];\n const prevFirstNumber = nums[i - 1];\n\n if (prevFirstNumber != null && prevFirstNumber === firstNumber) continue;\n findThreeSum(i);\n }\n\n return result;\n}", "function twoSum(numsArr, target) {\n // more basic code\n\n // for (let i = 0; i < numsArr.length; i++) {\n\n // for (let j = 0; j < numsArr.length; j++) {\n // if(i != j){\n // if (numsArr[i] + numsArr[j] == target) {\n // return [i, j];\n // }\n // }\n // }\n // }\n\n // faster code\n var sumPartners = {};\n for(var i = 0; i < nums.length; i++) {\n sumPartners[target - nums[i]] = i;\n if (sumPartners[nums[i]] && sumPartners[nums[i]] !== i) {\n return [sumPartners[nums[i]], i];\n }\n }\n \n for(var j = 0; j < nums.length; j++) {\n if (sumPartners[nums[j]] && sumPartners[nums[j]] !== j) {\n return [j, sumPartners[nums[j]]];\n }\n }\n}", "function getSubsetEqualToValue(valueArray, target, index) {\n\tlet sum = +valueArray[index];\n\tif (sum >= target) return []; // at least 2 values must be summed\n\t\n\tconst subset = [sum];\n\tfor (let i = index + 1; i < valueArray.length; i++) {\n\t\tsum += +valueArray[i];\n\t\tsubset.push(+valueArray[i]);\n\t\tif (sum > target) return [];\n\t\tif (sum === target) return subset;\n\t}\n}", "function twoNumberSum(array, targetSum) {\n //essentially, setting up two \"pointers\", i and j\n //but for now i, and setting the - 1 because im going to start pointer j on the last integer\n\tfor (let i = 0; i < array.length - 1; i++) {\n //setting varialbe for wherever the pointer is at the given time\n const firstNum = array[i];\n //now for pointer j, which is always one ahead of pointer i\n\tfor (let j = i + 1; j < array.length; j++) {\n //setting varialbe for wherever the pointer is at the given time\n const secondNum = array[j];\n //if the firstnum and secondnum equal the target sum\n\tif (firstNum + secondNum === targetSum) {\n //return new array with the two numbers that equaled the target sum\n\t\treturn [firstNum, secondNum]\n\t\t\t}\n\t\t}\n }\n //return it!\n\treturn [];\n}", "function findSumPair(numberList, targetSum) {\n const newArray = [];\n for (let index = 0; index < numberList.length; index++) {\n if (numberList.includes(targetSum - numberList[index])) {\n newArray.push(\n numberList[index],\n numberList[numberList.indexOf(targetSum - numberList[index])]\n );\n break;\n }\n }\n return newArray.sort((a, b) => a - b);\n}", "function twoSum(arr=[1,2,3], target = 4){\n // loop through arr\n // second loop to iterate through arr again\n // get the first loop incremental index value and sum that to the second loop incremental index value\n for(let i = 0; i < arr.length-1; i++){\n for(let j = i+1; j < arr.length; j++){\n let sum = arr[i] + arr[j];\n if(sum == target){\n return [i,j]\n } \n }\n }\n}", "function hasTargetSumV2(arr,target){\n for(let first=0; first < arr.length; first++){\n let compliment = target - first;\n if (arr.indexOf(compliment) > -1){\n console.log('FOUND')\n}}}", "function threeNumberSum(array, targetSum){\n array.sort((a,b) => a-b);\n const triplets = [];\n for (let i = 0; i <array.length -2; i++){\n let left = i + 1;\n let right = array.length - 1;\n while (left < right) {\n const currentSum = array[i] + array[left] + array[right];\n if (currentSum === targetSum){\n triplets.push([array[i], array[left], array[right]]);\n left++;\n right--;\n } else if (currentSum < targetSum) {\n left++;\n } else if (currentSum > targetSum) {\n right --;\n }\n }\n\n }\n return triplets;\n}", "function threeNumberSum(array, targetSum){\n let result = [];\n array.sort((a,b)=> a - b);\n \n for (let i = 0; i < array.length-2; i++) {\n for (let j = i+1; j < array.length-1; j++) {\n for (let k = j+1; k < array.length; k++) {\n let first = array[i];\n let second = array[j];\n let third = array[k];\n let sum = first + second + third;\n if (sum === targetSum && i !== j && j !== k){\n result.push([first,second,third])\n }\n }\n }\n }\n return result;\n}", "function howSum(targetSum, numbers, memo = {}) {\n\tif (targetSum in memo) return memo[targetSum]\n\tif (targetSum === 0) return []\n\tif (targetSum < 0) return null\n\n\tfor (let num of numbers) {\n\t\tconst remainder = targetSum - num\n\t\tconst remainderResult = howSum(remainder, numbers, memo)\n\t\tif (remainderResult !== null) {\n\t\t\tmemo[targetSum] = [...remainderResult, num]\n\t\t\treturn memo[targetSum]\n\t\t}\n\t}\n\n\tmemo[targetSum] = null\n\treturn null\n}", "function twoNumSum(array, targetSum){\n const nums = {};\n \n for(const num of array){\n const potentialMatch = targetSum - num;\n if(potentialMatch in nums){\n return [potentialMatch, num];\n } else {\n nums[num] = true\n }\n }\n return []\n}", "function threeNumberSum(array, targetSum) {\n array.sort((a,b)=>a-b); //0 (nlog n)\n //3rd+2nd=targetSum-1st\n //b+c=t-a\n let answerArray=[]\n let possibleCombos=[]\n\n \n\n for(let i=0;i<array.length-2;i++){\n let firstValue=array[i],secondValue=i+1,thirdValue=array.length-1\n \n while(secondValue<thirdValue){\n possibleCombos.push([firstValue,array[secondValue],array[thirdValue]])\n if(targetSum===firstValue+array[secondValue]+array[thirdValue]){\n answerArray.push([firstValue,array[secondValue],array[thirdValue]])\n secondValue++\n thirdValue--\n } \n else if(firstValue+array[secondValue]+array[thirdValue]>targetSum){\n thirdValue--\n }else{\n secondValue++\n }\n }\n // possibleCombos.push('done',i)\n }\n console.log(possibleCombos)\n return answerArray;\n }", "function twoNumberSumIfArrayIsSorted(array, targetSum) {\n let i = 0, j = array.length - 1\n while (i < j) {\n const sum = array[i] + array[j]\n if (sum === targetSum) {\n return [i, j]\n }\n sum < targetSum ? i++ : j--\n }\n return []\n}", "function threeNumberSum(array, targetSum){\n let result = [];\n array.sort((a,b)=> a - b);\n\n for (let i = 0; i < array.length - 2; i++) {\n let current = array[i];\n let left = i + 1;\n let right = array.length - 1\n while (left < right){\n let lPointer = array[left];\n let rPointer = array[right];\n let currentSum = current + lPointer + rPointer;\n\n if (currentSum === targetSum){\n result.push([current,lPointer,rPointer]);\n right--;\n left++;\n } else if (currentSum > targetSum){\n right--;\n } else if (currentSum < targetSum){\n left++;\n }\n }\n }\n return result;\n}", "function findPairForSum(integers, target) {\n var pair;\n for (let i = 0; i < integers.length; i++) { // create one loop that counts through the nums\n for (let j = 0; j < integers.length; j++) { // create another \"inner\" loop that counts through the nums at the same time\n var num1 = integers[i]; // for each num we assign in the outer loop, we assign all the nums for the inner\n var num2 = integers[j];\n if (num1 !== num2 && num1 + num2 === target) { // check to see that they're not the same num, and that they add up to sum\n pair = [num1, num2]; // assign the sum to the pair array; note: this will only return the last pair\n }\n }\n }\n return pair;\n}", "function fourNumberSum(array, targetSum) {\n const allPairSums = {};\n const quadruplets = [];\n \n for(let i=1; i<array.length - 1; i++){\n for(let j=i+1; j<array.length; j++){\n const currentSum = array[i]+array[j];\n const difference = targetSum - currentSum;\n \n if(difference in allPairSums){\n for(const pair of allPairSums[difference]){\n quadruplets.push(pair.concat([array[i], array[j]]));\n }\n }\n }\n \n for(let k=0; k<i; k++){\n const currentSum = array[i]+array[k];\n if(!(currentSum in allPairSums)){\n allPairSums[currentSum] = [[array[k], array[i]]];\n } else {\n allPairSums[currentSum].push([array[k], array[i]]);\n }\n }\n }\n \n return quadruplets;\n }", "function lowestSumIndices(array, target) {\n let hash = {};\n\n let indexCounter = 0;\n array.forEach((number) => {\n let hashNumber = array[indexCounter];\n hash[hashNumber] = indexCounter;\n indexCounter ++;\n });\n\n let counter = 0;\n let answer;\n array.forEach((number) => {\n let difference = target - array[counter];\n if(hash.hasOwnProperty(difference) && hash[difference] !== counter) {\n answer = [counter, hash[difference]];\n sortedAnswer = answer.sort();\n }\n counter ++;\n });\n return sortedAnswer;\n}", "function findPair1(arr, target) {\n let result = [];\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] + arr[i+1] === target) {\n result.push(i, i+1)\n break;\n }\n }\n return result.join()\n}", "function twoNumberSum(array, targetSum) {\n const numbers = {};\n\n for(let i = 0; i < array.length; i++) {\n const val = targetSum - array[i];\n if(numbers[array[i]]) {\n return [array[i], numbers[array[i]]];\n } else {\n numbers[val] = array[i];\n }\n }\n return [];\n}", "function twoNumberSum(array, targetSum) {\n\tvar obj = {};\n\tvar result = [];\n\tfor (var i = 0; i < array.length; i++) {\n\t\tif (obj[array[i]]) {\n\t\t\tresult.push(array[i], obj[array[i]]);\n\t\t\tbreak;\n\t\t} else {\n\t\t\tobj[targetSum - array[i]] = array[i];\n\t\t}\n\t}\n\treturn result;\n}", "function okayTwoSum1(arr, targetSum) {\n if (arr.length <= 1) {\n return false;\n }\n\n let sorted = arr.sort();\n let pivot = Math.floor(arr.length / 2);\n let sum = sorted[pivot] + sorted[pivot + 1];\n if (sum < targetSum) {\n let remaining = sorted.slice(pivot + 1);\n return okayTwoSum1(remaining, targetSum);\n } else if (sum > targetSum) {\n let remaining = sorted.slice(0, pivot + 1);\n return okayTwoSum1(remaining, targetSum);\n } else {\n return true;\n }\n}", "function twoSum(numbers, target) {\r\n\tlet result = [];\r\n\tfor (let i = 0; i < numbers.length - 1; i++) {\r\n\t\tfor (let j = i + 1; j < numbers.length; j++) {\r\n\t\t\tif (numbers[i] + numbers[j] === target) {\r\n\t\t\t\tresult.push(i, j);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}", "function twoSum(nums, target) {\n for(let i = 0; i < nums.length; i++){\n for(let j = 0; j < nums.length; j++) {\n if (i === j) {\n continue\n }\n // add two integers and they will equal the target\n if (nums[i] + nums[j] === target) {\n return [i,j]\n } \n }\n }\n}", "function twoNumberSum(array, targetSum) {\n const numsHashTable = {};\n for (let num of array) {\n const possibleMatch = targetSum - num;\n if (possibleMatch in numsHashTable) {\n return [possibleMatch, num]\n } else {\n numsHashTable[num] = true;\n }\n }\n return [];\n }", "function targetSum3(arr, value) {\n const obj = {};\n\n for (let i in arr) {\n const first = arr[i];\n const other = value - arr[i];\n\n if (obj[other]) {\n return [first, other];\n }\n\n obj[first] = true;\n }\n\n return [];\n}", "function twoSum(nums, target) {\n var result = [];\n\n for (var i = 0; i < nums.length; i++) {\n for (var j = i + 1; j < nums.length; j++) {\n if (nums[i] + nums[j] === target) {\n result.push(i);\n result.push(j);\n }\n }\n }\n return result;\n}", "function sumArr(nums) {\n // algorithm here\n}", "function possibleSums(arr, max) {\n var sums = [];\n for (var i = 0; i < arr.length; i++) {\n var num1 = arr[i];\n for (var j = i; j < arr.length; j++) {\n if (num1 + arr[j] >= max) {\n continue;\n }\n sums.push(num1 + arr[j]);\n\n }\n }\n return sums;\n}", "function findPair(arr, targetSum) {\n\t// Create a dictionary using JavaScript object\n\tlet dictionary = {};\n\t// Use \"for\" loop to... \n\tfor (let index = 0; index < arr.length; index++) {\n\t\t// ...assign the given array element at index to be the dictionary key\n\t\tlet dictKey = arr[index];\n\t\t// Let new index equal dictionary at explicit index\n\t\tdictionary[dictKey] = index;\n\t}\n\tfor (let index = 0; index < arr.length; index++) {\n\t\t// Create variable \"diff\", equal to targetSum minus the array at current index\n\t\tlet diff = targetSum - arr[index];\n\t\t// If dictionary has key equal to value \"diff\" and dictionary at value is not index\n\t\tif (dictionary.hasOwnProperty(diff) && dictionary[diff] !== index) {\n\t\t\t// Create variable to hold indexes of the two values that equal target sum\n\t\t\tlet indexResult = [index, dictionary[diff]];\n\t\t\t// console.log(\"Indexes of correct values:\", indexResult);\n\t\t\tlet valueOne = arr[indexResult[0]];\n\t\t\tlet valueTwo = arr[indexResult[1]];\n\t\t\t// Multiply values that equal target sum together to get final result\n\t\t\tlet finalResult = valueOne * valueTwo;\n\t\t\t// console.log(`${valueOne} times ${valueTwo} equals ${finalResult}`);\n\t\t\treturn finalResult;\n\t\t}\n\t}\n}", "function ArrayAdditionI(arr) {\n \n // get largest number and remove it from array\n var sum = Math.max.apply(null, arr);\n arr.splice(arr.indexOf(sum), 1);\n \n // power set\n var sets = [[]];\n \n // generate the power set and for each new set\n // check if the temporary sum equals our sum above\n for (var i = 0; i < arr.length; i++) {\n for (var j = 0, len = sets.length; j < len; j++) {\n var temp = sets[j].concat(arr[i]);\n console.log(temp);\n sets.push(temp);\n var s = temp.reduce(function(p, c) { return p + c; });\n if (s === sum) { return \"true\"; }\n }\n }\n \n return \"false\";\n \n }", "function s(numbers, target) {\n let l = 0;\n let r = numbers.length - 1;\n while (l < r) {\n if (numbers[l] + numbers[r] === target) {\n return [l + 1, r + 1];\n } else if (numbers[l] + numbers[r] > target) {\n r--;\n } else {\n l++;\n }\n }\n\n // const map = {};\n // for (let i = 0; i < numbers.length; i++) {\n // const complement = target - numbers[i];\n // if (complement in map) return [i, map[complement]];\n // map[numbers[i]] = i;\n // }\n // return null;\n\n // for (let i = 0; i < numbers.length; i++) {\n // for (let j = i + 1; j < numbers.length; j++) {\n // if (numbers[i] + numbers[j] === target) return [i, j];\n // }\n // }\n}", "function threeSumClosest(nums, target) {\n let closestSum;\n let closestDifference;\n\n nums.sort((a, b) => a - b);\n\n for (let i = 0; i < nums.length - 2; i++) {\n const firstNumber = nums[i];\n const prevFirstNumber = nums[i - 1];\n\n if (prevFirstNumber != null && prevFirstNumber === firstNumber) continue;\n if (closestDifference != null) {\n if (target > 0 && firstNumber > target) continue;\n if (target < 0 && firstNumber > 0) continue;\n }\n if (firstNumber > 0 && firstNumber > target && closestDifference != null)\n break;\n\n let leftPointer = i + 1;\n let rightPointer = nums.length - 1;\n\n while (leftPointer < rightPointer) {\n const secondNumber = nums[leftPointer];\n const prevSecondNumber = nums[leftPointer - 1];\n\n if (leftPointer - 1 !== i && prevSecondNumber === secondNumber) {\n leftPointer++;\n continue;\n }\n\n const thirdNumber = nums[rightPointer];\n const sum = firstNumber + secondNumber + thirdNumber;\n\n if (sum === target) return sum;\n\n if (sum < target) leftPointer++;\n else rightPointer--;\n\n const difference = Math.abs(target - sum);\n if (difference < closestDifference || closestDifference == null) {\n closestDifference = difference;\n closestSum = sum;\n }\n }\n }\n\n return closestSum;\n}", "function twoSum(arr, targetNum) {\n // edge cases\n if (arr.length <= 1) return false;\n\n for (let i = 0; i < arr.length; i++) {\n for (let j = 1; j < arr.length; j++) {\n if (arr[i] + arr[j] === targetNum) {\n return true;\n }\n }\n }\n return false;\n}", "function three(nums, target) {\n // store count of how many times a triplet sum is less than target number\n // sort array\n // iterate through array stopping 2 numbers before end\n}", "function findConsqSums(arr, desiredSum) {\n const sums = [];\n \n for (let i = 0; i < arr.length; ++i) {\n const consecNums = [];\n let sum = 0;\n let j = i;\n \n while (sum <= desiredSum && j < arr.length - 1) {\n if (sum + arr[j] <= desiredSum) {\n sum += arr[j];\n consecNums.push(arr[j++]);\n \n if (sum === desiredSum) {\n // without slice, future additions to consecNums\n // will be added to the already pushed consecNums via reference\n sums.push(consecNums.slice());\n }\n } else {\n break;\n }\n }\n }\n return sums;\n }", "function solution(arr){\n\n}", "function canSum(target, nums, memo={}){\n if (target in memo) return memo[target]\n if (target === 0) return true\n if (target < 0) return false\n\n for (let num of nums){\n const remainder = target - num\n if (canSum(remainder, nums, memo)){\n memo[target] = true\n return true\n }\n }\n memo[target] = false\n return false\n}", "function minSubarrayLen(nums, target) {\n let startIndex = 0;\n let endIndex = 0;\n let sum = 0;\n let len = 0;\n\n for (let i = 0; i < nums.length; i++) {\n sum += nums[i];\n if (sum >= target) {\n endIndex = i;\n len = endIndex + 1;\n break;\n }\n }\n\n if (sum < target) {\n return 0;\n }\n\n while (endIndex < nums.length) {\n sum = sum - nums[startIndex];\n if (sum >= target) {\n startIndex++;\n len = Math.min(len, endIndex - startIndex + 1);\n } else {\n sum = sum + nums[startIndex] + nums[endIndex + 1];\n endIndex++;\n }\n }\n return len;\n}", "function tripletsOpt(arr, sum) {\n // sort the array in asc order\n arr = arr.sort((a, b) => a - b)\n let count = 0\n for (let i = 0; i < arr.length - 2; i++) {\n // set 2 corner pointers: \n // j starting from the idx next to i, k starting from the last idx\n let j = i + 1\n let k = arr.length - 1\n // Meet In the Middle concept:\n while (j < k) {\n if (arr[i] + arr[j] + arr[k] >= sum) {\n // if the current sum is largest than target sum,\n // move k to a smaller value\n k--\n } else {\n // otherwise, we found our target sum!\n // for current i and j, there are (k - j) third elements that meet our target\n count += (k - j)\n // increase j to find the next potential triplets\n j++\n }\n }\n }\n return count\n}", "function twoSum(nums, target) {\n const myArray = new Array(nums.length);\n for (let i = 0; i <= nums.length; i++) {\n let num = nums[i];\n if (myArray[num] !== undefined) {\n return [myArray[num], i];\n } else {\n myArray[target - num] = i;\n }\n }\n}", "function twoSumSorted(numArray, target) {\n\n let leftIndex = 0;\n let rightIndex = numArray.length - 1;\n\n while (numArray[leftIndex] + numArray[rightIndex] !== target) {\n\n while (numArray[leftIndex] + numArray[rightIndex] < target) {\n leftIndex++;\n }\n\n while (numArray[leftIndex] + numArray[rightIndex] > target) {\n rightIndex--;\n }\n\n }\n\n return [leftIndex + 1, rightIndex + 1];\n\n // let leftIndex = 0;\n // let rightIndex = numArray.length - 1;\n // let left, right;\n //\n // do {\n //\n // left = numArray[leftIndex];\n // right = numArray[rightIndex];\n //\n // while (left + right < target) {\n // leftIndex++;\n // }\n //\n // while (left + right > target) {\n // rightIndex--;\n // }\n // } while (left + right !== target)\n //\n //\n // return [leftIndex + 1, rightIndex + 1];\n\n\n // while (numArray[numArray.length - 1] + numArray[0] > target) {\n // numArray.pop();\n // }\n //\n // let index = -1;\n //\n // do {\n // let number = numArray.shift();\n // let n = 0;\n // index++;\n //\n // while (n < numArray.length) {\n // if (numArray[n] + number === target) {\n // return [index + 1, index + 2 + n];\n // }\n // n++;\n // }\n // } while (true)\n\n\n // let n = 0;\n //\n // while (true) {\n //\n // let i = n + 1;\n //\n // while (i < numArray.length && numArray[i] < target) {\n // if (numArray[n] + numArray[i] === target) {\n // return [n, i];\n // }\n // i++;\n // }\n // n++;\n // }\n}", "function twoSum(nums, target) {\n let arr = [];\n for(let i = 0; i < nums.length; i++){\n for(let j = i + 1; j < nums.length; j++){\n if(nums[i] + nums[j] === target){\n arr.push(i, j);\n }\n }\n }\n return arr;\n}", "function twoSum(nums, target) {\n // add each num to a map with its index\n // for each one determine if its counterpart exists\n // ifso return those two numbers\n\n const numMap = new Map();\n\n for (index in nums) {\n const value = nums[index];\n const inverseNumber = target - value;\n\n if (numMap.has(value)) {\n numMap.set(value, numMap.get(value).concat(index));\n } else {\n numMap.set(value, [index]);\n }\n\n if (numMap.has(inverseNumber)) {\n if (\n (inverseNumber == value && numMap.get(value).length >= 2) ||\n inverseNumber != value\n ) {\n return [numMap.get(inverseNumber)[0], index];\n }\n }\n }\n}", "function sumNumbers(sumArray) {\n\n}", "function findPairsWiithMatchingSum(array, sum) {\n let start = 0;\n let end = array.length - 1;\n while (start < end) {\n let currentSum = array[start] + array[end];\n // console.log(`currentSum = ${currentSum}, start = ${start}, end = ${end}`);\n if (currentSum === sum) {\n return true;\n } else if ( currentSum < sum ) {\n start++;\n } else {\n end--;\n }\n }\n return false;\n}", "function minCostTraversal(nums) {\n // minSum\n // base case\n // how to find min sum of array if you can only skip one or move one\n if (nums.length <= 1) return 0;\n let oneStepCost = nums[0] + minCostTraversal(nums.slice(1));\n let twoStepCost = nums[1] + minCostTraversal(nums.slice(2));\n return Math.min(oneStepCost, twoStepCost);\n}", "function combinations(candidates, target) {\n let result = [];\n backtrack(0, 0, []);\n return result;\n\n function backtrack(index, sum, buffer) {\n //? Use buffer to create unique candidate combinations\n if (sum > target) return;\n if (sum === target) result.push(buffer.slice());\n for (let i = index; i < candidates.length; i++) {\n buffer.push(candidates[i]);\n backtrack(i, sum + candidates[i], buffer);\n buffer.pop();\n }\n }\n}", "function findSum(arr,value){\n let map = {}\n for (var i=0; i < arr.length; i++) {\n let target = value - arr[i]\n if (map[target]) {\n return [target, arr[i]]\n }\n map[arr[i]] = true\n }\n return false\n}", "function sumArray(array) {\n var highestSum = array[0];\n\n function traverseSubsetsAtIndexN (startIndex) {\n var current = array[startIndex];\n\n //single element \n if (current > highestSum) {\n highestSum = current;\n }\n\n //continguous elements\n for (var i = startIndex+1; i < array.length; i++) {\n current = current + array[i];\n if (current > highestSum) {\n highestSum = current;\n }\n }\n }\n\n for (var i = 0; i < array.length; i++) {\n traverseSubsetsAtIndexN(i);\n }\n\n return highestSum;\n}" ]
[ "0.79291975", "0.77573454", "0.7635987", "0.75427556", "0.735771", "0.73258513", "0.72595406", "0.7211043", "0.7206935", "0.70983297", "0.7053367", "0.7040068", "0.7021375", "0.7000597", "0.69954574", "0.6960469", "0.6957229", "0.6952071", "0.68956226", "0.688082", "0.6863434", "0.68596643", "0.68392575", "0.6838815", "0.6834311", "0.68096596", "0.6796553", "0.6781413", "0.67776453", "0.67706686", "0.67360455", "0.67103314", "0.67050856", "0.6696486", "0.6669059", "0.66604155", "0.6650117", "0.66483146", "0.66467595", "0.6601278", "0.6599469", "0.65762615", "0.6566929", "0.65592515", "0.6548755", "0.6538657", "0.65281296", "0.65055305", "0.650052", "0.6491716", "0.64899594", "0.6482879", "0.64791465", "0.64784145", "0.6469481", "0.64635587", "0.6463506", "0.64565766", "0.64537317", "0.64138746", "0.6407445", "0.6406673", "0.6386949", "0.63858557", "0.6367414", "0.6357663", "0.6351995", "0.63407445", "0.6289229", "0.6287198", "0.62857103", "0.6281292", "0.6278384", "0.6264009", "0.6262887", "0.6253649", "0.6215649", "0.6207339", "0.619742", "0.6184064", "0.61814135", "0.6179539", "0.6167816", "0.61478204", "0.61273694", "0.6121612", "0.6119481", "0.611637", "0.6113527", "0.60980505", "0.60950744", "0.6092678", "0.60907453", "0.6060554", "0.60594875", "0.60155725", "0.6006652", "0.59773135", "0.5959143", "0.5950676" ]
0.7240638
7
listens to the event and fires the appropiate event subscription
function handleKeyEvent(event) { if (isEventModifier(event)) { return; } if (ignoreInputEvents && isInputEvent(event)) { return; } const eventName = getKeyEventName(event); const listeners = __subscriptions[eventName.toLowerCase()] || []; if (typeof __monitor === 'function') { const matched = listeners.length > 0; __monitor(eventName, matched, event); } if (listeners.length) { event.preventDefault(); } // flag to tell if execution should continue; let propagate = true; // for (let i = listeners.length - 1; i >= 0; i--) { if (listeners[i]) { propagate = listeners[i](event); } if (propagate === false) { break; } } // listeners.map(listener => listener()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _subscribeToEvent(event) {\n GOD.subscribe(event);\n }", "function subscribeForEvents() {\n const userResponseEvetnType = 'UserHIReceived';\n const subscriber = eventSubscriber();\n subscriber.subscribeEvent(userResponseEvetnType, userResponseEventReceived);\n }", "_subscribe (event, callback)\n {\n diva.Events.subscribe(event, callback, this.settings.ID);\n }", "subscribe(event, callback) {\n this.bus.addEventListener(event, callback);\n }", "function publishChange(e) {\n\t\t\t\tsubscriberCallbacks.forEach(function(thisCallback) {\n\t\t\t\t\tthisCallback(e);\n\t\t\t\t});\n\t\t\t}", "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n }", "subscribeToEvent(eventName, listener){\n this._eventEmmiter.on(eventName, listener);\n }", "function trigger(event, data) {\n console.log(event);\n if(subscribers[event] && subscribers[event].length) {\n for(var i = 0; i < subscribers[event].length ; i++) {\n subscribers[event][i](data);\n }\n }\n }", "subscribeTo(event, callback) {\n this.socket.on(event, callback);\n }", "function eventChecker() {\n if(isSubscribed)\n pubsubEvents();\n}", "function subscribe(subEventCallback){\n\n mySolace.subscribe(subEventCallback);\n \n }", "onEvent(event) {\r\n this.resolveInialized();\r\n this.passiveListeners.forEach(cb => cb(event));\r\n return super.onEvent(event);\r\n }", "subscribe(name, fn) {\n this.events.get(name).subscribe(fn);\n }", "function _subscribe() {\n\n _comapiSDK.on(\"conversationMessageEvent\", function (event) {\n console.log(\"got a conversationMessageEvent\", event);\n if (event.name === \"conversationMessage.sent\") {\n $rootScope.$broadcast(\"conversationMessage.sent\", event.payload);\n }\n });\n\n _comapiSDK.on(\"participantAdded\", function (event) {\n console.log(\"got a participantAdded\", event);\n $rootScope.$broadcast(\"participantAdded\", event);\n });\n\n _comapiSDK.on(\"participantRemoved\", function (event) {\n console.log(\"got a participantRemoved\", event);\n $rootScope.$broadcast(\"participantRemoved\", event);\n });\n\n _comapiSDK.on(\"conversationDeleted\", function (event) {\n console.log(\"got a conversationDeleted\", event);\n $rootScope.$broadcast(\"conversationDeleted\", event);\n });\n\n }", "function notifySubscribers() {\n var eventPayload = {\n routeObj: getCurrentRoute(), // { route:, data: }\n fragment: getURLFragment()\n };\n\n _subject.onNext(eventPayload);\n }", "subscribe(name, fn) {\r\n this.events.get(name).subscribe(fn);\r\n }", "subscribeEvents()\n {\n on('debug.log', event => {\n this.screen.log(event.text);\n });\n\n // Check for battle after moving\n on('move.finish', () => { \n if (this.checkStartFight())\n {\n // switch to Battle state\n this.battleState();\n }\n });\n\n // Handle postbattle event; go to world screen after postbattle screen\n on('battle.over.win', args => { this.postBattleState(args) });\n }", "subscribe(event, target) {\n if (!this.subscriptions[event]) {\n this.subscriptions[event] = []\n }\n this.subscriptions[event].push(target)\n }", "_onStreamEvent(message) {\n let eventTarget;\n if (this._publication && message.id === this._publication.id) {\n eventTarget = this._publication;\n } else if (\n this._subscribedStream && message.id === this._subscribedStream.id) {\n eventTarget = this._subscription;\n }\n if (!eventTarget) {\n return;\n }\n let trackKind;\n if (message.data.field === 'audio.status') {\n trackKind = TrackKind.AUDIO;\n } else if (message.data.field === 'video.status') {\n trackKind = TrackKind.VIDEO;\n } else {\n Logger.warning('Invalid data field for stream update info.');\n }\n if (message.data.value === 'active') {\n eventTarget.dispatchEvent(new MuteEvent('unmute', {kind: trackKind}));\n } else if (message.data.value === 'inactive') {\n eventTarget.dispatchEvent(new MuteEvent('mute', {kind: trackKind}));\n } else {\n Logger.warning('Invalid data value for stream update info.');\n }\n }", "listener(event) {\n\t\tevent.stopPropagation();\n\t\tlet values = [event].concat(this.events[event.type].values);\n\t\tthis.events[event.type].method.apply(this.model, values);\n\t}", "subscribeEvents() {\n\t\tthis.coordinatesAPI.on('mouseup', this.onMouseUp);\n\t}", "notifySubscribers() {\n subscribers.forEach(function(onChange) {\n onChange();\n });\n }", "function eventHandler(event)\n{\n if (event_listeners.length > 0)\n {\n for(var i=0;i<event_listeners.length;++i)\n {\n var obj = event_listeners[i].object;\n event_listeners[i].callback.call(obj,event);\n //event_listeners[i].callback(event);\n }\n }\n}", "connected() {\n event();\n }", "_subscribe(eventType, eventHandler) {\r\n if (Object.keys(this.handlersMap).length === 0) {\r\n this.eventTarget.addEventListener('message', this.boundEventHandler);\r\n }\r\n if (!this.handlersMap[eventType]) {\r\n this.handlersMap[eventType] = new Set();\r\n }\r\n this.handlersMap[eventType].add(eventHandler);\r\n }", "_subscribe(eventType, eventHandler) {\r\n if (Object.keys(this.handlersMap).length === 0) {\r\n this.eventTarget.addEventListener('message', this.boundEventHandler);\r\n }\r\n if (!this.handlersMap[eventType]) {\r\n this.handlersMap[eventType] = new Set();\r\n }\r\n this.handlersMap[eventType].add(eventHandler);\r\n }", "callEvent(event) {\n trackEvent('Elections', 'clicked ' + event.currentTarget.id)\n }", "subscribeToEvents() {\n if (this.loadingMethod === \"view\") { \n // Fallback to scroll event detection if browser doesn't support IntersectionObserver\n if (typeof(window.IntersectionObserver) === 'undefined') {\n // PubSub.subscribe(Events.messages.scroll, () => {\n // this.smartImageElem.dispatchEvent(Events.createCustomEvent(\"siLoad\"));\n // }); \n }\n \n PubSub.subscribe(Events.messages.load, () => {\n this.smartImageElem.dispatchEvent(Events.createCustomEvent(\"siLoad\"));\n });\n\n PubSub.subscribe(Events.messages.layoutChange, () => {\n this.smartImageElem.dispatchEvent(Events.createCustomEvent(\"siLoad\"));\n });\n }\n\n PubSub.subscribe(Events.messages.resize, () => {\n this.smartImageElem.dispatchEvent(Events.createCustomEvent(\"siReload\"));\n });\n\n PubSub.subscribe(Events.messages.breakChange, () => {\n this.smartImageElem.dispatchEvent(Events.createCustomEvent(\"siReload\"));\n });\n }", "subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on(io, \"open\", this.onopen.bind(this)),\n on(io, \"packet\", this.onpacket.bind(this)),\n on(io, \"error\", this.onerror.bind(this)),\n on(io, \"close\", this.onclose.bind(this)),\n ];\n }", "function on(event, callback) {\n if(!subscribers[event]) {\n subscribers[event] = [];\n }\n subscribers[event].push(callback);\n }", "handleSubscribe() {\n // Callback invoked whenever a new event message is received\n const messageCallback = (response) => {\n console.log('Segment Membership PE fired: ', JSON.stringify(response));\n // Response contains the payload of the new message received\n this.notifier = JSON.stringify(response);\n this.refresh = true;\n // refresh LWC\n if(response.data.payload.Category__c == 'Segmentation') {\n this.getData();\n }\n \n\n\n };\n\n // Invoke subscribe method of empApi. Pass reference to messageCallback\n subscribe(this.channelName, -1, messageCallback).then(response => {\n // Response contains the subscription information on subscribe call\n console.log('Subscription request sent to: ', JSON.stringify(response.channel));\n this.subscription = response;\n this.toggleSubscribeButton(true);\n });\n }", "function FsEventsHandler() {}", "function onevent(args) {\n console.log('connected')\n console.log(\"Event:\", args[0]);\n }", "function onSubsChanged (event)\n {\n console.log(\"Push Subscription Change\");\n\n event.waitUntil(\n self.registration.pushManager.getSubscription()\n .then(function(subscription)\n {\n sw.storage.get('uid').then(function(clientId)\n {\n sw.storage.get('sid').then(function(subsId)\n {\n return fetch(sw.apiBaseUrl+'subscription/change', {\n method: 'post',\n headers: {\n 'Content-type': 'application/json'\n },\n body: JSON.stringify({\n subsId : subsId,\n clientId : clientId,\n subs : subscription,\n event : event\n })\n });\n })\n .catch(function(e){error(e);});\n })\n .catch(function(e){error(e);});\n })\n .catch(function(e){error(e);})\n );\n }", "listen() {\n [\"change\"].forEach(name => {\n this.el_.addEventListener(name, this.handler_, false)\n })\n }", "track({eventType, args}) {\n this.handleEvent(eventType, args);\n }", "function updateEvent(event) {\n\t\tupdateEvents([ event ]);\n\t}", "function updateEvent(event) {\n\t\tupdateEvents([ event ]);\n\t}", "function updateEvent(event) {\n\t\tupdateEvents([ event ]);\n\t}", "subscribe(event,callback){\n let self=this;\n\n if(!self.events.hasOwnProperty(event)){\n self.events[event] = [];\n }\n\n return self.events[event].push(callback);\n\n }", "_eventHandler(message) {\n // push to web client\n this._io.emit('service:event:' + message.meta.event, message.payload)\n this._io.emit('_bson:service:event:' + message.meta.event,\n this._gateway._connector.encoder.pack(message.payload))\n }", "function Subscribe(event, context) {\n base.Handler.call(this, event, context);\n}", "subscribe() {}", "subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on_1.on(io, \"open\", this.onopen.bind(this)),\n on_1.on(io, \"packet\", this.onpacket.bind(this)),\n on_1.on(io, \"error\", this.onerror.bind(this)),\n on_1.on(io, \"close\", this.onclose.bind(this)),\n ];\n }", "function subscribe(delegation, handler) {\n\t\t\tif (typeof delegation === 'function') {\n\t\t\t\tdelegation.on('update', handler)();\n\t\t\t}\n\t\t}", "function listen(event){\n return obj.elem.addEventListener(event, function(e){return obj[event](e)});\n }", "addEventListener(event, callback) {\n const RNAliyunEmitter = Platform.OS === 'ios' ? new NativeEventEmitter(RNAliyunOSS) : DeviceEventEmitter;\n switch (event) {\n case 'uploadProgress':\n subscription = RNAliyunEmitter.addListener(\n 'uploadProgress',\n e => callback(e)\n );\n break;\n case 'downloadProgress':\n subscription = RNAliyunEmitter.addListener(\n 'downloadProgress',\n e => callback(e)\n );\n break;\n default:\n break;\n }\n }", "async listenToEvents() {\n const chainListInstance = await App.contracts.ChainList.deployed()\n if(App.logSellArticleEvent == null) {\n App.logSellArticleEvent = chainListInstance\n .LogSellArticle({ fromBlock: \"0\" })\n .on(\"data\", event => {\n $('#' + event.id).remove();\n $(\"#events\").append(\n '<li class=\"list-group-item\" id=\"' + event.id +'\">' + event.returnValues._name + \" is for sale\" + \"</li>\"\n );\n App.reloadArticles();\n })\n .on(\"error\", function(error) {\n console.error(error);\n });\n }\n \n if (App.logBuyArticleEvent == null) {\n //listen to LogBuyArticle\n App.logBuyArticleEvent = chainListInstance\n .LogBuyArticle({ fromBlock: '0' })\n .on(\"data\", function(event) {\n $('#' + event.id).remove();\n $(\"#events\").append(\n '<li class=\"list-group-item\" id=' + event.id + '>' + event.returnValues._buyer + ' bought ' + event.returnValues._name + '</li>'\n );\n\n App.reloadArticles();\n })\n .on(\"error\", function(error) {\n console.error(error);\n });\n }\n\n // switch visibility of buttons\n $('.btn-subscribe').hide();\n $('.btn-unsubscribe').show();\n $('.btn-show-events').show();\n }", "subEvents() {\n if (this.subs) return;\n const io = this.io;\n this.subs = [on_1.on(io, \"open\", this.onopen.bind(this)), on_1.on(io, \"packet\", this.onpacket.bind(this)), on_1.on(io, \"error\", this.onerror.bind(this)), on_1.on(io, \"close\", this.onclose.bind(this))];\n }", "emitEvent(event) {\n this.eventBus.emit(event);\n }", "onMessage(event) {\n try {\n const data = JSON.parse(event.data);\n // data.event is used to lookup which registered listener to call\n this.ee.emit(data.event, data);\n } catch (error) {\n this.ee.emit('error', error);\n }\n }", "subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on_1.on(io, \"open\", this.onopen.bind(this)),\n on_1.on(io, \"packet\", this.onpacket.bind(this)),\n on_1.on(io, \"error\", this.onerror.bind(this)),\n on_1.on(io, \"close\", this.onclose.bind(this)),\n ];\n }", "triggerEvent(event) {\n\t\treturn _makeRequest('/events', {method: 'POST', body: {event}})\n\t\t\t.then(responseData => {\n\t\t\t\tif(responseData.success){\n\t\t\t\t\tconsole.log('Event Sent', event);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error);\n\t\t\t});\n\t}", "listenRequests() {\n this.request(event.detail.request);\n }", "triggerEvent(e){\n\t\tthis.emit(e.type, e);\n\t}", "listenRequests() {\n this.request(event.detail.request);\n }", "fire(event) {\n var _a, _b, _c;\n if (this._listeners) {\n // put all [listener,event]-pairs into delivery queue\n // then emit all event. an inner/nested event might be\n // the driver of this\n if (!this._deliveryQueue) {\n this._deliveryQueue = new PrivateEventDeliveryQueue((_a = this._options) === null || _a === void 0 ? void 0 : _a.onListenerError);\n }\n for (const listener of this._listeners) {\n this._deliveryQueue.push(this, listener, event);\n }\n // start/stop performance insight collection\n (_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.start(this._deliveryQueue.size);\n this._deliveryQueue.deliver();\n (_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.stop();\n }\n }", "handleSubscribe() {\n // Callback invoked whenever a new event message is received\n const messageCallback = (response) => {\n console.log(\"New Component Update message received: \", JSON.stringify(response.data.payload));\n this.doDemoComponentRefresh();\n }\n\n subscribe(this.channelName, -1, messageCallback).then((response) => {\n // Response contains the subscription information on subscribe call\n console.log(`Subscription request sent to: ${JSON.stringify(response.channel)}`);\n console.log(`Subscription request Response: ${JSON.stringify(response)}`);\n this.subscription = response;\n this.isSubscriptionRequested = false;\n this.isSubscribed = true;\n });\n }", "onEventSelect(e) {\n\t\t// tell our parent that something changed.\n\t\tthis.props.onEventChange(e.target.value);\n\t}", "run () {\n this._client.on('messageCreate', this.onMessageCreateEvent.bind(this))\n this._client.on('messageReactionAdd', this.onMessageReactionEvent.bind(this))\n this._client.on('messageReactionRemove', this.onMessageReactionEvent.bind(this))\n }", "trigger(event, data) {\n var _a, _b;\n const callbacks = [...((_a = this.listeners[event]) !== null && _a !== void 0 ? _a : []), ...((_b = this.listeners[\"*\"]) !== null && _b !== void 0 ? _b : [])];\n callbacks.forEach((listener) => {\n listener.call(null, event, data);\n });\n }", "trigger(event, data) {\n var _a, _b;\n const callbacks = [...((_a = this.listeners[event]) !== null && _a !== void 0 ? _a : []), ...((_b = this.listeners[\"*\"]) !== null && _b !== void 0 ? _b : [])];\n callbacks.forEach((listener) => {\n listener.call(null, event, data);\n });\n }", "setupDataListener(){\n PubSub.subscribe('Items:item-data-loaded',(evt)=>{this.initiliaze(evt.detail)});\n }", "function onevent(args) {\n console.log(\"Event:\", args[0]);\n }", "subscribe () {}", "subscribeToPlatformEvent() {\n // Callback invoked whenever a new event message is received\n const messageCallback = (response) => {\n console.log('LTV message callback ', JSON.stringify(response));\n console.log(new Date(), '------- LTV payload start------');\n console.log(response.data.payload.Category__c);\n this.refresh = true;\n if(response.data.payload.Category__c == 'LTV') {\n console.log(new Date(), '------- before LTV refresh start------' + this.refresh);\n this.getLTVData(this.unifiedId);\n console.log(new Date(), '------- after LTV refresh start------' + this.refresh);\n }\n \n \n console.log(new Date(), '------- LTV payload end ------');\n // Response contains the payload of the new message received\n\n };\n\n // Invoke subscribe method of empApi. Pass reference to messageCallback\n subscribe(this.channelName, -1, messageCallback).then(response => {\n // Response contains the subscription information on subscribe call\n console.log('LTV Subscription request sent to: ', JSON.stringify(response.channel));\n this.subscription = response;\n });\n }", "trigger (eventName) {\n if (this.events[eventName]) {\n for (let cb of this.events[eventName]) {\n cb();\n }\n }\n }", "subscribe(eventName, handler) {\n if (!this.ready) {\n return this.queue.push({op: 'subscribe', eventName, handler });\n }\n this.socket.on(eventName, handler);\n }", "function emitEvent(eventName, args) {\r\n if (scope.eventhandler) {\r\n $(scope.eventhandler).trigger(eventName, args);\r\n }\r\n }", "function publishListener () {\n\n\tif ( editorData.isCurrentPostPublished() ) {\n\t\tunSubscribe();\n\n\t\ttriggerUpdateEvent( {\n\t\t\t'icon': getFeaturedImageURL(),\n\t\t\t'link': editorData.getPermalink(),\n\t\t\t'edit_link': `post.php?post=${editorData.getCurrentPostId()}&action=edit&pods_modal=1`,\n\t\t\t'selected': true // Automatically select add new records\n\t\t} );\n\t}\n}", "on(event, callback) {\n const id = this._seq();\n this._subscribers.push({id, event, callback});\n return {\n unsubscribe: this._unsubscribe.bind(this)\n };\n }", "function registerEvents() {\n}", "ConnectEvents() {\n\n }", "listen() {\n this.media_.addListener(this.handler_)\n this.handler_(this.media_)\n }", "function subscribe(p){\n // Add events\n p.interactive = true;\n p.buttonMode = true;\n p\n // events for drag start\n .on('mousedown', onDragStart)\n .on('touchstart', onDragStart)\n // events for drag end\n .on('mouseup', onDragEnd)\n .on('mouseupoutside', onDragEnd)\n .on('touchend', onDragEnd)\n .on('touchendoutside', onDragEnd)\n // events for drag move\n .on('mousemove', onDragMove)\n .on('touchmove', onDragMove);\n}", "function emitEvent(eventName, args) {\r\n\r\n if (scope.eventhandler) {\r\n $(scope.eventhandler).trigger(eventName, args);\r\n }\r\n }", "function on (event, cb) {\n emitter.on(event, cb)\n }", "function on (event, cb) {\n emitter.on(event, cb)\n }", "function on (event, cb) {\n emitter.on(event, cb)\n }", "function bindPusherEvents() {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.channel);\n\n channel.bind('subtaskWasModified', subtaskWasModified);\n channel.bind('subtaskWasDeleted', subtaskWasDeleted);\n channel.bind('subtaskWasCompleted', subtaskWasCompleted);\n channel.bind('subtaskWasIncomplete', subtaskWasIncomplete);\n }", "function onevent(args) {\n console.log(\"Event:\", args[0]);\n }", "onListening() {\n this.emit('ready');\n }", "onListening() {\n this.emit('ready');\n }", "handleEvents() {\n }", "on(sEventName, f) {\n\t\tthis.getEventHandlers(sEventName).push(f);\n\t}", "on(eventName, eventHandler) {\n return this._chosenConsumer.on(eventName, eventHandler);\n }", "onEvent() {\n \n }", "subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on_js_1.on(io, \"open\", this.onopen.bind(this)),\n on_js_1.on(io, \"packet\", this.onpacket.bind(this)),\n on_js_1.on(io, \"error\", this.onerror.bind(this)),\n on_js_1.on(io, \"close\", this.onclose.bind(this)),\n ];\n }", "onClickAlertSubscribe() {\n // TODO: Set user as watcher for this alert when API ready\n }", "on (channel, cb) {\n this.subClient.subscribe(channel)\n super.on(channel, cb)\n }", "publishEvent()\n {\n this.SelectTextDisplayLogic();\n\n // Creates the event with selected items.\n const selectedEvent = new CustomEvent('selected', { detail: this.selectedList });\n // Dispatches the event.\n this.dispatchEvent(selectedEvent);\n }", "function onEvent(type, data) {\n eventsBuffer.push({type: type, data: data});\n }", "listen() {\n const subscription = this.client.subscribe(\n this.subject,\n this.queueGroupName,\n this.subscriptionOptions()\n );\n\n subscription.on('message', (msg) => {\n console.log(\n 'Message Received: ' + this.subject + '/' + this.queueGroupName\n );\n\n const parsedData = this.parseMessage(msg);\n this.onMessage(parsedData, msg);\n });\n }", "constructor() {\n super();\n\n this._Add_event(\"offer\");\n this._Add_event(\"data_in\");\n this._Add_event(\"file_end\");\n }", "function onWebEventReceived(event) {\r\n\r\n // Converts the event to a JavaScript Object\r\n if (typeof event === \"string\") {\r\n event = JSON.parse(event);\r\n }\r\n\r\n // Make sure it's for us\r\n if (event.type == \"scripter.write\")\r\n onWriteEvent(event)\r\n\r\n }", "function watchEvents() {\n const events = contractInstance.allEvents();\n events.watch((error, result) => {\n if (!error) {\n const id = result.args.id ? parseInt(result.args.id) : null;\n switch (result.event) {\n case 'NewChirp':\n loadChirp(id);\n break;\n case 'Vote':\n loadChirp(id);\n break;\n default:\n null;\n }\n console.log(`Incoming Event: ${result.event}`);\n console.log(`Arguments:${JSON.stringify(result.args)}`);\n } else {\n console.log(error);\n }\n });\n}", "addEventListener(event, callback) {\n this.eventProxy.addEventListener(event, callback);\n }", "on(event, callback) {\n if (!this._realtime.isConnected()) {\n this._realtime.connect();\n }\n return this._subscription.on(event, callback);\n }", "on(eventName, event) {\n if (typeof event !== 'function') throw new Error(`${eventName} is not a function`);\n this._events[eventName] = event;\n }", "function eventBusHook() {\n EventBus.$on('refreshCart', () => {\n checkAndUpdate();\n });\n}", "_onSubscription(resp) {\n let watcherInfo = this._getWatcherInfo(resp.subscription);\n\n if (watcherInfo) {\n // we're assuming the watchmanWatcher does not throw during\n // handling of the change event.\n watcherInfo.watchmanWatcher.handleChangeEvent(resp);\n } else {\n // Note it in the log, but otherwise ignore it\n console.error(\n \"WatchmanClient error - received 'subscription' event \" +\n \"for non-existent subscription '\" +\n resp.subscription +\n \"'\"\n );\n }\n }" ]
[ "0.7278217", "0.69331", "0.66832113", "0.6681481", "0.66425866", "0.66145456", "0.66138107", "0.6345793", "0.624889", "0.62461823", "0.62335074", "0.6099182", "0.6099045", "0.60898596", "0.60787123", "0.6061408", "0.605613", "0.59908956", "0.5989496", "0.596213", "0.59345376", "0.5923257", "0.5917195", "0.59115607", "0.5906688", "0.5906688", "0.5901985", "0.5897208", "0.58963", "0.58798695", "0.5867889", "0.58643776", "0.5857173", "0.58569384", "0.5850747", "0.5845255", "0.583494", "0.583494", "0.583494", "0.58253247", "0.5824968", "0.5823918", "0.5819366", "0.5817455", "0.581611", "0.57891524", "0.57855874", "0.5782688", "0.5779526", "0.57782096", "0.5764569", "0.5760453", "0.5758786", "0.5755517", "0.5745065", "0.57441294", "0.5743614", "0.5732969", "0.57247114", "0.5716195", "0.5711389", "0.5711389", "0.5700399", "0.56955165", "0.5694824", "0.5689056", "0.5679934", "0.5674805", "0.56713074", "0.5671075", "0.56627935", "0.565939", "0.5658116", "0.5652279", "0.5648851", "0.5647426", "0.5639787", "0.5639787", "0.5639787", "0.56362236", "0.5635006", "0.56300044", "0.56300044", "0.56267226", "0.5619499", "0.5617913", "0.5610329", "0.56091195", "0.5606968", "0.56020623", "0.56014705", "0.5598697", "0.5590603", "0.5589437", "0.5586349", "0.55831206", "0.55788773", "0.5575569", "0.5568969", "0.5563754", "0.5556514" ]
0.0
-1
creates a subscription and returns the unsubscribe function;
function subscribe(name, callback) { // Subscripton names are lowercased so both 'Shift+Space' and 'shift+space' works. name = name.toLowerCase(); // remove spaces so both 'Shift + Space' and 'shift+space' works. name.replace(/\s/, ''); if (typeof __subscriptions[name] === 'undefined') { __subscriptions[name] = []; } __subscriptions[name].push(callback); return { unsubscribe: () => { const index = __subscriptions[name].indexOf(callback); __subscriptions[name].splice(index, 1); }, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unsub(name, fn) {\n this.unsubscribe(name, fn);\n }", "unsub(fn) {\n this.unsubscribe(fn);\n }", "unsub(fn) {\n this.unsubscribe(fn);\n }", "unsubscribe() {\n this.unsubscribeFunc()\n }", "unsub(name, fn) {\r\n this.unsubscribe(name, fn);\r\n }", "unsubscribe() {\n Object.keys(this.subscriptions).forEach(key => {\n if (this.subscriptions[key].subscription.dispose) {\n this.subscriptions[key].subscription.dispose();\n }\n });\n }", "unsub(fn) {\r\n this.unsubscribe(fn);\r\n }", "unsub(fn) {\r\n this.unsubscribe(fn);\r\n }", "unsubscribe(fn) {\n\t\tthis.subscribers = this.subscribers.filter( it => it !== fn );\n\t}", "unsubscribe() {\n this.subscriptions.forEach((unsub) => unsub());\n }", "removeSubscription(subscriptionId) {}", "subscribe(fn) {\n if (fn) {\n this._subscriptions.push(this.createSubscription(fn, false));\n }\n\n return () => {\n this.unsubscribe(fn);\n };\n }", "unsubscribe() {\n this.subscriptions.forEach((unsub) => unsub());\n this.subscriptions = [];\n }", "async unsubscribe() {\n var subscription = await this.getSubscription();\n if (subscription) {\n subscription.unsubscribe().then(subscription => {\n console.log('Unsubscribed', subscription.endpoint);\n return subscription;\n });\n return await fetch(this.params.UNREGISTRATION_URL, {\n method: 'post',\n headers: {'Content-type': 'application/json', Accept: 'application/json'},\n body: JSON.stringify({subscription,}),\n }).then(response => response.json()).then(response => {\n console.log('Unsubscribed with Notifications server', response);\n return response;\n });\n }\n }", "unsub(name) {\n if (this._subscriptions && this._subscriptions[name]) {\n this._subscriptions[name] instanceof rxjs__WEBPACK_IMPORTED_MODULE_1__[\"Subscription\"]\n ? this._subscriptions[name].unsubscribe()\n : this._subscriptions[name]();\n this._subscriptions[name] = null;\n }\n }", "unsubscribe() {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const doUnsubscribe = (sub) => {\n if (sub === null) {\n throw new Error('Not subscribed to push notifications.');\n }\n return sub.unsubscribe().then(success => {\n if (!success) {\n throw new Error('Unsubscribe failed!');\n }\n this.subscriptionChanges.next(null);\n });\n };\n return this.subscription.pipe(take(1), switchMap(doUnsubscribe)).toPromise();\n }", "unsubscribe(fn) {\n this._unsubscribe(fn);\n }", "unsubscribe(fn) {\n if (!fn) return;\n\n for (let i = 0; i < this._subscriptions.length; i++) {\n if (this._subscriptions[i].handler == fn) {\n this._subscriptions.splice(i, 1);\n\n break;\n }\n }\n }", "unsubscribe( callback ) {\n\t if( ! this.subscribers.has(callback))\n\t return console.error(\"Unsubscribe callback does not exists\", callback);\n\t this.subscribers.delete( callback );\n\t }", "handleUnsubscribe() {\n\n // Invoke unsubscribe method of empApi\n unsubscribe(this.subscription, response => {\n console.log('unsubscribe() response: ', JSON.stringify(response));\n // Response is true for successful unsubscribe\n });\n }", "unsubscribe(fn) {\r\n if (!fn)\r\n return;\r\n for (let i = 0; i < this._subscriptions.length; i++) {\r\n if (this._subscriptions[i].handler == fn) {\r\n this._subscriptions.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }", "subscribe(fn) {\r\n if (fn) {\r\n this._subscriptions.push(this.createSubscription(fn, false));\r\n }\r\n return () => {\r\n this.unsubscribe(fn);\r\n };\r\n }", "sub(fn) {\n return this.subscribe(fn);\n }", "sub(fn) {\n return this.subscribe(fn);\n }", "unsubscribe(fn) {\n const thisSubscribe = this;\n\n thisSubscribe.observer.filter((subscriber) => subscriber !== fn);\n }", "unsubscribe({ commit, getters }) {\n let subscriptions = getters.getSubscriptions\n if (subscriptions.length) {\n subscriptions[1].map((subscription) => {\n subscription.unsubscribe()\n })\n\n subscriptions[0].close()\n\n commit('mutate', {key: 'subscriptions', value: []})\n }\n }", "unsubscribe() {\n mainLog.info('Unsubscribing from Lightning gRPC streams')\n this.mainWindow = null\n Object.keys(this.subscriptions).forEach(subscription => {\n if (this.subscriptions[subscription]) {\n this.subscriptions[subscription].cancel()\n this.subscriptions[subscription] = null\n }\n })\n }", "unsubscribe() {\n if (this.subscriptions.length === 0) return;\n while (this.subscriptions.length > 0)\n this.subscriptions.pop().dispose();\n }", "one(fn) {\n if (fn) {\n this._subscriptions.push(this.createSubscription(fn, true));\n }\n\n return () => {\n this.unsubscribe(fn);\n };\n }", "sub(fn) {\r\n return this.subscribe(fn);\r\n }", "sub(fn) {\r\n return this.subscribe(fn);\r\n }", "unsubscribe(fn) {\r\n this._unsubscribe(fn);\r\n }", "one(fn) {\r\n if (fn) {\r\n this._subscriptions.push(this.createSubscription(fn, true));\r\n }\r\n return () => {\r\n this.unsubscribe(fn);\r\n };\r\n }", "unsubscribe(name, fn) {\n this.events.get(name).unsubscribe(fn);\n }", "unsubscribe(sub, handler) {\n if (sub.guid == undefined) {\n throw (`Could not unsubscribe ${sub}`);\n }\n delete this.subscribers[this.GetKey(sub, handler)];\n }", "unsubscribe(subscriber) {\n let idx;\n while ((idx = this.subscribers.indexOf(subscriber)) >= 0) {\n this.subscribers.splice(idx, 1);\n }\n if (this.subscribers.length === 0) {\n this.doc.removeListener('op', this.onOp);\n this.doc.removeListener('create', this.onCreate);\n }\n }", "function unsubscribePushNotif() {\n return getPushSubscription().then(registration => registration.unsubscribe());\n}", "function disconnect() {\n return subscribe('disconnect');\n }", "function subscribe (listener) {\n\t\tif (typeof listener !== 'function') {\n\t\t\tthrow 'listener should be a function';\n\t\t}\n\n\t\t// append listener\n\t\tlisteners[length++] = listener;\n\n\t\t// return unsubscribe function\n\t\treturn function unsubscribe () {\n\t\t\t// for each listener\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\t// if currentListener === listener, remove\n\t\t\t\tif (listeners[i] === listener) {\n\t\t\t\t\tlisteners.splice(i, 1);\n\t\t\t\t\tlength--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "unsubscribe(f) {\n this.observers = this.observers.filter(subscriber => subscriber !== f);\n }", "unsubscribe(name, fn) {\r\n this.events.get(name).unsubscribe(fn);\r\n }", "dispose() {\n\t\twhile(this._subscriptions.length) {\n\t\t\tthis._subscriptions.shift().unsubscribe();\n\t\t}\n\t}", "unsubscribe(topic, callback) {\n const idx = this.subscribersByTopic[topic].indexOf(callback);\n\n if (idx !== -1) {\n this.subscribersByTopic[topic].splice(idx, 1);\n }\n }", "onClientUnsubscribed(callback) {\n this.unsubCallback = callback;\n }", "unsubscribe (callback) {\n\t\tthis.unsubscribed = true;\n\t\tthis.pubnubForClients[0].unsubscribe(this.channelName);\n\t\tcallback();\n\t}", "static unsubscribeFromStreams() {\n if (!streamsSubscription)\n throw new Error('There is currently no active streams real time data update subscriptions.');\n\n streamsSubscription();\n streamsSubscription = null;\n }", "unsubscribe (req)\n {\n this.channel.unsubscribe(req);\n }", "unsubscribe(event) {\n if (this.connection) { \n return this.connection.unsubscribe(event)\n }\n return Promise.reject({code: 'qi-call/no-connection', message: 'Connection object not found.'})\n }", "_removeSubscription(subscription) {\n const index = this._subscriptions.indexOf(subscription);\n this._subscriptions.splice(index, 1);\n }", "unsubscribe() {\n this.client.unsubscribe(this.subscriptionID)\n this.currencyCollection.unsubscribe(this.render)\n this.currencyCollection.unsubscribe(this.drawInitialSparkLine)\n this.currencyCollection.unsubscribeFromSparkLineEvent(this.drawSparkLine)\n }", "cleanup(sub) {\n if (sub.isOnce && sub.isExecuted) {\n let i = this._subscriptions.indexOf(sub);\n\n if (i > -1) {\n this._subscriptions.splice(i, 1);\n }\n }\n }", "unsubscribe(subscriber) {\n if (this.sub1 === subscriber) {\n this.sub1 = void 0;\n } else if (this.sub2 === subscriber) {\n this.sub2 = void 0;\n }\n }", "function createSubscribe(executor, onNoObservers) {\n\t var proxy = new ObserverProxy(executor, onNoObservers);\n\t return proxy.subscribe.bind(proxy);\n\t}", "unsubscribe() {\n this.bufferSubscriptions.dispose();\n this.bufferSubscriptions = new Atom.CompositeDisposable();\n }", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n }", "sub(name, fn) {\n this.subscribe(name, fn);\n }", "unsubscribe(subscriber) {\n if (this.sub1 === subscriber) {\n this.sub1 = void 0;\n }\n else if (this.sub2 === subscriber) {\n this.sub2 = void 0;\n }\n }", "unsubscribe() {\n const sub = this.sub\n , url = this.url;\n if (url && sub) {\n debug('sub.disconnect: %s', this.url)\n try {\n sub.disconnect(this.url);\n }\n catch(_e) {/* ignore */}\n sub.unsubscribe(this[secretBuf$]);\n clearTimeout(this._pulseTimeout);\n this._pulseTimeout = null;\n }\n }", "unsubscribe (callback) {\n\t\tthis.pubnubForClients[0].unsubscribe(this.channelName);\n\t\tcallback();\n\t}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\r\n var proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "unsubscribe(id) {\n if (this.subscribers.has(id)) {\n this.subscribers.delete(id);\n }\n }", "sub(name, fn) {\r\n this.subscribe(name, fn);\r\n }", "function Subscription(event_name, callback, emitter) {\n this.callback = callback;\n this.event_name = event_name;\n this.release = function() {\n emitter.release(this);\n }\n}", "function fixSubscriber(subscriber) {\n if (subscriber && typeof subscriber.dispose === 'function') { return subscriber; }\n\n return typeof subscriber === 'function' ?\n disposableCreate(subscriber) :\n disposableEmpty;\n }", "function unsubscribe (oHub, sEvent, fnHandler) {\n oHub.subscribers[sEvent] = (oHub.subscribers[sEvent] || [])\n .map(function (aSubscriberGroup) {\n return aSubscriberGroup.filter(function (oListener) {\n return oListener.fn !== fnHandler;\n });\n })\n .filter(function (aGroup) {\n return aGroup.length > 0;\n });\n }", "cleanup(sub) {\r\n if (sub.isOnce && sub.isExecuted) {\r\n let i = this._subscriptions.indexOf(sub);\r\n if (i > -1) {\r\n this._subscriptions.splice(i, 1);\r\n }\r\n }\r\n }", "function unsubscribe(name, id, callback) {\n if (typeof name !== s_string) {\n throw new TypeError('topic name must be a string.');\n }\n if (id === undefined || id === null) {\n if (typeof callback === s_function) {\n id = callback;\n }\n else {\n delete _topics[name];\n return;\n }\n }\n if (typeof id === s_function) {\n callback = id;\n id = null;\n }\n if (id === null) {\n if (_id === null) {\n if (_topics[name]) {\n var topics = _topics[name];\n for (id in topics) {\n delTopic(topics, id, callback);\n }\n }\n }\n else {\n _id.then(function(id) {\n unsubscribe(name, id, callback);\n });\n }\n }\n else if (Future.isPromise(id)) {\n id.then(function(id) {\n unsubscribe(name, id, callback);\n });\n }\n else {\n delTopic(_topics[name], id, callback);\n }\n }", "function createSubscribe(executor, onNoObservers) {\r\n const proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}", "function createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}" ]
[ "0.7071786", "0.70051444", "0.70051444", "0.6990121", "0.69038194", "0.687618", "0.68336684", "0.68336684", "0.6818329", "0.6814473", "0.6755408", "0.6738019", "0.673709", "0.6736756", "0.66867554", "0.6684773", "0.6658661", "0.66275686", "0.66227585", "0.65694386", "0.65565443", "0.653912", "0.65195626", "0.65195626", "0.651811", "0.6508726", "0.64976245", "0.64963216", "0.6424462", "0.6411039", "0.6411039", "0.64056146", "0.6387924", "0.635489", "0.6310699", "0.6310444", "0.6303546", "0.6254864", "0.6244927", "0.62448525", "0.6228835", "0.62026334", "0.61731887", "0.61667144", "0.6163223", "0.6160295", "0.6144699", "0.61435944", "0.6132848", "0.61254215", "0.6081939", "0.60788846", "0.6077535", "0.60612", "0.6057008", "0.6042551", "0.6007261", "0.59926367", "0.5990972", "0.59750974", "0.59750974", "0.59750974", "0.59750974", "0.59750974", "0.59750974", "0.59750974", "0.59750974", "0.59750974", "0.59750974", "0.59723055", "0.5972194", "0.59596634", "0.59579057", "0.5954879", "0.5953914", "0.59466213", "0.59398293", "0.59359246", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632", "0.5934632" ]
0.0
-1
alows to set a monitor function that will run on every event
function setMonitor(monitor = null) { if (monitor === true) { __monitor = defaultMonitor; } else { __monitor = monitor; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mainMonitor() {\n // queueDisk.addEvent() listen.... todo\n onNewDevEvent(() => {\n console.warn(\"newDevEvent\");\n\n // //step1 get new dev info and update view\n // sendGlobalUpdate();//global view update(from store)\n //\n // //setp check2 ntfs and update\n // if (action === NTFS_Mount) {\n // workerDisk.autoMount(function () {\n // sendGlobalUpdate();//global view update again\n // });\n // }\n })\n\n}", "function iniciarMonitor(){\n\n cluster.on('message', (worker, message, handle) => {\n if(cerebro){\n cerebro.agregarEvento(message)\n }\n // ...\n });\n\n cluster.on('exit', (worker, code, signal) => {\n //TODO: monitorear final de procesos para re-levantarlos\n });\n}", "function initialize() {\n monitor();\n }", "monitor() {\n this.init();\n }", "_pushMonitors () {\n this.monitorBlocks.runAllMonitored(this);\n }", "function AbrirMonitor()\n{\t \n //Monitor de impresiones\n if(ventana_monitor== null)\t\t\t\n ventana_monitor=\"VentanaMonitor\";\n}", "watch() {\n }", "function AppMonitor() {\n}", "requestCheck() {\n this[kMonitor].requestCheck();\n }", "requestCheck() {\n this[kMonitor].requestCheck();\n }", "function main() {\n console.log('Ready!\\n');\n _hcsr04.fn.startMonitoring();\n}", "function main() {\n register_listeners();\n}", "set () {\n ipcMain.on('notif-count', ::this.onNotifCount);\n ipcMain.on('close-window', ::this.onCloseWindow);\n ipcMain.on('open-url', ::this.onOpenUrl);\n }", "internalListeners() {\n\t\tscreen.addListener('display-added', (event, newDisplay) => {\n\t\t\tlogger.log('APPLICATION LIFECYCLE: Monitor added.');\n\t\t\tMainBus.sendEvent('systemEvent.monitor-info-changed');\n\t\t});\n\n\t\tscreen.addListener('display-removed', (event, oldDisplay) => {\n\t\t\tlogger.log('APPLICATION LIFECYCLE: Monitor removed.');\n\t\t\tMainBus.sendEvent('systemEvent.monitor-info-changed');\n\t\t});\n\n\t\tscreen.addListener('display-metrics-changed', (event, display, changeMetrics) => {\n\t\t\tlogger.log('APPLICATION LIFECYCLE: Monitor display metrics changed.', JSON.stringify(display));\n\t\t\tMainBus.sendEvent('systemEvent.monitor-info-changed');\n\t\t});\n\n\t\tpowerMonitor.on('lock-screen', () => {\n\t\t\tlogger.log('APPLICATION LIFECYCLE: System locked.');\n\t\t\tMainBus.sendEvent('systemEvent.session-changed');\n\t\t});\n\n\t\tpowerMonitor.on('unlock-screen', () => {\n\t\t\tlogger.log('APPLICATION LIFECYCLE: System unlocked.');\n\t\t\tMainBus.sendEvent('systemEvent.session-changed');\n\t\t});\n\n\t\tPermissionsManager.addRestrictedListener('restartSEA', this.startApp); // nothing sends this event\n\t}", "function analogueWatch(){\n \n\n \n}", "function monitor(){\n\t\t\twakeWatch.unbind(wakeEvents, wake).bind(wakeEvents, wake);\n\t\t\tvar myCookie = e2.getCookie('lastActiveWindow');\n\t\t\tif (e2.now() - lastActive > e2.sleepAfter * 60000 ||\n\t\t\t\t(!e2.isChatterlight && myCookie && myCookie != windowId)) zzz('sleep');\n\t\t}", "#notify() {\n if (this.#observers.length > 0) {\n this.#observers.forEach((observer) => {\n if (typeof observer === 'function') {\n observer();\n }\n });\n }\n }", "scheduleWatchMessages() {\n this.cronJob = schedule(checkFrequency, this.checkNewMessages.bind(this), {});\n }", "function startMonitorEvent(seqNum) {\n \"use strict;\"\n // to check the blank timeline\n if (seqNum == 0 && isTimeline()) {\n document.getElementById(\"getPhotoListAll\").style.display = \"none\";\n document.getElementById(\"getPhotoListBlank\").style.display = \"block\";\n }\n\n // param\n g_userAgent = window.navigator.userAgent.toLowerCase();\n\n // start XHR\n setTimeout(doXHR, 500);\n}", "function startNotificationWatcher() {\n notificationCheck(true);\n notificationWatcher = setInterval(notificationCheck, 5000);\n}", "onWin(callback) {\n\t\tthis.win_observers.push(callback);\n\t}", "addObserverFunc(func) {\n this.__notifyFunc.push(func);\n }", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function initWatchVal() {}", "function addWatchers() {\n\t\t\t\tif (addWatchers.hasRun) { return; }\n\t\t\t\taddWatchers.hasRun = true;\n\n\t\t\t\tKEYS.forEach(function(key) {\n\t\t\t\t\tenquire.register(CONFIG[key].query, {\n\t\t\t\t\t\tmatch: _.throttle(function() {\n\t\t\t\t\t\t\tpublishChange(new BreakpointChangeEvent(key, previousBP));\n\t\t\t\t\t\t\tpreviousBP = key;\n\t\t\t\t\t\t}, 20)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}", "function initWatchVal() {} // 16439", "init () {\n const me = this;\n\n if (!me.eventsInitialized) {\n me.events.forEach(event => process.addListener(event, me.exec));\n\n me.eventsInitialized = true;\n }\n }", "function registerEvents() {\n}", "static usingFunction( logEvent ) {\n\n\t\tvar monitor = new AbstractLoggingMonitor();\n\n\t\t// Override the abstract method, completing the implementation.\n\t\tmonitor.logEvent = logEvent;\n\n\t\treturn( monitor );\n\n\t}", "function startMon(){\n\tinit();\n}", "function main() {\n board.reset();\n board.bootSounds();\n //board.motorCheck();\n board.openDamper();\n monitorTemperature();\n \n events.on(\"start-alarm\", alarm);\n}", "function DocksMonitor() {\n IntervalMonitor.call(this, monitor);\n}", "function setupWatch(freq) {\n // global var here so it can be cleared on logout (or whenever).\n activeWatch = setInterval(watchLocation, freq);\n }", "startMonitor () {\n this.watchers.length = 0\n this.dirs.forEach((dir) => {\n let watcher\n try {\n watcher = fs.watch(path.resolve(dir.metadata.localPath), { recursive: true }, () => {\n this.dirty = true\n setTimeout(() => this.run(), 0) // start backup 3s later\n })\n } catch (e) {\n console.warn('watch file error', e)\n return\n }\n this.watchers.push(watcher)\n })\n }", "registerListeners() {}", "function initWatchVal(){}", "function initWatchVal(){}", "notify() {\n this.observers.forEach(observer => observer());\n }", "monitor(options) {\n options = options || {};\n if (this.s.state !== STATE_CONNECTED || this.s.monitoring) return;\n if (this.s.monitorId) clearTimeout(this.s.monitorId);\n this.s.monitorFunction(this, options);\n }", "function listening(){console.log(\"listening. . .\");}", "function processAlarms(){\n \n}", "function startPolling() {\n setInterval(checkForEvents, 2000);\n }", "heartbeat () {\n }", "function registerEvents(Remci) {\n for(var e in events) {\n let event = events[e];\n Remci.post(e, emitEvent(event));\n }\n}", "_startWatchingCradle () {\n this._cradlePin.watch((err, value) => {\n if (!err) {\n console.log('[IO] CRADLE ' + (value ? 'UP' : 'DOWN'))\n this.emit('cradle', value)\n } else {\n console.log('[IO] ERROR: ', err)\n }\n })\n }", "function i(e,t){return[\"on\",\"once\"].forEach(function(n){t[n]=function(){return e[n].apply(e,arguments),t}}),e}", "on (event, λ) {\n this.callbacks[event] = λ;\n }", "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n }", "constructor (onevent /* : Function */) {\n super()\n this.waiting = []\n this.awaiting = 0\n this.onevent = onevent\n }", "function onConnect() {\n emitHello();\n $log.log(\"monitor is connected\");\n }", "ConnectEvents() {\n\n }", "listener() {}", "start() {\n var watcher = this;\n fs.watchFile(watchDir, function() {\n watcher.watch();\n });\n }", "fireListeners() {\n this.listeners.forEach((listener) => listener());\n }", "eventTimer() {throw new Error('Must declare the function')}", "function start() {\n watch.start();\n }", "function windowWatcher(subject, topic) {\n if (topic == \"domwindowopened\")\n runOnLoad(subject);\n }" ]
[ "0.64917415", "0.6465147", "0.6455923", "0.6428134", "0.6371135", "0.61784786", "0.6018997", "0.6002404", "0.5908825", "0.5908825", "0.58978367", "0.58626884", "0.5849526", "0.58457273", "0.5709883", "0.5633148", "0.5628563", "0.5606831", "0.55822796", "0.5550446", "0.55491114", "0.5545642", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.55426073", "0.5538211", "0.5531136", "0.55285406", "0.55174655", "0.55146754", "0.5485526", "0.5480356", "0.5473024", "0.5470331", "0.54516965", "0.5443746", "0.53999436", "0.53999436", "0.53988606", "0.53928614", "0.53857416", "0.5357389", "0.53408104", "0.5331146", "0.532746", "0.5323543", "0.5323235", "0.53193784", "0.5319222", "0.5315674", "0.53103155", "0.5297749", "0.5297732", "0.52963495", "0.52851516", "0.5284412", "0.5282588", "0.52798766" ]
0.59446716
8
adds the event listener to the element
function startListening() { element.addEventListener(listenForEvent, handleKeyEvent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addEventListeners() {\n\n}", "add() {\n this.target.addEventListener(this.eventType, this.fn, false);\n }", "[addDivListener](event, listener) {\n this.htmlDiv.addEventListener(event, listener);\n }", "addEventListener (f) {\n this.eventListeners.push(f)\n }", "function evtListener() {\n debug(\"evtListener\");\n cards().forEach(function(node) {\n node.addEventListener('click', cardMagic);\n })\n }", "function addListener(selector,eventName,cb){\r\n document.querySelector(selector).addEventListener(eventName,cb)\r\n}", "function addEventListeners() {\r document.getElementById(\"clickTag\").addEventListener(\"click\", clickthrough);\r\tdocument.getElementById(\"clickTag\").addEventListener(\"mouseover\", mouseOver);\r\tdocument.getElementById(\"clickTag\").addEventListener(\"mouseout\", mouseOff);\r}", "function _add_event_listener(el, eventname, fn){\r\n if (el.addEventListener === undefined){\r\n el.attachEvent('on' + eventname, fn);\r\n }\r\n else {\r\n el.addEventListener(eventname, fn);\r\n }\r\n}", "function addEventListeners() {\n\t$(\"#maple-apple\").click(addMapleApple);\n\t$(\"#cinnamon-o\").click(addCinnamon);\n}", "function addClickHandler(element, callback) {\n element.addEventListener(\"click\", callback);\n}", "function addListenersTo(elementToListenTo) {window.addEventListener(\"keydown\",kdown);window.addEventListener(\"keyup\",kup);elementToListenTo.addEventListener(\"mousedown\",mdown);elementToListenTo.addEventListener(\"mouseup\",mup);elementToListenTo.addEventListener(\"mousemove\",mmove);elementToListenTo.addEventListener(\"contextmenu\",cmenu);elementToListenTo.addEventListener(\"wheel\",scrl);}", "_addEventListener() {\n this._wave.waveElement.addEventListener('click', () =>\n this._addBubbles(this._config.app.bubblesAddedOnClick.count, 2, 1, false)\n );\n }", "function addEvent(){\n document.getElementById(\"tipo\").addEventListener('change', readFileJSON,false);\n document.getElementById(\"buscar\").addEventListener('click', findErasmu,false);\n}", "function addEventListeners(element) {\n if (!settings.hideOnFocus) {\n addEventListener(element, \"keydown\", keydownHandler);\n addEventListener(element, \"keyup\", keyupHandler);\n }\n addEventListener(element, \"focus\", focusHandler);\n addEventListener(element, \"blur\", blurHandler);\n }", "addListener(event, listener) {\n this.ee.addListener(event, listener);\n }", "function addEvent(element, eventName, callback) {\n\n\t\t\t\t\t\t\tif (element.addEventListener) element.addEventListener(eventName, callback, false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\telement.attachEvent(eventName, callback, false);\n\t\t\t\t}", "function addEvent(element, eventName, callback) {\n\n\t\t\t\t\t\t\tif (element.addEventListener) element.addEventListener(eventName, callback, false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\telement.attachEvent(eventName, callback, false);\n\t\t\t\t}", "function addEvent(element, eventName, callback) {\n\n\t\t\t\t\t\t\tif (element.addEventListener) element.addEventListener(eventName, callback, false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\telement.attachEvent(eventName, callback, false);\n\t\t\t\t}", "function addEvent(element, eventName, callback) {\n\n\t\t\t\t\t\t\tif (element.addEventListener) element.addEventListener(eventName, callback, false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\telement.attachEvent(eventName, callback, false);\n\t\t\t\t}", "addHikeListener() {\n // We need to loop through the children of our list and attach a listener to each, remember though that children is a nodeList...not an array. So in order to use something like a forEach we need to convert it to an array.\n }", "addEventListeners() {\n\t\tthis.container.addEventListener( 'click', this.handleClick, false );\n\t}", "function addEvent(element, settings, customEvent, event) {\n\t\telement.bind(event, settings[customEvent]);\n\t}", "addListener(listener) {\n this.listeners.push(listener);\n }", "addListener(listener) {\n this.listeners.push(listener);\n }", "function addListeners() {\n\t\t// TODO remove inline comments, just example code.\n\t\t// To attach an event, use one of the following methods.\n\t\t// No need remove the listener in `instance.detached`\n\t\t// instance.addEventListener('click', onClick); //attached to `instance.element`\n\t\t// instance.addEventListener('click', onClick, myEl); //attached to `myEl`\n\t}", "on(handler) {\n this.addEventListener(handler);\n }", "addListener(_id, _event, _method) {\n\t\tvar element;\n\t\tif (typeof _id == 'string') {\n\t\t\telement = document.getElementById(_id);\n\t\t} else {\n\t\t\telement = _id;\n\t\t}\n\t\telement.addEventListener(_event, _method);\n\t}", "_addEventListeners() {\n this.el.addEventListener('click', this._onClickBound);\n this.el.addEventListener('keydown', this._onKeydownBound);\n }", "function addeventListener() {\n var button = document.getElementById('search-button');\n button.addEventListener('click', linearSearch);\n }", "function addEventListeners() {\n var button = document.getElementById('button');\n button.addEventListener('click', selectedData);\n}", "function addEvent (el, evt, cb) {\n if (el.addEventListener) el.addEventListener(evt, cb, false);\n else if (el.attachEvent) el.attachEvent('on' + evt, cb); \n}", "AttachListener(){\n\t\tthis.node.addEventListener('mousedown', this.OnMouseDownBind)\n\t}", "function addEvent(el, type, handler) {\r\n if (el.attachEvent) el.attachEvent('on' + type, handler);\r\n else el.addEventListener(type, handler);\r\n }", "function addEvent(element, eventName, callback) {\n if (element.addEventListener) {\n element.addEventListener(eventName, callback, false);\n }\n else {\n element.attachEvent(eventName, callback, false);\n }\n }", "addListener(listener) {\n listeners.push(listener);\n }", "function AddEventtoMarkforeachElement(item){\n item.addEventListener(\"click\",addEventtoMark);\n}", "function initEventListener() {\n \n }", "function addEvent(element, eventName, callback) {\n\n if (element.addEventListener) {\n\n element.addEventListener(eventName, callback, false);\n } else {\n\n element.attachEvent(eventName, callback, false);\n }\n\n\n }", "function addEvent(element, eventName, callback) {\n\n if (element.addEventListener) {\n\n element.addEventListener(eventName, callback, false);\n }\n else {\n\n element.attachEvent(eventName, callback, false);\n }\n\n\n }", "function xAddEventListener(e,eT,eL,cap)\r\n{\r\n if(!(e=xGetElementById(e)))return;\r\n eT=eT.toLowerCase();\r\n if(e.addEventListener)e.addEventListener(eT,eL,cap||false);\r\n else if(e.attachEvent)e.attachEvent('on'+eT,eL);\r\n else e['on'+eT]=eL;\r\n}", "function addListenerToElement(element, callback, type) {\r\n element.addEventListener(type, callback, false);\r\n}", "function addOnEvent(eventListener) {\n eventQueue.push(eventListener);\n }", "function addEventsToElement(ele) {\n ele.style.cursor=\"pointer\";\n if (ele.addEventListener) {\n ele.addEventListener('click',clickedTag,false);\n ele.addEventListener('mouseover',mouseoverTag,false);\n ele.addEventListener('mouseout',mouseoutTag,false);\n } else if (ele.attachEvent) {\n //alert(\"You are using IE. I will register the events, but \\n be warned that they fail.\");\n ele.attachEvent('onclick',clickedTag);\n ele.attachEvent('onmouseover',mouseoverTag);\n ele.attachEvent('onmouseout',mouseoutTag);\n }\n}", "registerSpanEventListener(listener) {\n this.eventListenersLocal.push(listener);\n }", "function setupListener() {\r\n container.addEventListener('click', clickHandler);\r\n}", "function addEventHandler(handler) {\n document.addEventListener('click', handler);\n}", "onclick(listener) {\n this.root_.onclick = listener;\n }", "function addElementListener(question, element, checked)\n{\n var questionId = question.attr('id').split('-')[1];\n if (question.attr('type') == 1)\n addCheckboxListener(question, element, questionId);\n else\n addRadioListener(question, element, questionId);\n element.prop('checked', checked);\n}", "function xAddEventListener(e,eT,eL,cap)\n{\n if(!(e=xGetElementById(e)))return;\n eT=eT.toLowerCase();\n if(e.addEventListener)e.addEventListener(eT,eL,cap||false);\n else if(e.attachEvent)e.attachEvent('on'+eT,eL);\n else {\n var o=e['on'+eT];\n e['on'+eT]=typeof o=='function' ? function(v){o(v);eL(v);} : eL;\n }\n}", "function initEventListener() { }", "clickListenerOn() {\n this.node.addEventListener(\"click\", this.clickHandler.bind(this));\n }", "function addListeners() {\n //get the elements to add listener and change image\n let cardContainers = Array.from($(\".col-md-3\"));\n addEvents(cardContainers, 'image/jazz-music-rubber-duck.jpg', 'mouseover');\n addEvents(cardContainers, 'image/question.png', 'mouseout');\n }", "function addEvent( el, type, fn ) {\n if (el.attachEvent) {\n el.attachEvent && el.attachEvent( 'on' + type, fn );\n } else {\n el.addEventListener( type, fn, false );\n }\n }", "function addListener(el, eventName, handler) {\n if(typeof(el) == \"string\"){\n el = document.querySelectorAll(el);\n if(el.length == 1){\n el = el[0]; // if only one set it properly\n }\n }\n\n if (el == null || typeof(el) == 'undefined') return;\n\n if(el.length !== undefined && el.length > 1 && el != window){ // it's a NodeListCollection\n for (var i = 0; i < el.length; ++i) {\n attachListener(el[i], eventName, handler);\n }\n }else { // it's a single node\n // console.log(el);\n attachListener(el, eventName, handler);\n }\n }", "addEvent(eventListener, func) {\n this.func[eventListener] = func;\n this.addEventToBlob(this.html, eventListener, func);\n }", "function addEvent( element, eventName, callback ) {\n\t\tif (element.addEventListener) {\n\t\t\telement.addEventListener(eventName, callback, false);\n\t\t} else {\n\t\t\telement.attachEvent(\"on\" + eventName, callback);\n\t\t}\n\t}", "function addEventListeners() {\n watchSubmit();\n watchResultClick();\n watchLogo();\n watchVideoImageClick();\n watchCloseClick();\n}", "function iniciaListener() {\n //Creo un listener para cada div (u otro elemento) de la pagina\n var lista_divs = document.querySelectorAll(\"div\");\n for (var i = 0; i < lista_divs.length; i++) {\n lista_divs[i].addEventListener('click', elementoOnclick);\n }\n }", "function addListener( _element, _event_string, _func ) {\n\t// Chrome, FF, O, Safari\n\tif( _element.addEventListener ) _element.addEventListener( _event_string, _func, false );\n\t// IE\n\telse if( _element.attachEvent ) _element.attachEvent( \"on\" + _event_string, _func );\n\t// credit to roxik, Masayuki Kido. roxik.com/cat\n}", "function addE(n){\n n.addEventListener(\"mouseover\", over);\n n.addEventListener(\"mouseout\", out);\n n.addEventListener(\"click\", click);\n}", "_addEventsListeners ()\n {\n this._onChange();\n }", "addEventListeners() {\n // Empty in base class.\n }", "function zeroListener(){\n document.getElementById(\"0\").addEventListener('click', addItemZero);\n}", "function listen(event){\n return obj.elem.addEventListener(event, function(e){return obj[event](e)});\n }", "static addListener(listener) {\n listeners.push(listener);\n }", "function addEventListenerOnHtmlElement(element, event, func) {\n // Use Hook to add event to chat message html element\n Hooks.once(\"renderChatMessage\", (chatItem, html) => {\n html[0].querySelector(element).addEventListener(event, func);\n });\n} // end addEventListenerOnHtmlElement", "function addEvent(element, event_name, func) {\n if (element.addEventListener) {\n element.addEventListener(event_name, func, false);\n } else if (element.attachEvent) {\n element.attachEvent(\"on\"+event_name, func);\n }\n}", "function addEvent(elemento, nomevento, funcion, captura)\n{\n if (elemento.attachEvent)\n {\n elemento.attachEvent('on' + nomevento, funcion);\n return true;\n }\n else\n if (elemento.addEventListener)\n {\n elemento.addEventListener(nomevento, funcion, captura);\n return true;\n }\n else\n return false;\n}", "function addListener(sourceElementId, targetElementId){\n let sourceElement = document.querySelector(sourceElementId);\n let action = \"input\";\n sourceElement.addEventListener(action, function(obj){ \n init(sourceElementId, targetElementId, false) \n }, true);\n }", "function addEventListeners() {\n document.getElementById(\"uploadNewFile\").addEventListener(\"click\", openDownloadModal)\n document.getElementById(\"create-folder\").addEventListener(\"click\", openNewFolderWindow)\n document.getElementById(\"dialogClose\").addEventListener(\"click\", closeDownloadModal)\n document.getElementById(\"fileViewerClose\").addEventListener(\"click\", closePreview)\n}", "addEventHandler() {\n super.addEventHandler();\n if(this.componentElement != null){\n let buttonEl = this.componentElement.querySelector(\"input[type='button']\");\n buttonEl.addEventListener(\"click\", (e) => { this.clickHandler(e); });\n }\n }", "_addEventListeners() {\n\n if (this._isNative) {\n this.selectEl.addEventListener('change', this._onInputBound);\n }\n else {\n this.el.addEventListener('change', this._onInputBound, true);\n }\n }", "function addEventListeners() {\n convertButton.addEventListener('click', getExchangeRate);\n }", "function addClickListener(element, enable)\n {\n if (enable)\n {\n // for simplicity and performance, we ignore drag events\n SnowPlow.addEventListener(element, 'mouseup', clickHandler, false);\n SnowPlow.addEventListener(element, 'mousedown', clickHandler, false);\n } else\n {\n SnowPlow.addEventListener(element, 'click', clickHandler, false);\n }\n }", "addEventListeners() {\n document.addEventListener('keydown', (e) => {\n this.eventListener(e, true);\n });\n document.addEventListener('keyup', (e) => {\n this.eventListener(e, false);\n });\n }", "function main() {\n addEventListeners();\n}", "_addEventListener(eventName, callback, uuid) {\n\t\tif (uuid) {\n\t\t\teventName = eventName + '.' + uuid;\n\t\t}\n\n\t\t$(document).on(eventName, callback);\n\t}", "_addEventListener(args) {\n !!(window.SVGSVGElement) ? bcdui._migPjs._$(args.element).on(args.type, args.listener) : args.element.attachEvent(args.type, args.listener);\n }", "listen() {\n [\"change\"].forEach(name => {\n this.el_.addEventListener(name, this.handler_, false)\n })\n }", "function addEventToElement(obj,eventType,fn){ \n\tif(obj.addEventListener)\n\t\tobj.addEventListener(eventType,fn,false); // NS6+ \n\telse if(obj.attachEvent)\n\t\tobj.attachEvent(\"on\"+eventType,fn); // IE 5+ \n\telse\n\t\treturn false;\n return true;\n}", "function addListener(element, type, handler){\n if (document.addEventListener) {\n element.addEventListener(type, handler, false);\n }\n // IE\n else if (document.attachEvent) {\n element.attachEvent(\"on\"+type, handler);\n }\n else {\n element[\"on\"+type] = handler;\n }\n}", "function addMyEventListener(){\n\t$('#saveBtn').click(save);\n\t$('#toListBtn').click(toList);\n\t$('#maxDateBtn').click(maxDate);\n\t$('.form_datetime').click(initDatePicker);\n}", "function addListener(elem, eventName, handler) {\n if(elem) \n elem.addEventListener(eventName, handler, false);\n else if(elem.attachEvent) \n elem.attachEvent('on' + eventName, handler);\n else \n elem['on' + eventName] = handler;\n}", "function addEvent(elemento,nomevento,funcion,captura)\n{\n if (elemento.attachEvent)\n {\n elemento.attachEvent('on'+nomevento,funcion);\n return true;\n }\n else \n if (elemento.addEventListener)\n {\n elemento.addEventListener(nomevento,funcion,captura);\n return true;\n }\n else\n return false;\n}", "function addEvent(elemento,nomevento,funcion,captura)\n{\n if (elemento.attachEvent)\n {\n elemento.attachEvent('on'+nomevento,funcion);\n return true;\n }\n else \n if (elemento.addEventListener)\n {\n elemento.addEventListener(nomevento,funcion,captura);\n return true;\n }\n else\n return false;\n}", "function addEvent(elemento,nomevento,funcion,captura)\n{\n if (elemento.attachEvent)\n {\n elemento.attachEvent('on'+nomevento,funcion);\n return true;\n }\n else \n if (elemento.addEventListener)\n {\n elemento.addEventListener(nomevento,funcion,captura);\n return true;\n }\n else\n return false;\n}", "function addEvent(elemento,nomevento,funcion,captura)\n{\n if (elemento.attachEvent)\n {\n elemento.attachEvent('on'+nomevento,funcion);\n return true;\n }\n else \n if (elemento.addEventListener)\n {\n elemento.addEventListener(nomevento,funcion,captura);\n return true;\n }\n else\n return false;\n}", "function addEvent(elemento,nomevento,funcion,captura)\n{\n if (elemento.attachEvent)\n {\n elemento.attachEvent('on'+nomevento,funcion);\n return true;\n }\n else \n if (elemento.addEventListener)\n {\n elemento.addEventListener(nomevento,funcion,captura);\n return true;\n }\n else\n return false;\n}", "function addEvent(elemento,nomevento,funcion,captura)\n{\n if (elemento.attachEvent)\n {\n elemento.attachEvent('on'+nomevento,funcion);\n return true;\n }\n else \n if (elemento.addEventListener)\n {\n elemento.addEventListener(nomevento,funcion,captura);\n return true;\n }\n else\n return false;\n}", "function addingListener() {\r\n for (let i=0; i< table.length; i++){\r\n table[i].addEventListener(\"click\",adding );\r\n }\r\n}", "function addEvent(el, type, handler) {\n if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler);\n}", "function addEventListeners (element, events, handler) {\n events.split(' ').forEach(event => element.addEventListener(event, handler));\n}", "function agregarEvento(idElemento,evento,funcion){\n if(document.getElementById(idElemento)!=null){\n \n /*console.log(\"Nombre evento \");\n console.log(evento);\n console.log(\"Funcion \");\n console.log(funcion);*/\n \n document.getElementById(idElemento).addEventListener(evento,funcion,false);\n \n \n \n \n }else{\n console.log(\"ERROR\");\n console.log(\"Nombre evento \");\n console.log(evento);\n console.log(\"Funcion \");\n console.log(funcion);\n console.log(\"Elemento\");\n console.log(idElemento);\n console.log(\"el elemento no existe\");\n }\n \n}", "function addEvent (oElem,sEventName,sFunction)\n{\n if (oElem.addEventListener) {\n oElem.addEventListener(sEventName,sFunction,false);\n }\n else if (oElem.attachEvent) {\n oElem.attachEvent('on' + sEventName,sFunction);\n }\n}", "addEventListener(name, callback) {\n this.instance.on(name, callback);\n }", "addListener(cb) {\n this.listeners.push(cb)\n }", "function _addListener(element, type, listener) {\n if (!element) {\n return false;\n }\n if (typeof window.attachEvent === 'object') {\n element.attachEvent('on' + type, listener);\n } else {\n element.addEventListener(type, listener, false);\n }\n }", "initializeEventListener(elementId, event, functionToRun) {\n document\n .getElementById(elementId)\n .addEventListener(event, () =>\n functionToRun(this.wallet, this.notificationHandler)\n );\n }", "function addEventListeners()\n\t{\n\t\t// window event\n\t\t$(window).resize(callbacks.windowResize);\n\t\t$(window).keydown(callbacks.keyDown);\n\t\t\n\t\t// click handler\n\t\t$(document.body).mousedown(callbacks.mouseDown);\n\t\t$(document.body).mouseup(callbacks.mouseUp);\n\t\t$(document.body).click(callbacks.mouseClick);\n\n\t\t$(document.body).bind('touchstart',function(e){\n\t\t\te.preventDefault();\n\t\t\tcallbacks.touchstart(e);\n\t\t});\n\t\t$(document.body).bind('touchend',function(e){\n\t\t\te.preventDefault();\n\t\t\tcallbacks.touchend(e);\n\t\t});\n\t\t$(document.body).bind('touchmove',function(e){\n\t\t\te.preventDefault();\n\t\t\tcallbacks.touchmove(e);\n\t\t});\n\t\t\n\t\tvar container = $container[0];\n\t\tcontainer.addEventListener('dragover', cancel, false);\n\t\tcontainer.addEventListener('dragenter', cancel, false);\n\t\tcontainer.addEventListener('dragexit', cancel, false);\n\t\tcontainer.addEventListener('drop', dropFile, false);\n\t\t\n\t\t// GUI events\n\t\t$(\".gui-set a\").click(callbacks.guiClick);\n\t\t$(\".gui-set a.default\").trigger('click');\n\t}", "function addEvent(sEvent, oElement, fListener) {\n try {\n oElement.addEventListener(sEvent, fListener, false);\n } catch (error) {\n\n }\n}", "function addListener(element, type, expression, bubbling) {\r\n bubbling = bubbling || false;\r\n\r\n if (window.addEventListener) { // Standard\r\n element.addEventListener(type, expression, bubbling);\r\n } else if (window.attachEvent) { // IE\r\n element.attachEvent('on' + type, expression);\r\n } else return false;\r\n }" ]
[ "0.738553", "0.71789664", "0.6703408", "0.67027724", "0.66859764", "0.66484183", "0.66224724", "0.6574885", "0.6511779", "0.6498515", "0.64830184", "0.6478967", "0.6472188", "0.64285713", "0.64284235", "0.64264214", "0.64264214", "0.64264214", "0.64264214", "0.6406285", "0.6396231", "0.63378495", "0.6316411", "0.6316411", "0.62928414", "0.6289696", "0.62841576", "0.6275539", "0.6269718", "0.6268306", "0.626239", "0.6261101", "0.62603134", "0.62598395", "0.625909", "0.62573504", "0.6240792", "0.6234094", "0.6230876", "0.62240136", "0.62201774", "0.6197161", "0.6188975", "0.6182959", "0.61793804", "0.61730886", "0.61590546", "0.61510676", "0.61272585", "0.6126749", "0.6113524", "0.61132675", "0.6111837", "0.6109581", "0.6103047", "0.610258", "0.6094613", "0.6092563", "0.6091231", "0.6084939", "0.60773736", "0.6067864", "0.6060971", "0.6056242", "0.60543156", "0.6052392", "0.6049988", "0.6047443", "0.6045174", "0.6039702", "0.6035989", "0.6030382", "0.60303307", "0.6028097", "0.6027187", "0.60268503", "0.6026015", "0.6012256", "0.601037", "0.6010132", "0.60023177", "0.59998786", "0.5996231", "0.59914404", "0.59914404", "0.59914404", "0.59914404", "0.59914404", "0.59914404", "0.5988211", "0.5984478", "0.5978992", "0.59724754", "0.59718424", "0.5971729", "0.59673584", "0.5959258", "0.5957405", "0.5951569", "0.5943395", "0.5942929" ]
0.0
-1
removes the event listener from the element
function stopListening() { element.removeEventListener(listenForEvent, handleKeyEvent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove() {\n this.target.removeEventListener(this.eventType, this.fn, false);\n }", "unlisten() {\n [\"change\"].forEach(name => {\n this.el_.removeEventListener(name, this.handler_, false)\n })\n\n /* Final reset */\n this.reset()\n }", "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "removeEvent(eventListener) {\n delete this.func[eventListener];\n this.removeEventFromBlob(this.html, eventListener)\n }", "detach() {\n document.removeEventListener('mousedown', this[onMouseDown], true);\n }", "detach() {\n document.removeEventListener('mousedown', this[onMouseDown], true);\n }", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "function off(event_name) { \n $.forEach(this.elements, function(element){\n element.removeEventListener(event_name);\n })\n }", "detach() {\n window.document.body.removeEventListener('click', this._handler);\n }", "function destruirElemento(event) {\n document.body.removeChild(event.target);\n}", "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.el.removeEventListener('keydown', this._onKeydownBound);\n }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "function removeListener(w, event, cb) {\n\t if(w.detachEvent) w.detachEvent('on' + event, cb);\n\t else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n\t }", "undelegateEvents() {\n this.delegatedEventListeners.forEach(({ type, listener }) => {\n this.el.removeEventListener(type, listener);\n });\n\n this.delegatedEventListeners = [];\n }", "function xRemoveEventListener(e,eT,eL,cap)\r\n{\r\n if(!(e=xGetElementById(e)))return;\r\n eT=eT.toLowerCase();\r\n if(e.removeEventListener)e.removeEventListener(eT,eL,cap||false);\r\n else if(e.detachEvent)e.detachEvent('on'+eT,eL);\r\n else e['on'+eT]=null;\r\n}", "removeEventListener() {\r\n this.eventListener = false;\r\n document.removeEventListener(\"click\", this.clickOutsideListener, true);\r\n }", "function removeListener(w, event, cb) {\n if (w.detachEvent) w.detachEvent('on' + event, cb);else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "_removeEventListeners() {\n\n if (this._isNative) {\n this.selectEl.removeEventListener('change', this._onInputBound);\n }\n else {\n this.el.removeEventListener('change', this._onInputBound, true);\n }\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeListener(w, event, cb) {\n if(w.detachEvent) w.detachEvent('on' + event, cb);\n else if (w.removeEventListener) w.removeEventListener(event, cb, false);\n }", "function removeclickevent(evt){\n evt.target.removeEventListener('click',clicktarget);\n}", "removeAllEventListeners() {\n this.eventListeners.forEach(({target, type, boundListener}) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "function xRemoveEventListener(e,eT,eL,cap)\n{\n if(!(e=xGetElementById(e)))return;\n eT=eT.toLowerCase();\n if(e.removeEventListener)e.removeEventListener(eT,eL,cap||false);\n else if(e.detachEvent)e.detachEvent('on'+eT,eL);\n else e['on'+eT]=null;\n}", "removeAllEventListeners() {\n this.eventListeners.forEach(({ target, type, boundListener }) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "removeListener(event, listener) {\n this.ee.removeListener(event, listener);\n }", "function removeListener() {\n document.getElementById('table').removeEventListener('click', eventResponses);\n}", "function _clear ( e ) {\n\t\t\t// get the realy function\n\t\t\trealFn = e.Event[realType].realFn;\n\n\t\t\tdocument.detachEvent ?\n\t\t\t\t\n\t\t\t\te.detachEvent( 'on'+realType, realFn )\n\t\t\t:\n\t\t\t\te.removeEventListener( realType, realFn, false );\n\t\t\t\t\n\t\t\tdelete e.Event[realType];\n\t\t\t\n\t\t}", "remove() {\n this.target.removeListener(this.event, this.callback, {\n context: this.context,\n remaining: this.remaining\n });\n }", "function removeDownListener() {\n if(listener.down) {\n document.removeEventListener('mousedown', mouseDown, false);\n listener.down = false;\n }\n }", "cleanMe() {\n this.DOM.el.removeEventListener(\n \"dblclick\",\n this.dblclickHandler.bind(this),\n {\n capture: true\n }\n );\n }", "function unbind() {\n document.removeEventListener('keydown', handleEvent);\n}", "detach() {\n this.attached.removeEventListener('mousedown', this.event);\n this.attached.removeEventListener('mouseup', this.event);\n this.attached.removeEventListener('click', this.event);\n this.attached.removeEventListener('dblclick', this.event);\n \n this.attached = null;\n }", "desactiver() {\n\t\t\tthis.suprimerObjet(\"cle\");// #tim Jessy, Suppression de linventaire lors de la fin de partie\n\t\t\tSprite.removeEventListeners(window, this.evt.window);\n }", "removeAllEventListeners () {\n this.eventListeners = [];\n }", "disconnectedCallback() {\n this.removeEventListener(\"mousedown\", this.tapEventOn);\n this.removeEventListener(\"mouseover\", this.tapEventOn);\n this.removeEventListener(\"mouseout\", this.tapEventOff);\n this.$.button.removeEventListener(\"focused-changed\", this.focusToggle);\n super.disconnectedCallback();\n }", "off (eventName) {\n delete this.events[eventName];\n }", "function removeListeners() {\n $(\"#controls\").off(\"click\");\n $(\"#sequence\").off(\"click\");\n}", "function pRemoveEvent(target,type,listner,useCapature) {\n if(target.detachEvent) \n target.detachEvent(type[0], listner); \n else \n target.removeEventListener([1], listner, useCapature);\n}", "function unlisten(elm) {\n elm.removeEventListener('keydown', map(elm));\n elm.removeEventListener('keyup', resetMetaKeys);\n}", "removeListener() {\n document.getElementById('banner-picture').removeEventListener('mousedown', this.mouseDownHandler);\n document.removeEventListener('mouseup', this.mouseUpHandler);\n document.getElementById('banner-picture').removeEventListener('mouseenter', this.mouseEnterHandler);\n document.getElementById('banner-picture').removeEventListener('mousemove', this.mouseMoveHandler);\n }", "function destroyClickedElement(event) {\n document.body.removeChild(event.target);\n }", "off(handler) {\n this.removeEventListener(handler);\n }", "detach() {\n const that = this;\n that._removeEventListeners();\n }", "function removeEventListener(handle) {\n GEvent.removeListener(handle);\n }", "removeEventListeners_() {\n this.$button_.off(app.InputEvent.START, this.onDropClick);\n }", "removeClickAwayEvent() {\n $('main').off('click.atkPanel');\n $(document).off('keyup.atkPanel');\n }", "function removeListeners() {\n\t\t$(document).off(EVENT_NAME_KEYPRESS);\n\t\t$(document).off(EVENT_NAME_KEYUP);\n\t}", "function RemoveEventListener(elem, evt, func, capture){\r\n capture = capture || false;\r\n if(elem.removeEventListener) elem.removeEventListener( evt, func, capture);\r\n else elem.detachEvent('on'+evt, func);\r\n}", "function removeUpListener() {\n if(listener.up) {\n document.removeEventListener('mouseup', mouseUp, false);\n listener.up = false;\n }\n }", "function removeListener(selector, event)\n\t{\n\t\t_svg.selectAll(selector).on(event, null);\n\n\t\t// remove listener from the map\n\t\tif (_listeners[selector] &&\n\t\t _listeners[selector][event])\n\t\t{\n\t\t\tdelete _listeners[selector][event];\n\t\t}\n\t}", "function xRemoveEventListener2(e,eT,eL,cap)\r\n{\r\n if(!(e=xGetElementById(e))) return;\r\n eT=eT.toLowerCase();\r\n if(e==window) {\r\n if(eT=='resize' && e.xREL) {e.xREL=null; return;}\r\n if(eT=='scroll' && e.xSEL) {e.xSEL=null; return;}\r\n }\r\n if(e.removeEventListener) e.removeEventListener(eT,eL,cap||false);\r\n else if(e.detachEvent) e.detachEvent('on'+eT,eL);\r\n else e['on'+eT]=null;\r\n}", "removeEventListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\t\tDOM_EVENTS.forEach(function(eventName){\n\t\t\tthis.document.removeEventListener(eventName, this._triggerEvent, { passive: true });\n\t\t}, this);\n\t\tthis._triggerEvent = undefined;\n\t}", "removeEventListeners() {\n\t\twindow.removeEventListener('resize', this.bindResize);\n\t\tthis.domElement.removeEventListener('click', this.bindClick);\n\t\tTweenMax.ticker.removeEventListener('tick', this.bindRender);\n\t\tEmitter.off('LOADING_COMPLETE', this.bindEnter);\n\t\twindow.removeEventListener('mousemove', this.boundMouseMove);\n\t}", "off(eventName) {\n delete this.events[eventName];\n }", "function removeAllListeners(container, opt) {\n container.children().each(function() {\n try {\n jQuery(this).die('click');\n } catch (e) {\n }\n try {\n jQuery(this).die('mouseenter');\n } catch (e) {\n }\n try {\n jQuery(this).die('mouseleave');\n } catch (e) {\n }\n try {\n jQuery(this).unbind('hover');\n } catch (e) {\n }\n })\n try {\n container.die('click', 'mouseenter', 'mouseleave');\n } catch (e) {\n }\n clearInterval(opt.cdint);\n container = null;\n\n\n\n }", "removeEventListeners() {\n // Empty in base class.\n }", "function removeClick() {\r\n rock.removeEventListener(\"click\", buttonRock);\r\n paper.removeEventListener(\"click\", buttonPaper);\r\n scissors.removeEventListener(\"click\", buttonScissors);\r\n return;\r\n}", "off(eventName) {\n delete this.events[eventName];\n }", "function destroyClickedElement(event) {\n document.body.removeChild(event.target);\n}", "function destroyClickedElement(event) {\n document.body.removeChild(event.target);\n}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function removeAllListeners(container,opt) {\n\t\t\tcontainer.children().each(function() {\n\t\t\t try{ jQuery(this).die('click'); } catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseenter');} catch(e) {}\n\t\t\t try{ jQuery(this).die('mouseleave');} catch(e) {}\n\t\t\t try{ jQuery(this).unbind('hover');} catch(e) {}\n\t\t\t})\n\t\t\ttry{ container.die('click','mouseenter','mouseleave');} catch(e) {}\n\t\t\tclearInterval(opt.cdint);\n\t\t\tcontainer=null;\n\n\n\n\t\t}", "function destroyClickedElement(event) {\n document.body.removeChild(event.target);\n}", "cancel() {\n\t\tthis.removeAllListeners()\n\t}", "function removeElement(e) {\n $(e.currentTarget).remove();\n}", "function off(){\n var event = arguments[0];\n removeEventFromStorage( event );\n return $element.off.apply( $element, params.apply( this, arguments ) );\n }", "removeEventListeners() {\r\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\r\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\r\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\r\n \r\n if (this.gyroscope) {\r\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\r\n }\r\n \r\n if (this.glare || this.fullPageListening) {\r\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\r\n }\r\n }", "_removeListeners() {\n document.removeEventListener('click', this._handleWindowClick);\n window.removeEventListener('resize', this._handleResize);\n this.el.removeEventListener('keydown', this._handleKeyDown);\n document.removeEventListener('blur', this._handleBlur, true);\n document.removeEventListener('focus', this._handleFocus, true);\n document.removeEventListener('spark.visible-children', this._handleVisibleChildren, true);\n }", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n \n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if(LEAVE_EV) { \n $element.unbind(LEAVE_EV, touchLeave);\n }\n \n setTouchInProgress(false);\n }", "function removeKeyEvent() {\n document.removeEventListener(\"keydown\",keyBoardHandler,false);\n}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "removeListener(event: string, listener: Function) {\n var idx;\n\n if (typeof this.__events[event] === 'object') {\n idx = indexOf(this.__events[event], listener);\n\n if (idx > -1) {\n this.__events[event].splice(idx, 1);\n }\n }\n }", "function removeEventListenerFromEle(elem, func) {\n if (document.removeEventListener) {\n // For all major browsers, except IE 8 and earlier\n elem.removeEventListener(\"click\", func);\n } else if (document.detachEvent) {\n // For IE 8 and earlier versions\n document.detachEvent(\"click\", func);\n }\n}", "removeEventListeners() {\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\n\n if (this.gyroscope) {\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\n }\n\n if (this.glare || this.fullPageListening) {\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\n }\n }", "function clearListener(elementId) {\n\t\tvar element = document.getElementById(elementId);\n\t\tif (element) {\n\t\t\telement.replaceWith(element.cloneNode(true));\n\t\t}\n\t}", "destruct() {\n document.removeEventListener(\"keydown\", this._onkeydown);\n document.removeEventListener(\"keyup\", this._onkeyup);\n }", "function removeClick(){\n removeEventListener('click',removeClick, false);\n topRight.removeEventListener('click',printXOrO);\n midLeft.removeEventListener('click',printXOrO);\n midMid.removeEventListener('click',printXOrO);\n midRight.removeEventListener('click',printXOrO);\n lowLeft.removeEventListener('click',printXOrO);\n lowMid.removeEventListener('click',printXOrO);\n lowRight.removeEventListener('click',printXOrO);\n addEventListener('click', printXOrO);\n}", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.unbind(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "destroy () {\n\t\tthis.options.element.removeEventListener('click', this.onClickToElement);\n\t\tthis.options.element.removeChild(this.options.element.querySelector('.pollsr'));\n\t}", "onDeactivate() {\r\n this.canvas.removeEventListener('mousedown', this.mouseDownEventHandler);\r\n this.canvas.removeEventListener('mouseup', this.mouseUpEventHandler);\r\n this.canvas.removeEventListener('mousemove', this.mouseMoveEventHandler);\r\n }", "off(eventName, cb) {\n this._events.removeListener(eventName, cb);\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) {\n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\r\n gameOverModal.btn.removeEventListener(\"click\", backToMenu);\r\n }", "unregisterSpanEventListener(listener) {\n const index = this.eventListenersLocal.indexOf(listener, 0);\n if (index > -1) {\n this.eventListeners.splice(index, 1);\n }\n }", "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function buttonClicked(){\n console.log(\"Button Clicked\");\n btn.removeEventListener(\"click\", buttonClicked); //unties this function from button clicked\n document.getElementById(\"text\").innerHTML = \"don't click it\";\n}", "_onMouseUp () {\n document.removeEventListener(\"mousemove\", this._onMouseMove);\n document.removeEventListener(\"touchmove\", this._onMouseMove);\n\n document.removeEventListener(\"mouseup\", this._onMouseUp);\n document.removeEventListener(\"touchend\", this._onMouseUp);\n }", "removeListeners()\n {\n this.cancel.removeEventListener('click', this.destroy);\n }" ]
[ "0.76763076", "0.7414222", "0.73614687", "0.7361277", "0.7300983", "0.7300983", "0.72921246", "0.7279179", "0.7275385", "0.72615063", "0.7240268", "0.72103614", "0.72103614", "0.72103614", "0.72103614", "0.72103614", "0.72055864", "0.7172616", "0.71660155", "0.71508133", "0.714832", "0.712192", "0.712192", "0.712192", "0.712192", "0.712192", "0.712192", "0.7117396", "0.71131724", "0.711015", "0.7109007", "0.7094074", "0.70824885", "0.7071508", "0.70496446", "0.70435786", "0.704141", "0.7023966", "0.70223475", "0.7020098", "0.7008791", "0.69909596", "0.6978431", "0.6968969", "0.6961741", "0.6930661", "0.6929762", "0.69202816", "0.69202685", "0.69176316", "0.69008654", "0.6899436", "0.68942094", "0.68941337", "0.6889482", "0.68826395", "0.686861", "0.68599206", "0.68578774", "0.685281", "0.6845162", "0.68352604", "0.6820465", "0.68153965", "0.6809753", "0.6808149", "0.6808149", "0.68008155", "0.68008155", "0.68008155", "0.68008155", "0.6799287", "0.67945844", "0.6794224", "0.67822164", "0.6778529", "0.6775915", "0.67733186", "0.67624086", "0.6748172", "0.6748172", "0.67473614", "0.67410594", "0.6740702", "0.674009", "0.6736321", "0.6735996", "0.67321825", "0.6725814", "0.67252237", "0.6723239", "0.6719676", "0.6719436", "0.67162144", "0.67132574", "0.67132574", "0.67132574", "0.66857284", "0.667045", "0.66696286" ]
0.7189224
17
called when the client connects
function onConnect() { localDiv.html('client is connected'); client.subscribe(topic); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(SUBSCRIBER);\n }", "clientConnected() {\n super.clientConnected('connected', this.wasConnected);\n\n this.state = 'connected';\n this.wasConnected = true;\n this.stopRetryingToConnect = false;\n }", "onConnect() {\n logger.info(`client was connected: ${this._client.connected}`);\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"#\");\n}", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"onConnect\");\r\n client.subscribe(\"State\", { qos: Number(1) });\r\n client.subscribe(\"Content\", { qos: Number(1) });\r\n\r\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(topic);\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"ips\");\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"Conectado...\");\n\t\n client.subscribe(\"[email protected]/WEB\");\n\n\t\n }", "onConnect() {\n this.state = constants_1.SocksClientState.Connected;\n // Send initial handshake.\n if (this._options.proxy.type === 4) {\n this.sendSocks4InitialHandshake();\n }\n else {\n this.sendSocks5InitialHandshake();\n }\n this.state = constants_1.SocksClientState.SentInitialHandshake;\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n log(\"Connection successful to topic \" + topic + \" as client \" + clientname);\n client.subscribe(topic);\n onconnect()\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"X\");\n client.subscribe(\"Y\");\n client.subscribe(\"smile\");\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"bdcc/itaxi\");\n}", "function onConnect() {\n\t\tconsole.log(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@connect\");\n\t}", "onConnect() {\n this.attempts = 1;\n this.connected = true;\n this.emit('connect');\n this.ws.on('message', msg => {\n msg = JSON.parse(msg);\n this.onMessage(msg);\n });\n }", "_handleSocketConnected() {\n this.sendClientHandshake();\n this._bsClientBush.postConnect();\n }", "function onConnect(){\n console.log(\"Connected!\");\n client.subscribe(topic);\n }", "function onOpen() {\n\t\tconsole.log('Client socket: Connected');\n\t\tcastEvent('onOpen', event);\n\t}", "_onConnect() {\n console.log(\"connected\")\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(topic);\n message = new Messaging.Message(\"webClient connected\");\n message.destinationName = topic;\n client.send(message);\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n client.subscribe(topics[\"response\"])\n console.log(\"onConnect\");\n}", "onInit() {\n this._client.subscribe(\"connect\", this.onConnect.bind(this));\n this._client.subscribe(\"message\", this.onMessage.bind(this));\n this._client.subscribe(\"error\", this.onError.bind(this));\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(topic);\n // Keep alive the channel\n keepAlive('KA');\n}", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"Conectado...\");\r\n\r\n client.subscribe(\"[email protected]/IoT\");\r\n\r\n\r\n}", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"Conectado...\");\r\n client.subscribe(\"[email protected]/IoT\");\r\n enviarInfo(\"00:00/00:00/0/0/0/0\")\r\n \r\n}", "function initClient () {\n\tvar io = socket.connect( Config.kSERVER_URL );\n\n\tio.sockets.on( 'connect', function handleConnect ( socket ) {\n\t\tconsole.log( 'client connected' );\n\n\t\tsocket.on( 'control', function handleControl ( data ) {\n\t\t\tconsole.log( 'client received control event' );\n\n\t\t\tsegments = data[ 'segmentCount' ];\n\t\t\tsegmentSet = data[ 'segmentSet' ];\n\n\t\t\tsegmentHighlight( segments );\n\t\t} );\n\n\t} );\n\n\tconsole.log( 'client initialized' );\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n\n}", "onClientConnected(callback) {\n this.connCallback = callback;\n }", "_onConnecting() {\n this.emit(\"connecting\");\n }", "function cb_onConnect() {\n console.log(\"Connection established.\");\n $('#status').val('Connected to ' + host + ':' + port);\n topic = $('#topic').val();\n client.subscribe(topic);\n}", "onConnect() {\n console.log(\"connected to broker\");\n this.client.subscribe(\"common/reply\");\n this.emit('onConnected');\n }", "function onConnect() {\n $.notify('client is connected', \"success\");\n console.log('MQTT: Connected');\n client.subscribe(topic);\n }", "function onConnect() {\n // Once a connection has been made report.\n console.log(\"Connected\");\n}", "onConnected() {\n if (this.connected || !this.id) return\n this.connected = true\n log('connected')\n this.emit('connected')\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(SUBSCRIBER);\n //message = new Paho.MQTT.Message(\"Hello\");\n //message.destinationName = \"World\";\n //client.send(message);\n }", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"onConnect\");\r\n client.subscribe(subscribeTopic.lights); //for subscription of lights\r\n client.subscribe(subscribeTopic.window); //for subscription of windows\r\n client.subscribe(subscribeTopic.tempHumidity); //for subscription of tempHumidity\r\n client.subscribe(subscribeTopic.tempTemperature);\r\n client.subscribe(subscribeTopic.AirQuality); //for subscription of AirQuality\r\n}", "function onConnect() {\n console.log(\"onConnect\");\n client.subscribe(\"student/id\");\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n toastr.success(\"onConnect\")\n \n client.subscribe(\"general\")\n client.subscribe(\"status/+\")\n client.subscribe(\"readings/+\")\n\n //client.subscribe(\"temperature/+\")\n //client.subscribe(\"pressure/+\")\n //client.subscribe(\"humidity/+\")\n }", "function onsocketConnected () {\n\tconsole.log(\"connected to server\"); \n}", "connectedCallback() {\n this.connected = true;\n this.init();\n }", "connectedCallback() {\n this.connected = true;\n this.init();\n }", "function onConnect() {\n console.log(\"MQTT Connect\");\n console.log(\"ready for receive, topic : \" + topic);\n client.subscribe(topic);\n // initPoly();\n}", "connectedCallback() {\n }", "function onConnect() {\n localDiv.innerHTML = 'client is connected to '\n + broker.hostname + '<br>and subscribed to '\n + topic;\n client.subscribe(topic);\n}", "onConnect() {\n console.log(\"STretch Connected\");\n }", "connectedCallback () {\n this.log_('connected');\n this.connected_ = true;\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n cliente.subscribe(\"MangoProject\");\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n client.subscribe(topicPlot)\n console.log(\"onConnect\");\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"b8:27:eb:b9:6f:96/ENQ\");\n // message = new Paho.MQTT.Message(\"Hello CloudMQTT\");\n // message.destinationName = \"/cloudmqtt\";\n \n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n // subscribe as soon as connected\n subscribeMQTTtopic();\n }", "function onConnect() {\n console.log(\"connected\");\n\n}", "onConnected() {\n if(!this.connected) {\n this.logger.debug(this.TAG, this.logMsgs.CONNECTED);\n }\n this.connected = true;\n }", "connectedCallback(){}", "_handleConnect() {\n debug(\"Connected to TCP connection to node \" + this._node.id());\n this._connecting = false;\n this.emit(\"connect\");\n // flush queue after emitting \"connect\"\n var out = this._queue.flush();\n out.forEach((msg) => {\n this.send(msg.event, msg.data);\n });\n }", "function onConnectCallback() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"connected\");\r\n client.publish(\"lightControl1\", \"connected\", 0, false); //publish a message to the broker\r\n client.publish(\"lightControl2\", \"connected\", 0, false); //publish a message to the broker\r\n}", "onConnected() {\n this.status = STATUS_CONNECTED;\n }", "function onConnect() {\n\t// Once a connection has been made, make a subscription and send a message.\n\tconsole.log(\"onConnect\");\n\tclient.subscribe(\"World\");\n\tmessage = new Paho.MQTT.Message(\"All is up!\");\n\tmessage.destinationName = \"World\";\n\tclient.send(message); \n}", "_onConnect() {\n clearTimeout(this._connectionTimeout);\n\n this.logger.info(\n {\n tnx: 'network',\n localAddress: this._socket.localAddress,\n localPort: this._socket.localPort,\n remoteAddress: this._socket.remoteAddress,\n remotePort: this._socket.remotePort\n },\n '%s established to %s:%s',\n this.secure ? 'Secure connection' : 'Connection',\n this._socket.remoteAddress,\n this._socket.remotePort\n );\n\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n\n this.stage = 'connected';\n\n // clear existing listeners for the socket\n this._socket.removeListener('data', this._onSocketData);\n this._socket.removeListener('timeout', this._onSocketTimeout);\n this._socket.removeListener('close', this._onSocketClose);\n this._socket.removeListener('end', this._onSocketEnd);\n\n this._socket.on('data', this._onSocketData);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n this._socket.on('timeout', this._onSocketTimeout);\n\n this._greetingTimeout = setTimeout(() => {\n // if still waiting for greeting, give up\n if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {\n this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');\n }\n }, this.options.greetingTimeout || GREETING_TIMEOUT);\n\n this._responseActions.push(this._actionGreeting);\n\n // we have a 'data' listener set up so resume socket if it was paused\n this._socket.resume();\n }", "_onConnect() {\n clearTimeout(this._connectionTimeout);\n\n this.logger.info(\n {\n tnx: 'network',\n localAddress: this._socket.localAddress,\n localPort: this._socket.localPort,\n remoteAddress: this._socket.remoteAddress,\n remotePort: this._socket.remotePort\n },\n '%s established to %s:%s',\n this.secure ? 'Secure connection' : 'Connection',\n this._socket.remoteAddress,\n this._socket.remotePort\n );\n\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n\n this.stage = 'connected';\n\n // clear existing listeners for the socket\n this._socket.removeListener('data', this._onSocketData);\n this._socket.removeListener('timeout', this._onSocketTimeout);\n this._socket.removeListener('close', this._onSocketClose);\n this._socket.removeListener('end', this._onSocketEnd);\n\n this._socket.on('data', this._onSocketData);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n this._socket.on('timeout', this._onSocketTimeout);\n\n this._greetingTimeout = setTimeout(() => {\n // if still waiting for greeting, give up\n if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {\n this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');\n }\n }, this.options.greetingTimeout || GREETING_TIMEOUT);\n\n this._responseActions.push(this._actionGreeting);\n\n // we have a 'data' listener set up so resume socket if it was paused\n this._socket.resume();\n }", "_onConnect() {\n clearTimeout(this._connectionTimeout);\n\n this.logger.info(\n {\n tnx: 'network',\n localAddress: this._socket.localAddress,\n localPort: this._socket.localPort,\n remoteAddress: this._socket.remoteAddress,\n remotePort: this._socket.remotePort\n },\n '%s established to %s:%s',\n this.secure ? 'Secure connection' : 'Connection',\n this._socket.remoteAddress,\n this._socket.remotePort\n );\n\n if (this._destroyed) {\n // Connection was established after we already had canceled it\n this.close();\n return;\n }\n\n this.stage = 'connected';\n\n // clear existing listeners for the socket\n this._socket.removeListener('data', this._onSocketData);\n this._socket.removeListener('timeout', this._onSocketTimeout);\n this._socket.removeListener('close', this._onSocketClose);\n this._socket.removeListener('end', this._onSocketEnd);\n\n this._socket.on('data', this._onSocketData);\n this._socket.once('close', this._onSocketClose);\n this._socket.once('end', this._onSocketEnd);\n\n this._socket.setTimeout(this.options.socketTimeout || SOCKET_TIMEOUT);\n this._socket.on('timeout', this._onSocketTimeout);\n\n this._greetingTimeout = setTimeout(() => {\n // if still waiting for greeting, give up\n if (this._socket && !this._destroyed && this._responseActions[0] === this._actionGreeting) {\n this._onError('Greeting never received', 'ETIMEDOUT', false, 'CONN');\n }\n }, this.options.greetingTimeout || GREETING_TIMEOUT);\n\n this._responseActions.push(this._actionGreeting);\n\n // we have a 'data' listener set up so resume socket if it was paused\n this._socket.resume();\n }", "__broker_connected(client) {\n console.log('[HubManager MQTT] ' + client.id + ' is now connected');\n if (that.connCallback != null) {\n that.connCallback(client);\n }\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n client.subscribe(house.topics.main)\n client.subscribe(house.topics.weather)\n client.subscribe(house.topics.relay_status)\n client.subscribe(house.topics.relay_power)\n console.log(\"onConnect\");\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"[onConnect]\");\n client.subscribe(mqttTopic);\n}", "function onConnect() {\n emitHello();\n $log.log(\"monitor is connected\");\n }", "function onConnect() {\n\t\tclient.subscribe(endpoints.Liveliness, onData);\n\t}", "connect() {}", "initiateConnect(connectedAs) {\n\t\tthis.setState({connectedAs});\n\t\t\n\t\t// now open up the socket to the server\n\t\ttry {\n\t\t\tthis.clientConnection = new clientConnection(connectedAs);\t\t\n\t\t} catch (ex) {\n\t\t\n\t\t}\n\t}", "onconnect(id) {\n debug(\"socket connected with id %s\", id);\n this.id = id;\n this.connected = true;\n this.disconnected = false;\n this.emitBuffered();\n this.emitReserved(\"connect\");\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"/bettersense\");\n message = new Paho.MQTT.Message(\"Hello CloudMQTT\");\n message.destinationName = \"/bettersense\";\n client.send(message);\n }", "connectedCallback() {\n \n }", "connected() {\n // implement if needed\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n subscribeTopics(client);\n message = new Paho.MQTT.Message(\"Connect from \" + clientId);\n message.destinationName = \"Log\";\n client.send(message);\n}", "onConnect() {\n this.setState({\n connected: true,\n serverResponse: {\n event: 'subscribe comments',\n status: 'waiting'\n }\n });\n this.socket.emit('subscribe comments');\n }", "onconnect(id) {\n debug(\"socket connected with id %s\", id);\n this.id = id;\n this.connected = true;\n this.disconnected = false;\n super.emit(\"connect\");\n this.emitBuffered();\n }", "function onConnection (_client) {\n client = _client;\n createConnection();\n }", "function onConnect() {\n\t// Once a connection has been made, make a subscription and send a message.\n\ttry {\n\t\tclearInterval(interval);\n\t} catch (error) {}\n\t// client subscribed op dynamische topic!\n\tclient.subscribe(`/luemniro/PiToJs/${InputFieldValue}`);\n\t// Kijken of juiste ID is ingegeven!\n\tinitializeCommunication();\n}", "function connected( connection ) {\n}", "beforeConnectedCallbackHook(){\n\t\t\n\t}", "onconnect(id) {\n debug(\"socket connected with id %s\", id);\n this.id = id;\n this.connected = true;\n this.disconnected = false;\n this.emitBuffered();\n this.emitReserved(\"connect\");\n }", "function mqttClientConnectHandler() {\n console.log('connected to MQTT server');\n mqttClient.subscribe(deviceTopic);\n console.log(\"subscribed to\", deviceTopic);\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and save a message to a txt.\n client.subscribe(\"mebaris01/nurusallam/\");\n \n}", "async _onConnection (client) {\n // Setup event listeners\n client.on('create', (msg) => this.onCreate(client, msg))\n client.on('join', (msg) => this.onJoin(client, msg))\n client.on('leave', (msg) => this.onDisconnect(client, msg))\n }", "function serverConnected(){\n \tconsole.log(\"connected\");\n }", "function connectCallback(){\n\t\tconsole.log('connected');\t\t\n\t\tvar subscription = client.subscribe(\"/fx/prices\", \n\t\t\t function( message ) {\n onCallBack(message)\n }\n\t\t);\n\t}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(mqttData.topic);\n\n // message = new Paho.MQTT.Message(\"Test Feedhenry\");\n // message.destinationName = mqttData.topic;\n // client.send(message);\n }", "connectedCallback()\n\t{\n\n\t}", "connectedCallback() {\n this.parseParams();\n this.parseHeaders();\n this.generateData();\n }", "function on_connect() {\n console.log(\"Connected to RabbitMQ-Web-Stomp\");\n console.log(client);\n client.subscribe(mq_queue, on_message);\n }", "connectedCallback(){\r\n }", "connectedCallback(){\r\n }", "function onConnect() {\n console.log(\"Connected!\");\n}", "onconnect(id) {\n debug(\"socket connected with id %s\", id);\n this.id = id;\n this.connected = true;\n this.disconnected = false;\n super.emit(\"connect\");\n this.emitBuffered();\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"iot-2/evt/accion/fmt/json\");\n //message = new Paho.MQTT.Message(\"Hello\");\n //message.destinationName = \"World\";\n //client.send(message);\n}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(\"18fe34fc04de-soil\");\n //message = new Paho.MQTT.Message(\"Hello\");\n //message.destinationName = \"/World\";\n //client.send(message); \n}", "connectedCallback(){super.connectedCallback()}", "function onConnect() {\n// Once a connection has been made, make a subscription and send a message.\n\tconsole.log(\"onConnect\");\n\tclient.subscribe(\"cloudmqtt\");\n\tmessage = new Paho.MQTT.Message(\"Hello CloudMQTT\");\n\tmessage.destinationName = \"cloudmqtt\";\n\tclient.send(message);\n\tclient.subscribe(\"activity\");\n}", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }", "connectedCallback() {\n super.connectedCallback();\n }" ]
[ "0.7953843", "0.7779623", "0.7695985", "0.76530504", "0.76057947", "0.7550192", "0.7486288", "0.74651325", "0.7456237", "0.743651", "0.74294996", "0.7360504", "0.7349641", "0.733722", "0.7330392", "0.73156106", "0.73113114", "0.72769135", "0.7256924", "0.72469455", "0.7216576", "0.71955425", "0.71906465", "0.71754014", "0.71716374", "0.71702003", "0.7166361", "0.7142965", "0.7125301", "0.7119278", "0.7117537", "0.7089865", "0.7082132", "0.70766264", "0.70667034", "0.70592964", "0.70587105", "0.70522064", "0.70139956", "0.6963866", "0.6963866", "0.69626546", "0.6958851", "0.69519305", "0.694973", "0.6946299", "0.69383824", "0.69315", "0.6924482", "0.6912055", "0.6908207", "0.69018734", "0.689873", "0.6897647", "0.6897646", "0.6893093", "0.6889788", "0.6887282", "0.6887282", "0.6887282", "0.68825936", "0.6873704", "0.6870909", "0.6867907", "0.6865545", "0.6860345", "0.68518597", "0.6841485", "0.6833063", "0.6832031", "0.6830444", "0.6829214", "0.68280816", "0.682507", "0.68186384", "0.68171513", "0.6816032", "0.68098253", "0.679311", "0.67917335", "0.6788798", "0.67877126", "0.678404", "0.67839503", "0.6782221", "0.6771395", "0.6770197", "0.6768813", "0.676658", "0.676658", "0.6757312", "0.67525244", "0.6751369", "0.6749378", "0.674444", "0.6744341", "0.67405486", "0.67405486", "0.67405486", "0.67405486" ]
0.76097023
4
called when the client loses its connection
function onConnectionLost(response) { if (response.errorCode !== 0) { localDiv.html('onConnectionLost:' + response.errorMessage); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clientDisconnect() {\r\n delete clients[connection.remoteAddress];\r\n console.log('connection closed: ' + remoteAddress + \" \" + now.getHours() + \":\" + now.getMinutes() + \":\" + now.getSeconds());\r\n\r\n\r\n }", "handleDisconnect() {\n\t\tdebug(\n\t\t\t'warn: ' + ((this.fromServer)?'server':'client') + \n\t\t\t' connection lost'\n\t\t);\n\t\tthis.emit('disconnect');\n\t\tthis.emit('disconnection');\n\t\tthis.socket = null;\n\t}", "handleDisconnection() {}", "clientDisconnected() {\n this.clear();\n this.emit('disconnect');\n }", "function onClose() {\n\t\tconsole.log('Client socket: Connection closed');\n\t\tmWebSocket = null;\n\t\tcastEvent('onClose', event);\n\t}", "function onConnectionLost(responseObject) {\r\n if (responseObject.errorCode !== 0) {\r\n console.log(\"onConnectionLost:\" + responseObject.errorMessage);\r\n client.connect({onSuccess:onConnect});\r\n }\r\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\", responseObject.errorMessage);\n setTimeout(function() { client.connect() }, 5000);\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\" + responseObject.errorMessage);\n }\n }", "onDisconnected() {\n if (!this.connected) return\n this.multiplexer.stop()\n // We need to unset the id in order to receive an immediate response with new\n // client id when reconnecting.\n this.id = undefined\n this.connected = false\n log('disconnected')\n this.emit('disconnected')\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\", responseObject.errorMessage);\n setTimeout(function() { client.connect() }, 5000);\n }\n}", "function onConnectionLost(responseObject) {\r\n if (responseObject.errorCode !== 0) {\r\n console.log(\"onConnectionLost:\" + responseObject.errorMessage);\r\n }\r\n \r\n }", "function onConnectionLost(responseObject) {\n console.log('lost connection');\n console.trace(responseObject);\n console.log(responseObject);\n connected = false;\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n\t if (responseObject.errorCode !== 0) {\n\t console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n\t }\n\t }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n\t\tif (responseObject.errorCode !== 0) {\n\t\t\tconsole.log('onConnectionLost:' + responseObject.errorMessage);\n\t\t}\n\t}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n\n }", "onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"Connection lost:\"+responseObject.errorMessage);\n }\n }", "function onConnectionLost(responseObject) {\n\t\tsetTimeout(MQTTconnect, reconnectTimeout);\n\t\t$('#status').val(\"connection lost: \" + responseObject.errorMessage + \". Reconnecting\");\n\t}", "function onConnectionLost(responseObject) {\r\n if (responseObject.errorCode !== 0) {\r\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\r\n }\r\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n \t displayMessageConsole(\"Connection Lost with MQTT Broker. Error: \" + \"\\\"\" +responseObject.errorMessage + \"\\\"\");\n }\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n cliente.connect({useSSL: true, onSuccess:onConnect});\n }\n}", "disconnected() {\n // implement if needed\n }", "_onClose() {\n this._socket = null;\n this._osk = null;\n this._connectedAt = 0;\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n\t console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n\tif (responseObject.errorCode !== 0) {\n\t\tconsole.log(\"onConnectionLost:\"+responseObject.errorMessage);\n\t\tonPageLoad();\n\t\tclearSubs();\n \t}\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\" + responseObject.errorMessage);\n }\n}", "onClientDisconnected() {\n NotificationManager.error(\n \"Connection Lost from server please check your connection.\",\n \"Error!\"\n );\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\" + responseObject.errorMessage);\n }\n}", "function onConnectionLost(response) {\n if (response.errorCode !== 0) {\n localDiv.innerHTML = 'Connection Lost:' + response.errorMessage;\n }\n}", "function disconnectFromServer() {\n\tconsole.log(\"disconnectFromServer\");\t\n\tclientObj.disconnect();\n\tonPageLoad();\n\tclearSubs();\n}", "function onConnectionLost(responseObject) {\r\n if (responseObject.errorCode !== 0) {\r\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\r\n }\r\n}", "function onConnectionLost(responseObject) {\r\n if (responseObject.errorCode !== 0) {\r\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\r\n }\r\n}", "function onConnectionLost(responseObject) {\r\n if (responseObject.errorCode !== 0) {\r\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\r\n }\r\n}", "function lostConnection(client) {\n if(typeof(client.worker) === \"undefined\") {\n console.log(\"Lost connection while connecting\");\n } else {\n console.log(\"Lost connection with\", client.worker.toString());\n qh.removeWorker(client.worker);\n }\n}", "function onConnectionLost(responseObject) {\n console.log(\"onConnectionLost: Connection Lost\");\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost: \" + responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n console.log(\"onConnectionLost: Connection Lost\");\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost: \" + responseObject.errorMessage);\n }\n}", "disconnectedCallback() {\n unsubscribe(this.subscription);\n this.subscription = null;\n }", "function onConnectionLost(responseObject) {\n\tif (responseObject.errorCode !== 0) { \n\t\tconsole.log(\"onConnectionLost:\"+responseObject.errorMessage);\n\t} \n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\" + responseObject.errorMessage);\n write(responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function terminate() {\n console.log('[client disconnected]', clientID);\n //stop sending metadata\n clearInterval(metadataTimer);\n //disconnect websocket if not already\n if (me.readyState === WebSocket.CONNECTING || me.readyState === WebSocket.OPEN) {\n me.terminate();\n }\n //clean up connections to channels\n for (const id of connectedChannels) {\n disconnect(id);\n }\n }", "disconnectedCallback() {\n this.unsubscribeToMessageChannel();\n }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n alert(\"Se perdió la conexión\")\n console.log(\"onConnectionLost:\", responseObject.errorMessage);\n setTimeout(function() {\n client.connect()\n }, 5000);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost: \"+responseObject.errorMessage);\n }\n}", "disconnectedCallback() { }", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\nif (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\"+responseObject.errorMessage);\n}\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost: \" + responseObject.errorMessage);\n }\n Notification.error({ title: \"Mqtt Connection lost\", message: responseObject.errorMessage });\n reset();\n }", "ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "function ClientDisconnected(socket) {\n\tfor (var i = 0; i < svs.clients.length; i++) {\n\t\tvar client = svs.clients[i];\n\n\t\tif (client.state === CS.FREE) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (client.netchan.socket === socket) {\n\t\t\tDropClient(client, 'disconnected');\n\t\t\treturn;\n\t\t}\n\t}\n}", "function HandleClose() {\n console.log('WebSocket closed');\n Socket = null;\n SetState(IconError, 'Disconnected');\n}", "ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "disconnectedCallback () {\n this.log_('disconnected');\n\n // Clear all timers.\n this.forEachTimeoutID_((id) => {\n this.clearTimeout(id);\n });\n\n this.connected_ = false;\n }", "async disconnect() {\n if (this._updateInvalidatedAccessories) { // Should come first, as other operations might take some time.\n clearInterval(this._updateInvalidatedAccessories);\n this._updateStatuses = undefined;\n }\n\n if (this._db) {\n this._db.close();\n this._db = undefined;\n }\n\n if (this._client) {\n this._client.disconnect();\n this._client = undefined;\n }\n\n if (this._publisher) {\n this._publisher.publish(PubSubEvents.SERVER_PUB_DISCONNECTED,\n JSON.stringify(this._options.homeId), () => {\n this._publisher.quit();\n this._publisher = undefined;\n });\n }\n\n if (this._subscriber) {\n this._subscriber.unsubscribe(PubSubEvents.SERVER_SUB_INTERACT);\n this._subscriber.quit();\n }\n\n this._updateStatuses = undefined;\n this.emit('disconnect');\n }", "onDisconnect()\n {\n this.connected = false;\n this.clearStates();\n this.emit(Connection.onDisconnect);\n }", "disconnectedCallback () {}", "disconnectedCallback() {}", "disconnectedCallback() {}", "ondisconnect() {\n debug(\"server disconnect (%s)\", this.nsp);\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "function disconnect() {\r\n\t\t console.log('disconnect!');\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED,\r\n\t\t onConnectionSuccess);\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_FAILED,\r\n\t\t onConnectionFailed);\r\n\t\t connection.removeEventListener(\r\n\t\t JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED,\r\n\t\t disconnect);\r\n\t\t}", "ondisconnect() {\n this.destroy();\n this.onclose(\"io server disconnect\");\n }", "function handleClientClose(state, e) {\n console.error('Lost connection to phoenix server')\n state.conn.hasError.set(true)\n countdownToClientReconnect(state, 10000, 'Lost connection with the backend. Has the phoenix server been closed? Retrying $TIME')\n}", "function onClientDisconnect() {\r\n\tconsole.log(\"Client has disconnected: \"+this.id);\r\n\tvar nsp = url.parse(this.handshake.headers.origin).hostname;\r\n\t// Broadcast removed player to connected socket clients\r\n\tio.of(nsp).emit(\"userLeft\",{id: this.id});\r\n}", "function onConnectionLost(responseObject) {\n\t//start interval for reconnecting to mqtt server\n\tinterval = setInterval(function() {\n\t\tConnectToMQTT();\n\t}, 10000);\n\n\tif (responseObject.errorCode !== 0) {\n\t\tconsole.log('onConnectionLost:' + responseObject.errorMessage);\n\t}\n}", "function onConnectionLost(res) {\n toastr.warning(`Connection Lost: Code=${res.errorCode} message=${res.errorMessage}`)\n }", "function onConnectionLost(responseObject) {\r\n if (responseObject.errorCode !== 0) {\r\n console.log(responseObject.errorMessage);\r\n }\r\n}", "function leave() {\n\t\t\tisConnected = false;\n\t\t\tsignalingChannel.leave();\n\t\t\tif (SETTINGS.data) {\n\t\t\t\tchannel.close();\t\n\t\t\t}\n\t\t\tif (SETTINGS.video) {\n\t\t\t\tpeerConnection.removeStream();\n\t\t\t}\n\t\t\t\n\t\t}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n showNotification('Connection lost: ' + responseObject.errorMessage);\n }\n}", "function onConnectionLost(responseObject) {\n if (responseObject.errorCode !== 0) {\n console.log(\"onConnectionLost:\", responseObject.errorMessage);\n setTimeout(function () {\n clientMQTT.connect(mqttConnectOptions);\n }, 5000);\n }\n }", "disconnectedCallback(){\n \n }", "disconnectedCallback(){\n \n }", "disconnectedCallback(){\n \n }", "function onDisconnect() {\n pruneConnectionsMap();\n}", "leave() {\n if (this.client.browser) return;\n const connection = this.client.voice.connections.get(this.guild.id);\n if (connection && connection.channel.id === this.id) connection.disconnect();\n }", "disconnected() {}", "function disconnect(){\r\n\tconn.disconnect();\r\n}", "disconnectedCallback(){}", "disconnectedCallback(){}", "disconnectedCallback(){}" ]
[ "0.7493831", "0.74451375", "0.7402893", "0.7352792", "0.73291796", "0.73029107", "0.7284382", "0.7193906", "0.71692103", "0.71331644", "0.71320593", "0.7108812", "0.7093675", "0.708489", "0.7061508", "0.7061508", "0.7061508", "0.7061508", "0.7061508", "0.7061508", "0.7057972", "0.7057221", "0.7057221", "0.7053173", "0.70319456", "0.702523", "0.70230424", "0.7001338", "0.7000144", "0.69899625", "0.69742906", "0.69671845", "0.69352174", "0.69314307", "0.6919273", "0.691677", "0.6911423", "0.69104713", "0.6897626", "0.6897626", "0.6897626", "0.6897579", "0.68950886", "0.68932873", "0.6886328", "0.6885026", "0.68845505", "0.688375", "0.688375", "0.688375", "0.688375", "0.688375", "0.688375", "0.688375", "0.688375", "0.688375", "0.688375", "0.688375", "0.688375", "0.688129", "0.6880922", "0.68799454", "0.6866692", "0.68650585", "0.6860187", "0.6860187", "0.6853307", "0.6853171", "0.6825792", "0.6825792", "0.68233025", "0.6807542", "0.6799932", "0.67969054", "0.6796795", "0.67953044", "0.6794368", "0.679128", "0.679128", "0.678348", "0.6772487", "0.6761904", "0.676129", "0.6748109", "0.6744703", "0.6743268", "0.6741803", "0.6739632", "0.6737864", "0.6734497", "0.67344946", "0.67344946", "0.67344946", "0.67314905", "0.6725759", "0.67212695", "0.6717439", "0.6717273", "0.6717273", "0.6717273" ]
0.6877702
62
called when a message arrives
function onMessageArrived(message) { // Split the message into an array: let readings = float(split(message.payloadString, ',')); // if you have all the readings, put them in the chart: if (readings.length >= numBands) { chart.data.datasets[0].data = readings; // update the timestamp: timestampDiv.html('last reading at: ' + new Date().toLocaleString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onMessageReceive() {}", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "onMessage() {}", "onMessage() {}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n write(message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\", message);\n }", "function onMessageReceived(e) {\n console.log('message received');\n console.log(e);\n var msg = JSON.parse(e.data);\n console.log(msg.event);\n switch (msg.event) {\n case 'ready':\n onReady();\n break;\n case 'finish': \n onFinish();\n break;\n };\n }", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n \t}", "function receivedMessage(event) {\n messageHandler.handleMessage(event);\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n }", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n\n switch (data.event) {\n case 'ready':\n onReady();\n break;\n\n case 'playProgress':\n onPlayProgress(data.data);\n break;\n\n case 'pause':\n onPause();\n break;\n\n case 'finish':\n onFinish();\n break;\n }\n }", "function onMqttMessageArrived(message) {\n console.log(\"onMqttMessageArrived:\"+message.payloadString+ ' for '+message.destinationName );\n //console.log(message);\n dispatch_message_to_blocks( message.destinationName, message.payloadString );\n}", "messageReceived(message) {\n\t\tMessage.create({\n\t\t\tuser: this.user,\n\t\t\tbody: message\n\t\t}).then((res) => {\n\t\t\tres.user = this.user;\n\t\t\tthis.io.emit('message', res);\n\t\t});\n\t}", "function onMessageArrived(message) {\n\tconsole.log(\"onMessageArrived:\"+message.payloadString); \n}", "function receivedMessageRead(event) {\n messageHandler.receivedMessageRead(event);\n }", "handleMessage(message) {\r\n console.log('Received message', message.payloadString);\r\n this.callbacks.forEach((callback) => callback(message));\r\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\r\n console.log(\"onMessageArrived:\" + message.payloadString);\r\n if (message.destinationName == 'State') {\r\n\r\n }\r\n if (message.destinationName == 'Content') {\r\n\r\n }\r\n\r\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.destinationName+\": \"+message.payloadString);\n if (message.destinationName == \"/positionZ\"){\n zpos = map(message.payloadString, 500, 4355, 0, 240);\n sunpos = map(message.payloadString, 0, 255, 0, 240);\n }\n if (message.destinationName == \"/positionX\"){\n xpos = map(message.payloadString, 0, 255, 0, 240);\n }\n console.log(\"onMessageArrived:\"+message.destinationName+\": \"+message.payloadString);\n}", "function onMessageArrived(message) {\r\n Men2Recv=message.payloadString;\r\n console.log(Men2Recv);\r\n accion(Men2Recv);\r\n}", "function handleMessage(event) {\r\n\t\t//console.log('Received message: ' + event.data);\r\n\t\tvar data = JSON.parse(event.data);\r\n\t\thandleReceiveData(data);\r\n\t}", "onMessage( message ) {\n\t\tconsole.log(`Received message from client: ${ message.toString() }`);\n\t}", "function onMessageArrived(message) {\n dotNetReference.invokeMethodAsync(\"OnMessageArrived\", message.payloadString)\n .then(r => console.log(\"onMessageArrived:\" + message.payloadString));\n ;\n }", "_setMessageListener() {\n this.rtm.on(RTM_EVENTS.MESSAGE, (message) => {\n this._processMessage(message);\n });\n }", "onMessageStart() { }", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'pause':\n onPause();\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n}", "onMessage(message) {\n log('received %s', message.type, message)\n this.emit('message', message)\n\n switch (message.type) {\n case 'ack':\n this.in.emit(`ack:${message.id}`, message)\n // No need to send an ack in response to an ack.\n return\n case 'data':\n if (message.data) this.emit('data', message.data)\n break\n default:\n }\n\n // Lets schedule an confirmation.\n this.multiplexer.add({\n type: 'ack',\n id: message.id\n })\n }", "handleMessage(message) {\n console.log('Came to handleMessage in SubscriberLWC. Message: ' + message.textMessage);\n this.receivedMessage = message.textMessage;\n }", "function onCallBack(message){\t\t\n\t\tif(message.body){\n\t\t\tconsole.log('receiving data',message.body);\t\n\t\t\tvar data = message.body\n\t\t\twhenMassegeResieved(JSON.parse(data));\t\n\t\t}else{\n\t\t\tconsole.log('message contain no data');\n\t\t}\t\t\n\t}", "function onMessageArrived(message) {\n \tdisplayMessageConsole(\"Message Recieved: \" + \"\\\"\" + message.payloadString + \"\\\"\" + \" on channel/topic: \" + \"\\\"\" + message.destinationName + \"\\\"\" + \" QoS: \" + \"\\\"\" + message.qos + \"\\\"\");\n }", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'play':\n onPlay();\n break;\n \n case 'pause':\n onPause();\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n}", "_registerMessageListener() {\n this._mav.on('message', (message) => {\n let type = this._mav.getMessageName(message.id);\n\n // Wait for specific message event to get the all the fields.\n this._mav.once(type, (_, fields) => {\n // Emit both events.\n this.emit('message', type, fields);\n let listened = this.emit(type, fields);\n\n // Emit another event if the message was not listened for.\n if (!listened) {\n this.emit('ignored', type, fields);\n }\n });\n });\n }", "function onSocketMessage(event) {\r\n\tappendContent(\"theMessages\", \"Received: \" + event.data + \"<br/>\");\r\n}", "function on_socket_get(message){}", "function onMessageArrived(message) {\n console.log(message.destinationName\t+ \" : \"+message.payloadString);\n if(message.destinationName == house.topics.weather){ update_bed_with_msg(\"weather\",JSON.parse(message.payloadString)); }\n else if(message.destinationName == house.topics.heater){ update_bed_with_msg(\"heater\",message.payloadString); }\n else if(message.destinationName == house.topics.heater_status){ update_bed_with_msg(\"status\",message.payloadString); }\n else if(message.destinationName == house.topics.timer){ update_bed_with_msg(\"timer\",message.payloadString); }\n else if(message.destinationName == house.topics.level){ update_bed_with_msg(\"level\",message.payloadString); }\n else if(message.destinationName == house.topics.relay_status){ update_bed_with_msg(\"relay\",message.payloadString); }\n else if(message.destinationName == house.topics.relay_power){ update_bed_with_msg(\"power\",message.payloadString); }\n}", "function onMessageArrived(message) {\n console.log(message);\n if (message.destinationName == \"LED\") {\n var pesan = message.payloadString;\n pesan = JSON.parse(pesan);\n console.log(pesan);\n\n var newChatItem = $(chatItem);\n newChatItem.find('.username').html(pesan.name);\n newChatItem.find('.message').html(pesan.message);\n }\n listen();\n}", "onClientMessage(message) {\n try {\n // Decode the string to an object\n const { event, payload } = JSON.parse(message);\n\n this.emit(\"message\", event, payload);\n } catch {}\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n EventBus.dispatch(message.destinationName, this, message)\n }", "onMessage(event) {\n try {\n const data = JSON.parse(event.data);\n // data.event is used to lookup which registered listener to call\n this.ee.emit(data.event, data);\n } catch (error) {\n this.ee.emit('error', error);\n }\n }", "function onMessageArrived(message) {\n console.log(message.destinationName, ' -- ', message.payloadString);\n\n if (message.destinationName == \"X\"){\n posX = message.payloadString;\n }\n if (message.destinationName == \"Y\"){\n posY = message.payloadString;\n console.log(message.payloadString);\n }\n if (message.destinationName == \"smile\"){\n heartEyes();\n }\n updateEyes(posX, posY);\n\n}", "messageReceived(message){\n\t\tLogger.info(\"Message received:\");\n\t\tLogger.info(`name: ${message.name}`);\n\t\tLogger.info(`data: ${message.data}`);\n\n\t\tif(!message.name) {\n\t\t\tLogger.warn(\"Message received without a name. Ignoring.\");\n\t\t\treturn null;\n\t\t}\n\n\t\tif(!this[message.name]) {\n\t\t\tLogger.warn(`Message received with name [${message.name}] which is not a method on the MessageClient class.`);\n\t\t\treturn null;\n\t\t}\n\n\t\tthis[message.name](message.data);\n\t}", "_onRecieveMessage() {\n this.client.on(\"data\", data => {\n console.log(data.toString());\n });\n }", "function receive (message) {\n input.send(Message(id, requestUrl, message.toString()));\n }", "function onMessageArrived(message) {\n try{\n let topic = message.destinationName;\n const data = JSON.parse(message.payloadString);\n addData(charts[topic], lists[topic], data.Id, { x: Date.now(), y: data.Value });\n }catch(e){\n // nothing\n }\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "onMessageEnd() { }", "function onMessage(event) {\n\t\tconsole.log('Client socket: Message received: ' + event.data);\n\t\tcastEvent('onMessage', event);\n\t}", "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n }", "onMessage(callback) {\n exports.default.sub.on('message', (channel, message) => callback(channel, JSON.parse(message)));\n }", "SOCKET_ONMESSAGE(state, message) {\n switch (message.type) {\n case \"message\":\n state.messages.push(message.payload);\n break;\n default:\n state.socket.message = message;\n }\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\",message.destinationName,message.payloadString);\n\n if (message.destinationName==\"tkkrlab/spacestate\") {\n var elem = document.getElementById(\"space-status\");\n\tif (message.payloadString==\"1\") {\n\t\telem.innerHTML = \"<span class='open'>open</span>\";\n\t} else if (message.payloadString==\"0\") {\n\t\telem.innerHTML = \"<span class='closed'>gesloten</span>\";\n\t} else {\n\t\telem.innerHTML = \"<span class='unknown'>status onbekend (\"+String(message.payloadString)+\")</span>\";\n\t}\n } else if (message.destinationName==\"test/progress1\") {\n progress[0].animate(Number(message.payloadString/100));\n } else if (message.destinationName==\"test/progress2\") {\n progress[1].animate(Number(message.payloadString/100));\n } else if (message.destinationName==\"chat\") {\n drawChat(message.payloadString);\n } else {\n console.log(\"Message received\",message.destinationName,message.payloadString);\n elem = document.getElementById(\"mqtt-content\");\n elem.innerHTML = \"<div class='item'><strong>\"+message.destinationName+\":</strong> \"+message.payloadString+\"</div>\" + elem.innerHTML;\n }\n}", "received(message) {\n // Called when there's incoming data on the websocket for this channel\n return store.dispatch(addMessage(message));\n\n }", "function onMessageArrived(message) {\n //console.log(message);\n //console.log(message.destinationName);\n \n if (message.destinationName == (\"WebDeliver:\"+userID)) {\n data_bike = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"chemin:\"+userID)) {\n data_chemin = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"map:\"+userID)) {\n //console.log(message.payloadString);\n data_map = JSON.parse(message.payloadString);\n hasMap++;\n }\n if (message.destinationName == (\"client:\"+userID)) {\n data_client = JSON.parse(message.payloadString);\n hasMap++;\n\t}\n\tif (message.destinationName == (\"timeDelivery:\"+userID)) {\n\t\t$(\".info\").removeClass(\"hide\");\n\t\tdata_time = int(JSON.parse(message.payloadString));\n\t\t$(\"#time\").text(data_time);\n\t\tvar timeOrder = setInterval(function (){\n\t\t\tif ($(\"#time\").text() <=1) {\n\t\t\t\tclearInterval(timeOrder);\n\t\t\t\t$(\"#time\").text(\"1\");\n\t\t\t}\n\t\t\t$(\"#time\").text($(\"#time\").text()-1);\n\t\t\t\n\t\t},1000); //toutes les 10 secondes\n hasMap++;\n }\n }", "function onMessageReceived(event) {\n\t // Handle messages from the vimeo player only\n\t if (!(/^https?:\\/\\/player.vimeo.com/).test(event.origin)) {\n\t return false;\n\t }\n\n\t if (playerOrigin === '*') {\n\t playerOrigin = event.origin;\n\t }\n\n\t var data = JSON.parse(event.data);\n\n\t switch (data.event) {\n\t case 'ready':\n\t onReady();\n\t break;\n\n\t case 'finish':\n\t onFinish();\n\t break;\n\t }\n\t }", "handleMessage(message) {\n console.log('lmsDemo2: message received:' + JSON.stringify(message));\n if(message.FromWhom == 'lmsdemo1'){\n this.msgrcvd = message.ValuePass;\n }\n }", "function receivedMessage(data) {\n\tconsole.log('Received:', data);\n\tshowNewMessage(\"other\", data)\n}", "onMessageArrived(topic,message) {\n\t\tlet that = this;\n\t\tlet parts = topic ? topic.split(\"/\") : [];\n if (topic === \"hermod/default/tts/say\") {\n\t\t\tconsole.log('DUMPME')\n\t\t\tconsole.log(this.eventCallbackFunctions);\n\t\t} \n\t\tlet payload = null\n\t\tif (parts.length > 0 && parts[0] === \"hermod\") {\n // Audio Messages pass through message body direct\n if (parts.length > 3 && (parts[2]===\"speaker\"&& parts[3]===\"play\" )) {\n\t\t\t\tpayload = message;\n\t\t\t\tconsole.log('speaker play')\n } else if (parts.length > 3 && (parts[2]===\"microphone\" && parts[3]===\"audio\")) {\n\t\t\t\tpayload = message;\n\t\t\t} else {\n\t\t\t\t// only log non audio\n\t\t\t\t//console.log(['message '+topic,message.toString()]);\n\t\t\t\ttry {\n payload = JSON.parse(message.toString()); \n } catch (e) {\n\t\t\t\t console.log(['JSON PARSE ERROR',message.toString()]);\n\t\t\t\t payload = {}\n }\n console.log(['message payload '+topic,payload]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tlet siteId = parts[1];\n\t\t\tlet callbacks = this.subscriptions[topic];\n\t\t\tif (callbacks) {\n\t\t\t\tfor (var subscriptionId in callbacks) {\n\t\t\t\t\tlet value = callbacks[subscriptionId]\n\t\t\t\t\tvalue.callBack.bind(that)(topic,siteId,payload);\n\t\t\t\t\tif (value.oneOff) {\n\t\t\t\t\t\tthis.removeCallbackById(subscriptionId)\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\t\n\t\n }\n }", "function onMessage(obj) {\n var id = obj.id;\n if (!self._matchesPrefix(id)) {\n debug('discarding unscoped message %s', id);\n return;\n }\n var cb = self._registry.get(id);\n if (cb) {\n process.nextTick(function () {\n debug('received message %s', id);\n // Ensure that the initial callback gets called asynchronously, even\n // for completely synchronous transports (otherwise the number of\n // pending requests will sometimes be inconsistent between stateful and\n // stateless transports).\n cb(null, Buffer.concat(obj.payload), self._adapter);\n });\n }\n }", "function onMessageArrived(message) {\n let receivedMessage = JSON.parse(message.payloadString.toString());\n if(receivedMessage[webPageUrl+'-clientid' ]!=creds.clientID){\n annotateReceivedMessage(receivedMessage); \n }\n $.notify('MQTT: Received:' + message.payloadString, \"info\");\n }", "function messageListener(event) {\r\n //console.log(event.data);\r\n }", "function handleMessage(msg) { // process message asynchronously\n setTimeout(function () {\n messageHandler(msg);\n }, 0);\n }", "messageHandler(self, e) {\n let msg = ( (e.data).match(/^[0-9]+(\\[.+)$/) || [] )[1];\n if( msg != null ) {\n let msg_parsed = JSON.parse(msg);\n let [r, data] = msg_parsed;\n self.socketEventList.forEach(e=>e.run(self, msg_parsed))\n }\n }", "onMessageArrived(message) {\n if (message.destinationName === \"common/reply\") {\n console.log(\"onMessageArrived:\"+message.payloadString, message);\n let s = JSON.parse(message.payloadString);\n let requested = s.requested;\n\n if (requested === \"ping\") {\n let value = s.value;\n this.devices.push(value);\n }\n\n }\n }", "SOCKET_ONMESSAGE(state, message) {\n // console.log(message, \"msgg\")\n state.socket.message = message\n }", "function onMessageArrived(message) {\n //console.log(message.destinationName\t+ \" : \"+message.payloadString);\n graph_text = replace_all(message.payloadString);\n if(message.destinationName.split('/')[0] == z2mqtt_1.value){\n render(\"fdp\");\n }\n else if(message.destinationName.split('/')[0] == z2mqtt_2.value){\n render(\"circo\");\n }\n else{\n render(\"dot\");\n }\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n if(message.destinationName == \"undiknas/ti/kelompok4/sensor/suhu\"){\n addData(myChart, parseFloat(message.payloadString));\n \n \n //konversi ke Fahrenheit\n var celcius = parseFloat(message.payloadString);\n var fahrenheit = (celcius * 9/5) + 32;\n \n $('#data-suhu').html(\"Suhu lingkungan tercatat: \" + celcius.toFixed(2) + \" °C\" + \" atau \" + fahrenheit.toFixed(2) + \"°F\");\n }\n else if(message.destinationName == \"undiknas/ti/kelompok4/relay/state\"){\n var state = (message.payloadString == \"0\") ? \"OFF\" : \"ON\";\n $('#fan-state').html(\"Current State: \" + state); \n }\n }", "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n\n if (message.commandId === undefined || message.commandRes === undefined || message.ok === undefined) {\n console.error('Malformed message', message);\n return;\n }\n\n const stateMessage = state.messages[message.commandId];\n state.messages[message.commandId] = null;\n\n switch (message.commandId) {\n // client -> server events\n case COMMAND_LOGIN:\n case COMMAND_REGISTER:\n case COMMAND_CREATE_ROOM:\n case COMMAND_JOIN_ROOM:\n case COMMAND_MAKE_STAKE:\n case COMMAND_MAKE_MOVE:\n case COMMAND_GET_ROOM:\n console.log('Received message', message);\n\n if (message.ok) {\n stateMessage.resolve(message);\n } else {\n stateMessage.reject(message);\n }\n break;\n // server -> client events\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n case 1004:\n case 1005:\n case 1006:\n case 1007:\n case 1008:\n case 1009:\n case 1010:\n case 1011:\n console.log('Received message', message);\n\n state.roomEvent = message;\n break;\n default:\n console.error('Unknown message commandId', message);\n }\n }", "function onMessageArrived(message) {\n console.log('Message Recieved: Topic: ', message.destinationName, '. Payload: ', message.payloadString, '. QoS: ', message.qos);\n console.log(message);\n var messageTime = new Date().toISOString(); //timestamp primitka pristigle poruke\n var poruka = document.createElement('span'); //kreiranje html elementa sa sadržajem poruke\n poruka.innerHTML = 'Tema: ' + message.destinationName + ' | ' + message.payloadString + '</span><br/>'; \n var messages = document.getElementById(\"messages\"); //dohvaćanje html elementa za prikazivanje poruka\n messages.appendChild(poruka); //dodavanje nove poruke html elementu predviđenom za prikaz pristiglih poruka\n}", "function handleMessage(message) {\n if (message.method === \"msgtoclient\"){\n // notify()\n messages.appendChild(AppendMessage(msgText, GetDate()));\n messages.scrollTop = 9999;\n } \n else return;\n}", "function onMessageArrived(message) {\n var msg = message.payloadString;\n var topic = message.destinationName;\n console.log(\"onMessageArrived(\" + topic + \"):\"+msg);\n\n // response according to topic\n var topicHie = topic.split(\"/\");\n var topicType = topicHie[topicHie.length-1];\n if ( topicType == \"newChat\" ) {\n // chat message\n // append message to chat textarea\n if ( $(\"#findFriendsBtn\").hasClass(\"active\")) {\n var chatwith = topicHie[topicHie.length-2];\n // only update chat text area if the current chat user is the sender\n if ( $(\"#chat_\" + chatwith).hasClass(\"double\") ) {\n $('#chatarea').append('<p class=\"mensagem2 toggle\">'+msg+'</p>');\n scrollTextareaToEnd();\n }\n }\n\n $(\"#findFriendsBtn\").addClass('notify');\n } else if ( topicType == \"addItinerary\" ) {\n // new itinerary\n $(\"#myTripsBtn\").addClass('notify');\n } else if ( topicType == \"updateItinerary\" ) {\n // new itinerary feed/comment\n $(\"#myTripsBtn\").addClass('notify');\n } else if ( topicType == \"addFriend\" ) {\n // is added friend\n $(\"#findFriendsBtn\").addClass('notify');\n }\n\n\n }", "function handleReceiveMessage(event) {\n console.log(event.data);\n}", "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n console.log(\"SOCKET_ONMESSAGE\");\n }", "function onMessageArrived(message) {\n // console.log(\"onMessageArrived: \" + message.payloadString);\n document.getElementById(\"messages\").innerHTML += '<span>' + message.destinationName + ' : ' + message.payloadString + '</span><br/>';\n updateScroll(); // Scroll to bottom of window\n}", "function messageHandler (msg) {\n console.log('Id: ' + msg.messageId + ' Body: ' + msg.data);\n client.complete(msg, printResultFor('completed'));\n}", "function messageHandler (msg) {\n console.log('Id: ' + msg.messageId + ' Body: ' + msg.data);\n client.complete(msg, printResultFor('completed'));\n}", "function onMessage(event) {\n\n\t\tvar msg = JSON.parse(event.data);\n\n\t\tswitch(msg.type) {\n\n\t\tcase 'chat':\n\t\t\tdisplayChatMessage(event);\n\t\t\tbreak;\n\n\t\tcase 'attendeeCount':\n\t\t\tdisplayAttendeeCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'kudosCount':\n\t\t\tdisplayKudosCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'fanCount':\n\t\t\tdisplayFanCount(event);\n\t\t\tbreak;\n\n\t\t}\n\t}", "function recv_pub(message) {\n //some client push data to me, show it! remeber decode it \n //hickey.message_new_handler(jQuery.base64.decode(message.data.data));\n if (hickey.handler.receive_new != null) {\n var data = JSON.parse(message.data.data);\n if (data.push_type == 1 || data.push_type == 2) {\n print_msg('');\n hickey.handler.receive_new(data.push_data);\n } else {\n print_msg(\"receive text:[%d]\" + data.push_data.title, data.push_type);\n }\n }\n try {\n _listener_cometd.publish(channel.push, {\n type: 'affirm',\n device_id: _dev_id,\n msgid: message.data.msgid,\n data: message.data.data\n });\n } catch (e) {\n print_msg(e.message);\n }\n }", "function onMessageArrived(message) {\n // console.log(\"onMessageArrived\");\n // console.log(\"onMessageArrived:\" + message.payloadString);\n\n payload = JSON.parse(message.payloadString);\n\n handleMessage( // in updateDom.js\n JSON.stringify(\n payload.state.desired\n )\n );\n\n\n} // close onMessageArrive", "function onMessage ( event ) {\n // Parse it as Json\n console.log(event);\n let jsonMsg = JSON.parse(event.data);\n\n switch(jsonMsg.type) {\n // If the websocket is just created it sends a connect. After that we want to ask for the username.\n case TYPE_CONNECT_MSG:\n let setWebsocketSessMsg = {\n \"type\": TYPE_SET_WEBSOCKET_SESS_MSG\n };\n wsservice.send(setWebsocketSessMsg);\n\n let enterroommsg = {\n \"type\": TYPE_ENTER_ROOM,\n \"room\": $scope.room\n };\n wsservice.send(enterroommsg);\n break;\n // If the users of the room were updated, set the names\n case TYPE_USERS_ROOM_UPDATED:\n let names = jsonMsg.namesInRoom.split(' ');\n $scope.users = names;\n $scope.$apply();\n break;\n // If it is a message, push it to the messages.\n case TYPE_MESSAGE:\n $scope.messages.push(jsonMsg);\n $scope.$apply();\n break;\n }\n }", "SOCKET_ONMESSAGE (state, message) {\n console.log('Message: ', message)\n if (state.activeChannel.chat_id === message.channel.is_private?message.channel.name:message.channel.chat_id) {\n state.messages.results.push(message)\n } else {\n console.log('another one')\n }\n }", "SOCKET_ONMESSAGE (state, payload) {\n state.socket.message = payload\n }", "_onMessage (msg) {\n const { data, from, topicIDs } = msg\n let key\n try {\n key = topicToKey(topicIDs[0])\n } catch (err) {\n log.error(err)\n return\n }\n\n log(`message received for ${key} topic`)\n\n // Stop if the message is from the peer (it already stored it while publishing to pubsub)\n if (from === this._peerId.toB58String()) {\n log(`message discarded as it is from the same peer`)\n return\n }\n\n if (this._handleSubscriptionKeyFn) {\n this._handleSubscriptionKeyFn(key, (err, res) => {\n if (err) {\n log.error('message discarded by the subscriptionKeyFn')\n return\n }\n\n this._storeIfSubscriptionIsBetter(res, data)\n })\n } else {\n this._storeIfSubscriptionIsBetter(key, data)\n }\n }", "receive(message) {\n this.log(\"Received: \"+message);\n var obj = JSON.parse(message);\n if (\"object\" in obj){\n this.processEvent(obj.object,obj.changes);\n } else if (\"Add\" in obj ) {\n for ( i=0; i< obj.Add.objects.length; i++ ) {\n // this.log(\"adding \"+i+\":\"+obj);\n this.addObject(obj.Add.objects[i]);\n }\n this.log(\"added \"+obj.Add.objects.length+\" scene size \"+this.scene.size);\n } else if (\"Remove\" in obj) {\n for ( var i=0; i< obj.Remove.objects.length; i++ ) {\n this.removeObject(obj.Remove.objects[i]);\n }\n } else if (\"ERROR\" in obj){\n // TODO: error listener(s)\n this.log(obj.ERROR);\n this.errorListeners.forEach((listener)=>listener(obj.ERROR));\n } else if ( \"Welcome\" in obj) {\n var welcome = obj.Welcome;\n if ( ! this.me ) {\n // FIXME: Uncaught TypeError: Cannot assign to read only property of function class\n let client = new User();\n this.me = Object.assign(client,welcome.client.User);\n }\n this.welcomeListeners.forEach((listener)=>listener(welcome));\n if ( welcome.permanents ) {\n welcome.permanents.forEach( o => this.addObject(o));\n }\n } else if ( \"response\" in obj) {\n this.log(\"Response to command\");\n if ( typeof this.responseListener === 'function') {\n var callback = this.responseListener;\n this.responseListener = null;\n callback(obj);\n }\n } else {\n this.log(\"ERROR: unknown message type\");\n }\n }", "function onMessageArrived(message) {\n var data = message.payloadString.split(',');\n var today = new Date();\n var time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();\n console.log(\"onMessageArrived: \" + data[0] + \" and \" +data[1]);\n document.getElementById(\"messages\").innerHTML = '<h3>'+ data[0] +'</h3>';\n document.getElementById(\"messages1\").innerHTML = '<h3>'+ data[1] +'</h3>';\n document.getElementById(\"waktunow\").innerHTML = '<p>'+ date +' '+ time +'</p>';\n sendData(data[0], data[1]);\n addData(time, data[0]);\n addData1(time, data[1]);\n}", "socketMessage(message) {\n\n let msg = JSON.parse(message.data);\n if (!msg.event) throw \"Invalid message format: \" + msg;\n\n switch (msg.event) {\n case 'startApp':\n console.log('Application launched')\n this.viewHandler.onStartApplication();\n break;\n\n case 'appDisconnected':\n console.log('app disconnected');\n\n GlobalVars.reset();\n this.reset();\n break;\n\n case 'bodyJoints':\n this.eventsHandler.onReceiveBodyJoints(msg);\n break;\n }\n }", "function cb_onMessageArrived(message) {\n console.log(\"Message arrived: topic=\" + message.destinationName + \", message=\" + message.payloadString);\n\tvar topic = message.destinationName.split(\"/\");\n\tvar colored_lbg = \"<span style='background-color: LightGray'>\" + topic[0] + \"</span>\"\n\tvar colored_topic = \"<span style='background-color: LightSteelBlue'>\" + topic[1] + \"</span>\"\n\tvar colored_hashid = \"<span style='background-color: Linen'>\" + topic[2] + \"</span>\"\n\tvar payload = message.payloadString.split(\";\");\n\tvar colored_dp = \"<span style='background-color: Linen'>\" + payload[0] + \"</span>\"\n\tvar dt = payload[1].split(\"T\")\n\tdt = dt[0] + ' ' + dt[1].split(\"Z\")[0].split(\".\")[0]\n\t\n\t$('#messages').prepend('<li><span style=\"font-size: 0.8rem\">' + dt + \" - \" + colored_lbg + '/' + colored_topic + '/' + colored_hashid + \": \" + colored_dp + ' ' + payload[2] + '</span></li>');\n}", "function receivedMessage(event) {\n\n console.log(\"RECEIVED MESSAGE\");\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\", \n senderID, recipientID, timeOfMessage);\n //console.log(JSON.stringify(message));\n\n var messageId = message.mid;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n\n if (messageText) {\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding example. Otherwise, just echo\n // the text we received.\n switch (messageText) {\n case 'personalizado':\n sendPersonalMessage(senderID);\n break;\n\n default:\n sendInitialMessage(senderID);\n }\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"Message with attachment received\");\n }\n}", "listen() {\r\n this.client.on('message', message => this.onMessage(message));\r\n }", "function onMessageArrived(message) {\n\n if (message.destinationName == temp_topic) {\n\tg_t.refresh(message.payloadString);\n } \n if (message.destinationName == humidity_topic) {\n\tg_h.refresh(message.payloadString);\n } \n\n if (message.destinationName == light_topic) {\n\tif (message.payloadString == \"on\") {\n\t $scope.light = true;\n\t} else {\n\t $scope.light = false;\n\t} \n\tconsole.log(message.payloadString);\n }\n\n $scope.$apply();\n}", "function receivedMessage(event) {\n if (!event.message.is_echo) {\n var message = event.message;\n var senderId = event.sender.id;\n\n console.log(\"Received message from senderId: \" + senderId);\n console.log(\"Message is: \" + JSON.stringify(message));\n\n // You may get a text or attachment but not both\n if (message.text) {\n var formattedMsg = message.text.toLowerCase().trim();\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding movie detail.\n // Otherwise, search for new movie.\n switch (formattedMsg) {\n case \"hla!\":\n case \"hola!\":\n case \"hi!\":\n case \"hi\":\n case \"hello\":\n case \"hola\":\n sendMessageText(senderId, \"Hola! Gracias por saludarnos\");\n break;\n\n default:\n sendMessageText(senderId, \"Hola! Ahora estamos algo ocupados! Cuéntanos tu duda o consulta. A penas podamos, te responderemos! Que tengas un estupendo día!\");\n }\n } else if (message.attachments) {\n sendMessage(senderId, {text: \"Sorry. No entiendo lo que quieres decir :(\"});\n }\n }\n}", "function messageReceived(m){\n var action = m.action;\n var funcs = subscribed[action] || [];\n for(var i = 0; i < funcs.length; i++) {\n if(funcs[i]) funcs[i](m.data);\n }\n }", "function recieveMessage(msg) {\t\r\n\tconst channel = msg['channel'];\r\n\tif (channel === getCurrentChannel()) {\r\n\t\tdrawMessage(msg);\r\n\t}\r\n}", "function onMessageArrived(message) {\n\t\t \n\t\tvar topic = message.destinationName;\n\t\tvar n = topic.lastIndexOf('/');\n\t\tvar result = topic.substring(n + 1);\n\t\tswitch(result){\n\t\t case \"data\":{\n\t\t\tconsole.log(\"onMessageArrived DATA :\"+message.payloadString);\n\t\t\tvar datamsg = message.payloadString;\n\t\t\tif(temp == '1')\n\t\t\t{\n\t\t\t\twindow.location.href = \"http://localhost/login-system/mqttmsg.php?javasmsg=\"+message.payloadString;\n\t\t\t}\n\t\t\tclient.send(message2);\n\t\t }\n\t\t break;\n\t\t case \"temp\":{\n\t\t\tconsole.log(\"onMessageArrived TEMP :\"+message.payloadString);\n\t\t\ttemp = message.payloadString;\n\t\t }\n\t\t break;\n\t\t default:{\n\t\t\talert(\"wrong topic\");\n\t\t }\n\t\t};\n\t\t \n\t /*console.log(\"onMessageArrived:\"+message.payloadString);\t\t\n\t\tvar datamsg = message.payloadString;\n\t\tif(temp=='1')\n\t\t{\n\t\t\twindow.location.href = \"http://localhost/login-system/mqttmsg.php?javasmsg=\"+message.payloadString;\n\t\t}*/\n\t\t\n\t\t//client.send(message2);\n\t }", "SOCKET_ONMESSAGE (state, message) {\n console.info(state, message)\n }" ]
[ "0.7933765", "0.77630854", "0.77630854", "0.77630854", "0.76885456", "0.76885456", "0.7680746", "0.7617823", "0.7525026", "0.74566025", "0.7440345", "0.7429147", "0.7429147", "0.7409153", "0.739501", "0.73929787", "0.7364344", "0.73325026", "0.7318553", "0.73094666", "0.72703296", "0.72703296", "0.72703296", "0.72703296", "0.72703296", "0.7268989", "0.72546136", "0.72508943", "0.7230424", "0.72280085", "0.7195945", "0.7174864", "0.7155927", "0.71499044", "0.71484363", "0.71363854", "0.7132256", "0.712437", "0.70896924", "0.7058631", "0.7043399", "0.70271766", "0.700294", "0.6986115", "0.6981295", "0.69763064", "0.6970594", "0.6946567", "0.6946028", "0.6926491", "0.6926478", "0.6920033", "0.69165325", "0.69120073", "0.6910899", "0.69067687", "0.6906012", "0.6897214", "0.6890828", "0.6887496", "0.6881589", "0.6880071", "0.68677276", "0.68676656", "0.68638486", "0.68634385", "0.68607175", "0.6852435", "0.6847181", "0.68311894", "0.68267757", "0.68121547", "0.68080425", "0.6807099", "0.6798647", "0.67959374", "0.6774612", "0.67690873", "0.67685884", "0.6767149", "0.6765091", "0.6765091", "0.67645085", "0.6742795", "0.674158", "0.67415184", "0.673562", "0.67315435", "0.6729544", "0.6729313", "0.6726569", "0.67154604", "0.6715435", "0.6702219", "0.6697495", "0.6696877", "0.6685151", "0.6679134", "0.66759527", "0.666668", "0.6662053" ]
0.0
-1
takes wavelength in nm and returns an rgba value adapted from
function wavelengthToColor(wavelength) { var r, g, b, alpha, colorSpace, wl = wavelength, gamma = 1; // UV to indigo: if (wl >= 380 && wl < 440) { R = -1 * (wl - 440) / (440 - 380); G = 0; B = 1; // indigo to blue: } else if (wl >= 440 && wl < 490) { R = 0; G = (wl - 440) / (490 - 440); B = 1; // blue to green: } else if (wl >= 490 && wl < 510) { R = 0; G = 1; B = -1 * (wl - 510) / (510 - 490); // green to yellow: } else if (wl >= 510 && wl < 580) { R = (wl - 510) / (580 - 510); G = 1; B = 0; // yellow to orange: } else if (wl >= 580 && wl < 645) { R = 1; G = -1 * (wl - 645) / (645 - 580); B = 0.0; // orange to red: } else if (wl >= 645 && wl <= 780) { R = 1; G = 0; B = 0; // IR: } else { R = 0; G = 0; B = 0; } // intensity is lower at the edges of the visible spectrum. if (wl > 780 || wl < 380) { alpha = 0; } else if (wl > 700) { alpha = (780 - wl) / (780 - 700); } else if (wl < 420) { alpha = (wl - 380) / (420 - 380); } else { alpha = 1; } // combine it all: colorSpace = "rgba(" + (R * 100) + "%," + (G * 100) + "%," + (B * 100) + "%, " + alpha + ")"; return colorSpace; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wavelengthToColor(wavelength) {\n var r,g,b,alpha,\n colorSpace,\n wl = wavelength,\n gamma = 1;\n \n if (wl >= 380 && wl < 440) {\n R = -1 * (wl - 440) / (440 - 380);\n G = 0;\n B = 1;\n } else if (wl >= 440 && wl < 490) {\n R = 0;\n G = (wl - 440) / (490 - 440);\n B = 1; \n } else if (wl >= 490 && wl < 510) {\n R = 0;\n G = 1;\n B = -1 * (wl - 510) / (510 - 490);\n } else if (wl >= 510 && wl < 580) {\n R = (wl - 510) / (580 - 510);\n G = 1;\n B = 0;\n } else if (wl >= 580 && wl < 645) {\n R = 1;\n G = -1 * (wl - 645) / (645 - 580);\n B = 0.0;\n } else if (wl >= 645) { //if (wl >= 645 && wl <= 780)\n R = 1;\n G = 0;\n B = 0;\n } else {\n R = 1;\n G = 1;\n B = 1;\n }\n \n // intensty is lower at the edges of the visible spectrum.\n if (wl > 780 || wl < 380) {\n alpha = 0;\n } else if (wl > 700) {\n alpha = (780 - wl) / (780 - 700);\n } else if (wl < 420) {\n alpha = (wl - 380) / (420 - 380);\n } else {\n alpha = 1;\n }\n \n // colorSpace = [\"rgba(\" + (R * 100) + \",\" + (G * 100) + \",\" + (B * 100) + \", \" + alpha + \")\", R, G, B, alpha]\n colorSpace = [\"rgb(\" + Math.floor(R * 255) + \",\" + Math.floor(G * 255) + \",\" + Math.floor(B * 255) + \")\", R, G, B, alpha];\n\n return colorSpace;\n}", "function waveLengthToRGB(Wavelength) {\r\n\t\tvar factor;\r\n\t\tvar Red,Green,Blue;\r\n\t\tvar Gamma = 0.80;\r\n\t\tvar IntensityMax = 255;\r\n\t\t/*if((Wavelength >= 380) && (Wavelength<440)){\r\n\t\t\tRed = -(Wavelength - 440) / (440 - 380);\r\n\t\t\tGreen = 0.0;\r\n\t\t\tBlue = 1.0;\r\n\t\t}else*/ \r\n\t\tif((Wavelength >= 380) && (Wavelength<440)){\r\n\t\t\tRed = 0.0;\r\n\t\t\tGreen = 0.0;\r\n\t\t\tBlue = (Wavelength - 380) / (440 - 380);;\r\n\t\t}else if((Wavelength >= 440) && (Wavelength<490)){\r\n\t\t\tRed = 0.0;\r\n\t\t\tGreen = (Wavelength - 440) / (490 - 440);\r\n\t\t\tBlue = 1.0;\r\n\t\t}else if((Wavelength >= 490) && (Wavelength<510)){\r\n\t\t\tRed = 0.0;\r\n\t\t\tGreen = 1.0;\r\n\t\t\tBlue = -(Wavelength - 510) / (510 - 490);\r\n\t\t}else if((Wavelength >= 510) && (Wavelength<580)){\r\n\t\t\tRed = (Wavelength - 510) / (580 - 510);\r\n\t\t\tGreen = 1.0;\r\n\t\t\tBlue = 0.0;\r\n\t\t}else if((Wavelength >= 580) && (Wavelength<645)){\r\n\t\t\tRed = 1.0;\r\n\t\t\tGreen = -(Wavelength - 645) / (645 - 580);\r\n\t\t\tBlue = 0.0;\r\n\t\t}else if((Wavelength >= 645) && (Wavelength<781)){\r\n\t\t\tRed = 1.0;\r\n\t\t\tGreen = 0.0;\r\n\t\t\tBlue = 0.0;\r\n\t\t}else{\r\n\t\t\tRed = 0.0;\r\n\t\t\tGreen = 0.0;\r\n\t\t\tBlue = 0.0;\r\n\t\t}\r\n\r\n\t\t// Let the intensity fall off near the vision limits\r\n\t\tif((Wavelength >= 380) && (Wavelength<420)){\r\n\t\t\tfactor = 0.3 + 0.7*(Wavelength - 380) / (420 - 380);\r\n\t\t}else if((Wavelength >= 420) && (Wavelength<701)){\r\n\t\t\tfactor = 1.0;\r\n\t\t}else if((Wavelength >= 701) && (Wavelength<781)){\r\n\t\t\tfactor = 0.3 + 0.7*(780 - Wavelength) / (780 - 700);\r\n\t\t}else{\r\n\t\t\tfactor = 0.0;\r\n\t\t}\r\n\r\n\r\n\t\tvar rgb =[];\r\n\r\n\t\t// Don't want 0^x = 1 for x <> 0\r\n\t\trgb[0] = (Red==0.0) ? 0 : (Math.round(IntensityMax * Math.pow(Red * factor, Gamma)));\r\n\t\trgb[1] = (Green==0.0) ? 0 : (Math.round(IntensityMax * Math.pow(Green * factor, Gamma)));\r\n\t\trgb[2] = (Blue==0.0) ? 0 : (Math.round(IntensityMax * Math.pow(Blue * factor, Gamma)));\r\n\t\t\r\n\t\t/*if((Wavelength >= 300) && (Wavelength<380)){\r\n\t\t\trgb[0] = 0;\r\n\t\t\trgb[1] = 0;\r\n\t\t\trgb[2] = Math.round((Wavelength - 300) / 80) * 255;\r\n\t\t}*/\r\n\t\t\r\n\t\treturn rgb;\r\n}", "function rgb(wavelength) {\n let k = intensityFactor(wavelength);\n let red;\n let green;\n let blue;\n if (wavelength >= purpleLimit && wavelength < darkblueLimit) {\n red = blendFactor(wavelength, darkblueLimit, purpleLimit);\n green = 0.0;\n blue = 1.0;\n } else if (wavelength >= darkblueLimit && wavelength < blueLimit) {\n red = 0.0;\n green = blendFactorInverted(wavelength, blueLimit, darkblueLimit);\n blue = 1.0;\n } else if (wavelength >= blueLimit && wavelength < greenLimit) {\n red = 0.0;\n green = 1.0;\n blue = blendFactor(wavelength, greenLimit, blueLimit);\n } else if (wavelength >= greenLimit && wavelength < yellowLimit) {\n red = blendFactorInverted(wavelength, yellowLimit, greenLimit);\n green = 1.0;\n blue = 0.0;\n } else if (wavelength >= yellowLimit && wavelength < redLimit) {\n red = 1.0;\n green = blendFactor(wavelength, redLimit, yellowLimit);\n blue = 0.0;\n } else if (wavelength >= redLimit && wavelength <= upperLimit) {\n red = 1.0;\n green = 0.0;\n blue = 0.0;\n } else {\n red = 0.0;\n green = 0.0;\n blue = 0.0;\n }\n\n return {\n red: red > 0 ? 255 * red * k : 0,\n green: green > 0 ? 255 * green * k : 0,\n blue: blue > 0 ? 255 * blue * k : 0\n }\n}", "getColor() {\n var i = (this.speed * 255) / 255;\n var r = Math.round(Math.sin(0.024 * i + 0) * 127 + 128);\n var g = Math.round(Math.sin(0.024 * i + 2) * 127 + 128);\n var b = Math.round(Math.sin(0.024 * i + 4) * 127 + 128);\n var rgb = \"rgb(\" + r + \",\" + g + \",\" + b + \")\";\n\n return rgb;\n }", "function gam_sRGB(v) {\n if (v <= 0.0031308) {\n v *= 12.92;\n } else {\n v = 1.055 * Math.pow(v, 1.0/2.4) - 0.055;\n }\n return Math.round(v*255);\n}", "function getColour(mag) {\n if (mag > 5) {\n return \"#FF4500\"\n } else if (mag > 4) {\n return \"#FF6347\"\n } else if (mag > 3) {\n return \"#FF8C00\"\n } else if (mag > 2) {\n return \"#FF7F50\"\n } else if (mag > 1) {\n return \"#FF6347\"\n } else {\n return \"#FFA500\"\n }\n }", "function getColorFromSpectrum(value) {\n const clampedValue = clamp(value);\n if (.4 <= clampedValue && clampedValue <= 1) {\n const normalizedValue = (clampedValue - 0.4) / 0.6;\n return lerpRGB([248/255, 177/255, 149/255, 1], [240/255, 248/255, 255/255, 1], normalizedValue);\n } else if (.2 <= clampedValue && clampedValue < .4) {\n const normalizedValue = (clampedValue - 0.2) / 0.2;\n return lerpRGB([246/255, 114/255, 128/255, 1], [248/255, 177/255, 149/255, 1], normalizedValue);\n } else if (.1 <= clampedValue && clampedValue < .2) {\n const normalizedValue = (clampedValue - 0.1) / 0.1;\n return lerpRGB([192/255, 108/255, 132/255, 1], [246/255, 114/255, 128/255, 1], normalizedValue);\n } else if (-.1 <= clampedValue && clampedValue < .1) {\n const normalizedValue = (clampedValue + 0.1) / 0.2;\n return lerpRGB([108/255, 91/255, 123/255, 1], [192/255, 108/255, 132/255, 1], normalizedValue);\n } else if (-.2 <= clampedValue && clampedValue < -.1) {\n const normalizedValue = (clampedValue + .2) / 0.1;\n return lerpRGB([53/255, 92/255, 125/255, 1], [108/255, 91/255, 123/255, 1], normalizedValue);\n } else if (-1 <= clampedValue && clampedValue < -0.2) {\n const normalizedValue = (clampedValue + 1) / .8;\n return lerpRGB([25/255, 25/255, 50/255, 1], [53/255, 92/255, 125/255, 1], normalizedValue);\n }\n return [0, 0, 0, 1];\n}", "function get_wave_color(input_color) {\n var c = d3.color(input_color)\n c.opacity = 0.5;\n return c + '';\n}", "get luminance() { return this.hsl[2]; }", "function getColor(magnitude) {\n if (magnitude > 5) {\n return \"#ea2c2c\";\n }\n if (magnitude > 4) {\n return \"#ea822c\";\n }\n if (magnitude > 3) {\n return \"#ee9c00\";\n }\n if (magnitude > 2) {\n return \"#eecc00\";\n }\n if (magnitude > 1) {\n return \"#d4ee00\";\n }\n return \"#98ee00\";\n}", "function getColor(magnitude) {\r\n if (magnitude > 5) {\r\n return \"#ea2c2c\";\r\n }\r\n if (magnitude > 4) {\r\n return \"#ea822c\";\r\n }\r\n if (magnitude > 3) {\r\n return \"#ee9c00\";\r\n }\r\n if (magnitude > 2) {\r\n return \"#eecc00\";\r\n }\r\n if (magnitude > 1) {\r\n return \"#d4ee00\";\r\n }\r\n return \"#98ee00\";\r\n}", "function luminanace (r, g, b) {\n var a = [r, g, b].map(function (v) {\n v /= 255;\n return v <= 0.03928\n ? v / 12.92\n : Math.pow((v + 0.055) / 1.055, 2.4)\n })\n return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;\n}", "function Qcolor(magnitude) {\n if (magnitude >= 5) {\n return \"#990000\";} \n else if (magnitude >= 4 && magnitude <5) {\n return \"#D60000\";} \n else if (magnitude >= 3 && magnitude <4) {\n return \"#FF4848\";} \n else if (magnitude >= 2 && magnitude <3){\n return \"#FFB0B0\";} \n else if (magnitude >= 1 && magnitude <2){\n return \"#FFCACA\"; } \n else if (magnitude < 1){\n return \"#FFE4E4\";} \n }", "function getColor(magnitude) {\n if (magnitude > 5) {\n return \"#ea2c2c\";\n }\n if (magnitude > 4) {\n return \"#ea822c\";\n }\n if (magnitude > 3) {\n return \"#ee9c00\";\n }\n if (magnitude > 2) {\n return \"#eecc00\";\n }\n if (magnitude > 1) {\n return \"#d4ee00\";\n }\n return \"#98ee00\";\n}", "function luminanace(r, g, b) {\n var a = [r, g, b].map(function (v) {\n v /= 255;\n return v <= 0.03928\n ? v / 12.92\n : Math.pow( (v + 0.055) / 1.055, 2.4 );\n });\n return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;\n}", "function chooseColor(magnitude) {\n if (magnitude > 7.9) {\n return '#3f0000';\n }else if (magnitude > 6.9) {\n return '#580000';\n }else if (magnitude > 5.9) {\n return '#720000';\n }else if (magnitude > 4.9) { \n return '#8b0000';\n }else if (magnitude > 3.9) {\n return '#a50000';\n }else if (magnitude > 2.9) {\n return '#be0000';\n }else if (magnitude > 1.9) {\n return '#d80000';\n }else{\n return '#e34c4c';\n }\n}", "function intensityFactor(wavelength) {\n if (wavelength >= purpleLimit && wavelength < 420)\n return 0.3 + 0.7 * (wavelength - purpleLimit) / (420 - purpleLimit);\n else if (wavelength >= 420 && wavelength < 701)\n return 1;\n else if (wavelength >= 701 && wavelength <= redLimit)\n return 0.3 + 0.7 * (redLimit - wavelength) / (redLimit - 700);\n else {\n return 0;\n }\n}", "function rgba(color){\n return [color[0]/255, color[1]/255, color[2]/255, color[3]/100];\n}", "function getColor(magnitude) {\r\n return magnitude >= 5 ? '#e80909' :\r\n magnitude >= 4 ? '#e87909' :\r\n magnitude >= 3 ? '#ffe208' :\r\n magnitude >= 2 ? '#f0ff19' :\r\n magnitude >= 1 ? '#5ce330' :\r\n '#03ff3d';\r\n}", "function getColor(magnitude) {\n if (magnitude > 7) {\n return 'red'\n } else if (magnitude > 6) {\n return 'orange'\n } else if (magnitude > 5) {\n return 'yellow'\n } else if (magnitude > 4) {\n return 'lightgreen'\n } else if (magnitude > 2) {\n return 'green'\n } else {\n return 'blue'\n }\n}", "get rgba() { return [this.r, this.g, this.b, this.a]; }", "function getColor (magnitude){\r\n switch (true){\r\n case magnitude >6:\r\n return \"#581845\"\r\n case magnitude >5:\r\n return \"#900C3F\"\r\n case magnitude >4:\r\n return \"#C70039\"\r\n case magnitude >3:\r\n return \"#FF5733\"\r\n case magnitude >2:\r\n return \"#FFC300\"\r\n case magnitude >1:\r\n return \"#DAF7A6\"\r\n \r\n }\r\n }", "function setColour(pix,r,g,b,a) {\r\n var data = pix.data;\r\n for (var i = 0; i < data.length;i += 4) {\r\n\tif(data[i+3] != 0){\r\n\r\n center = 128;\r\n \t width = 127;\r\n \t frequency = Math.PI*2/120;\r\n\r\n \t r = Math.sin(frequency*time+2) * width + center;\r\n \t g = Math.sin(frequency*time+0) * width + center;\r\n \t b = Math.sin(frequency*time+4) * width + center;\r\n \r\n data[i]= r;\r\n data[i+1] = g;\r\n data[i+2] = b;\r\n data[i+3] = a;\r\n }\r\n }\r\n pix.data = data;\r\n return pix; \r\n}", "get rgba_1() {\n let c = new Color(this.r, this.g, this.b, this.a);\n return [c.r / 255, c.g / 255, c.b / 255, c.a / 255];\n }", "function getColor(magnitude) {\r\n //Condtionals for magnitude \r\n if (magnitude >= 5) {\r\n return \"red\";\r\n }\r\n else if (magnitude >= 4){\r\n return \"peru\";\r\n }\r\n else if (magnitude >= 3) {\r\n return \"darkorange\";\r\n }\r\n else if (magnitude >= 2) {\r\n return \"yellow\";\r\n }\r\n else if (magnitude >= 1) {\r\n return \"yellowgreen\";\r\n }\r\n else {\r\n return \"green\";\r\n }\r\n}", "function color(magnitude){\n\n if (magnitude > 5){\n return 'red'\n } else if (magnitude > 4){\n return 'orange'\n } else if (magnitude > 3){\n return 'yellow'\n } else if (magnitude > 2){\n return 'green'\n } else if (magnitude > 1){\n return 'lightblue'\n } else {\n return 'purple'\n }\n }", "vaxiColor(n) {\n return n >= 100 ? 'hsl(139, 100%, 17%)':\n n > 75 ? 'hsl(139, 100%, 27%)':\n n > 60 ? 'hsl(139, 100%, 32%)':\n n > 50 ? 'hsl(139, 100%, 37%)':\n n > 45 ? 'hsl(139, 100%, 42%)':\n n > 40 ? 'hsl(139, 100%, 47%)':\n n > 35 ? 'hsl(139, 100%, 52%)':\n n > 30 ? 'hsl(139, 100%, 57%)':\n n > 25 ? 'hsl(139, 100%, 62%)':\n n > 20 ? 'hsl(139, 100%, 67%)':\n n > 15 ? 'hsl(139, 100%, 72%)':\n n > 10 ? 'hsl(139, 100%, 77%)':\n n > 5 ? 'hsl(139, 100%, 87%)':\n n > 3 ? 'hsl(139, 100%, 92%)':\n n > 2 ? 'hsl(139, 100%, 95%)':\n n > 1 ? 'hsl(139, 100%, 97%)':\n 'hsl(139, 100%, 99%)';\n }", "function convert255(tone) {\n var curve = [];\n for (var i=0; i < tone.length; i++) {\n curve[i]=128 + Math.round(127 * tone[i]);\n }\n return curve;\n}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n } \n }", "function chooseColor(magnitude) {\n mag = parseFloat(magnitude);\n if (mag >= 5.0 ) {\n return '#922B21';\n } else if (mag >= 4.0 ) {\n return '#D35400';\n } else if (mag >= 3.0 ) {\n return '#EB984E';\n } else if (mag >= 2.0 ) {\n return '#F8C471';\n } else {\n return '#F9E79F';\n }\n}", "function getColor(mag) {\n // Conditionals for magnitude\n if (mag >= 5) {\n return \"#ea2c2c\";\n }\n else if (mag >= 4) {\n return \"#eaa12c\";\n }\n else if (mag >= 3) {\n return \"#eaea2c\";\n }\n else if (mag >= 2) {\n return \"#6fea2c\";\n }\n else if (mag >= 1) {\n return \"#2cdaea\";\n }\n else {\n return \"#a12cea\";\n }\n}", "function rgba(color){\n return [color[0]/255, color[1]/255, color[2]/255, color[3]/100];\n }", "function acp_get_alpha_value_from_color( value ) {\n\tvar alphaVal;\n\n\t// Remove all spaces from the passed in value to help our RGBa regex.\n\tvalue = value.replace( / /g, '' );\n\n\tif ( value.match( /rgba\\(\\d+\\,\\d+\\,\\d+\\,([^\\)]+)\\)/ ) ) {\n\t\talphaVal = parseFloat( value.match( /rgba\\(\\d+\\,\\d+\\,\\d+\\,([^\\)]+)\\)/ )[1] ).toFixed( 2 ) * 100;\n\t\talphaVal = parseInt( alphaVal );\n\t} else {\n\t\talphaVal = 100;\n\t}\n\n\treturn alphaVal;\n}", "function getColorFromSound(oldColor) {\n\t var color = oldColor;\n\t var pitch = detectPitch();\n\t if (pitch) {\n\t var hex = Math.floor(pitch).toString(16);\n\t hex = (\"000\" + hex).substr(-3);\n\t color = new THREE.Color(\"#\" + hex);\n\t\n\t var r = 0.9 * oldColor.r + 0.1 * color.r;\n\t var g = 0.9 * oldColor.g + 0.1 * color.g;\n\t var b = 0.9 * oldColor.b + 0.1 * color.b;\n\t color = new THREE.Color(r / 1.1, g / 1.2, b);\n\t // console.log(color);\n\t }\n\t return color;\n\t}", "function colour(v,type){\n\n\t\t// Colour scales defined by SAOImage\n\t\tif(type==\"blackbody\" || type==\"heat\") return [((v<=127.5) ? v*2 : 255), ((v>63.75) ? ((v<191.25) ? (v-63.75)*2 : 255) : 0), ((v>127.5) ? (v-127.5)*2 : 0)];\n\t\telse if(type==\"A\") return [((v<=63.75) ? 0 : ((v<=127.5) ? (v-63.75)*4 : 255)), ((v<=63.75) ? v*4 : ((v<=127.5) ? (127.5-v)*4 : ((v<191.25) ? 0: (v-191.25)*4))), ((v<31.875) ? 0 : ((v<127.5) ? (v-31.875)*8/3 : ((v < 191.25) ? (191.25-v)*4 : 0)))];\n\t\telse if(type==\"B\") return [((v<=63.75) ? 0 : ((v<=127.5) ? (v-63.75)*4 : 255)), ((v<=127.5) ? 0 : ((v<=191.25) ? (v-127.5)*4 : 255)), ((v<63.75) ? v*4 : ((v<127.5) ? (127.5-v)*4 : ((v<191.25) ? 0 : (v-191.25)*4 ))) ];\n\t\telse{\n\t\t\t// The Planck colour scheme\n\t\t\tvar dv,dr,dg,db,rgb;\n\t\t\t\n\t\t\tif(v < 42){\n\t\t\t\tdv = v/42;\n\t\t\t\trgb = [0,0,255];\n\t\t\t\tdr = 0;\n\t\t\t\tdg = 112;\n\t\t\t\tdb = 0;\n\t\t\t}else if(v >= 42 && v < 85){\n\t\t\t\tdv = (v - 42)/43;\n\t\t\t\trgb = [0,112,255];\n\t\t\t\tdr = 0;\n\t\t\t\tdg = 109;\n\t\t\t\tdb = 0;\n\t\t\t}else if(v >= 85 && v < 127){\n\t\t\t\tdv = (v - 85)/42;\n\t\t\t\trgb = [0,221,255];\n\t\t\t\tdr = 255;\n\t\t\t\tdg = 16;\n\t\t\t\tdb = -38;\n\t\t\t}else if(v >= 127 && v < 170){\n\t\t\t\tdv = (v - 127)/43;\n\t\t\t\trgb = [255,237,217];\n\t\t\t\tdr = 0;\n\t\t\t\tdg = -57;\n\t\t\t\tdb = -217;\n\t\t\t}else if(v >= 170 && v < 212){\n\t\t\t\tdv = (v-170)/42;\n\t\t\t\trgb = [255,180,0];\n\t\t\t\tdr = 0;\n\t\t\t\tdg = -105;\n\t\t\t\tdb = 0;\n\t\t\t}else if(v >= 212){\n\t\t\t\tdv = (v-212)/43;\n\t\t\t\trgb = [255,75,0];\n\t\t\t\tdr = -155;\n\t\t\t\tdg = -75;\n\t\t\t\tdb = 0;\n\t\t\t}\n\t\t\treturn [Math.round(rgb[0] + dv*dr), Math.round(rgb[1] + dv*dg), Math.round(rgb[2] + dv*db)];\n\t\t}\n\t}", "function setColor(magnitude) {\n \tif (magnitude > 5) {\n \treturn '#FF0000'\n \t} else if (magnitude > 4) {\n \treturn '#FF7C00'\n \t} else if (magnitude > 3) {\n \treturn '#FFBE00'\n \t} else if (magnitude > 2) {\n \treturn '#FFF500'\n \t} else if (magnitude > 1) {\n \treturn '#AEFF00'\n \t} else {\n \treturn '#39FF00'\n \t}\n}", "get ASTC_RGBA_10x10() {}", "toColorLAB(){\n const rgb = [this.r, this.g, this.b].map((c) => {\n let color = c / 255;\n color = color > 0.04045 ? ((color + 0.055) / 1.055) ** 2.4 : color / 12.92;\n return color * 100;\n });\n const [xyzR,xyzG,xyzB] = rgb;\n const x = (xyzR * 0.4124 + xyzG * 0.3576 + xyzB * 0.1805) * 0.95047;\n const y = (xyzR * 0.2126 + xyzG * 0.7152 + xyzB * 0.0722) * 1;\n const z = (xyzR * 0.0193 + xyzG * 0.1192 + xyzB * 0.9505) * 1.08883;\n \n const labxyz = [x,y,z].map((c)=>{\n let color = c/100;\n return color > 0.008856 ? color ** (1/3) : (color * 7.787) + (16 /116);\n });\n \n const [labX, labY, labZ] = labxyz;\n const l = (labY * 116) - 16;\n const a = (labX - labY) * 500;\n const b = (labY - labZ) * 200;\n \n return new ColorLAB(l,a,b);\n }", "function getColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#ea2c2c\";\r\n case magnitude > 4:\r\n return \"#ea822c\";\r\n case magnitude > 3:\r\n return \"#ee9c00\";\r\n case magnitude > 2:\r\n return \"#eecc00\";\r\n case magnitude > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "getColor(value) {\n // Test Max\n if (value === 255) {\n console.log(\"MAX!\");\n }\n let percent = (value) / 255 * 50;\n // return 'rgb(V, V, V)'.replace(/V/g, 255 - value);\n return 'hsl(H, 100%, P%)'.replace(/H/g, 255 - value).replace(/P/g, percent);\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#581845\";\n case magnitude > 4:\n return \"#900C3F\";\n case magnitude > 3:\n return \"#C70039\";\n case magnitude > 2:\n return \"#FF5733\";\n case magnitude > 1:\n return \"#FFC300\";\n default:\n return \"#DAF7A6\";\n }\n }", "function wl_color(d) {\n\tvar encoding, color_angle;\n\n\tif (d[season+\"Win\"] > d[season+\"Loss\"]) {\n color_angle = 120; // Green\n\t\tencoding = d[season+\"Win\"]/d[season+\"Loss\"]*15;\n\t\tif (encoding > 100) encoding = 100;\n\t}\n\telse {\n color_angle = 0; // Red\n\t\tencoding = d[season+\"Loss\"]/d[season+\"Win\"]*15;\n\t\tif (encoding > 100) encoding = 100;\n\t}\n return hsv_to_hex(color_angle, encoding, 100);\n}", "get RGBAHalf() {}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function earthQuakeColor (mag){\n if (mag>90)\n return \"purple\"\n if (mag>70)\n return \"DarkRed\"\n else if (mag>50)\n return \"OrangeRed\"\n else if (mag>30)\n return \"Gold\"\n else if (mag>10)\n return \"GreenYellow\"\n else \n return \"Green\"\n}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function getColor(magnitude) {\r\n switch (true) {\r\n case magnitude > 5:\r\n return \"#ea2c2c\";\r\n case magnitude > 4:\r\n return \"#ea822c\";\r\n case magnitude > 3:\r\n return \"#ee9c00\";\r\n case magnitude > 2:\r\n return \"#eecc00\";\r\n case magnitude > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n }", "function luminance(r, g, b) {\n let a = [r, g, b].map((v) => {\n v /= 255;\n return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n });\n return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;\n}", "decodeColor(){\n return this.colors[ this.extractBinaryNumber(this.hasAlpha ? 3 : 2) ];\n }", "function getColor(magnitude) {\n switch (true) {\n case magnitude < 1:\n return \"#fed976\";\n case magnitude < 2:\n return \"#feb24c\";\n case magnitude < 3:\n return \"#fd8d3c\";\n case magnitude < 4:\n return \"#fc4e2a\";\n case magnitude < 5:\n return \"#e31a1c\";\n default:\n return \"#b10026\";\n }\n}", "function RgbToHsv(a,e,i){var c=Math.min(a,e,i),j=Math.max(a,e,i),l=j-c,d,m,k=j;k=Math.floor(j/255*100);if(j==0){return[0,0,0]}m=Math.floor(l/j*100);var f=l==0?1:l;if(a==j){d=(e-i)/f}else{if(e==j){d=2+(i-a)/f}else{d=4+(a-e)/f}}d=Math.floor(d*60);if(d<0){d+=360}return{h:d,s:m,v:k}}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"#ea2c2c\";\n case magnitude > 4:\n return \"#ea822c\";\n case magnitude > 3:\n return \"#ee9c00\";\n case magnitude > 2:\n return \"#eecc00\";\n case magnitude > 1:\n return \"#d4ee00\";\n default:\n return \"#98ee00\";\n }\n}", "function magnitudeColor(depth) {\n switch (true) {\n case (depth >= 90):\n return \"#ff0000\";\n case (depth > 70):\n return \"#ff8000\";\n case (depth > 50):\n return \"#ffbf00\";\n case (depth > 30):\n return \"#ffff00\";\n case (depth > 10):\n return \"#bfff00\";\n case (depth > -10):\n return \"#66ff8c\";\n \n }\n\n}", "function inv_gam_sRGB(ic) {\n var c = ic/255;\n //todo: could break if comparing big number\n if (c <= 0.04045) {\n return c/12.92;\n } else {\n return Math.pow(((c+0.044)/(1.055)), 2.4);\n }\n}", "function colourNameToRGB(colourName) {\n\n}", "function intToRGBA(i) {\n var rgba = {};\n rgba.r = Math.floor(i / Math.pow(256, 3));\n rgba.g = Math.floor((i - rgba.r * Math.pow(256, 3)) / Math.pow(256, 2));\n rgba.b = Math.floor((i - rgba.r * Math.pow(256, 3) - rgba.g * Math.pow(256, 2)) / Math.pow(256, 1));\n rgba.a = Math.floor((i - rgba.r * Math.pow(256, 3) - rgba.g * Math.pow(256, 2) - rgba.b * Math.pow(256, 1)) / Math.pow(256, 0));\n return rgba;\n}", "function getColor (magnitude) {\n switch (true) {\n case magnitude > 5:\n return '#f54242'\n case magnitude > 4:\n return '#b942f5'\n case magnitude > 3:\n return '#42cef5'\n case magnitude > 2:\n return '#84f542'\n case magnitude > 1:\n return '#f5e342'\n default:\n return '#f54242'\n }\n }", "calcRGB() {\r\n let h = this.h/360;\r\n let s = this.s/100;\r\n let l = this.l/100;\r\n let r, g, b;\r\n if (s == 0){\r\n r = g = b = l; // achromatic\r\n } else {\r\n let q = l < 0.5 ? l * (1 + s) : l + s - l * s;\r\n let p = 2 * l - q;\r\n r = this.hue2rgb(p, q, h + 1/3);\r\n g = this.hue2rgb(p, q, h);\r\n b = this.hue2rgb(p, q, h - 1/3);\r\n }\r\n this._r = Math.round(r * 255); \r\n this._g = Math.round(g * 255); \r\n this._b = Math.round(b * 255);\r\n }", "function rgbToOpacity(rgb) {\n\t\t\tvar rgbOpacity = '';\n\t\t\tvar rgbArr = rgbToArr(rgb);\n\t\t\tif (rgbArr.length == 4) {\n\t\t\t\trgbOpacity = rgbArr[3];\n\t\t\t\t// 小数点2桁まで表示\n\t\t\t\trgbOpacity = Math.round(rgbOpacity * 100) / 100;\n\t\t\t} else {\n\t\t\t\trgbOpacity = '1';\n\t\t\t}\n\t\t\treturn rgbOpacity;\n\t\t}", "function depthColor(magnitude) {\r\n if (magnitude <= 10) {\r\n return \"#a7fb09\"\r\n } else if (magnitude <= 30) {\r\n return \"#dcf900\"\r\n } else if (magnitude <= 50) {\r\n return \"#f6de1a\"\r\n } else if (magnitude <= 70) {\r\n return \"#fbb92e\"\r\n } else if (magnitude <= 90) {\r\n return \"#faa35f\"\r\n } else {\r\n return \"#ff5967\"\r\n }\r\n}", "function magColor(mag) {\n var color = \"\";\n if (mag <= 2) { color = \"#006633\"; }\n else if (mag <= 3) {color = \"#99CC00\"; }\n else if (mag <= 4) { color = \"#FFFF00\"; }\n else if (mag <= 5) {color = \"#FF6600\"; }\n else { color = \"#006633\"; }\n \n return color;\n \n }", "function getColor(mag) {\r\n switch (true) {\r\n case mag > 5:\r\n return \"#FF0000\";\r\n case mag > 4:\r\n return \"#ff9933\";\r\n case mag > 3:\r\n return \"#ffcc00\";\r\n case mag > 2:\r\n return \"#ccff33\";\r\n case mag > 1:\r\n return \"#d4ee00\";\r\n default:\r\n return \"#98ee00\";\r\n }\r\n }", "function magnitudeColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return \"brown\";\n case magnitude > 4:\n return \"red\";\n case magnitude > 3:\n return \"orange\";\n case magnitude > 2:\n return \"yellow\";\n case magnitude > 1:\n return \"green\";\n default:\n return \"lightgreen\";\n }\n }", "set ASTC_RGBA_10x10(value) {}", "function colorTemperatureToRGB(kelvin) {\n var temp = kelvin / 1;\n var red, green, blue;\n\n if (temp <= 66) {\n red = 255;\n green = temp;\n green = 99.4708025861 * Math.log(green) - 161.1195681661;\n\n if (temp <= 19) {\n blue = 0;\n } else {\n blue = temp - 10;\n blue = 138.5177312231 * Math.log(blue) - 305.0447927307;\n }\n } else {\n red = temp - 60;\n red = 329.698727446 * Math.pow(red, -0.1332047592);\n green = temp - 60;\n green = 288.1221695283 * Math.pow(green, -0.0755148492);\n blue = 255;\n }\n\n return {\n r: Math.round(clamp(red, 0, 255)),\n g: Math.round(clamp(green, 0, 255)),\n b: Math.round(clamp(blue, 0, 255))\n }\n}", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 5:\n return '#d62727';\n case magnitude > 4:\n return '#e37c27';\n case magnitude > 3:\n return '#f2a30c';\n case magnitude > 2:\n return '#ebca09';\n case magnitude > 1:\n return '#d0e809';\n default:\n return '#96e805';\n }\n }", "get ATC_RGBA8() {}", "get colorValue() {}", "function getQuakeColor(magnitude){\n \n if (magnitude < 1) {\n return \"#fff246\";\n }\n else if (magnitude < 2) {\n return \"#a3d76e\";\n }\n else if (magnitude < 3) {\n return \"#00b7a3\";\n }\n else if (magnitude < 4) {\n return \"#32bbff\";\n }\n else if (magnitude < 5) {\n return \"#4e5ecf\";\n }\n else {\n return \"#b714e0\";\n }\n}", "function getColor(d) {\n var magnitude = +d;\n switch (true) {\n case (magnitude <= 1):\n return '#00FF00';\n case (magnitude > 1 && magnitude <= 2):\n return '#ADFF2F';\n case (magnitude > 2 && magnitude <= 3):\n return '#FFFF00';\n case (magnitude > 3 && magnitude <= 4):\n return '#F4A460';\n case (magnitude > 4 && magnitude <= 5):\n return '#FF8C00';\n default:\n return '#FF4500';\n }\n}", "get saturation() { return this.hsl[1]; }", "get ETC2_RGBA8() {}", "set ASTC_RGB_12x12(value) {}", "function RGB_HSV(r,g,b){r/=255;g/=255;b/=255;var n=Math.min(Math.min(r,g),b);var v=Math.max(Math.max(r,g),b);var m=v-n;if(m===0){return[null,0,100*v];}var h=r===n?3+(b-g)/m:g===n?5+(r-b)/m:1+(g-r)/m;return[60*(h===6?0:h),100*(m/v),100*v];}// h: 0-360", "function luminanace(r, g, b) {\n var a = [r, g, b].map(function (v) {\n v /= 255;\n return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n });\n return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;\n} //calculate contrast between two rgb colors", "function getColor(magnitude) {\n switch (true) {\n case magnitude > 6:\n return \"purple\";\n case magnitude > 5:\n return \"maroon\";\n case magnitude > 4:\n return \"red\";\n case magnitude > 3:\n return \"darkorange\";\n case magnitude > 2:\n return \"yellow\";\n case magnitude > 1:\n return \"lime\";\n default:\n return \"green\";\n }\n }", "function rgb2lab(rgb){\n let r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255, x, y, z;\n r = (r > 0.04045) ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;\n g = (g > 0.04045) ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;\n b = (b > 0.04045) ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;\n x = (r * 0.4124 + g * 0.3576 + b * 0.1805) / 0.95047;\n y = (r * 0.2126 + g * 0.7152 + b * 0.0722) / 1.00000;\n z = (r * 0.0193 + g * 0.1192 + b * 0.9505) / 1.08883;\n x = (x > 0.008856) ? Math.pow(x, 1/3) : (7.787 * x) + 16/116;\n y = (y > 0.008856) ? Math.pow(y, 1/3) : (7.787 * y) + 16/116;\n z = (z > 0.008856) ? Math.pow(z, 1/3) : (7.787 * z) + 16/116;\n return [(116 * y) - 16, 500 * (x - y), 200 * (y - z)]\n }", "get ASTC_RGBA_12x12() {}", "get ASTC_RGB_12x12() {}", "get ETC_RGB4() {}", "get ETC2_RGB4_PUNCHTHROUGH_ALPHA() {}", "function colorMagnitude(color) {\n var r = (color & 0xFF0000) >>> 16;\n var g = (color & 0x00FF00) >>> 8;\n var b = (color & 0x0000FF);\n return (r+g+b) / (3*0xFF);\n}", "function getColor(num) {\n // console.log(num);\n const r = Math.min(Math.max(0,20*num),255);\n const g = Math.min(Math.max(0,255-20*num),255);\n const b = Math.min(Math.max(0,255 - num*num),255);\n return `rgba(${r},${g},${b},1)`\n}", "function tone(n) {\n return Math.pow(Math.pow(2, 1 / 12), n - 49) * 440;\n}", "function normaliseForRGB(x) {\n return x * 100 % 255;\n}", "asRGB(ao) {\r\n return \"rgba(\" + this.r + \",\" + this.g + \",\" + this.b + \",\" + ((ao == undefined) ? this.a : ao) + \")\";\r\n }", "function hsla(hue, saturation, lightness, alpha) {\n return `hsla(${(hue % 360).toFixed()}, ${guard(0, 100, saturation * 100).toFixed()}%, ${guard(0, 100, lightness * 100).toFixed()}%, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}", "function colorTemperature2rgb (kelvin) {\n\n\tvar temperature = kelvin / 100.0;\n\tvar red, green, blue;\n\n\tif (temperature < 66.0) {\n\t\tred = 255;\n\t} else {\n\t\t// a + b x + c Log[x] /.\n\t\t// {a -> 351.97690566805693`,\n\t\t// b -> 0.114206453784165`,\n\t\t// c -> -40.25366309332127\n\t\t//x -> (kelvin/100) - 55}\n\t\tred = temperature - 55.0;\n\t\tred = 351.97690566805693+ 0.114206453784165 * red - 40.25366309332127 * Math.log(red);\n\t\tif (red < 0) red = 0;\n\t\tif (red > 255) red = 255;\n\t}\n\n\t/* Calculate green */\n\n\tif (temperature < 66.0) {\n\n\t\t// a + b x + c Log[x] /.\n\t\t// {a -> -155.25485562709179`,\n\t\t// b -> -0.44596950469579133`,\n\t\t// c -> 104.49216199393888`,\n\t\t// x -> (kelvin/100) - 2}\n\t\tgreen = temperature - 2;\n\t\tgreen = -155.25485562709179 - 0.44596950469579133 * green + 104.49216199393888 * Math.log(green);\n\t\tif (green < 0) green = 0;\n\t\tif (green > 255) green = 255;\n\n\t} else {\n\n\t\t// a + b x + c Log[x] /.\n\t\t// {a -> 325.4494125711974`,\n\t\t// b -> 0.07943456536662342`,\n\t\t// c -> -28.0852963507957`,\n\t\t// x -> (kelvin/100) - 50}\n\t\tgreen = temperature - 50.0;\n\t\tgreen = 325.4494125711974 + 0.07943456536662342 * green - 28.0852963507957 * Math.log(green);\n\t\tif (green < 0) green = 0;\n\t\tif (green > 255) green = 255;\n\n\t}\n\n\t/* Calculate blue */\n\n\tif (temperature >= 66.0) {\n\t\tblue = 255;\n\t} else {\n\n\t\tif (temperature <= 20.0) {\n\t\t\tblue = 0;\n\t\t} else {\n\n\t\t\t// a + b x + c Log[x] /.\n\t\t\t// {a -> -254.76935184120902`,\n\t\t\t// b -> 0.8274096064007395`,\n\t\t\t// c -> 115.67994401066147`,\n\t\t\t// x -> kelvin/100 - 10}\n\t\t\tblue = temperature - 10;\n\t\t\tblue = -254.76935184120902 + 0.8274096064007395 * blue + 115.67994401066147 * Math.log(blue);\n\t\t\tif (blue < 0) blue = 0;\n\t\t\tif (blue > 255) blue = 255;\n\t\t}\n\t}\n\n\treturn {red: Math.round(red), blue: Math.round(blue), green: Math.round(green)};\n}", "function Get_ColorRGBA(strColor)\n{\n\t//now get the numbers\n\tvar alpha = strColor.substr(1, 2);\n\tvar red = strColor.substr(3, 2);\n\tvar green = strColor.substr(5, 2);\n\tvar blue = strColor.substr(7, 2);\n\t//convert them to numbers\n\talpha = parseInt(alpha, 16);\n\tred = parseInt(red, 16);\n\tgreen = parseInt(green, 16);\n\tblue = parseInt(blue, 16);\n\t//convert alpha to percentage\n\talpha = Math.round(alpha / 255 * 100) / 100;\n\t//and finally return our rgba\n\treturn \"rgba(\" + red + \",\" + green + \",\" + blue + \",\" + alpha + \")\";\n}", "function getColor(mag) {\n return mag >= 5 ? \"#EA2C2C\" : \n mag >= 4? \"#EA822C\" :\n mag >= 3? \"#EE9C00\" :\n mag > 2? \"#EECC00\" :\n mag > 1? \"#D4EE00\" :\n \"#98EE00\";\n}", "function getColor(value, scale, reverse = false) {\n var color;\n var offset;\n if (reverse) {\n scale = 1-scale;\n }\n color = { r: 255, g: 255, b: 255 };\n if (value > 0) {\n color = { r: Math.round(255-(255-153)*scale), g: Math.round(255-(255-153)*scale), b: Math.round(255-(255-153)*scale) }; //gray\n }\n return color;\n}", "function markerColor(magnitude) {\n if (magnitude < 0) {\n return \"#9ACD32\"\n }\n else if (magnitude <1) {\n return \"#FFFF00\"\n }\n else if (magnitude < 2) {\n return \"#FFA500\"\n }\n else if (magnitude < 3) {\n return \"#FFD700\"\n }\n else if (magnitude < 4) {\n return \"#FF8C00\"\n }\n else if (magnitude < 5) {\n return \"#FF4500\"\n }\n else {\n return \"#FFD700\"\n }\n }", "set ATC_RGBA8(value) {}", "function greyScaledMap(noiseval) {\n let greyval = Math.round(noiseval * 255);\n return 'rgb(' + greyval + ',' + greyval + ',' + greyval + ')';\n }", "function markerColor(magnitude) {\n if (magnitude > 4) {\n return '#ff3300'\n } else if (magnitude > 3) {\n return '#ff9900'\n } else if (magnitude > 2) {\n return '#ffff00'\n } else if (magnitude > 1) {\n return '#ccff33'\n } else {\n return '#339933'\n }\n}", "function ColorTemperatureToRGB(rgb, kelvin) {\n if (kelvin < 1000.0) {\n kelvin = 1000.0;\n } else if (kelvin > 15000.0) {\n kelvin = 15000.0;\n } // Approximate Planckian locus in CIE 1960 UCS\n\n\n const kSqr = kelvin * kelvin;\n const u = (0.860117757 + 1.54118254e-4 * kelvin + 1.28641212e-7 * kSqr) / (1.0 + 8.42420235e-4 * kelvin + 7.08145163e-7 * kSqr);\n const v = (0.317398726 + 4.22806245e-5 * kelvin + 4.20481691e-8 * kSqr) / (1.0 - 2.89741816e-5 * kelvin + 1.61456053e-7 * kSqr);\n const d = 2.0 * u - 8.0 * v + 4.0;\n const x = 3.0 * u / d;\n const y = 2.0 * v / d;\n const z = 1.0 - x - y;\n const X = 1.0 / y * x;\n const Z = 1.0 / y * z; // XYZ to RGB with BT.709 primaries\n\n rgb.x = 3.2404542 * X + -1.5371385 + -0.4985314 * Z;\n rgb.y = -0.9692660 * X + 1.8760108 + 0.0415560 * Z;\n rgb.z = 0.0556434 * X + -0.2040259 + 1.0572252 * Z;\n }", "get PVRTC_RGBA2() {}", "get ASTC_RGB_10x10() {}" ]
[ "0.7833795", "0.7622385", "0.6670089", "0.6535967", "0.64636475", "0.6079295", "0.60789424", "0.6070874", "0.6065623", "0.5981613", "0.5977258", "0.5961137", "0.59331894", "0.5919916", "0.5916034", "0.5853928", "0.58256084", "0.5820887", "0.58110523", "0.57610303", "0.57149327", "0.5702279", "0.57015556", "0.56922734", "0.56921774", "0.5685101", "0.56797624", "0.5668727", "0.5663298", "0.5655424", "0.5655302", "0.56544465", "0.5652584", "0.56499976", "0.5642805", "0.5642104", "0.5624111", "0.56222415", "0.56189024", "0.561842", "0.56169116", "0.56169116", "0.5615242", "0.5609048", "0.560341", "0.5598619", "0.55939823", "0.55874103", "0.5584226", "0.556702", "0.5564044", "0.5562558", "0.5550898", "0.5541033", "0.553999", "0.55345887", "0.55256754", "0.5521419", "0.5520522", "0.5513466", "0.55066115", "0.54995066", "0.54990935", "0.5496228", "0.5494899", "0.54925483", "0.548213", "0.5476052", "0.5472939", "0.54686326", "0.5462772", "0.546079", "0.5460668", "0.54524076", "0.54522586", "0.54517233", "0.5450912", "0.54497355", "0.5449355", "0.54484355", "0.5447883", "0.5441425", "0.54369444", "0.5436368", "0.5435177", "0.5429771", "0.54290706", "0.54204106", "0.5416746", "0.53966606", "0.53914547", "0.53878695", "0.5387399", "0.53866845", "0.5378894", "0.53784317", "0.53755283", "0.53740835", "0.5372288", "0.53721726" ]
0.7809527
1
Wait for the required DOM to be rendered
async function scrapeCurrentPage() { await page.waitForSelector('.product-image'); // Get the link to all the required products let urls = await page.$$eval('.col-12 > section .col-6', links => { links = links.map(el => el.querySelector('.product-card > a').href) return links; }); // Loop through each of those links, open a new page instance and get the relevant data from them var count = 0 let pagePromise = (link) => new Promise(async (resolve, reject) => { let dataObj = {}; let newPage = await browser.newPage(); await newPage.goto(link); dataObj['productTitle'] = await newPage.$eval('.position-relative > h1', text => text.textContent); dataObj['productPriceFinal'] = await newPage.$eval('.product-price-final', text => text.textContent); dataObj['productPriceDiscount'] = await newPage.$eval('.product-price-discount', (text) => text.textContent).catch(() => dataObj['productPriceFinal']) dataObj['productIimageUrl'] = await newPage.$eval('.product-gallery img', img => img.src); dataObj['productDescription'] = await newPage.$eval('.product-description-item p', p => p.textContent); dataObj['productLine'] = category; resolve(dataObj); await newPage.close(); }); for (link in urls) { let currentPageData = await pagePromise(urls[link]); scrapedData.push(currentPageData); } // When all the data on this page is done, click the next button and start the scraping of the next page // You are going to check if this button exist first, so you know if there really is a next page. let hyperlink_next = await page.$$eval('.paginate', links => { links = links.map(el => el.querySelector('.paginate__item--next > a').href) return links; }); let pageOfNext = [...new Set(hyperlink_next)].toString().replace(/\D/gim, ''); if (pageOfNext > countPage) { countPage++ console.log('entrou no botão next') await page.$$eval('.paginate', links => { links = links.map(el => el.querySelector('.paginate__item--next > a').click()) return links; }); return scrapeCurrentPage(); // Call this function recursively } await page.close(); return scrapedData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async waitForPageToLoad(elementSelector) {\n browser.maximizeWindow();\n const selector = await $(elementSelector);\n await selector.waitForDisplayed();\n const isDisplayed = await selector.isDisplayed();\n if (!isDisplayed) {\n return await $(elementSelector).waitForDisplayed();\n }\n }", "function waitForRender() {\n var deferredRender = $q.defer();\n function wait() {\n if($element.find(\"table:visible\").length === 0) {\n $timeout(wait, 100);\n } else {\n deferredRender.resolve();\n }\n }\n $timeout(wait);\n return deferredRender.promise;\n }", "waitUntilDisplayed() {\n this.checkSelectorExist();\n\n return browser.wait(\n () => this.isDisplayed(),\n this.waitUntilDisplayedTimeout,\n `Failed while waiting for \"${this.selector.locator()}\" of Page Object Class '${this.constructor.name}' to display.`,\n );\n }", "waitForPageToLoad() {\n this.errorPageTitle.waitForElementToRender();\n this.errorPageStackTraceLink.waitForElementToRender();\n this.errorPageComponentTreeLink.waitForElementToRender();\n this.errorPageScopedVariablesLink.waitForElementToRender();\n }", "onDOMReady() {\n return new Promise(resolve => {\n if (document.readyState !== 'loading') {\n resolve()\n } else {\n document.addEventListener('DOMContentLoaded', resolve)\n }\n })\n }", "static async whenShadowDOMReady() {\n\t\tconst undefinedElements = this.getNotDefinedComponents();\n\n\t\tconst definedPromises = undefinedElements.map(\n\t\t el => customElements.whenDefined(el.localName)\n\t\t);\n\t\tconst timeoutPromise = new Promise(resolve => setTimeout(resolve, 5000));\n\n\t\tawait Promise.race([Promise.all(definedPromises), timeoutPromise]);\n\t\tconst stillUndefined = this.getNotDefinedComponents();\n\t\tif (stillUndefined.length) {\n\t\t\t// eslint-disable-next-line\n\t\t\tconsole.warn(\"undefined elements after 5 seconds are: \" + [...stillUndefined].map(el => el.localName).join(\" ; \"));\n\t\t}\n\n\t\treturn Promise.resolve();\n\t}", "onDOMReady () {\n\n // Draw a container first\n this.drawContainer(this.container);\n\n // Wait for listings to resolve\n this.listingsPromise.then(listings => {\n\n const\n arrangedListings = this.arrangeListings(listings),\n unfitListings = listings.filter(listing => !arrangedListings.includes(listing));\n\n // Draw arranged listings\n this.renderListings(arrangedListings);\n\n // Draw listings that did not fit\n this.renderUnfitListings(unfitListings);\n\n });\n\n }", "function waitForDOM(done) {\n window.setTimeout(function() {\n expect(window.alert).not.toHaveBeenCalled();\n done();\n }, 500);\n }", "static whenDOMUpdated() {\n\t\tif (renderTaskPromise) {\n\t\t\treturn renderTaskPromise;\n\t\t}\n\n\t\trenderTaskPromise = new Promise(resolve => {\n\t\t\trenderTaskPromiseResolve = resolve;\n\t\t\twindow.requestAnimationFrame(() => {\n\t\t\t\tif (invalidatedWebComponents.getList().length === 0) {\n\t\t\t\t\trenderTaskPromise = undefined;\n\t\t\t\t\tresolve();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn renderTaskPromise;\n\t}", "static WaitForFilteringToLoad() {\n browser.waitForExist(selectors.filterpanelStructure.filterPanelContent, 15000);\n browser.waitForExist(selectors.filterpanelStructure.filterPanelHeading, 15000);\n }", "waitLoadingComplete() {\n cy.log('Common.Editor.waitLoadingComplete');\n this.element\n .find('.side-panel__content-tab-nav', {timeout: 30000})\n .should('exist');\n }", "function is_document_ready() {\n\n var visibleLoader = null;\n for (const loader of container.getElementsByClassName(\"loader\")) {\n if (loader.visible) {\n visibleLoader = loader;\n }\n }\n if (!visibleLoader) {\n get_all_prs();\n setInterval(get_all_prs, 30000);\n\n } else {\n console.log(\"Document not fully loaded. Waiting a bit more\");\n setTimeout(is_document_ready, 1000);\n }\n }", "function isDOMRequired() { \n\treturn true;\n}", "function isDOMRequired()\n{\n\treturn true;\n}", "function domReady() {\n // Make sure body exists, at least, in case IE gets a little overzealous (jQuery ticket #5443).\n if (!doc.body) {\n // let's not get nasty by setting a timeout too small.. (loop mania guaranteed if assets are queued)\n win.clearTimeout(api.readyTimeout);\n api.readyTimeout = win.setTimeout(domReady, 50);\n return;\n }\n\n if (!isDomReady) {\n isDomReady = true;\n\n init();\n each(domWaiters, function (fn) {\n one(fn);\n });\n }\n }", "function domReady() {\n // Make sure that the DOM is not already loaded\n if(!isReady) {\n // Remember that the DOM is ready\n isReady = true;\n\n if(readyList) {\n for(var fn = 0; fn < readyList.length; fn++) {\n readyList[fn].call(window, []);\n }\n\n readyList = [];\n }\n }\n }", "checkDOMDependencies() {\n if (this.positioningValid && !this.validatePositioningScheduled && !this.checkDOMDependenciesScheduled) {\n this.checkDOMDependenciesScheduled = true;\n window.requestAnimationFrame(() => {\n this.checkDOMDependenciesScheduled = false;\n if (this.measureDOMNodes()) {\n this.invalidatePositioning();\n }\n });\n }\n }", "function domReady() {\r\n\t\t// Make sure that the DOM is not already loaded\r\n\t\tif(!isReady) {\r\n\t\t\t// Remember that the DOM is ready\r\n\t\t\tisReady = true;\r\n \r\n\t if(readyList) {\r\n\t for(var fn = 0; fn < readyList.length; fn++) {\r\n\t readyList[fn].call(window, []);\r\n\t }\r\n \r\n\t readyList = [];\r\n\t }\r\n\t\t}\r\n\t}", "function DfoWait()\r\n{\r\n\tGlobal.DoSleep(2000);\r\n\r\n\tvar waitPane = Navigator.Find('//div[@id=\"ShellProcessingDiv\"]');\r\n\tif (!waitPane)\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\tvar waitResult = Global.DoWaitForProperty(waitPane, '_DoDOMGetAttribute', 'display: none;', 300000, 'style');\r\n\treturn waitResult != false;\t\r\n}", "function __zoot_c3d__process_DOM() {\n let containers = document.body.getElementsByTagName('zoot-c3d-root-container');\n for (let i = 0; i < containers.length; i++) {\n __zoot_c3d__process_Component(undefined, containers[i]);\n __zoot_c3d__g_root_containers.push(containers[i]);\n containers[i].zoot_c3d_sync();\n }\n}", "onEnterDOM() {}", "async waitForElementVisible (selector) {\n debug('waitForElementVisible', selector)\n var waitFor = this.wait.bind(this)\n var findElement = this.findElement.bind(this)\n return new Promise(async resolve => {\n var visibleEl = await waitFor(async () => {\n var el = await findElement(selector)\n if (el && await el.isVisible()) {\n return el\n } else {\n return false\n }\n })\n resolve(visibleEl)\n })\n }", "waitFormainpageToLoad () {\n if(!this.cityNameInput.isVisible()){\n this.cityNameInput.waitForVisible(5000);\n }\n }", "function domReady() {\n // Make sure that the DOM is not already loaded\n if (!isReady) {\n // Remember that the DOM is ready\n isReady = true;\n\n if (readyList) {\n for (var fn = 0; fn < readyList.length; fn++) {\n readyList[fn].call(window, []);\n }\n\n readyList = [];\n }\n }\n }", "function domReady() {\n // Make sure that the DOM is not already loaded\n if (!isReady) {\n // Remember that the DOM is ready\n isReady = true;\n\n if (readyList) {\n for (var fn = 0; fn < readyList.length; fn++) {\n readyList[fn].call(window, []);\n }\n\n readyList = [];\n }\n }\n }", "function waitForCategoryDeleteView() {\n\t\tbrowser.wait(categoryDeleteView.isPresent.bind(categoryDeleteView), 3000, \"Timeout waiting for view to render\");\n\t}", "function onDOMReady() {\n // Make sure that the DOM is not already loaded\n if (isReady) return;\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if (!document.body) return setTimeout(onDOMReady, 0);\n // Remember that the DOM is ready\n isReady = true;\n // Make sure this is always async and then finishin init\n setTimeout(function() {\n app._finishInit();\n }, 0);\n }", "function domReady() {\n // Make sure that the DOM is not already loaded\n if (!isReady) {\n // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\n if ( !doc.body ) {\n return setTimeout( domReady, 1 );\n }\n // Remember that the DOM is ready\n isReady = true;\n // If there are functions bound, to execute\n domReadyCallback();\n // Execute all of them\n }\n} // /ready()", "waitFor_meetingRaceList_RaceContent() {\n if(!this.meetingRaceList_RaceContent.isVisible()){\n this.meetingRaceList_RaceContent.waitForVisible(5000);\n }\n }", "function domReady() {\n // Make sure that the DOM is not already loaded\n if (!isReady) {\n // be sure document.body is there\n if (!document.body) {\n return setTimeout(domReady, 13);\n }\n\n // clean up loading event\n if (document.removeEventListener) {\n document.removeEventListener(\"DOMContentLoaded\", domReady, false);\n } else {\n window.removeEventListener(\"load\", domReady, false);\n }\n\n // Remember that the DOM is ready\n isReady = true;\n\n // execute the defined callback\n for (var fn = 0; fn < readyList.length; fn++) {\n readyList[fn].call(window, []);\n }\n readyList.length = 0;\n }\n}", "function init() {\n html_kleurenHolder = document.querySelector(\".js-kleuren\");\n html_uitvoerHolder = document.querySelector(\".js-uitvoer\");\n\n if (html_kleurenHolder) {\n getKleuren();\n }\n\n console.log(\"Dom loaded\");\n}", "function isDOMRequired() {\r\n return false;\r\n}", "function wait() {\r\n\r\n var waitElem = $(WAIT_ELEM_ID);\r\n\r\n if (!waitElem) {\r\n\r\n waitElem = document.createElement('div');\r\n\r\n waitElem.setAttribute('id', WAIT_ELEM_ID);\r\n\r\n waitElem.setAttribute('style', 'position:absolute;width:100px;height:20px;left:15px;top:110px;');\r\n\r\n waitElem.innerHTML = '<img style=\"width:16px;height:16px;margin:2px 0px 2px 0px;\" src=\"' + WAIT_ICON + '\"/> Please wait...';\r\n\r\n $('geoForm').appendChild(waitElem);\r\n\r\n }\r\n\r\n waitElem.style.display = 'block';\r\n\r\n body_cursor_bak = document.getElementsByTagName('body')[0].style.cursor;\r\n\r\n document.getElementsByTagName('body')[0].style.cursor = 'wait';\r\n\r\n}", "function isDOMReady()\r\n{\r\n if (CCSOL.Utiles.ScriptsBeenLoading > 0) return ;\r\n // If we already figured out that the page is ready, ignore\r\n if (domReady.done)\r\n return false;\r\n //debugger;\r\n // Check to see if a number of functions and elements are\r\n // able to be accessed \r\n if (document && document.getElementsByTagName && document.getElementById && document.body)\r\n {\r\n // If they're ready, we can stop checking\r\n clearInterval(domReady.timer);\r\n domReady.timer = null;\t\r\n // Execute all the functions that were waiting\r\n\ttry {\r\n\t for (var i = 0; i < domReady.ready.length; i++)\t \r\n\t domReady.ready[i]();\t \r\n\t}\r\n\tcatch(e) {\r\n\t\r\n\t}\r\n\t\r\n\r\n // Remember that we're now done\r\n domReady.ready = null;\r\n domReady.done = true;\r\n }\r\n}", "function DOMContentLoaded() {\n if (isEmbedded()) {\n document.getElementById('menu').style.display = 'none';\n }\n\n setupModal();\n populateList();\n\n if (isIOS) {\n document.getElementById('export-all-png').style.display = 'none';\n } else {\n document.getElementById('export-all-png').addEventListener('click',\n () => exportAllDiagrams('PNG'));\n }\n\n if (isIOS) {\n document.getElementById('export-all-svg').style.display = 'none';\n } else {\n document.getElementById('export-all-svg').addEventListener('click',\n () => exportAllDiagrams('SVG'));\n }\n\n document.getElementById('import').addEventListener('click',\n () => document.getElementById('file-selector').click());\n\n document.getElementById('file-selector').\n addEventListener('change', filesSelected);\n}", "function waitViewerToLoad() {\n\t\tif(!document.VLVChart)\n\t\t{\n\t\t\t// not loaded, try again in 200ms\n\t\t\tsetTimeout(waitViewerToLoad, 200);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// loaded. Poll events\n\t\t\tobjChart = document.VLVChart;\n\t\t\tPollEvent();\n\t\t\t// execute callback function\n\t\t\tif(cb) {\n\t\t\t\tcb(this);\n\t\t\t}\n\t\t}\n\t}", "function waitForImages() {\n\n\t\t// the rest of the code does not apply to IE9, so exit\n\t\tif ( classie.has(elHTML, 'ie9') ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar \telLoader = document.getElementById('loader_overlay'),\n\t\t\telPreloadImage = document.getElementById('bg-image');\n\n\t\t// listen for the end of <header> fadeIn animation\n\t\telLoader.addEventListener(transitionEvent, removeLoader);\n\n\t\tfunction removeLoader() {\n\n\t\t\t// remove the event listener from the loader\n\t\t\telLoader.removeEventListener(transitionEvent, removeLoader);\n\n\t\t\t// remove any unneeded elements\n\t\t\telBody.removeChild(elLoader);\n\t\t\telPreloadImage.parentNode.removeChild(elPreloadImage);\n\n\t\t\t// page is now fully ready to go\n\t\t\t// elHTML.setAttribute('data-page', 'ready');\n\t\t\telHTML.setAttribute('data-overlay', 'hidden');\n\n\t\t}\n\n\t\t// layout Packery after all images have loaded\n\t\timagesLoaded(elBody, function(instance) {\n\t\t\telHTML.setAttribute('data-images', 'loaded');\n\t\t});\n\n\t}", "waitUntilDom(condition, options = {\n attributes: true,\n childList: true,\n subtree: true,\n timeout: 500,\n interval: 100\n }) {\n return __awaiter(this, void 0, void 0, function* () {\n return waitUntilDom(this, condition, options);\n });\n }", "function ou_domReady () {\n //New LH menu navigation - show on ALL pages in course\n if(initCourseId) {\n if(initModuleId) {\n //we're on Modules page with link to specific module - let's hide other Modules'\n var otherModuleDivs = document.querySelectorAll('div.context_module:not([data-module-id=\"'+initModuleId+'\"])'); //should only be one!; //should only be one!\n Array.prototype.forEach.call(otherModuleDivs, function(otherModuleDiv){\n otherModuleDiv.style.display = 'none'; \n });\n }\n ou_getModules(initCourseId);\n }\n }", "function ou_domReady () {\n //New LH menu navigation - show on ALL pages in course\n if(initCourseId) {\n if(initModuleId) {\n //we're on Modules page with link to specific module - let's hide other Modules'\n var otherModuleDivs = document.querySelectorAll('div.context_module:not([data-module-id=\"'+initModuleId+'\"])'); //should only be one!; //should only be one!\n Array.prototype.forEach.call(otherModuleDivs, function(otherModuleDiv){\n otherModuleDiv.style.display = 'none'; \n });\n }\n ou_getModules(initCourseId);\n }\n }", "function waitForDisplayed(selector) {\n Reporter_1.Reporter.debug(`Wait for an element to be visible '${selector}'`);\n isExist(selector);\n tryBlock(() => $(selector).waitForDisplayed(DEFAULT_TIME_OUT), `Element not visible '${selector}'`);\n }", "function elementReady(selector) {\n\treturn new Promise((resolve, reject) => {\n\t\tlet el = document.querySelector(selector);\n\t\tif (el) {\n\t\t\tresolve(el);\n\t\t}\n\t\tnew MutationObserver((mutationRecords, observer) => {\n\t\t\t\t// Query for elements matching the specified selector\n\t\t\t\tArray.from(document.querySelectorAll(selector)).forEach((element) => {\n\t\t\t\t\tresolve(element);\n\t\t\t\t\t// Once we have resolved we don't need the observer anymore.\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t});\n\t\t\t})\n\t\t\t.observe(document.documentElement, {\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: true\n\t\t\t});\n\t});\n}", "function init(){\n console.log(\"Page loaded and DOM is ready\");\n}", "function _IEDOMContentLoaded() {\r\n try {\r\n // trick -> http://d.hatena.ne.jp/uupaa/20100410/1270882150\r\n new Image.doScroll();\r\n _DOMContentLoaded();\r\n } catch(err) {\r\n setTimeout(_IEDOMContentLoaded, 64);\r\n }\r\n}", "async waitForLoadingAnimation() {\n var i = 0;\n var isVisible;\n do {\n var isVisible = await this.driver\n .wait(\n until.elementLocated(By.className(this.loader)),\n this.defaultTimeout\n )\n .isDisplayed();\n i++;\n // the anmiation still needs a second to disapear after the attribute returns false\n await this.driver.sleep(1000);\n // keep running loop if element is visible, timeout after 100 tires if it never disapears\n } while (i < 100 && isVisible === true);\n }", "function GM_wait() {\n var timeout = 1000;\n if(typeof $ === 'undefined') {\n window.setTimeout(GM_wait,timeout);\n console.log('waiting for jquery');\n }\n else\n $(function() { mel_main(); });\n }", "function waitLoad(){\n while (createButton === false){\n console.log(\"Waiting for load.\")\n }\n if (createButton != undefined){\n console.log(\"Yo, that shit button is loaded.\");\n window.onload(console.log(\"Page Fully Loaded\"));\n }\n}", "async waitUntilDisplayed(selector, timeout = this.defaultTimeout) {\n try {\n await this.page.waitForSelector(selector, { \"timeout\": timeout, visible: true })\n } catch (err) {\n throw new Error(err)\n }\n }", "pageReady() {}", "ready() {\n this._root = this._createRoot();\n super.ready();\n this._firstRendered();\n }", "function handleDomContentLoaded(event) {\n\n }", "constructor() {\n let ready = new Promise(resolve => {\n if (document.readyState != \"loading\") return resolve();\n document.addEventListener(\"DOMContentLoaded\", () => resolve());\n });\n ready.then(this.init.bind(this));\n }", "function waitForVideo(){\n let observer = new MutationObserver(function(mutations) {\n //console.log(\"wait for video triggered \");\n //console.log(mutations);\n let videoElements = document.getElementsByTagName('video');\n if (videoElements.length>0){\n log(\"found video\", L_ALWAYS);\n setUp();\n observer.disconnect();\n return true;\n }\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true\n });\n}", "async waitUntilDom(condition, options = {\n attributes: true,\n childList: true,\n subtree: true,\n timeout: 500,\n interval: 100\n }) {\n return waitUntilDom(this, condition, options);\n }", "function prepareDom(){\n container.css({\n 'height': '100%',\n 'position': 'relative'\n });\n\n //adding a class to recognize the container internally in the code\n container.addClass(WRAPPER);\n $('html').addClass(ENABLED);\n\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n windowsHeight = $window.height();\n\n container.removeClass(DESTROYED); //in case it was destroyed before initializing it again\n\n addInternalSelectors();\n\n //styling the sections / slides / menu\n $(SECTION_SEL).each(function(index){\n var section = $(this);\n var slides = section.find(SLIDE_SEL);\n var numSlides = slides.length;\n\n styleSection(section, index);\n styleMenu(section, index);\n\n // if there's any slide\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n }else{\n if(options.verticalCentered){\n addTableClass(section);\n }\n }\n });\n\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n if(options.fixedElements && options.css3){\n $(options.fixedElements).appendTo($body);\n }\n\n //vertical centered of the navigation + active bullet\n if(options.navigation){\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n\n if(options.scrollOverflow){\n if(document.readyState === 'complete'){\n createScrollBarHandler();\n }\n //after DOM and images are loaded\n $window.on('load', createScrollBarHandler);\n }else{\n afterRenderActions();\n }\n }", "function prepareDom(){\n container.css({\n 'height': '100%',\n 'position': 'relative'\n });\n\n //adding a class to recognize the container internally in the code\n container.addClass(WRAPPER);\n $('html').addClass(ENABLED);\n\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n windowsHeight = $window.height();\n\n container.removeClass(DESTROYED); //in case it was destroyed before initializing it again\n\n addInternalSelectors();\n\n //styling the sections / slides / menu\n $(SECTION_SEL).each(function(index){\n var section = $(this);\n var slides = section.find(SLIDE_SEL);\n var numSlides = slides.length;\n\n styleSection(section, index);\n styleMenu(section, index);\n\n // if there's any slide\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n }else{\n if(options.verticalCentered){\n addTableClass(section);\n }\n }\n });\n\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n if(options.fixedElements && options.css3){\n $(options.fixedElements).appendTo($body);\n }\n\n //vertical centered of the navigation + active bullet\n if(options.navigation){\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n\n if(options.scrollOverflow){\n if(document.readyState === 'complete'){\n createScrollBarHandler();\n }\n //after DOM and images are loaded\n $window.on('load', createScrollBarHandler);\n }else{\n afterRenderActions();\n }\n }", "function checkDomElements() {\n if (menu_open\n && menu_close\n && homepage\n && menu\n && menuWeb\n && menu3dAudio\n && menuChat\n && menuCanvasAudio\n && menufestival\n && menuLouvres\n && menuDataviz\n && homeWeb\n && home3dAudio\n && homeChat\n && homeCanvasAudio\n && homefestival\n && homeLouvres\n && homeDataviz\n && categoryWeb\n && category3dAudio\n && categoryChat\n && categoryCanvasAudio\n && categoryFestival\n && categoryLouvres\n && categoryDataviz\n && backhome\n && backLinks\n && projectLists\n ) {\n addListener()\n } else {\n setTimeout(function() {\n getElements();\n checkDomElements();\n\n // console.log(menu_open\n // ,menu_close\n // ,homepage\n // ,menu\n // ,menuWeb\n // ,menu3dAudio\n // ,menuChat\n // ,menuCanvasAudio\n // ,menufestival\n // ,menuLouvres\n // ,menuDataviz\n // ,homeWeb\n // ,home3dAudio\n // ,homeChat\n // ,homeCanvasAudio\n // ,homefestival\n // ,homeLouvres\n // ,homeDataviz\n // ,categoryWeb\n // ,category3dAudio\n // ,categoryChat\n // ,categoryCanvasAudio\n // ,categoryFestival\n // ,categoryLouvres\n // ,categoryDataviz\n // ,backhome\n // ,backLinks);\n }, 500);\n }\n}", "focusInitialElementWhenReady() {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusInitialElement()));\n });\n }", "focusInitialElementWhenReady() {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusInitialElement()));\n });\n }", "focusInitialElementWhenReady() {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusInitialElement()));\n });\n }", "function waitDone() {\n (function (initApplication) {\n initApplication($, Highcharts, window, document);\n })(function ($, Highcharts, window, document) {\n // load libraries\n ApmJqWidgets();\n APMRPM.Services = new APMRPM._Services();\n APMRPM.Components = new APMRPM._Components();\n APMRPM.Highcharts = new APMRPM._Highcharts();\n APMRPM.MainPanel = new APMRPM._MainPanel();\n\n // load jquery\n $(function () {\n APMRPM.MainPanel.adjustCSS();\n APMRPM.MainPanel.render();\n });\n });\n}", "getDom(){\n /* only try to get the dom if not a 404 message */\n if(this.props.page.s3 != \"https://s3.us-east-2.amazonaws.com/hindsite-production/404_not_found.html\"){\n this.props.pagedata_actions.getIframeHTML(this.props.page.s3, this.props.currentUser.md5, this.props.currentUser.ekey);\n }\n }", "function DOMReady(callback) {\n if (document.readyState === 'interactive' || document.readyState === 'complete') {\n return callback();\n }\n document.addEventListener('DOMContentLoaded', callback, false);\n }", "async vlidatePresenceOfElements () {\n await expect(await (await this.inputUsername).isDisplayed()).toBe(true);\n await expect(await (await this.inputPassword).isDisplayed()).toBe(true);\n // check if submit button is displayed or not\n await expect(await (await this.btnSubmit).isDisplayed()).toBe(true);\n // check if submit button is clickable or not\n await expect(await (await this.btnSubmit).isClickable()).toBe(true);\n }", "function prepareDom(){\r\n container.css({\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n container.addClass(WRAPPER);\r\n $('html').addClass(ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = $window.height();\r\n\r\n container.removeClass(DESTROYED); //in case it was destroyed before initializing it again\r\n\r\n addInternalSelectors();\r\n\r\n //styling the sections / slides / menu\r\n $(SECTION_SEL).each(function(index){\r\n var section = $(this);\r\n var slides = section.find(SLIDE_SEL);\r\n var numSlides = slides.length;\r\n\r\n styleSection(section, index);\r\n styleMenu(section, index);\r\n\r\n // if there's any slide\r\n if (numSlides > 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n });\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).appendTo($body);\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n\r\n if(options.scrollOverflow){\r\n if(document.readyState === 'complete'){\r\n createScrollBarHandler();\r\n }\r\n //after DOM and images are loaded\r\n $window.on('load', createScrollBarHandler);\r\n }else{\r\n afterRenderActions();\r\n }\r\n }", "function prepareDom(){\r\n container.css({\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n container.addClass(WRAPPER);\r\n $('html').addClass(ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = $window.height();\r\n\r\n container.removeClass(DESTROYED); //in case it was destroyed before initializing it again\r\n\r\n addInternalSelectors();\r\n\r\n //styling the sections / slides / menu\r\n $(SECTION_SEL).each(function(index){\r\n var section = $(this);\r\n var slides = section.find(SLIDE_SEL);\r\n var numSlides = slides.length;\r\n\r\n styleSection(section, index);\r\n styleMenu(section, index);\r\n\r\n // if there's any slide\r\n if (numSlides > 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n });\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).appendTo($body);\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n\r\n if(options.scrollOverflow){\r\n if(document.readyState === 'complete'){\r\n createScrollBarHandler();\r\n }\r\n //after DOM and images are loaded\r\n $window.on('load', createScrollBarHandler);\r\n }else{\r\n afterRenderActions();\r\n }\r\n }", "function dom_loaded_handler() {\n // function flag since we only want to execute this once\n if (dom_loaded_handler.done) { return; }\n dom_loaded_handler.done = true;\n\n DOM_LOADED = true;\n ENQUEUE_REQUESTS = false;\n\n _.each(instances, function(inst) {\n inst._dom_loaded();\n });\n }", "waitFor_meetingHeader_Weather() {\n if(!this.meetingHeader_Weather.isVisible()){\n this.meetingHeader_Weather.waitForVisible(5000);\n }\n }", "function initOnDomReady() {}", "async waitForElement (selector) {\n debug('waitForElement', selector)\n // Scoping gets broken within async promises, so bind these locally.\n var waitFor = this.wait.bind(this)\n var findElement = this.findElement.bind(this)\n return new Promise(async resolve => {\n var element = await waitFor(async () => {\n var el = await findElement(selector)\n if (el) {\n return el\n }\n return false\n })\n resolve(element)\n })\n }", "async function waitForAllElements(){\n let count = 0;\n const timeout = ms => new Promise(resolve => setTimeout(resolve, ms));\n for(let i = 0; i < 10; i++){\n await timeout(200);\n const cCount = document.getElementsByTagName('*').length;\n if(cCount != count){count = cCount;}\n else{return;}\n }\n}", "async function initializePage() {\n loadProjectsContainer();\n loadCalisthenicsContainer();\n loadCommentsContainer();\n}", "function init() {\n if (!ready) {\n ready = true;\n initElements();\n }\n }", "function domReady (cb) {\n\t\t\tif (completed) cb(); else callbacks.push(cb);\n\t\t}", "function pageReady() {\n svg4everybody();\n initScrollMonitor();\n initModals();\n }", "render() {\n this.notify('initial-load', {});\n /**\n * Used to load context menu\n */\n this.trigger('load');\n this.notify('initial-end', {});\n this.renderElements();\n this.renderComplete();\n }", "render() {\n this.notify('initial-load', {});\n /**\n * Used to load context menu\n */\n this.trigger('load');\n this.notify('initial-end', {});\n this.renderElements();\n this.renderComplete();\n }", "render() {\n this.notify('initial-load', {});\n /**\n * Used to load context menu\n */\n this.trigger('load');\n this.notify('initial-end', {});\n this.renderElements();\n this.renderComplete();\n }", "function waitReady() {\n ready = getStore().getState().pageUpdateData.pageUpdateId !== initialPageUpdateId;\n if (!ready) {\n window.setTimeout(waitReady, 50);\n return false;\n }\n resolve(true);\n return true;\n }", "connectedCallback() {\n this.renderAndUpdateDom();\n }", "waitForIframeLoad() {\n return new Promise(resolve => {\n (function checkIfReady() {\n const iframe = dom.get('.result-iframe');\n if (iframe.attr('src')) {\n resolve();\n } else {\n window.requestAnimationFrame(checkIfReady);\n }\n })();\n });\n }", "function wait_for_results() {\n var cols = $(table_id).find(\"thead > tr:first th\").length;\n table_tbody = $(table_id + \" > tbody\");\n table_tbody.empty();\n table_tbody.append('<tr><td colspan=\"'+cols+'\"><div class=\"wait\"></div><div class=\"loader\"></div></td></tr>');\n}", "render() {\n console.debug(`Rendering DOM of ${this.constructor.name}`);\n this.shadowRoot.innerHTML = this.html;\n if (this.script != null) {\n console.debug(`Running script of ${this.constructor.name}`);\n this.script();\n console.debug(`Finished running script of ${this.constructor.name}`);\n }\n console.debug(`Finished rendering DOM of ${this.constructor.name}`);\n }", "function when_ready(callback)\n {\n if (document.readyState !== \"loading\") { callback(); }\n else { document.addEventListener(\"DOMContentLoaded\", callback); }\n }", "async isLoading() {\n return (await\n $(this.elements.loading)\n ).isDisplayed();\n }", "function init() {\n\tdocument.readyState === 'complete' ?\n\t\twirejs.bless(document) :\n\t\tsetTimeout(init, 1);\n}", "includeContentLoaded() {\n\n }", "async function run () {\n\t// Wait for the first image to appear. Make sure it has a different url\n\t// const image = await document.body.arrive(`img[srcset]:not([srcset^=\"${last_image_url}\"])`);\n\t// await document.body.leave('#\\\\32 ');\n\t// last_image_url = image.srcset;\n\n\tawait document.body.arrive('[role=presentation] [role=presentation]');\n\n\t// Description can always be done\n\tconditional_execute('on_site_commentary_enabled', do_commentary);\n\n\t// May need to wait for upload links and image hashes\n\tif (document.getElementById('1') !== null) {\n\t\t// https://stackoverflow.com/questions/20306204/using-queryselector-with-ids-that-are-numbers\n\t\tawait document.body.arrive('#\\\\32 ');\n\t}\n\n\tconditional_execute('on_site_upload_enabled', do_upload);\n\tconditional_execute('on_site_hasher_enabled', do_md5s);\n}", "sendPageReady() {}", "function onDOMReady(p_sType, p_aArgs, p_oObject) {\r\n \r\n this.render(p_oObject);\r\n \r\n }", "function buildPage() {\n // Load Reusables\n $.get('includes/reusables.html', (reusables) => {\n $(\"br\").before(reusables);\n }).promise().done(() => {\n console.log(\"<Loader> Reusables loaded\");\n \n // Load Start Scene\n $.get('includes/start_scene.html', (start_scene) => {\n $(\"br\").before(start_scene);\n }).promise().done(() => {\n console.log(\"<Loader> Start scene loaded\");\n \n // Load Play Scene\n $.get('includes/play_scene.html', (play_scene) => {\n $(\"br\").before(play_scene);\n }).promise().done(() => {\n console.log(\"<Loader> Play scene loaded\");\n \n // Load Leaderboard Scene\n $.get('includes/leaderboard_scene.html', (leaderboard_scene) => {\n $(\"br\").before(leaderboard_scene);\n }).promise().done(() => {\n console.log(\"<Loader> Leaderboard scene loaded\");\n\n // Load End Scene\n $.get('includes/end_scene.html', (end_scene) => {\n $(\"br\").before(end_scene);\n }).promise().done(() => {\n console.log(\"<Loader> End scene loaded\");\n\n // Load Game Scripts\n $(\"#abofScripts\").html('<script src=\"scripts/engine.js\"></script>').promise().done(function() {\n $(\"#abofScripts script\").after('<script src=\"scripts/game.js\"></script>').promise().done(() => {\n $.when(\"#abofScripts\").done(() => {\n console.log(\"<Loader> Executing scripts...\");\n // Remove the <br> tag placeholder\n $(\"br\").remove();\n game.google.load();\n });\n });\n });\n });\n });\n });\n });\n });\n}", "function _domObserver() {\n let observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n if (mutation.type == \"childList\") {\n mutation.addedNodes.forEach(function (item) {\n _findElements(item);\n });\n }\n });\n });\n\n observer.observe(document.body, {\n childList: true,\n });\n }", "renderIncDom() {\n\t\tif (this.component_.render) {\n\t\t\tthis.component_.render();\n\t\t} else {\n\t\t\tIncrementalDOM.elementVoid('div');\n\t\t}\n\t}", "waitFor_meetingHeader_Date() {\n if(!this.meetingHeader_Date.isVisible()){\n this.meetingHeader_Date.waitForVisible(5000);\n }\n }", "function prepareDom(){\n container.css({\n 'height': '100%',\n 'position': 'relative'\n });\n\n //adding a class to recognize the container internally in the code\n container.addClass(WRAPPER);\n $('html').addClass(ENABLED);\n\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\n windowsHeight = $window.height();\n\n container.removeClass(DESTROYED); //in case it was destroyed before initilizing it again\n\n addInternalSelectors();\n\n //styling the sections / slides / menu\n $(SECTION_SEL).each(function(index){\n var section = $(this);\n var slides = section.find(SLIDE_SEL);\n var numSlides = slides.length;\n\n styleSection(section, index);\n styleMenu(section, index);\n\n // if there's any slide\n if (numSlides > 0) {\n styleSlides(section, slides, numSlides);\n }else{\n if(options.verticalCentered){\n //addTableClass(section);\n }\n }\n });\n\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\n if(options.fixedElements && options.css3){\n $(options.fixedElements).appendTo($body);\n }\n\n //vertical centered of the navigation + active bullet\n /*如果navigation为true,添加竖向导航===================================*/\n if(options.navigation){\n addVerticalNavigation();\n }\n\n enableYoutubeAPI();\n enableVidemoAPI();\n\n if(options.scrollOverflow){\n if(document.readyState === 'complete'){\n createSlimScrollingHandler();\n }\n //after DOM and images are loaded\n $window.on('load', createSlimScrollingHandler);\n }else{\n afterRenderActions();\n }\n }", "function _DOMContentLoaded() {\n\tdocument.removeEventListener('DOMContentLoaded', _DOMContentLoaded, false);\n\n\tif(noDocumentReadyState)document.readyState = \"interactive\";\n\t\n\tif(_emulate_scrollX_scrollY)_emulate_scrollX_scrollY();\n\n\tif(\"classList\" in document.body.firstChild) {\n\t\t//TODO:: no htc available do for(var node in document.all) __ielt8__element_init__(node)\n\t}\n}", "function goReady(){ // wait for everything to load first\n\tif (domReady && svgReady!=null && loaded)\n\t\treadyStart(svgReady);\n}", "function onDOMReady(p_sType, p_aArgs, p_oObject) {\n this.render(p_oObject);\n }", "function testPageLoad(driver) {\n driver.get('localhost:3000/users/signup').then(function() {\n driver.findElement(By.id('header')).getText().then(function(text) {\n if (text == 'Create a New Account') {\n successes++;\n console.log('Page Load | SUCCESS');\n } else {\n failures++;\n console.log('Page Load | FAILED');\n }\n });\n });\n}", "function pageFullyLoaded () {}", "function checkReady() {\r\n\tvar isReady = (domContentLoaded && (xhrDug.readyState == xhrDug.DONE && xhrBuried.readyState == xhrBuried.DONE) || DBG_FAKE_RESPONSE);\r\n\tDBG && win.console.info('checkReady', isReady);\r\n\tif (isReady) {\r\n\t\tonReady();\r\n\t}\r\n}" ]
[ "0.6623635", "0.64619225", "0.6430823", "0.6350255", "0.63124496", "0.62749916", "0.62593365", "0.62532026", "0.6155751", "0.61484855", "0.6060486", "0.60243165", "0.59915257", "0.59706193", "0.596268", "0.59519553", "0.59481704", "0.59424925", "0.593901", "0.59345174", "0.5923631", "0.5908487", "0.5889752", "0.58896446", "0.58896446", "0.5865126", "0.58611846", "0.5853368", "0.5853306", "0.58447725", "0.58416367", "0.58398205", "0.58325565", "0.58213276", "0.58120596", "0.5799261", "0.57807267", "0.577564", "0.5763578", "0.5763578", "0.57599366", "0.574587", "0.57398605", "0.57341224", "0.5720263", "0.57116747", "0.57044643", "0.5694965", "0.568082", "0.5660009", "0.56577855", "0.56522036", "0.5649974", "0.5640825", "0.56378156", "0.56378156", "0.5625231", "0.56201726", "0.56201726", "0.56201726", "0.56171066", "0.56158656", "0.56113505", "0.56099516", "0.5608527", "0.5608527", "0.56077945", "0.56061524", "0.559538", "0.5593606", "0.5593102", "0.55862534", "0.55841047", "0.5582543", "0.5574822", "0.55581844", "0.55581844", "0.55581844", "0.5555771", "0.5550942", "0.5549158", "0.55455816", "0.5543033", "0.5541202", "0.553421", "0.5529034", "0.5525654", "0.55231696", "0.55213034", "0.55208236", "0.5515191", "0.5511762", "0.5509674", "0.54995835", "0.5495449", "0.5490495", "0.54882455", "0.54865825", "0.54811954", "0.5479539", "0.54771745" ]
0.0
-1
ProgressButton: component that represents each number underneath the sudoku board. It has a progress bar on the outside showing how many of that number have been put onto the board. props: value: the number that is stored in the button. onClick: a function that executes after the component is clicked. percent: the percentage full of the progress bar
function ProgressButton(props) { return ( <Progress theme={ { error: { symbol: props.value, trailColor: 'rgb(240, 240, 240)', color: 'rgb(7, 76, 188)', }, default: { symbol: props.value, trailColor: 'rgb(245, 245, 240)', color: 'rgb(7, 76, 188)', }, active: { symbol: props.value, trailColor: 'rgb(245, 245, 240)', color: 'rgb(7, 76, 188)', }, success: { symbol: props.value, trailColor: 'rgb(245, 245, 240)', color: 'rgb(0, 215, 0)', }, } } type="circle" percent={props.percent} width={60} strokeWidth={12} /> ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "animateProgressBar() {\n const\n cardLen = this.props.cards.length, // get cardsLength\n current = this.state.current, // get current\n calcPer = (lg, sm) => lg && sm ? (sm / lg) * 100 : 0, // create func that return precentage\n currPer = calcPer(cardLen, current), // current percentage\n nextPer = calcPer(cardLen, current + 1), // percentage of the next step\n progres = document.getElementById(\"run-test__progress\"), // the progress bar element\n oneStep = (nextPer - currPer) / 10; // the amount progress bar goes in one step (10 step anim)\n\n let counter = 0,\n currWidth = currPer;\n\n // create a timer for progressbar width grow\n const progressTimer = setInterval(() => {\n currWidth += oneStep; // increase width by 1 unit\n\n progres.style.width = currWidth + \"%\"; // set width\n\n if (++counter === 9) clearInterval(progressTimer); // increment and clear \n }, 150); // end of progressTimer\n }", "render() {\n return (\n <div>\n <Progress percent={this.state.percent} color={this.state.color} value={this.state.points} total='6' progress=\"ratio\"/>\n </div>\n )\n }", "function onProgress(value) {\n document.getElementById('counter').innerHTML = Math.round(value);\n}", "function Progress(props) {\n return (\n <div className=\"progress\" style={{ width: `${props.percentage}%`, backgroundColor: `${props.color}`}} />\n )\n}", "updateProgressBar(percentage) {\n let $progressBar = document.getElementById(\"progress-bar\");\n this.progressBarObj.value = Math.min(\n 100,\n this.progressBarObj.value + percentage\n );\n $progressBar.style.width = this.progressBarObj.value + \"%\";\n $progressBar.valuenow = this.progressBarObj.value;\n $progressBar.innerText = this.progressBarObj.value + \"%\";\n }", "function Uploading({percent}) {\n return <progress value={percent} max={100}>{percent} %</progress>\n}", "setProgress (value) {\n\n this.progressBar.style.width\n = (value || 0) +'%';\n }", "clickHandler(key, stateContext) {\n let state = stateContext;\n let percent = state[key].percent;\n\n if (percent < 100) {\n //Increment by 10, Highest value = 100.\n percent = (percent + 10) <= 100 ? (percent + 10) : 100\n } else {\n //If percent = 100, reset component percentage.\n percent = 0;\n }\n //Updating percentage of targeted component\n state[key].percent = percent;\n //Updating stateContext\n this.setState(state);\n //Updating completed items prop\n this.updateCompletedItems();\n }", "_progress() {\n\tconst currentProgress = this.state.current * ( 100 / this.state.questionsCount );\n this.progress.style.width = currentProgress + '%';\n\n\t// update the progressbar's aria-valuenow attribute\n this.progress.setAttribute('aria-valuenow', currentProgress);\n }", "function updateEditProgress (progress) {\n var total = progress.total\n var quorum = 0\n var missing = 0\n document.getElementById('prog').title = progress.collected +\n ' updated out of ' + total + ' members.'\n document.getElementById('prog-collected').style.width = quorum + '%'\n // document.getElementById('prog-collected').class = \"progress-bar-success\"\n document.getElementById('prog-collected').classList.remove('progress-bar-warning')\n document.getElementById('prog-collected').classList.add('progress-bar-success')\n // prog-missing now means \"extra votes after quorum has been reached.\"\n document.getElementById('prog-missing').style.width = -missing + '%'\n document.getElementById('prog-missing').class = 'progress-bar'\n document.getElementById('prog-missing').classList.add('progress-bar')\n document.getElementById('prog-missing').classList.remove('progress-bar-warning')\n // document.getElementById('prog-missing').classList.add('progress-bar-success')\n document.getElementById('prog-missing').classList.remove('progress-bar-striped')\n}", "progressBarClicked(stageNum) {\n this.setState({\n stage: stageNum\n });\n this.renderSwitch(stageNum);\n }", "function ProgressBar({ progress }) {\n console.log(progress);\n return (\n <div className=\"col\">\n <div className=\"progress progress-sm mr-2\">\n <div\n className=\"progress-bar bg-info\"\n role=\"progressbar\"\n style={{ width: `${progress}%` }}\n aria-valuenow={progress}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n ></div>\n </div>\n </div>\n );\n}", "updateProgress() {\n var completed = 0;\n var total = this.state.subtasks.length;\n for (let i = 0; i < total; i++) {\n if (this.state.subtasks[i].completed) completed++;\n }\n var totalProgress =\n total === 0 ? 0 : Math.round((completed * 100) / total);\n this.setState(\n {\n completion: totalProgress,\n },\n () => {\n this.props.updateParent(this.state);\n }\n );\n }", "_setProgress(v) {\n\t\tconst w = PROGRESSBAR_WIDTH * v;\n\t\tthis._fg.tilePositionX = w;\n\t\tthis._fg.width = PROGRESSBAR_WIDTH- w;\n\t}", "function updateProgress (){\n\tprogress.value += 30;\n}", "function ProgressBar(props) {\n return (\n <React.Fragment>\n <LinearProgress variant=\"determinate\" value={normalise(props.value)} />\n </React.Fragment>\n )\n}", "percentAnimation(num, ele) {\n this.state.percentBoxs.forEach((tab) => {\n tab.style.color = \"#8BAEC2\";\n });\n if (num === 0) {\n this.setState({ percent: 0 });\n document.getElementById(\"percent_animation_box\").style.left = \"0px\";\n } else if (num === 25) {\n this.setState({ percent: 25 });\n document.getElementById(\"percent_animation_box\").style.left = \"80px\";\n } else if (num === 50) {\n this.setState({ percent: 50 });\n document.getElementById(\"percent_animation_box\").style.left = \"163px\";\n } else if (num === 75) {\n this.setState({ percent: 75 });\n document.getElementById(\"percent_animation_box\").style.left = \"245px\";\n } else if (num === 100) {\n this.setState({ percent: 100 });\n document.getElementById(\"percent_animation_box\").style.left = \"328px\";\n }\n this.allocToSubTokenSize();\n ele.style.color = \"#fff\";\n }", "function UpdateTheProgressBar(gameStats){\n var pr = document.getElementById('progressBar').getContext('2d');\n pr.fillStyle = \"royalblue\";\n var progress = (gameStats.score/gameStats.neededScore)*100;\n progress = Math.round((progress/100) * 390);\n pr.fillRect(0,0,progress,50);\n console.log(gameStats);\n}", "_updateProgress() {\n super._updateProgress();\n\n const that = this;\n\n //Label for Percentages\n if (that.showProgressValue) {\n const percentage = parseInt(that._percentageValue * 100);\n\n that.$.label.innerHTML = that.formatFunction ? that.formatFunction(percentage) : percentage + '%';\n }\n else {\n that.$.label.innerHTML = '';\n }\n\n if (that.value === null || that.indeterminate) {\n that.$value.addClass('jqx-value-animation');\n }\n else {\n that.$value.removeClass('jqx-value-animation');\n }\n\n that.$.value.style.transform = that.orientation === 'horizontal' ? 'scaleX(' + that._percentageValue + ')' : 'scaleY(' + that._percentageValue + ')';\n }", "function updateProgress(value) {\n var progressBarStep = value*stepSize;\n $(\"#progress\").css(\"width\", progressBarStep + \"%\");\n $(\"#progress\").attr(\"aria-valuenow\", progressBarStep);\n $(\"#progress-current\").html(value);\n}", "function countToPercent(percent) {\n var interval = setInterval(counter,25);\n var n = 0;\n function counter() {\n if (n >= percent) {\n clearInterval(interval);\n valueProgressBarAnimated = true;\n }\n else {\n n += 1;\n // console.log(n);\n $(thisDiv).text(n + \"%\");\n }\n }\n }", "function renderProgress(val, perc, message) {\n\t\tbar.style.width = perc + \"%\";\n\n renderMessage(message);\n\t}", "function onUpdateProgressSong(e){\n let progressValue = e.detail.value;\n progressIndicator.textContent = ((progressValue <= 100) ? progressValue : 100) + \" %\";\n}", "function PopulatePercentage(value) {\n loadProgressBar(value);\n}", "function updateProgressBar() {\n pbValue+=10;\n $('.progress-bar').css('width', pbValue+'%').attr('aria-valuenow', pbValue);\n $('.progress-bar').text(pbValue + \"%\");\n }", "updateProgress() {\n const { inputLength, outputLength } = this.state.data;\n const progress = this.querySelector('.progress');\n progress.innerText = `${outputLength} out of ${inputLength} sequences processed`;\n }", "onProgress(percentage, count) {}", "render () {\n return (\n <div>\n <Button incrementValue={1} onClickFunction={this.incrementCounter}/>\n <Button incrementValue={5} onClickFunction={this.incrementCounter}/>\n <Button incrementValue={10} onClickFunction={this.incrementCounter}/>\n <Button incrementValue={100} onClickFunction={this.incrementCounter}/>\n <Result counter={this.state.counter}/>\n </div>\n )\n }", "function progress(piece, nbPieces, page, nbPages, doc, nbDocs) {\n var percent = (piece/nbPieces)*100;\n $(\"#progress .progress-bar\").attr('aria-valuenow', percent).attr('style','width:'+percent.toFixed(2)+'%').find(\"span\").html(percent.toFixed(0) + \"%)\");\n $(\"#progressPiece\").html(\"Piece \" + piece + \"/\" + nbPieces);\n $(\"#progressPage\").html((page && nbPages) ? \"Page \" + page + \"/\" + nbPages : \"\");\n $(\"#progressDoc\").html((doc && nbDocs) ? \"Document \" + doc + \"/\" + nbDocs : \"\");\n}", "function ProgressIndicator(props) { // I'm intentionally not destructuring here because most of the props are used by buildBackground. Might as well pass the existing object in.\n\n\tfunction buildBackground({current, max, backgroundColor = '#FFF', fillColor = '#369'}){\n\t\tconst fraction = Math.round(1000 * current / max) / 10;\n\t\tif (fraction < .2) {\n\t\t\treturn backgroundColor;\n\t\t}\n\t\tif (fraction > 99.8) {\n\t\t\treturn fillColor;\n\t\t}\n\t\treturn `linear-gradient(to right, ${fillColor} ${fraction - 0.1}%, ${backgroundColor} ${fraction + 0.1}%)`;\n\t}\n\n\tconst { width = 'calc(100% - 1rem)' } = props;\n\n\tconst style = {\n\t\twidth,\n\t\tbackground: buildBackground(props)\n\t};\n\n\treturn (\n\t\t<div className={styles['progress-indicator']} style={style}></div>\n\t);\n}", "function updateProgressBar() {\n let progressBar = document.getElementById(\"progress\");\n let percent = bodyArray.length * 2;\n let percentFullDisplay = document.getElementById(\"percent-full-value-display\");\n progressBar.style.width = percent + \"%\";\n percentFullDisplay.innerText = percent + \"%\";\n\n }", "function fillProgressBar(bar, barPercent) {\n const progressBarInterval = setInterval(() => {\n barPercent = barPercent + 1;\n bar.style.width = `${barPercent}%`;\n if (barPercent >= 100) {\n clearInterval(progressBarInterval);\n }\n }, 30);\n}", "function CircularProgress(props) {\n var _classNames2;\n\n var classes = props.classes,\n className = props.className,\n color = props.color,\n max = props.max,\n min = props.min,\n size = props.size,\n style = props.style,\n thickness = props.thickness,\n value = props.value,\n variant = props.variant,\n other = (0, _objectWithoutProperties3.default)(props, ['classes', 'className', 'color', 'max', 'min', 'size', 'style', 'thickness', 'value', 'variant']);\n\n\n var circleStyle = {};\n var rootStyle = {};\n var rootProps = {};\n\n if (variant === 'determinate' || variant === 'static') {\n var relVal = getRelativeValue(value, min, max) * 100;\n var circumference = 2 * Math.PI * (SIZE / 2 - 5);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(relVal);\n\n if (variant === 'static') {\n circleStyle.strokeDashoffset = ((100 - relVal) / 100 * circumference).toFixed(3) + 'px';\n rootStyle.transform = 'rotate(-90deg)';\n } else {\n circleStyle.strokeDashoffset = (easeIn((100 - relVal) / 100) * circumference).toFixed(3) + 'px';\n rootStyle.transform = 'rotate(' + (easeOut(relVal / 70) * 270).toFixed(3) + 'deg)';\n }\n }\n\n return _react2.default.createElement(\n 'div',\n (0, _extends3.default)({\n className: (0, _classnames2.default)(classes.root, (0, _defineProperty3.default)({}, classes['color' + (0, _helpers.capitalize)(color)], color !== 'inherit'), className),\n style: (0, _extends3.default)({ width: size, height: size }, rootStyle, style),\n role: 'progressbar'\n }, rootProps, other),\n _react2.default.createElement(\n 'svg',\n {\n className: (0, _classnames2.default)(classes.svg, (_classNames2 = {}, (0, _defineProperty3.default)(_classNames2, classes.svgIndeterminate, variant === 'indeterminate'), (0, _defineProperty3.default)(_classNames2, classes.svgStatic, variant === 'static'), _classNames2)),\n viewBox: '0 0 ' + SIZE + ' ' + SIZE\n },\n _react2.default.createElement('circle', {\n className: (0, _classnames2.default)(classes.circle, (0, _defineProperty3.default)({}, classes.circleIndeterminate, variant === 'indeterminate')),\n style: circleStyle,\n cx: SIZE / 2,\n cy: SIZE / 2,\n r: SIZE / 2 - 5,\n fill: 'none',\n strokeWidth: thickness\n })\n )\n );\n}", "function percentProgress(id, percentageAmount, color){\n document.getElementById(id).style.width = percentageAmount + \"%\";\n document.getElementById(id).style.backgroundColor = color;\n\t\t}", "percentage() {\n const { value } = this.state;\n const numt = Number(value) / 100;\n this.setState({ value: `${numt}` });\n }", "function move(e) {\n \n var mainDiv = getClosest(e.target, \"div\");//get the outer div (ie the div with class of col-)\n var h = mainDiv.querySelector('h3');//get the title \n var myProgress = mainDiv.querySelector('.myProgress');//get the div containing the progress bar\n if (myProgress.currentStyle) {//get the display property of myProgress\n var displayStyle = myProgress.currentStyle.display;\n } else if (window.getComputedStyle) {\n var displayStyle = window.getComputedStyle(myProgress, null).getPropertyValue(\"display\");\n }\n if(displayStyle == 'none'){//if myProgress is hidden, display it and start filling the progress bar\n myProgress.style.display=\"block\";\n var myBar = myProgress.querySelector('.myBar');//get the bar filler \n var label = myProgress.querySelector('.label');//get the label\n var value = label.getAttribute(\"data-value\");//get the value to wich the scrollbar should be filled\n var width = 10;\n function frame() {//function that allows to achieve animated progression of the bar filling\n if (width >= value) {\n //bar is completed so stop the animation \n clearInterval(id);\n } else {\n width++; \n myBar.style.width = width + '%'; \n label.innerHTML = width + '%';\n }\n }\n var id = setInterval(frame, 10);//interval at wich the frame function is called (10).\n \n }\n else {//the progress bar is already displayed so hide it\n myProgress.style.display=\"none\";\n }\n \n}", "function update_progress() {\n let tot = open + closed;\n\n $(\"#progress_open\").css(\"width\", (open * 100 / tot) + \"%\");\n $(\"#progress_close\").css(\"width\", (closed * 100 / tot) + \"%\");\n}", "function createProgressBar(num) {\n var progessRow = createRow(\"progress\");\n if(grid.offsetWidth <= 576) w = grid.offsetWidth + \"px\";\n else w = (grid.offsetWidth-window.innerWidth*3/7) + \"px\";\n \n progessRow.style.width = w;\n progress = num;\n var bar = document.createElement(\"div\");\n bar.className = \"progress-bar progress-bar-striped bg-danger progress-bar-animated\";\n bar.role = \"progressbar\";\n bar.style.width = \"100%\";\n bar.innerHTML = num + \" Moves\";\n bar.id = \"bar\";\n \n progessRow.appendChild(bar);\n return progessRow;\n}", "function setProgressBar(percent, e, num) {\n percentNum = (percent / 5) * 100;\n percent = percentNum.toString() + \"%\";\n $(\"#progressBar\" + num).css(\"width\", percent);\n }", "function calcProgressBar() {\n $('.progress-bar .progress').css('width', `${((officialQuestionCount)/questionTotal)*100}%`)\n\n $({value: ((officialQuestionCount-1)/questionTotal)*100}).animate({value: ((officialQuestionCount)/questionTotal)*100}, {\n duration: 500,\n easing:'swing',\n step: function() {\n $('.progress-bar .progress .value').text(`${Math.round(this.value)}%`);\n }\n });\n}", "function ProgressBar(props) {_classCallCheck(this, ProgressBar);return _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).call(this,\n props));\n }", "function updateProgress(){\n const computedPercentage = Math.round(attendanceRecords.length / traineeIds.length * 100);\n $(\"#progressbar\").children().attr(\"aria-valuenow\", computedPercentage).css(\"width\", computedPercentage + \"%\").text(computedPercentage + \"% Complete\");\n}", "function setLoaderProgressTo(value)\n{\n const fill = unityInstance.progress.getElementsByClassName(\"fill\")[0];\n const fillText = unityInstance.progress.getElementsByClassName(\"label\")[0];\n\n fill.animate(\n [\n { width: (value * 100) + \"%\" }\n ],\n {\n duration: 300,\n fill: \"forwards\"\n }\n );\n\n fillText.textContent = (value * 100).toFixed() + \"%\";\n}", "function updateProgressBar(el, currentValue, finalValue) {\n\tlet progressPercentage = currentValue / finalValue;\n\tlet parentWidth = el.parentElement.offsetWidth;\n\tif (progressPercentage <= 1) {\n\t\tlet progressWidth = progressPercentage * parentWidth;\n\t\tel.style.width = `${progressWidth}px`;\n\t\tif (progressPercentage < 0.35) el.style.background = \"var(--red)\";\n\t\telse if (progressPercentage > 0.35 && progressPercentage < 0.75) el.style.background = \"var(--yellow)\";\n\t\telse el.style.background = \"var(--green)\";\n\t}\n\tif (progressPercentage == 1) {\n\t\tif (!isPowerUpActive && !core.destroyed) {\n\t\t\tprogressPercentage = 0;\n\t\t\tpowerupContainer.classList.remove(\"hide\");\n\t\t\tpowerupProgressbarContainer.classList.add(\"hide\");\n\t\t\tpowerupProgressInfoEl.classList.add(\"hide\");\n\t\t}\n\t}\n}", "_setProgress() {\n const steps = 4;\n const interval = 100 / steps;\n if (this.state.progress < 100) {\n this.setState(prevState => ({\n progress: (1 + this.state.step) * interval\n }));\n }\n }", "function Progress(props) {\n return (\n <h2>\n Pregunta {props.current} de {props.total}\n </h2>\n );\n}", "function updateProgress() {\n let progressLabel = ui.Label({\n value: 'Scanning image collections ' + processedCount + ' of ' + collectionCount,\n style: {fontWeight: 'bold', fontSize: '12px', margin: '10px 5px'}\n });\n\n progressPanel.clear();\n progressPanel.add(progressLabel)\n }", "function changeProgressBar(qCount) {\n\n progress.innerHTML = \"Question \" + (qCount+1) + \" of 10\";\n tracker = id(\"num\" + (qCount+1));\n tracker.style.backgroundColor = \"orange\";\n\n}", "function progress(percent, $element) {\r\n var progressBarWidth = percent * $element.width() / 100;\r\n $element.find('div').animate({ width: progressBarWidth }, 500);\r\n }", "function progress_bar(num, max_num, x, y, width, height, main_color, background_color,bar_padding=0){\n //display background of bar\n c.beginPath();\n c.fillStyle = background_color;\n c.rect(x-bar_padding,y-bar_padding,width+bar_padding*2,height+bar_padding*2);\n c.fill();\n\n //calculate how much progress has been made\n let progress = num/max_num;\n let progress_width = progress*width;\n\n //display the progress\n c.beginPath();\n c.fillStyle = main_color;\n c.rect(x,y,progress_width,height);\n c.fill();\n}", "function updateProgressbarDisplay() {\n if (progressBarProgressionElement) {\n updateStep(progressBarProgressionElement)\n updateCounter()\n }\n }", "function progressView() {\n let diagramBox = document.querySelectorAll('.diagram.progress');\n diagramBox.forEach((box) => {\n let deg = (360 * box.dataset.percent / 100) + 180;\n if (box.dataset.percent >= 50) {\n box.classList.add('over_50');\n } else {\n box.classList.remove('over_50');\n }\n box.querySelector('.piece.right').style.transform = 'rotate(' + deg + 'deg)';\n });\n}", "function progress(percent, $element) {\n var progressBarWidth = percent * $element.width() / 100;\n $element.find('div')\n .animate({ width: progressBarWidth }, 500)\n .html(percent + \"%&nbsp;\");\n}", "function progress(percent, $element) {\n var progressBarWidth = percent * $element.width() / 100;\n $element.find('div')\n .animate({ width: progressBarWidth }, 500)\n .html(percent + \"%&nbsp;\");\n}", "function update_progress(idx){\r\n\t\t$('.step_nb').text(idx +'/'+list_elem_count);\r\n\t}", "function moveProgressBar() {\n\n\tvar status = document.querySelector('#status');\n\ttime = 0;\n\n\tprogress = setInterval(green, 20);\n\n\tfunction green() {\n\t\tif (time >= 100) {\n\t\t\tclearInterval(progress);\n\t\t\texitGame();\n\t\t} else if (score >= 10) {\n\t\t\ttime +=1;\n\t\t} else {\n\t\t\ttime +=0.5;\n\t\t} status.style.width = time + \"%\";\n\t}\n}", "function renderProgress() {\n for (let qIndex = 0; qIndex <= lastQuestion; qIndex++) {\n //let the qIndex equal zero, if the qIndex is less than the last question index then add 1 to qIndex. this loops and creates progress circles for each question until the qIndex is equal to lastQuestion index\n progress.innerHTML += \"<div class='prog' id=\" + qIndex + \"></div>\"; //creates circles for each of the 10 questions, there will be 10 qIndexs since its in a for loop.\n }\n}", "function progress(percent, element) {\n var progressBarWidth = percent * element.width() / 100;\n $(element).find('div').animate({\n width: progressBarWidth\n }, 500);\n }", "_updateProgress() {\n super._updateProgress();\n\n const that = this,\n radius = that.indeterminate ? Math.PI * 100 : Math.PI * 100 - that._percentageValue * Math.PI * 100,\n isIE = /*@cc_on!@*/false || !!document.documentMode,\n isEdge = !isIE && !!window.StyleMedia;\n\n if (that.showProgressValue) {\n const percentage = parseInt(that._percentageValue * 100);\n\n that.$.label.innerHTML = that.formatFunction ? that.formatFunction(percentage) : percentage + '%';\n }\n else {\n that.$.label.innerHTML = '';\n }\n\n //Check if the browser is Edge to make the animation\n if (isIE || isEdge) {\n if (that.value === null || that.indeterminate) {\n that.$.value.style.strokeDashoffset = '';\n that.$.value.setAttribute('class', 'jqx-value jqx-value-animation-ms');\n return;\n }\n else {\n that.$.value.setAttribute('class', 'jqx-value');\n that.$.value.style.strokeDashoffset = that.inverted ? -radius : radius;\n return;\n }\n }\n\n that.$.value.style.strokeDashoffset = that.inverted ? -radius : radius;\n if (that.value === null || that.indeterminate) {\n that.$value.addClass('jqx-value-animation');\n return;\n }\n\n that.$value.removeClass('jqx-value-animation');\n }", "function handleProgress(){\n const percent = (video.currentTime / video.duration) * 100;\n progressBar.style.flexBasis = `${percent}%`;\n}", "function onProgress(n) {\n // round by one digit (0.1234 -> 0.1) and display\n const f = Math.round(n * 10) / 10;\n if (last !== f) {\n console.log(f * 100 + \"%\"); // e.g. renders 10%\n }\n last = f;\n}", "launchprogressbar() {\n\t\tlet percent = this.progressbar.attr(\"data-percent\"); // récupère le data 100% de l\"élément\n this.progressbar.animate( {\n \twidth: percent // on passe de 0% à 100%\n },this.timeout, \"linear\", () => {\n \tthis.progressbar.css(\"width\", 0); // une fois l'animation complète, on revient à 0\n });\n }", "function addProgress() {\n var progressValue = (100 * parseFloat($('#progressBarOne').css('width')) / parseFloat($('#progressBarOne').parent().css('width'))) + '%';\n var progressValueNum = parseFloat(progressValue);\n if (progressValueNum < 99) {\n var finalValue = (progressValueNum + 16.6);\n $('#progressBarOne').css('width', finalValue + \"%\");\n $(\"#progressBarOne\").text(finalValue.toFixed(0) + \"%\");\n\n }\n else {\n $('#progressBarOne').css('width', \"100%\");\n $(\"#progressBarOne\").text(\"100%\");\n\n }\n\n if (finalValue >= 95) {\n $('#progressBarOne').css('background-color', '#56a773')\n }\n}", "function progress($element) {\n \t$this=$element;\n \tprWidth = $(this).data(\"value\")* $element.width() / 100;\n \t$this.find('.bar_filling').each(function(){\n \t\tvar progressBarVal = $(this).find('.bar_value').data('value');\n \t\t$(this).find('.bar_value').text(progressBarVal + \"% \");\n\n \t\tvar progressBarWidth = progressBarVal*$element.width()/100;\n \t\t$(this).animate({ width: progressBarWidth }, progressBarWidth*5); /* change 'progressBarWidth*5' to 2500 (for example) if we want constant speed */ \n \t}) \t\n }", "function updateProgressMeter(pageNumber) {\n var numGoals = $('.goal-rank').length,\n percentIncr = 100;\n if (numGoals) {\n percentIncr = 100 * (1 / $('.goal-rank').length); \n }\n var newPercent = percentIncr * (pageNumber + 1);\n $('.progress-percent').text(newPercent);\n $('#onboarding-meter .meter').width(newPercent + \"%\");\n }", "function updateProgressBar(progress) {\n\n if (!progress) {\n progress = 0;\n }\n\n // get progress bar\n var progress_div = document.getElementById(\"training-progress\");\n\n if (!progress_div) {\n console.warn(\"Missing progress-bar element!\");\n return;\n }\n\n // update progress bar status\n var progress_str = String(progress) + \"%\";\n progress_div.style.width = progress_str;\n //progress_div.setAttribute(\"aria-valuenow\", String(progress));\n progress_div.innerHTML = progress_str;\n\n if (progress >= 100) {\n progress_div.classList.add(\"progress-bar-success\");\n progress_div.classList.add(\"progress-bar-striped\");\n }\n else {\n progress_div.setAttribute(\"class\", \"progress-bar\");\n }\n}", "function updateProgress() {\n // To Update Progress Circle\n circles.forEach((circle, index) => {\n if (index < currentActive) {\n circle.classList.add(\"active\");\n } else {\n circle.classList.remove(\"active\");\n }\n });\n\n // To Update Progress Line\n const actives = document.querySelectorAll(\".active\");\n\n progress.style.width =\n ((actives.length - 1) / (circles.length - 1)) * 100 + \"%\";\n\n if (currentActive === 1) {\n prev.disabled = true;\n } else if (currentActive === circles.length) {\n next.disabled = true;\n } else {\n prev.disabled = false;\n next.disabled = false;\n }\n}", "function calcProgression() {\n return globalState.color\n .split(',')\n .map((value) => parseInt(value, 10))\n .reduce((total, num) => total + num);\n}", "function handleProgress() {\n const percent =\n (selectors.video.currentTime / selectors.video.duration) * 100;\n selectors.progressBar.style.flexBasis = `${percent}%`;\n}", "function ProgressBar({ session, focusDuration, breakDuration }) {\n //calculations for progress bar for focus duration\n const focusDurationSec = focusDuration * 60;\n const focusDecimal = 1 - session?.timeRemaining / focusDurationSec;\n const focusPercentage = focusDecimal * 100 || 0;\n\n //calculations for progress bar for break duration\n const breakDurationSec = breakDuration * 60;\n const breakDecimal = 1 - session?.timeRemaining / breakDurationSec;\n const breakPercentage = breakDecimal * 100;\n\n //return jsx for progress bar\n return (\n <>\n <div className=\"col\">\n <div className=\"progress\" style={{ height: \"20px\" }}>\n <div\n className=\"progress-bar\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={\n session?.label === \"Focusing\" ? focusPercentage : breakPercentage\n } // TODO: Increase aria-valuenow as elapsed time increases\n style={{\n width:\n session?.label === \"Focusing\"\n ? focusPercentage + \"%\"\n : breakPercentage + \"%\",\n }} // TODO: Increase width % as elapsed time increases\n />\n </div>\n </div>\n </>\n );\n}", "function progressComponent(done, size, status) {\n const progress = Math.round((done / size) * 10000) / 100;\n const progressType = status === \"error\" ? \"progress-bar-danger\" : \"progress-bar-success\";\n\n const doneText = fileSize(done);\n const sizeText = fileSize(size);\n let statusText;\n if (status === \"error\") {\n statusText = \"Failed.\";\n } else if (status === \"done\") {\n statusText = `Done (${sizeText}).`;\n } else if (status === \"running\") {\n statusText = `${doneText} of ${sizeText}.`;\n }\n\n return (\n <div>\n <div className=\"progress\">\n <div\n className={`progress-bar ${progressType}`}\n style={{width: `${progress}%`}}>\n </div>\n </div>\n <p className=\"text-center\">\n {statusText}\n </p>\n </div>\n );\n}", "function increment() {\n let maxWidth = document.getElementById('progress-bar').offsetWidth;\n let currentWidth = document.getElementById('my-progress').offsetWidth;\n let newWidth = currentWidth + maxWidth * .1;\n document.getElementById('my-progress').style.width = `${newWidth}px`;\n let progressTextValue = document.getElementById('progress-text').children[0];\n progressTextValue.innerText = String(Number(progressTextValue.innerText) + 10);\n}", "function setProgress2(index) {\r\n\t\tconst calc = ((index + 1) / ($slider2.slick('getSlick').slideCount)) * 100;\r\n\r\n\t\t$progressBar2\r\n\t\t\t.css('background-size', `${calc}% 100%`)\r\n\t\t\t.attr('aria-valuenow', calc);\r\n\t}", "percentCompletion() {\n let totalTasks = this.state.todoList.length,\n finishedTasks = this.state.finished,\n percentDone = Math.floor((finishedTasks / totalTasks) * 100);\n percentDone = isNaN(percentDone) ? 0 : percentDone;\n this.setState({percentDone}, () => {\n localStorage.setItem('done', percentDone);\n });\n }", "function updateProgress() {\n \"use strict\";\n //Gestion progress bar\n $('#quiz-progress').css('width', function () {\n var current = $('#question-number').text(), total = $('#question-total').val();\n return ((current / total) * 100).toString() + \"%\";\n });\n}", "function SetProgress(bar, value){\n\n // temporarily animate the bar\n bar.classList.add(\"progress-bar-animated\");\n\n // set the bar's new value\n bar.style.width = value+\"%\";\n bar.setAttribute(\"aria-valuenow\", value);\n bar.innerText = value + \"%\";\n\n // stop the animation after a pause\n setTimeout( () => {\n bar.classList.remove(\"progress-bar-animated\");\n }, 2000);\n}", "render() {\n\t\treturn (\n\t\t\t<div className=\"container\">\n\t\t\t\t<div className=\"row p-3\"></div>\n\t\t\t\t<div className=\"row p-2\">\n\t\t\t\t<div className=\"col-3 title\">Pollution</div>\n\t\t\t\t<div className=\"col-9\">\n\t\t\t\t\t<ProgressBarComponent percentage={this.state.air*20}/>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"row p-2\">\n\t\t\t\t<div className=\"col-3 title\">Humidity</div>\n\t\t\t\t<div className=\"col-9\">\n\t\t\t\t\t<ProgressBarComponent percentage={this.state.humidity}/>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"row p-2\">\n\t\t\t\t<div className=\"col-3 title\">Precip</div>\n\t\t\t\t<div className=\"col-9\">\n\t\t\t\t\t<ProgressBarComponent percentage={this.state.precipitation*100}/>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"row p-2\">\n\t\t\t\t<div className=\"col-3 title\">Clouds</div>\n\t\t\t\t<div className=\"col-9\" id=\"asdfasd\">\n\t\t\t\t\t<ProgressBarComponent percentage={this.state.clouds}/>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}", "function progress(percent, $element) {\n\t var progressBarWidth = percent * $element.width() / 100;\n\t $element.find('div').animate({ width: progressBarWidth }, 1000).html(percent + \"% \");\n\t}", "updateProgress() {\n let playHead = (100 / this.videoEle.duration) * this.videoEle.currentTime;\n let progressBar = document.querySelector(\".progress\");\n progressBar.style.width = playHead + \"%\";\n this.setState({ progPercent: playHead });\n }", "function handleProgress() {\n const percent = (video.currentTime / video.duration) * 100;\n progressBar.style.flexBasis = `${percent}%`;\n}", "function handleProgress() {\n const percent = (video.currentTime / video.duration) * 100;\n progressBar.style.flexBasis = `${percent}%`;\n}", "function handleProgress() {\n const percent = (video.currentTime / video.duration) * 100;\n progressBar.style.flexBasis = `${percent}%`;\n}", "fromIndextoPercentage() {\n this.setState(state => ({\n percentage: ((state.currentVerbIdx + 1) / VERBS_ORDERED.length) * 100\n }));\n }", "function progress(step, nbSteps, stepLabel) {\n var percent = (step/(nbSteps+1))*100;\n $(\"#progress .progress-bar\").attr('aria-valuenow', step).attr('aria-valuemax', nbSteps+1).attr('style','width:'+percent.toFixed(2)+'%').find(\"span\").html(step + \"/\" + nbSteps);\n $(\"#progressStep\").html(stepLabel);\n}", "function updateProgressBar(){ \r\n\tdocument.getElementById('progress').style.width = [count+1]/30*100+'%'; \r\n}", "function updateStatsUI() {\n countItems();\n var progressBarWidth = percentBar.css('width');\n progressBarWidth = Number(progressBarWidth.slice(0, progressBarWidth.length - 2));\n if (count == 0) {\n percentBarFill.css('width', '0px');\n percentText.text('0%');\n } else {\n percentBarFill.css('width', '' + Math.round(completed / count * progressBarWidth) + 'px');\n percentText.text('' + Math.round(completed / count * 100) + '%');\n }\n}", "function Progress() {\n this.percent = 0;\n this.el = document.createElement('canvas');\n this.ctx = this.el.getContext('2d');\n this.size(50);\n this.fontSize(11);\n this.font('helvetica, arial, sans-serif');\n}", "function updateProgressBar() {\n const percent = (video.currentTime / video.duration) * 100\n progressBar.style.flexBasis =`${percent}%`\n}", "function updateBar(){\n var bar = $('#progress');\n\tif (variables.progress < 100){\n\t\tvariables.progress += 5;\n\t\tbar.width(variables.progress + '%');\n\t} else {\n\t\tvariables.progress = 0;\n\t\tvariables.videos += 1;\n\t\tbar.width(\"0%\");\n\t\tclearKeys();\n\t\tloadRound();\n\t}\n}", "function set_progress(percent)\n{\n\tconsole.log(\"XDDD\");\n\tdocument.getElementById(\"bar\").style.width=percent+\"%\";\n}", "getProgressPercent() {\n const progressPercent = this.state.pastStepCount / this.state.stepGoal;\n return Math.floor(progressPercent * 100);\n }", "simpleProgress(styles) {\n if (this.props.questionCount > 1 && AssessmentStore.isPractice()) {\n return (\n <span\n style={styles.counter}\n aria-label={`You are on question ${this.props.currentIndex + 1} of ${this.props.questionCount}`}\n >\n {this.props.currentIndex + 1} of {this.props.questionCount}\n </span>\n );\n }\n }", "updateProgress() {\n this._Onprogress(this.state.CSVProgress * 100);\n }", "setProgress(percent) {\n const offset = this.circumference - percent / 100 * this.circumference;\n\n let circle = this.container.querySelector('.radialcircle');\n circle.style.strokeDasharray = `${this.circumference} ${this.circumference}`;\n circle.style.strokeDashoffset = offset;\n\n if (this.segments) {\n\n let tickwidth = this.segments * 2;\n\n let seglength = (((this.radius * 2) * Math.PI) - tickwidth) / (this.segments);\n\n let tickmarks = this.container.querySelector('.tickmarks');\n tickmarks.style.strokeDasharray = `2px ${seglength}px`;\n tickmarks.style.strokeDashoffset = 0;\n\n }\n }", "function update() {\n circles.forEach((circle, idx) => {\n if(idx < currentActive) {\n circle.classList.add('active')\n } else {\n circle.classList.remove('active')\n }\n })\n\n const actives = document.querySelectorAll('.active')\n // console.log(actives.length, circles.length)\n //whant to get a percentage for progress width\n //if we look in the css for out progress class,\n //we have the width at 0% and we want to change that\n //so that the line goes to the next circle\n //if we divide the lenghts and then mulitply them by\n //this will get the width as a percent.\n // console.log((actives.length / circles.length)*100)\n\n //progress is from the variables we created earlie\n //style??\n //width is the property that we want to change\n // progress.style.width = (actives.lenght / circles.length)*100\n //^^^does not work because we are multiplying it by a number\n // and we need to be a unit. This is how the css class works\n // width: 100; does not work instead we need width: 100%;\n // we can achieve this by concatinating a % at the end\n // progress.style.width = (actives.length / circles.length)*\n // 100 + '%'\n //^^^this makes the line move however it does not move\n //the right amount, it goes past the circle instead of right\n // to it\n //we can fix this by subtracting 1 from the actives and the \n //circles length which will then give us a small percentage\n // make sure to wrap the statements appropriately so that the \n //math is right\n progress.style.width = (actives.length - 1) / (circles.length - 1) * 100 + '%'\n\n //the prev button is already set disabled to true\n //but when we click next and then if we go back\n //we want it to go back to disabled again\n //this is for the beginning\n if(currentActive === 1) {\n prev.disabled = true\n //if the current btn is equal to the number of circles that \n //there are then we want to set the next button to be \n //disables because then there are no more steps to go\n //and you are done. this is for the end.\n } else if(currentActive === circles.length) {\n next.disabled = true\n //if we are not at the beginning or at the end of the \n //progress then we do not want any of them to be disabled\n //this is because we are in the middle\n } else {\n prev.disabled = false\n next.disabled = false\n }\n}", "_updateProgressBar() {\n if (this.props.samplingState === 'timeout') {\n this.StatusAction.configure({\n progressbar: false,\n animation: false,\n trickle: false\n });\n return;\n }\n if (this.props.samplingState === 'error') {\n this.StatusAction.hide();\n }\n const progress = this.props.samplingProgress;\n // initial schema phase, cannot measure progress, enable trickling\n if (this.props.samplingProgress === -1) {\n this.trickleStop = null;\n this.StatusAction.configure({\n visible: true,\n progressbar: true,\n animation: true,\n trickle: true,\n subview: StatusSubview\n });\n } else if (progress >= 0 && progress < 100 && progress % 5 === 1) {\n if (this.trickleStop === null) {\n // remember where trickling stopped to calculate remaining progress\n const StatusStore = app.appRegistry.getStore('Status.Store');\n this.trickleStop = StatusStore.state.progress;\n }\n const newProgress = Math.ceil(this.trickleStop + (100 - this.trickleStop) / 100 * progress);\n this.StatusAction.configure({\n visible: true,\n trickle: false,\n animation: true,\n progressbar: true,\n subview: StatusSubview,\n progress: newProgress\n });\n } else if (progress === 100) {\n this.StatusAction.done();\n }\n }", "function updateProgress(progressAsPercentage) {\n bodyEl.querySelector(\n \".c8a11y-progress\"\n ).style.width = `${progressAsPercentage}%`;\n }", "function progressBar(elem) {\n $elem = elem;\n // build progress bar elements\n buildProgressBar();\n // start counting\n start();\n }", "function progressBar(elem){\n $elem = elem;\n //build progress bar elements\n buildProgressBar();\n //start counting\n start();\n }", "async function ProgressBar(timer) {\r\n var div = 100 / timer;\r\n percent = 0;\r\n\r\n var counterBack = setInterval(function () {\r\n percent += div;\r\n if (percent <= 100) {\r\n document.getElementById(\"PBar\").style.width = 0 + percent + \"%\";\r\n document.getElementById(\"PBar\").innerHTML = \"Scansione in corso\";\r\n } else {\r\n clearTimeout(counterBack);\r\n document.getElementById(\"PBar\").style.width = 0;\r\n }\r\n\r\n }, 1000);\r\n}" ]
[ "0.65872", "0.65730345", "0.6360369", "0.63334435", "0.63189983", "0.6311207", "0.6309521", "0.63063455", "0.6296162", "0.619475", "0.61631364", "0.6151493", "0.6149023", "0.6141332", "0.6125544", "0.61229694", "0.6116238", "0.61112714", "0.60833883", "0.60608685", "0.6043936", "0.60368186", "0.60039073", "0.59998053", "0.5991408", "0.59872025", "0.59851676", "0.5981227", "0.59348667", "0.59283346", "0.5915239", "0.59129167", "0.59019107", "0.5892192", "0.58889455", "0.5880674", "0.5880585", "0.5867195", "0.58549863", "0.584863", "0.58472914", "0.58405703", "0.58376515", "0.58332115", "0.5822023", "0.5803799", "0.57929045", "0.578756", "0.578441", "0.5781681", "0.57804567", "0.57759213", "0.57582206", "0.57582206", "0.5742798", "0.5742514", "0.5742407", "0.57405466", "0.57387286", "0.5728142", "0.5720572", "0.57178855", "0.57100123", "0.5708431", "0.5705", "0.5701534", "0.56991136", "0.5693677", "0.56898725", "0.5687731", "0.5687592", "0.56825954", "0.56816965", "0.5662287", "0.5661127", "0.5659356", "0.56557727", "0.5649795", "0.56483936", "0.5646453", "0.5646453", "0.5646453", "0.5646244", "0.56419945", "0.5641362", "0.5639071", "0.5635925", "0.5634265", "0.5633028", "0.5631297", "0.562735", "0.56271285", "0.5623725", "0.5623061", "0.5617316", "0.5616573", "0.561322", "0.5610939", "0.5605265", "0.5603742" ]
0.69918656
0
handle the device information
function handle_device(topic, payload) { var deviceID = topic[2]; if (topic[4] == "flx") flx = JSON.parse(payload); if (topic[4] == "sensor") { var config = JSON.parse(payload); for (var obj in config) { var cfg = config[obj]; if (cfg.enable == "1") { if (sensors[cfg.id] == null) { sensors[cfg.id] = new Object(); sensors[cfg.id].id = cfg.id; if (cfg.function != undefined) { sensors[cfg.id].name = cfg.function; } else { sensors[cfg.id].name = cfg.id; } if (cfg.subtype != undefined) sensors[cfg.id].subtype = cfg.subtype; if (cfg.port != undefined) sensors[cfg.id].port = cfg.port[0]; } else { if (cfg.function != undefined) sensors[cfg.id].name = cfg.function; } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _collectDeviceInfo() {\n _device.deviceClass = \"Handset\";\n _device.id = DeviceInfo.getUniqueID(); // Installation ID\n _device.model = DeviceInfo.getModel();\n }", "function Device(listen_port) {\n //a basic device. Many functions are stubs and or return dummy values\n //listen_port: listen for http requests on this port\n //\n HEL.call(this,'cmd',listen_port);\n \n //init device info\n this.port = listen_port;\n this.status = \"ready\"; //other options are \"logging\"\n this.state = \"none\"; //no other state for such a simple device\n this.uuid = this.computeUUID();\n \n //some device state\n this.logging_timer = null;\n this.manager_port = null;\n this.manager_IP = null;\n\n //standard events\n this.addEventHandler('getCode',this.getCodeEvent); \n this.addEventHandler('getHTML',this.getHTMLEvent); \n this.addEventHandler('info',this.info);\n this.addEventHandler('ping',this.info);\n this.addEventHandler('acquire',this.acquire);\n \n //implementation specific events\n //TODO: REPLACE THESE TWO EVENTS WITH YOUR OWN\n this.addEventHandler('startLog',this.startLogging);\n this.addEventHandler('stopLog',this.stopLogging);\n this.addEventHandler('heatOn',this.heaton);\n this.addEventHandler('heatOff',this.heatoff);\n this.addEventHandler('heatAutomatic',this.heatpwm);\n this.addEventHandler('heatAutomaticEnd', this.heatAutomaticEnd);\n this.addEventHandler('desiredTemp',this.desiredTemp);\n this.addEventHandler('cellphoneNumber',this.cellphoneNumber);\n //manually attach to manager.\n this.manager_IP = 'bioturk.ee.washington.edu';\n this.manager_port = 9090;\n this.my_IP = OS.networkInterfaces().eth0[0].address;\n this.sendAction('addDevice',\n {port: listen_port, addr: this.my_IP},\n function(){});\n \n //advertise that i'm here every 10 seconds until i'm aquired\n /*var this_device = this;\n this.advert_timer = setInterval(function(){\n this_device.advertise('224.250.67.238',17768);\n },10000);*/\n}", "function printDeviceInfo(err, deviceInfo, res) {\n if (deviceInfo) {\n console.log('Device ID: ' + deviceInfo.deviceId);\n console.log('Device key: ' + deviceInfo.authentication.symmetricKey.primaryKey);\n }\n}", "deviceUpdate () {\n this.channel && this.deviceSN && this.channel.publish(`device/${this.deviceSN}/info`, JSON.stringify({\n lanIp: Device.NetworkAddr('lanip'),\n llIp: Device.NetworkAddr('linklocal'),\n version: Device.SoftwareVersion(),\n name: Device.deviceName()\n }))\n }", "function DeviceInfo(deviceParams) {\n\t this.viewer = Viewers.CardboardV2;\n\t this.updateDeviceParams(deviceParams);\n\t this.distortion = new Distortion(this.viewer.distortionCoefficients);\n\t}", "function collectDeviceInfo() {\n\tvar deviceDetails = getDeviceInfo();\n var authnData = {\n \"authId\": AUTH_ID,\n \"deviceDetails\": deviceDetails,\n \"hint\": \"MATCH_DEVICE_INFO\" //dont change this value.\n };\n\tconsole.log(\"Collecting device information : \"+authnData)\n authenticate(authnData);\n}", "deviceUpdate () {\n this.channel && this.deviceSN && this.channel.publish(`device/${ this.deviceSN }/info`, JSON.stringify({ \n lanIp: Device.networkInterface().address,\n name: Device.deviceName()\n }))\n }", "function handle_device(topicArray, payload) {\n switch (topicArray[4]) {\n case \"flx\":\n flx = payload;\n break;\n\n case \"sensor\":\n for (var obj in payload) {\n var cfg = payload[obj];\n if (cfg.enable == \"1\") {\n if (sensors[cfg.id] === undefined) sensors[cfg.id] = new Object();\n sensors[cfg.id].id = cfg.id;\n if (cfg.function !== undefined) {\n sensors[cfg.id].name = cfg.function;\n } else if (flx !== undefined && flx[cfg.port] !== undefined) {\n sensors[cfg.id].name = flx[cfg.port].name + \" \" + cfg.subtype;\n }\n if (cfg.subtype !== undefined) sensors[cfg.id].subtype = cfg.subtype;\n if (cfg.port !== undefined) sensors[cfg.id].port = cfg.port[0];\n console.log(\"Detected sensor \" + sensors[cfg.id].id + \" (\" + sensors[cfg.id].name + \")\");\n mqttclient.subscribe(\"/sensor/\" + cfg.id + \"/gauge\");\n mqttclient.subscribe(\"/sensor/\" + cfg.id + \"/counter\");\n }\n }\n break;\n\n default:\n break;\n }\n }", "function DeviceInfo(deviceParams) {\n this.viewer = Viewers.CardboardV2;\n this.updateDeviceParams(deviceParams);\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n}", "function DeviceInfo(deviceParams) {\n this.viewer = Viewers.CardboardV2;\n this.updateDeviceParams(deviceParams);\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n}", "function DeviceInfo(deviceParams) {\n this.viewer = Viewers.CardboardV2;\n this.updateDeviceParams(deviceParams);\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n}", "function DeviceInfo(deviceParams) {\n this.viewer = Viewers.CardboardV2;\n this.updateDeviceParams(deviceParams);\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n}", "function DeviceInfo(deviceParams) {\n this.viewer = Viewers.CardboardV2;\n this.updateDeviceParams(deviceParams);\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n}", "function DeviceInfo(deviceParams) {\n this.viewer = Viewers.CardboardV2;\n this.updateDeviceParams(deviceParams);\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n}", "async logDeviceInfo() {\n try {\n let sysinfo = await this.iologik.getSysInfo();\n for (let key in sysinfo) {\n this.log(key + ': ' + sysinfo[key]);\n }\n } catch (e) {\n this.emit('error', e);\n }\n }", "device(req, res) {\n\n }", "get deviceNumber() { return this._deviceNumber; }", "get device () {\n\t\treturn this._device;\n\t}", "function getDeviceInformation(){\n\tvar XmlString = \"\";\n\tvar devicesArr = getDevicesNodeJSON();\n\tif(devicesArr.length){\n\t\tfor(var t=0; t<devicesArr.length; t++){\n\t\t\tvar device = devicesArr[t];\t\n\t\t\tXmlString += \"<DEVICES DeviceName='\"+device.DeviceName+\"' DeviceType='\"+device.DeviceType+\"' ObjectPath='\"+device.ObjectPath+\"'\";\n\t\t\tXmlString += \" Model='\"+device.Model+\"' DNDModelType='\"+device.DNDModelType+\"' SoftwareVersion='\"+device.SoftwareVersion+\"'\";\n\t\t\tXmlString += \" OSVersion='\"+device.OSVersion+\"' OSType='\"+device.OSType+\"' SoftwarePackage='\"+device.SoftwarePackage+\"'\";\n\t\t\tXmlString += \" ReEvaluate='\"+device.ReEvaluate+\"' IpAddress='\"+device.IpAddress+\"' DeviceId='\"+device.DeviceId+\"'\";\n\t\t\tXmlString += \" HostName='\"+device.DeviceName+\"' UpdateFlag='new' MediaType='\"+device.MediaType+\"'\";\n\t\t\tXmlString += \" Portname='\"+device.Portname+\"' ManagementIp='\"+device.ManagementIp+\"' ManagementIp2='\"+device.ManagementIp2+\"'\";\n\t\t\tXmlString += \" Auxiliary='\"+device.Auxiliary+\"' DiscoveryFlag='\"+device.DiscoveryFlag+\"' Exclusivity='\"+device.Exclusivity+\"'\";\n\t\t\tXmlString += \" XLocation='\"+device.XLocation+\"' YLocation='\"+device.YLocation+\"' PowerStatus='\"+device.PowerStatus+\"'\";\n\t\t\tXmlString += \" Power='\"+device.Power+\"' TftpIpAddress='\"+device.TftpIpAddress+\"' TftpHostname='\"+device.TftpHostname+\"'\";\n\t\t\tXmlString += \" TftpImagePath='\"+device.TftpImagePath+\"' TftpImageName='\"+device.TftpImageName+\"' TftpUser='\"+device.TftpUser+\"'\";\n\t\t\tXmlString += \" TftpPassword='\"+device.TftpPassword+\"' TftpAddress='\"+device.TftpAddress+\"' TacacsIpAddress='\"+device.TacacsIpAddress+\"'\";\n\t\t\tXmlString += \" TacacsHostname='\"+device.TacacsHostname+\"' RadiusHostname='\"+device.RadiusHostname+\"'\";\n\t\t\tXmlString += \" RadiusIpAddress='\"+device.RadiusIpAddress+\"' RadiusUsername='\"+device.RadiusUsername+\"'\";\n\t\t\tXmlString += \" RadiusPassword='\"+device.RadiusPassword+\"' Description='\"+device.Description+\"' Processor='\"+device.Processor+\"'\";\n\t\t\tXmlString += \" ProcessorBoardId='\"+device.ProcessorBoardId+\"' Manufacturer='\"+device.Manufacturer+\"' SerialNumber='\"+device.SerialNumber+\"'\";\n\t\t\tXmlString += \" IOS='\"+device.IOS+\"' CPUSpeed='\"+device.CPUSpeed+\"' SystemMemory='\"+device.SystemMemory+\"' NVRAMCF='\"+device.NVRAMCF+\"'\";\n\t\t\tXmlString += \" ProcessorMemory='\"+device.ProcessorMemory+\"' ConnectivityDone='\"+device.ConnectivityDone+\"'\";\n\t\t\tXmlString += \" ReachabilityDone='\"+device.ReachabilityDone+\"' ConvergenceDone='\"+device.ConvergenceDone+\"'\";\n\t\t\tXmlString += \" TFTPUser='\"+device.TFTPUser+\"' TFTPPassword='\"+device.TFTPPassword+\"' FTPServer='\"+device.FTPServer+\"'\";\n\t\t\tXmlString += \" TFTPServer='\"+device.TFTPServer+\"' FTPUser='\"+device.FTPUser+\"' FTPPassword='\"+device.FTPPassword+\"'\";\n\t\t\tXmlString += \" ConfigDetail='\"+device.ConfigDetail+\"' ConfigFilePath='\"+device.ConfigFilePath+\"' ConfigFileName='\"+device.ConfigFileName+\"'\";\n\t\t\tXmlString += \" ConfigUrl='\"+device.ConfigUrl+\"' SaveConfigUrl='\"+device.SaveConfigUrl+\"' ConfigServer='\"+device.ConfigServer+\"'\";\n\t\t\tXmlString += \" ConfigDestination='\"+device.ConfigDestination+\"' ImageFilePath='\"+device.ImageFilePath+\"'\";\n\t\t\tXmlString += \" ImageDetail='\"+device.ImageDetail+\"' ImageFileName='\"+device.ImageFileName+\"' ImageUrl='\"+device.ImageUrl+\"'\";\n\t\t\tXmlString += \" SaveImageUrl='\"+device.SaveImageUrl+\"' ImageServer='\"+device.ImageServer+\"' ImageDestination='\"+device.ImageDestination+\"'\";\n\t\t\tXmlString += \" SaveImageEnable='\"+device.SaveImageEnable+\"' SaveConfigEnable='\"+device.SaveConfigEnable+\"'\";\n\t\t\tXmlString += \" LoadConfigEnable='\"+device.LoadConfigEnable+\"' LoadImageEnable='\"+device.LoadImageEnable+\"'\";\n\t\t\tXmlString += \" SaveImageDetail='\"+device.SaveImageDetail+\"' SaveImageServer='\"+device.SaveImageServer+\"'\";\n\t\t\tXmlString += \" SaveImageDestination='\"+device.SaveImageDestination+\"' SaveImageUser='\"+device.SaveImageUser+\"'\";\n\t\t\tXmlString += \" SaveImagePassword='\"+device.SaveImagePassword+\"' SaveImageType='\"+device.SaveImageType+\"'\";\n\t\t\tXmlString += \" SaveConfigDetail='\"+device.SaveConfigDetail+\"' SaveConfigServer='\"+device.SaveConfigServer+\"'\";\n\t\t\tXmlString += \" SaveConfigDestination='\"+device.SaveConfigDestination+\"' SaveConfigUser='\"+device.SaveConfigUser+\"'\";\n\t\t\tXmlString += \" SaveConfigPassword='\"+device.SaveConfigPassword+\"' SaveConfigType='\"+device.SaveConfigType+\"'\";\n\t\t\tXmlString += \" SaveConfigFileName='\"+device.SaveConfigFileName+\"' SaveImageFileName='\"+device.SaveImageFileName+\"'\";\n\t\t\tXmlString += \" SystemImageName='\"+device.SystemImageName+\"' SystemConfigName='\"+device.SystemConfigName+\"'\";\n\t\t\tXmlString += \" SaveTypeImage='\"+device.SaveTypeImage+\"' TypeImage='\"+device.TypeImage+\"' SaveTypeConfig='\"+device.SaveTypeConfig+\"'\";\n\t\t\tXmlString += \" TypeConfig='\"+device.TypeConfig+\"' ChassisPid='\"+device.ChassisPid+\"' ChassisVid='\"+device.ChassisVid+\"'\";\n\t\t\tXmlString += \" ManagementInterface='\"+device.ManagementInterface+\"' ManagementInterface2='\"+device.ManagementInterface2+\"'\";\n\t\t\tXmlString += \" CheckConnectivity='' ConnectivityFlag='\"+device.ConnectivityFlag+\"' Reachability='' ReachabilityFlag='' ConvergenceFlag='' MainPortOnSwitch=''\";\n\t\t\tXmlString += \" FabricPort='' OrangeFlag='' PortType='' DeviceRole='' FabricPortOnSwitch='' PortOnSlot='' Slot=''\";\n\t\t\tXmlString += getFilterAttribute(device);\n\t\t\tXmlString += getTitanInformation(device);\n\t\t\tXmlString += \">\";\n\t\t\tXmlString += getDeviceInformation2(device);\n\t\t\tXmlString += getDeviceChild(device);\n\t\t\tXmlString +=\"</DEVICES>\";\n\t\t}\n\t}\n\treturn XmlString;\n}", "async readData(index, device_id) {\n\t\t// Read WLED API, trow warning in case of issues\n\t\t// const objArray = await this.getAPI('http://' + index + '/json');\n\t\tconst deviceInfo = await this.getAPI('http://' + index + '/json/info');\n\t\tif (!deviceInfo) {\n\t\t\tthis.log.debug('Info API call error, will retry in scheduled interval !');\n\t\t\treturn 'failed';\n\t\t} else {\n\t\t\tthis.log.debug('Info Data received from WLED device ' + JSON.stringify(deviceInfo));\n\t\t}\n\n\t\ttry {\n\t\t\tconst device_id = deviceInfo.mac;\n\n\t\t\t// Create Device, channel id by MAC-Adress and ensure relevant information for polling and instance configuration is part of device object\n\t\t\tawait this.extendObjectAsync(device_id, {\n\t\t\t\ttype: 'device',\n\t\t\t\tcommon: {\n\t\t\t\t\tname: deviceInfo.name\n\t\t\t\t},\n\t\t\t\tnative: {\n\t\t\t\t\tip: index,\n\t\t\t\t\tmac: deviceInfo.mac,\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// Update device working state\n\t\t\tawait this.create_state(device_id + '._info' + '._online', 'online', true);\n\n\t\t\t// Read info Channel\n\t\t\tfor (const i in deviceInfo) {\n\n\t\t\t\tthis.log.debug('Datatype : ' + typeof (deviceInfo[i]));\n\n\t\t\t\t// Create Info channel\n\t\t\t\tawait this.setObjectNotExistsAsync(device_id + '._info', {\n\t\t\t\t\ttype: 'channel',\n\t\t\t\t\tcommon: {\n\t\t\t\t\t\tname: 'Basic information',\n\t\t\t\t\t},\n\t\t\t\t\tnative: {},\n\t\t\t\t});\n\n\t\t\t\t// Create Channels for led and wifi configuration\n\t\t\t\tswitch (i) {\n\t\t\t\t\tcase ('leds'):\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(device_id + '._info.leds', {\n\t\t\t\t\t\t\ttype: 'channel',\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: 'LED stripe configuration\t',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ('wifi'):\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(device_id + '._info.wifi', {\n\t\t\t\t\t\t\ttype: 'channel',\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: 'Wifi configuration\t',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t}\n\n\t\t\t\t// Create states, ensure object structures are reflected in tree\n\t\t\t\tif (typeof (deviceInfo[i]) !== 'object') {\n\n\t\t\t\t\t// Default channel creation\n\t\t\t\t\tthis.log.debug('State created : ' + i + ' : ' + JSON.stringify(deviceInfo[i]));\n\t\t\t\t\tawait this.create_state(device_id + '._info.' + i, i, deviceInfo[i]);\n\n\t\t\t\t} else {\n\t\t\t\t\tfor (const y in deviceInfo[i]) {\n\t\t\t\t\t\tthis.log.debug('State created : ' + y + ' : ' + JSON.stringify(deviceInfo[i][y]));\n\t\t\t\t\t\tawait this.create_state(device_id + '._info.' + i + '.' + y, y, deviceInfo[i][y]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Get effects (if not already in memory\n\t\t\tif (!this.effects[device_id]){\n\t\t\t\tinitialise[device_id] = true;\n\t\t\t\tconst effects = await this.getAPI('http://' + index + '/json/eff');\n if (this.IsJsonString(effects)) { // arteck\n \t\t\t\tif (!effects) {\n \t\t\t\t\tthis.log.debug('Effects API call error, will retry in scheduled interval !');\n \t\t\t\t} else {\n \t\t\t\t\tthis.log.debug('Effects Data received from WLED device ' + JSON.stringify(effects));\n \t\t\t\t\t// Store effects array\n \t\t\t\t\tthis.effects[device_id] = {};\n \t\t\t\t\tfor (const i in effects) {\n \t\t\t\t\t\tthis.effects[device_id][i] = effects[i];\n \t\t\t\t\t}\n \t\t\t\t}\n }\n\t\t\t}\n\n\t\t\t// Get pallets (if not already in memory\n\t\t\tif (!this.palettes[device_id]) {\n\t\t\t\tinitialise[device_id] = true;\n\t\t\t\tconst pallets = await this.getAPI('http://' + index + '/json/pal');\n\t\t\t\tif (!pallets) {\n\t\t\t\t\tthis.log.debug('Effects API call error, will retry in scheduled interval !');\n\t\t\t\t} else {\n\t\t\t\t\tthis.log.debug('Effects Data received from WLED device ' + JSON.stringify(pallets));\n\t\t\t\t\t// Store effects array\n\t\t\t\t\tthis.palettes[device_id] = {};\n\t\t\t\t\t// Store pallet array\n\t\t\t\t\tfor (const i in pallets) {\n\t\t\t\t\t\tthis.palettes[device_id][i] = pallets[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Read state Channel\n\t\t\tconst deviceStates = await this.getAPI('http://' + index + '/json/state');\n\t\t\tfor (const i in deviceStates) {\n\n\t\t\t\tthis.log.debug('Datatype : ' + typeof (deviceStates[i]));\n\n\t\t\t\t// Create Channels for nested states\n\t\t\t\tswitch (i) {\n\t\t\t\t\tcase ('ccnf'):\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(device_id + '.ccnf', {\n\t\t\t\t\t\t\ttype: 'channel',\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: 'ccnf',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ('nl'):\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(device_id + '.nl', {\n\t\t\t\t\t\t\ttype: 'channel',\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: 'Nightlight',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ('udpn'):\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(device_id + '.udpn', {\n\t\t\t\t\t\t\ttype: 'channel',\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: 'Broadcast (UDP sync)',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ('seg'):\n\n\t\t\t\t\t\tthis.log.debug('Segment Array : ' + JSON.stringify(deviceStates[i]));\n\n\t\t\t\t\t\tawait this.setObjectNotExistsAsync(device_id + '.seg', {\n\t\t\t\t\t\t\ttype: 'channel',\n\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\tname: 'Segmentation',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tfor (const y in deviceStates[i]) {\n\n\t\t\t\t\t\t\tawait this.setObjectNotExistsAsync(device_id + '.seg.' + y, {\n\t\t\t\t\t\t\t\ttype: 'channel',\n\t\t\t\t\t\t\t\tcommon: {\n\t\t\t\t\t\t\t\t\tname: 'Segment ' + y,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnative: {},\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tfor (const x in deviceStates[i][y]) {\n\t\t\t\t\t\t\t\tthis.log.debug('Object states created for channel ' + i + ' with parameter : ' + y + ' : ' + JSON.stringify(deviceStates[i][y]));\n\n\t\t\t\t\t\t\t\tif (x !== 'col') {\n\n\t\t\t\t\t\t\t\t\tawait this.create_state(device_id + '.' + i + '.' + y + '.' + x, x, deviceStates[i][y][x]);\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.log.debug('Naming : ' + x + ' with content : ' + JSON.stringify(deviceStates[i][y][x][0]));\n\n\t\t\t\t\t\t\t\t\t// Translate RGB values to HEX\n\t\t\t\t\t\t\t\t\tconst primaryRGB = deviceStates[i][y][x][0].toString().split(',');\n\t\t\t\t\t\t\t\t\tconst primaryHex = rgbHex(parseInt(primaryRGB[0]), parseInt(primaryRGB[1]), parseInt(primaryRGB[2]));\n\t\t\t\t\t\t\t\t\tconst secondaryRGB = deviceStates[i][y][x][1].toString().split(',');\n\t\t\t\t\t\t\t\t\tconst secondaryHex = rgbHex(parseInt(secondaryRGB[0]), parseInt(secondaryRGB[1]), parseInt(secondaryRGB[2]));\n\t\t\t\t\t\t\t\t\tconst tertiaryRGB = deviceStates[i][y][x][2].toString().split(',');\n\t\t\t\t\t\t\t\t\tconst tertiaryHex = rgbHex(parseInt(tertiaryRGB[0]), parseInt(tertiaryRGB[1]), parseInt(tertiaryRGB[2]));\n\n\t\t\t\t\t\t\t\t\t// Write RGB and HEX information to states\n\t\t\t\t\t\t\t\t\tawait this.create_state(device_id + '.' + i + '.' + y + '.' + x + '.0', 'Primary Color RGB', deviceStates[i][y][x][0]);\n\t\t\t\t\t\t\t\t\tawait this.create_state(device_id + '.' + i + '.' + y + '.' + x + '.0_HEX', 'Primary Color HEX', '#' + primaryHex);\n\t\t\t\t\t\t\t\t\tawait this.create_state(device_id + '.' + i + '.' + y + '.' + x + '.1', 'Secondary Color RGB (background)', deviceStates[i][y][x][1]);\n\t\t\t\t\t\t\t\t\tawait this.create_state(device_id + '.' + i + '.' + y + '.' + x + '.1_HEX', 'Secondary Color HEX (background)', '#' + secondaryHex);\n\t\t\t\t\t\t\t\t\tawait this.create_state(device_id + '.' + i + '.' + y + '.' + x + '.2', 'Tertiary Color RGB', deviceStates[i][y][x][2]);\n\t\t\t\t\t\t\t\t\tawait this.create_state(device_id + '.' + i + '.' + y + '.' + x + '.2_HEX', 'Tertiary Color HEX', '#' + tertiaryHex);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t}\n\n\t\t\t\t// Create states, ensure object structures are reflected in tree\n\t\t\t\tif (typeof (deviceStates[i]) !== 'object') {\n\n\t\t\t\t\t// Default channel creation\n\t\t\t\t\tthis.log.debug('Default state created : ' + i + ' : ' + JSON.stringify(deviceStates[i]));\n\t\t\t\t\tawait this.create_state(device_id + '.' + i, i, deviceStates[i]);\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfor (const y in deviceStates[i]) {\n\t\t\t\t\t\tif (typeof (deviceStates[i][y]) !== 'object') {\n\t\t\t\t\t\t\tthis.log.debug('Object states created for channel ' + i + ' with parameter : ' + y + ' : ' + JSON.stringify(deviceStates[i][y]));\n\t\t\t\t\t\t\tawait this.create_state(device_id + '.' + i + '.' + y, y, deviceStates[i][y]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Create additional states not included in JSON-API of WLED but available as SET command\n\t\t\tawait this.create_state(device_id + '.tt', 'tt', null);\n\t\t\tawait this.create_state(device_id + '.psave', 'psave', null);\n\t\t\tawait this.create_state(device_id + '.udpn.nn', 'nn', null);\n\t\t\tawait this.create_state(device_id + '.time', 'time', null);\n\n\t\t\treturn 'success';\n\n\t\t} catch (error) {\n\n\t\t\t// Set alive state to false if data read fails\n\t\t\tawait this.setStateAsync(this.devices[index] + '._info' + '._online', {\n\t\t\t\tval: false,\n\t\t\t\tack: true\n\t\t\t});\n\t\t\tthis.log.error('Read Data error : ' + error);\n\t\t\treturn 'failed';\n\t\t}\n\t}", "function showDeviceInfo() {\n\tvar devInfo = document.getElementById(\"deviceDisplay\");\n\n devInfo.innerHTML = \"Device Name: \" + device.name + \"<br/>\" + \n \"Device Model: \" + device.model + \"<br/>\" + \n \"Device Platform: \" + device.platform + \"<br/>\" + \n \"Platform Version: \" + device.version + \"<br/>\" + \n \"Device UUID: \" + device.uuid + \"<br/>\" +\n \"Cordova Version: \" + device.cordova + \"<br/>\";\n}", "async getRequestDeviceInfo() {\n const outputReportID = 0x01;\n const subcommand = [0x02];\n const data = [\n 0x00,\n 0x00,\n 0x00,\n 0x00,\n 0x00,\n 0x00,\n 0x00,\n 0x00,\n 0x00,\n ...subcommand,\n ];\n await this.device.sendReport(outputReportID, new Uint8Array(data));\n\n return new Promise((resolve) => {\n const onDeviceInfo = ({ detail: deviceInfo }) => {\n this.removeEventListener('deviceinfo', onDeviceInfo);\n delete deviceInfo._raw;\n delete deviceInfo._hex;\n resolve(deviceInfo);\n };\n this.addEventListener('deviceinfo', onDeviceInfo);\n });\n }", "function onDeviceReady() {\n log.innerHTML += \"Device ready <br />\";\n\n var element = document.getElementById('device_details');\n\n element.innerHTML = 'Device Name: ' + device.name + '<br />' +'<br/>' +\n 'Device Cordova: ' + device.cordova + '<br />' + '<br/>' +\n 'Device Platform: ' + device.platform + '<br />' + '<br/>' +\n 'Device UUID: ' + device.uuid + '<br />' + '<br/>' +\n 'Device Version: ' + device.version + '<br />' + '<br/>';\n\n log.innerHTML += \"Device details updated <br />\";\n}", "retrieveDevice(req, res) {\n res.json({ message: \"Device\", data: req.device });\n }", "_processDeviceSCPD(callback)\r\n {\r\n\t\tLogger.log(\"Specialisation for WemoMaker Deviceevent\", LogType.INFO);\r\n //Création des infos spécifiques au Maker decodable dans le attributeList\r\n\t\tvar xmlTemplate = fs.readFileSync(__dirname+'/../../resources/ServicesTemplate.xml', 'utf8');\r\n\t\txml2js.parseString(xmlTemplate, (err, templatesData) => {\r\n templatesData.servicesTemplate.serviceTemplate.forEach((serviceTemplate) => {\r\n if ((serviceTemplate['$']['serviceType'] == this._type || !serviceTemplate['$']['serviceType']) &&\r\n (serviceTemplate['$']['deviceType'] == this.Device.Type || !serviceTemplate['$']['deviceType']))\r\n {\r\n Logger.log(\"Processing scpd template\", LogType.DEBUG);\r\n this.processSCPD(serviceTemplate.scpd[0],false);\r\n\r\n //On s'abonne au evenement de la variable attributeList pour en faire le decodage\r\n var attributeList = this.getVariableByName('attributeList');\r\n if (!attributeList)\r\n {\r\n Logger.log(\"Unable to find attributeList variable of the Wemo Maker \" + this.Device.BaseAddress, LogType.ERROR);\r\n return;\r\n }\r\n attributeList.on('updated', (varObj, newVal) =>\t{\r\n xml2js.parseString(\"<AttributeList>\"+XmlEntities.decode(newVal)+\"</AttributeList>\", (err, parsed) => {\r\n if (err)\r\n {\r\n Logger.log(\"Unable to parse xml (bad format? : \" + err, LogType.DEBUG);\r\n }\r\n else\r\n {\r\n parsed.AttributeList.attribute.forEach((attr) => {\r\n var variable = this.getVariableByName(attr.name[0]);\r\n if (variable)\r\n {\r\n variable.Value = attr.value[0];\r\n if (attr.name[0] == 'SwitchMode')\r\n {\r\n var humanVariable = this.getVariableByName('Human'+attr.name[0]);\r\n if (attr.value[0] == '0') humanVariable.Value = 'OnOff';\r\n else humanVariable.Value = 'Momentary';\r\n }\r\n }\r\n else\r\n {\r\n Logger.log(\"Unable to find \" + attr.name[0] + \" variable of the Wemo Maker \" + this.Device.BaseAddress, LogType.ERROR);\r\n }\r\n\r\n });\r\n }\r\n });\r\n\t\t\t\t\t});\r\n }\r\n });\r\n if (this._eventSubURL != '/') this.subscribe();\r\n\t\t});\r\n }", "async getDeviceDetails() {\n return this.digestClient\n .fetch(\n `http://${this.dahua_host}/cgi-bin/magicBox.cgi?action=getSystemInfo`\n )\n .then((r) => r.text())\n .then((text) => {\n const deviceDetails = text\n .trim()\n .split('\\n')\n .reduce((obj, str) => {\n const [key, val] = str.split('=');\n obj[key] = val.trim();\n return obj;\n }, {});\n return deviceDetails;\n });\n }", "function getDeviceInfo(response) {\n var clients = response.data[0].result.client;\n if (clients.length === 0) {\n return [];\n } else {\n var attrs = { description: true, key: true, tags: true, basic: true, subscribers: true, shares: true, aliases: true};\n var calls = _.map(clients, (client) => {\n return { procedure: 'info', arguments: [client, attrs] };\n });\n return rpc(calls).then(\n (response) => {\n var zipped = _.zip(response.data, clients);\n response.data = _.map(zipped, (tuple) => {\n var device = tuple[0].result;\n device['client_id'] = tuple[1];\n if (device.description.meta) {\n device.description.meta = JSON.parse(device.description.meta);\n } else {\n device.description.meta = {};\n }\n return device;\n });\n return response;\n },\n (response) => {\n console.log('error', response);\n }\n );\n }\n }", "function getDeviceInfo(){\n devicePlatform = device.platform;\n deviceVersion = device.version;\n deviceIsIOS = (devicePlatform == \"iOS\");\n deviceIsAndroid = (devicePlatform == \"android\") || (devicePlatform == \"Android\") || (devicePlatform == \"amazon-fireos\")\n if (deviceIsIOS) {\n if (deviceVersion.indexOf(\"8\") == 0) {\n deviceIOSVersion = 8\n } else if (deviceVersion.indexOf(\"7\") == 0) {\n deviceIOSVersion = 7\n } else if (deviceVersion.indexOf(\"6\") == 0) {\n deviceIOSVersion = 6\n } else if (deviceVersion.indexOf(\"5\") == 0) {\n deviceIOSVersion = 5\n } else {\n deviceIOSVersion = 4 // iOS version <= 4\n }\n }\n}", "function getDeviceInfo(devname) {\r\n\t\tvar driverentry = null;\r\n\t\tvar device = null;\r\n\t\tif (devname) {\r\n\t\t device = g.devicemap[devname];\r\n\t\t if (device && device.driver) {\r\n\t\t \t// now lookup driver\r\n\t\t \tdriverentry = g.drivermap[device.driver];\r\n\t\t\t}\r\n\t if (!device) {\r\n\t g.log(g.LOG_ERROR,\"no device: \" + devname);\r\n\t }\r\n\t\t}\r\n\t\tif (!driverentry) {\r\n\t\t\tg.log(g.LOG_ERROR,\"driver for \" + devname + \" not found: \");\r\n\t\t}\r\n\r\n\t \treturn {driver: driverentry, 'device': device};\r\n\t}", "function getDeviceInformation2(device){\n\tvar XmlString = \"\";\n\tif(device.DEVICE != null && device.DEVICE != undefined){\n\t\tvar devObject = device.DEVICE[0];\n\t\tXmlString += \"<DEVICE ChassisAddress='\"+devObject.ChassisAddress+\"' LoopBackAddress='' ObjectPath='\"+devObject.ObjectPath+\"' Username='\"+devObject.Username+\"'\";\n\t\tXmlString += \" ESXIUsername='\"+devObject.ESXIUsername+\"' Password='\"+devObject.Password+\"' ESXIPassword='\"+devObject.ESXIPassword+\"'\";\n\t\tXmlString += \" Status='\"+devObject.Status+\"' DeviceName='\"+devObject.DeviceName+\"' DevName='\"+devObject.DevName+\"'\";\n\t\tXmlString += \" DeviceId='\"+devObject.DeviceId+\"' RedFlag='\"+devObject.RedFlag+\"' ModelType='\"+devObject.ModelType+\"'\";\n\t\tXmlString += \" DNDModelType='\"+devObject.DNDModelType+\"' DeviceResId='\"+devObject.DeviceResId+\"' MacAddress='\"+devObject.MacAddress+\"'\";\n\t\tXmlString += \" DeviceFlag='\"+devObject.DeviceFlag+\"' HostName='\"+devObject.HostName+\"'\";\n\t\tXmlString += \" MediaType='\"+devObject.MediaType+\"' Portname='\"+devObject.Portname+\"' DBResId='\"+devObject.DBResId+\"'\";\n\t\tXmlString += \" ConnectivityType='\"+devObject.ConnectivityType+\"' PortSpeed='\"+devObject.PortSpeed+\"'\";\n\t\tXmlString += \" PortBandWidth='\"+devObject.PortBandWidth+\"' ExactHostName='\"+devObject.ExactHostName+\"'\";\n\t\tXmlString += \" LoadFlag='\"+devObject.LoadFlag+\"' PortView='\"+devObject.PortView+\"' Discovery='\"+devObject.Discovery+\"'\";\n\t\tXmlString += \" RouteProcessor='\"+devObject.RouteProcessor+\"' EmbeddedProcessor='\"+devObject.EmbeddedProcessor+\"'\";\n\t\tXmlString += \" LineCard='\"+devObject.LineCard+\"' ExactIpAdd='\"+devObject.ExactIpAdd+\"' PowerStatus='\"+devObject.PowerStatus+\"'\";\n\t\tXmlString += \" Application='\"+devObject.Application+\"' ProtoTypeFlag='\"+devObject.ProtoTypeFlag+\"'\";\n\t\tXmlString += \" SwitchPort='\"+devObject.SwitchPort+\"' MapName='\"+devObject.MapName+\"' ControllerInfo='\"+devObject.ControllerInfo+\"'\";\n\t\tXmlString += \" DeviceType='\"+devObject.DeviceType+\"'\";\n\t\tXmlString += \" />\";\n\t}\n\treturn XmlString;\n}", "get device() {\n\t\treturn this.__device;\n\t}", "function deviceInfo(){\n var content = \"\";\n content += \"Device \" + device.model + \"<br/>\"; // this returns device's name and/or model\n content += \"OS \" + device.platform + \"<br/>\"; // this returns device os's name\n content += \"Version \"+ device.version +\"<br/>\"; // this returns device os's version\n content += \"Cordova \"+ device.cordova +\"<br/>\"; // cordova version of running device\n\n\n document.getElementById('deviceInfo').innerHTML = content;\n}", "function HMDVRDevice() {\n\t}", "function getAllDevicesReturned( event, sucess, data, response ) {\n if(sucess && data != null) {\n var parsed = JSON.parse(JSON.stringify(data));\n initLivingRoom(parsed.allRooms[0]);\n initKitchen(parsed.allRooms[1]);\n }\n\n //todo - add error handling to UI here\n }", "function initDevice( device_data ) {\n Homey.log(\"entering initDevice\");\n var nameSetting = {name: device_data.name};\n module.exports.getSettings( device_data, function( err, settings ){\n if (err) {\n Homey.log(\"error retrieving device settings\");\n } else { // after settings received build the new device object\n Homey.log(\"retrieved settings are:\");\n Homey.log(settings);\n if (settings==(' '||{}||undefined)) { settings=nameSetting };\n buildDevice(device_data, settings);\n startPolling(device_data);\n }\n });\n}", "function processInputStreamData(data) \n{\n if(data.entityId.type == 'DeviceProfile.awsiot') {\n doMediation(data);\t\t\n } else {\n onReceivedNGSIUpdate(data);\n }\t \n}", "function get_type()\n\t{\n\t\treturn device_type;\n\t}", "function onDeviceReady() {}", "function onDeviceReady() {\n \n }", "getDeviceInfo() {\n const deviceInfo = [\n detectOS(navigator.userAgent),\n AFRAME.utils.device.isBrowserEnvironment ? 1 : 0,\n AFRAME.utils.device.checkARSupport() ? 1 : 0,\n AFRAME.utils.device.checkHeadsetConnected() ? 1 : 0,\n AFRAME.utils.device.isIOS() ? 1 : 0,\n AFRAME.utils.device.isLandscape() ? 1 : 0,\n AFRAME.utils.device.isMobile() ? 1 : 0,\n AFRAME.utils.device.isMobileVR() ? 1 : 0,\n AFRAME.utils.device.isOculusBrowser() ? 1 : 0,\n AFRAME.utils.device.isR7() ? 1 : 0,\n AFRAME.utils.device.isTablet() ? 1 : 0,\n AFRAME.utils.device.isWebXRAvailable ? 1 : 0\n ];\n console.log('The device info is: ',deviceInfo)\n return deviceInfo;\n }", "function handleDeviceClick() {\r\n var did = $(this).attr('did');\r\n if (device_array.indexOf(did) > -1) {\r\n $(this).attr('class', 'device');\r\n device_array.splice(device_array.indexOf(did), 1);\r\n } else {\r\n device_array.push(did);\r\n $(this).attr('class', 'device device-active');\r\n }\r\n }", "function initDevice( device_data ) {\n devices[ device_data.id ] = {};\n devices[ device_data.id ].state = { onoff: true };\n devices[ device_data.id ].data = device_data;\n}", "function _got_info(data){\n\t\tvar mid = data['model_id'] || null;\n\t\tvar uid = data['user_id'] || '???';\n\t\tvar ucolor = data['user_color'] || '???';\n\t\tvar signal = data['signal'] || '???';\n\t\tvar intention = data['intention'] || '???';\n\t\tvar message = data['message'] || '???';\n\t\tvar message_type = data['message_type'] || '???';\n\n\t\t// Check to make sure it interestes us.\n\t\tif( ! mid || mid != anchor.model_id ){\n\t\t ll('skip info packet--not for us');\n\t\t}else{\n\t\t ll('received info');\n\t\t\n\t\t // Trigger whatever function we were given.\n\t\t if(typeof(on_info_event) !== 'undefined' && on_info_event){\n\t\t\ton_info_event(data, uid, ucolor);\n\t\t }\n\t\t}\n\t }", "_setupDeviceChange() {\n\t\tlet $deviceSelection = this.deviceSelection.render();\n\t\tthis.$control.find( 'device-selection' ).replaceWith( $deviceSelection );\n\n\t\tthis.deviceSelection.$inputs.on( 'change', () => {\n\t\t\tconst selectedDevice = this.deviceSelection.getSelectedValue();\n\t\t\tlet settings,\n\t\t\t\tisLinkedToBase;\n\t\t\tif ( this.configDefaults.media.base ) {\n\t\t\t\tsettings = this.configDefaults.media.base,\n\t\t\t\tisLinkedToBase = true;\n\t\t\t} else {\n\t\t\t\tsettings = this.configDefaults.media.large,\n\t\t\t\tisLinkedToBase = false;\n\t\t\t}\n\n\t\t\t// If the user has customized a device, prepoulate.\n\t\t\tif ( this.settings.media && this.settings.media[ selectedDevice ] ) {\n\t\t\t\tsettings = this.settings.media[ selectedDevice ];\n\t\t\t\tisLinkedToBase = false;\n\n\t\t\t// If the user has customized base.\n\t\t\t} else if ( this.settings.media && this.settings.media.base ) {\n\t\t\t\tsettings = this.settings.media.base;\n\t\t\t\tisLinkedToBase = true;\n\t\t\t}\n\t\t\tthis.silentApplySettings( settings );\n\t\t\tthis.deviceSelection.updateRelationship( isLinkedToBase );\n\n\t\t\t// Trigger slider device change event.\n\t\t\tthis.events.emit( 'deviceChange', selectedDevice );\n\n\t\t\tthis.$control.siblings( '.customize-control-kirki-generic' )\n\t\t} );\n\t}", "prepareInformationService() {\n\t\t// currently i save the tv info in a file and load if it exists\n\t\tlet modelName = this.name;\n\t\ttry {\n\t\t\tlet infoArr = JSON.parse(fs.readFileSync(this.tvInfoFile));\n\t\t\tmodelName = infoArr.modelName;\n\t\t} catch (err) {\n\t\t\tthis.log.debug('webOS - tv info file does not exist');\n\t\t}\n\n\t\t// there is currently no way to update the AccessoryInformation service after it was added to the service list\n\t\t// when this is fixed in homebridge, update the informationService with the TV info?\n\t\tthis.informationService = new Service.AccessoryInformation();\n\t\tthis.informationService\n\t\t\t.setCharacteristic(Characteristic.Manufacturer, 'LG Electronics Inc.')\n\t\t\t.setCharacteristic(Characteristic.Model, modelName)\n\t\t\t.setCharacteristic(Characteristic.SerialNumber, this.mac)\n\t\t\t.setCharacteristic(Characteristic.FirmwareRevision, '1.0.0');\n\n\t\tthis.enabledServices.push(this.informationService);\n\t}", "onInit() {\n\t\tthis.log('device init');\n\t\tthis.log('name:', this.getName());\n\t\tthis.log('id:', this.getData().id);\n\n\t\tthis._driver = this.getDriver();\n\t\tthis.readings = {};\n\t\t// console.log(util.inspect(this));\n\n\t\tconst settings = this.getSettings();\n\t\tthis.routerSession = new NetgearRouter(settings.password, settings.username, settings.host, settings.port);\n\t\t// this._driver.login.call(this)\n\t\t// \t.catch(this.error);\n\n\t\t// register trigger flow cards\n\t\tthis.speedChangedTrigger = new Homey.FlowCardTriggerDevice('uldl_speed_changed');\n\t\tthis.speedChangedTrigger.register();\n\t\tthis.internetConnectedTrigger = new Homey.FlowCardTriggerDevice('connection_start');\n\t\tthis.internetConnectedTrigger.register();\n\t\tthis.internetDisconnectedTrigger = new Homey.FlowCardTriggerDevice('connection_stop');\n\t\tthis.internetDisconnectedTrigger.register();\n\n\t\t// register action flow cards\n\t\tconst blockDevice = new Homey.FlowCardAction('block_device');\n\t\tblockDevice.register()\n\t\t\t.on('run', ( args, state, callback ) => {\n\t\t\t// console.log(args); //args.mac and args.device\n\t\t\t// console.log(state);\n\t\t\t\tthis._driver.blockOrAllow.call(this, args.mac, 'Block');\n\t\t\t\tcallback( null, true );\n\t\t\t});\n\n\t\tconst allowDevice = new Homey.FlowCardAction('allow_device');\n\t\tallowDevice.register()\n\t\t\t.on('run', ( args, state, callback ) => {\n\t\t\t// console.log(args);\n\t\t\t// console.log(state);\n\t\t\t\tthis._driver.blockOrAllow.call(this, args.mac, 'Allow');\n\t\t\t\tcallback( null, true );\n\t\t\t});\n\n\t\tconst reboot = new Homey.FlowCardAction('reboot');\n\t\treboot.register()\n\t\t\t.on('run', ( args, state, callback ) => {\n\t\t\t// console.log(args); //args.mac and args.device\n\t\t\t// console.log(state);\n\t\t\t\tthis._driver.reboot.call(this);\n\t\t\t\tcallback( null, true );\n\t\t\t});\n\n\t\t// start polling router for info\n\t\tthis.intervalIdDevicePoll = setInterval( () => {\n\t\t\ttry {\n\t\t\t\t// get new routerdata and update the state\n\t\t\t\tthis.updateRouterDeviceState();\n\t\t\t} catch (error) { this.log('intervalIdDevicePoll error', error); }\n\t\t}, 1000 * settings.polling_interval);\n\n\t}", "function buildDevice (device_data, settings){\n devices[ device_data.id ] = {\n id : device_data.id, // is equal to the circle mac\n name : settings.name, // name of the Homey device\n homey_device : device_data, // device_data object from moment of pairing\n circleState : device_data.pairingState, // circleState from moment of pairing\n circleEnergy : device_data.pairingEnergy // circleEnergy from moment of pairing\n };\n Homey.log(\"init buildDevice is: \" );\n Homey.log(devices[device_data.id] );\n}", "scan (){\n this.comm.getDeviceList().then(result => {\n this.runtime.emit(this.runtime.constructor.PERIPHERAL_LIST_UPDATE, result);\n });\n }", "scan (){\n this.comm.getDeviceList().then(result => {\n this.runtime.emit(this.runtime.constructor.PERIPHERAL_LIST_UPDATE, result);\n });\n }", "scan (){\n this.comm.getDeviceList().then(result => {\n this.runtime.emit(this.runtime.constructor.PERIPHERAL_LIST_UPDATE, result);\n });\n }", "scan (){\n this.comm.getDeviceList().then(result => {\n this.runtime.emit(this.runtime.constructor.PERIPHERAL_LIST_UPDATE, result);\n });\n }", "function describeDevice(yourLine, device) {\n\t\t\tvar typology = device.type + (device.arch? ', ' + '<strong>' + device.arch + '</strong>' : '');\n\t\t\tvar chipDetail = '<em>' + device.chip.replace(\"(tm)\", \"\\u2122\") + '</em>'; // + ' (0x' + device.vendorID.toString(16) + ')';\n\t\t\tvar chipPower = device.clusters + ' cores @ ' + device.coreClock + ' Mhz';\n\t\t\taddCell(typology + '<br>' + chipDetail + '<br>' + chipPower);\n\t\t\t\n\t\t\tvar global = \"RAM: \" + Math.floor(device.globalMemBytes / 1024 / 1024) + \" MiB\";\n\t\t\tvar cache = \"Cache: \" + Math.floor(device.globalMemCacheBytes / 1024) + \" KiB\";\n\t\t\tvar lds = \"\";\n\t\t\tif(device.lds == 0 || (device.ldsType && device.ldsType == \"none\")) {}\n\t\t\telse {\n\t\t\t\tlds += \"Local: \" + Math.floor(device.ldsBytes / 1024) + \" KiB\";\n\t\t\t\tif(device.ldsType == \"global\") lds += \"(emu)\";\n\t\t\t}\n\t\t\taddCell(global + '<br>' + cache + '<br>' + lds);\n\t\t\tdevice.configCell = addCell(\"...\");\n\t\t\taddCell(device.linearIndex);\n\t\t\t\n\t\t\tfunction addCell(text) {\n\t\t\t\tvar c = document.createElement(\"td\");\n\t\t\t\tc.innerHTML = text;\n\t\t\t\tyourLine.appendChild(c);\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}", "get deviceType() {\n const { type } = this;\n switch (true) {\n case /plug/i.test(type):\n return 'plug';\n case /bulb/i.test(type):\n return 'bulb';\n default:\n return 'device';\n }\n }", "function DeviceManager()\n{\n if (process.platform != 'win32') { throw ('Only Supported on Windows'); }\n\n this._marshal = require('_GenericMarshal');\n this._Kernel32 = this._marshal.CreateNativeProxy('Kernel32.dll');\n this._Kernel32.CreateMethod('GetLastError');\n this._SetupAPI = this._marshal.CreateNativeProxy(\"SetupAPI.dll\");\n this._SetupAPI.CreateMethod('SetupDiGetClassDevsA');\n this._SetupAPI.CreateMethod('SetupDiGetDevicePropertyKeys');\n this._SetupAPI.CreateMethod('SetupDiGetDevicePropertyW');\n this._SetupAPI.CreateMethod('SetupDiEnumDeviceInfo');\n this._SetupAPI.CreateMethod('SetupDiEnumDriverInfoA');\n this._SetupAPI.CreateMethod('SetupDiBuildDriverInfoList');\n this._SetupAPI.CreateMethod('SetupDiGetDeviceInstallParamsA');\n this._SetupAPI.CreateMethod('SetupDiGetDeviceRegistryPropertyA');\n this._SetupAPI.CreateMethod('SetupDiDestroyDeviceInfoList');\n this._CfgMgr32 = this._marshal.CreateNativeProxy('CfgMgr32.dll');\n this._CfgMgr32.CreateMethod('CM_Get_DevNode_Status');\n this._CfgMgr32.DEVPKEY_Device_DevNodeStatus = this._marshal.CreateVariable(20);\n this._CfgMgr32.DEVPKEY_Device_ProblemCode = this._marshal.CreateVariable(20);\n\n Buffer.from('C5A64043FA930647972C7B648008A5A7', 'hex').copy(this._CfgMgr32.DEVPKEY_Device_DevNodeStatus.toBuffer());\n this._CfgMgr32.DEVPKEY_Device_DevNodeStatus.toBuffer().writeUInt32LE(2, 16);\n Buffer.from('C5A64043FA930647972C7B648008A5A7', 'hex').copy(this._CfgMgr32.DEVPKEY_Device_ProblemCode.toBuffer());\n this._CfgMgr32.DEVPKEY_Device_ProblemCode.toBuffer().writeUInt32LE(3, 16);\n\n this.getDevices = function getDevices(options)\n {\n var nf;\n var ret = [];\n var i;\n var di = this._SetupAPI.SetupDiGetClassDevsA(0, 0, 0, DIGCF_PRESENT | DIGCF_ALLCLASSES);\n if(di.Val == -1) {throw('Error Enumerating Drivers');}\n\n var devInfoData = this._marshal.CreateVariable(this._marshal.PointerSize == 4 ? 28 : 32);\n var DataT = this._marshal.CreateVariable(4);\n devInfoData.toBuffer().writeUInt32LE(devInfoData._size, 0);\n\n var buf = this._marshal.CreateVariable(1024);\n var buflen = this._marshal.CreateVariable(4);\n buflen.toBuffer().writeUInt32LE(1024,0);\n buf.buflen = 1024;\n\n // Enumerate devices\n for (i = 0; this._SetupAPI.SetupDiEnumDeviceInfo(di, i, devInfoData).Val; i++)\n {\n while (!this._SetupAPI.SetupDiGetDeviceRegistryPropertyA(di, devInfoData, SPDRP_HARDWAREID, DataT, buf, buf.buflen, buflen).Val)\n {\n if (this._Kernel32.GetLastError().Val == ERROR_INSUFFICIENT_BUFFER)\n {\n buf = this._marshal.CreateVariable(buflen.toBuffer().readUInt32LE());\n buf.buflen = buflen.toBuffer().readUInt32LE();\n }\n else \n {\n break;\n }\n }\n ret.push({ hwid: buf.toBuffer().slice(0, buflen.toBuffer().readUInt32LE() - 1).toString() });\n\n nf = 0;\n while (!this._SetupAPI.SetupDiGetDeviceRegistryPropertyA(di, devInfoData, SPDRP_FRIENDLYNAME, DataT, buf, buf.buflen, buflen).Val)\n {\n if (this._Kernel32.GetLastError().Val == ERROR_INSUFFICIENT_BUFFER)\n {\n buf = this._marshal.CreateVariable(buflen.toBuffer().readUInt32LE());\n buf.buflen = buflen.toBuffer().readUInt32LE();\n }\n else\n {\n nf = 1;\n break;\n }\n }\n if (!nf) { ret.peek().friendlyName = buf.toBuffer().slice(0, buflen.toBuffer().readUInt32LE() - 1).toString(); }\n\n nf = 0;\n while (!this._SetupAPI.SetupDiGetDeviceRegistryPropertyA(di, devInfoData, SPDRP_MFG, DataT, buf, buf.buflen, buflen).Val) {\n if (this._Kernel32.GetLastError().Val == ERROR_INSUFFICIENT_BUFFER) {\n buf = this._marshal.CreateVariable(buflen.toBuffer().readUInt32LE());\n buf.buflen = buflen.toBuffer().readUInt32LE();\n }\n else {\n nf = 1;\n break;\n }\n }\n if (!nf) { ret.peek().manufacturer = buf.toBuffer().slice(0, buflen.toBuffer().readUInt32LE() - 1).toString(); }\n\n nf = 0;\n while (!this._SetupAPI.SetupDiGetDeviceRegistryPropertyA(di, devInfoData, SPDRP_CLASS, DataT, buf, buf.buflen, buflen).Val) {\n if (this._Kernel32.GetLastError().Val == ERROR_INSUFFICIENT_BUFFER) {\n buf = this._marshal.CreateVariable(buflen.toBuffer().readUInt32LE());\n buf.buflen = buflen.toBuffer().readUInt32LE();\n }\n else {\n nf = 1;\n break;\n }\n }\n if (!nf) { ret.peek().class = buf.toBuffer().slice(0, buflen.toBuffer().readUInt32LE() - 1).toString(); }\n\n nf = 0;\n while (!this._SetupAPI.SetupDiGetDeviceRegistryPropertyA(di, devInfoData, SPDRP_DEVICEDESC, DataT, buf, buf.buflen, buflen).Val) {\n if (this._Kernel32.GetLastError().Val == ERROR_INSUFFICIENT_BUFFER) {\n buf = this._marshal.CreateVariable(buflen.toBuffer().readUInt32LE());\n buf.buflen = buflen.toBuffer().readUInt32LE();\n }\n else {\n nf = 1;\n break;\n }\n }\n if (!nf) { ret.peek().description = buf.toBuffer().slice(0, buflen.toBuffer().readUInt32LE() - 1).toString(); }\n\n nf = 0;\n while (!this._SetupAPI.SetupDiGetDeviceRegistryPropertyA(di, devInfoData, SPDRP_LOCATION_PATHS, DataT, buf, buf.buflen, buflen).Val) {\n if (this._Kernel32.GetLastError().Val == ERROR_INSUFFICIENT_BUFFER) {\n buf = this._marshal.CreateVariable(buflen.toBuffer().readUInt32LE());\n buf.buflen = buflen.toBuffer().readUInt32LE();\n }\n else {\n nf = 1;\n break;\n }\n }\n if (!nf) { ret.peek().locationPath = buf.toBuffer().slice(0, buflen.toBuffer().readUInt32LE() - 1).toString(); }\n\n nf = 0;\n while (!this._SetupAPI.SetupDiGetDeviceRegistryPropertyA(di, devInfoData, SPDRP_INSTALL_STATE, DataT, buf, buf.buflen, buflen).Val) {\n if (this._Kernel32.GetLastError().Val == ERROR_INSUFFICIENT_BUFFER) {\n buf = this._marshal.CreateVariable(buflen.toBuffer().readUInt32LE());\n buf.buflen = buflen.toBuffer().readUInt32LE();\n }\n else {\n nf = 1;\n break;\n }\n }\n if (!nf)\n {\n switch(buf.toBuffer().readUInt32LE())\n {\n case 0:\n ret.peek().installState = 'INSTALLED';\n break;\n case 1:\n ret.peek().installState = 'NEED_REINSTALL';\n break;\n case 2:\n ret.peek().installState = 'FAILED';\n break;\n case 3:\n ret.peek().installState = 'INCOMPLETE';\n break;\n default:\n ret.peek().installState = 'UNKNOWN';\n break;\n }\n }\n\n var proptype = this._marshal.CreateVariable(4);\n var reqsize = this._marshal.CreateVariable(4);\n this._SetupAPI.SetupDiGetDevicePropertyW(di, devInfoData, this._CfgMgr32.DEVPKEY_Device_DevNodeStatus, proptype, 0, 0, reqsize, 0);\n if (reqsize.toBuffer().readUInt32LE() > 0)\n {\n var propbuffer = this._marshal.CreateVariable(reqsize.toBuffer().readUInt32LE());\n this._SetupAPI.SetupDiGetDevicePropertyW(di, devInfoData, this._CfgMgr32.DEVPKEY_Device_DevNodeStatus, proptype, propbuffer, reqsize.toBuffer().readUInt32LE(), reqsize, 0);\n if ((propbuffer.toBuffer().readUInt32LE() & DN_HAS_PROBLEM) == DN_HAS_PROBLEM)\n {\n this._SetupAPI.SetupDiGetDevicePropertyW(di, devInfoData, this._CfgMgr32.DEVPKEY_Device_ProblemCode, proptype, propbuffer, reqsize.toBuffer().readUInt32LE(), reqsize, 0);\n if (!CM_PROB_CODE[propbuffer.toBuffer().readUInt32LE()])\n {\n ret.peek().status = 'HAS_PROBLEM';\n }\n else\n {\n ret.peek().status = CM_PROB_CODE[propbuffer.toBuffer().readUInt32LE()];\n } \n }\n else\n {\n if ((propbuffer.toBuffer().readUInt32LE() & DN_HAS_PROBLEM) == 0)\n {\n ret.peek().status = 'ENABLED';\n }\n }\n }\n\n if(options)\n {\n var match = true;\n if (options.manufacturer && options.manufacturer.endsWith('*'))\n {\n if (!ret.peek().manufacturer || !ret.peek().manufacturer.startsWith(options.manufacturer.substring(0, options.manufacturer.length - 1)))\n {\n match = false;\n }\n if (options.class && ret.peek().class != options.class)\n {\n match = false;\n }\n }\n else if ((options.class && ret.peek().class != options.class) ||\n (options.manufacturer && ret.peek().manufacturer != options.manufacturer))\n {\n match = false;\n }\n if (!match) { ret.pop(); }\n else\n {\n\n // GetDriverVersion\n if (this._SetupAPI.SetupDiBuildDriverInfoList(di, devInfoData, 2).Val) {\n var drvinfo = this._marshal.CreateVariable(this._marshal.PointerSize == 4 ? 796 : 800);\n drvinfo.toBuffer().writeUInt32LE(this._marshal.PointerSize == 4 ? 796 : 800);\n if (this._SetupAPI.SetupDiEnumDriverInfoA(di, devInfoData, 2, 0, drvinfo).Val) {\n var drversion = drvinfo.toBuffer().slice(this._marshal.PointerSize == 4 ? 788 : 792);\n ret.peek().version = drversion.readUInt16LE(6) + '.' + drversion.readUInt16LE(4) + '.' + drversion.readUInt16LE(2) + '.' + drversion.readUInt16LE(0);\n }\n else {\n ret.peek().version = 'FAILED [' + this._Kernel32.GetLastError().Val + ']';\n }\n }\n }\n }\n }\n this._SetupAPI.SetupDiDestroyDeviceInfoList(di);\n return (ret);\n };\n}", "setDeviceInfo() {\n\n prefs.getDeviceInfo().then((result) => {\n if(!!result) {\n this.props.setDeviceInfo(result);\n }\n });\n }", "function displayDevice(device) {\n if (!deviceIsDisplayed(device)) {\n createDevice(device)\n }\n\n updateDevice(device)\n }", "function onDeviceFound(devices)\n{\n if (devices.length <= 0)\n {\n return;\n }\n\n var ind = devices.length - 1;\n console.log('Found ' + devices.length + ' devices.');\n console.log('Device ' + devices[ind].deviceId + ' vendor' + devices[ind].vendorId + ' product ' + devices[ind].productId);\n //console.log('Device usage 0 usage_page' + devices[ind].usages[0].usage_page + ' usage ' + devices[ind].usages[0].usage);\n var devId = devices[ind].deviceId;\n\n console.log('Connecting to device '+devId);\n log('#messageLog', 'Connecting to device...\\n');\n chrome.hid.connect(devId, function(connectInfo)\n {\n if (!chrome.runtime.lastError)\n\t\t{\n connection = connectInfo.connectionId;\n\n if (connectMsg)\n {\n sendMsg(connectMsg);\n }\n else\n {\n sendPing();\n }\n }\n else\n {\n console.log('Failed to connect to device: '+chrome.runtime.lastError.message);\n reset();\n }\n });\n}", "onInit () {\n\n this.log('device init');\n this.log('name:', this.getName());\n this.log('class:', this.getClass());\n this.polleri = 0\n\n this.pollInterval = 60000 // 1 minute\n this.polling = false\n\n this.thermostattested = false\n this.thermostatset = false // 2 possibilizties not online not set correct\n this.thermostatconnected = true \n\n\n this.ip = ''\n this.port = ''\n this.thermostatusername = ''\n this.thermostatpassword = ''\n this.thermostattesting = true\n\n this.driver = this.getDriver().id\n this.log(`driver name`, this.driver)\n\n\n\n this.thermostatmethod = 'GET'\n\n // for nt10 averagge temp is temp1 local nt10\n this.thermostatTempCommand = 'OID4.1.13'\n\n // for nt20\n this.thermostatTempOneCommand = 'OID4.3.2.1'\n this.thermostatTempTwoCommand = 'OID4.3.2.2'\n this.thermostatTempThreeCommand = 'OID4.3.2.3'\n\n this.thermostatThermSetbackHeatCommand = 'OID4.1.5'\n this.thermostatThermHvacStateCommand = 'OID4.1.2'\n\n\n\n if (this.driver == 'nt10') {\n\n this.thermostatGetCommand = `/get?${this.thermostatTempCommand}\\\n=&${this.thermostatThermSetbackHeatCommand}\\\n=&${this.thermostatThermHvacStateCommand}=` // = path in req\n // this.registerCapabilityListener('measure_temperature', this.onCapabilityMeasure_temperature.bind(this))\n\n\n }\n\n else if (this.driver == 'nt20') {\n\n this.thermostatGetCommand = `/get?${this.thermostatTempOneCommand}\\\n=&${this.thermostatTempTwoCommand}\\\n=&${this.thermostatTempThreeCommand}\\\n=&${this.thermostatThermSetbackHeatCommand}\\\n=&${this.thermostatThermHvacStateCommand}=` // = path in req\n\n this.registerCapabilityListener('measure_temperature_one', this.onCapabilityMeasure_temperature_one.bind(this))\n this.registerCapabilityListener('measure_temperature_two', this.onCapabilityMeasure_temperature_two.bind(this))\n this.registerCapabilityListener('measure_temperature_three', this.onCapabilityMeasure_temperature_three.bind(this))\n\n\n }\n\n\n // register a capability listener\n \n this.registerCapabilityListener('target_temperature', this.onCapabilityTarget_temperature.bind(this))\n this.registerCapabilityListener('thermostat_mode', this.onCapabilityThermostat_mode.bind(this))\n\n\n\n\n this.settings = this.getSettings();\n\n this.ip = this.settings.ip\n this.port = this.settings.port\n this.thermostatusername = this.settings.user\n this.thermostatpassword = this.settings.password\n\n\n // this.log(`driver `, this.inspect(this.getDriver()))\n this.log(`driver clasname `, this.getDriver().constructor.name)\n this.log(`driver name`, this.getDriver().id)\n\n\n this.log(`settings `, this.settings)\n\n\n // check if thermostat is set\n if (!(this.ip == undefined) && !(this.port == undefined) && !(this.thermostatusername == undefined) && !(this.thermostatpassword == undefined)) {\n this.thermostatset = true;\n\n this.log('test if thermostat is set this.thermostatset = ', this.thermostatset);\n this.pollproliphix();\n } else {\n this.thermostatset = false;\n this.log('test if thermostat is set this.thermostatset = ', this.thermostatset);\n }\n\n \n\n\n // test thermostat \n if (!(this.ip == null) && !(this.port == null) && !(this.thermostatusername == null) && !(this.thermostatpassword == null)) {\n this.req(this.ip, this.port, this.thermostatGetCommand, this.thermostatmethod, this.thermostatusername, this.thermostatpassword);\n this.polleri += 1\n };\n\n \n\n\n\n\n\n\n\n // this.setSettings({\n // ip: \"newValue\",\n // // only provide keys for the settings you want to change\n // })\n // .then(this.log)\n // .catch(this.error)\n\n }", "function initDeviceListener() {\n\n}", "function retrieveDeviceState() {\n /*\n * If the user has selected the application interface, device type and\n * device, retrieve the current state of the selected device.\n */\n if ( DashboardFactory.getSelectedDeviceType()\n && DashboardFactory.getSelectedDevice()\n && DashboardFactory.getSelectedApplicationInterface()\n ) {\n DeviceType.getDeviceState(\n {\n typeId: DashboardFactory.getSelectedDeviceType().id,\n deviceId: DashboardFactory.getSelectedDevice().deviceId,\n appIntfId: DashboardFactory.getSelectedApplicationInterface().id\n },\n function(response) {\n // Inject our own timestamp into the response\n response.timestamp = Date.now();\n vm.deviceStateData.push(response);\n },\n function(response) {\n debugger;\n }\n );\n }\n }", "handleDeviceNameChange(e) {\n this.setState({ deviceName: e.target.value });\n }", "function showPhoneInfo() {\n var str1 = \"\";\n if(navigator.network.connection.type == Connection.NONE) {\n str1 = \"未連線\";\n } else {\n str1 = navigator.network.connection.type;\n }\n var str = \"\" ;\n\n str = \"手機連線:\" + str1 + \"<br />\" +\n \"手機序號:\" + device.uuid + \"<br />\" +\n \"手機版本:\" + device.version + \"<br />\" +\n \"手機平台:\" + device.platform+ \"<br />\" +\n \"手機Name:\" + device.name;\n $(\"#deviceProperties\").html(str);\n $(\"#serial2\").val(device.uuid);\n}", "onDeviceListChanged(devices) {\n console.info(\"current devices\", devices);\n }", "function deviceListener(type, updatedDevice) {\n // Okay, this is a bit unnecessary but it allows us to get rid of an\n // ugly switch statement and return to the original style.\n privateTracker.emit(type, updatedDevice)\n }", "function getDeviceInfo (req, res, next) {\n if (req.checkD) {\n device.findByMac(req.body.d).then(d => {\n let obj = {}\n let result = d.map((r) => (r.toJSON()))\n console.log(JSON.stringify(d))\n if (result && result.length > 0) {\n let cpId = 'Gemtek'\n let roleId = 'device'\n let d = new Date()\n let nowSeconds = Math.round(d.getTime() / 1000)\n let payload = result[0].device_mac + ':' + nowSeconds + ':' + result[0].deviceId + ':' + cpId + ':' + roleId\n let ciphertext = CryptoJS.TripleDES.encrypt(payload, env.SECRET_KEY)\n obj['msg'] = 'get success'\n obj['code'] = '000'\n obj['token'] = ciphertext.toString()\n obj['d'] = result[0].device_mac\n } else {\n obj['msg'] = 'no device info'\n obj['code'] = '404'\n obj['d'] = result[0].device_mac\n }\n req.payload = obj\n console.log(JSON.stringify(req.payload))\n next()\n })\n } else {\n let obj = {}\n obj['msg'] = 'verify fail'\n obj['code'] = '403'\n obj['d'] = req.body.d\n req.payload = obj\n console.log(JSON.stringify(obj))\n next()\n }\n}", "function gotDevices(deviceInfos) {\n for (var i = 0; i !== deviceInfos.length; ++i) {\n var deviceInfo = deviceInfos[i];\n console.log('Found media input or output device: ', deviceInfo);\n var option = document.createElement('option');\n option.value = deviceInfo.deviceId;\n if (deviceInfo.kind === 'videoinput') {\n option.text = deviceInfo.label || 'Camera ' + (videoSelect.length + 1);\n videoSelect.appendChild(option);\n }\n }\n}", "function handleInfo() {\n\t\t// setJob({\n\t\t// \tjob: 'Front-end developer',\n\t\t// \tlang: 'JS',\n\t\t// });\n\n\t\tsetPerson({\n\t\t\tname: 'Sina',\n\t\t\temail: '[email protected]',\n\t\t});\n\t}", "async scanDevices() {\n\t\t// Browse and listen for WLED devices\n\t\tconst browser = await bonjour.find({\n\t\t\t'type': 'wled'\n\t\t});\n\t\tthis.log.info('Bonjour service startet, new devices will be detected automatically :-) ');\n\n\t\t// Event listener if new devices are detected\n\t\tbrowser.on('up', (data) => {\n\t\t\tconst id = data.txt.mac;\n\t\t\tconst ip = data.referer.address;\n\n\t\t\t// Check if device is already know\n\t\t\tif (this.devices[ip] === undefined) {\n\t\t\t\tthis.log.info('New WLED device found ' + data.name + ' on IP ' + data.referer.address);\n\n\t\t\t\t// Add device to array\n\t\t\t\tthis.devices[ip] = id;\n\t\t\t\tthis.log.debug('Devices array from bonjour scan : ' + JSON.stringify(this.devices));\n\n\t\t\t\t// Initialize device\n\t\t\t\tthis.readData(ip);\n\t\t\t} else {\n\t\t\t\t// Update memory with current ip address\n\t\t\t\tthis.devices[ip] = id;\n\t\t\t}\n\n\t\t\tthis.log.debug('Devices array from bonjour scan : ' + JSON.stringify(this.devices));\n\t\t});\n\n\t}", "function getdevice (dev, callback)\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n {\n if (typeof (dev) === 'undefined' || dev === null || dev.length < 1) dev = '-13';\n webphone_api.plhandler.GetDevice(dev, callback);\n }\n}", "enumerate_devices() {\n const filters = {filters: [\n {vendorId: 0x16D0}\n ]};\n\n if (!this.usb) {\n this.log(\"error: WebUSB not supported\\n\", \"red\");\n return;\n }\n\n this.usb.requestDevice(filters)\n .then(dev => this.connect_device(dev))\n .catch(error => {\n if (String(error) === \"SecurityError: Must be handling a user gesture to show a permission request.\") {\n this.log(\"Please click 'Connect Device' on the left toolbar.\", \"black\");\n } else if (String(error) === \"NotFoundError: No device selected.\") {\n this.log(\"Please select a WebUSB device.\", \"red\");\n } else {\n this.log(String(error));\n this.log(\"error: unable to enumerate USB device list\");\n }\n });\n }", "function innerCollectDeviceData(infoToCache) {\n var defered = q.defer();\n self.dataCollectionDefered = defered;\n\n self.log('Collecting Data from a handle', self.handle);\n \n // Indicate that this device was opened by the device scanner.\n self.openedByScanner = true;\n\n var deviceHandle = self.handle;\n var dt = self.openParameters.deviceType;\n var ct = self.openParameters.connectionType;\n var id = self.openParameters.identifier;\n\n // Initialize a curated device object.\n self.curatedDevice = new device_curator.device();\n\n // Link the device handle to the curated device object.\n self.curatedDevice.linkToHandle(deviceHandle, dt, ct, id)\n .then(function finishedLinkingHandle(res) {\n self.log(\n 'Finished linking to a handle',\n deviceHandle,\n self.curatedDevice.savedAttributes.connectionTypeName\n );\n \n // Create a data collection timeout.\n var collectionTimeout = setTimeout(\n deviceHandleDataCollectionTimeout,\n DEVICE_DATA_COLLECTION_TIMEOUT\n );\n\n // Attach event listeners to the curated device.\n linkToCuratedDeviceEvents();\n console.log('reading multiple...', deviceHandle);\n // Collect information from the curated device.\n self.curatedDevice.iReadMultiple(infoToCache)\n .then(function finishedCollectingData(results) {\n // Clear the data collection timeout\n clearTimeout(collectionTimeout);\n\n self.log('Collecting data from a handle', deviceHandle);\n printCollectedDeviceData(results);\n saveCollectedDeviceData(results);\n\n // Report that the device is finished collecting data.\n stopCollectingDeviceData();\n }, function(err) {\n self.log('Error collecting data from a handle', deviceHandle, err);\n\n // Report that the device is finished collecting data.\n stopCollectingDeviceData();\n });\n }, function errorLinkingHandle(err) {\n console.error('Error linking to handle...');\n defered.resolve();\n });\n return defered.promise;\n }", "function eventListener(device, transducer) {\n var today = getToday();\n\n // (EDIT) check if the DEVICE name is the one you want\n if(device==\"しらすの入荷情報湘南\") {\n /*\n * (EDIT) change below statements depending on\n * which TRANSDUCER & what VALUE you want to use\n */\n if (typeof transducer.sensorData === \"undefined\") {\n status(\"Data undefined\");\n return;\n }\n\n if (transducer.id == \"入荷情報\") {\n EnoshimaSensorInfo.shirasu = transducer.sensorData.rawValue;\n\n if (transducer.sensorData.rawValue.indexOf(today) < 0) {\n // 未入荷\n EnoshimaSensorInfo.amount = 1;\n\n return;\n }\n\n if (transducer.sensorData.rawValue.indexOf(\"未入荷\") >= 0) {\n // 未入荷\n EnoshimaSensorInfo.amount = 1;\n }\n else if (transducer.sensorData.rawValue.indexOf(\"入荷\") >= 0) {\n if (transducer.sensorData.rawValue.indexOf(\"僅か\") >= 0) {\n // 入荷僅か\n EnoshimaSensorInfo.amount = 1;\n }\n else {\n // 入荷\n EnoshimaSensorInfo.amount = 0;\n }\n }\n else {\n // 未入荷\n EnoshimaSensorInfo.amount = 1;\n }\n }\n }\n}", "constructor () {\n /** @private {Object} */\n this.devices = {}\n }", "function _updateDeviceData(data) {\n vm.deviceData = data;\n vm.isAdmin = (UserService.getUserRole() > 0) ? true : false;\n vm.buttonStyles = _formatButton(data.state, data['active_reservations'][0]);\n _formatDetails(data);\n\n vm.switchView('infoView');\n vm.loadingState = 'contentSuccess';\n }", "function deviceLog() {\n var deviceType = document.querySelector(\".deviceType\");\n\n var devicesType = result.platform.type;\n console.log(devicesType);\n deviceType.innerHTML += devicesType;\n }", "handleDeviceModelChange(e) {\n this.setState({ deviceModel: e.target.value });\n }", "updateUI(fieldChangeWarnings = true) {\n let device = Cache.getSlaveDevice(this.getDeviceName())\n if (!device) {\n throw new AssertionError(`Device with name ${this.getDeviceName()} not found in cache`)\n }\n\n device = ObjectUtils.copy(device, /* deep = */ true)\n device.url = getDeviceURL(device)\n\n this._fullAttrdefs = null\n\n this.setTitle(device.attrs.display_name || device.name)\n this.setIcon(Devices.makeDeviceIcon(device))\n\n if (device.last_sync === 0) {\n device.last_sync = `(${gettext('never')})`\n }\n else {\n device.last_sync = DateUtils.formatPercent(new Date(device.last_sync * 1000), '%Y-%m-%d %H:%M:%S')\n }\n\n this.setData(device)\n\n if (device.enabled) {\n let attrdefs = ObjectUtils.copy(device.attrs.definitions || {}, /* deep = */ true)\n\n /* Merge in some additional attribute definitions that we happen to know of */\n ObjectUtils.forEach(API.ADDITIONAL_DEVICE_ATTRDEFS, function (name, def) {\n def = ObjectUtils.copy(def, /* deep = */ true)\n\n if (name in attrdefs) {\n attrdefs[name] = ObjectUtils.combine(attrdefs[name], def)\n }\n else {\n attrdefs[name] = def\n }\n })\n\n /* Combine standard and additional attribute definitions */\n this._fullAttrdefs = Common.combineAttrdefs(API.STD_DEVICE_ATTRDEFS, attrdefs)\n\n /* Filter out attribute definitions not applicable to this device */\n this._fullAttrdefs = ObjectUtils.filter(this._fullAttrdefs, function (name, def) {\n let showAnyway = def.showAnyway\n if (typeof showAnyway === 'function') {\n showAnyway = showAnyway(device.attrs, this._fullAttrdefs)\n }\n return def.common || showAnyway || name in device.attrs\n }, this)\n\n /* Make sure all defs have a valueToUI function */\n // TODO once AttrDef becomes a class, this will no longer be necessary */\n ObjectUtils.forEach(this._fullAttrdefs, function (name, def) {\n if (!def.valueToUI) {\n def.valueToUI = function (value) {\n return value\n }\n }\n })\n\n this.fieldsFromAttrdefs({\n attrdefs: this._fullAttrdefs,\n initialData: Common.preprocessDeviceAttrs(device.attrs),\n provisioning: device.provisioning || [],\n noUpdated: API.NO_EVENT_DEVICE_ATTRS,\n startIndex: this.getFieldIndex('last_sync') + 1,\n fieldChangeWarnings: fieldChangeWarnings\n })\n }\n else {\n /* Clear all attribute fields */\n this.fieldsFromAttrdefs()\n }\n\n if (!this._staticFieldsAdded) {\n this.addStaticFields()\n this._staticFieldsAdded = true\n }\n\n this.updateStaticFields(device.attrs)\n }", "function FpgaDeviceInfo() {\n _classCallCheck(this, FpgaDeviceInfo);\n\n FpgaDeviceInfo.initialize(this);\n }", "updateUI(fieldChangeWarnings = true) {\n let device = Cache.getSlaveDevice(this.getDeviceName())\n if (!device) {\n throw new AssertionError(`Device with name ${this.getDeviceName()} not found in cache`)\n }\n\n device = ObjectUtils.copy(device, /* deep = */ true)\n device.url = getDeviceURL(device)\n\n this._fullAttrdefs = null\n\n this.setTitle(device.attrs.display_name || device.name)\n this.setIcon(Devices.makeDeviceIcon(device))\n\n if (device.last_sync === 0) {\n device.last_sync = `(${gettext('never')})`\n }\n else {\n device.last_sync = DateUtils.formatPercent(new Date(device.last_sync * 1000), '%Y-%m-%d %H:%M:%S')\n }\n\n /* Update fields that stay on master, but only if they're not being edited */\n let masterData = {}\n MASTER_FIELDS.forEach(function (name) {\n let field = this.getField(name)\n if (!field.isFocused() && !field.isChanged()) {\n masterData[name] = device[name]\n }\n }.bind(this))\n this.setData(masterData)\n\n if (device.enabled) {\n let attrdefs = ObjectUtils.copy(device.attrs.definitions || {}, /* deep = */ true)\n\n /* Merge in some additional attribute definitions that we happen to know of */\n ObjectUtils.forEach(Attrdefs.ADDITIONAL_DEVICE_ATTRDEFS, function (name, def) {\n def = ObjectUtils.copy(def, /* deep = */ true)\n\n if (name in attrdefs) {\n attrdefs[name] = ObjectUtils.combine(attrdefs[name], def)\n }\n else {\n attrdefs[name] = def\n }\n })\n\n /* Combine standard and additional attribute definitions */\n this._fullAttrdefs = Attrdefs.combineAttrdefs(Attrdefs.STD_DEVICE_ATTRDEFS, attrdefs)\n\n /* Filter out attribute definitions not applicable to this device */\n this._fullAttrdefs = ObjectUtils.filter(this._fullAttrdefs, function (name, def) {\n let showAnyway = def.showAnyway\n if (typeof showAnyway === 'function') {\n showAnyway = showAnyway(device.attrs, this._fullAttrdefs)\n }\n return def.common || showAnyway || name in device.attrs\n }, this)\n\n this.fieldsFromAttrdefs({\n attrdefs: this._fullAttrdefs,\n attrs: Common.preprocessDeviceAttrs(device.attrs),\n provisioning: device.provisioning || [],\n noUpdated: NotificationsAPI.NO_EVENT_DEVICE_ATTRS,\n startIndex: this.getFieldIndex('last_sync') + 1,\n fieldChangeWarnings: fieldChangeWarnings\n })\n }\n else {\n /* Clear all attribute fields */\n this.fieldsFromAttrdefs()\n }\n\n if (!this._staticFieldsAdded) {\n this.addStaticFields()\n this._staticFieldsAdded = true\n }\n\n this.updateStaticFields(device.attrs)\n }", "get deviceId() {\n return this.sysInfo.deviceId;\n }", "setDeviceType(layer, type) {\nlet motors = this._motors;\nfor (let i = 0; i < 4; i++) {\nlet motor = motors[layer * 4 + i];\nif (motor) {\nmotor.getState().setType(-1);\n}\n}\nif (type === poweredUpModuleConstants.POWERED_UP_DEVICE_MOVE_HUB) {\nlet motor = motors[layer * 4];\nif (motor) {\nmotor.getState().setType(poweredUpModuleConstants.POWERED_UP_DEVICE_BOOST_MOVE_HUB_MOTOR);\n}\nmotor = motors[layer * 4 + 1];\nif (motor) {\nmotor.getState().setType(poweredUpModuleConstants.POWERED_UP_DEVICE_BOOST_MOVE_HUB_MOTOR);\n}\n}\nlet device = this.getDeviceStateByLayer(layer);\nif (device && device.setType) {\ndevice.setType(type);\n} else {\nthis._uuidElement.innerHTML = '';\n}\nif (layer === this._simulator.getLayer()) {\nthis._hub.hide();\nthis._moveHub.hide();\nthis._technicHub.hide();\nthis._remote.hide();\nlet device = this.getDeviceByType(type);\ndevice && device.show();\nthis.showMotors();\n}\n}", "function outputDeviceSummary(){\n console.log(\"============================\");\n console.log(\"Power: \" + pCurrent);\n console.log(\"Mode: \" + mCurrent);\n console.log(\"============================\");\n}", "function handleDeviceMotion1(event) {\n\t// here we will access a \"devicemotion\" attribute \"acceleration\"\n\t// w/in acceleration we will get acceleration in the x-axis\n\t// document.getElementById('acc_text').innerHTML = event.acceleration.x;\n\tdocument.getElementById(\"acc_text\").innerHTML = event.acceleration.x;\n\n\t// w/in devicemotion we have a few different accelerometer options\n\t// to choose from. acceleration, accelerationIncludingGravity\n\t// and rotation rate (radians per second squared)\n\t// e.g.\n\t// event.accelerationIncludingGravity.x\n\t// event.rotationRate.alpha\n}", "function Device() {\n this.available = false;\n this.platform = null;\n this.version = null;\n this.uuid = null;\n this.cordova = null;\n this.model = null;\n this.manufacturer = null;\n this.isVirtual = null;\n this.serial = null;\n\n var me = this;\n\n channel.onCordovaReady.subscribe(function() {\n me.getInfo(function(info) {\n //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js\n //TODO: CB-5105 native implementations should not return info.cordova\n var buildLabel = cordova.version;\n me.available = true;\n me.platform = info.platform;\n me.version = info.version;\n me.uuid = info.uuid;\n me.cordova = buildLabel;\n me.model = info.model;\n me.isVirtual = info.isVirtual;\n me.manufacturer = info.manufacturer || 'unknown';\n me.serial = info.serial || 'unknown';\n channel.onCordovaInfoReady.fire();\n },function(e) {\n me.available = false;\n utils.alert(\"[ERROR] Error initializing Cordova: \" + e);\n });\n });\n}", "function Device() {\n this.available = false;\n this.platform = null;\n this.version = null;\n this.uuid = null;\n this.cordova = null;\n this.model = null;\n this.manufacturer = null;\n this.isVirtual = null;\n this.serial = null;\n\n var me = this;\n\n channel.onCordovaReady.subscribe(function() {\n me.getInfo(function(info) {\n //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js\n //TODO: CB-5105 native implementations should not return info.cordova\n var buildLabel = cordova.version;\n me.available = true;\n me.platform = info.platform;\n me.version = info.version;\n me.uuid = info.uuid;\n me.cordova = buildLabel;\n me.model = info.model;\n me.isVirtual = info.isVirtual;\n me.manufacturer = info.manufacturer || 'unknown';\n me.serial = info.serial || 'unknown';\n channel.onCordovaInfoReady.fire();\n },function(e) {\n me.available = false;\n utils.alert(\"[ERROR] Error initializing Cordova: \" + e);\n });\n });\n}", "function readDeviceInformation(api, id, query) {\n return api_1.GET(api, `/devices/${id}`, { query })\n}", "function deviceFound(device) {\n\tconsole.log(\"[deviceFound] \" + device.name);\n\tvar newEntry \t\t= $(\"#listItem\").clone();\n\t\n\tif(device.name.toUpperCase == \"TECO_ENV\") {\n\t\t// chain method-calls on jQuery object\n\t\tnewEntry.switchClass(\"listItemTemplate\", \"listItem\")\n\t\tnewEntry.find(\"info\")\n\t\t.html(\"You can connect to this device\");\n\t\t\n\t\t// add onClick to List item\n\t\t// when clicked, check if connected or not\n\t\tnewEntry.click(function() {\n\t\t\t/*TODO*/\n\t\t\tif(!stateConnected) {\n\t\t\t\t// connect to device\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// disconnect from former device\n\t\t\t}\n\t\t});\n\t\t\n\t} else {\n\t\tnewEntry.switchClass(\"listItemUnusable\")\n\t\t.find(\"#info\")\n\t\t.html(\"Unkown device. Unable to connect.\");\n\t}\n\tnewEntry.attr(\"id\", deviceCounter++)\n\t.appendTo(\"#deviceList\")\n\t.find(\"#name\").html(device.name)\n\tnewEntry.find(\"RSSI\").html(\"RSSI: \" + device.rssi);\n}", "createObjects() {\n if (Object.keys(this.device).length === 0) {\n let deviceid = this.getDeviceId();\n let devices = datapoints.getDeviceByType(deviceid, 'mqtt');\n if (devices) {\n devices = recursiveSubStringReplace(devices, new RegExp('<mqttprefix>', 'g'), this.mqttprefix);\n // devices = recursiveSubStringReplace(devices, new RegExp('<devicetype>', 'g'), deviceid);\n // devices = recursiveSubStringReplace(devices, new RegExp('<deviceid>', 'g'), this.getSerialId());\n for (let j in devices) {\n let statename = j;\n let state = devices[statename];\n state.state = statename;\n let deviceid = this.getDeviceName();\n if (!this.states[deviceid] || this.states[deviceid] !== deviceid) {\n this.states[deviceid] = deviceid;\n this.objectHelper.setOrUpdateObject(deviceid, {\n type: 'device',\n common: {\n name: 'Device ' + deviceid\n },\n native: {}\n }, ['name']);\n }\n let channel = statename.split('.').slice(0, 1).join();\n if (channel !== statename) {\n let channelid = deviceid + '.' + channel;\n if (!this.states[channelid] || this.states[channelid] !== channelid) {\n this.states[channelid] = channelid;\n this.objectHelper.setOrUpdateObject(channelid, {\n type: 'channel',\n common: {\n name: 'Channel ' + channel\n }\n }, ['name']);\n }\n }\n let stateid = deviceid + '.' + statename;\n let controlFunction;\n if (state.mqtt && state.mqtt.mqtt_cmd) {\n controlFunction = async (value) => {\n let cmd = state.mqtt.mqtt_cmd;\n if (state.mqtt && state.mqtt.mqtt_cmd_funct) {\n try {\n value = isAsync(state.mqtt.mqtt_cmd_funct) ? await state.mqtt.mqtt_cmd_funct(value, this) : state.mqtt.mqtt_cmd_funct(value, this);\n } catch (error) {\n this.adapter.log.error('Error in function state.mqtt.mqtt_cmd_funct for state ' + stateid + ' for ' + this.getName() + ' (' + error + ')');\n }\n }\n this.sendState2Client(cmd, value, this.adapter.config.qos);\n delete this.states[stateid];\n };\n } else if (state.mqtt && state.mqtt.http_cmd) {\n controlFunction = async (value) => {\n if (state.mqtt && state.mqtt.http_cmd_funct) {\n try {\n value = isAsync(state.mqtt.http_cmd_funct) ? await state.mqtt.http_cmd_funct(value, this) : state.mqtt.http_cmd_funct(value, this);\n } catch (error) {\n this.adapter.log.error('Error in function state.mqtt.http_cmd_funct for state ' + stateid + ' for ' + this.getName() + ' (' + error + ')');\n }\n }\n let body;\n let params;\n try {\n if (this.auth) {\n params = {\n url: 'http://' + this.getIP() + state.mqtt.http_cmd,\n timeout: this.httptimeout,\n qs: value,\n headers: {\n 'Authorization': this.auth\n }\n };\n } else {\n params = {\n url: 'http://' + this.getIP() + state.mqtt.http_cmd,\n timeout: this.httptimeout,\n qs: value\n };\n }\n this.adapter.log.debug('Call url ' + JSON.stringify(params) + ' for ' + this.getName());\n body = await requestAsync(params);\n // this.adapter.log.debug('Create Object body : ' + body);\n } catch (error) {\n if (body && body === '401 Unauthorized') {\n this.adapter.log.error('Wrong http username or http password! Please enter the user credential from restricted login for ' + this.getName());\n } else {\n this.adapter.log.error('Error in function state.mqtt.http_cmd for state ' + stateid + ' and request' + JSON.stringify(params) + ' for ' + this.getName() + ' (' + error + ')');\n }\n }\n delete this.states[stateid];\n };\n }\n if (state.mqtt.http_publish && !state.mqtt.mqtt_publish) {\n if (!this.http[state.mqtt.http_publish]) this.http[state.mqtt.http_publish] = [];\n this.http[state.mqtt.http_publish].push(statename);\n }\n let value;\n if (state.mqtt.mqtt_init_value) value = state.mqtt.mqtt_init_value;\n this.objectHelper.setOrUpdateObject(stateid, {\n type: 'state',\n common: state.common\n }, ['name'], value, controlFunction);\n }\n this.device = devices;\n }\n this.objectHelper.processObjectQueue(() => { });\n }\n }", "_pingDevice () {\n this._ble.read(\n BoostBLE.service,\n BoostBLE.characteristic,\n false\n );\n }", "async onPairListDevices() {\n return [\n // Example device data, note that `store` is optional\n // {\n // name: 'My Device',\n // data: {\n // id: 'my-device',\n // },\n // store: {\n // address: '127.0.0.1',\n // },\n // },\n ];\n }", "function upDeviceInfo() {\n var deviceProperty, element;\n element = document.querySelector(\"#deviceInfoList .selected td\");\n if (element !== null && element !== undefined) {\n deviceProperty = element.getAttribute(\"value\");\n element = element.parentElement;\n if (element.rowIndex !== 0) {\n if (savedDeviceOptions.includes(deviceProperty)) {\n savedDeviceOptions.splice(savedDeviceOptions.indexOf(deviceProperty), 1);\n savedDeviceOptions.splice(element.rowIndex - 1, 0, deviceProperty);\n }\n\n addDeviceInfoToTable(deviceProperty, element.rowIndex - 1);\n element.remove();\n setEmptyRows(\"deviceInfoList\");\n }\n }\n}", "constructor() {\n //devices\n this.device_type_hrm = \"hrm\";\n this.device_type_pulse_oximeter = \"spo2\";\n this.device_type_glucometer = \"bg\";\n this.device_type_blood_pressure = \"bp\";\n this.device_type_pedometer = \"pedometer\";\n \n //hs: ble characteristics of various supported devices\n this.hrm_service_uuid = \"0000180d-0000-1000-8000-00805f9b34fb\";\n this.pulse_oximeter_service_uuid = \"00001822-0000-1000-8000-00805f9b34fb\";\n this.fora_spo2_service_uuid = \"00001523-1212-efde-1523-785feabcd123\";\n this.fora_spo2_characteristic_uuid = \"00001524-1212-efde-1523-785feabcd123\";\n this.supported_services = [\n this.hrm_service_uuid,\n this.pulse_oximeter_service_uuid,\n this.fora_spo2_service_uuid\n ];\n\n //hs: Dummy Pedometer simulation\n this.pedometer_simulation_address = \"aa:bb:cc:dd:ee\";\n this.pedometer_simulation_name = \"Pedometer\";\n this.pedometer_simulation_protocol = \"protocol_internal_pedometer\";\n this.pedometer_simulation_timer = undefined;\n this.pedometer_simulation_daily_step_count = 0;\n this.pedometer_simulation_incremental_step_count = 10;\n this.pedometer_simulation_interval = 10000;\n this.pedometer_simulation_default_recordcount = 7;\n this.pedometer_simulation_running = false;\n \n //hs: active device map\n this.devices = {};\n\n // callback map\n this.deviceFoundCallback = {};\n this.deviceDataChangedCallback = {};\n this.deviceDisconnectedCallback = {};\n }", "function particleListDevice(deviceName) {\n // get device info devices\n particle\n .listDevices({ auth: config.accessToken })\n .then(\n function(devices) {\n // search for the device name\n for (var i = 0; i < devices.body.length; i++) {\n console.log('Available device names: ', devices.body[i].name);\n\n // get id from device\n if (devices.body[i].name === deviceName) {\n config.deviceId = devices.body[i].id;\n console.log('Device found: ', devices.body[i].name, devices.body[i].id);\n\n // ok activate interaction\n $('#command').show();\n loggedIn = true;\n console.log('You are logged in and can use the device now :)');\n\n }\n }\n\n // particleGetVar('ps-voltage');\n\n // show the available commands when connection to the device has been established\n },\n function(err) {\n console.log('List devices call failed: ', err);\n }\n );\n }", "function DeviceDriverFileSystem(){ // Add or override specific attributes and method pointers.{\n // \"subclass\"-specific attributes.\n // this.buffer = \"\"; // TODO: Do we need this?\n // Override the base method pointers.\n this.driverEntry = function(){\n // Initialization routine for this, the kernel-mode Keyboard Device Driver.\n this.status = \"loaded\";\n // More?\n };\n this.isr = function(params){\n //expect to receive params as follows[filename | new program,operation,data,from user | os]\n switch(params[1]){\n case 0: createFile(params); break;\n case 1: readFile(params); break;\n case 2: writeFile(params); break;\n case 3: deleteFile(params); break;\n case 4: format(); break;\n case 5: listFiles(); break;\n case 6: findProgramFiles(); break;\n case 7: swapProcess(params); break;\n default: console.log(\"blakejrlbkadflkdaf\"); break;\n }\n };\n this.test = function(){\n updateMBR();\n }\n}", "function Device() {\n this.available = PhoneGap.available;\n this.platform = null;\n this.version = null;\n this.name = null;\n this.gap = null;\n this.uuid = null;\n try {\n if (window.DroidGap) {\n this.available = true;\n this.uuid = window.DroidGap.getUuid();\n this.version = window.DroidGap.getOSVersion();\n this.gapVersion = window.DroidGap.getVersion();\n this.platform = window.DroidGap.getPlatform();\n this.name = window.DroidGap.getProductName(); \n } else { \n this.platform = DeviceInfo.platform;\n this.version = DeviceInfo.version;\n this.name = DeviceInfo.name;\n this.gap = DeviceInfo.gap;\n this.uuid = DeviceInfo.uuid;\n }\n } catch(e) {\n this.available = false;\n }\n}", "function getDeviceDetails(deviceId) {\n var tenant = scriptProps.getProperty(\"airWatchTenant\");\n var airwatchParams = getAirwatchParams();\n var response = UrlFetchApp.fetch(\"https://\" + tenant + \"/api/mdm/devices/\" + deviceId, airwatchParams); \n var text = response.getContentText();\n var data = JSON.parse(text);\n\n var sn = data.SerialNumber;\n var name = data.DeviceFriendlyName;\n var group = data.LocationGroupName;\n var user = data.UserName;\n var model = data.Model;\n var compliance = data.ComplianceStatus;\n \n var fields = [\n {\n \"type\": \"mrkdwn\",\n \"text\": \"*Computer:*\"\n },\n {\n \"type\": \"plain_text\",\n \"text\": name,\n \"emoji\": true\n },\n {\n \"type\": \"mrkdwn\",\n \"text\": \"*Model:*\"\n },\n {\n \"type\": \"plain_text\",\n \"text\": model,\n \"emoji\": true\n },\n {\n \"type\": \"mrkdwn\",\n \"text\": \"*User:*\"\n },\n {\n \"type\": \"plain_text\",\n \"text\": user,\n \"emoji\": true\n },\n {\n \"type\": \"mrkdwn\",\n \"text\": \"*Serial Number:*\"\n },\n {\n \"type\": \"plain_text\",\n \"text\": sn,\n \"emoji\": true\n }\n ];\n \n return fields;\n}", "async getSysInfo() {\n let response = await this.get('/api/slot/0/sysInfo');\n return Object.assign({}, response.sysInfo.device[0],\n response.sysInfo.network.LAN);\n }", "function onClickDeviceSelect(button) {\r\n\r\n // parse device id from button name\r\n var splitted = button.id.split('_');\r\n var id = parseInt(splitted[1]);\r\n\r\n selectedDevice.id = id;\r\n\r\n // remove selected layout from previous device\r\n if (typeof selected_device_in_list !== 'undefined') {\r\n selected_device_in_list.className = \"device_in_list unselected\";\r\n }\r\n\r\n // set selected layout to the current device\r\n selected_device_in_list = button;\r\n selected_device_in_list.className = \"device_in_list selected\";\r\n\r\n var msg = {};\r\n msg.desId = id;\r\n msg.srcId = clientId;\r\n msg.type = \"pullDevice\";\r\n socket.emit('message', msg);\r\n\r\n // requests complete informations about the device\r\n // var msg = {};\r\n // msg.desId = id;\r\n // msg.srcId = clientId;\r\n // msg.type = \"getDevice\";\r\n // console.log(\"Send message:\");\r\n // console.log(msg);\r\n // socket.emit('message', msg);\r\n}", "function HMDVRDevice() {\n}", "function HMDVRDevice() {\n}" ]
[ "0.6881749", "0.6316864", "0.6182602", "0.6162377", "0.6117553", "0.6077262", "0.60668993", "0.6066492", "0.60541606", "0.60541606", "0.60541606", "0.60541606", "0.60541606", "0.60541606", "0.6032404", "0.60089266", "0.5942555", "0.5935273", "0.59175646", "0.5915749", "0.5854172", "0.584413", "0.5843589", "0.58354247", "0.5815665", "0.57962126", "0.57860106", "0.5755415", "0.57511306", "0.5738528", "0.57370824", "0.5734356", "0.57047796", "0.56957424", "0.56880254", "0.5682181", "0.5674573", "0.56681854", "0.5611149", "0.560925", "0.5605961", "0.56026137", "0.56016773", "0.5601508", "0.5599207", "0.5587608", "0.55852705", "0.55665976", "0.55665976", "0.55665976", "0.55665976", "0.55557555", "0.5550751", "0.5533751", "0.55225617", "0.5521429", "0.5499531", "0.54791766", "0.5471426", "0.54594314", "0.5448817", "0.54468346", "0.54392767", "0.5432639", "0.5431876", "0.5431408", "0.5429215", "0.54237294", "0.54166335", "0.54150385", "0.54072875", "0.5401815", "0.5401406", "0.53993297", "0.53949755", "0.5391611", "0.5390568", "0.53881174", "0.5371086", "0.53647876", "0.535991", "0.53584206", "0.53417695", "0.5329016", "0.5329016", "0.532025", "0.5318135", "0.5314881", "0.5311409", "0.53104407", "0.5301212", "0.5296468", "0.5295812", "0.529377", "0.5288919", "0.528748", "0.5279415", "0.5278848", "0.52711827", "0.52711827" ]
0.64631146
1
handle the sensor information
function handle_sensor(topic, payload) { var sensor = {}; var msgType = topic[3]; var sensorId = topic[2]; if (sensors[sensorId] == null) { sensors[sensorId] = new Object(); sensor.id = sensorId; sensor.name = sensorId; } else sensor = sensors[sensorId]; // reset the name, if possible if (sensor.name == sensorId && flx != undefined && sensor.port != undefined) { sensor.name = flx[sensor.port].name + " " + sensor.subtype; } var value = JSON.parse(payload); // now compute the gauge switch (msgType) { case "gauge": // process currently only the FLM delivered values with timestamp if (value.length == 3) { // check time difference of received value to current time // this is due to pulses being send on occurance, so potentially outdated var now = new Date().getTime(); var diff = now / 1e3 - value[0]; // drop values that are older than 10 sec - as this is a realtime view if (diff > 100) break; // check if current sensor was already registered var obj = series.filter(function(o) { return o.label == sensor.name; }); // flot.time requires UTC-like timestamps; // see https://github.com/flot/flot/blob/master/API.md#time-series-data var timestamp = value[0] * 1e3; // ...if current sensor does not exist yet, register it if (obj[0] == null) { obj = {}; obj.label = sensor.name; obj.data = [ timestamp, value[1] ]; obj.color = color; color++; series.push(obj); // add graph select option $("#choices").append("<div class='checkbox'>" + "<small><label>" + "<input type='checkbox' id='" + sensor.name + "' checked='checked'></input>" + sensor.name + "</label></small>" + "</div>"); } else { obj[0].data.push([ timestamp, value[1] ]); // move out values older than 5 minutes var limit = parseInt(obj[0].data[0]); diff = (timestamp - limit) / 1e3; if (diff > 300) { var selGraph = new Array(); for (var i in series) { var selObj = {}; selObj.label = series[i].label; selObj.data = series[i].data.filter(function(v) { return v[0] > limit; }); selObj.color = series[i].color; selGraph.push(selObj); } series = selGraph; } } } // if length break; default: break; } // check the selected checkboxes selSeries = []; $("#choices").find("input:checked").each(function() { var key = $(this).attr("id"); var s = series.filter(function(o) { return o.label == key; }); selSeries.push(s[0]); }); // plot the selection var width = $("#graphpanel").width(); var height = width * 3 / 4; height = height > 600 ? 600 : height; $("#graph").width(width).height(height); $.plot("#graph", selSeries, options); // and store the sensor configuration sensors[sensorId] = sensor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sensorFunc() {\n\t// calls the success callback if the sesnor is there otherwise calls error\n\t// callback\n\ttizen.humanactivitymonitor.getHumanActivityData(\"HRM\",\n\t\t\tsuccessCallbackHeart, errorCallback); // HeartRate API\n}", "function handle_sensor(topicArray, payload) {\n // the retrieved sensor information\n var sensor = {};\n // the message type is the third value\n var msgType = topicArray[3];\n // the sensor ID\n var sensorId = topicArray[2];\n if (sensors[sensorId] === undefined) {\n sensors[sensorId] = new Object();\n sensor.id = sensorId;\n sensor.name = sensorId;\n } else sensor = sensors[sensorId];\n sensors[sensorId] = sensor;\n switch (msgType) {\n case \"gauge\":\n switch (payload.length) {\n case 2:\n var now = parseInt(new Date().getTime() / 1e3);\n payload.unshift(now);\n break;\n\n case 3:\n // FLM gauges consist of timestamp, value, and unit\n if (payload[2] === \"W\") {\n var insertStr = \"INSERT INTO flmdata\" + \" (sensor, timestamp, value, unit)\" + ' VALUES (\"' + topicArray[2] + '\",' + ' \"' + payload[0] + '\",' + ' \"' + payload[1] + '\",' + ' \"' + payload[2] + '\");';\n db.run(insertStr, function(err, res) {\n if (err) {\n db.close();\n throw err;\n }\n });\n }\n break;\n\n default:\n break;\n }\n break;\n\n default:\n break;\n }\n}", "function readSensorData() {\n \t bme280.readSensorData()\n .then((data) => {\n // temperature_C, pressure_hPa, and humidity are returned by default.\n temperature = data.temperature_C + 273.15;\n pressure = data.pressure_hPa * 100;\n humidity = data.humidity / 100;\n dewPoint = calculateDewpoint(data.temperature_C, humidity);\n\n //console.log(`data = ${JSON.stringify(data, null, 2)}`);\n\n // create message\n var delta = createDeltaMessage(temperature, humidity, pressure, dewPoint)\n\n // send temperature\n app.handleMessage(plugin.id, delta)\n\n })\n .catch((err) => {\n console.log(`BME280 read error: ${err}`);\n });\n }", "function processReading(data) {\n var timenow = new Date(); // current time\n var trimmed = data.trim().replace(/>/g,''); // remove unwanted chars\n console.log(\"RH-USB: %s\", trimmed);\n var fields = trimmed.split(',');\n var temp = fields[1];\n var humid = fields[0];\n setTimeout(readRHUSB, period); // schedule next reading\n publish({ // publish sensor reading\n time: timenow.toISOString(),\n temperature: temp,\n humidity: humid\n });\n}", "function readSensor(){\n sensor.read(SENSORTYPE, GPIOPIN, function(err, temperature, humidity) {\n if (!err) {\n console.log('temp: ' + temperature.toFixed(1) + 'C, ' + 'humidity: ' + humidity.toFixed(1) + '%');\n } else {\n console.log(err);\n }\n });\n}", "function onMessageArrived(message) {\n ss = message.payloadString;\n var obj = JSON.parse(ss)\n console.log(obj);\n \n if ('CENTRALDEVICE_SENSOR' in obj) {\n var wind = obj.CENTRALDEVICE_SENSOR.WD;\n var time = obj.CENTRALDEVICE_SENSOR.TS;\n var date = obj.CENTRALDEVICE_SENSOR.DS;\n var AH = obj.CENTRALDEVICE_SENSOR.AH;\n var LX = obj.CENTRALDEVICE_SENSOR.LX;\n var RG = obj.CENTRALDEVICE_SENSOR.RG;\n var AT = obj.CENTRALDEVICE_SENSOR.AT;\n \n\n winddata.addData([wind], time);\n winddata.removeData();\n\n lxdata.addData([LX], time);\n lxdata.removeData();\n\n ahdata.addData([AH], time);\n ahdata.removeData();\n\n atdata.addData([AT], time);\n atdata.removeData();\n \n\n $(\".windspeeddata\").text(wind);\n $(\".ahdata\").text(AH);\n $(\".lxdata\").text(LX);\n $(\".rgdata\").text(RG);\n $(\".atdata\").text(AT);\n } // End if\n\n } // End message arrive", "update(signal) {\n\t\tlet result;\n\t\twhile ((result = signal.getResult()) != null) {\n\t\t\tif (this.Sensors !== undefined && typeof result !== 'string' && result != null && result.valid) {\n\t\t\t\tlet tz = this.driver.homey.clock.getTimezone();\n\t\t\t\tlet when = result.lastupdate.toLocaleString(this.driver.homey.i18n.getLanguage(), { timeZone: tz });\n\t\t\t\tlet whenUTC = result.lastupdate; // UTC\n\t\t\t\tlet pid = result.pid || result.protocol;\n\t\t\t\tlet did = pid + ':' + result.id + ':' + (result.channel || 0);\n\t\t\t\tif (this.Sensors.get(did) === undefined) {\n\t\t\t\t\tthis.Sensors.set(did, { raw: { data: {} } });\n\t\t\t\t\tsignal.debug('Found a new sensor. Total found is now', this.Sensors.size);\n\t\t\t\t}\n\t\t\t\tlet current = this.Sensors.get(did).raw;\n\t\t\t\t// Check if a value has changed\n\t\t\t\tlet newdata = false;\n\t\t\t\tlet newvalue = {\n\t\t\t\t\t...result,\n\t\t\t\t\tdata: current.data\n\t\t\t\t};\n\t\t\t\tfor (let c in result.data) {\n\t\t\t\t\tif (result.data[c] !== newvalue.data[c]) {\n\t\t\t\t\t\tnewdata = true;\n\t\t\t\t\t\tnewvalue.data[c] = result.data[c];\n\t\t\t\t\t\tlet cap = capability[c];\n\t\t\t\t\t\tif (cap !== undefined) {\n\t\t\t\t\t\t\tlet val = this._mapValue(c, newvalue.data[c]);\n\t\t\t\t\t\t\tthis.emit('value:' + did, cap, val)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.emit('update:' + did, when, whenUTC);\n\n\t\t\t\t// Determine the sensor type based on its values\n\t\t\t\tnewvalue.type = this._determineType(newvalue.data);\n\t\t\t\tif (newvalue.type !== undefined) {\n\t\t\t\t\tsignal.debug('Sensor value has changed:', newdata);\n\n\t\t\t\t\t// Add additional data\n\t\t\t\t\tnewvalue.count = (current.count || 0) + 1;\n\t\t\t\t\tnewvalue.newdata = newdata;\n\n\t\t\t\t\tlet device = this.Devices.get(did)\n\t\t\t\t\tlet name = newvalue.name\n\t\t\t\t\tif (device) {\n\t\t\t\t\t\tname = device.getName()\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the sensor log\n\t\t\t\t\tlet display = {\n\t\t\t\t\t\tprotocol: signal.getName(),\n\t\t\t\t\t\ttype: genericType[newvalue.type].txt[this.locale] || genericType[newvalue.type].txt.en,\n\t\t\t\t\t\ticon: genericType[newvalue.type].icon,\n\t\t\t\t\t\tname: name,\n\t\t\t\t\t\tchannel: (newvalue.channel ? newvalue.channel.toString() : '-'),\n\t\t\t\t\t\tid: newvalue.id,\n\t\t\t\t\t\tupdate: when,\n\t\t\t\t\t\tdata: newvalue.data,\n\t\t\t\t\t\tpaired: this.Devices.has(did)\n\t\t\t\t\t}\n\t\t\t\t\tthis.Sensors.set(did, { raw: newvalue, display: display });\n\t\t\t\t\t//signal.debug(this.Sensors);\n\t\t\t\t\t// Send an event to the front-end as well for the app settings page\n\t\t\t\t\tthis.driver.homey.api.realtime('sensor_update', Array.from(this.Sensors.values()).map(x => x.display));\n\t\t\t\t} else {\n\t\t\t\t\tsignal.debug('ERROR: cannot determine sensor type for data', newvalue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function updateSensorData(data) {\n // Save the reading then update the UI.\n // labels = [\"ACC_X\", \"ACC_Y\", \"ACC_Z\", \"GYRO_X\", \"GYRO_Y\", \"GYRO_Z\", \"MAG_X\", \"MAG_Y\", \"MAG_Z\",\n // \"TEMP\", \"IO\", \"A1\", \"A2\", \"C\", \"Q1\", \"Q2\", \"Q3\", \"Q4\", \"PITCH\", \"YAW\", \"ROLL\", \"HEAD\"]\n \n if (launchWS){\n imuData = [data.ACC_X, data.ACC_Y];\n }\n }", "function handle_device(topic, payload) {\n var deviceID = topic[2];\n if (topic[4] == \"flx\") flx = JSON.parse(payload);\n if (topic[4] == \"sensor\") {\n var config = JSON.parse(payload);\n for (var obj in config) {\n var cfg = config[obj];\n if (cfg.enable == \"1\") {\n if (sensors[cfg.id] == null) {\n sensors[cfg.id] = new Object();\n sensors[cfg.id].id = cfg.id;\n if (cfg.function != undefined) {\n sensors[cfg.id].name = cfg.function;\n } else {\n sensors[cfg.id].name = cfg.id;\n }\n if (cfg.subtype != undefined) sensors[cfg.id].subtype = cfg.subtype;\n if (cfg.port != undefined) sensors[cfg.id].port = cfg.port[0];\n } else {\n if (cfg.function != undefined) sensors[cfg.id].name = cfg.function;\n }\n }\n }\n }\n }", "function handle_device(topicArray, payload) {\n switch (topicArray[4]) {\n case \"flx\":\n flx = payload;\n break;\n\n case \"sensor\":\n for (var obj in payload) {\n var cfg = payload[obj];\n if (cfg.enable == \"1\") {\n if (sensors[cfg.id] === undefined) sensors[cfg.id] = new Object();\n sensors[cfg.id].id = cfg.id;\n if (cfg.function !== undefined) {\n sensors[cfg.id].name = cfg.function;\n } else if (flx !== undefined && flx[cfg.port] !== undefined) {\n sensors[cfg.id].name = flx[cfg.port].name + \" \" + cfg.subtype;\n }\n if (cfg.subtype !== undefined) sensors[cfg.id].subtype = cfg.subtype;\n if (cfg.port !== undefined) sensors[cfg.id].port = cfg.port[0];\n console.log(\"Detected sensor \" + sensors[cfg.id].id + \" (\" + sensors[cfg.id].name + \")\");\n mqttclient.subscribe(\"/sensor/\" + cfg.id + \"/gauge\");\n mqttclient.subscribe(\"/sensor/\" + cfg.id + \"/counter\");\n }\n }\n break;\n\n default:\n break;\n }\n }", "function processDataCallback(data) {\n\t\t\t\n\t\t\tvar event = {};\n\t\t\t\n\t\t\tevent.deviceId = data.deviceId;\n\t\t\tevent.riderId = data.riderInformation.riderId != undefined ? data.riderInformation.riderId : 0;\n\t\t\tevent.distance = data.geographicLocation.distance != undefined ? Math.round(data.geographicLocation.distance) : 0;\n\t\t\tevent.lat = data.geographicLocation.snappedCoordinates.latitude != undefined ? data.geographicLocation.snappedCoordinates.latitude : 0;\n\t\t\tevent.long = data.geographicLocation.snappedCoordinates.longitude != undefined ? data.geographicLocation.snappedCoordinates.longitude : 0;\n\t\t\tevent.acceleration = data.riderStatistics.acceleration != undefined ? parseFloat(data.riderStatistics.acceleration.toFixed(2)) : 0;\n\t\t\tevent.time = data.time != undefined ? data.time : 0;\n\t\t\tevent.altitude = data.gps.altitude != undefined ? data.gps.altitude: 0;\n\t\t\tevent.gradient = data.geographicLocation.gradient != undefined ? data.geographicLocation.gradient: 0;\n\t\t\t\n\t\t\t//Add speed object\n\t\t\tvar speed = data.riderInformation.speedInd ? (data.gps.speedGps != undefined ? data.gps.speedGps : 0) : 0 ;\n\t\t\tevent.speed = {\n\t\t\t\t\t\"current\" : speed,\n\t\t\t\t\t\"avg10km\" : 0.0,\n\t\t\t\t\t\"avg30km\" : 0.0\n\t\t\t}\n\t\t\t\n\t\t\t//Add power object\n\t\t\tvar power = data.riderInformation.powerInd ? (data.sensorInformation.power != undefined ? data.sensorInformation.power : 0) : 0;\n\t\t\tevent.power = {\n\t\t\t\t\t\"current\" : getFeedValue(\"power\", power),\n\t\t\t\t\t\"avg10km\" : 0,\n\t\t\t\t\t\"avg30km\" : 0\n\t\t\t}\n\t\t\t\n\t\t\tevent.heartRate = data.riderInformation.HRInd ? (data.sensorInformation.heartRate != undefined ? getFeedValue(\"HR\", data.sensorInformation.heartRate) : 0) : 0;\n\t\t\tevent.cadence = data.riderInformation.cadenceInd ? (data.sensorInformation.cadence != undefined ? data.sensorInformation.cadence : 0) : 0;\n\t\t\tevent.bibNumber = data.riderInformation.bibNumber != undefined ? data.riderInformation.bibNumber: 0;\n\t\t\tevent.teamId = data.riderInformation.teamId != undefined ? data.riderInformation.teamId: 0;\n\t\t\t\n\t\t\tvar eventStageId = data.riderInformation.eventId + \"-\" + data.riderInformation.stageId;\t\t\n\t\t\tdataCallback(event, eventStageId + \"-rider\");\n\t\t}", "function eventListener(device, transducer) {\n var today = getToday();\n\n // (EDIT) check if the DEVICE name is the one you want\n if(device==\"しらすの入荷情報湘南\") {\n /*\n * (EDIT) change below statements depending on\n * which TRANSDUCER & what VALUE you want to use\n */\n if (typeof transducer.sensorData === \"undefined\") {\n status(\"Data undefined\");\n return;\n }\n\n if (transducer.id == \"入荷情報\") {\n EnoshimaSensorInfo.shirasu = transducer.sensorData.rawValue;\n\n if (transducer.sensorData.rawValue.indexOf(today) < 0) {\n // 未入荷\n EnoshimaSensorInfo.amount = 1;\n\n return;\n }\n\n if (transducer.sensorData.rawValue.indexOf(\"未入荷\") >= 0) {\n // 未入荷\n EnoshimaSensorInfo.amount = 1;\n }\n else if (transducer.sensorData.rawValue.indexOf(\"入荷\") >= 0) {\n if (transducer.sensorData.rawValue.indexOf(\"僅か\") >= 0) {\n // 入荷僅か\n EnoshimaSensorInfo.amount = 1;\n }\n else {\n // 入荷\n EnoshimaSensorInfo.amount = 0;\n }\n }\n else {\n // 未入荷\n EnoshimaSensorInfo.amount = 1;\n }\n }\n }\n}", "function process(telemetry, executionContext) {\n\n try {\n // Log SensorId and Message\n log(`Sensor ID: ${telemetry.SensorId}. `);\n log(`Sensor value: ${JSON.stringify(telemetry.Message)}.`);\n\n // Get sensor metadata\n var sensor = getSensorMetadata(telemetry.SensorId);\n\n // Retrieve the sensor reading\n var parseReading = JSON.parse(telemetry.Message);\n\n // Set the sensor reading as the current value for the sensor.\n setSensorValue(telemetry.SensorId, sensor.DataType, parseReading.SensorValue);\n\n // Get parent space\n var parentSpace = sensor.Space();\n\n // Get children sensors from the same space\n //var otherSensors = parentSpace.ChildSensors();\n\n // Retrieve carbonDioxide, and motion sensors\n //var positionSensor = otherSensors.find(function(element) {\n // return element.DataType === positionType;\n //});\n\n //var levelSensor = otherSensors.find(function(element) {\n // log(`levelSensor found `);\n //return element.DataType === levelType;\n //});\n log(`Reached here-Abh`);\n // Add your sensor variable here\n\n // get latest values for above sensors\n var levelValue = getFloatValue(parseReading.SensorValue);\n var presence = !!levelValue && levelValue.toLowerCase() === \"true\";\n var positionValue = getFloatValue(positionSensor.Value().Value);\n\n // Add your sensor latest value here\n \n // Return if no motion or carbonDioxide found return\n // Modify this line to monitor your sensor value\n if(positionValue === null || levelValue === null) {\n sendNotification(telemetry.SensorId, \"Sensor\", \"Error: Position or Level are null, returning\");\n return;\n }\n\n // Modify these lines as per your sensor\n var levelLowerThan = \"Room is available and air is fresh\";\n var noAvailableOrFresh = \"Room is not available or air quality is poor\";\n\n // Modify this code block for your sensor\n // If carbonDioxide less than threshold and no presence in the room => log, notify and set parent space computed value\n if(parseFloat(levelValue) > parseFloat(levelThresholdHigh) ) {\n\n log(`${spaceLevelHigh}. Level : ${levelValue}. `);\n setSpaceValue(parentSpace.Id, spaceAvailFresh, \"High\");\n parentSpace.Notify(JSON.stringify(spaceLevelHigh));\n }\n else \n {\n if (parseFloat(levelValue) > parseFloat( levelThresholdMedium))\n {\n log(`${spaceLevelMedium}. Level : ${levelValue}.`);\n setSpaceValue(parentSpace.Id, spaceAvailFresh, \"Medium\");\n }\n else {\n log(`${spaceLevelLow}. Level: ${levelValue}. `);\n setSpaceValue(parentSpace.Id, spaceAvailFresh, \"Low\");\n // Set up custom notification for poor air quality\n parentSpace.Notify(JSON.stringify(spaceLevelLow));\n }\n }\n }\n catch (error)\n {\n log(`An error has occurred processing the UDF Error: ${error.name} Message ${error.message}.`);\n }\n}", "function Sensingmethod(sensortype)\n{\n\tif(sensortype=\"temperature\")\n\t{\n\t\tvar temperatureSensor = new mraa.Aio(0);\n\t\tvar tempValraw=temperatureSensor.read();\n\t\tvar resistance=(1023-tempValraw)*10000/tempValraw; \n\t\tvar temperature=1/(Math.log(resistance/10000)/3975+1/298.15)-273.15; \n\t\tvar tempRound=Math.round(temperature*1e2)/1e2;\n\t\treturn tempRound;\n\t\t\n\t}\n\t\n\tif(sensortype=\"light\")\n\t{\n\tvar light = new groveSensor.GroveLight(1);\n\tvar lightrealtimedata=light.value();\n \treturn lightrealtimedata;\n\t\t\n\t}\n\t\n\tif(sensortype=\"sound\")\n\t{\n\t\tvar soundval=soundValraw;\n\t\treturn soundValraw;\n\t\t\n\t}\n\t\n}", "function sensor(num,sense)\n{\t\n\tvar i;\n\tbase = Number(num);\n\tbase_h = 40\n\tsensorNum = Number(sense)\n\talarm = 0\n\terror = 0\n\trownumber=0\n\twhile(true)\n\t{\tvar r1 = getRandomInt(1,101) // Random event generator for temperature\n\t\tif(r1>=91 && r1<=95)\t\t// 5% chance for -3 to -8\n\t\t{\n\t\t\tt = base + getRandomInt(-8,-2)\n\t\t}\n\t\telse if(r1>=95 && r1<=100)\t\t// 5% chance for 3 to 8\n\t\t{\t\n\t\t\tt = base + getRandomInt(3,9)\n\t\t}\n\t\telse if(r1>=81 && r1<=90)\t\t// 10% chance for error number\n\t\t{\t\n\t\t\tt = 999\n\t\t\terror+=1\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tt = base + getRandomInt(-2,2)\n\t\t}\n\t\tvar r1 = getRandomInt(1,101) // Random event generator for temperature\n\t\tif(r1>=91 && r1<=95)\t\t// 5% chance for -3 to -8\n\t\t{\n\t\t\th = base_h + getRandomInt(-40,-9)\n\t\t}\n\t\telse if(r1>=95 && r1<=100)\t\t// 5% chance for 3 to 8\n\t\t{\t\n\t\t\th = base_h + getRandomInt(10,41)\n\t\t}\n\t\telse if(r1>=81 && r1<=90)\t\t// 10% chance for error number\n\t\t{\t\n\t\t\th = 999\n\t\t\terror+=1\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\th = base_h + getRandomInt(-2,2)\n\t\t}\n\t\tvar d= new Date()\n\t\tvar timestamp=d.toLocaleString();\n\t\t\n\t\tvar data = {\n\t\t\t\"id\" : ++rownumber,\n\t\t\t\"Timestamp\" : timestamp,\n\t\t\t\"sensorid\" : sensorNum,\n\t\t\t\"Temperature\" : t,\n\t\t\t\"Humidity\" : h,\n\t\t\t\"Alarm_Count_Temp\" : alarm,\n\t\t\t\"Alarm_Count_Hum\" : alarm,\n\t\t\t\"ErrorCount\" : error\n\t\t}\n\n\t\tprocess.send(data);\t// sends data to mysql\n\t\tsleep(10000);\n\t};\n}", "readHydrawiseStatus(){\n const cmd = hydrawise_url_status + \"api_key=\" + this.config.hydrawise_apikey;\n\n // execute only if apikey is defined in config page\n if (this.config.hydrawise_apikey!=undefined){\n this.log.info(\"send: \"+cmd);\n //request(cmd, function (error, response, body){\n request(cmd, (error, response, body) => {\n\n if (!error && response.statusCode == 200) {\n // parse JSON response from Hydrawise controller\n var obj = JSON.parse(body);\n // read device config\n hc6.nextpoll = parseInt(obj.nextpoll);\n hc6.time = parseInt(obj.time);\n hc6.message = obj.message;\n this.log.info(\"nextpoll=\"+hc6.nextpoll+\" time=\"+hc6.time+\" message=\"+hc6.message);\n \n // read all configured sensors\n for (let i=0; i<=1; i++){\n // if sensor is configured\n if (obj.sensors[i]!=null){\n hc6.sensors[i].input = parseInt(obj.sensors[i].input);\n hc6.sensors[i].type = parseInt(obj.sensors[i].type);\n hc6.sensors[i].mode = parseInt(obj.sensors[i].mode);\n hc6.sensors[i].timer = parseInt(obj.sensors[i].timer);\n hc6.sensors[i].offtimer = parseInt(obj.sensors[i].offtimer);\n // read all related relays\n for (let j=0; j<=5; j++){\n // if relay is configured\n if (obj.sensors[i].relays[j]!=null){\n hc6.sensors[i].relays[j]=obj.sensors[i].relays[j].id\n }\n };\n }\n this.log.info(\"sensor\"+i+\": input=\"+hc6.sensors[i].input+\" type=\"+hc6.sensors[i].type+\n \" mode=\"+hc6.sensors[i].mode+ \" timer=\"+hc6.sensors[i].timer+\" offtimer=\"+hc6.sensors[i].offtimer+\n \" relay0=\"+hc6.sensors[i].relays[0]+\" relay1=\"+hc6.sensors[i].relays[1]+\" relay2=\"+hc6.sensors[i].relays[2]+\n \" relay3=\"+hc6.sensors[i].relays[3]+\" relay4=\"+hc6.sensors[i].relays[4]+\" relay5=\"+hc6.sensors[i].relays[5]);\n }\n\n // read all configured relays\n for (let i=0; i<=5; i++){\n if (obj.relays[i]!=null){\n hc6.relays[i].relay_id = parseInt(obj.relays[i].relay_id);\n hc6.relays[i].name = obj.relays[i].name;\n hc6.relays[i].relay = parseInt(obj.relays[i].relay);\n hc6.relays[i].type = parseInt(obj.relays[i].type);\n hc6.relays[i].time = parseInt(obj.relays[i].time);\n hc6.relays[i].run = parseInt(obj.relays[i].run);\n hc6.relays[i].period = parseInt(obj.relays[i].period);\n hc6.relays[i].timestr = obj.relays[i].timestr;\n }\n else{\n hc6.relays[i].relay_id = 0;\n hc6.relays[i].name = \"\";\n hc6.relays[i].relay = 0;\n hc6.relays[i].type = 0;\n hc6.relays[i].time = 0;\n hc6.relays[i].run = 0;\n hc6.relays[i].period = 0;\n hc6.relays[i].timestr = \"\";\n }\n this.log.info(\"relay\"+i+\": relay_id=\"+hc6.relays[i].relay_id+\" name=\"+hc6.relays[i].name+\n \" relay=\"+hc6.relays[i].relay+\" type=\"+hc6.relays[i].type+\" time=\"+hc6.relays[i].time+\n \" run=\"+hc6.relays[i].run+\" period=\"+hc6.relays[i].period+\" timestr=\"+hc6.relays[i].timestr);\n }\n }\n })\n }\n }", "function handle_msg(msg, clock_time)\r\n{\r\n // add to recorded_data if recording is on\r\n\r\n if (recording_on)\r\n {\r\n recorded_records.push(JSON.stringify(msg));\r\n }\r\n\r\n var sensor_id = msg[RECORD_INDEX];\r\n\r\n console.log(\"Got message: \"+JSON.stringify(msg));\r\n\r\n // If an existing entry in 'sensors' has this key, then update\r\n // otherwise create new entry.\r\n if (sensors.hasOwnProperty(sensor_id))\r\n {\r\n update_sensor(msg, clock_time);\r\n }\r\n else\r\n {\r\n init_sensor(msg, clock_time);\r\n }\r\n\r\n}", "function updateSensors(msg) {\n\tstate[msg.sensor] = msg.voltage;\n}", "function readSHT1x(sensorName) {\n\t// Select sensor to be used\n\tSensor.select(sensorName);\n\tasync.series(\n\t\t[\n\t\t\tSensor.init,\n\t\t\tSensor.reset,\n\t\t\tSensor.longWait,\n\t\t\tfunction(callback) {\n\t\t\t\tSensor.getSensorValues(function(error, values) {\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tcallback(error);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t//Add timestamp to values\n\t\t\t\t\tvalues.timestamp = moment().format();\n\n\t\t\t\t\t// Correct humidity in 100% if more than 99%\n\t\t\t\t\tif ('humidity' in values) {\n\t\t\t\t\t\tif (values.humidity > 99) {\n\t\t\t\t\t\t\tvalues.humidity = 100;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\n\t\t\t\t\tif (!sensorName in lastData) {\n\t\t\t\t\t\tlastData[sensorName] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tlastData[sensorName] = values;\n\n\t\t\t\t\tfirebase.addItem(sensorName, values);\n\t\t\t\t\tconsole.log(TITLE.INFO + Sensor.getSelected().name + ':');\n\t\t\t\t\tconsole.log(values);\n\t\t\t\t\tcallback();\n\t\t\t\t});\n\t\t\t},\n\t\t\tfunction(callback) {\n\t\t\t\tconfig.sensors[sensorName].previousReading = moment().format();\n\t\t\t\tcallback();\n\t\t\t},\n\t\t\twriteConfig\n\t\t], \n\t\tfunction(error) {\n\t\t\tSensor.shutdown();\n\t\t\tif (error) {\n\t\t\t\tconsole.error(TITLE.ERROR + error);\n\t\t\t}\n\t\t\treadSensors();\n\t\t}\n\t);\n}", "function readSensors(done) {\n async.series([\n updateTempIndoor,\n updateTempExternal\n ], done);\n }", "function temp_sensor() {\r\n var celsius = temp.value();\r\n var fahrenheit = celsius * 9.0/5.0 + 32.0;\r\n console.log(celsius + \" degrees Celsius, or \" +\r\n Math.round(fahrenheit) + \" degrees Fahrenheit\");\r\n\r\n deviceClient.publish(\"status\",\"json\",'{\"d\" : { \"temperature\" : '+ celsius +'}}');\r\n setTimeout(temp_sensor,1000);\r\n\r\n}", "function readSensor(sensorObj, callback) {\n let statPacket = [];\n\n PythonShell.run(pythonScript, {args: [sensorObj.address, sensorObj.shunt_ohms] }, function (err, data) {\n // Check if script returned an error\n if (err) callback(err);\n\n // Put together the packet of data\n statPacket = data[0];\n statPacket.rpm = sensorObj.rpmSensor.getRPM();\n statPacket.name = sensorObj.name;\n\n // Emit the data to all clients\n // socketObj.emit('stats', statPacket);\n callback(null, statPacket);\n });\n}", "function outputData()\n{\n sensor.update();\n\n var floatData = sensor.getEulerAngles();\n console.log(\"Euler: Heading: \" + floatData.get(0)\n + \" Roll: \" + floatData.get(1)\n + \" Pitch: \" + floatData.get(2)\n + \" degrees\");\n\n floatData = sensor.getQuaternions();\n console.log(\"Quaternion: W: \" + floatData.get(0)\n + \" X:\" + floatData.get(1)\n + \" Y: \" + floatData.get(2)\n + \" Z: \" + floatData.get(3));\n\n floatData = sensor.getLinearAcceleration();\n console.log(\"Linear Acceleration: X: \" + floatData.get(0)\n + \" Y: \" + floatData.get(1)\n + \" Z: \" + floatData.get(2)\n + \" m/s^2\");\n\n floatData = sensor.getGravityVectors();\n console.log(\"Gravity Vector: X: \" + floatData.get(0)\n + \" Y: \" + floatData.get(1)\n + \" Z: \" + floatData.get(2)\n + \" m/s^2\");\n\n console.log(\"\");\n}", "function handleData(data) {\n if (data.Status == \"parked\") {\n getPlate(data.Spot);\n } else {\n handleTimer(data);\n }\n}", "function showSensorInfo(sensor) {\n // Draw canvas with selected room highlighted.\n currentSensor = sensor;\n drawCanvas();\n var html;\n\n if (sensor && sensor.data) {\n // Display info.\n html =\n '<input id=\"close\" type=\"image\" src=\"close.png\">'\n + '<h1>Sensor Data</h1>'\n + '<br /><div id=\"time\">Time</div> ' + fixTimeData(sensor.data.timestamp) + '<br />'\n + '<button id=\"lum\" class=\"dataButton\">Luminosity</button> ' + sensor.data.l + ' lum<br />'\n + '<button id=\"hum\" class=\"dataButton\">Humidity</button> ' + sensor.data.h + ' %<br />'\n + '<button id=\"temp\" class=\"dataButton\">Temperature</button> ' + sensor.data.t + ' celcius<br />'\n + '<button id=\"press\" class=\"dataButton\">Pressure</button> ' + sensor.data.p + ' Pascal<br />'\n + '<button id=\"co2\" class=\"dataButton\">CO2</button> ' + sensor.data.c + ' ppm<br />'\n + '<img src=\"' + sensor.image + '\" />'\n } else {\n html =\n '<input id=\"close\" type=\"image\" src=\"close.png\">'\n + '<h1>Sensor Data</h1>'\n + '<br />Sorry, sensor data not available right now :(</br>'\n + '<img src=\"' + sensor.image + '\" />'\n }\n\n showInfo(html);\n }", "function initSensorData() {\r\n // let dbRes = getAllRoomInfo();\r\n // dbRes.promise.then(res => {\r\n // if (res.rowCount > 0) {\r\n // let roomList = res.rows;\r\n // roomList.forEach(item => {\r\n var room_no = 1;\r\n sensorDataMap[room_no] = {\r\n roomNo: +room_no,\r\n pm2p5CC: '未测出',\r\n temperature: '未测出',\r\n humidity: '未测出',\r\n pm10CC: '未测出'\r\n };\r\n // });\r\n // }\r\n module.exports.startUpdateSensorData();\r\n // dbRes.client.end();\r\n // });\r\n console.log(\"function\");\r\n}", "function serialEvent(){\n //THIS READS BINARY - serial.read reads from the serial port, Number() sets the data type to a number\n\t// inData = Number(serial.read()); //reads data as a number not a string\n\n //THIS READS ASCII\n inData = serial.readLine(); //read until a carriage return\n\n //best practice is to make sure you're not reading null data\n if(inData.length > 0){\n //split the values apart at the comma\n var numbers = split(inData, ',');\n\n //set variables as numbers\n sensor1 = Number(numbers[0]);\n sensor2 = Number(numbers[1]);\n }\n\n console.log(sensor1 + \", \" + sensor2);\n}", "function pollSensorSerial() {\n let intervalPoll = setInterval(function () {\n that.stateMachine.sensorPiso.Get_state(function (err, dta) { });\n if(that.stateMachine.isDispense===false){\n clearInterval(intervalPoll);\n intervalPoll = null\n }\n }, 500);\n }", "updateTelemetry() {\n // check that subspace radio works\n if (this.subspaceRadio.isDamaged()) {\n return;\n }\n // go through our sensors\n this.hasSensors.forEach((s, qy) => {\n s.forEach(qx => {\n // get corresponding info\n let info = this.info[qy][qx];\n // get sector from galaxy\n let sector = this.galaxy._getQuadrant(qx, qy);\n this._updateInfo(sector, info);\n });\n });\n }", "handleSensorValue(value, id) {\n if (!this.sensors[id])\n return;\n this.log.debug(`got value ${value} from sensor ${this.sensors[id].address}`);\n this.setStateAsync(id, {\n ack: true,\n val: value\n });\n }", "function dataTreatment(){\n\tconsole.log(\"New data. Weeeeee!\");\n\tvar name, status, data;\n\tObject.keys(tefDevicesData).forEach(function (key){\n\t\tconsole.log(key);\n\t\tconsole.log(JSON.stringify(tefDevicesData[key].deviceInfo));\n\t\tif(tefDevicesData[key].deviceInfo.deviceType == \"MultiSensor\"){\n\t\t\tname = tefDevicesData[key].deviceInfo.name;\n\t\t\tstatus = tefDevicesData[key].deviceInfo.status;\n\t\t\tdata = {};\n\t\t\tdata.temperature = tefDevicesData[key].services[0].data;\n\t\t\tdata.humidity = tefDevicesData[key].services[1].data;\n\t\t\tdata.batteryLevel= tefDevicesData[key].services[2].data;\n\t\t\tdata.motion = tefDevicesData[key].services[3].data;\n\t\t\tif(tefDevicesStates.multisensors.length == 0)\n\t\t\t\ttefDevicesStates.multisensors.push({\"key\":key,\"name\":name,\"status\":status,\"data\":data});\n\t\t\telse{\n\t\t\t\ttefDevicesStates.multisensors.forEach(function (d, index, erray){\n\t\t\t\t\tif(d.key != key){\n\t\t\t\t\t\ttefDevicesStates.multisensors.push({\"key\":key,\"name\":name,\"status\":status,\"data\":data});\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// Currently we don't check if the data has changed. We just overwrite the previous data.\n\t\t\t\t\t\ttefDevicesStates.multisensors[index] = {\"key\":key,\"name\":name,\"status\":status,\"data\":data};\n\t\t\t\t\t\tconsole.log(\"The multisensor \" + d.name + \" already exists. Updated.\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif(tefDevicesData[key].deviceInfo.deviceType == \"ContactSensor\"){\n\t\t\tconsole.log(key + \"ContactSensor\");\n\t\t\tname = tefDevicesData[key].deviceInfo.name;\n\t\t\tstatus = tefDevicesData[key].deviceInfo.status;\n\t\t\tdata = {};\n\t\t\tdata.batteryLevel= tefDevicesData[key].services[0].data;\n\t\t\tdata.status\t\t = tefDevicesData[key].services[1].data;\n\t\t\tif(tefDevicesStates.contactsensors.length == 0)\n\t\t\t\ttefDevicesStates.contactsensors.push({\"key\":key,\"name\":name,\"status\":status,\"data\":data});\n\t\t\telse{\n\t\t\t\ttefDevicesStates.contactsensors.forEach(function (d, index, array){\n\t\t\t\t\tif(d.key != key){\n\t\t\t\t\t\ttefDevicesStates.contactsensors.push({\"key\":key,\"name\":name,\"status\":status,\"data\":data});\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// Currently we don't check if the data has changed. We just overwrite the previous data.\n\t\t\t\t\t\ttefDevicesStates.contactsensors[index] = {\"key\":key,\"name\":name,\"status\":status,\"data\":data};\n\t\t\t\t\t\tconsole.log(\"The contactsensor\" + d.name + \" already exists. Updated.\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif(tefDevicesData[key].deviceInfo.deviceType == \"Camera\"){\n\t\t\tconsole.log(key + \"Camera\");\n\t\t\tname = tefDevicesData[key].deviceInfo.name;\n\t\t\tstatus = tefDevicesData[key].deviceInfo.status;\n\t\t\tdata = {};\n\t\t\tdata.PROVISIONAL = tefDevicesData[key].services[0].data;\n\t\t\tif(tefDevicesStates.cameras.length == 0)\n\t\t\t\ttefDevicesStates.cameras.push({\"key\":key,\"name\":name,\"status\":status,\"data\":data});\n\t\t\telse{\n\t\t\t\ttefDevicesStates.cameras.forEach(function (d, index, array){\n\t\t\t\t\tif(d.key != key){\n\t\t\t\t\t\ttefDevicesStates.cameras.push({\"key\":key,\"name\":name,\"status\":status,\"data\":data});\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// Currently we don't check if the data has changed. We just overwrite the previous data.\n\t\t\t\t\t\ttefDevicesStates.cameras[index] = {\"key\":key,\"name\":name,\"status\":status,\"data\":data};\n\t\t\t\t\t\tconsole.log(\"The camera\" + d.name + \" already exists. Updated.\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif(tefDevicesData[key].deviceInfo.deviceType == \"Socket\"){\n\t\t\tconsole.log(key + \"Socket\");\n\t\t\tname = tefDevicesData[key].deviceInfo.name;\n\t\t\tstatus = tefDevicesData[key].deviceInfo.status;\n\t\t\tdata = {};\n\t\t\tdata.status = tefDevicesData[key].services[0].data;\n\t\t\tif(tefDevicesStates.sockets.length == 0)\n\t\t\t\ttefDevicesStates.sockets.push({\"key\":key,\"name\":name,\"status\":status,\"data\":data});\n\t\t\telse{\n\t\t\t\ttefDevicesStates.sockets.forEach(function (d, index, array){\n\t\t\t\t\tif(d.key != key){\n\t\t\t\t\t\ttefDevicesStates.sockets.push({\"key\":key,\"name\":name,\"status\":status,\"data\":data});\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// Currently we don't check if the data has changed. We just overwrite the previous data.\n\t\t\t\t\t\ttefDevicesStates.sockets[index] = {\"key\":key,\"name\":name,\"status\":status,\"data\":data};\n\t\t\t\t\t\tconsole.log(\"The socket\" + d.name + \" already exists. Updated.\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\tconsole.log(\"tefDevicesStates: \" + JSON.stringify(tefDevicesStates));\n}", "function getData(socket) {\n getTemp()\n getLight()\n getWindowState()\n getHeaterState()\n getArtificialLightIntensity()\n getHumidity()\n\n socket.emit(\"newMeasurements\", readData)\n}", "handleStartMeterReading(event){\n \n this.startMeterReading = event.target.value;\n \n this.updateKmDriven();\n }", "function processedSFData() {\n\t\tthis.moteid = idMote;\n\t\tthis.sensorType = sensorType;\n\t\tthis.lastTimestamp = lastTimeStamp;\n\t\tthis.lastValue = lastValue;\n\t\tthis.arrayValuesDay = valuesDay;\n\t\tthis.populationDay = populationDay;\n\t\tthis.arrayValuesWeek = valuesWeek;\n\t\tthis.populationWeek = populationWeek;\n\t\tthis.platform = platform;\n\t\tthis.unit = unit;\n\t}", "function getSensorMeasurementValues_sv(sensor, data) {\n var values = [];\n var value = \"\";\n\n switch(sensor) {\n case \"tachometer\":\n value = \"tachometer_rpm\";\n break;\n case \"wss\":\n value = \"wss_speed\";\n break;\n case \"potentiometer\":\n value = \"potentiometer_accelerator_angle\";\n break;\n case \"brake_sensor\":\n value = \"brake_sensor_pressure\";\n break;\n }\n\n $.each(data.results, function(index, row) {\n $.each(row, function(index, item) {\n if (index.match(value)) {\n if(item === null) {\n if(index.match(\"size\")) {\n values.push(0);\n } else {\n values.push(Number.NaN);\n }\n } else {\n if(index.match(\"size\")) {\n values.push(1);\n } else {\n values.push(item);\n }\n }\n }\n });\n });\n\n let timestampInterval = parseInt($(\"#timestamp-interval\").val());\n let realValues = [];\n if(timestampInterval > 1) {\n for(let i=0; i<values.length; i += timestampInterval) {\n realValues.push(values[i]);\n }\n } else {\n realValues = values;\n }\n\n return realValues;\n}", "function handleAcceleration(data) {\n t = new Date().getTime()\n ax = data.getFloat32(0, true);\n ay = data.getFloat32(4, true);\n az = data.getFloat32(8, true);\n\n var accel = {'type': 'accel', 'data': [{'time': t, 'ax': ax, 'ay': ay, 'az': az}]}\n //console.log(JSON.stringify(accel))\n ws.send(JSON.stringify(accel))\n //$.post('/arduino_csv_accel_raw', JSON.stringify(accel))\n}", "function requestSensorData () {\n return {\n type: actions.REQUEST_SENSOR_DATA\n };\n}", "function sendSensorData() {\n\tvar basicData = [];\n\n\t// status basic data\n\tbasicData[0] = {\n\t\t'Status1': 'Normal',\n\t\t'Power1': 'On',\n\t\t'Voltage level1': 'Check',\n\t\t'Temp1 (F)': 24.22,\n\t\t'Humidity level1 (%)': 9,\n\t\t'Barometer1 (in)': 100,\n\t\t'Barometer1 (mb)': 8,\n\t\t'Pump status1': 'Stopped',\n\t\t'Last sample at1': '2017-4-17',\n\t\t'bm3nVoeJ6n': '192.168.0.12'\n\t};\n\n\t// vocAnalytics basic data\n\tbasicData[1] = {\n\t\t'Benzene1': {\n\t\t\t'ppb1': 12\n\t\t},\n\t\t'Toluene1': {\n\t\t\t'ppb1': 11\n\t\t},\n\t\t'm-xylene1': {\n\t\t\t'ppb1': 13\n\t\t},\n\t\t'O-Xylene1': {\n\t\t\t'ppb1': 14\n\t\t},\n\t\t'Mesitylene1': {\n\t\t\t'ppb1': 15\n\t\t},\n\t\t'Hexanal1': {\n\t\t\t'ppb1': 16\n\t\t},\n\t\t'Chlorobenzene1': {\n\t\t\t'ppb1': 17\n\t\t},\n\t\t'Chlorohexane1': {\n\t\t\t'ppb1': 18\n\t\t}\n\t};\n\n\t// vocRaw basic data\n\tbasicData[2] = {\n\t\t'Raw Capacitance (pF)1': 22\n\t};\n\n\t// processedData basic data\n\tbasicData[3] = {\n\t\t'Compensated Capacitance1': 32\n\t};\n\n\t// debug basic data\n\tbasicData[4] = {\n\t\t'Debug1': 'This sensor is broken because of some errors.'\n\t};\n\n\tsendCategory(basicData[0], 0);\n}", "function getSensorMeasurementValues_drone(sensor, data) {\n var values = [];\n var value = \"\";\n\n switch(sensor) {\n case \"battery\":\n value = \"battery_voltage\";\n break;\n case \"barometer\":\n value = \"barometer_altitude\";\n break;\n case \"gps\":\n value = \"gps_satellites_number\";\n break;\n case \"photo\":\n value = \"photo_size\";\n break;\n case \"video\":\n value = \"video_size\";\n break;\n }\n\n $.each(data.results, function(index, row) {\n $.each(row, function(index, item) {\n if (index.match(value)) {\n if(item === null) {\n if(index.match(\"size\")) {\n values.push(0);\n } else {\n values.push(Number.NaN);\n }\n } else {\n if(index.match(\"size\")) {\n values.push(1);\n } else {\n values.push(item);\n }\n }\n }\n });\n });\n\n let timestampInterval = parseInt($(\"#timestamp-interval\").val());\n let realValues = [];\n if(timestampInterval > 1) {\n for(let i=0; i<values.length; i += timestampInterval) {\n realValues.push(values[i]);\n }\n } else {\n realValues = values;\n }\n\n return realValues;\n}", "function store (){\n\t\tthis.sensor =senType;\n\t\tthis.unit = thisUnit;\n\t\tthis.reading=maxRead;\n\t\tthis.moteId = idMote;\n\t}", "function store (){\n\t\tthis.sensor =senType;\n\t\tthis.unit = thisUnit;\n\t\tthis.reading=maxRead;\n\t\tthis.moteId = idMote;\n\t}", "function store (){\n\t\tthis.sensor =senType;\n\t\tthis.unit = thisUnit;\n\t\tthis.reading=maxRead;\n\t\tthis.moteId = idMote;\n\t}", "function getTemperature (event) {\n // read variables from the event\n let ev = JSON.parse(event.data);\n let evData = ev.data; // the data from the argon event: \"pressed\" or \"released\"\n let evDeviceId = ev.coreid; // the device id\n let evTimestamp = Date.parse(ev.published_at); // the timestamp of the event\n let alrtDevice = 0;\n\n // helper variables that we need to build the message to be sent to the clients\n let message = \"Verbindung zu deinem smarten Brandmelder ist aktiv.\";\n var floatValue = parseFloat(evData);\n var correctednewTempValue = ((floatValue - 4)*10)/10;\n let difference = correctednewTempValue-correctedoldTempValue;\n correctedoldTempValue = correctednewTempValue;\n let newTempValue = correctednewTempValue;\n if( difference > 0.5 ){\n alrtDevice = 1;\n }\n else{\n alrtDevice = 0;\n }\n // send data to all connected clients\n sendData(\"temperature\", newTempValue, message, evDeviceId, evTimestamp, alrtDevice);\n}", "handle_sensor_metadata(parent, sensor_metadata) {\n console.log(\"handle_sensor_metadata got\", sensor_metadata);\n\n let type_info = {};\n // clone \"acp_type_info\" into its own jsonobject and remove from sensor_metadata\n try {\n type_info = JSON.parse(JSON.stringify(sensor_metadata[\"acp_type_info\"]));\n } catch (err) {\n console.log(\"handle_sensor_metadata parse error for acp_type_info\");\n }\n delete sensor_metadata.acp_type_info;\n\n // Display the Sensor Metadata jsonobject\n let sensor_metadata_txt = JSON.stringify(sensor_metadata, null, 2);\n let sensor_el = document.createElement('pre');\n sensor_el.id = 'sensor_metadata';\n sensor_el.innerHTML = this.escapeHTML(sensor_metadata_txt);\n parent.sensor_info_el.appendChild(sensor_el);\n\n // Display the Sensor Type Metadata object\n // Add the acp_type_id as a heading on the type_info section\n parent.type_heading_type_el.innerHTML = sensor_metadata.acp_type_id;\n let type_txt = JSON.stringify(type_info, null, 2);\n let type_el = document.createElement('pre');\n type_el.id = 'sensor_type_metadata';\n type_el.innerHTML = this.escapeHTML(type_txt);\n parent.type_info_el.appendChild(type_el);\n }", "function handleSensorDataMessage(macAddress, payload) {\n\t// Parse sensor data, convert to ints\n var sensorValues = payload.split(',').map(value => parseInt(value));\n\n // We're expecting five values: power, temp, light, (eventually status).\n if (sensorValues.length !== 3) {\n throw new Error(`Not enough sensor values in packet: ${sensorValues}`);\n }\n\n // Get data values from payload.\n var power = sensorValues[0];\n temperature = sensorValues[1],\n light = sensorValues[2];\n\n // TODO: Trigger events as necessary.\n return saveSensorData(macAddress, power, temperature, light);\n}", "function telemetry() {\n\tlet status = document.getElementById('status');\n\tvar newMeasurement = {};\n\tlet sensor = new Accelerometer();\n\tsensor.addEventListener('reading', function(e) {\n\t\tstatus.innerHTML = 'x: ' + e.target.x + '<br> y: ' + e.target.y + '<br> z: ' + e.target.z;\n\t\tnewMeasurement.x = e.target.x;\n\t\tnewMeasurement.y = e.target.y;\n\t\tnewMeasurement.z = e.target.z;\n\t});\n\tsensor.start();\n\treturn newMeasurement;\n}", "function handleSensorDataUpdate(message) {\n var record_data = {\n water_level: message.water_level,\n moisture_level: message.moisture_level,\n temperature: message.temperature\n };\n\n var record = new SensorRecord(record_data);\n record.save(function() {\n console.log(\"Record saved\");\n last_record = record;\n });\n}", "function readSensors(callback) {\n var sensors = [{name:'light', 'pin':ldr_pin}, {name:'temperature', 'pin':tmp_pin}];\n async.mapSeries(sensors, function(sensor, cb){\n //console.log('requesting sensor: '+sensor['pin']);\n b.analogRead(sensor['pin'], function(val){\n if('value' in val)\n {\n sensor['value'] = val['value'];\n setTimeout(cb, 100, null, sensor);\n }\n else\n cb('no value');\n });\n }, function(err, results){\n console.log('readSensors: ');\n console.dir(results);\n callback(err, results);\n });\n\t/*var ldr = b.analogRead(ldr_pin);\n\tvar tmp = b.analogRead(tmp_pin);\n\n\tif (ldr < 1780 && tmp < 1780) {\n\t\treturn {\n\t\t\tlight: ldr,\n\t\t\ttemperature: (tmp - 500) / 10\n\t\t};\n\t}\n\telse {\n\t\tconsole.log('sensor values are too high!');\n\t\treturn false;\n\t}*/\n}", "handleSensorError(err, id) {\n this.log.warn(`Error reading sensor ${this.sensors[id].address}: ${err}`);\n }", "function sax_on_data(e) {\n saxInput.connect(saxgain);\n if (e.target.value == \"1\") {\n\n saxgain.gain.value = 0.7;\n tune.getAnalyser(saxgain);\n //sax_canvas_freq.getAnalyser(saxgain);\n //$(\"#mic_opacity\").css('opacity','1');\n //$(\"#mic_led_onoff_span\").text(\"ON\");\n // let checkNew = document.getElementById('pitch')\n // console.log(tune.dataPitch);\n // let dfasfdsf = $(\"#pitch\").html()\n // socket.emit('pitch',dfasfdsf);\n }else {\n //saxInput.connect(saxgain);\n //saxgain.gain.value =0;\n saxgain.disconnect(0);\n\n //$(\"#mic_opacity\").css('opacity','0.4');\n //$(\"#mic_led_onoff_span\").text(\"OFF\");\n }\n\n}", "function init_sensor(msg, clock_time)\r\n {\r\n // new sensor, create marker\r\n console.log(\" ** New sensor id:'\"+msg[RECORD_INDEX]+\"'\");\r\n\r\n var sensor_id = msg[RECORD_INDEX];\r\n\r\n var sensor = { sensor_id: sensor_id,\r\n msg: msg\r\n };\r\n\r\n // flag if this record is OLD or NEW\r\n init_old_status(sensor, clock_time);\r\n\r\n sensors[sensor_id] = sensor;\r\n\r\n xcoffee_handle_msg(msg);\r\n }", "function Sensor() {\n this.adapters = []\n this.fanSpeed = \"\"\n this.xAxis = ['0']\n this.grid = undefined\n}", "handleChange(e) {\n this.props.onTemperatureChange(e.target.value);\n }", "function sensorCheck() {\n console.log( '\\u001B[2J\\u001B[0;0f' )\n var temperatureC = ( analogPin0.read()*5.0/1024.0 - 0.5 ) * 100\n var temperatureF = temperatureC * 9/5.0 + 32\n console.log( \"Temperature is \" + temperatureF + \" degrees F\" );\n var photosense = ( 512 - analogPin1.read() );\n console.log( \"Light reading is \" + photosense + \" brightness\" );\n var audiosense = ( analogPin2.read() );\n console.log( \"Ambient noise reading is \" + audiosense );\n}", "function sensorPub() {\n\t//Publish sensor data\n\ttemperatureData = temperature.getTemperature();\n\tsocket.send(['Grove_temperatureandhumiditysensor_temperature_1_0-1', JSON.stringify({\"name\": \"Grove_temperatureandhumiditysensor_temperature_1_0-1\", \"datapoints\":[[timeMS.getTime(), temperatureData, quality]]})]);\n\tconsole.log(temperatureData + \" degrees Celsius\");\n\thumidityData = humidity.getHumidity();\n\tsocket.send(['Grove_temperatureandhumiditysensor_humidity_1_0-1', JSON.stringify({\"name\": \"Grove_temperatureandhumiditysensor_humidity_1_0-1\", \"datapoints\":[[timeMS.getTime(), humidityData, quality]]})]);\n\tconsole.log(humidityData + \" RH\");\n\tbuttonData = button.value();\n\tsocket.send(['Grove_button_1_1-1', JSON.stringify({\"name\": \"Grove_button_1_1-1\", \"datapoints\":[[timeMS.getTime(), buttonData, quality]]})]);\n\tconsole.log(buttonData + \" value for button\");\n\tlightData = light.raw_value();\n\tsocket.send(['Grove_light_1_1-1', JSON.stringify({\"name\": \"Grove_light_1_1-1\", \"datapoints\":[[timeMS.getTime(), lightData, quality]]})]);\n\tconsole.log(lightData + \" raw light value\");\n\tmotionData = motion.value();\n\tsocket.send(['Grove_motionsensor_1_4-1', JSON.stringify({\"name\": \"Grove_motionsensor_1_4-1\", \"datapoints\":[[timeMS.getTime(), motionData, quality]]})]);\n\tconsole.log(motionData + \" motion boolean\");\n\tconsole.log(\"-------------------------\");\n\n}", "function processMessages(topic, message) {\n switch(topic) {\n // Input device has sent keep-alive message\n case inputDeviceStatusTopic:\n if(!inputDeviceOnline) {\n inputDeviceOnline = true;\n displayDeviceStatus();\n }\n\n break;\n\n // Sensor device has sent sensor data\n case inputDeviceDistanceSensorTopic:\n case inputDeviceTemperatureSensorTopic:\n case inputDeviceLightSensorTopic:\n let nextValue = message;\n\n // Real MQTT messages are UTF-8 encoded, so we need to decode them\n if(!mockDataEnabled) {\n let nextValue = new TextDecoder('utf-8').decode(nextValue);\n }\n\n // Push next value to appropriate sensor data object\n currentSensorData.labels.push(Date.now());\n currentSensorData.data.push(parseInt(message));\n\n // Remove first data point when we have too many\n if(currentSensorData.labels.length >= maxReadings) {\n currentSensorData.labels.shift();\n currentSensorData.data.shift();\n }\n\n // Inject current sensor data into chart data object\n dataObject.labels = currentSensorData.labels;\n dataObject.datasets[0].data = currentSensorData.data;\n\n // Only refresh the UI at the interval requested by the user\n if(Date.now() > lastDisplayUpdate + displayInterval && !isPaused) {\n\n // Re-initialize chart to display new data\n liveChart = new Chart(chartCanvasEl, {\n type: 'line',\n data: dataObject,\n options: optionsObject\n });\n\n // Create new row in visually-hidden data table\n let row = document.createElement('tr');\n row.innerHTML = `\n <td>${nextValue}</td>\n <td>${new Date()}</td>\n `;\n\n let tbody = document.querySelector('#sensor-data tbody');\n let firstRow = tbody.querySelector('tr');\n\n // Insert new row into the data table\n if(firstRow == undefined) {\n tbody.append(row);\n } else {\n tbody.insertBefore(row, firstRow);\n }\n\n // Remove oldest sensor reading when maximum threshold reached\n if(tbody.children.length >= maxReadings) {\n tbody.children[tbody.children.length - 1].remove();\n }\n\n // Display this new sensor value on the \"last reading\" highlight block\n displaySensorReading();\n\n // Update last display refresh timestamp\n lastDisplayUpdate = Date.now();\n }\n\n // Add to total reading count for this sensor\n switch(currentSensor) {\n case 'distance':\n totalReadings.distance++;\n break;\n\n case 'temperature':\n totalReadings.temperature++;\n break;\n\n case 'light':\n totalReadings.light++;\n break;\n }\n\n displayTotalReadings();\n\n break;\n\n // Output device has sent keep-alive message\n case outputDeviceStatusTopic:\n if(!outputDeviceOnline) {\n outputDeviceOnline = true;\n displayDeviceStatus();\n }\n\n break;\n }\n}", "function ds18b20Sensor(config) {\n\n // Create a RED node\n RED.nodes.createNode(this, config);\n\n // Store local copies of the node configuration (as defined in the .html)\n var node = this;\n\n // The root path of the sensors\n var W1PATH = \"/sys/bus/w1/devices\";\n \n // The directories location\n var W1DIRS = \"/sys/devices/\";\n\n // The devices list file\n var W1DEVICES = \"/sys/devices/w1_bus_master1/w1_master_slaves\";\n \n // Save the default device ID\n this.topic = config.topic;\n\n // If we are to return an array\n this.returnArray = false;\n\n // Load information from the devices list\n this.loadDeviceData = function() {\n var deviceList = [];\n var fsOptions = { \"encoding\":\"utf8\", \"flag\":\"r\" };\n var dirs = fs.readdirSync(W1DIRS, \"utf8\");\n for (var iY=0; iY<dirs.length; iY++) {\n if ((dirs[iY].startsWith && dirs[iY].startsWith(\"w1_bus_master\")) ||\n (dirs[iY].indexOf(\"w1_bus_master\") !== -1)) {\n var devs = fs.readFileSync(W1DIRS + dirs[iY] + \n \"/w1_master_slaves\", fsOptions).split(\"\\n\");\n for (var iX=0; iX<devs.length; iX++) {\n if (devs[iX] !== undefined && devs[iX] !== \"\"\n && devs[iX] !== \"not found.\") {\n var fName = W1PATH + \"/\" + devs[iX] + \"/w1_slave\";\n if (fs.existsSync(fName)) {\n var fData = fs.readFileSync(fName, fsOptions).trim();\n // Extract the numeric part\n var tBeg = fData.indexOf(\"t=\")+2;\n if (tBeg >= 0) {\n var tEnd = tBeg+1;\n while (tEnd<fData.length &&\n fData[tEnd]>='0' && fData[tEnd]<='9') {\n tEnd++;\n }\n var temp = fData.substring(tBeg, tEnd);\n var tmpDev = devs[iX].substr(13,2) + devs[iX].substr(11,2) +\n devs[iX].substr(9,2) + devs[iX].substr(7,2) +\n devs[iX].substr(5,2) + devs[iX].substr(3,2);\n \n deviceList.push({\n \"family\": devs[iX].substr(0,2),\n \"id\": tmpDev.toUpperCase(),\n \"dir\": dirs[iY],\n \"file\": devs[iX],\n \"temp\": temp/1000.0\n });\n }\n }\n }\n }\n }\n }\n return deviceList;\n }\n\n // Return the deviceList entry, given a device ID\n this.findDevice = function(deviceList, devId) {\n devId = devId.toUpperCase();\n for (var iX=0; iX<deviceList.length; iX++) {\n if (devId === deviceList[iX].file.substr(3).toUpperCase() ||\n devId === deviceList[iX].id) {\n return deviceList[iX];\n }\n }\n // If it's not in the normalised form\n var tmpDev = devId.substr(13,2) + devId.substr(11,2) +\n devId.substr(9,2) + devId.substr(7,2) +\n devId.substr(5,2) + devId.substr(3,2);\n for (var iX=0; iX<deviceList.length; iX++) {\n if (devId === deviceList[iX].file.substr(3).toUpperCase() ||\n devId === deviceList[iX].id) {\n return deviceList[iX];\n }\n }\n \n return null;\n }\n\n\n // Read the data & return a message object\n this.read = function(inMsg) {\n // Retrieve the full set of data\n var deviceList = this.loadDeviceData();\n\n var msgList = [];\n var msg;\n\n if (this.topic != undefined && this.topic != \"\") {\n // Split a list into devices (or 1 if only 1)\n var sList = this.topic.split(\" \");\n var retArr = [];\n for (var iX=0; iX<sList.length; iX++) {\n // Set up the returned message\n var dev = this.findDevice(deviceList, sList[iX]);\n if (this.returnArray || sList.length > 1) {\n retArr.push(dev);\n } else {\n msg = _.clone(inMsg);\n if (dev === null) { // Device not found!\n msg.family = 0;\n msg.payload = \"\";\n } else {\n msg.file = dev.file;\n msg.dir = dev.dir;\n msg.topic = dev.id;\n msg.family = dev.family;\n msg.payload = dev.temp;\n }\n msgList.push(msg);\n }\n }\n if (this.returnArray || sList.length > 1) {\n msg = _.clone(inMsg);\n msg.topic = \"\";\n msg.payload = retArr;\n msgList.push(msg);\n }\n } else { // No list of devices in the topic\n if (this.returnArray) { // Return as an array?\n msg = _.clone(inMsg);\n msg.topic = \"\";\n msg.payload = deviceList;\n msgList.push(msg);\n } else { // Not an array - a series of messages\n for (var iX=0; iX<deviceList.length; iX++) {\n msg = _.clone(inMsg);\n msg.file = deviceList[iX].file;\n msg.dir = deviceList[iX].dir;\n msg.topic = deviceList[iX].id;\n msg.family = deviceList[iX].family;\n msg.payload = deviceList[iX].temp;\n msgList.push(msg);\n }\n }\n }\n return msgList;\n };\n\n // respond to inputs....\n this.on('input', function (msg) {\n this.topic = config.topic;\n if (msg.topic !== undefined && msg.topic !== \"\") {\n this.topic = msg.topic;\n }\n this.returnArray = msg.array | config.array;\n\n var arr = this.read(msg);\n \n if (arr) {\n node.send([ arr ]);\n }\n });\n\n }", "function gotData() {\n var currentString = serial.readLine(); // read the incoming data\n trim(currentString); // trim off any trailing whitespace\n if (!currentString) return; // if the incoming string is empty, do no more\n\n //hopefully, it's in the format \"key=value\"\n // e.g. \"compass=342\"\n // e.g. \"light=220\"\n [key, value] = currentString.split('=');\n \n // store the key and value in our dictionary\n // For security, you may want to allow only keys from a whitelist, \n // and to screen the values. None of that, here.\n controls[key] = value;\n\n //Find the a-frame element we want to manipulate in the DOM\n var elemToMod = document.querySelector('#robot');\n\n setRotation(elemToMod, controls);\n \n //Here we also have the chance to do something specific \n // for the reported parameter\n switch(key) {\n case \"compass\": \n break;\n case \"rotation\": \n break;\n case \"light\": \n break;\n case \"pitch\": \n break;\n default: \n break;\n }\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n let readings = JSON.parse(message.payloadString);\n $('#pi1_timestamp').text(readings['pi1_timestamp']);\n $('#illuminance_value').text(readings['illuminance']);\n $('#temperature_value').text(readings['temperature']);\n $('#humidity_value').text(readings['humidity']);\n localStorage.setItem('illuminance', readings['illuminance']);\n localStorage.setItem('temperature', readings['temperature']);\n localStorage.setItem('humidity', readings['humidity']);\n localStorage.setItem('pi1_timestamp', readings['pi1_timestamp']);\n enableDisable('pi1');\n }", "async updateSensor1() {\n\t\ttry {\n\t\t\tconst smokeLevel = Math.floor(Math.random() * 10) + 1; // get a random value for smokelevel\n\t\t\tconst co2Level = Math.floor(Math.random() * 10) + 1; // get a random value for co2Level\n\t\t\tconst reqBody = { smokeLevel, co2Level }; // create object and store levels\n\t\t\tconst id = 11; // id of the sensor\n\t\t\tconsole.log(\"body sensor 1\", reqBody);\n\n\t\t\tconst response = await axios // axios POST request for update the sensor 01\n\t\t\t\t.request({\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\turl: `http://localhost:4000/updateSensorOnlyLevels/${id}`,\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json;charset=UTF-8\",\n\t\t\t\t\t\t\"Access-Control-Allow-Origin\": \"*\",\n\t\t\t\t\t},\n\t\t\t\t\tdata: JSON.stringify(reqBody), // converts JavaScript objects into strings. When sending data to a web server the data has to be a string.\n\t\t\t\t});\n\n\t\t\tconst resData = await response;\n\n\t\t\tconsole.log(\"responsee sensor 1\", resData); // log the response\n\t\t} catch (e) {\n\t\t\tconsole.log(e);\n\t\t}\n\t}", "function openSensor(evt) {\n var node = evt.data['node'];\n var sensor = findSensorByID(node, evt.data['sensorID']);\n \n // Highlight the selected sensor (and not the others/previous)\n $.each(node['sensors'], function(i, s) {\n if (s['id'] == sensor['id']) {\n $(\"#sensor-list-\" + s['id']).addClass(\"bottom-bar-content-data-sensors-item-selected\").removeClass(\"bottom-bar-content-data-sensors-item\");\n }\n else {\n $(\"#sensor-list-\" + s['id']).addClass(\"bottom-bar-content-data-sensors-item\").removeClass(\"bottom-bar-content-data-sensors-item-selected\");\n }\n });\n \n // Create data and options objects for chart\n var sensorData = [$.extend({}, lineChartElementOptions['red'], {label: sensor['name'], data: sensor['chartData']})];\n var sensorDataOptions = $.extend({}, lineChartOptions,\n {\n scaleType: \"date\",\n pointDot: false,\n datasetStroke: true,\n datasetStrokeWidth: 3,\n scaleLabel: \"<%=value%> \" + sensor['units'],\n scaleFontSize: 10,\n scaleBeginAtZero: false,\n bezierCurve: false,\n tooltipTemplate: \"<%=argLabel%>; <%=value.toFixed(5)%> \" + sensor['units'],\n multiTooltipTamplate: \"<%=argLabel%>; <%=value.toFixed(5)%> \" + sensor['units'],\n emptyDataMessage: \"Sensor has no data from the past 14 days\"\n });\n \n // Draw the chart\n if (nodeData != undefined) {\n nodeData.destroy();\n }\n nodeData = new Chart($(\"#bottom-bar-content-data-node-data\").get(0).getContext(\"2d\")).Scatter(sensorData, sensorDataOptions);\n}", "checkSensorChange(newSensors, assignedSignal, changedSignal) {\nlet device = this._device;\nlet ports = this._ports;\nlet layerIndex = this._layerIndex;\nfor (let i = 0; i < this._device.getPortsPerLayer(); i++) {\nlet port = ports[i];\nlet newSensor = newSensors[i];\nlet assigned = ('assigned' in newSensor) ? newSensor.assigned : 0;\nlet mode = ('mode' in newSensor) ? newSensor.mode : null;\nif ((port.assigned !== assigned) || (port.mode !== mode)) {\nport.assigned = assigned;\nport.mode = mode;\ndevice.emit(this._signalPrefix + '.Layer' + layerIndex + assignedSignal + i, assigned, mode);\n}\nlet value = ('value' in newSensor) ? newSensor.value : 0;\nif (port.value !== value) {\nport.value = value;\ndevice.emit(this._signalPrefix + '.Layer' + layerIndex + changedSignal + i, value);\n}\n}\nreturn this;\n}", "async updateSensor2() {\n\t\ttry {\n\t\t\tconst smokeLevel = Math.floor(Math.random() * 10) + 1; // get a random value for smokelevel\n\t\t\tconst co2Level = Math.floor(Math.random() * 10) + 1; // get a random value for co2Level\n\t\t\tconst reqBody = { smokeLevel, co2Level }; // create object and store levels\n\t\t\tconst id = 12; // id of the sensor\n\t\t\tconsole.log(\"body sensor 2\", reqBody);\n\n\t\t\tconst response = await axios // axios POST request for update the sensor 01\n\t\t\t\t.request({\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\turl: `http://localhost:4000/updateSensorOnlyLevels/${id}`,\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json;charset=UTF-8\",\n\t\t\t\t\t\t\"Access-Control-Allow-Origin\": \"*\",\n\t\t\t\t\t},\n\t\t\t\t\tdata: JSON.stringify(reqBody), // converts JavaScript objects into strings. When sending data to a web server the data has to be a string.\n\t\t\t\t});\n\n\t\t\tconst resData = await response;\n\n\t\t\tconsole.log(\"responsee sensor 2\", resData);\n\t\t} catch (e) {\n\t\t\tconsole.log(e);\n\t\t}\n\t}", "function callback(event) {\n\n/*****************************\n CHANGE\n ******************************/\n\n if (event.name === 'change'){\n \n if (event.field === 'manufacturer_name') {\n if (ISBLANK($manufacturer_name) ) {\n SETVALUE('manufacturer_short_name', null);\n SETVALUE('manufacturer_id', null);\n SETVALUE('manufacturer_url', null);\n SETCHOICEFILTER('sensor_name', null);\n }\n \n // clear previous site ID values if site record link unselected\n if (CHOICEVALUE($manufacturer_name) == 'Spectra Vista Corporation') {\n SETVALUE('sensor_name', null);\n SETVALUE('manufacturer_short_name', 'SVC');\n SETVALUE('manufacturer_id', '7');\n SETVALUE('manufacturer_url', 'https://www.spectravista.com');\n // set sensor values\n SETCHOICEFILTER('sensor_name', ['SVC HR-1024i']);\n }\n if (CHOICEVALUE($manufacturer_name) == 'Analytical Spectral Devices Inc.') {\n SETVALUE('sensor_name', null);\n SETVALUE('manufacturer_short_name', 'ASD');\n SETVALUE('manufacturer_id', '1');\n SETVALUE('manufacturer_url', 'https://www.asdi.com');\n // set sensor values\n SETCHOICEFILTER('sensor_name', ['ASD FR FS-3', 'ASD FS-4']);\n }\n }\n \n if (event.field === 'sensor_name') {\n if (ISBLANK($sensor_name)) {\n SETVALUE('sensor_description', null);\n SETVALUE('sensor_type_number', null);\n SETVALUE('no_of_channels', null);\n SETVALUE('sensor_url', null);\n }\n if (CHOICEVALUE($sensor_name) == 'SVC HR-1024i') {\n SETVALUE('sensor_description', 'Spectra Vista Corporation HR-1024i');\n SETVALUE('sensor_type_number', '1024i');\n SETVALUE('no_of_channels', '1024');\n SETVALUE('sensor_url', 'https://www.spectravista.com/hr-1024i');\n }\n if (CHOICEVALUE($sensor_name) == 'ASD FR FS-3') {\n SETVALUE('sensor_description', 'ASD FieldSpec FR or FieldSpec3 type');\n SETVALUE('sensor_type_number', '3');\n SETVALUE('no_of_channels', '2151');\n SETVALUE('sensor_url', null);\n }\n if (CHOICEVALUE($sensor_name) == 'ASD FS-4') {\n SETVALUE('sensor_description', 'ASD FieldSpec 4 Standard-Res Spectroradiometer');\n SETVALUE('sensor_type_number', '4');\n SETVALUE('no_of_channels', '2151');\n SETVALUE('sensor_url', 'https://www.asdi.com/products-and-services/fieldspec-spectroradiometers/fieldspec-4-standard-res');\n }\n } // end of event.field == 'sensor_name'\n } // end of event.name == 'change'\n\n}", "function wsOnMessage(event) {\n // console.log(event.data);\n var key = event.data.substring(0, event.data.indexOf(\":\"));\n var value = event.data.substr(event.data.indexOf(\":\") + 1);\n\n switch(key) {\n case \"joyX\":\n // do something with -> value\n if (value == 1) {\n updateFidget(true);\n } else if (value == -1) {\n updateFidget(false);\n }\n break;\n case \"joyY\":\n break;\n case \"joyBtn\":\n break;\n case \"tempPot\":\n\n var i;\n document.getElementsByClassName(\"temperatureWrapper\")[0].style.transform = \"rotate(\" + (-40 + (i * 10)) + \"deg)\"\n document.getElementsByClassName(\"temperatureInner\")[0].style.transform = \"rotate(\" + (-40 + (i * 10)) + \"deg)\"\n\n break;\n case \"tempReal\":\n var i;\n\n document.getElementById(\"temperaturePotentimeter\").style.transform = \"rotate(\" + (-40 + (i * 10)) + \"deg)\"\n\n\n break;\n case \"fidget\":\n console.log(\"fidget: \" + value);\n if(value == 1) {\n updateFidget(true);\n } else if(value == -1) {\n updateFidget(false);\n } /*else if(value == 1) {\n\n }*/\n break;\n case \"closet\":\n console.log(\"closet: \" + value);\n if(value == -1) {\n closetRight();\n } else if(value == 1){\n closetLeft();\n } else if (value == 0) {\n closetSelect();\n }\n break;\n case \"camera\":\n var a = \"images/camera\" + value + \".png\";\n // console.log(a);\n d_camera.src = a;\n break;\n // case \"\":\n // break;\n // case \"\":\n // break;\n // case \"\":\n // break;\n // case \"\":\n // break;\n // case \"\":\n // break;\n // case \"\":\n // break;\n default:\n\t warn(\"WebSocket\", \"No case for data: %0\", event.data);\n }\n}", "setQueryInfo() {\n\t\tvar obj = {\n\t\t\t\tkey: this.props.sensorId,\n\t\t\t\tvalue: {\n\t\t\t\t\tqueryType: this.type,\n\t\t\t\t\tinputData: this.props.inputData\n\t\t\t\t}\n\t\t};\n\t\thelper.selectedSensor.setSensorInfo(obj);\n\t}", "function KinectSensor(baseEndpointUri, onconnection) {\n\n //////////////////////////////////////////////////////////////\n // Private KinectSensor properties\n\n // URI used to connect to endpoint used to configure sensor state\n var stateEndpoint = baseEndpointUri + \"/state\";\n\n // true if sensor connection to server is currently enabled, false otherwise\n var isConnectionEnabled = false;\n \n // Array of registered stream frame ready handlers\n var streamFrameHandlers = [];\n \n // Header portion of a two-part stream message that is still missing a binary payload\n var pendingStreamFrame = null;\n\n // Reference to this sensor object for use in internal functions\n var sensor = this;\n\n var streamSocketManager = new SocketManager(\n baseEndpointUri + \"/stream\",\n function(socket, message) {\n\n function broadcastFrame(frame) {\n for (var iHandler = 0; iHandler < streamFrameHandlers.length; ++iHandler) {\n streamFrameHandlers[iHandler](frame);\n }\n }\n\n if (message.data instanceof ArrayBuffer) {\n if ((pendingStreamFrame == null) || (pendingStreamFrame.bufferLength != message.data.byteLength)) {\n // Ignore any binary messages that were not preceded by a header message\n console.log(\"Binary socket message received without corresponding header\");\n pendingStreamFrame = null;\n return;\n }\n\n pendingStreamFrame.buffer = message.data;\n broadcastFrame(pendingStreamFrame);\n pendingStreamFrame = null;\n } else if (typeof(message.data) == \"string\") {\n pendingStreamFrame = null;\n\n try {\n // Get the data in JSON format.\n var frameData = JSON.parse(message.data);\n\n // If message has a 'bufferLength' property, it means that this is a message header\n // and we should wait for the binary payload before broadcasting this message.\n if (\"bufferLength\" in frameData) {\n pendingStreamFrame = frameData;\n } else {\n broadcastFrame(frameData);\n }\n }\n catch(error) {\n console.log('Tried processing stream message, but failed with error: ' + error);\n }\n } else {\n // Ignore any messages of unexpected types.\n console.log(\"Unexpected type for received socket message\");\n pendingStreamFrame = null;\n return;\n }\n },\n function(isConnected) {\n // Use the existence of the stream channel connection to mean that a\n // server exists and is ready to accept requests\n sensor.isConnected = isConnected;\n onconnection(sensor, isConnected);\n });\n \n // Array of registered event handlers\n var eventHandlers = [];\n\n var eventSocketManager = new SocketManager(baseEndpointUri + \"/events\", function(socket, message) {\n // Get the data in JSON format.\n var eventData = JSON.parse(message.data);\n\n for (var iHandler = 0; iHandler < eventHandlers.length; ++iHandler) {\n eventHandlers[iHandler](eventData);\n }\n });\n\n // Registered hit test handler\n var hitTestHandler = null;\n \n var hitTestSocketManager = new SocketManager(baseEndpointUri + \"/interaction/client\", function (socket, message) {\n // Get the data in JSON format.\n var eventData = JSON.parse(message.data);\n var id = eventData.id;\n var name = eventData.name;\n var args = eventData.args;\n\n switch (name) {\n case \"getInteractionInfoAtLocation\":\n var handlerResult = null;\n var defaultResult = { \"isPressTarget\": false, \"isGripTarget\": false };\n\n if (hitTestHandler != null) {\n try {\n handlerResult = hitTestHandler.apply(sensor, args);\n } catch(e) {\n handlerResult = null;\n }\n }\n\n socket.send(JSON.stringify({ \"id\": id, \"result\": ((handlerResult != null) ? handlerResult : defaultResult) }));\n break;\n \n case \"ping\":\n socket.send(JSON.stringify({ \"id\": id, \"result\": true }));\n break;\n }\n });\n \n //////////////////////////////////////////////////////////////\n // Private KinectSensor functions\n\n // Perform ajax request\n // ajax( method, uri, success(responseData) [, error(statusText)] )\n //\n // method: http method\n // uri: target uri of ajax call\n // requestData: data to send to uri as part of request (may be null)\n // success: Callback function executed if request succeeds.\n // error: Callback function executed if request fails (may be null)\n function ajax(method, uri, requestData, success, error) {\n if (!isConnectionEnabled) {\n if (error != null) {\n error(\"disconnected from server\");\n }\n return;\n }\n \n var xhr = new XMLHttpRequest();\n xhr.open(method, uri, asyncRequests);\n xhr.onload = function (e) {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n if (xhr.status == 200) {\n success(JSON.parse(xhr.responseText));\n } else if (error != null) {\n error(xhr.statusText);\n }\n }\n };\n if (error != null) {\n xhr.onerror = function (e) {\n error(xhr.statusText);\n };\n }\n xhr.send(requestData);\n }\n \n // Respond to changes in the connection enabled status\n // onConnectionEnabledChanged( )\n function onConnectionEnabledChanged() {\n if (isConnectionEnabled && !streamSocketManager.isStarted) {\n streamSocketManager.start();\n } else if (!isConnectionEnabled && streamSocketManager.isStarted) {\n streamSocketManager.stop();\n }\n }\n \n // Respond to changes in the number of registered event handlers\n // onEventHandlersChanged( )\n function onEventHandlersChanged() {\n if ((eventHandlers.length > 0) && !eventSocketManager.isStarted) {\n eventSocketManager.start();\n } else if ((eventHandlers.length == 0) && eventSocketManager.isStarted) {\n eventSocketManager.stop();\n }\n }\n \n // Respond to changes in the registered hit test handler\n // onHitTestHandlerChanged( )\n function onHitTestHandlerChanged() {\n if ((hitTestHandler != null) && !hitTestSocketManager.isStarted) {\n hitTestSocketManager.start();\n } else if ((hitTestHandler == null) && hitTestSocketManager.isStarted) {\n hitTestSocketManager.stop();\n }\n }\n \n //////////////////////////////////////////////////////////////\n // Public KinectSensor properties\n this.isConnected = false;\n\n //////////////////////////////////////////////////////////////\n // Public KinectSensor functions\n\n // Request current sensor configuration\n // .getConfig( success(configData) [, error(statusText)] )\n //\n // success: Callback function executed if request succeeds.\n // error: Callback function executed if request fails.\n this.getConfig = function (success, error) {\n if ((arguments.length < 1) || (typeof success != 'function')) {\n throw new Error(\"first parameter must be specified and must be a function\");\n }\n\n if ((arguments.length >= 2) && (typeof error != 'function')) {\n throw new Error(\"if second parameter is specified, it must be a function\");\n }\n\n ajax(\"GET\", stateEndpoint, null,\n function(response) { success(response); },\n (error != null) ? function (statusText) { error(statusText); } : null\n );\n };\n\n // Update current sensor configuration\n // .postConfig( configData [, error(statusText [, data] )] )\n //\n // configData: New configuration property/value pairs to update\n // for each sensor stream.\n // error: Callback function executed if request fails.\n // data parameter of error callback will be null if request\n // could not be completed at all, but will be a JSON object\n // giving failure details in case of semantic failure to\n // satisfy request.\n this.postConfig = function (configData, error) {\n if ((arguments.length < 1) || (typeof configData != 'object')) {\n throw new Error(\"first parameter must be specified and must be an object\");\n }\n\n if ((arguments.length >= 2) && (typeof error != 'function')) {\n throw new Error(\"if second parameter is specified, it must be a function\");\n }\n\n ajax(\"POST\", stateEndpoint, JSON.stringify(configData),\n function(response) {\n if (!response.success && (error != null)) {\n error(\"semantic failure\", response);\n }\n },\n (error != null) ? function (statusText) { error(statusText); } : null\n );\n };\n\n // Enable connections with server\n // .connect()\n this.connect = function () {\n isConnectionEnabled = true;\n\n onConnectionEnabledChanged();\n onEventHandlersChanged();\n onHitTestHandlerChanged();\n };\n\n // Disable connections with server\n // .disconnect()\n this.disconnect = function () {\n isConnectionEnabled = false;\n \n onConnectionEnabledChanged();\n onEventHandlersChanged();\n onHitTestHandlerChanged();\n };\n \n // Add a new stream frame handler.\n // .addStreamFrameHandler( handler(streamFrame) )] )\n //\n // handler: Callback function to be executed when a stream frame is ready to\n // be processed.\n this.addStreamFrameHandler = function (handler) {\n if (typeof(handler) != \"function\") {\n throw new Error(\"first parameter must be specified and must be a function\");\n }\n \n streamFrameHandlers.push(handler);\n };\n \n // Removes one (or all) stream frame handler(s).\n // .removeStreamFrameHandler( [handler(streamFrame)] )] )\n //\n // handler: Stream frame handler callback function to be removed.\n // If omitted, all stream frame handlers are removed.\n this.removeStreamFrameHandler = function (handler) {\n switch (typeof(handler)) {\n case \"undefined\":\n streamFrameHandlers = [];\n break;\n case \"function\":\n var index = streamFrameHandlers.indexOf(handler);\n if (index >= 0) {\n streamFrameHandlers.slice(index, index + 1);\n }\n break;\n \n default:\n throw new Error(\"first parameter must either be a function or left unspecified\");\n }\n };\n \n // Add a new event handler.\n // .addEventHandler( handler(event) )] )\n //\n // handler: Callback function to be executed when an event is ready to be processed.\n this.addEventHandler = function (handler) {\n if (typeof (handler) != \"function\") {\n throw new Error(\"first parameter must be specified and must be a function\");\n }\n\n eventHandlers.push(handler);\n\n onEventHandlersChanged();\n };\n\n // Removes one (or all) event handler(s).\n // .removeEventHandler( [handler(streamFrame)] )] )\n //\n // handler: Event handler callback function to be removed.\n // If omitted, all event handlers are removed.\n this.removeEventHandler = function (handler) {\n switch (typeof (handler)) {\n case \"undefined\":\n eventHandlers = [];\n break;\n case \"function\":\n var index = eventHandlers.indexOf(handler);\n if (index >= 0) {\n eventHandlers.slice(index, index + 1);\n }\n break;\n\n default:\n throw new Error(\"first parameter must either be a function or left unspecified\");\n }\n \n onEventHandlersChanged();\n };\n \n // Set hit test handler.\n // .setHitTestHandler( [handler(skeletonTrackingId, handType, x, y)] )] )\n //\n // handler: Callback function to be executed when interaction stream needs \n // interaction information in order to adjust a hand pointer position\n // relative to UI.\n // If omitted, hit test handler is removed.\n // - skeletonTrackingId: The skeleton tracking ID for which interaction\n // information is being retrieved.\n // - handType: \"left\" or \"right\" to represent hand type for which\n // interaction information is being retrieved.\n // - x: X-coordinate of UI location for which interaction information\n // is being retrieved. 0.0 corresponds to left edge of interaction\n // region and 1.0 corresponds to right edge of interaction region.\n // - y: Y-coordinate of UI location for which interaction information\n // is being retrieved. 0.0 corresponds to top edge of interaction\n // region and 1.0 corresponds to bottom edge of interaction region.\n this.setHitTestHandler = function (handler) {\n switch (typeof (handler)) {\n case \"undefined\":\n case \"function\":\n hitTestHandler = handler;\n break;\n\n default:\n throw new Error(\"first parameter must be either a function or left unspecified\");\n }\n\n onHitTestHandlerChanged();\n };\n }", "function updateSensorValues(incoming){\n\tvar vals = incoming.split(\",\");\n\tfor(var i = 0;i < vals.length; i++){\n\t\t// this is for the progress bar beside the 'Sensor X' headers\n\t\t//document.getElementById('sensorValue'+i).value = vals[i]; \n\n\t\t//this is for the progress bars inside each Action\n\t\tfor(var j = 0; j < sensors[i].triggers.length; j++){\n\t\t\tif(sensors[i].triggers[j].invert){\n\t\t\t\tdocument.getElementById('sensorValue'+i+'_' + j).value = 100 - vals[i];\n\t\t\t}else{\n\t\t\t\tdocument.getElementById('sensorValue'+i+'_' + j).value = vals[i];\n\t\t\t};\n\t\t};\n\t};\n}", "function update_sensor(msg, clock_time)\r\n{\r\n\t\t// existing sensor data record has arrived\r\n //console.log('update_sensor '+clock_time);\r\n\r\n var sensor_id = msg[RECORD_INDEX];\r\n\r\n\t\tif (get_msg_date(msg).getTime() != get_msg_date(sensors[sensor_id].msg).getTime())\r\n {\r\n\r\n // store as latest msg\r\n // moving current msg to prev_msg\r\n sensors[sensor_id].prev_msg = sensors[sensor_id].msg;\r\n\t\t sensors[sensor_id].msg = msg; // update entry for this msg\r\n\r\n var sensor = sensors[sensor_id];\r\n\r\n console.log('Updating '+sensor.sensor_id);\r\n\r\n // flag if this record is OLD or NEW\r\n update_old_status(sensor, clock_time);\r\n\r\n xcoffee_handle_msg(msg);\r\n\t\t}\r\n}", "function temperatureHandler( event, device, controlId ) {\n var thermostat = $(\"#\" + device.id);\n thermostat.val(device.state); \n\n //udpate the server with data set by remote control\n var data = JSON.stringify(device)\n updateDevice(data);\n\n $( document ).trigger( \"confirmTemperatureEvent\", [ controlId, device.state ] );\n }", "function openHandler (self) {\n\tvar parser = new xml2js.Parser();\n\tvar buffer = \"\";\t// read buffer.\n\n if (TRACE) {\t\n \tconsole.log('serial device open');\n }\n \n self.emit(\"open\");\n\n\t// add serial port data handler\t\n\tself.serialPort.on('data', function(data) {\n\t\tbuffer += data.toString() + \"\\r\\n\";\t\t// append to the read buffer\n\t\tif ( data.toString().indexOf('</') == 0 ) {\t\t// check if last part of XML element.\n\t\t\t\n\t\t\t// try to parse buffer\n\t\t\tparser.parseString(buffer, function (err, result) {\n\t\t\t\tif (err) {\n\t\t\t\t\tconsole.log(\"err: \" + err);\n\t\t\t\t\tconsole.log('data received: ' + buffer);\n\t\t\t\t}\n\t\t\t\telse if (result.InstantaneousDemand) {\n\t\t\t\t\tvar timestamp = parseInt( result.InstantaneousDemand.TimeStamp );\n\t\t\t\t\ttimestamp = new Date(dateOffset+timestamp*1000);\n\t\t\t\t\tvar demand = parseInt( result.InstantaneousDemand.Demand, 16 );\n\t\t\t\t\tdemand = demand < 0x80000000 ? demand : - ~demand - 1;\n\t\t\t\t\tif (TRACE) {\n\t\t\t\t\t\tconsole.log(\"demand: \" + timestamp.toLocaleString() + \" : \" + demand);\n\t\t\t\t\t}\n\t\t\t\t \t\n\t\t\t\t\t// emit power event\n\t\t\t\t\tvar power = { value: demand, unit: \"W\", timestamp: timestamp.toISOString() };\n\t\t\t\t\tself.emit(\"power\", power);\n\t\t\t\t}\n\t\t\t\telse if (result.CurrentSummationDelivered) {\n\t\t\t\t\tvar timestamp = parseInt( result.CurrentSummationDelivered.TimeStamp );\n\t\t\t\t\ttimestamp = new Date(dateOffset+timestamp*1000);\n\t\t\t\t\tvar used = parseInt( result.CurrentSummationDelivered.SummationDelivered, 16 );\n\t\t\t\t\tvar fedin = parseInt( result.CurrentSummationDelivered.SummationReceived, 16 );\n\t\t\t\t\tconsole.log(\"sum: \" + timestamp.toLocaleString() + \" : \" + used + \" - \" + fedin);\n\n\t\t\t\t\t// publish summation on MQTT service\n\t\t\t\t\tvar energyIn = { value: used, unit: \"Wh\" , timestamp: timestamp.toISOString() };\n\t\t\t\t\tvar energyOut = { value: fedin, unit: \"Wh\", timestamp: timestamp.toISOString() };\n\n\t\t\t\t\tself.emit(\"energy-in\", energyIn);\n\t\t\t\t\tself.emit(\"energy-out\", energyOut);\n\t\t\t\t}\n\t\t\t\telse if (result.ConnectionStatus) {\n\t\t\t\t\tif (TRACE) {\n\t\t\t\t\t\tconsole.log(\"connection status: \" + result.ConnectionStatus.Status);\n\t\t\t\t\t}\n\t\t\t\t\tself.emit(\"connection\", result.ConnectionStatus.Status);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (TRACE) {\n\t\t\t\t\t\tconsole.dir(result);\t// display data read in\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tbuffer = \"\";\t// reset the read buffer\n\t\t}\n\t});\n\n\t// Possible commands: get_time, get_current_summation_delivered; get_connection_status; get_instantaneous_demand; get_current_price; get_message; get_device_info.\n\tvar queryCommand = \"<Command><Name>get_connection_status</Name></Command>\\r\\n\";\n\tself.serialPort.write(queryCommand, function(err, results) {\n\t\tself.serialPort.write(\"<Command><Name>get_message</Name></Command>\\r\\n\", function(err, results) {\n\t\t\tself.serialPort.write(\"<Command><Name>get_current_price</Name></Command>\\r\\n\", function(err, results) {\n\t\t\t}); \n\t\t}); \n\t}); \n}", "function dataHandler(data) {\n dataString = JSON.stringify(data);\n console.log(data.main.temp);\n\n formatTemperature(data.main.temp);\n\n if (data.main.temp && data.sys) {\n // display icon\n if (data.weather) {\n var imgURL = \"http://openweathermap.org/img/w/\" + data.weather[0].icon + \".png\";\n $(\"#weatherImg\").attr(\"src\", imgURL);\n $(\"#weather-text\").html(data.weather[0].description);\n }\n // display wind speed\n if (data.wind) {\n var knots = data.wind.speed * 1.9438445;\n $windText.html(knots.toFixed(1) + \" Knots\");\n }\n }\n}", "function SFDataProcessAndDisplay() {\n\t//Setting object to store processed data\n\tfunction processedSFData() {\n\t\tthis.moteid = idMote;\n\t\tthis.sensorType = sensorType;\n\t\tthis.lastTimestamp = lastTimeStamp;\n\t\tthis.lastValue = lastValue;\n\t\tthis.arrayValuesDay = valuesDay;\n\t\tthis.populationDay = populationDay;\n\t\tthis.arrayValuesWeek = valuesWeek;\n\t\tthis.populationWeek = populationWeek;\n\t\tthis.platform = platform;\n\t\tthis.unit = unit;\n\t}\n\t\t\t\t\t\t\t\n\t//Setting up variables\n\tvar valuesDay = [];\n\tvar valuesWeek = [];\n\tvar populationDay = 0;\n\tvar populationWeek = 0;\n\tvar sensorType = \"\" ;\n\tvar checkSensorType = [];\n\tvar lastDay = new Date(\"2016-09-13 00:00:00\");\n\tvar day = 60*60*24*1000;\n\tvar week = day * 7;\n\tvar oneDay = lastDay.getTime() - day;\n\tvar oneWeek = lastDay.getTime() - week;\n\tvar platform;\n\tvar sensor = [];\n\t\t\t\t\t\t\t\n\t//This allow to extract the nescessary data for the calculation and the display\n\tfor (var i=0; i<secondFloor.length; i++){\n\t\tvar idMote = secondFloor[i];// Get the mote_id\n\t\tfor (var k=0; k<modalityJson.length;k++) {\n\t\t\tvar lastTimeStamp = \"1970-01-01 00:00:00\"; //Reset the timestamp\n\t\t\tfor (var j=0; j<motesDataJsonSF.length; j++){\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (secondFloor[i] == motesDataJsonSF[j].mote_id && motesDataJsonSF[j].sensor_type == modalityJson[k].sensor_type && motesDataJsonSF[j].mote_id == modalityJson[k].mote_id){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tsensorType = modalityJson[k].sensor_type;//Get the sensor type\n\t\t\t\t\tunit = modalityJson[k].measurement_unit;//Get the unit of the sensor\n\t\t\t\t\t \n\t\t\t\t\t //Get the mote platform\n\t\t\t\t\t for (l=0; l<moteJson.length;l++){\n\t\t\t\t\t\t if (moteJson[l].mote_id==secondFloor[i]){\n\t\t\t\t\t\t\t platform = moteJson[l].platform;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Storing the data to calculate the standard deviation for the last 24hrs\n\t\t\t\t\tif (new Date(motesDataJsonSF[j].date_time)>oneDay){\n\t\t\t\t\t\tvaluesDay.push(motesDataJsonSF[j].observation);\n\t\t\t\t\t\tpopulationDay++;\n\t\t\t\t\t}\n\t\t\t\t\t// Storing the data to calculate the standard deviation for the last week\n\t\t\t\t\tif (new Date(motesDataJsonSF[j].date_time)>oneWeek){\n\t\t\t\t\t\tvaluesWeek.push(motesDataJsonSF[j].observation);\n\t\t\t\t\t\tpopulationWeek++;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//Sets up the time and value of the last reading\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (new Date (motesDataJsonSF[j].date_time)> new Date (lastTimeStamp)){\n\t\t\t\t\t\tlastTimeStamp = motesDataJsonSF[j].date_time;\n\t\t\t\t\t\tvar lastValue = motesDataJsonSF[j].observation;\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Creates an object only if the there is data to display\n\t\t\tif ( populationDay>0 && populationWeek>0){\n\t\t\t\t//Create the objects to store the data\n\t\t\t\tvar dayObj = new processedSFData(idMote, lastTimeStamp, sensorType, lastValue, valuesDay, populationDay, valuesWeek, populationWeek, platform);\n\t\t\t\tmoteProcessedDataSF.push(dayObj);\n\t\t\t\tallMoteData.push(dayObj);\n\t\t\t\tvaluesDay =[];\n\t\t\t\tpopulationDay = 0;\n\t\t\t\tvaluesWeek = [];\n\t\t\t\tpopulationWeek = 0;\n\t\t\t}\n\t\t\tcheckSensorType.push(sensorType);\n\t\t\tif (sensor.indexOf(sensorType) == -1 && sensorType!= \"\"){ //extract the different types of sensors in this floor\n\t\t\t\tsensor.push(sensorType);\n\t\t\t}\n\t\t}\n\t}\n\tcheckSensorType = [];\n\t\t\t\n\tfor (var n =0; n<secondFloor.length; n++){\n\t\tvar motNum = \"\";\n\t\tvar stamp = \"\";\n\t\t\t\t\t\t\t\t\n\t\tfor (var i=0; i<moteProcessedDataSF.length; i++){\n\t\t\tif (secondFloor[n] == moteProcessedDataSF[i].moteid){\n\t\t\t\t\t\t\t\t\n\t\t\t\tif (motNum == \"\" && stamp == \"\"){\n\t\t\t\t\tmotNum = moteProcessedDataSF[i].moteid;\n\t\t\t\t\tstamp = moteProcessedDataSF[i].lastTimestamp;\n\t\t\t\t\tcheckIdSF.push(motNum);\n\t\t\t\t\tcheckTimeSF.push(stamp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//Creating the object and variables to store the max values data\n\tfunction store (){\n\t\tthis.sensor =senType;\n\t\tthis.unit = thisUnit;\n\t\tthis.reading=maxRead;\n\t\tthis.moteId = idMote;\n\t}\n\tvar storeTable=[];\n\t\n\t//Extracting the max data\n\tfor (var p=0; p<sensor.length; p++){\n\t\tvar senType =sensor[p];\n\t\tvar maxRead = 0;\n\t\tvar idMote = \"\";\n\t\tvar thisUnit = \"\"\n\t\tfor (var q =0; q<motesDataJsonSF.length; q++){\n\t\t\t if( sensor[p] == motesDataJsonSF[q].sensor_type && motesDataJsonSF[q].observation > maxRead){\n\t\t\t\t maxRead = motesDataJsonSF[q].observation;\n\t\t\t\t idMote = motesDataJsonSF[q].mote_id\n\t\t\t }\n\t\t\t for (var r=0; r<modalityJson.length; r++){\n\t\t\t\t if(modalityJson[r].sensor_type == sensor[p]){\n\t\t\t\t\tthisUnit = modalityJson[r].measurement_unit;\n\t\t\t\t }\n\t\t\t }\n\t\t}\n\t\tvar tableObj = new store(senType, maxRead, idMote, thisUnit);\n\t\t storeTable.push(tableObj);\n\t}\n\t\n\t//Creating and populating the table with max values an inserting it in the webpage\n\tvar maxTable = \"<p> Maximum values over the last week:</p><table style= 'width: 100%' class ='maxTable'><tbody><tr><th class='border'>Sensor Type</th><th class='border'>Max Reading</th><th class='border'>Mote Id</th></tr>\";\n\t\n\tfor (var i=0; i<storeTable.length; i++){\n\t\tmaxTable+=\"<tr><td class='border'>\" + storeTable[i].sensor + \" (\" + storeTable[i].unit + \") </td><td class='border' id='data'>\" + storeTable[i].reading + \"</td><td class='border' id='data'>\" + storeTable[i].moteId + \"</td></tr>\";\n\t}\n\tmaxTable+= \"</tbody></table>\";\n\tvar div = document.getElementById(\"maxTableSF\");\n\tdiv.innerHTML = maxTable + div.innerHTML;\n}", "function processedFFData() {\n\t\tthis.moteid = idMote;\n\t\tthis.sensorType = sensorType;\n\t\tthis.lastTimestamp = lastTimeStamp;\n\t\tthis.lastValue = lastValue;\n\t\tthis.arrayValuesDay = valuesDay;\n\t\tthis.populationDay = populationDay;\n\t\tthis.arrayValuesWeek = valuesWeek;\n\t\tthis.populationWeek = populationWeek;\n\t\tthis.platform = platform;\n\t\tthis.unit = unit;\n\t}", "function monitorTemperature() {\n var prev = 0;\n \n setInterval(function() {\n var currentTemp = board.getTemperature();\n var currentLight = board.getLight();\n board.message(\"Temperature: \" + currentTemp);\n board.message(\"Light Level: \" + currentLight, 1);\n\n // check if fire alarm should be triggered\n if (prev < config.ALARM_THRESHOLD && currentTemp >= config.ALARM_THRESHOLD) {\n events.emit(\"start-alarm\");\n }\n\n if (prev >= config.ALARM_THRESHOLD && currentTemp < config.ALARM_THRESHOLD) {\n events.emit(\"stop-alarm\");\n }\n\n prev = currentTemp;\n \n //AUTOMATION LOGIC\n /**\n\n //TOO COLD\n if ( flueTemp < 150 ){\n fireStatus = low;\n\n //// Fire is just starting\n if( flameSensor == true ){\n notify(\"Keep an eye on it.\");\n damper.position = 100;\n }\n\n //fire is dying\n if( flameSensor == false ){\n alarm();\n notify(\"Low fire. Creosote danger. Add wood.\");\n damper.position = 0;\n\n }\n }\n\n // JUST RIGHT\n if ( flueTemp > 150 && flueTemp <= 400){\n fireStatus = good;\n alarm();\n notify(\"Nice fire.\")\n damper.position = 50;\n }\n\n //TOO HOT\n if ( flueTemp > 400 && flueTemp <= 600){\n fireStatus = hot;\n if( flameSensor == true ){\n alarm();\n notify(\"The fire is too hot. Adjusting damper.\"\n) damper.position = 20;\n }\n if( flameSensor == false ){\n alarm();\n notify(\"Your fire is out but your chimney is on fire.\"\n) damper.position = 0;\n }\n }\n\n **/\n \n \n //monitor Button\n //readButtonValue(); \n\n \n \n \n \n \n }, 500);\n}", "function sensors(callback) {\n\n fs.readFile(W1_MASTER_FILE, 'utf8', function(err, data) {\n if (err) {\n return callback(err);\n }\n\n var nums = data.split('\\n');\n nums = nums.filter(function(item) {\n return item.indexOf('28-') === 0;\n });\n return callback(null, nums);\n });\n}", "function mapSensors() {\r\n\tsensors = {};\r\n\tvar sensor;\r\n\tfor (let i = 0; i < sensorsPayload.length; i++) {\r\n\t\tsensor = sensorsPayload[i];\r\n\t\tif (sensor.code) sensors[sensor.code] = sensor;\r\n\t}\r\n}", "function getData (event) {\n var msg = JSON.parse(event.data);\n //console.log(msg);\n // We can select specific JSON groups by using msg.name, where JSON contains \"name\":x\n // Every type MUST have msg.type to determine what else is pulled from it\n switch (msg.type){\n case \"print\": // Print out msg.data\n //console.log(msg.data);\n break;\n case \"battery\":\n $('#battery-voltage').text(msg.data);\n break;\n case \"ping_sensors\":\n $('#ping-display').text(JSON.stringify(msg.data));\n var d = msg.data;\n sensorIndicatorDraw(d.fr,d.r,d.br,d.b,d.bl,d.l,d.fl);\n break;\n }\n }", "function connectHardware() {\n const sensorDriver = require('node-dht-sensor');\n var sensor = {\n //Initialize sensor \n initialize: function () {\n return sensorDriver.initialize(11, model.temperature.gpio); //#A\n },\n // Read sensor\n read: function () {\n //Read temperature and humidity values\n var readout = sensorDriver.read();\n var temperatureValue = parseFloat(readout.temperature.toFixed(2));\n var humidityValue = parseFloat(readout.humidity.toFixed(2)); //#C\n \n //Update Temparature and Humidity model \n model.temperature.value = temperatureValue;\n model.humidity.value = humidityValue;\n\n //observe temperature resource model to watch critical value \n var critiaclTemp = observe(model.temperature);\n critiaclTemp.value = parseFloat(temperatureValue);\n \n //Check sensor values on console \n //console.log(\"Temparature is:\" +temperatureValue)\n //console.log(\"Humidity is:\" + humidityValue) \n\n //Send sensor data on web socket\n ws.send(model.temperature.value)\n\n // Set interval time for sensor\n setTimeout(function () {\n sensor.read();\n }, model.temperature.interval);\n }\n };\n\n if (sensor.initialize()) {\n console.info('Hardware temperature & humidity sensor is started!');\n sensor.read();\n } else {\n console.warn('Hardware temperature & humidity is failed to initialize !');\n }\n}", "function onDataReceived_temp(series) {\n\n\t\t// extract the first coordinate pair so you can see that\n\t\t// data is now an ordinary Javascript object\n\t\tvar firstcoordinate = '(' + series.data[0][0] + ', ' + series.data[0][1] + ')';\n\n\t\t// let's add it to our current data\n\t\tif (!alreadyFetched[series.label]) {\n\t\t\talreadyFetched[series.label] = true;\n\t\t\ttemperatureData.push(series);\n\t\t}\n\n\t\t// and plot all we got\n\t\t$.plot(temperaturePlaceholder, temperatureData, tempOptions);\n\n\t}", "updateTemp(e) {\n var newTemp = this.state.targTemp;\n if (e.detail.angleStatus === \"VALID\") {\n var tempOffset = Math.round(Constants.TEMP_CHANGE_PER_DEG * (e.detail.deg - Constants.ANGLE_OFFSET_DEG) * 2) / 2; //only display at intervals of 0.5\n newTemp = e.detail.targTemp + tempOffset;\n } else if (e.detail.angleStatus === \"MAXBUFF\") {\n newTemp = Constants.HIGHEST_TEMP_SLIDER;\n } else if (e.detail.angleStatus === \"MINBUFF\") {\n newTemp = Constants.LOWEST_TEMP_SLIDER;\n } else {\n\n }\n this.setState({targTemp: newTemp});\n this.service.send({ type: 'UPDATETARGTEMP', targetTemp: newTemp });\n }", "function onMotionRawValueChanged(event) {\r\n var v = event.target.value;\r\n\r\n // accel: 6Q10\r\n var _ax = cnvtEndian16(v, 0).getInt16(0);\r\n var ax = toFixedPoint(_ax, 10);\r\n var _ay = cnvtEndian16(v, 2).getInt16(2);\r\n var ay = toFixedPoint(_ay, 10);\r\n var _az = cnvtEndian16(v, 4).getInt16(4);\r\n var az = toFixedPoint(_az, 10);\r\n document.querySelector('#ax').value = ax;\r\n document.querySelector('#ay').value = ay;\r\n document.querySelector('#az').value = az;\r\n\r\n // gyro: 11Q5\r\n var _gx = cnvtEndian16(v, 6).getInt16(6);\r\n var gx = toFixedPoint(_gx, 5);\r\n var _gy = cnvtEndian16(v, 8).getInt16(8);\r\n var gy = toFixedPoint(_gy, 5);\r\n var _gz = cnvtEndian16(v, 10).getInt16(10);\r\n var gz = toFixedPoint(_gz, 5);\r\n document.querySelector('#gx').value = gx;\r\n document.querySelector('#gy').value = gy;\r\n document.querySelector('#gz').value = gz;\r\n\r\n // compass: 12Q4\r\n var _cx = cnvtEndian16(v, 12).getInt16(12);\r\n var cx = toFixedPoint(_cx, 4);\r\n var _cy = cnvtEndian16(v, 14).getInt16(14);\r\n var cy = toFixedPoint(_cy, 4);\r\n var _cz = cnvtEndian16(v, 16).getInt16(16);\r\n var cz = toFixedPoint(_cz, 4);\r\n\r\n document.querySelector('#cx').value = cx;\r\n document.querySelector('#cy').value = cy;\r\n document.querySelector('#cz').value = cz;\r\n\r\n var accel = { x: ax, y: ay, z: az };\r\n appendAccelData(accel);\r\n var gyro = { x: gx, y: gy, z: gz };\r\n appendGyroData(gyro);\r\n var compass = { x: cx, y: cy, z: cz };\r\n appendCompassData(compass);\r\n frames.a += 1;\r\n frames.g += 1;\r\n frames.c += 1;\r\n\r\n save(accel.x.toString() + ',' + accel.y.toString() + ',' + accel.z.toString() +\r\n gyro.x.toString() + ',' + gyro.y.toString() + ',' + gyro.z.toString() +\r\n compass.x.toString() + ',' + compass.y.toString() + ',' + compass.z.toString());\r\n}", "function onMessageArrived(message) {\r\n\r\n \r\n console.log(\"onMessageArrived: \" + message.payloadString);\r\n\r\n if(message.destinationName == \"IC.embedded/jhat/sensors/readings\"){\r\n var split_data = message.payloadString.split(\",\");\r\n\r\n \r\n var d = new Date();\r\n var h = 0;\r\n var m = 0;\r\n if(d.getHours() < 10){\r\n h = '0'+d.getHours();\r\n }\r\n else{\r\n h = d.getHours();\r\n }\r\n if(d.getMinutes() < 10){\r\n m = '0'+d.getMinutes();\r\n }\r\n else{\r\n m = d.getMinutes();\r\n }\r\n time = h + ':' + m;\r\n time_all = d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();\r\n addData(LineChart0, time, parseInt(split_data[0]));\r\n addData(LineChart1, time, parseInt(split_data[1]));\r\n addData(LineChart2, time, parseInt(split_data[2]));\r\n addData(LineChart3, time, parseInt(split_data[3]));\r\n \r\n $('.circle .bar').circleProgress('value', parseFloat(split_data[5])/100);\r\n \r\n // document.getElementById(\"messages\").innerHTML += '<span>Topic: ' + message.destinationName + ' | ' + message.payloadString + '</span><br/>';\r\n document.getElementById(\"live-temp\").innerHTML = split_data[0] + '°';\r\n document.getElementById(\"live-hum\").innerHTML = split_data[1] + '%';\r\n document.getElementById(\"live-air\").innerHTML = split_data[3] + ' ppb';\r\n\r\n\r\n \r\n message_board(split_data[4], time, split_data[5])\r\n } \r\n else if(message.destinationName == \"IC.embedded/jhat/sensors/connect_ack\"){\r\n var split_data = message.payloadString.split(\",\");\r\n\r\n for(i=0; i<split_data.length; i=i+7){\r\n time = split_data[i+6]\r\n addData(LineChart0, time, parseInt(split_data[i]));\r\n addData(LineChart1, time, parseInt(split_data[i+1]));\r\n addData(LineChart2, time, parseInt(split_data[i+2]));\r\n addData(LineChart3, time, parseInt(split_data[i+3]));\r\n message_board(split_data[i+4], time, split_data[i+5])\r\n }\r\n\r\n $('.circle .bar').circleProgress('value', parseFloat(split_data[split_data.length-2])/100)\r\n\r\n document.getElementById(\"live-temp\").innerHTML = split_data[split_data.length-7] + '°';\r\n document.getElementById(\"live-hum\").innerHTML = split_data[split_data.length-6] + '%';\r\n document.getElementById(\"live-air\").innerHTML = split_data[split_data.length-4] + ' ppb';\r\n }\r\n}", "function handleReceiveData(data) {\r\n\t\tif (\"orden\" in data) {\r\n\t\t\tif (data.orden == \"takeoff\") {\r\n\t\t\t\tarDrone.takeoff();\r\n\t\t\t} else if (data.orden == \"land\") {\r\n\t\t\t\tarDrone.land();\r\n\t\t\t} else {\r\n\t\t\t\tconsole.log(\"Orden no valida. \");\r\n\t\t\t}\r\n\t\t} else if (\"x\" in data) {\r\n\t\t\tarDrone.setXYValues(data.x, data.y);\r\n\t\t} else if (\"alt\" in data) {\r\n\t\t\tarDrone.setAltYaw(data.alt, data.yaw);\r\n\t\t} else {\r\n\t\t\tconsole.log(\"Dato invalido. \");\r\n\t\t}\t\t\r\n\t}", "function processInputStreamData(data) \n{\n if(data.entityId.type == 'DeviceProfile.awsiot') {\n doMediation(data);\t\t\n } else {\n onReceivedNGSIUpdate(data);\n }\t \n}", "function Sensor_IsAvailableChanged(args) {\n if (sensor.isAvailable) {\n document.getElementById(\"statustext\").innerHTML = \"Running\";\n }\n else {\n document.getElementById(\"statustext\").innerHTML = \"Kinect not available!\";\n }\n }", "function onConnect(sensorTag) {\n\t console.log(uuid + ' Connected');\n\t sensorTag.discoverServicesAndCharacteristics(function() {\n\t\tconsole.log(uuid + ' DiscoverServicesAndCharacteristics');\n\t\tsensorTag.on('humidityChange', function(temperature, humidity) {\n\t\t // Ignore readings of a disabled sensor\n\t\t if (temperature == -46.85 && humidity == -6) {\n\t\t\treturn;\n\t\t }\n\t\t var temp = temperature.toFixed(2);\n\t\t var hum = humidity.toFixed(2);\n\t\t sensorTag.disableHumidity(function() {\n\t\t\tconsole.log(uuid + ' Got a reading, humidity sensor disabled for ' + measurementIntervalMs + ' ms');\n\t\t });\n\t\t send_to_keenio(temp,hum,uuid);\n\t\t});\n\t\t\n\t\tintervalId = setInterval(function() {\n\t\t sensorTag.enableHumidity(function() {\n\t\t\tconsole.log(uuid + ' Humidity sensor enabled to get the next reading');\n\t\t });\n\t\t}, measurementIntervalMs);\n\t\t\n\t\tsensorTag.notifyHumidity(function() {\n\t\t console.log(uuid + ' Humidity notifications enabled');\n\t\t});\n\t });\n\t}", "function onAnalogRead(x) { \n if (!x.err && typeof x.value == 'number') {\n pushData(x.value); // <10>\n }\n setTimeout(drawGraph, 20); // <11>\n }", "function FFDataProcessAndDisplay() {\n\t//Setting object to store processed data\n\tfunction processedFFData() {\n\t\tthis.moteid = idMote;\n\t\tthis.sensorType = sensorType;\n\t\tthis.lastTimestamp = lastTimeStamp;\n\t\tthis.lastValue = lastValue;\n\t\tthis.arrayValuesDay = valuesDay;\n\t\tthis.populationDay = populationDay;\n\t\tthis.arrayValuesWeek = valuesWeek;\n\t\tthis.populationWeek = populationWeek;\n\t\tthis.platform = platform;\n\t\tthis.unit = unit;\n\t}\n\t\t\t\t\t\t\t\n\t//Setting up variables\n\tvar valuesDay = [];\n\tvar valuesWeek = [];\n\tvar populationDay = 0;\n\tvar populationWeek = 0;\n\tvar sensorType = \"\" ;\n\tvar checkSensorType = [];\n\tvar lastDay = new Date(\"2016-09-13 00:00:00\");\n\tvar day = 60*60*24*1000;\n\tvar week = day * 7;\n\tvar oneDay = lastDay.getTime() - day;\n\tvar oneWeek = lastDay.getTime() - week;\n\tvar platform;\n\tvar sensor = [];\n\t\t\t\t\t\t\t\n\t//This allow to extract the nescessary data for the calculation and the display\n\tfor (var i=0; i<firstFloor.length; i++){\n\t\tvar idMote = firstFloor[i];// Get the mote_id\n\t\tfor (var k=0; k<modalityJson.length;k++) {\n\t\t\tvar lastTimeStamp = \"1970-01-01 00:00:00\"; //Reset the timestamp\n\t\t\tfor (var j=0; j<motesDataJsonFF.length; j++){\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (firstFloor[i] == motesDataJsonFF[j].mote_id && motesDataJsonFF[j].sensor_type == modalityJson[k].sensor_type && motesDataJsonFF[j].mote_id == modalityJson[k].mote_id){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tsensorType = modalityJson[k].sensor_type;//Get the sensor type\n\t\t\t\t\tunit = modalityJson[k].measurement_unit;//Get the unit of the sensor\n\t\t\t\t\t \n\t\t\t\t\t //Get the mote platform\n\t\t\t\t\t for (l=0; l<moteJson.length;l++){\n\t\t\t\t\t\t if (moteJson[l].mote_id==firstFloor[i]){\n\t\t\t\t\t\t\t platform = moteJson[l].platform;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// Storing the data to calculate the standard deviation for the last 24hrs\n\t\t\t\t\tif (new Date(motesDataJsonFF[j].date_time)>oneDay){\n\t\t\t\t\t\tvaluesDay.push(motesDataJsonFF[j].observation);\n\t\t\t\t\t\tpopulationDay++;\n\t\t\t\t\t}\n\t\t\t\t\t// Storing the data to calculate the standard deviation for the last week\n\t\t\t\t\tif (new Date(motesDataJsonFF[j].date_time)>oneWeek){\n\t\t\t\t\t\tvaluesWeek.push(motesDataJsonFF[j].observation);\n\t\t\t\t\t\tpopulationWeek++;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//Sets up the time and value of the last reading\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif (new Date (motesDataJsonFF[j].date_time)> new Date (lastTimeStamp)){\n\t\t\t\t\t\tlastTimeStamp = motesDataJsonFF[j].date_time;\n\t\t\t\t\t\tvar lastValue = motesDataJsonFF[j].observation;\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Creates an object only if the there is data to display\n\t\t\tif ( populationDay>0 && populationWeek>0){\n\t\t\t\t//Create the objects to store the data\n\t\t\t\tvar dayObj = new processedFFData(idMote, lastTimeStamp, sensorType, lastValue, valuesDay, populationDay, valuesWeek, populationWeek, platform,unit);\n\t\t\t\tmoteProcessedDataFF.push(dayObj);\n\t\t\t\tallMoteData.push(dayObj);\n\t\t\t\tvaluesDay =[];\n\t\t\t\tpopulationDay = 0;\n\t\t\t\tvaluesWeek = [];\n\t\t\t\tpopulationWeek = 0;\n\t\t\t}\n\t\t\tcheckSensorType.push(sensorType);\n\t\t\tif (sensor.indexOf(sensorType) == -1 && sensorType!= \"\"){ //extract the different types of sensors in this floor\n\t\t\t\tsensor.push(sensorType);\n\t\t\t}\n\t\t}\n\t}\n\tcheckSensorType = [];\n\tfor (var n =0; n<firstFloor.length; n++){\n\t\tvar motNum = \"\";\n\t\tvar stamp = \"\";\n\t\t\t\t\t\t\t\t\n\t\tfor (var i=0; i<moteProcessedDataFF.length; i++){\n\t\t\tif (firstFloor[n] == moteProcessedDataFF[i].moteid){\n\t\t\t\t\t\t\t\t\n\t\t\t\tif (motNum == \"\" && stamp == \"\"){\n\t\t\t\t\tmotNum = moteProcessedDataFF[i].moteid;\n\t\t\t\t\tstamp = moteProcessedDataFF[i].lastTimestamp;\n\t\t\t\t\tcheckIdFF.push(motNum);\n\t\t\t\t\tcheckTimeFF.push(stamp);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}\n\t//Creating the object and variables to store the max values data\n\tfunction store (){\n\t\tthis.sensor =senType;\n\t\tthis.unit = thisUnit;\n\t\tthis.reading=maxRead;\n\t\tthis.moteId = idMote;\n\t}\n\tvar storeTable=[];\n\t\n\t//Extracting the max data\n\tfor (var p=0; p<sensor.length; p++){\n\t\tvar senType =sensor[p];\n\t\tvar maxRead = 0;\n\t\tvar idMote = \"\";\n\t\tvar thisUnit = \"\"\n\t\tfor (var q =0; q<motesDataJsonFF.length; q++){\n\t\t\t if( sensor[p] == motesDataJsonFF[q].sensor_type && motesDataJsonFF[q].observation > maxRead){\n\t\t\t\t maxRead = motesDataJsonFF[q].observation;\n\t\t\t\t idMote = motesDataJsonFF[q].mote_id;\n\t\t\t }\n\t\t\t for (var r=0; r<modalityJson.length; r++){\n\t\t\t\t if(modalityJson[r].sensor_type == sensor[p]){\n\t\t\t\t\tthisUnit = modalityJson[r].measurement_unit;\n\t\t\t\t }\n\t\t\t }\n\t\t}\n\t\tvar tableObj = new store(senType, maxRead, idMote, thisUnit);\n\t\t storeTable.push(tableObj);\n\t}\n\t//Creating and populating the table with max values an inserting it in the webpage\n\tvar maxTable = \"<p> Maximum values over the last week:</p><table style= 'width: 100%' class ='maxTable'><tbody><tr><th class='border'>Sensor Type</th><th class='border'>Max Reading</th><th class='border'>Mote Id</th></tr>\";\n\t\n\tfor (var i=0; i<storeTable.length; i++){\n\t\tmaxTable+=\"<tr><td class='border'>\" + storeTable[i].sensor + \" (\" + storeTable[i].unit + \") </td><td class='border' id='data'>\" + storeTable[i].reading + \"</td><td class='border' id='data'>\" + storeTable[i].moteId + \"</td></tr>\";\n\t}\n\tmaxTable+= \"</tbody></table>\";\n\tvar div = document.getElementById(\"maxTableFF\");\n\tdiv.innerHTML = maxTable + div.innerHTML;\n}", "function _got_info(data){\n\t\tvar mid = data['model_id'] || null;\n\t\tvar uid = data['user_id'] || '???';\n\t\tvar ucolor = data['user_color'] || '???';\n\t\tvar signal = data['signal'] || '???';\n\t\tvar intention = data['intention'] || '???';\n\t\tvar message = data['message'] || '???';\n\t\tvar message_type = data['message_type'] || '???';\n\n\t\t// Check to make sure it interestes us.\n\t\tif( ! mid || mid != anchor.model_id ){\n\t\t ll('skip info packet--not for us');\n\t\t}else{\n\t\t ll('received info');\n\t\t\n\t\t // Trigger whatever function we were given.\n\t\t if(typeof(on_info_event) !== 'undefined' && on_info_event){\n\t\t\ton_info_event(data, uid, ucolor);\n\t\t }\n\t\t}\n\t }", "function serialEvent() {\n inData = serial.readLine();\n let splitData = split(inData, '|');\n if (splitData.length === 7) {\n b1 = int(trim(splitData[0]));\n b2 = int(trim(splitData[1]));\n slider = int(trim(splitData[2]));\n shaked = int(trim(splitData[3]));\n light = int(trim(splitData[4]));\n sound = int(trim(splitData[5]));\n temp = int(trim(splitData[6]));\n newValue = true;\n } else {\n newValue = false;\n }\n}", "function processedGFData() {\n\t\tthis.moteid = idMote;\n\t\tthis.sensorType = sensorType;\n\t\tthis.lastTimestamp = lastTimeStamp;\n\t\tthis.lastValue = lastValue;\n\t\tthis.arrayValuesDay = valuesDay;\n\t\tthis.populationDay = populationDay;\n\t\tthis.arrayValuesWeek = valuesWeek;\n\t\tthis.populationWeek = populationWeek;\n\t\tthis.platform = platform;\n\t\tthis.unit= unit;\n\t}", "function listenForAccel() {\n tag.on('accelerometerChange', function(x, y, z) {\n // store accelerometer data (in G)\n acc_data[\"x\"] = x.toFixed(3);\n acc_data[\"y\"] = y.toFixed(3);\n acc_data[\"z\"] = z.toFixed(3);\n // send osc msgs\n client.send('/sensortag', [acc_data]);\n console.log(\"messege sent\");\n });\n }", "function setSensor(temHum) {\n TEM_SENSOR.currentTemperature = temHum.temperature;\n\n temSensor.getService(Service.TemperatureSensor)\n .setCharacteristic(Characteristic.CurrentTemperature, TEM_SENSOR.getTemperature());\n}", "function main(params, callback){\n // Parse the 12-byte payload in the Sigfox message to get the sensor values.\n // Upon completion, callback will be passed an array of { key, value } sensor values.\n if (!params) return callback(null, []); // Nothing to parse, quit.\n const sensorValues = {};\n const custom = params.custom;\n const data = params.data;\n if (custom) {\n // If custom sensor values are produced by the Sigfox Backend message parser,\n // return the custom values. So params.custom.tmp becomes tmp.\n Object.assign(sensorValues, custom);\n }\n if (data && data.length >= 2 && data.length <= 8) { // Ignore Structured Messages.\n // If payload data contains one or more bytes, return each byte as a sensor value\n // data looks like \"1c30361d\". We break into individual bytes (2 hex digits):\n // tmp=0x1c, hmd=0x30, alt=0x36, mod=0x1d. Convert from hexadecimal to decimal.\n if (data.length >= 2) sensorValues.tmp = parseInt(data.substr(0, 2), 16);\n if (data.length >= 4) sensorValues.hmd = parseInt(data.substr(2, 2), 16);\n if (data.length >= 6) sensorValues.alt = parseInt(data.substr(4, 2), 16);\n if (data.length >= 8) sensorValues.mod = parseInt(data.substr(6, 2), 16);\n }\n\n // Unit Test: Check whether the decoded sensor values match the expected sensor values.\n if (unittest && params.expectedSensorValues) {\n const expected = params.expectedSensorValues;\n if (JSON.stringify(expected) === JSON.stringify(sensorValues))\n console.log('*** Unit Test: Expected sensor values OK');\n else throw new Error([\n 'Expected sensor values:',\n expected,\n 'Got:',\n sensorValues,\n ].join('\\n'));\n }\n\n // Convert sensor values from object into an array of { key, values }.\n const sensorValuesArray = [];\n Object.keys(sensorValues).forEach(key => {\n sensorValuesArray.push({ key, value: sensorValues[key] });\n });\n // Return the sensor value array to thethings.io, which will trigger the\n // process_sensor_data Trigger Function.\n callback(null, sensorValuesArray)\n}", "function handleTap(pageX, pageY) {\n var sensor = findSensorAtXY((pageX + pageScrollLeft) * mCanvasScale, (pageY + pageScrollTop - titleHeight) * mCanvasScale);\n if (sensor) {\n mSelectedSensorID = sensor.key;\n showSensorInfo(sensor);\n hideGraph();\n }\n }", "function gotData() {\n infoData=\"Getting Data\";\n \n\n var currentString = serial.readLine(); // read the incoming string\n if(visualizationLog.length>40){\n visualizationLog.pop();\n } \n \n if(consoleLog.length>50){\n consoleLog.pop();\n }\n if(infoLog.length>150){\n infoLog.pop();\n }\n \n\n trim(currentString); // remove any trailing whitespace\n if (currentString) {\n consoleLog.unshift(currentString);\n consoleLog.unshift('\\n');\n \n }else{\n return;\n }\n\n //console.log(currentString); // println the string\n if(currentString[0]=='=' || currentString[0]=='|' || currentString==\"-\" || currentString==\">\"){\n infoLog.unshift(currentString);\n infoLog.unshift('\\n');\n }\n\n //make sure valid serial read\n if(currentString[0]=='T'){\n \n\n visualizationLog.unshift(currentString);\n visualizationLog.unshift('\\n');\n \n green=true;\n\n latestData = currentString.split(\":\"); // save it for the draw method\n\n TOF1 =parseInt(latestData[1]);\n if(TOF1>65000){\n TOF1=9.99;\n }\n TOF2 =parseInt(latestData[3]);\n if(TOF2>65000){\n TOF2=9.99;\n }\n TOF3 =parseInt(latestData[5]);\n if(TOF3>65000){\n TOF3=9.99;\n }\n TOF4 =parseInt(latestData[7]);\n if(TOF4>65000){\n TOF4=9.99;\n }\n TOF5 =parseInt(latestData[9]);\n if(TOF5>65000){\n TOF5=9.99;\n }\n \n \n switch(SelectRot){\n case 'x':\n angle=-parseFloat(latestData[15]);\n break;\n case 'y':\n angle=-parseFloat(latestData[13]);\n break;\n case 'z':\n angle=-parseFloat(latestData[11]);\n break;\n }\n //\n \n line_array_readings[1]=parseFloat(latestData[21]);\n line_array_readings[2]=parseFloat(latestData[22]);\n line_array_readings[3]=parseFloat(latestData[23]);\n line_array_readings[4]=parseFloat(latestData[24]);\n line_array_readings[5]=parseFloat(latestData[25]);\n line_array_readings[6]=parseFloat(latestData[26]);\n line_array_readings[7]=parseFloat(latestData[27]);\n line_array_readings[8]=parseFloat(latestData[28]);\n line_array_readings[9]=parseFloat(latestData[29]);\n line_array_readings[10]=parseFloat(latestData[30]);\n line_array_readings[11]=parseFloat(latestData[31]);\n line_array_readings[12]=parseFloat(latestData[32]);\n line_array_readings[13]=parseFloat(latestData[33]);\n line_array_readings[14]=parseFloat(latestData[34]);\n line_array_readings[15]=parseFloat(latestData[35]);\n\n line_array_threshold=parseFloat(latestData[39]);\n\n }\n}", "function sensor_IsAvailableChanged(args) {\n if (sensor.isAvailable) {\n console.log(\"status changed: Running\");\n }\n else {\n console.log(\"status changed: Kinect not available!\");\n }\n }", "function UpdateSensorData () {\n\t// Grab more sensors to update if connections are available, otherwise\n\t// hang out\n\tif ( sensorPool.length < MAX_SENSORS ) {\n\t\tvar sensor = GetSensor( function ( sensorId ) {\n\t\t\tif ( sensorId ) {\n\t\t\t\t// Update the sensor only if it's not already in the queue\n\t\t\t\tif ( sensorPool.indexOf( sensorId ) == -1 ) {\n\t\t\t\t\tsensorPool.push( sensorId );\n\t\t\t\t\tSendUpdateRequest( sensorId );\n\n\t\t\t\t\tif ( config.debug ) console.log( 'Updating sensor ' + sensorId );\n\n\t\t\t\t\t// If specified, cull sensor data as well\n\t\t\t\t\tif ( CULL_DATA ) {\n\t\t\t\t\t\tCullData( sensorId, CULL_INTERVAL, 'ci_logical_sensor_data' );\n\n\t\t\t\t\t\tif ( config.debug ) console.log( 'Culling data on sensor ' + sensorId );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Get another if we're not full yet\n\t\t\t\tUpdateSensorData();\n\t\t\t} else {\n\t\t\t\t// If we didn't get a sensor, this mean we're done updating for now, so wait\n\t\t\t\t// for the wait interval and start again\n\t\t\t\tIdle( UPDATE_INTERVAL * 60 * 60, function () {\n\t\t\t\t\tUpdateSensorData();\n\t\t\t\t});\n\t\t\t}\t\t\t\t\n\t\t});\n\t}\n\n\t// If the queue is full, do nothing. UpdateSensorData will be called again\n\t// from SendUpdateRequest upon completion of updating the next sensor so\n\t// another can immediately be updated.\n\tif ( config.debug ) {\n\t\tconsole.log( 'Current sensor queue: ', sensorPool );\n\t\tconsole.log( 'Connection count: ', connCount );\n\t}\n}", "function updateSensorWidgets(sensorArr){\n\tfor(var n = 0; n < sensorArr.length; n++){\n\t\tfor(var i = 0; i < sensorArr[n].triggers.length; i++){\n\t\t\tupdateThreshold(n,i,sensorArr[n].triggers[i].level);\n\t\t\t\n\t\t\tvar res = document.getElementById('response' + n + '_' + i)\n\t\t\tres.value = String(sensorArr[n].triggers[i].response);\n\t\t\tdocument.getElementById('trigEvent' + n + '_' + i).value = String(sensorArr[n].triggers[i].event);\n\t\t\tdocument.getElementById('blueDet' + n + '_' + i).value = String.fromCharCode(sensorArr[n].triggers[i].blueDetail);\n\t\t\tdocument.getElementById('keyDet' + n + '_' + i).value = String.fromCharCode(sensorArr[n].triggers[i].keyDetail);\n\t\t\tdocument.getElementById('mouseDet' + n + '_' + i).value = String(sensorArr[n].triggers[i].mouseDetail);\n\t\t\tdocument.getElementById('IRDet' + n + '_' + i).value = String(sensorArr[n].triggers[i].IRDetail);\n\t\t\tdocument.getElementById('invert'+ n + '_' + i).checked = sensorArr[n].triggers[i].invert;\n\t\t\tres.dispatchEvent(new Event('change'));\n\t\t};\n\t};\n}" ]
[ "0.6966615", "0.6716126", "0.66259146", "0.64087725", "0.63992155", "0.62982756", "0.6296216", "0.6273894", "0.62679636", "0.62663", "0.6263095", "0.6262468", "0.61906576", "0.6142741", "0.6094484", "0.6092796", "0.60718995", "0.60653365", "0.60595727", "0.6053847", "0.60520566", "0.6030024", "0.602411", "0.60142756", "0.6007119", "0.6003588", "0.5975758", "0.5971523", "0.5969934", "0.59443706", "0.594", "0.5939022", "0.5937234", "0.5928431", "0.59153175", "0.5913715", "0.5908513", "0.5900245", "0.5898092", "0.5874515", "0.5874515", "0.5874515", "0.587299", "0.5870674", "0.5861474", "0.5844069", "0.58406997", "0.58154297", "0.58119553", "0.58050525", "0.5794525", "0.5793757", "0.5790536", "0.5744176", "0.57317084", "0.5731499", "0.5711691", "0.56984174", "0.56902254", "0.5664274", "0.56573415", "0.5657074", "0.5656332", "0.56553125", "0.5649799", "0.56298697", "0.56290644", "0.56268924", "0.5624927", "0.56219107", "0.5610791", "0.5606958", "0.56031567", "0.56027126", "0.5602063", "0.5577598", "0.5574267", "0.55737484", "0.5572664", "0.55649316", "0.55616295", "0.5538127", "0.55373013", "0.5535567", "0.5520623", "0.5518339", "0.5513107", "0.5504865", "0.5502871", "0.5498717", "0.5498423", "0.5497788", "0.54954654", "0.54735047", "0.54720217", "0.54707134", "0.5464028", "0.54551965", "0.5452966", "0.5440245" ]
0.68387544
1
Het gaat hier om een gepubliceerd trackModel die door de eigenaar is geprivatiseerd of defintief verwijderd heeft. De volger hoeft alleen maar de dit trackModel/trackSupModel en trackTagModellen (incl updaten van de lables in SideMenu) uit zijn stores te verwijderen. Dit trackModel is dan niet meer zichtbaar in zijn TRINL. Hij laat zijn TrackSup TrackReactieModel TrackReactieSupModel en TrackTagModellen in de database. Als de eigenaar deze Track opnieuw publiceerd worden de Sup en Reactie bestanden weer toegevoegd. Deze POI blijft bij de volger weg als deze Track geprivatiseerd blijft. De Als de Track niet gesyncd wordt dan worden ook de andere Modellen niet gesynced. !!!Attentie. De updates van dit trackModel, trackSupModel, Reacties en trackTags gaan gewoon door. Nagaan of de volger hierdoor niet lastig gevallen wordt!!! LoadAll gaat goed. Dit trackModel wordt niet meer geload. SyncDownAll !!!!!!!!!!!!!! SyncDown haalt ook nieuwe modellen op. Alles moet gewoon door de FrontEndAPI in stores worden bijgewerkt. De gelinkte bestanden zijn jammer genoeg overbodig als er geen itemModel is. De volgende loadAll laadt deze overbodige modellen toch niet meer.
function verwijderTrack(trackModel, mode, watch) { var q = $q.defer(); //console.warn('dataFactoryTrack verwijderTrack: ', trackModel.get('naam')); var trackId = trackModel.get('Id'); initxData(trackModel); // // Clean up stores // loDash.remove(dataFactoryTrack.star, function (trackModel) { return trackModel.get('Id') === trackId; }); loDash.remove(dataFactoryTrack.nieuw, function (trackModel) { return trackModel.get('Id') === trackId; }); loDash.remove(dataFactoryTrack.selected, function (trackModel) { return trackModel.get('Id') === trackId; }); // // Verwijderen labels in sidemenu // loDash.each(trackModel.xData.tags, function (trackTagModel) { //console.log('dataFactoryTrack updateLabels loop Tags: ', trackTagModel, trackTagModel.xData); tagsRemove(trackModel, trackTagModel.xData); }); trackModel.xData.tags = []; // $rootScope.$emit('trackSideMenuUpdate'); // loDash.remove(dataFactoryTrackTag.store, function (trackTagModel) { return trackTagModel.get('trackId') === trackId && trackTagModel.get('gebruikerId') === dataFactoryCeo.currentModel.get('Id'); }); loDash.remove(dataFactoryTrackTag.data, function (dataItem) { return dataItem.record.get('trackId') === trackId && dataItem.record.get('gebruikerId') === dataFactoryCeo.currentModel.get('Id'); }); //console.warn('dataFactoryTrack verwijderTrack trackTags VERWIJDERD form trackTagStore/data'); loDash.remove(dataFactoryTrackReactie.store, function (trackReactieModel) { return trackReactieModel.get('trackId') === trackId; }); loDash.remove(dataFactoryTrackReactie.data, function (dataItem) { return dataItem.record.get('trackId') === trackId; }); //console.warn('dataFactoryTrack verwijderTrack trackReactie VERWIJDERD form trackReactieStore/data'); loDash.remove(dataFactoryTrackReactieSup.store, function (trackReactieSupModel) { return trackReactieSupModel.get('trackId') === trackId && trackReactieSupModel.get('gebruikerId') === dataFactoryCeo.currentModel.get('Id'); }); loDash.remove(dataFactoryTrackReactieSup.data, function (dataItem) { return dataItem.record.get('trackId') === trackId && dataItem.record.get('gebruikerId') === dataFactoryCeo.currentModel.get('Id'); }); //console.log('dataFactoryTrack verwijderTrack trackReactieSups VERWIJDERD from store'); loDash.remove(dataFactoryTrackSup.store, function (trackSupModel) { return trackSupModel.get('trackId') === trackId && trackSupModel.get('gebruikerId') === dataFactoryCeo.currentModel.get('Id'); }); loDash.remove(dataFactoryTrackSup.data, function (dataItem) { return dataItem.record.get('trackId') === trackId && dataItem.record.get('gebruikerId') === dataFactoryCeo.currentModel.get('Id'); }); //console.warn('dataFactoryTrack verwijderTrack trackSup VERWIJDERD from trackSupStore/data'); //updateLabels(trackModel).then(function () { loDash.remove(dataFactoryTrack.store, function (trackModel) { //console.log('dataFactoryTrack verwijderTrack trackverijderen loDash remove: ', trackModel, trackId, trackModel.get('Id'), trackModel.get('xprive'), trackModel.get('gebruikerId'), trackModel.get('naam')); return trackModel.get('Id') === trackId; }); loDash.remove(dataFactoryTrack.data, function (dataItem) { return dataItem.record.get('Id') === trackId; }); //console.warn('dataFactoryTrack verwijderTrack track VERWIJDERD from trackStore/data'); //console.log('dataFactoryTrack verwijderTrack aantal dataFactoryTrack.store STORE: ', dataFactoryTrack.store, dataFactoryTrack.store.length); // // Waarschuwing als de gebruiker in deze Card zit // $rootScope.$emit('trackVerwijderd', { trackModel: trackModel }); if (watch) { watchUpdate(mode, trackModel); } $timeout(function () { $rootScope.$emit('tracksFilter'); $rootScope.$emit('tracksNieuweAantallen'); }, 500); q.resolve(); //}); return q.promise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateReacties(trackModel) {\n\n //console.warn('dataFactoryTrack updateReacties naam: ', trackModel.get('naam'));\n\n var q = $q.defer();\n\n var trackId = trackModel.get('Id');\n\n var trackReacties = loDash.filter(dataFactoryTrackReactie.store, function (trackReactieModel) {\n return trackReactieModel.get('trackId') === trackId;\n });\n //console.log('dataFactoryTrack updateReacties trackReacties: ', trackReacties);\n if (trackReacties.length > 0) {\n //console.log('dataFactoryTrack updateReacties syncDown naam, trackId, trackReacties: ', trackModel.get('naam'), trackId, trackReacties);\n loDash.each(trackReacties, function (trackReactieModel) {\n //console.log('dataFactoryTrack updateReacties trackId, naam, reactie: ', trackId, trackModel.get('naam'), trackReactieModel.get('reactie'));\n var trackReactieId = trackReactieModel.get('Id');\n\n var trackReactieSupModel = loDash.find(dataFactoryTrackReactieSup.store, function (trackReactieSupModel) {\n return trackReactieSupModel.get('reactieId') === trackReactieId;\n });\n\n if (trackReactieSupModel) {\n\n trackReactieModel.xData = {};\n trackReactieModel.xData.tags = [];\n\n trackReactieModel.xData.sup = trackReactieSupModel;\n\n var xnew = trackReactieSupModel.get('xnew');\n\n if (xnew) {\n if (!virgin) {\n notificationsTrackReactie += 1;\n }\n var trackNieuwModel = loDash.find(dataFactoryTrack.nieuw, function (trackNieuwModel) {\n return trackNieuwModel.get('Id') === trackId;\n });\n if (!trackNieuwModel) {\n dataFactoryTrack.nieuw.push(trackModel);\n //console.log('dataFactoryTrack updateTrackxnew toegevoegd aan nieuw: ', dataFactoryTrack.nieuw);\n }\n } else {\n loDash.remove(dataFactoryTrack.nieuw, function (trackNieuwModel) {\n return trackNieuwModel.get('Id') === trackId;\n });\n //console.log('dataFactoryTrack updateTrack xnew verwijderd: ', dataFactoryTrack.nieuw);\n }\n } else {\n //console.log('dataFactoryTrack updateTrackreacties heeft nog geen trackReactieSupModel. Dus nieuw trackReactieSupModel aanmaken!!');\n\n trackReactieSupModel = new dataFactoryTrackReactieSup.Model();\n trackReactieSupModel.set('reactieId', trackReactieId);\n trackReactieSupModel.set('trackId', trackId);\n trackReactieSupModel.set('gebruikerId', dataFactoryCeo.currentModel.get('Id'));\n trackReactieSupModel.set('star', false);\n trackReactieSupModel.set('xnew', true);\n if (virgin) {\n trackReactieSupModel.set('xnew', false);\n }\n trackReactieSupModel.save().then(function () {\n\n //console.log('dataFactoryTrack updateReacties trackReactieSupModel CREATED.');\n\n trackReactieModel.xData = {};\n trackReactieModel.xData.tags = [];\n trackReactieModel.xData.sup = trackReactieSupModel;\n\n //console.log('dataFactoryTrack updateReacties trackReactieSupModel toegevoegd aan Reactie.');\n\n var trackSupModel = loDash.find(dataFactoryTrackSup.store, function (trackSupModel) {\n return trackSupModel.get('trackId') === trackId && trackSupModel.get('gebruikerId') === dataFactoryCeo.currentModel.get('Id');\n });\n\n if (trackSupModel) {\n //console.log('dataFactoryTrack updateReacties trackSupModel gevonden: ', trackId, trackModel.get('naam'));\n trackModel.xData.sup = trackSupModel;\n\n var xnew = trackSupModel.get('xnew');\n var star = trackSupModel.get('star');\n //console.log('dataFactoryTrack updateTrack trackModel, trackModel.xData.sup UPDATE trackId: ', trackModel, trackModel.xData.sup, trackModel.xData.sup.get('trackId'));\n\n if (star) {\n var trackStarModel = loDash.find(dataFactoryTrack.star, function (trackStarModel) {\n return trackStarModel.get('Id') === trackId;\n });\n if (!trackStarModel) {\n dataFactoryTrack.star.push(trackModel);\n //console.log('dataFactoryTrack updateTrack star toegevoegd: ', dataFactoryTrack.star);\n }\n } else {\n loDash.remove(dataFactoryTrack.star, function (trackStarModel) {\n return trackStarModel.get('Id') === trackId;\n });\n //console.log('dataFactoryTrack updateTrack star verwijderd: ', dataFactoryTrack.star);\n }\n\n //console.log('dataFactoryTrack updateTrack xnew: ', xnew);\n\n\n if (xnew) {\n if (!virgin) {\n notificationsTrack += 1;\n }\n var trackNieuwModel = loDash.find(dataFactoryTrack.nieuw, function (trackNieuwModel) {\n return trackNieuwModel.get('Id') === trackId;\n });\n if (!trackNieuwModel) {\n dataFactoryTrack.nieuw.push(trackModel);\n //console.log('dataFactoryTrack updateTrackxnew toegevoegd aan nieuw: ', dataFactoryTrack.nieuw);\n }\n } else {\n loDash.remove(dataFactoryTrack.nieuw, function (trackNieuwModel) {\n return trackNieuwModel.get('Id') === trackId;\n });\n //console.log('dataFactoryTrack updateTrack xnew verwijderd: ', dataFactoryTrack.nieuw);\n }\n\n\n //console.log('dataFactoryTrack reload updateSupModel SUCCESS');\n q.resolve();\n\n //console.log('dataFactoryTrack updateTrackList heeft nog geen supModel. Dus nieuw!! Id, naam: ', trackModel.get('Id'), trackModel.get('naam'));\n\n trackSupModel = new dataFactoryTrackSup.Model();\n trackSupModel.set('trackId', trackId);\n trackSupModel.set('gebruikerId', dataFactoryCeo.currentModel.get('Id'));\n trackSupModel.set('star', false);\n trackSupModel.set('xnew', true);\n if (virgin) {\n trackSupModel.set('xnew', false);\n //console.log('dataFactoryTrack updateTrack nieuwe trackenup niet als nieuw beschouwen. Gebruiker is maagd');\n }\n //console.log('dataFactoryTrack updateTrack nieuw trackSupModel: ', trackSupModel.get('trackId'));\n\n trackSupModel.save().then(function () {\n\n //console.log('dataFactoryTrack updateTrack nieuw trackSupModel: ', trackSupModel);\n\n trackModel.xData.sup = trackSupModel;\n\n if (!virgin) {\n notificationsTrack += 1;\n var nieuwModel = loDash.find(dataFactoryTrack.nieuw, function (nieuwModel) {\n return nieuwModel.get('Id') === trackId;\n });\n if (!nieuwModel) {\n dataFactoryTrack.nieuw.push(trackModel);\n }\n } else {\n //console.error('dataFactoryTrack updateTrack nieuwe trackenup notifications skipped. Gebruiker is maagd');\n }\n //console.log('dataFactoryTrack updateTrack nieuwe trackenup voor trackId NOT FOUND in TrackStore.nieuw: ', trackId, dataFactoryTrack.nieuw);\n\n //console.log('dataFactoryTrack reload updateSupModel nieuwe track SUCCESS');\n q.resolve();\n\n });\n }\n });\n }\n });\n //console.log('dataFactoryTrack reload updateReacties SUCCESS');\n q.resolve();\n } else {\n //console.log('dataFactoryTrack reload updateReacties SUCCESS');\n q.resolve();\n }\n\n return q.promise;\n }", "_update() {\n return this.store.findAll(this.modelName, { reload: true });\n }", "async loadTracks() {\n if (!Is.empty(this.user.tracks)) {\n this.tracks = this.user.tracks;\n } else {\n this.isLoading = true;\n }\n\n let response = await this.meService.tracks();\n\n this.tracks = response.records;\n\n this.isLoading = false;\n\n this.user.update('tracks', this.tracks);\n }", "onRestore() {\n this._updateModels();\n }", "componentWillUnmount(){\n ModelStore.removeListener(\"change\", this.getModel );\n }", "function fetchDailyTracks() {\n fetch(`${process.env.REACT_APP_BACKEND_URL}/daily_tracks`)\n // Authorization: `Bearer ${localStorage.getItem(\"token\")}`,\n // },\n .then((res) => res.json())\n .then((tracks) => {\n const thisDriverTracks = tracks.filter(\n (track) => track.user_id === count\n );\n if (thisDriverTracks.length > 0) {\n const last = thisDriverTracks[thisDriverTracks.length - 1];\n setDriverTrack(last);\n // console.log(last.user_id)\n setDriverId(last.user_id);\n // console.log(last.vehicle_id)\n setVehicleId(last.vehicle_id);\n // setTrackId(last.id)\n setTrackId(last.id)\n\n console.log(last);\n }\n });\n }", "function model (model) {\n _store.model(model)\n }", "function App() {\n\n const getTracks = () => {\n return fetch('http://35.232.86.10:1337/tracks').then(response => response.json());\n }\n\n const [tracks, setTracks] = useState([])\n\n useEffect(() => {\n getTracks().then(tracks => setTracks(tracks));\n\n }, []);\n \n // Automatially creates id for new tracks\n const addTrack = track => {\n track.id = tracks.length + 1\n setTracks([...tracks, track])\n\n \n }\n\n // Deletes track\n const deleteTrack = id => {\n setTracks(tracks.filter(track => track.id !== id))\n }\n\n //Tracks whether to display edit from\n const [editing, setEditing] = useState(false)\n\n // Initial Edit form Values\n const initialFormState = {id: null, title: \"\", artist: \"\", album: \"\", recommender: \"\", comments: \"\"}//listened_to: false, rating: 0, genre: \"\",\n\n const [currentTrack, setCurrentTrack] = useState(initialFormState)\n\n const editTrack = track => {\n setEditing(true)\n \n setCurrentTrack({id: track.id, title: track.title, artist: track.artist, album: track.album, listened_to: track.listened_to, rating: track.rating, genre: track.genre, recommender: track.recommender, comments: track.comments})\n }\n\n const updateTrack = (id, updatedTrack) => {\n setEditing(false)\n\n setTracks(tracks.map(track => (track.id === id ? updatedTrack: track)));\n }\n\n const pickTrack = track =>{\n setCurrentTrack({id: track.id, title: track.title, artist: track.artist, album: track.album, listened_to: track.listened_to, rating: track.rating, genre: track.genre, recommender: track.recommender, comments: track.comments})\n }\n\n\n return (\n <section className=\"section has-background-light\">\n <Router>\n <div className=\"container\">\n <hr/>\n <div className=\"box\">\n <div><h1 className=\"title is-1 has-text-info\">Song Recommendations</h1>\n <h2 className=\"subtitle\">Beau Curnow</h2></div>\n </div>\n <div className=\"columns\">\n <div className=\"column is-narrow\"> \n {editing ? (\n <UpdateTrackForm editing={editing} setEditing={setEditing} currentTrack={currentTrack} updateTrack={updateTrack}/>\n ):(\n <AddTrackForm addTrack={addTrack}/>)}\n </div> \n <div className=\"column\">\n <Switch>\n <Route path=\"/:id\">\n <Track currentTrack={currentTrack} key={currentTrack.id}/> \n </Route>\n <Route path=\"/\">\n <TrackTable tracks={tracks} deleteTrack={deleteTrack} editTrack={editTrack} pickTrack={pickTrack}/>\n </Route>\n </Switch>\n </div>\n </div>\n <div><br/></div>\n\n </div>\n </Router>\n </section>\n );\n}", "afterModel(model) {\n const store = this.get('store');\n const courses = [model.get('id')];\n const course = model.get('id');\n const sessions = model.hasMany('sessions').ids();\n const existingSessionsInStore = store.peekAll('session');\n const existingSessionIds = existingSessionsInStore.mapBy('id');\n const unloadedSessions = sessions.filter(id => !existingSessionIds.includes(id));\n\n //if we have already loaded all of these sessions we can just proceed normally\n if (unloadedSessions.length === 0) {\n return;\n }\n\n return all([\n store.query('session', {filters: {course}, limit: 1000}),\n store.query('offering', {filters: {courses}, limit: 1000}),\n store.query('ilm-session', {filters: {courses}, limit: 1000}),\n //temporarily disabled to fix #3173\n // store.query('objective', {filters: {courses}, limit: 1000}),\n // store.query('objective', {filters: {sessions}, limit: 1000}),\n store.query('session-type', {filters: {sessions}, limit: 1000}),\n ]);\n }", "function TrackModel(CONST) {\n\n\t\tvar TrackModel = function(attrs) {\n\n\t\t\tangular.extend(this, {\n\n\t\t\t\t// backend properties (set by the server)\n\t\t\t\t_id\t\t\t: null,\t\t// id of the track in the database\n\t\t\t\tuserId\t\t: null, \t// id of the user\n\n\t\t\t\t// youtube tracks don't have this set\n\t\t\t\tduration\t: '',\n\n\t\t\t\trating\t\t: null,\n\t\t\t\tghost\t\t: false, \n\n\t\t\t\t// required backend attributes\n\t\t\t\tsrc \t\t: null,\n\t\t\t\tsrcId\t\t: null,\n\t\t\t\tname\t\t: null,\n\t\t\t\tgenre\t\t: null,\n\t\t\t\tuploader\t: null,\n\t\t\t\tsrc_url \t: null,\n\t\t\t\tstream_url\t: null,\n\t\t\t\timg_url\t\t: null,\n\t\t\t\tnote\t\t: '',\n\n\t\t\t\t// ui-attributes: front end only\n\t\t\t\tui : {\n\t\t\t\t\timportStatus : 'none',\t// 'success', 'failed', or 'none'\n\t\t\t\t\tisSelected\t : false,\n\t\t\t\t\tactive\t\t : false\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// apply incoming attrs to properties, then apply all to this track\n\t\t\tangular.extend(this, attrs);\n\t\t}\n\n\t\tTrackModel.prototype.getId = function() {\n\t\t\treturn this._id; \n\t\t}\n\n\t\tTrackModel.prototype.getSrcUrl = function() {\n\t\t\tif (this.src === CONST.ORIGIN.YT) {\n\t\t\t\treturn \"https://www.youtube.com/watch?v=\" + this.srcId;\n\t\t\t}\n\t\t\tif (this.src === CONST.ORIGIN.SC) {\n\t\t\t\treturn this.src_url;\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t* Bad! set this as an attribute in TrackFactory\n\t\t*/\n\t\tTrackModel.prototype.getSrcIconUrl = function() {\n\t\t\tif (this.src === CONST.ORIGIN.YT) {\n\t\t\t\treturn \"/assets/images/icons/youtube-player-icon-24px.png\";\n\t\t\t}\n\t\t\tif (this.src === CONST.ORIGIN.SC) {\n\t\t\t\treturn \"/assets/images/icons/soundcloud-icon-24px.png\";\n\t\t\t}\n\t\t}\n\n\t\tTrackModel.prototype.setImportStatus = function(status) {\n\t\t\tthis.ui.importStatus = status;\n\t\t}\n\n\t\tTrackModel.prototype.getImportStatus = function() {\n\t\t\treturn this.ui.importStatus;\n\t\t}\n\n\t\treturn TrackModel;\n\n\t}", "async load(model) {\n setGlobal({ model });\n await model.load();\n }", "function load_model(index){\n if(index >= self.models.length){\n loaded.resolve();\n }else{\n var model = self.models[index];\n self.pos_widget.loading_message(_t('Loading')+' '+(model.label || model.model || ''), progress);\n var fields = typeof model.fields === 'function' ? model.fields(self,tmp) : model.fields;\n var domain = typeof model.domain === 'function' ? model.domain(self,tmp) : model.domain;\n var context = typeof model.context === 'function' ? model.context(self,tmp) : model.context;\n var ids = typeof model.ids === 'function' ? model.ids(self,tmp) : model.ids;\n progress += progress_step;\n\n if( model.model ){\n if (model.ids) {\n var records = new instance.web.Model(model.model).call('read',[ids,fields],context);\n } else {\n var records = new instance.web.Model(model.model).query(fields).filter(domain).context(context).all()\n }\n records.then(function(result){\n try{ // catching exceptions in model.loaded(...)\n\n result_filtered = []\n if(model.model == \"product.product\")\n {\n for(var i = 0; i < result.length; i++)\n {\n //Filtrando los productos que tengan stock >0, que no tengan una compañia\n //o que tengan una compañia asignada y coincida con la que tiene configurada el\n //punto de venta\n if(result[i].stock_qty > 0 && (result[i].company_id == false || (result[i].company_id != false && result[i].company_id[0] == self.config.company_id[0])))\n {\n result_filtered.push(result[i]);\n }\n }\n result = result_filtered;\n }\n\n $.when(model.loaded(self,result,tmp))\n .then(function(){ load_model(index + 1); },\n function(err){ loaded.reject(err); });\n }catch(err){\n loaded.reject(err);\n }\n },function(err){\n loaded.reject(err);\n });\n }else if( model.loaded ){\n try{ // catching exceptions in model.loaded(...)\n $.when(model.loaded(self,tmp))\n .then( function(){ load_model(index +1); },\n function(err){ loaded.reject(err); });\n }catch(err){\n loaded.reject(err);\n }\n }else{\n load_model(index + 1);\n }\n }\n }", "onSave() {\n log('saved');\n // Resolve the promise\n this.fulfillPromise('resolve', {model: this.view.model});\n\n // Destroy the view\n this.view.destroy();\n }", "save () { this.store.saveSync() }", "handleBeforeUnload() {\n StoryStore.saveSession()\n UpdatesStore.saveSession()\n }", "function newModel() {\r\n\tclearModel();\r\n}", "beforeModel() {\n \tthis._super(...arguments);\n this.replaceWith('trip');\n }", "componentWillMount() {\n let modelId = this.props.params.model;\n if (modelId.indexOf(MODEL_URL) != 0)\n return;\n \n modelId = modelId.slice(MODEL_URL.length);\n \n const {setCurrentModel} = this.props.modelsActions;\n const {models} = this.props;\n \n let model = models.currentModel;\n if (!model || modelId != model.nameId) {\n const newModel = getModelByNameId(modelId);\n if (newModel)\n setCurrentModel(newModel);\n }\n }", "model() {\n\t\tlet temp = [];\n\t\t\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Pain',\n\t\t\ttype: 2\n\t\t}));\n\t\t\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Dizziness',\n\t\t\ttype: 2\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Nausea',\n\t\t\ttype: 2\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Vomiting',\n\t\t\ttype: 1\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Loss of Appetite',\n\t\t\ttype: 1\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Hours of Sleep',\n\t\t\ttype: 3\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Muscle Cramps',\n\t\t\ttype: 1 //Florencio wanted something like a sliding scale after wards but\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Swollen Feet or Ankles',\n\t\t\ttype: 1\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Persisting Itching',\n\t\t\ttype: 1\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Chest Pain',\n\t\t\ttype: 1\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Shortness of Breath',\n\t\t\ttype: 1\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Temperature',\n\t\t\ttype: 3\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Pain over Insion region',\n\t\t\ttype: 1\n\t\t}));\n\n\t\ttemp.addObject(this.get('store').createRecord('symptom', {\n\t\t\tname: 'Blood Pressure',\n\t\t\ttype: 3\n\t\t}));\n\t\t\n\t\treturn temp;\n\t}", "loadForce () {\n // this.instance.sync({force: true})\n return this\n }", "addTrack(track){\r\n this.tracks.push(track);\r\n \r\n }", "function TrackService($log, $http, $q, userService, TrackModel) {\n\n\t\tvar TrackService = {};\n\t\tvar log = $log.getInstance('TrackService');\n\n\t\tvar API_TRACK_URL \t\t= '/api/track/',\n\t\t\tAPI_TRACKS_URL \t\t= '/api/tracks/',\n\t\t\tAPI_TAGS_URL\t\t= '/api/tags/';\n\n\t\t// POSTs the given TrackModel to the server\n\t\tTrackService.save = function(trackModel) {\n\t\t\tif (!trackModel) {\n\t\t\t\tlog.warn('save failed, trackModel=' + typeof trackModel);\n\t\t\t\treturn $q.reject('no data to save');\n\t\t\t}\n\n\t\t\tvar postData = extendWithUserData(trackModel);\n\t\t\tvar postUrl = API_TRACK_URL + userService.getCurrentUser().getUserId();\n\n\t\t\treturn $http.post(postUrl, postData)\n\t\t\t\t.then(function(response) {\t// response: data, status, headers, config\n\t\t\t\t\tlog.debug('saved track: ' + trackModel);\n\t\t\t\t\treturn new TrackModel(response.data);\n\t\t\t\t},\n\t\t\t\tfunction(response){\n\t\t\t\t\tlog.debug('error saving track: ' , response);\n\t\t\t\t\treturn response.data;\n\t\t\t\t});\n\t\t}\n\n\t\t// POSTs all the given TrackModels to the database. Expects an array of TrackModels.\n\t\t// Note: this is a batch operation\n\t\tTrackService.saveAll = function(trackModels) {\n\t\t\tif (!trackModels) {\n\t\t\t\tlog.warn('saveAll failed, trackModels=' + typeof trackModels);\n\t\t\t\treturn $q.reject('no data to save');\n\t\t\t}\n\n\t\t\tvar postData = trackModels.map(extendWithUserData)\n\t\t\tvar postUrl = API_TRACKS_URL + userService.getCurrentUser().getUserId();\n\n\t\t\tconsole.log('sending data ' + JSON.stringify(postData, null, 4));\n\n\t\t\treturn $http.post(postUrl, postData)\n\t\t\t\t.then(function(response) {\n\t\t\t\t\tlog.debug('imported ' + response.data.length + ' tracks' );\n\n\t\t\t\t\t// var trackModels = [];\n\t\t\t\t\t// angular.forEach(response.data, function(trackData, idx) {\n\t\t\t\t\t// \ttrackModels.push(new TrackModel(trackData));\n\t\t\t\t\t// })\n\n\t\t\t\t\t// return trackModels;\n\n\t\t\t\t\treturn response.data; // just return JSON for now, TrackModels not needed\n\t\t\t\t},\n\t\t \t\tfunction(response) {\n\t\t\t\t\tlog.error('could not import tracks: ' , response);\n\t\t\t\t\treturn response.data;\n\t\t \t\t});\n\t\t}\n\n\t\t// Get all the tracks of the current user\n\t\tTrackService.getAllTracks = function() {\n\t\t\tvar userId = userService.getCurrentUser().getUserId();\n\t\t\tlog.debug('getting library for user with id ' + userId);\n\n\t\t\treturn $http.get(API_TRACKS_URL).then(function(response) {\n\t\t\t\t\tlog.debug('got libary, tracks: ' + response.data.length);\n\n\t\t\t\t\tvar trackModels = [];\n\t\t\t\t\tangular.forEach(response.data, function(trackData, idx) {\n\t\t\t\t\t\ttrackModels.push(new TrackModel(trackData));\n\t\t\t\t\t})\n\t\t\t\t\treturn trackModels;\n\t\t\t\t},\n\t\t \t\tfunction(response) {\n\t\t\t\t\tlog.error('error getting library for user ' + userId);\n\t\t\t\t\treturn response.data;\n\t\t \t\t});\n\t\t}\n\n\t\tTrackService.update = function(trackModel, params) {\n\t\t\tvar url = API_TRACK_URL + trackModel.getId();\n\t\t\tvar data = JSON.stringify(params);\n\n\t\t\tlog.debug('updating track with ', params);\n\n\t\t\treturn $http.post(url, data).then(function(response) {\n\t\t\t\tlog.debug('got updated track: ', response.data);\n\t\t\t\treturn response.data;\n\t\t\t},\n\t \t\tfunction(response) {\n\t\t\t\tlog.error('error updating track', response);\n\t\t\t\treturn false;\n\t \t\t});\n\t\t}\n\n\t\t// Removes all the TrackModels from the database. Expects an array of TrackModels.\n\t\t// Note: unlike saveAll, this is not a batch operation\n\t\tTrackService.deleteAll = function(trackModels) {\n\t\t\tif (!trackModels) {\n\t\t\t\tlog.warn('deleteAll failed, trackModels=' + trackModels);\n\t\t\t\treturn $q.reject('no data to delete');\n\t\t\t}\n\n\t\t\tlog.debug('deleting ' + trackModels.length + ' tracks');\n\n\t\t\tfor (var i=0; i<trackModels.length; i++) {\n\t\t\t\tvar trackId = trackModels[i].getId();\n\n\t\t\t\tif (trackId != null) {\n\t\t\t\t\t$http.get(API_TRACK_URL + trackId)\n\t\t\t\t\t\t.then(function(response) {\n\t\t\t\t\t\t\tlog.debug(response.data);\n\t\t\t\t\t\t},\n\t\t\t\t \t\tfunction(response) {\n\t\t\t\t\t\t\tlog.error('error deleting track ' + trackId);\n\t\t\t\t \t\t});\n\n\t\t\t\t} else {\n\t\t\t\t\tlog.warn('could not delete track ' + trackModels[i].name + ': no _id found');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tTrackService.getTags = function() {\n\t\t\treturn $http.get(API_TAGS_URL).then(function(response) {\n\t\t\t\tlog.debug('got tags: ', response.data);\n\t\t\t\treturn response.data;\n\t\t\t}, function(response) {\n\t\t\t\tlog.error('error getting tags', response);\n\t\t\t});\n\t\t}\n\n\t\t// TODO: would be better as a server-side interceptor\n\t\tfunction extendWithUserData(data) {\n\t\t\tvar id = userService.getCurrentUser().getUserId();\n\t\t\tvar newData = angular.extend(data, { userId : id } );\n\n\t\t\treturn newData;\n\t\t}\n\n\t\treturn TrackService;\n\t}", "clear() {\n var models = this._models;\n this._models = [];\n\n for (var i = 0; i < models.length; i++) {\n var model = models[i];\n model.unloadRecord();\n }\n\n this._metadata = null;\n }", "unsyncUpdates(modelName) {\n socket.removeAllListeners(modelName + ':save');\n socket.removeAllListeners(modelName + ':remove');\n }", "unsyncUpdates(modelName) {\n socket.removeAllListeners(modelName + ':save');\n socket.removeAllListeners(modelName + ':remove');\n }", "function Model() {\n window.onhashchange = this.selectListItem.bind(this);\n this.currentTrackIndex = -1;\n this.trackList = null;\n\n this.listItemSelected = new Event(this);\n this.uriIncludesTrack = new Event(this);\n this.trackSelected = new Event(this);\n this.trackChanged = new Event(this);\n\n this.selectListItem();\n}", "function loadTrackData (Id) {\n var Modal = $('#modalEditTrack');\n var oMeta = F.requestAjax('/' + Id + '/meta');\n\n $.when(oMeta)\n .then(function (lo) {\n\n Modal.find('.panel-title').text('Edit Track [' + Id + ']');\n Modal.find('#id').val(lo.id);\n Modal.find('#filename').val(lo.filename);\n Modal.find('#path').val(lo.path);\n Modal.find('#title').val(lo.title);\n Modal.find('#album').val(lo.album);\n Modal.find('#track').val(lo.track);\n Modal.find('#year').val(lo.year);\n\n var elGenres = Modal.find('#track-genre');\n var elTags = Modal.find('#track-tags');\n var listGenres = lo.genre;\n var listTags = lo.tags;\n // console.log('listGenres = [', listGenres, ']');\n\n elGenres.tagsinput('removeAll');\n elGenres.tagsinput({\n maxTags: 5\n , maxChars: 15\n , trimValue: true\n , allowDuplicates: false\n });\n\n elTags.tagsinput('removeAll');\n elTags.tagsinput({\n maxTags: 5\n , maxChars: 15\n , trimValue: true\n , allowDuplicates: false\n });\n\n _.each(listGenres, function (tagGenre) {\n // console.info('tagGenre = ', tagGenre);\n elGenres.tagsinput('add', tagGenre);\n });\n\n _.each(listTags, function (tag) {\n elTags.tagsinput('add', tag);\n });\n\n // Modal.find('#track-tags')\n // .val(lo.tags)\n // .prop({'data-role': 'tagsinput'});\n\n Modal.find('#meta').text( JSON.stringify(lo) );\n });\n }", "addTrack(albumId, trackData) \n {\n /* Crea un track y lo agrega al album con id albumId.\n El objeto track creado debe tener (al menos):\n - una propiedad name (string),\n - una propiedad duration (number),\n - una propiedad genres (lista de strings)\n */\n const album = this.getAlbumById(albumId);\n if (album!= undefined && !(this.trackExists(trackData.name)) )\n {\n const track = new Track(trackData);\n track.id = this.idManager.getIdCancion();\n album.addTrack(track);\n this.tracks.push(track);\n console.log('Se agregó el track ', track.name);\n this.save('data.json')\n notificador.notificarElementoAgregado(track);\n return track\n }\n else\n {\n notificador.notificarError(ElementAlreadyExistsError)\n console.log(\"No se completó la operación, controle que la canción no haya sido ingresada anteriormente\");\n throw(ElementAlreadyExistsError) \n \n }\n \n }", "bubbleModelMutation() {\n const keys = this.keys(),\n len = keys.length;\n if (len <= 0) return;\n\n let obj = this;\n keys.forEach((key) => {\n const value = this._data[key];// same to obj._data[key];\n if (!value) return;\n\n const { type, Type } = this.getKeyDefinition(key);\n if (type === 'model') {\n let record = Type.findById(value.getId());\n if (record) {\n // use `$checked` to break circular relational records loop.\n if (record.$checked !== this._store.mutationId) {\n record.$checked = this._store.mutationId;\n const newValue = record.bubbleModelMutation();\n if (newValue) record = newValue;\n }\n }\n if (record !== value) { // record changed(deleted or updated)\n // next lines are equal to but faster than `this.set(key, record)`\n obj = obj.clone();\n obj.writeKeyValue(key, record);\n }\n } else if (type === 'map' || type === 'list') {\n const newValue = value.bubbleModelMutation();\n if (newValue) { // cloned and changed\n // next lines are equal to but faster than `this.set(key, newValue)`\n obj = obj.clone();\n obj.writeKeyValue(key, newValue);\n }\n }\n });\n\n if (obj === this) return null;\n return obj;\n }", "getTrackList() {\n this.firebaseRef = firebase.database().ref('tracks');\n\n if (this.props.type == 'recent') {\n this.firebaseRef\n .limitToLast(this.state.totalTracks)\n .once('value', (snapshot) => { this.addTracksToList(snapshot) }); \n }\n\n if (this.props.type == 'popular') {\n this.firebaseRef\n .orderByChild(\"likes\")\n .limitToLast(this.state.totalTracks)\n .once('value', (snapshot) => { this.addTracksToList(snapshot) }); \n }\n\n if (this.props.type == 'user') {\n var user = this.props.params.userId.split('-').join(' ');\n\n this.firebaseRef\n .orderByChild(\"user\")\n .equalTo(user)\n .limitToLast(this.state.totalTracks)\n .once('value', (snapshot) => { this.addTracksToList(snapshot) }); \n }\n\n if (this.props.type == 'artist') {\n var artist = this.props.params.artist.split('-').join(' ');\n\n this.firebaseRef\n .orderByChild('artist')\n .equalTo(artist)\n .once('value', (snapshot) => { this.addTracksToList(snapshot) }); \n }\n\n // Get all tracks saved locally\n if (this.props.type == 'saved') {\n this.setState({\n tracks: []\n });\n\n // Lookup all localstorage keys\n for ( var i = 0, len = localStorage.length; i < len; ++i ) {\n var key = localStorage.key(i),\n value = localStorage.getItem(key);\n\n if (value === 'true') {\n // Using the tracks Firebase key stored locally we pull it from\n // Firebase\n var trackRef = this.firebaseRef.child(key);\n\n trackRef.once('value', (snap) => {\n var item = snap.val();\n \n if (typeof item !== 'undefined' && item !== null) {\n item['.key'] = snap.key;\n\n item['localLiked'] = true;\n\n this.setState(function(oldState) {\n return oldState.tracks.push(item);\n });\n }\n });\n }\n }\n }\n }", "save() {\n this._mutateModel();\n\n this._super(...arguments);\n }", "model() {\n return this.store.findAll('project'); // Makes fetch request for us\n }", "static associate (models) {\n // define association here\n this.belongsToMany(models.track, {\n through: 'tagtracks',\n foreignKey: 'hashtagId',\n otherKey: 'trackId'\n });\n }", "async remove() {\n // Call internally stored DB API to remove all models matching self query\n await this._db.remove(this._Model, this);\n }", "deleteTrack(artistName, albumName, trackName){\n let artistFromTheTrack = this.getArtistByName(artistName);\n let albumFromTheArtist = this.getAlbumInArtist(artistFromTheTrack, albumName);\n let trackToDelete = this.deleteTrackFromAlbum(albumFromTheArtist, trackName);\n this.deleteTrackFromPlaylists(trackToDelete);\n this.notificationObserver.update(this);\n trackToDelete = null;\n }", "getTrackById(id){\r\n return this.getTracks().find((track) => track.id === id);\r\n }", "getModels(){\n return {\n bulletin: store.getBulletins()\n }\n }", "static associate(models) {\n this.belongsTo(models.Profile, {\n foreignKey: \"id_profile\",\n onDelete: \"CASCADE\"\n })\n this.belongsTo(models.Image, {\n foreignKey: \"id_image\",\n onDelete: \"CASCADE\"\n })\n this.hasMany(models.Rating, {\n foreignKey: \"id_post\",\n onDelete: \"CASCADE\"\n });\n this.hasMany(models.Comment, {\n foreignKey: \"id_post\",\n onDelete: \"CASCADE\"\n });\n this.belongsToMany(models.Tag, {\n through: {\n model: models.Tagasso,\n },\n foreignKey: \"id_post\",\n hooks: true,\n })\n\n this.addHook(\"beforeDestroy\", async (instance, options) => {\n await instance.getTags().then((tags) => {\n tags.forEach((tag) => { setTimeout(() => tag.updateCount(), 2000) })\n })\n })\n }", "addTrack(track) {\n/* if (!this.state.playlistTracks.includes(track)) { // Step 41\n this.setState({playlistTracks: this.state.playlistTracks.splice(this.state.playlistTracks.count,0,track.id)}); //add a track at the end of the playlist\n*/\n if (this.state.playlistTracks.indexOf(track) === -1) {\n const newPlayList = this.state.playlistTracks;\n newPlayList.push(track);\n this.setState({playListTracks: newPlayList})\n // this.setState({playlistTracks: this.state.playlistTracks.push(track)});\n }\n }", "function updateTime() {\n console.log(\"updateTime()\");\n store.timeModel.update();\n}", "updateObject(data) {\n super.updateObject(data);\n\n if (data.filterData && !isEqual(this.filterData, data.filterData)) {\n this.setFilterData(data.filterData);\n Signals.elementChanged.dispatch();\n }\n\n if (data.trackingURL && this.trackingURL !== data.trackingURL) {\n this.setTrackingURL(data.trackingURL);\n Signals.elementChanged.dispatch();\n }\n\n if (data.utmData && !isEqual(this.utmData, data.utmData)) {\n this.setUTMData(data.utmData);\n Signals.elementChanged.dispatch();\n }\n\n if (data.texturePath && !isEqual(this.texturePath, data.texturePath)) {\n this.setTexturePath(data.texturePath);\n }\n }", "setPlayList(track){\n //Store both lists to make changes (change +- and add or remove track from playlist)\n let statePlayList = this.state.playList;\n let stateTrackList = this.state.trackList;\n //Get index to change the + and -\n const trackIndexPlayList = this.addOrRemove(track.id, statePlayList);\n const trackIndexTrackList = this.addOrRemove(track.id, stateTrackList);\n // Is in PlayList, let's remove it\n if(trackIndexPlayList > -1 ){\n statePlayList.splice(trackIndexPlayList,1);\n this.setState({playList: statePlayList});\n // Additional check if remove after a new search. TrackList doest not need an update\n if(trackIndexTrackList > -1 ){\n stateTrackList[trackIndexTrackList].addRemove = '+';\n this.setState({trackList: stateTrackList});\n }\n } else {\n // Is not in PlayList, let's add it\n statePlayList.push(track);\n stateTrackList[trackIndexTrackList].addRemove = '-';\n this.setState({trackList: stateTrackList,playList: statePlayList});\n }\n }", "model(params) {\n return this.get('store').findRecord('geokret', params.geokret_id, {\n // include: 'owner',\n include: 'owner,type,moves,moves.author,moves.type',\n // limit: 1,\n // sort: '-created-on-date-time,news-comments.created-on-date-time'\n });\n }", "addTrack(track) {\n let playlistTracks = this.state.playlistTracks;\n if (playlistTracks.find(savedTrack => savedTrack.id === track.id)) {\n return;\n }\n playlistTracks.unshift(track);\n this.setState({ playlistTracks: playlistTracks });\n }", "get models() {\n return this._models;\n }", "refreshModel() {\n this.refresh();\n }", "saveAndClose() {\n this._mutateModel();\n\n this._super(...arguments);\n }", "onSave() {\n this.repository.sync(this.discounts, this.context);\n }", "toggleSaveRecord() {\n\t\tvar libraryItem = {\n\t\t\tid: this.state.data.id,\n\t\t\ttitle: this.state.data.title,\n\t\t\tplace: this.state.data.places && this.state.data.places.length > 0 ? this.state.data.places[0].name : null\n\t\t};\n\n\t\tif (!localLibrary.find(libraryItem)) {\n\t\t\tlocalLibrary.add(libraryItem);\n\t\t\tthis.setState({\n\t\t\t\tsaved: true\n\t\t\t});\n\n\t\t\tif (window.eventBus) {\n\t\t\t\twindow.eventBus.dispatch('popup-notification.notify', null, '<strong>'+this.state.data.title+'</strong> '+l('har sparats till dina sägner')+'.');\n\t\t\t}\n\n\t\t}\n\t\telse {\n\t\t\tlocalLibrary.remove(libraryItem);\n\t\t\tthis.setState({\n\t\t\t\tsaved: false\n\t\t\t});\n\t\t}\n\t}", "acceptChanges() {\n const me = this; // Clear record change tracking\n\n me.added.forEach(r => r.clearChanges(false));\n me.modified.forEach(r => r.clearChanges(false)); // Clear store change tracking\n\n me.added.clear();\n me.modified.clear();\n me.removed.clear();\n }", "function setModel (model) {\n assert.equal(typeof model, 'object', 'barracks.store.model: model should be an object')\n models.push(model)\n }", "function setModel (model) {\n assert.equal(typeof model, 'object', 'barracks.store.model: model should be an object')\n models.push(model)\n }", "flush () {\n const changes = this.model.flush()\n const computedsAboutToBecomeDirty = this.strictRender ? computedDependencyStore.getStrictUniqueEntities(changes) : computedDependencyStore.getUniqueEntities(changes)\n\n computedsAboutToBecomeDirty.forEach((computed) => {\n computed.flag()\n })\n this.emit('flush', changes)\n }", "addTrack(track) {\n const alreadyInPlaylist = this.state.playlistTracks.some((el) => {\n return el.id === track.id;\n });\n if (!alreadyInPlaylist) {\n const newPlaylist = this.state.playlistTracks.concat(track);\n this.setState({ playlistTracks : newPlaylist });\n }\n }", "removeTrack(track) {\n // Remove the track instance from the playlistTracks array by filtering the ID.\n let trackList = this.state.playlistTracks.filter(playlistTrack => {\n return playlistTrack.id !== track.id;\n })\n this.setState({playlistTracks: trackList});\n }", "function handleUpdateEvent(model) {\n\t\t\tvar matches = this.matchesQuery(model);\n\t\t\tvar existsInCollection = this.in(model);\n\n\t\t\tif (!existsInCollection && matches) {\n\t\t\t\tthis.addModel(model, true);\n\t\t\t} else if (existsInCollection && !matches) {\n\t\t\t\tthis.removeModel(model);\n\t\t\t}\n\t\t}", "function vxlModelManager(){\r\n\tthis.toLoad = []; \r\n\tthis.models = [];\r\n\t\r\n\tvar e = vxl.events;\r\n\tvxl.go.notifier.publish([\r\n\t e.MODELS_LOADING,\r\n\t e.MODEL_NEW,\r\n\t e.MODELS_LOADED\r\n\t ],this);\r\n\tvxl.go.notifier.subscribe(e.READER_DONE, this);\r\n}", "function vxlModelManager(){\r\n\tthis.toLoad = []; \r\n\tthis.models = [];\r\n\t\r\n\tvar e = vxl.events;\r\n\tvxl.go.notifier.publish([\r\n\t e.MODELS_LOADING,\r\n\t e.MODEL_NEW,\r\n\t e.MODELS_LOADED\r\n\t ],this);\r\n\tvxl.go.notifier.subscribe(e.READER_DONE, this);\r\n}", "componentWillUnmount() {\n this.props.model.removeObserver(this)\n }", "componentWillUnmount() {\n this.props.model.removeObserver(this)\n }", "function Home() {\n //Redux state vars\n // const dispatch = useDispatch();\n // const { reloadFetch } = useSelector((state) => state.trackReducer);\n // const { reloadPlaylistFetch } = useSelector((state) => state.playlistReducer);\n\n //State vars for Tracks\n // const [lastUploadedTracks, setlastUploadedTracks] = useState([]);\n // const [mostPlayedTracks, setMostPlayedTracks] = useState([]);\n // const [mostLikedTracks, setMostLikedTracks] = useState([]);\n\n //State vars for Playlists\n // const [mostLikedPlaylists, setMostLikedPlaylists] = useState([]);\n // const [lastUploadedPlaylists, setlastUploadedPlaylists] = useState([]);\n\n // const [tracksLoaded, setTracksLoaded] = useState(false);\n\n // useEffect(() => {\n // if (reloadFetch) {\n // // Load last uploaded tracks\n // getAllTracks().then((response) => {\n // setlastUploadedTracks([]);\n // setlastUploadedTracks(response.data.tracks.slice(0, 6));\n // });\n\n // // Load most played tracks\n // getMostPlayedTracks().then((response) => {\n // setMostPlayedTracks([]);\n // setMostPlayedTracks(response.data.tracks.slice(0, 5));\n // });\n\n // // Load most liked tracks\n // getMostLikedTracks().then((response) => {\n // setMostLikedTracks([]);\n // setMostLikedTracks(response.data.tracks);\n // });\n // dispatch(reloadFetchAction(false));\n // }\n // // eslint-disable-next-line\n // }, [reloadFetch]);\n\n // useEffect(() => {\n // if (reloadPlaylistFetch) {\n //Load most liked playlists\n // getMostLikedPlaylists().then((response) => {\n // setMostLikedPlaylists([]);\n // setMostLikedPlaylists(response.data.playlists);\n // });\n\n //Load last uploaded playlists\n // getLastUploadedPlaylists().then((response) => {\n // setlastUploadedPlaylists([]);\n // setlastUploadedPlaylists(response.data.playlists);\n // });\n // dispatch(reloadPlaylistFetchAction(false));\n // }\n // eslint-disable-next-line\n // }, [reloadPlaylistFetch]);\n\n useEffect(() => {\n // return () => {\n // dispatch(reloadFetchAction(true));\n // dispatch(reloadPlaylistFetchAction(true));\n // };\n // eslint-disable-next-line\n }, []);\n\n return (\n <>\n <main>\n <Container>\n <Row>\n <Col sm xs={12} md={12} lg={6}>\n <h1>Trending:</h1>\n <div className=\"home-top-col\">\n {/* {mostPlayedTracks.map((track, index) => {\n return (\n <Track dataTrack={track} key={track ? track._id : index} />\n );\n })} */}\n </div>\n </Col>\n <Col sm xs={12} md={12} lg={6}>\n <h1>Trending:</h1>\n <div className=\"home-top-col\">\n {/* {mostPlayedTracks.map((track, index) => {\n return (\n <Track dataTrack={track} key={track ? track._id : index} />\n );\n })} */}\n </div>\n </Col>\n </Row>\n </Container>\n\n <div className=\"xl-separator\" />\n\n <Container>\n <h1>Recommended Tracks:</h1>\n {/* <ScrollContainer className=\"scroll-container\"> */}\n <Row className=\"scroll-wrapper-tracks\">\n {/* {mostLikedTracks.map((track, index) => {\n return (\n <Col key={track ? track._id : index}>\n <BlockTrack dataTrack={track} size=\"small\" />\n </Col>\n );\n })} */}\n </Row>\n {/* </ScrollContainer> */}\n </Container>\n\n <div className=\"xl-separator\" />\n\n <Container>\n <h1>Last Uploaded Tracks:</h1>\n <Row sm xs={4} md={4} lg={2}>\n {/* {lastUploadedTracks.map((track, index) => {\n return (\n <Col sm xs={2} md={4} lg={2} key={track ? track._id : index}>\n <BlockTrack dataTrack={track} size=\"big\" />\n </Col>\n );\n })} */}\n </Row>\n </Container>\n\n <div className=\"xl-separator\" />\n\n <Container>\n <h1>Popular playlists:</h1>\n <Row sm xs={4} md={4} lg={2}>\n {/* {mostLikedPlaylists.map((playlist, index) => {\n return (\n <Col\n sm\n xs={2}\n md={4}\n lg={2}\n key={playlist ? playlist._id : index}\n >\n <BlockPlaylist playlistData={playlist} size=\"big\" />\n </Col>\n );\n })} */}\n </Row>\n </Container>\n\n <div className=\"xl-separator\" />\n\n <Container>\n <h1>Last Uploaded Playlists:</h1>\n {/* <ScrollContainer className=\"scroll-container\">\n <Row className=\"scroll-wrapper-tracks\">\n {lastUploadedPlaylists.map((playlist, index) => {\n return (\n <Col key={playlist ? playlist._id : index}>\n <BlockPlaylist playlistData={playlist} size=\"small\" />\n </Col>\n );\n })}\n </Row>\n </ScrollContainer> */}\n </Container>\n </main>\n </>\n );\n}", "removeTrack(track) {\n const newPlaylist = this.state.playlistTracks.filter((el) => {\n return el.id !== track.id;\n })\n this.setState({ playlistTracks : newPlaylist });\n }", "addTracksToList(snapshot) {\n let items = [];\n\n snapshot.forEach((childSnapshot) => {\n let item = childSnapshot.val();\n let key = childSnapshot.key;\n \n if (typeof item !== 'undefined' && item !== null) {\n item['.key'] = key;\n item['localLiked'] = localStorage.getItem(key) ? true : false;\n items.push(item);\n }\n\n });\n\n // Reverse the list so items are in decending order\n items.reverse();\n\n this.setState((prevState) => ({\n tracks: items\n }));\n }", "addTrack(track) {\n let tracks = this.state.playlistTracks;\n if(tracks.find( savedTrack => \n savedTrack.id === track.id)) {\n return;\n } \n\n tracks.push(track);\n this.setState({ playlistTracks: tracks });\n }", "removeTrack(track) {\n this.setState({\n playlistTracks: this.state.playlistTracks.filter(\n playlistTrack => playlistTrack.id !== track.id)\n });\n }", "getTracks(){\r\n return this.tracks;\r\n }", "removeAll(silent) {\n const me = this,\n storage = me.storage;\n\n // No reaction to the storage Collection's change event.\n if (silent) {\n storage.suspendEvents();\n\n // If silent, the storage Collection won't fire the event we react to\n // to unjoin, and we allow the removing flag in remove() to be true,\n // so *it* will not do the unJoin, so if silent, so do it here.\n const allRecords = Object.values(me.idRegister);\n\n for (let i = allRecords.length - 1, rec; i >= 0; i--) {\n rec = allRecords[i];\n if (rec && !rec.isDestroyed) {\n rec.unJoinStore(me);\n }\n }\n }\n\n me.clear();\n\n if (silent) {\n storage.resumeEvents();\n }\n }", "addTrack(track) {\n if (!this.state.playlistTracks.find(playlistTrack => playlistTrack.id === track.id)) {\n this.setState(prevState => ({\n playlistTracks: [...prevState.playlistTracks, track]\n }));\n }\n }", "suspendChangesTracking() {\n this.crudIgnoreUpdates++;\n }", "addTracks() {\n let { playlistId, tracks } = this.state;\n spotifyApi.addTracksToPlaylist(playlistId, tracks);\n }", "constructor(model) {\n this.model = model;\n this.allModelsLoaded = false;\n }", "removeAll(silent) {\n const stm = this.stm;\n\n if (stm && !stm.disabled) {\n // Here we are to detect if anything has been removed\n // the only way is to check if store has anything before removing all\n // and has nothing after.\n const allRecords = this.allRecords.slice(0);\n\n super.removeAll(silent);\n\n // The trick here is to destinguis tree and flat case\n // For the flat case it's simple we just store all records\n // For the tree we are to store root node children only\n // Upon restoring store.add() will do the right thing for the flat case and tree case regardless.\n if (allRecords.length && this.count === 0) {\n stm.onStoreRemoveAll(this, this.tree ? allRecords[0].children : allRecords, silent);\n }\n } else {\n super.removeAll(silent);\n }\n }", "static associate(models) {\n this.belongsTo(models.User, {\n foreignKey: 'userId',\n });\n this.belongsTo(models.Property, {\n foreignKey: 'propertyId',\n });\n this.hasMany(models.ReportComment, {\n as: 'receivedCommentReports',\n foreignKey: 'commentId',\n onDelete: 'CASCADE',\n hooks: true,\n });\n }", "update(model: DetailModel) {\n const clonedModel = this.clone();\n\n clonedModel.attributeCollection = model._attributeCollection;\n clonedModel.metadataCollection = model._metadataCollection;\n clonedModel.actionCollection = model._actionCollection;\n\n return clonedModel;\n }", "suspendChangesTracking() {\n this.crudIgnoreUpdates++;\n }", "sendMusic (state,obj){\n state.tracks.tracks=[obj];\n }", "initRelations(reset) {\n const me = this,\n relations = me.modelClass.relations;\n\n if (reset && me.modelRelations) {\n // reset will reinit all relations, stop listening for store events on existing ones\n me.modelRelations.forEach(relation => {\n relation.storeDetacher && relation.storeDetacher();\n });\n }\n\n if ((!me.modelRelations || me.modelRelations.length === 0 || reset) && relations) {\n me.modelRelations = []; // foreignKeys is filled when model exposes its properties\n\n relations && relations.forEach(modelRelationConfig => {\n const config = Object.assign({}, modelRelationConfig),\n relatedStore = typeof config.store === 'string' ? me[config.store] : config.store;\n config.dependentStore = me;\n me.modelRelations.push(config);\n\n if (relatedStore) {\n config.storeProperty = config.store;\n config.store = relatedStore; // repeated from initRelationStores, needed if stored is assigned late\n\n const dependentStoreConfigs = relatedStore.dependentStoreConfigs; // Add link to dependent store\n\n if (dependentStoreConfigs.has(me)) {\n const dependentConfigs = dependentStoreConfigs.get(me); // Remove existing config on reset\n\n if (reset) {\n const existingConfig = dependentConfigs.find(c => c.relationName === config.relationName);\n\n if (existingConfig) {\n ArrayHelper.remove(dependentConfigs, existingConfig);\n }\n }\n\n dependentConfigs.push(config);\n } else {\n dependentStoreConfigs.set(me, [config]);\n } // if foreign key specifies collectionName the related store should also be configured\n\n if (config.collectionName) {\n relatedStore.initRelationCollection(config, me);\n }\n\n if (relatedStore.count > 0) {\n relatedStore.updateDependentStores('dataset', relatedStore.records);\n }\n }\n });\n }\n }", "addTrack(track)\n {if (this.state.playlistTracks.find(savedTrack =>\n savedTrack.id === track.id)) {return;}\n else { this.state.playlistTracks.push(track) };\n let playlistTracks = this.state.playlistTracks;\n this.setState({playlistTracks:playlistTracks});\n}", "saveChanges () {\n this.products = this.products.filter((x) => x.name !== '' && x.price !== '')\n this.$store.dispatch('menuStore/saveNewItem', this.products)\n this.$router.push({ path: '/' })\n }", "async toStorage(): Promise<{}> {\n return this.getModel().toStorage();\n }\n\n /**\n * Validates current entity and throws exception that contains all invalid attributes.\n */\n async validate(): Promise<void> {\n await this.emit(\"beforeValidate\");\n await this.getModel().validate();\n await this.emit(\"afterValidate\");\n }\n\n /**\n * Used to populate entity with given data.\n */\n populate(data: Object): this {\n this.getModel().populate(data);\n return this;\n }\n\n /**\n * Used when populating entity with data from storage.\n * @param data\n */\n populateFromStorage(data: Object): Entity {\n this.getModel().populateFromStorage(data);\n return this;\n }\n\n /**\n * Returns class name.\n */\n getClassName(): string {\n return this.constructor.name;\n }\n\n /**\n * Returns class name.\n */\n static getClassName(): string {\n return this.name;\n }\n\n /**\n * Tells us whether a given ID is valid or not.\n * @param id\n * @param params\n */\n isId(id: mixed, params: Object = {}): boolean {\n return this.getDriver().isId(this, id, _.cloneDeep(params));\n }\n\n /**\n * Tells us whether a given ID is valid or not.\n * @param id\n * @param params\n */\n static isId(id: mixed, params: Object = {}): boolean {\n return this.getDriver().isId(this, id, _.cloneDeep(params));\n }\n\n /**\n * Saves current and all linked entities (if autoSave on the attribute was enabled).\n * @param params\n */\n async save(params: ?Object): Promise<void> {\n if (!params) {\n params = {};\n }\n const events = params.events || {};\n const existing = this.isExisting();\n\n if (this.processing) {\n return;\n }\n\n this.processing = \"save\";\n\n if (existing) {\n events.beforeUpdate !== false && (await this.emit(\"beforeUpdate\", { params }));\n } else {\n events.beforeCreate !== false && (await this.emit(\"beforeCreate\", { params }));\n }", "componentWillUnmount() {\n this.props.model.removeObserver(this);\n }", "componentWillUnmount() {\n this.props.model.removeObserver(this);\n }", "componentWillUnmount() {\n this.props.model.removeObserver(this);\n }", "deleteTrackFromPlaylists(track){\n let playlistsWithTrack = this.playlists.filter((pl)=> pl.tracks.includes(track));\n playlistsWithTrack.forEach((pl)=>pl.tracks.splice(pl.tracks.indexOf(track), 1));\n }", "function mashlistChangeTrack() {\n var $_mashlist = $('.mashlist[data-playing=\"1\"]');\n models.player.load(['context', 'playing', 'track']).done(function (player) {\n if (player.playing && player.context.uri == $_mashlist.attr('data-uri')) {\n models.Playlist.fromURI(playHistory).load(['tracks']).done(function (history) {\n history.tracks.add(player.track);\n listHistory.refresh();\n $('.sp-list-item').on('dblclick', function (e) {\n e.stopImmediatePropagation();\n });\n });\n }\n });\n }", "resetDbData() {\n this.log('RESETTING DB AND UPDATED AT TIMESTAMP');\n\n let settings = this.app.state.settings;\n settings.updated_at = 0;\n settings.languagesInfo = [];\n this.app.setState({settings: settings, totalSongsCached: 0});\n let thisSyncTool = this;\n\n this.db.delete().then(() => {\n thisSyncTool.db = new Dexie(\"songbaseDB\");\n thisSyncTool.defineSchema();\n thisSyncTool.fetchDataFromAPI();\n });\n }", "removeModel (model) {\n\n if(this.modelCollection[model.modelId]){\n\n delete this.modelCollection[model.modelId]\n }\n }", "setCollection(model, name, records) {\n const {\n config,\n store\n } = this.collectionStores[name];\n if (!store.relationCache[config.relationName]) store.relationCache[config.relationName] = {};\n const old = (store.relationCache[config.relationName][model.id] || []).slice(),\n added = [],\n removed = [];\n store.suspendEvents(); // Remove any related records not in the new collection\n\n old.forEach(record => {\n if (!records.includes(record)) {\n record[config.fieldName] = null;\n store.remove(record);\n removed.push(record);\n }\n }); // Add records from the new collection not already in store\n\n records.forEach(record => {\n if (record instanceof Model) {\n if (!record.stores.includes(store)) {\n store.add(record);\n added.push(record);\n }\n } else {\n [record] = store.add(record);\n added.push(record);\n } // Init relation\n\n record[config.fieldName] = model.id;\n });\n store.resumeEvents();\n\n if (removed.length) {\n store.trigger('remove', {\n records: removed\n });\n store.trigger('change', {\n action: 'remove',\n records: removed\n });\n }\n\n if (added.length) {\n store.trigger('add', {\n records: added\n });\n store.trigger('change', {\n action: 'add',\n records: added\n });\n }\n }", "fetchTracks(latLngBounds) {\n var west = latLngBounds.getWest();\n var south = latLngBounds.getSouth();\n var east = latLngBounds.getEast();\n var north = latLngBounds.getNorth();\n fetch(baseUrl + 'api/search/' + west + '/' + south + '/' + east + '/' + north)\n .then(response => response.json())\n .then(trackids => {\n trackids.forEach((key) => {\n console.log(key);\n // fetch the track only if it's not fetched yet\n if (!this.tracks.has(key)) {\n fetch(baseUrl + 'api/SchweizMobil/Track/' + key)\n .then(response => response.json())\n .then(json => {\n var track = JSON.parse(json[0].value);\n var trackLayer = L.geoJSON(track)\n this.tracks.set(key, trackLayer);\n trackLayer.addTo(this.map);\n })\n .catch(error => console.log(error))\n }\n })\n })\n .catch(error => console.log(error))\n }", "function handleSave(){\n props.onAdd(qItems);\n props.toggle(); \n }", "removeTrack(track) {\n let tracks = this.state.playlistTracks;\n tracks = tracks.filter((currentTrack) => currentTrack.id !== track.id);\n this.setState({ playlistTracks: tracks });\n }", "async load(include) {\n const { Activity, Dining, Hotel } = this.dao;\n const query = ResortModel.buildQuery(this.dao, { where: { [this.idKey]: this.id } }, false);\n // check to see if we are including different associations\n if (include) {\n // include.forEach(i => {\n // if (i === GetTypes.Activities) {\n // queryInclude.push({\n // attributes: RAW_ACTIVITIES_ATTRIBUTES,\n // include: [{\n // attributes: ['name'],\n // model: Area\n // }],\n // model: Activity\n // });\n // }\n // });\n }\n if (this.instance) {\n await this.instance.reload(query);\n }\n else {\n this.instance = await Hotel.findOne(query);\n }\n if (!this.instance) {\n // let the caller handle not found\n this.instance = null;\n return false;\n }\n // lets reset the id to the internal one\n this.id = this.instance.get('id');\n // We need to handle counts separately, there is currently a bug with sequelize\n // where you cannot make multiple counts in a single fetch\n const activityCount = await Activity.count({ where: { locationId: this.instance.get('locationId') } });\n const diningCount = await Dining.count({ where: { locationId: this.instance.get('locationId') } });\n this.counts = { activity: activityCount, dining: diningCount };\n return true;\n }", "deleteToolSaves() {\n // console.log(\"deleteToolSaves()\");\n return store.delete('CURRENT_TOOL_SAVES_LIST');\n }", "synchronizeViewFromModel() {\n }", "static load (store) {\n if (!chrome.devtools) {\n _.each(['UserLevel', 'SwordLevel', 'Sword', 'Equip', 'Consumable', 'FieldSquare', \"Event\", \"EventLayer\", \"EventSquare\"], k => {\n store.commit('loadData', {\n key: k,\n loaded: true\n })\n })\n }\n return Promise.props({\n UserLevel: localforage.getItem('UserLevelMaster'),\n SwordLevel: localforage.getItem('SwordLevelMaster'),\n Sword: localforage.getItem('SwordMaster'),\n Equip: localforage.getItem('EquipMaster'),\n Consumable: localforage.getItem('ConsumableMaster'),\n FieldSquare: localforage.getItem('FieldSquareMaster'),\n Event: localforage.getItem('EventMaster'),\n EventLayer: localforage.getItem('EventLayerMaster'),\n EventSquare: localforage.getItem('EventSquareMaster')\n }).then((saved) => {\n console.log('loadLocal')\n _.each(saved, (v, k) => {\n TRHMasterData[k] = v\n console.log(TRHMasterData[k])\n store.commit('loadData', {\n key: k,\n loaded: !_.isNull(v)\n })\n })\n })\n }", "function updateGraphFromCurrentModel(){\n // console.log('updateGraphFromCurrentModel');\n var model=app.models[app.currentScope];\n // latency\n if (app.currentScope===0){\n var latency= new Date()-model.data[model.data.length-1][0];\n latency=(latency/1000).toFixed(2);\n $('#home .latency').text(latency+'s');\n } else {\n $('#home .latency').text('');\n }\n \n var opts = $.extend({}, { \n labels:model.labels,\n file: model.data ,\n colors: model.colors ,\n stackedGraph: true,\n includeZero: false\n },model.options);\n app.graph.updateOptions( opts );\n\n // NON-Standard: Invoke updateRaw\n updateRaw();\n}", "addTrack(track) {\n let tracks = this.state.playlistTracks;\n if (tracks.find((currentTrack) => currentTrack.id === track.id)) {\n return;\n }\n tracks.push(track);\n this.setState({ playlistTracks: tracks });\n }", "componentDidMount() {\n\t\tvar me = this;\n\t\tItemStore.on(\"retrieveSubitem\", (model) => {\n\n\t\t\tvar fields = [];\n\t\t\tif(!model.data.deleted){\n\t\t\t\tif(model.data.fieldSubItem != null){\n\n\n\t\t\t\t\tfor (var i in model.data.fieldSubItem) {\n\t\t\t\t\t\tvar subitem=model.data.fieldSubItem[i]\n\n\t\t\t\t\t\tif(!subitem.deleted){\n\t\t\t\t\t\t\tfields.push({\n\t\t\t\t\t\t\t\tname: subitem.name+\"-\"+(i),\n\t\t\t\t\t\t\t\tvalue: subitem.name,\n\t\t\t\t\t\t\t\tlabel: subitem.name,\n\t\t\t\t\t\t\t\tdescription:subitem.description,\n\t\t\t\t\t\t\t\tisText: subitem.isText,\n\t\t\t\t\t\t\t\ttype: subitem.isText ? AttributeTypes.TEXT_AREA_FIELD : AttributeTypes.ATTACHMENT_FIELD,\n\t\t\t\t\t\t\t\tedit: false\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tme.setState({\n\t\t\t\t\tsubitemModel: model,\n\t\t\t\t\tvizualization: true,\n\t\t\t\t\ttitle: model.data.name,\n\t\t\t\t\tfields: fields,\n\t\t\t\t\tloading: this.state.itemModel == null\n\t\t\t\t});\n\t\t\t\tme.forceUpdate();\n\t\t\t\t_.defer(() => {this.context.tabPanel.addTab(this.props.location.pathname, model.data.name);});\n\t\t\t}\n\t\t}, me);\n\n\t\tItemStore.on(\"subitemUpdated\", (model) => {\n\t\t\tif(model !=null){\n\t\t\t\tvar mod = this.state.subitemModel;\n\t\t\t\tmod.data.name = model.data.name;\n\t\t\t\tmod.data.description = model.data.description;\n\t\t\t\tmod.data.policy = model.data.policy;\n\n\t\t\t\tfor (var i in model.data) {\n\t\t\t\t\tif(!model.data[i].deleted){\n\t\t\t\t\t\tvar fields = [];\n\n\t\t\t\t\t\tfields.push({\n\t\t\t\t\t\t\tname: model.data[i].name,\n\t\t\t\t\t\t\tdescription: model.data[i].description,\n\t\t\t\t\t\t\tisText: model.data[i].isText,\n\t\t\t\t\t\t\ttype: model.data[i].isText? AttributeTypes.TEXT_AREA_FIELD : AttributeTypes.ATTACHMENT_FIELD,\n\t\t\t\t\t\t\tvalue: model.data[i].description,\n\t\t\t\t\t\t\tlabel: model.data[i].name,\n\t\t\t\t\t\t\tedit: false\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tme.setState({\n\t\t\t\t\t//fields: fields,\n\t\t\t\t\tsubitemModel: mod,\n\t\t\t\t\ttitle: model.data.name,\n\t\t\t\t\tvizualization: true,\n\t\t\t\t\tfields: me.getInfo()\n\t\t\t\t});\n\t\t\t\tme.forceUpdate();\n\n\t\t\t\tme.context.toastr.addAlertSuccess(Messages.get(\"label.successUpdatedItem\"));\n\t\t\t\t//this.context.router.push(\"/forrisco/policy/\"+this.state.policyModel.attributes.id+\"/item/\"+model.data.id);\n\n\t\t\t}else{\n\t\t\t\tme.context.toastr.addAlertError(Messages.get(\"label.errorUpdatedItem\"));\n\t\t\t}\n\t\t}, me);\n\n\t\tItemStore.on(\"retrieveItem\", (model) => {\n\t\t\tif(!model.attributes.deleted){\n\t\t\t\tme.setState({\n\t\t\t\t\titemModel: model,\n\t\t\t\t\tloading: false //this.state.subitemModel == null\n\t\t\t\t});\n\n\t\t\t}else{\n\t\t\t\tme.setState({\n\t\t\t\t\titemModel: null,\n\t\t\t\t});\n\t\t\t}\n\t\t}, me);\n\n\n\t\tItemStore.on(\"newSubItem\", (itemModel) => {\n\t\t\tif (this.state.fields.length === 0) {\n\t\t\t\tthis.context.router.push(\"/forrisco/policy/\"+this.props.params.policyId+\"/item/\"+this.state.itemModel.attributes.id+\"/subitem/\"+itemModel.data.id);\n\t\t\t} else {\n\t\t\t\tthis.state.fields.map((fieldsubitem, index) => {\n\t\t\t\t\tItemStore.dispatch({\n\t\t\t\t\t\taction: ItemStore.ACTION_CREATE_SUBFIELD,\n\t\t\t\t\t\tdata:{\n\t\t\t\t\t\t\tsubitem: itemModel.data,\n\t\t\t\t\t\t\tname: fieldsubitem.value,\n\t\t\t\t\t\t\tisText: fieldsubitem.type == AttributeTypes.TEXT_AREA_FIELD ? true : false,\n\t\t\t\t\t\t\tdescription: fieldsubitem.description,\n\t\t\t\t\t\t\tfileLink: fieldsubitem.fileLink\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t\t\t\tItemStore.on(\"itemField\", fieldModel => {\n\t\t\t\t\tthis.context.router.push(\"/forrisco/policy/\"+this.props.params.policyId+\"/item/\"+this.state.itemModel.attributes.id+\"/subitem/\"+itemModel.data.id);\n\t\t\t\t});\n\t\t\t}\n\t\t}, me);\n\n\t\tItemStore.on(\"subitemDeleted\", (model) => {\n\t\t\tthis.context.router.push(\"forrisco/policy/\"+this.props.params.policyId+\"/item/\"+this.state.itemModel.attributes.id);\n\t\t})\n\n\t\tme.refreshData(me.props, me.context);\n\t}", "setCollection(model, name, records) {\n const { config, store } = this.collectionStores[name];\n\n if (!store.relationCache[config.relationName]) store.relationCache[config.relationName] = {};\n\n const old = (store.relationCache[config.relationName][model.id] || []).slice(),\n added = [],\n removed = [];\n\n store.suspendEvents();\n\n // Remove any related records not in the new collection\n old.forEach((record) => {\n if (!records.includes(record)) {\n record[config.fieldName] = null;\n store.remove(record);\n removed.push(record);\n }\n });\n\n // Add records from the new collection not already in store\n records.forEach((record) => {\n if (record instanceof Model) {\n if (!record.stores.includes(store)) {\n store.add(record);\n added.push(record);\n }\n } else {\n [record] = store.add(record);\n added.push(record);\n }\n\n // Init relation\n record[config.fieldName] = model.id;\n });\n\n store.resumeEvents();\n\n if (removed.length) {\n store.trigger('remove', { records: removed });\n store.trigger('change', { action: 'remove', records: removed });\n }\n\n if (added.length) {\n store.trigger('add', { records: added });\n store.trigger('change', { action: 'add', records: added });\n }\n }", "initializeNewModel() {\n\n }" ]
[ "0.7294336", "0.5948411", "0.566308", "0.56378025", "0.551426", "0.5450242", "0.5441904", "0.54346395", "0.53733796", "0.53655684", "0.5345137", "0.5313684", "0.5289227", "0.5282877", "0.5271635", "0.5228974", "0.5216725", "0.5216628", "0.521087", "0.52106005", "0.5206321", "0.51977026", "0.5193684", "0.5177589", "0.5177589", "0.5168758", "0.51552206", "0.5121828", "0.5120658", "0.5100625", "0.50974727", "0.5089726", "0.50824606", "0.506684", "0.5060005", "0.50565535", "0.5046038", "0.50282204", "0.502278", "0.5018826", "0.501112", "0.50106573", "0.50007117", "0.49937868", "0.49919078", "0.4989939", "0.49860522", "0.49858496", "0.49850735", "0.4982391", "0.49736643", "0.49736643", "0.4968528", "0.4964087", "0.4961596", "0.49541292", "0.4953892", "0.4953892", "0.4952245", "0.4952245", "0.49501258", "0.49474075", "0.4941948", "0.49405757", "0.4935359", "0.4932332", "0.4929249", "0.49286914", "0.49267516", "0.4925349", "0.49242958", "0.49229872", "0.4915052", "0.49133483", "0.4906172", "0.49052265", "0.49042192", "0.4899687", "0.48969534", "0.48917472", "0.48873818", "0.48873818", "0.48873818", "0.48829046", "0.48760578", "0.48697603", "0.48671806", "0.48664334", "0.48611885", "0.4858706", "0.48572734", "0.4856849", "0.485578", "0.4855152", "0.4851735", "0.48490903", "0.48405424", "0.48314792", "0.48243636", "0.4823429" ]
0.69560146
1
Na de load van alle Sporen wordt in ieder track bepaald of er nieuwe reacties zijn toegveoegd.
function updateReacties(trackModel) { //console.warn('dataFactoryTrack updateReacties naam: ', trackModel.get('naam')); var q = $q.defer(); var trackId = trackModel.get('Id'); var trackReacties = loDash.filter(dataFactoryTrackReactie.store, function (trackReactieModel) { return trackReactieModel.get('trackId') === trackId; }); //console.log('dataFactoryTrack updateReacties trackReacties: ', trackReacties); if (trackReacties.length > 0) { //console.log('dataFactoryTrack updateReacties syncDown naam, trackId, trackReacties: ', trackModel.get('naam'), trackId, trackReacties); loDash.each(trackReacties, function (trackReactieModel) { //console.log('dataFactoryTrack updateReacties trackId, naam, reactie: ', trackId, trackModel.get('naam'), trackReactieModel.get('reactie')); var trackReactieId = trackReactieModel.get('Id'); var trackReactieSupModel = loDash.find(dataFactoryTrackReactieSup.store, function (trackReactieSupModel) { return trackReactieSupModel.get('reactieId') === trackReactieId; }); if (trackReactieSupModel) { trackReactieModel.xData = {}; trackReactieModel.xData.tags = []; trackReactieModel.xData.sup = trackReactieSupModel; var xnew = trackReactieSupModel.get('xnew'); if (xnew) { if (!virgin) { notificationsTrackReactie += 1; } var trackNieuwModel = loDash.find(dataFactoryTrack.nieuw, function (trackNieuwModel) { return trackNieuwModel.get('Id') === trackId; }); if (!trackNieuwModel) { dataFactoryTrack.nieuw.push(trackModel); //console.log('dataFactoryTrack updateTrackxnew toegevoegd aan nieuw: ', dataFactoryTrack.nieuw); } } else { loDash.remove(dataFactoryTrack.nieuw, function (trackNieuwModel) { return trackNieuwModel.get('Id') === trackId; }); //console.log('dataFactoryTrack updateTrack xnew verwijderd: ', dataFactoryTrack.nieuw); } } else { //console.log('dataFactoryTrack updateTrackreacties heeft nog geen trackReactieSupModel. Dus nieuw trackReactieSupModel aanmaken!!'); trackReactieSupModel = new dataFactoryTrackReactieSup.Model(); trackReactieSupModel.set('reactieId', trackReactieId); trackReactieSupModel.set('trackId', trackId); trackReactieSupModel.set('gebruikerId', dataFactoryCeo.currentModel.get('Id')); trackReactieSupModel.set('star', false); trackReactieSupModel.set('xnew', true); if (virgin) { trackReactieSupModel.set('xnew', false); } trackReactieSupModel.save().then(function () { //console.log('dataFactoryTrack updateReacties trackReactieSupModel CREATED.'); trackReactieModel.xData = {}; trackReactieModel.xData.tags = []; trackReactieModel.xData.sup = trackReactieSupModel; //console.log('dataFactoryTrack updateReacties trackReactieSupModel toegevoegd aan Reactie.'); var trackSupModel = loDash.find(dataFactoryTrackSup.store, function (trackSupModel) { return trackSupModel.get('trackId') === trackId && trackSupModel.get('gebruikerId') === dataFactoryCeo.currentModel.get('Id'); }); if (trackSupModel) { //console.log('dataFactoryTrack updateReacties trackSupModel gevonden: ', trackId, trackModel.get('naam')); trackModel.xData.sup = trackSupModel; var xnew = trackSupModel.get('xnew'); var star = trackSupModel.get('star'); //console.log('dataFactoryTrack updateTrack trackModel, trackModel.xData.sup UPDATE trackId: ', trackModel, trackModel.xData.sup, trackModel.xData.sup.get('trackId')); if (star) { var trackStarModel = loDash.find(dataFactoryTrack.star, function (trackStarModel) { return trackStarModel.get('Id') === trackId; }); if (!trackStarModel) { dataFactoryTrack.star.push(trackModel); //console.log('dataFactoryTrack updateTrack star toegevoegd: ', dataFactoryTrack.star); } } else { loDash.remove(dataFactoryTrack.star, function (trackStarModel) { return trackStarModel.get('Id') === trackId; }); //console.log('dataFactoryTrack updateTrack star verwijderd: ', dataFactoryTrack.star); } //console.log('dataFactoryTrack updateTrack xnew: ', xnew); if (xnew) { if (!virgin) { notificationsTrack += 1; } var trackNieuwModel = loDash.find(dataFactoryTrack.nieuw, function (trackNieuwModel) { return trackNieuwModel.get('Id') === trackId; }); if (!trackNieuwModel) { dataFactoryTrack.nieuw.push(trackModel); //console.log('dataFactoryTrack updateTrackxnew toegevoegd aan nieuw: ', dataFactoryTrack.nieuw); } } else { loDash.remove(dataFactoryTrack.nieuw, function (trackNieuwModel) { return trackNieuwModel.get('Id') === trackId; }); //console.log('dataFactoryTrack updateTrack xnew verwijderd: ', dataFactoryTrack.nieuw); } //console.log('dataFactoryTrack reload updateSupModel SUCCESS'); q.resolve(); //console.log('dataFactoryTrack updateTrackList heeft nog geen supModel. Dus nieuw!! Id, naam: ', trackModel.get('Id'), trackModel.get('naam')); trackSupModel = new dataFactoryTrackSup.Model(); trackSupModel.set('trackId', trackId); trackSupModel.set('gebruikerId', dataFactoryCeo.currentModel.get('Id')); trackSupModel.set('star', false); trackSupModel.set('xnew', true); if (virgin) { trackSupModel.set('xnew', false); //console.log('dataFactoryTrack updateTrack nieuwe trackenup niet als nieuw beschouwen. Gebruiker is maagd'); } //console.log('dataFactoryTrack updateTrack nieuw trackSupModel: ', trackSupModel.get('trackId')); trackSupModel.save().then(function () { //console.log('dataFactoryTrack updateTrack nieuw trackSupModel: ', trackSupModel); trackModel.xData.sup = trackSupModel; if (!virgin) { notificationsTrack += 1; var nieuwModel = loDash.find(dataFactoryTrack.nieuw, function (nieuwModel) { return nieuwModel.get('Id') === trackId; }); if (!nieuwModel) { dataFactoryTrack.nieuw.push(trackModel); } } else { //console.error('dataFactoryTrack updateTrack nieuwe trackenup notifications skipped. Gebruiker is maagd'); } //console.log('dataFactoryTrack updateTrack nieuwe trackenup voor trackId NOT FOUND in TrackStore.nieuw: ', trackId, dataFactoryTrack.nieuw); //console.log('dataFactoryTrack reload updateSupModel nieuwe track SUCCESS'); q.resolve(); }); } }); } }); //console.log('dataFactoryTrack reload updateReacties SUCCESS'); q.resolve(); } else { //console.log('dataFactoryTrack reload updateReacties SUCCESS'); q.resolve(); } return q.promise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "startTracking() {\n HyperTrack.onTrackingStart();\n }", "function Track() {}", "addTracks() {\n let { playlistId, tracks } = this.state;\n spotifyApi.addTracksToPlaylist(playlistId, tracks);\n }", "beginTracking_() {\n this.tracking_ = true;\n }", "fetchTracks(latLngBounds) {\n var west = latLngBounds.getWest();\n var south = latLngBounds.getSouth();\n var east = latLngBounds.getEast();\n var north = latLngBounds.getNorth();\n fetch(baseUrl + 'api/search/' + west + '/' + south + '/' + east + '/' + north)\n .then(response => response.json())\n .then(trackids => {\n trackids.forEach((key) => {\n console.log(key);\n // fetch the track only if it's not fetched yet\n if (!this.tracks.has(key)) {\n fetch(baseUrl + 'api/SchweizMobil/Track/' + key)\n .then(response => response.json())\n .then(json => {\n var track = JSON.parse(json[0].value);\n var trackLayer = L.geoJSON(track)\n this.tracks.set(key, trackLayer);\n trackLayer.addTo(this.map);\n })\n .catch(error => console.log(error))\n }\n })\n })\n .catch(error => console.log(error))\n }", "onPlace() {\n STATE.aqueducts++;\n }", "function activate() {\n Services.XHR.getTracks(this.spotifyId, onGetData.bind(this))\n\n function onGetData(data) {\n if (!data) {\n alert('sorry, no tracks to display')\n return\n }\n this.clean()\n this.tracks = data.map(everyTrack.bind(this))\n // console.log(tracks)\n }\n\n function everyTrack(track) {\n // console.log(track)\n //\n var newTrack = new ViewModels.Track(track.name, track.id, track.preview_url)\n\n // //append to the main container\n this.container.appendChild(newTrack.getTrackElement())\n return newTrack\n }\n }", "getAllSavedHelper(offset, tracks) {\n spotifyApi.getMySavedTracks({limit: 50, offset: offset})\n .then((response) => {\n var trackIds = [];\n\n for (var i = 0; i < 50; i++) {\n if (response.items[i] != null) {\n tracks[offset+i] = response.items[i].track;\n tracks[offset+i].recently_added = i+offset;\n trackIds[i] = response.items[i].track.id;\n }\n }\n\n var percentSave = 0;\n // Find the Audio Features for each track, then merge with existing track object\n spotifyApi.getAudioFeaturesForTracks(trackIds)\n .then((response) => {\n for (var i = 0; i < 50; i++) {\n if (tracks[offset+i] != null) {\n percentSave = Math.ceil((this.state.apiResponses / this.state.importantInfo.numToAnlayzeSavedSongs) *100);\n tracks[offset+i] = Object.assign(tracks[offset+i], response.audio_features[i]);\n this.setState({ apiResponses: this.state.apiResponses + 1 })\n this.setState({\n percentLoaded: percentSave\n });\n\n }\n\n }\n this.setState({\n multiTracks: {\n tracks: tracks\n },\n });\n if (this.state.apiResponses === this.state.importantInfo.numToAnlayzeSavedSongs) {\n this.drawCharts();\n //remove loading loading screen\n }\n }).catch(e => {\n this.setState({\n loaded: true,\n importantInfo: {\n numToAnlayzeSavedSongs: this.state.apiResponses,\n },\n error: true,\n });\n this.drawCharts();\n });\n\n\n\n })\n }", "onPlace() {\n STATE.wheats++;\n }", "function processCurrenttrack(data) {\n setSongInfo(data);\n}", "_onTrackingUpdated(state, reason) {\n var trackingNormal = false;\n if (state == ViroConstants.TRACKING_NORMAL) {\n trackingNormal = true;\n } \n // this.props.dispatchARTrackingInitialized(trackingNormal);\n }", "function processCurrenttrack (data) {\n setSongInfo(data)\n}", "getTracking() {\n return this.trackingPaquete;\n }", "_setPlaces(position) { // change to document id\n\t const place = this.state.places[position]\n\t const venueId = place.venue.id\n\t console.log('bbbbb'+this.hasPlace('id',venueId,this.state.myPlaces))\n\t if (!this.hasPlace('id',venueId,this.state.myPlaces)) {\n\t console.log(\"adding like\")\n\t\t\tthis.state.myPlaces.push(this.state.places[position])\n\t\t}\n\t\telse {\n\t\t console.log(\"not liking\")\n\t\t}\n\t\tthis.state.seen.push(venueId)\n\t\tAsyncStorage.setItem(prefIdMyPlaces, JSON.stringify(this.state.myPlaces)); // favorites\n\t\tAsyncStorage.setItem(prefIdSeen, JSON.stringify(this.state.seen)); // seen\n\t\tthis.setState({myPlaces:this.state.myPlaces});\n\t}", "function setLoadingScreenInterim(){\n\tdocument.getElementById('currentTrack').innerHTML = \"\";\n\tdocument.getElementById('loading-div-trackText').innerHTML = \"\";\n\tdocument.getElementById('loading-div-backslash').innerHTML = \"\";\t\n\tif(getParam('lang') == \"en\"){\n\t\tdocument.getElementById('amountTracks').innerHTML = \"Processing Data...\";\n\t}\n\telse{\n\t\tdocument.getElementById('amountTracks').innerHTML = \"Verarbeite Daten...\";\n\t}\n}", "function loadOversikt() {\n befolknings_oversikt = new Befolknings_Data(befolkning_url);\n befolknings_oversikt.printHtml();\n}", "constructor () {\n // define satellite load priority.\n this.loadPriority = 10\n }", "getMusic(e) {\n e.preventDefault();\n var artist = e.target.artist.value;\n //changes the button to loading while songs load\n //@ts-ignore\n $('#get-music-button').text('LOADING....');\n itunesService.getMusicByArtist(artist).then(results => {\n drawSongs(results)\n //changes button back to GET MUSIC once songs are loaded\n //@ts-ignore\n $('#get-music-button').text('GET MUSIC');\n })\n }", "constructor() {\r\n this._componentsTracked = [];\r\n\r\n this.play = null;\r\n this.entities = [];\r\n }", "savePlaylist() {\n let trackURIs = this.state.playlistTracks.map( track => track.uri);\n //console.log(trackURIs);\n spotify.savePlaylistToSpotify(this.state.playlistName, trackURIs);\n this.setState({\n playlistTracks: [],\n playlistName: 'New Playlist'\n });\n }", "stocker_local_trajet() {}", "function initSolicitudes() {\n\n var draggable = window.vuedraggable;\n\n // Issue #B.1\n this.g.on(\"modeset\", e => solApp.$children[0].checked = e.newval === \"solicitud\");\n var oldmode = undefined;\n window.addEventListener(\"keydown\", e => {\n if(e.key !== \"Control\" || this.g.mode === \"solicitud\" || oldmode) return;\n oldmode = this.g.mode;\n this.g.mode = \"solicitud\";\n });\n window.addEventListener(\"keyup\", e => {\n if(e.key !== \"Control\" || !oldmode) return;\n this.g.mode = oldmode;\n oldmode = undefined;\n });\n // Fin issue #B.1\n\n\n this.g.on(\"dataloaded\", e=> {\n updateListado();\n });\n\n this.g.on(\"requestclick\", e => {\n \n if(this.g.solicitud.getPosition(e.marker.getData().codigo) === 0){\n //Si no estaba en la lista, se añade. Recordar que para la lista de solicitud, la primera posición es 1 y no 0\n this.g.solicitud.add(e.marker.getData().codigo);\n }\n else {\n this.g.solicitud.remove(e.marker.getData().codigo);\n }\n\n //Actualizamos el listado con las posiciones del array original.\n //Es muy importante no cambiarlo (es decir, no asignar un array nuevo)\n //pues en dicho caso se perderá la \"conexión\" con la lista\n updateListado();\n });\n\n this.g.on(\"requestset\", e => {\n e.marker.refresh();\n if(e.marker instanceof this.g.Centro) {\n // Solo si pasa de pedido a no pedido\n // o viceversa debe cambiarse el icono.\n if(!!e.newval !== !!e.oldval) {\n const tipo = e.newval === 0?\"BolicheIcono\":\"SolicitudIcono\",\n Icono = e.target.solicitud[tipo];\n\n Icono.onready(() => e.marker.setIcon(new Icono()));\n }\n }\n });\n\n function getNombreCentroLocalidad(element) {\n const data = element.getData()\n return typeof data.nom !== 'undefined' ? data.nom : data.id.nom;\n }\n\n function getCodigoCentroLocalidad(element) {\n return element.getData().codigo;\n }\n \n function clonaSolicitudes() {\n let listado = []\n this.interfaz.g.solicitud.store.map(function(element, index){\n // Hay que comprobar que el elemento sea un objeto, pues si es un centro y el usuario cambia de especialidad\n // lo que habrá en realidad es un código plano\n if(typeof element === \"object\"){\n listado.push({\n cod: getCodigoCentroLocalidad(element),\n peticion: element.getData().peticion,\n tipo: typeof element.getData().cod !== 'undefined'? 'L' : 'C',\n name: getNombreCentroLocalidad(element)\n })\n }\n else if(typeof element === \"string\"){\n listado.push({\n cod: element,\n peticion: index + 1, // Es la única forma que tenemos de saber la posición, mediante el índice que ocupa en el array\n tipo: 'C', // Sólo los centros presentan este problema\n name: \"Centro ajeno a la especialidad\"\n })\n }\n })\n return listado;\n }\n\n function updateListado() {\n app.listado.splice(0, app.listado.length, ...clonaSolicitudes())\n }\n\n function clearAllSolicitudes() {\n // Borramos los elementos del array de store\n this.interfaz.g.solicitud.delete(1);\n updateListado();\n }\n\n const ListaSolicitudes = {\n name: 'Solicitudes',\n template: `\n <div>\n <div class=\"peticiones\" v-if=\"list.length > 0\">\n <draggable\n tag=\"ul\"\n :list=\"list\"\n class=\"list-group\"\n handle=\".handle\"\n ghost-class=\"ghost\"\n @start=\"dragging = true\"\n @end=\"dragging = false\"\n @sort=\"ordena\"\n >\n \n\n <li\n class=\"list-group-item\"\n v-for=\"(element, idx) in list\"\n :key=\"element.cod\"\n >\n <div class=\"handle\" style=\"float: left\">\n <i class=\"fa fa-align-justify fa-sort\"></i>\n {{ element.peticion }} - \n <span><i v-bind:class=\"[element.tipo === 'C' ? 'fa-graduation-cap' : 'fa-building', 'fa']\"></i></span> \n {{ element.name }} ({{ element.cod }})\n </div>\n <div>\n <i class=\"fa fa-times close\" @click=\"removeAt(idx)\"></i>\n </div>\n </li>\n \n </draggable>\n <br/>\n </div>\n <div v-else>\n <span><i class=\"fa fa-info-circle\"></i></span>\n <span>Activa el modo solicitud y selecciona centros o localidades para crear tu lista</span>\n </div>\n <br/>\n <div class=\"form-row\">\n <div class=\"col\" v-if=\"list.length > 0\">\n <button type=\"button\" class=\"btn btn-primary\" @click=\"csvExport()\">Exportar a CSV</button>\n </div>\n <div class=\"col\">\n <label for=\"solicitudesCSVFile\">\n <input type=\"file\" class=\"form-control-file\" style=\"display:none\" id=\"solicitudesCSVFile\" @change=\"csvImport()\">\n <button type=\"button\" class=\"btn btn-primary\" @click=\"fireFile()\">Importar CSV</button>\n </label>\n </div>\n </div>\n </div>\n \n `,\n components: {\n draggable\n },\n methods:{\n removeAt: function(index) {\n this.$parent.g.solicitud.delete(index + 1, 1)\n updateListado()\n },\n ordena(e) {\n if(e.oldIndex < e.newIndex) {\n this.$parent.g.solicitud.move(e.oldIndex + 1, e.newIndex + 2, 1)\n }\n else{\n this.$parent.g.solicitud.move(e.oldIndex + 1, e.newIndex + 1, 1)\n }\n updateListado()\n },\n // Funcionalidad para exportar la lista a un fichero CSV\n csvExport() {\n let csvContent = \"data:text/csv;charset=utf-8,\";\n csvContent += [\n Object.keys(this.$parent.listado[0]).join(\";\"),\n ...this.$parent.listado.map(item => Object.values(item).join(\";\"))\n ]\n .join(\"\\n\")\n .replace(/(^\\[)|(\\]$)/gm, \"\");\n \n const data = encodeURI(csvContent);\n const link = document.createElement(\"a\");\n link.setAttribute(\"href\", data);\n link.setAttribute(\"download\", \"solicitudes.csv\");\n link.style.display = 'none';\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n },\n fireFile() {\n document.getElementById(\"solicitudesCSVFile\").click();\n },\n csvImport() {\n // Si hay elementos seleccionados, damos la opción a no destruirlos\n if(this.$parent.listado.length > 0) \n if (!confirm(\"¿Está seguro? Esto eliminará los centros que tenga seleccionados ahora mismo\"))\n return;\n\n const fichero = document.getElementById(\"solicitudesCSVFile\")\n if(fichero.value === \"\"){\n fichero.classList.add('is-invalid');\n return;\n }\n else {\n fichero.classList.remove('is-invalid');\n }\n\n // Utilizaremos Papaparse para parsear el fichero CSV\n Papa.parse(fichero.files[0], {\n complete: function (lista) {\n // Primero vaciamos el array original, por si ya hubiese datos\n clearAllSolicitudes();\n lista.data.forEach(function(element, index){\n if (index > 0)\n app.g.solicitud.add(element[0]); // el código está en la posición 0\n });\n updateListado();\n }\n });\n \n }\n },\n data() {\n return {\n enabled: true,\n list: this.$parent.listado,\n dragging: false\n };\n }\n };\n\n const app = new Vue({\n el: '#peticiones',\n data: {\n g: this.g,\n listado: clonaSolicitudes()\n },\n render: h => h(ListaSolicitudes)\n });\n\n Vue.component(\"ajuste\", {\n props: [\"a\"],\n template: \"#ajuste\",\n data: function() {\n return {\n checked: this.a.tipo === \"visual\"?this.$parent.options[this.a.opt]:false,\n disabled: false\n }\n },\n watch: {\n checked: function() {\n // Sólo actualizamos las opciones de interfaz visuales,\n // las relativas a filtros y correcciones deben conservar\n // sus valores iniciales.\n if(this.a.tipo === \"visual\") this.$parent.options[this.a.opt] = this.checked;\n }\n },\n computed: {\n id: function() {\n return this.a.tipo !== \"visual\"?this.a.tipo:\n `${this.a.tipo}:${this.a.opt}`\n }\n },\n methods: {\n // Qué acción se desencadena al cambiar el ajuste.\n ajustar: function(e) {\n //this.$parent.options[this.a.opt] = this.checked;\n\n if(this.a.accion) {\n this.a.accion(this.a.opt, this.checked);\n return;\n }\n\n if(this.a.tipo === \"visual\") return;\n\n // Vamos a usar la variable tipo para aplicar el filtro sobre los centros o las localidades (o ambos - both B)\n if(typeof this.a.value.tipo !== \"undefined\" && (this.a.value.tipo === 'L' || this.a.value.tipo === 'B')){\n const [accion, nombre] = this.a.tipo.split(\":\"),\n Localidad = this.$parent.g.Localidad,\n res = this.checked?Localidad[accion](nombre, this.a.value || {})\n :Localidad[`un${accion}`](nombre);\n if(res) Localidad.invoke(\"refresh\");\n }\n\n if(typeof this.a.value.tipo === \"undefined\" || (this.a.value.tipo === 'C' || this.a.value.tipo === 'B')){\n const [accion, nombre] = this.a.tipo.split(\":\"),\n Centro = this.$parent.g.Centro,\n res = this.checked?Centro[accion](nombre, this.a.value || {})\n :Centro[`un${accion}`](nombre);\n if(res) Centro.invoke(\"refresh\");\n }\n\n \n }\n }\n });\n\n const solApp = new Vue({\n el: \"#solicitud :nth-child(2)\",\n data: {\n g: this.g,\n options: this.options,\n ajustes: [\n {\n desc: \"Activar el modo solicitud\",\n opt: \"modo\",\n tipo: \"visual\",\n accion: (name, value) => {\n if(value){\n this.g.mode = \"solicitud\";\n }\n else {\n this.g.mode = \"normal\"\n }\n }\n },\n {\n desc: \"Ocultar centros ya seleccionados\",\n opt: \"filter:solicitado\",\n tipo: \"filter:solicitado\",\n value: {tipo: 'B'}\n },\n {\n desc: \"Ocultar localidades\",\n opt: \"ocultarLocalidades\",\n tipo: \"visual\",\n accion: (name, value) => {\n // Si la opción ocultarLocalidades está desmarcada, las mostramos\n if(!value){\n this.g.Localidad.unfilter(\"invisible\");\n this.g.Localidad.invoke(\"refresh\", this.g.progressBar);\n }\n else {\n this.g.Localidad.filter(\"invisible\", {});\n this.g.Localidad.invoke(\"refresh\", this.g.progressBar);\n }\n }\n }\n ]\n }\n });\n }", "function loadmarkerSingleTrackingMap(SingleTrackID) {\r\n singleTrackingMapchecklong = '000';\r\n SingleTrackingMap_SpeedMeterShow();\r\n SingleTrackingMap_MillageCountShow();\r\n\r\n Ext.getStore('singlesignalTrackingstore').getProxy().setExtraParams({\r\n TrackID: SingleTrackID,\r\n AccountNo: GetCurrentUserAccountNo()\r\n });\r\n Ext.StoreMgr.get('singlesignalTrackingstore').load();\r\n \r\n Ext.Viewport.mask({ xtype: 'loadmask', message: 'Ploting Point..Please Wait.' });\r\n var task = Ext.create('Ext.util.DelayedTask', function () {\r\n Ext.getStore('singlesignalTrackingstore').getProxy().setExtraParams({\r\n TrackID: SingleTrackID,\r\n AccountNo: GetCurrentUserAccountNo()\r\n });\r\n Ext.StoreMgr.get('singlesignalTrackingstore').load();\r\n var myStore = Ext.getStore('singlesignalTrackingstore');\r\n var modelRecord = myStore.getAt(0);\r\n var Latitude = modelRecord.get('Latitude');\r\n var Longitude = modelRecord.get('Longitude'); \r\n\r\n var position = new google.maps.LatLng(Latitude, Longitude);\r\n \r\n singleTrackingMap.setCenter(position)\r\n singleTrackingMap.setZoom(10);\r\n Ext.Viewport.unmask();\r\n \r\n });\r\n task.delay(1000);\r\n\r\n stopClocksingleTrackingMapsStreetView();\r\n startsingleTrackingMaps('start', SingleTrackID);\r\n\r\n}", "function loadTracker() {\n // setup tracker\n ctracker = new clm.tracker();\n ctracker.init(pModel);\n ctracker.start(videoInput.elt);\n}", "addTrack(){\n this.props.onAdd(this.props.track);\n }", "function load () {\n actions = svl.storage.get(\"tracker\");\n }", "savePlaylist() {\n const trackUris = this.state.playlistTracks.map(track => track.uri);\n Spotify.savePlaylist(this.state.playlistName, trackUris).then(() => {\n this.setState({ \n playlistName: 'New playlist',\n playlistTracks: []\n })\n })\n }", "async loadTracks() {\n if (!Is.empty(this.user.tracks)) {\n this.tracks = this.user.tracks;\n } else {\n this.isLoading = true;\n }\n\n let response = await this.meService.tracks();\n\n this.tracks = response.records;\n\n this.isLoading = false;\n\n this.user.update('tracks', this.tracks);\n }", "updateSoures() {\n var uniqueSources = new Set();\n for (var i = 0; i < this.state.articles.length; i++) {\n var article = this.state.articles[i];\n uniqueSources.add(article.Source);\n }\n\n var uniqueSourcesArr = Array.from(uniqueSources);\n var sources = uniqueSourcesArr.sort()\n\n this.setState({ sources: sources });\n this.initHidden();\n }", "savePlaylist() {\n // Get a list of track URIs provided by Spotify, these are needed for defining the playlist\n let tracks = this.state.playlistTracks.map(track => track.uri);\n // savePlaylist is Promise based. Once the playlist is saved, reset the application state.\n Spotify.savePlaylist(this.state.playlistName, tracks).then(() => {\n //Reset the state when done saving.\n this.setState({\n searchResults: [],\n playlistTracks: []\n })\n // Set the playlist name to empty.\n document.getElementsByClassName(\"Playlist-name\")[0].value = 'New Playlist';\n });\n }", "constructor() {\n // we assume that Koala Push 2 is also loaded, or will be, and so start in \n // shared known state\n //this.viewMode = ViewMode.koala;\n this.viewMode = ViewMode.session; \n this.inputMode = InputMode.normal;\n this.stopping = new Set(); // Set<TrackSlotPad>\n this.highlighting = new Set(); // Set<TrackSlotPad>\n this.momentaryInputMode = MomentaryInputMode.none;\n }", "addTrack() {\n this.props.onAdd(this.props.track);\n }", "function asiCallOnload(){\n var SDM_noasci = ['meinauto'];\n var asi_p = 'IpZElE,Rdkg7V,NkqpjZ,acWaVx,RmJKxA,BnG7vD,oeu2b6,foY3mB'; //Produktion\n var asiPqTag = false; //Initialisierung, Antwort setzt auf true\n try {\n if ((sdm_vers >= 1) && !SDM_head.isinarray(SDM_noasci, SDM_resource)) {\n fXm_Head.create.twin(escape('//pq-direct.revsci.net/pql?placementIdList=' + asi_p), SDM_head.prep.asigmd, true);\n }\n } catch (ignore) {}\n\n // Audience Science Data Sharing\n if (!SDM_head.isinarray(SDM_noasci, SDM_resource)) {\n fXm_Head.create.script('//js.revsci.net/gateway/gw.js?csid=F09828&auto=t&bpid=Stroer');\n }\n}", "function setView() {\n places = JSON.parse(localStorage.getItem('places'));\n if (places) {\n for (var p of places) {\n var marker = L.marker(p.lokasi).addTo(mymap).bindPopup(p.sponsor);\n marker.on('click', showLocation);\n }\n }\n}", "@action.bound\n async loadSongsList() {\n this.isLoading = true;\n\n try {\n const payload = {\n songName: this.filterSongName || null,\n artistName: this.filterArtistName || null,\n minGrade: this.filterGradesRange[0],\n maxGrade: this.filterGradesRange[1]\n };\n\n const fetchedSongsList = await this.songsRepository.getSongsList(payload);\n\n this.songsList.clear();\n this.songsList.push(...fetchedSongsList);\n } catch (e) {\n console.error(e);\n } finally {\n this.isLoading = false;\n }\n }", "loadTracker() {\n return [];\n }", "function updateTrackInfo() {\n getSpotifyCurrentTab(function(tabs) {\n for (var tab of tabs) {\n fetchAlbumArt(tab.id, renderAlbumArt);\n\n fetchTrackName(tab.id, renderTrackName);\n fetchTrackArtist(tab.id, renderTrackArtist);\n\n fetchControlState(tab.id, \"previous\", renderControlState);\n fetchControlState(tab.id, \"next\", renderControlState);\n\n fetchPlayPauseState(tab.id, renderPlayPauseState);\n }\n });\n}", "rendering(){\n let renderPlace = \"\";\n let count = 0;\n place.innerHTML = renderPlace;\n slides.forEach((slide)=>{\n count++\n if(slide.tipe == \"teks\"){\n renderPlace += textRender(slide,count);\n place.innerHTML = renderPlace;\n }\n else if(slide.tipe == \"gambar\"){\n renderPlace +=gambarRender(slide,count);\n place.innerHTML = renderPlace;\n }else{\n place.innerHTML = renderPlace;\n }\n loadFile.hapusBtn();\n });\n }", "addTrack() {\n this.props.onAdd(this.props.track);\n }", "function getTrails(){\n vm.loading = true;\n TrailClient\n .getTrails(vm.search)\n .then(function(response){\n vm.searchResults = response.data.places;\n vm.loading = false;\n })\n }", "async fetchTopTracks() {\n let topTracks = [];\n const res = await fetch(`//ws.audioscrobbler.com/2.0/?method=chart.gettoptracks&api_key=77730a79e57e200de8fac0acd06a6bb6&format=json`)\n const data = await res.json()\n // console.log(data);\n for (let i = 0; i < 9; i++) {\n topTracks.push(data.tracks.track[i]);\n }\n console.log('from top charts collection');\n // console.log(collection)\n this.setState({ topTracks });\n // return collection;\n }", "static async onEnter({ state, store }, params) {\n state.common.title = 'Songs'\n await store.setLists.browse()\n await store.sets.browse()\n await store.songs.browse();\n }", "function Awake () {\n\n\n//Inicializacion de los managers y demas scripts\nplayerManager = GetComponent(Player_Manager);\nmanagerDialogos = GetComponent(ManagerDialogos2);\nlootManager = GetComponent(LootManager2);\ninventario = GetComponent(InventarioManager);\npersistance = GameObject.Find(\"Persistance\").GetComponent(Persistance);\n//GameObject.Find(\"Estacion1\").GetComponent(Interactor_Click).FlagOff();\nGameObject.Find(\"Estacion2\").GetComponent(Interactor_Click).FlagOff();\n//GameObject.Find(\"Estacion3\").GetComponent(Interactor_Click).FlagOff();\n\npuzzle = GetComponent(Puzzle);\npuzzleAlambre = GetComponent(PuzzleAlambre);\ninventario.setItemsActuales(persistance.getInventario());\ncontadorPapel = 0;\ncontadorFantasmas = 0;\nvar tempPlayers: Player[] = persistance.getParty();\nfor(var i:int = 0 ; i <tempPlayers.Length ; i++){\n\tif(tempPlayers[i]){\n\t\tplayerManager.addPlayer(new Player(tempPlayers[i].getTextura(),tempPlayers[i].getId(),tempPlayers[i].getNombre(),tempPlayers[i].getCursor()));\n\t}\n\n}\ncurrentPlayer = tempPlayers[0];\n}", "function itemLoaded(event) {\n BD18.loadCount--;\n if (BD18.doneWithLoad === true && BD18.loadCount <= 0) {\n BD18.stockMarket = new StockMarket(BD18.mktImage,BD18.bx.market);\n makeTrays();\n makeMktTokenList();\n canvasApp();\n delayCheckForUpdate();\n }\n}", "loadTickets() {\n voucherToolbox.getOwnVouchers((code, data)=>{\n this.setState({tickets: data, loading: false})\n window.$tickets = data\n })\n }", "constructor() {\n this.stage = null//stage c'est l'écran de jeu en gros\n this.objects = [] // je fais une liste vide dans laquelle je vais metre tous les objets du jeu\n this.ids = 0\n }", "doSearch() {\r\n spotifyApi.searchTracks(this.state.search)\r\n .then(data => {\r\n // Print some information about the results\r\n console.log('I got ' + data.tracks.total + ' results!');\r\n\r\n // Go through the first page of results\r\n var firstPage = data.tracks.items;\r\n console.log(\r\n 'The tracks in the first page are.. (popularity in parentheses)'\r\n );\r\n var searchResults = []\r\n firstPage.forEach(function (track, index) {\r\n searchResults.push({\r\n index: index,\r\n name: track.name,\r\n popularity: track.popularity,\r\n id: track.id,\r\n albumTitle: track.album.name,\r\n albumArt: track.album.images[0].url,\r\n artistName: track.artists[0].name\r\n })\r\n });\r\n this.setState({ searchResults: searchResults })\r\n // console.log(searchResults)\r\n })\r\n .catch(function (err) {\r\n console.log('Something went wrong:', err.message);\r\n });\r\n }", "function loadTrails() {\n API.getTrails()\n .then(res => {\n // console.log(res.data.trails);\n setTrails(res.data.trails);\n })\n .catch(err => console.log(err));\n }", "addTrack(track) {\n/* if (!this.state.playlistTracks.includes(track)) { // Step 41\n this.setState({playlistTracks: this.state.playlistTracks.splice(this.state.playlistTracks.count,0,track.id)}); //add a track at the end of the playlist\n*/\n if (this.state.playlistTracks.indexOf(track) === -1) {\n const newPlayList = this.state.playlistTracks;\n newPlayList.push(track);\n this.setState({playListTracks: newPlayList})\n // this.setState({playlistTracks: this.state.playlistTracks.push(track)});\n }\n }", "function constroiEventos(){}", "function loadPathways () {\n var pathways = scope.target.reactome;\n var reactomePathways = [];\n\n // Get the new identifiers\n var promises = [];\n var pathwayArr = [];\n\n if (!pathways.length) {\n scope.noPathways = true;\n }\n\n for (var i = 0; i < pathways.length; i++) {\n // for (var pathway in pathways) {\n var pathway = pathways[i].id;\n var p = $http.get('/proxy/www.reactome.org/ReactomeRESTfulAPI/RESTfulWS/queryById/DatabaseObject/' + pathway + '/stableIdentifier');\n promises.push(p);\n // pathwayArr.push(pathways[pathway][\"pathway name\"]);\n pathwayArr.push(pathways[i].value['pathway name']);\n }\n $q\n .all(promises)\n .then(function (vals) {\n for (var i = 0; i < vals.length; i++) {\n var val = vals[i].data;\n if (val) {\n var idRaw = val.split('\\t')[1];\n var id = idRaw.split('.')[0];\n reactomePathways.push({\n 'id': id,\n 'name': pathwayArr[i]\n });\n }\n }\n // Remove the spinner\n spDiv.parentNode.removeChild(spDiv);\n\n scope.pathways = reactomePathways;\n if (scope.pathways[0]) {\n scope.setPathwayViewer(scope.pathways[0]);\n }\n });\n }", "function startLoading() {\n //TODO\n}", "[\"PoSTIR\"](state) {\n state.showLoader = true;\n }", "function TrackByFunction(){}", "async likeTrack() {\n let prevSeedTracks = this.state.seedTracks;\n prevSeedTracks.push(this.state.selectedTrack);\n if (prevSeedTracks.length > 4) prevSeedTracks.shift(); //Remove oldest seed element\n await this.setState({\n seedTracks: prevSeedTracks,\n });\n await this.findNewTracks();\n }", "preload() {\n this.cargarMapa();\n this.cargarImagenes();\n this.cargarSpritesheets();\n this.cargarSpritePhysics();\n this.cargarAudio();\n\n this.conectarWebsocket();\n }", "function omniTrackEv(omniStr,omniStr2) {\r\nif ((typeof(omniStr)!='string')||(typeof s_account!='string'))return 0;\r\nvar s_time = s_gi(s_account);\r\ns_time.linkTrackVars='events,eVar43,prop13,prop14,prop17';\r\nvar aEvent='event43';\r\nvar aList = [['comment','event44'],['love-it','event48'],['leave-it','event49'],['fb-like','event43'],['fb-share','event43'],['google+1','event43'],['twitter','event43']]\r\nfor (i=0; i < aList.length; i++) {\r\n\tif(omniStr.toLowerCase()==aList[i][0]){aEvent = s_time.apl(aEvent,aList[i][1],',','1');}\r\n}\r\ns_time.linkTrackEvents = s_time.events = aEvent;\r\ns_time.user_action = omniStr;\r\ns_time.prop14 = s_time.pageName;\r\ns_time.prop17;\r\nif((omniStr == 'comment') && typeof(omniStr2)!='undefined'){\r\ns_time.screen_name = omniStr2;\r\ns_time.linkTrackVars+=',eVar41';\r\n}\r\ns_time.tl(true,'o','Event:'+omniStr);\r\ns_time.linkTrackVars = s_time.linkTrackEvents = 'None';\r\ns_time.user_action = s_time.eVar43 = s_time.eVar41 = s_time.prop13 = s_time.prop14 = s_time.prop17 = s_time.events = ''; \r\n}", "function MasterTrack() {}", "function loadExcuses() {\n service = new google.maps.places.PlacesService(map);\n excuseId = 0;\n pendingExcuses = [];\n allExcuses = [];\n availableExcuses = [];\n excusesUsed = [];\n imagineBullshitExcuses();\n findRealExcuses();\n}", "async getTrackData() {\n this.variants = await new ApolloService().GetFakeVariants();\n }", "submitTrackFor(list) {\n let thisObj = this;\n return (event) => {\n event.preventDefault();\n thisObj.StreamClient.createTrackAsync({\n name: thisObj.state[list + 'Add']\n }).then((locator) => {\n return thisObj.StreamClient.setTrackCallbacksAsync(\n { [locator]: thisObj.setTrackData(locator).bind(thisObj) }, []\n ).then(() => locator);\n }).then((locator) => {\n let listArr = thisObj.state[list];\n let snapshot = listArr.slice();\n listArr.push(locator);\n\n return thisObj.StreamClient.editStreamListAsync(list, snapshot,\n listArr);\n })\n .then(() => thisObj.setState({ [list + 'Add']: '' }));\n };\n }", "function start_tracking_person(source=\"hmi\") {\n add_desire(source + \"_track_person\", \"TrackPerson\", \"\", 1, 10);\n add_desire(source + \"_track_people\", \"TrackPeople\", \"\", 1, 10);\n}", "loadLocations() {\n var temp_arr = [];\n // Returning list of events from the Store\n var all_events = this.state.events['future_events'];\n all_events.map(function(event) {\n temp_arr.push(event.location)\n });\n \n var temp_location = new Set(temp_arr);\n temp_arr = ['All',...temp_location];\n //log(\"Locations of all events: \" + JSON.stringify(temp_arr), DEBUG);\n this.setState({event_locations: temp_arr});\n }", "addTrack() {\n\t\tthis.props.onAdd(this.props.track);\n\t}", "function initLoad() {\n\t/////////////////// MAPPER LES LIENS ///////////////////\n\tif (Modernizr.history) {\t\n\t\t// menu\n\t\t$(\"#cn-wrapper a\").each(function() {\n\t\t\t$(this).click(function() {\n\t\t\t\teverPushed = true;\n\t\t\t\t$(\".cn-wrapper li a.survol\").removeClass(\"survol\");\n\t\t\t\tloadStart($(this).attr(\"href\"));\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t\t$(\"#container-map-ima area\").each(function() {\n\t\t\t$(this).click(function() {\n\t\t\t\teverPushed = true;\n\t\t\t\t$(\".cn-wrapper li a.survol\").removeClass(\"survol\");\n\t\t\t\tloadStart($(this).attr(\"href\"));\n\t\t\t\treturn false;\n\t\t\t});\n\t\t});\n\t\t// footer \n\t\t/*$(\"#bloc-btn-bottom a[href^=mentions]\").click(function() {\n\t\t\tloadStart($(this).attr(\"href\"));\n\t\t\teverPushed = true;\n\t\t\treturn false;\n\t\t});*/\n\t\t// contenu\n\t\tmapAllLinks();\n\t\n\t\t/////////////////// GESTION D'URL ///////////////////\n\t\t$(window).bind(\"popstate\", function() {\n\t\t\t\n\t\t\tif (everPushed) {\n\t\t\t link = location.pathname.substr(0, location.pathname.length-1).replace(/^.*[\\\\/]/, \"\"); \n\t\t\t loadStart(link);\n\t\t\t }\n\n\t\t});\n\t\t\n\t\t\n\n\t}\n}", "function init() {\n var storedtodos= JSON.parse(localStorage.getItem(\"Scores\"));\n\n if (storedtodos!== null) {\n todos= storedHighs;\n }\n\n renderHighs();\n}", "constructor(model) { // Set up subscriptions and DOM event handlers.\n super(model);\n this.model = model;\n this.users = new Map(Array.from(this.model.users.values()).map(userModel => [userModel.userId, new UserView(userModel, this)]));\n this.subscribe(this.sessionId, \"view-join\", this.ensureLocalModel);\n this.subscribe(this.sessionId, 'addUserView', this.addUserView);\n this.subscribe(this.sessionId, 'displayNearby', this.displayNearby);\n this.subscribe(this.sessionId, 'log', this.logMessage);\n \n this.introScreens = ['none', 'intro', 'info', 'infoSettings', 'selfie', 'contact', 'threeWords'];\n Array.from(document.querySelectorAll(\".next\")).forEach(button => button.onclick = () => this.nextIntroScreen());\n Array.from(document.querySelectorAll(\".back\")).forEach(button => button.onclick = () => this.previousIntroScreen());\n \n\n qr.onclick = () => this.findUser('Share').toggleSelection();\n takeSelfie.onclick = () => this.takeSelfie();\n retakeSelfie.onclick = () => this.setupSelfie();\n contactName.oninput = () => {\n if (!tags.value) tags.placeholder = this.tagsDefault() || 'e.g., blockchain expert';\n }\n reset.onclick = () => this.reset();\n cloud.addEventListener('wordcloudstop', () => {\n console.log('wordcloudstop', cloud.dataset.userId, this.publish);\n this.publish(cloud.dataset.userId, 'renderedCloud');\n });\n wordInput.onchange = () => {\n function clickSpanIfFound(span) {\n if (span.textContent === word) {\n user.updateForNewSpanChoice(span);\n return true;\n }\n }\n const user = this.findUser(cloud.dataset.userId),\n word = wordInput.value;\n if (!user.eachCloudSpan(clickSpanIfFound)) {\n this.publish(this.model.userId, 'rate', {word: word});\n this.yourPick = word;\n user.renderCloud(); // FIXME- after round trip\n }\n }\n }", "searchSpotify () {\n spotifyApi.searchTracks(this.state.queryTerm)\n .then((response) => {\n this.setState({\n results: response.tracks.items\n })\n });\n }", "function spofityPlay() {\n spotify\n .search({ type: 'track', query: \"\\\" \" + input + \"\\\" \" })\n .then(function (data) {\n console.log(\n \"\\n ========== Spotify Search ==========\\n\"\n )\n\n // console.log(data);\n // The song's name\n // A preview link of the song from Spotify\n // The album that the song is from\n //Artist(s)\n // console.log(data.tracks.items[1])\n var song = data.tracks.items[1];\n console.log(\"Song Search: \" + song.album.name);\n console.log(\"Want a quick listen, click here: \" + song.external_urls.spotify)\n console.log(\"The Song is in Album: \" + song.album.name);\n console.log(\"Artist(s): \" + song.artists[0].name + \"\\n\");\n\n // ARTISTS VS ALBUM\n // ALBUM: given to us as an object allows us to call on it normally\n // ARISTS: looks like an object but its really an array with an object\n // nested inside (sneaky bitch.)\n // for the artist name you have to call the array FIRST then the object\n\n })\n .catch(function (err) {\n console.log('Error occurred: '+ err);\n \n\n });\n\n\n}", "function loadSongs() {\n if (!store.getItem('songs')) createStore()\n var songArray = JSON.parse(store.getItem('songs'))\n for (var i = 0; i < songArray.length; i++) {\n var para = document.createElement('P');\n var t = document.createTextNode(songArray[i]);\n para.appendChild(t);\n document.querySelector('.songs').appendChild(para);\n }\n}", "function scrobbleTrack() {\n // stats\n chrome.runtime.sendMessage({type: 'trackStats', text: 'The sixtyone song scrobbled'});\n \n // scrobble\n chrome.runtime.sendMessage({type: 'submit'});\n}", "function storeStooges() {\n self.log(self.oldStoogesFound);\n self.log(self.oldStoogesKilled);\n spec.integrationStore.putModel(self.moe, stoogeStored);\n spec.integrationStore.putModel(self.larry, stoogeStored);\n spec.integrationStore.putModel(self.shemp, stoogeStored);\n }", "addTrack(track){\r\n this.tracks.push(track);\r\n \r\n }", "addTrack(track) {\n let tracks = this.state.playlistTracks;\n if (tracks.find((currentTrack) => currentTrack.id === track.id)) {\n return;\n }\n tracks.push(track);\n this.setState({ playlistTracks: tracks });\n }", "addTrack(track) {\n let tracks = this.state.playlistTracks;\n if(tracks.find( savedTrack => \n savedTrack.id === track.id)) {\n return;\n } \n\n tracks.push(track);\n this.setState({ playlistTracks: tracks });\n }", "addTrack(track)\n {if (this.state.playlistTracks.find(savedTrack =>\n savedTrack.id === track.id)) {return;}\n else { this.state.playlistTracks.push(track) };\n let playlistTracks = this.state.playlistTracks;\n this.setState({playlistTracks:playlistTracks});\n}", "function showAllPairesRender()\n {\n for (var i=0; i<renderItineraireArray.length; i++)\n {\n renderItineraireArray[i].setMap(carteItineraire);\n polylineForHoverItineraireArray[i].setMap(carteItineraire);\n }\n }", "function _drawActive() {\n let activeSong = store.State.activeSong;\n console.log(activeSong);\n document.getElementById(\"active-song\").innerHTML = activeSong.activeTemplate;\n}", "function spielen() {\n spielZurueckSetzen(); // Das Spiel zurücksetzen\n kartenStapelGenerieren(); // (Neuen) Kartenstapel erzeugen\n deck = kartenMischen(deck); // Karten mischen\n kartenGeben(); // zu Spiel beginn erhält jeder Spieler 5 Karten\n kartenAnzeigen(spielerKarten); // HTML updaten und Spieler-Karten erzeugen\n kartenAnzeigen(gegnerKarten); // HTML updaten und Gegner-Karten erzeugen\n spielKarteHerunternehmen(); // Aktive Spiel-Karte vom Aufnahmestapel nehmen\n kartenAnzeigen(ablageStapel); // HTML updaten und Ablagestapel anzeigen\n kartenAnzeigen(deck); // HTML updaten und Deck anzeigen\n document.getElementById(\"deck\").addEventListener(\"click\", karteZiehen, false);\n document.getElementById(\"status\").innerHTML = \"Du darfst anfangen!\"; // In currentMove Html Section beschreiben, wer als Nächstes an der Reihe ist/Was zu tun ist\n spielerAktiv = true;\n }", "function handleStartOverButton () {\n $('.results').on('click','.js-startover-btn', function () {\n console.log('js-startover-btn was clicked.');\n store.view = 'start';\n store = defaultStore();\n questionList = defaultQuestionList();\n console.log(store.currentQuestionCount);\n render();\n console.log(store.currentQuestionCount);\n });\n}", "function App() {\n\n const getTracks = () => {\n return fetch('http://35.232.86.10:1337/tracks').then(response => response.json());\n }\n\n const [tracks, setTracks] = useState([])\n\n useEffect(() => {\n getTracks().then(tracks => setTracks(tracks));\n\n }, []);\n \n // Automatially creates id for new tracks\n const addTrack = track => {\n track.id = tracks.length + 1\n setTracks([...tracks, track])\n\n \n }\n\n // Deletes track\n const deleteTrack = id => {\n setTracks(tracks.filter(track => track.id !== id))\n }\n\n //Tracks whether to display edit from\n const [editing, setEditing] = useState(false)\n\n // Initial Edit form Values\n const initialFormState = {id: null, title: \"\", artist: \"\", album: \"\", recommender: \"\", comments: \"\"}//listened_to: false, rating: 0, genre: \"\",\n\n const [currentTrack, setCurrentTrack] = useState(initialFormState)\n\n const editTrack = track => {\n setEditing(true)\n \n setCurrentTrack({id: track.id, title: track.title, artist: track.artist, album: track.album, listened_to: track.listened_to, rating: track.rating, genre: track.genre, recommender: track.recommender, comments: track.comments})\n }\n\n const updateTrack = (id, updatedTrack) => {\n setEditing(false)\n\n setTracks(tracks.map(track => (track.id === id ? updatedTrack: track)));\n }\n\n const pickTrack = track =>{\n setCurrentTrack({id: track.id, title: track.title, artist: track.artist, album: track.album, listened_to: track.listened_to, rating: track.rating, genre: track.genre, recommender: track.recommender, comments: track.comments})\n }\n\n\n return (\n <section className=\"section has-background-light\">\n <Router>\n <div className=\"container\">\n <hr/>\n <div className=\"box\">\n <div><h1 className=\"title is-1 has-text-info\">Song Recommendations</h1>\n <h2 className=\"subtitle\">Beau Curnow</h2></div>\n </div>\n <div className=\"columns\">\n <div className=\"column is-narrow\"> \n {editing ? (\n <UpdateTrackForm editing={editing} setEditing={setEditing} currentTrack={currentTrack} updateTrack={updateTrack}/>\n ):(\n <AddTrackForm addTrack={addTrack}/>)}\n </div> \n <div className=\"column\">\n <Switch>\n <Route path=\"/:id\">\n <Track currentTrack={currentTrack} key={currentTrack.id}/> \n </Route>\n <Route path=\"/\">\n <TrackTable tracks={tracks} deleteTrack={deleteTrack} editTrack={editTrack} pickTrack={pickTrack}/>\n </Route>\n </Switch>\n </div>\n </div>\n <div><br/></div>\n\n </div>\n </Router>\n </section>\n );\n}", "function loading(){\n\t\t\t\t\tcreateLoader();\n\t\t\t\t\tid=sessionStorage.shopID;\n\t\t\t\t\tgetName(id)\n\t\t\t\t\t.then(function(){\n\t\t\t\t\t\tdocument.getElementById('ShopName').innerHTML=nameOfShop;\n\t\t\t\t\t})\n\t\t\t\t\t.catch(function(){\n\t\t\t\t\t\t;\n\t\t\t\t\t});\n\t\t\t\t\t \n\t\t\t\t\t//show the pending orders\n\t\t\t\t\tfillTable('portalTable',id)\n\t\t\t\t\t.then(function(){\n\t\t\t\t\t\tdocument.body.style.opacity=1;\n\t\t\t\t\t\tdocument.getElementById(\"loader\").remove();\n\t\t\t\t\t})\n\t\t\t\t\t.catch(function(){\n\t\t\t\t\t\t;\n\t\t\t\t\t});\n\t\t\t\t\t\n\n\n\t\t\t}", "function befolkningCallback() {\n sysselsatte.load();\n}", "function showTrack(peroid){\n\tvar position=JSON.parse(httpGet(beaconPosiSourcePlus+peroid)); //Target URL Two dimensional json array\n\t \n\tfor(var i=0;i<position.length;i++){\n\t\tvar list=new Array();\n\t\tfor(var j=0;j<position[i].length;j++){\n\t\t list.push(new beaconMarker(position[i][j]));\n\t\t}\n\t\tvar flightPath = new google.maps.Polyline({\n\t\t\tpath: list,\n\t\t\tgeodesic: true,\n\t\t\tstrokeColor: '#FF0000',\n\t\t\tstrokeOpacity: 1.0,\n\t\t\tstrokeWeight: 2,\n\t\t\tmap:map\n\t\t});\n\t\tmarkerlist.push(list);\n\t}\n}", "hent() {\n // Bruker b_id'en til å hente infor om bestillingen\n s_bestilling.InfoBestilling(this.b_id, valgt => {\n this.valgt = valgt;\n });\n // Bruker b_id'en til å hente info om varene i bestillingen\n s_bestilling.InfoBestillingVarer(this.b_id, varer => {\n this.varer = varer;\n });\n this.visInfoPop();\n }", "function getTrack(trackTitle) {\n var url = 'http://localhost:54941/Track/GetTrack?trackTitle=' + trackTitle;;\n $.ajaxSetup({ cache: false }); //to prevent cache\n $.getJSON(url, function (data) { // lấy dữ liệu từ CSDL\n timeStart = data.TimeStart;\n duration = data.Duration;\n title = data.AudioTitle;\n answer = data.Answer;\n });\n}", "function track() {\n if (!trip.isEnded()) {\n var coords = trip.getLatLng();\n var lat = coords.lat;\n var lng = coords.lng;\n\n var numFences = geofences.length;\n for (var i = 0; i < numFences; i++) {\n var geofence = geofences[i];\n var geofenceLat = geofence.getCenterLat();\n var geofenceLng = geofence.getCenterLng();\n var distance = distanceBetween([geofenceLat, geofenceLng], [lat, lng]);\n var radius = geofence.getRadius();\n\n if (distance > radius && geofence.inside) {\n geofence.onExit();\n addVindigoEvent('Exiting Geofence', geofence.exitMessage, GEO_EXIT);\n } else if (distance <= radius && !geofence.inside) {\n geofence.onEnter();\n addVindigoEvent('Entering Geofence', geofence.enterMessage, GEO_ENTER);\n }\n }\n window.setTimeout(track, 1000);\n } else {\n addVindigoEvent('Arrived', 'You have arrived at your destination', TRIP_END);\n }\n}", "handleDirectLoadBenQusPart2Country(event) {\n var varBenQusCountryLoad = varCountryCode;\n if (varBenQusCountryLoad == \"CA\") {\n this.setState({ BenQusCountryLoadState: <BenQusCanada /> });\n }\n if (varBenQusCountryLoad == \"DK\") {\n this.setState({ BenQusCountryLoadState: <BenQusDenmark /> });\n }\n if (varBenQusCountryLoad == \"FR\") {\n this.setState({ BenQusCountryLoadState: <BenQusFrance /> });\n }\n if (varBenQusCountryLoad == \"IT\") {\n this.setState({ BenQusCountryLoadState: <BenQusItaly /> });\n }\n if (varBenQusCountryLoad == \"JP\") {\n this.setState({ BenQusCountryLoadState: <BenQusJapan /> });\n }\n if (varBenQusCountryLoad == \"QC\") {\n this.setState({ BenQusCountryLoadState: <BenQusQuebec /> });\n }\n if (varBenQusCountryLoad == \"UK\") {\n this.setState({ BenQusCountryLoadState: <BenQusUK /> });\n }\n if (varBenQusCountryLoad == \"US\") {\n this.setState({ BenQusCountryLoadState: <BenQusUS /> });\n }\n if (varBenQusCountryLoad == \"NO\") {\n this.setState({ BenQusCountryLoadState: <BenNorway /> })\n }\n if (varBenQusCountryLoad == \"KR\") {\n console.log(\"South korea load1\");\n this.loadEligibleStatus();\n }\n if (varBenQusCountryLoad == \"KRLS\") {\n this.setState({ BenQusCountryLoadState: <BenQusSouthKoreaLumpSum /> })\n }\n if (varBenQusCountryLoad == \"AT\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Austria\" country_code={varBenQusCountryLoad}\n PensionDocID=\"AST\"\n />\n })\n }\n if (varBenQusCountryLoad == \"BE\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Belgium\" country_code={varBenQusCountryLoad}\n PensionDocID=\"BLG\"\n />\n })\n }\n if (varBenQusCountryLoad == \"DE\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Germany\" country_code={varBenQusCountryLoad}\n PensionDocID=\"PAG\"\n />\n })\n }\n if (varBenQusCountryLoad == \"BR\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Brazil\" country_code={varBenQusCountryLoad}\n PensionDocID=\"PBZ\"\n />\n })\n }\n if (varBenQusCountryLoad == \"IE\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Ireland\" country_code={varBenQusCountryLoad}\n PensionDocID=\"IPF\"\n />\n })\n }\n if (varBenQusCountryLoad == \"NL\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Netherlands\" country_code={varBenQusCountryLoad}\n PensionDocID=\"NPF\"\n />\n })\n }\n if (varBenQusCountryLoad == \"PT\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Portugal\" country_code={varBenQusCountryLoad}\n PensionDocID=\"PPF\"\n />\n })\n }\n }", "function onPlaylistPreloaded(e) {\n this.getTracks(function(tracks) {\n var nowPlaying = this.getTrack();\n\n log(tracks);\n\n // If parameters.single is not explicitly set to false and\n // there is only one track, render the single-track player.\n if(tracks.length === 1 && playerParameters.single !== false && playerParameters.mini == false && playerParameters.feed == false) {\n playerParameters.single = true;\n }\n\n container.find('.tdspinner').hide();\n\n rerender({\n feed: playerParameters.feed,\n mini: playerParameters.mini,\n nowPlaying: nowPlaying,\n shrink: playerParameters.shrink,\n single: playerParameters.single,\n skin: playerParameters.skin,\n tracks: tracks,\n tracksPerArtist: playerParameters.tracksPerArtist,\n visualizerType: playerParameters.visualizerType\n });\n\n if(this.getSound() && !this.getSound().paused) {\n changePlayButton(false);\n }\n }.bind(this));\n }", "searchTrack(song){\n // No query if nothing was typed\n if (song !== '') { \n SpotifySearch.search(song).then(trackList => {\n this.setState({trackList: trackList});\n })\n }\n if (this.state.playListName !== ''){\n this.setState({saveClass: ''})\n }\n }", "function start(){\n //Add a track\n var track = media.addTrack( \"Track1\" );\n //Add more tracks...\n media.addTrack( \"Track\" + Math.random() );\n media.addTrack( \"Track\" + Math.random() );\n\n //Add a track event\n var event = track.addTrackEvent({\n type: \"text\",\n popcornOptions: {\n start: 0,\n end: 3,\n text: \"This is some text here.... Isn't it nice?\",\n target: \"Right1\"\n }\n });\n var superevent = track.addTrackEvent({\n type: \"supertext\",\n popcornOptions: {\n start: 5,\n end: 10,\n text: \"SUPER\",\n target: \"Right2\",\n defaultTransition: 600\n }\n });\n var superevent2 = butter.tracks[ 1 ].addTrackEvent({\n type: \"supertext\",\n popcornOptions: {\n start: 5,\n end: 10,\n text: \"SUPERrrrrrrr\",\n }\n });\n\n //Try uncommenting and see what happens....\n /*\n //Add a track event to the third track\n butter.tracks[ 2 ].addTrackEvent({ \n type: \"footnote\",\n popcornOptions: {\n start: 1,\n end: 2,\n text: \"More text!!!!\"\n target: \"Bottom\"\n }\n });\n */\n\n } //start", "search(searchTerm) {\n Spotify.search(searchTerm).then(searchTracks => {\n this.setState({searchResults : searchTracks});\n });\n}", "function allesLoeschen () {\r\n\tshoppinglist = new Array(); //neues Array überschreibt die alte gefüllte Shoppinglist durch eine neue leere\r\n\tpopulateStorage(); \r\n \tzeigeShoppinglist(); //lädt die Seite Shoppinglist erneut\r\n\t}", "componentWillMount() {\n super.componentWillMount();\n //fetch no que é necessario\n // this.setState({ sendObject: this.props.sendControlModule, showProgress: false });\n this.props.fetchDefault(request.fetchPlaces);\n\n this.setState({ \n saveRequest: request.sendControlModule,\n showProgress: false\n });\n }", "function onPageshow(e){\n\t\t\t\t\t\t\t\t\n\t\t\t\t//get gloabl data if not already\n\t\t\t\tif (!App.data.firstLoadData) App.data.getServices();\n\t\t\t\t\t\t\t\n\t\t\t}", "showShops() {\n this.api.getData()\n .then(data => {\n const result = data.responseJSON.results;\n // Muestra los pines en el Mapa\n this.showPins(result);\n } )\n }", "savePlaylist() {\n const trackUris = this.state.playlistTracks.map(playlistTrack => playlistTrack.uri);\n Spotify.savePlaylist(this.state.playlistName, trackUris);\n // Once the playlist is save set the state back to empty\n this.setState({\n playlistName: \"Dan's Playlist\",\n searchResults: [],\n playlistTracks: []\n });\n }", "function initialize() {\n\n neighbourpano_from_2 = localStorage.getItem(\"neighbourpano_from_2_to_1\");\n\n if (neighbourpano_from_2 != null) {\n loadSV(neighbourpano_from_2);\n } else {\n loadSV(\"pano00001\");\n }\n }", "loadingData() {}", "loadingData() {}" ]
[ "0.5531132", "0.54468215", "0.542647", "0.5424072", "0.54053086", "0.53733295", "0.5353028", "0.5350978", "0.5337433", "0.53164256", "0.5276098", "0.5254721", "0.52413976", "0.5215806", "0.51991415", "0.5199064", "0.5198783", "0.51940495", "0.5178993", "0.51759356", "0.5171731", "0.5171626", "0.5162307", "0.51546836", "0.51486343", "0.5140485", "0.5130584", "0.51249033", "0.51198137", "0.511739", "0.5105141", "0.5101372", "0.5094963", "0.5091206", "0.50839436", "0.5083496", "0.50832844", "0.5082071", "0.507864", "0.50783646", "0.506774", "0.50615317", "0.5061004", "0.5060655", "0.50580555", "0.5056456", "0.5047648", "0.50440335", "0.5042282", "0.5037298", "0.5036921", "0.5036301", "0.50350267", "0.50271565", "0.5022919", "0.5020817", "0.5012387", "0.5011846", "0.50077206", "0.50049037", "0.49990332", "0.49955496", "0.49952358", "0.49920708", "0.49899274", "0.49876627", "0.49838424", "0.4980637", "0.4972501", "0.4971863", "0.49708474", "0.4970125", "0.49678114", "0.4967779", "0.49665996", "0.49608114", "0.49597576", "0.4955774", "0.49552158", "0.49532416", "0.49525586", "0.49506024", "0.4950482", "0.4949301", "0.49471158", "0.49455428", "0.49446595", "0.49445608", "0.49429667", "0.4940913", "0.49341327", "0.4934087", "0.49292117", "0.49275988", "0.49246046", "0.49227884", "0.4921254", "0.49212316", "0.49199638", "0.49199638" ]
0.50803757
38
convert the object into HTML
toHtml() { // 1. dynamic list of action buttons each one with it's design from the class // 2. var answer = '<div class="academic-papers-panel"><div class="personal-row-col col-reverse-mobile w-100 align-space-between"><h3>' + this.title + '</h3>' if (this.fileLinks[1]["link"] != "") { answer += '<a class="cite-btn" onclick="copy_cite(\'' + this.title.replaceAll("'", "").replaceAll(" ", "_") + '\');">' + CITE_SYMBOL + 'Cite</a></div>'; } else { answer += "</div>"; } answer += '<h4>' + this.authors + "<br>" + this.publisher + '</h4>'; answer += descriptionTrim(this.description) + '<div class="personal-row space-between align-items-center mobile-row-breaker">'; if(window.screen.width > 400) { answer += '<div class="publication-details"><span>' + this.publicationStatus + '</span><span>' + this.year + '</span><span>' + this.type + '</span></div>'; } if (this.fileLinks[0]["link"] != "" && this.isFileFormat(this.fileLinks[0]["link"])) { answer+='<div class="inner-publication-card-div">'; answer+='<a href="' + this.fileLinks[0]["link"] + '" class="download-btn acadmic-card-margin-fix acadmic-download-btn">Download</a>' answer+='<a href="' + this.fileLinks[0]["link"] + '" class="read-online-btn acadmic-card-margin-fix">Read Online</a></div>' // added the Read online button and put both bottums inside the condition answer+='</div>'; } answer+='</div></div><input type="text" style="display: none;" id="' + this.title.replaceAll("'", "").replaceAll(" ", "_") + '" value="' + this.fileLinks[1]["link"] + '"></div></div>'; return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _coerceObjectToHTML(obj) {\n var t = TABLE({border: 1, cellpadding: 2, cellspacing: 0});\n eachProperty(obj, function(name, value) {\n t.push(TR(TH(String(name)), TD(String(value))));\n });\n return toHTML(t);\n}", "function object2html(obj, level){\n if (!level) level = 0; // default to 0\n var html = '';\n if (level==0){\n html += '{'\n }\n for (key in obj){\n if (key != 'metadata'){\n \n var val = obj[key];\n html += '\\n';\n \n // indenting\n var i = 0;\n var indent = '';\n for (i=0;i<=level;i++){\n indent += ' ';\n }\n html += indent;\n \n if(typeof(val) == \"object\"){\n if (val instanceof Array){\n // an array of objects, run this function on each array entry\n html += key+': ['\n for (j in val){\n html += '\\n'+indent+' {';\n html += object2html(val[j], level+2);\n html += '\\n'+indent+' },'; \n }\n html += '\\n'+indent+']';\n }else{\n // recursively run this function\n html += key+': {'\n html += object2html(val, level+1);\n html += '\\n'+indent+'},'; \n }\n }else{\n // standard kv pair\n html += key+': ';\n if (typeof val == 'number'){\n html += '<span class=\"int\">'+val+'</span>';\n } else if (typeof val == 'boolean'){\n if (val) html += '<span class=\"bool\">true</span>';\n else html += '<span class=\"bool\">false</span>';\n }else if (typeof val == 'string'){\n\n // hack hackety hack hack\n val = htmlentities(val)\n \n // make links clickable\n var exp = /(\\b(https?|ftp|file):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/i;\n val = val.replace(exp,\"<a href='$1'>$1</a>\");\n if (key == 'id'){\n val = '<a href=\"https://graph.facebook.com/'+val+'\">'+val+'</a>';\n }\n \n html += '<span class=\"string\">\"'+val+'\"</span>'; \n }\n html += ',';\n }\n }\n }\n if (level==0){\n html += '\\n}'\n }\n return html;\n}", "function objectToHTML(json) {\n var output = '{<ul class=\"obj collapsible\">';\n var hasContents = false;\n for (var prop in json) {\n hasContents = true;\n output += '<li>';\n output += '<span class=\"prop\">' + htmlEncode(prop) + '</span>: ';\n output += valueToHTML(json[prop]);\n output += '</li>';\n }\n output += '</ul>}';\n\n if (!hasContents) {\n output = \"{ }\";\n }\n\n return output;\n }", "function detail_obj_to_html(obj, indent) {\n var result = '';\n $.each(obj, function(key, val) {\n var formatted_value;\n if (val === null) {\n formatted_value = \"\";\n } else if (typeof(val) === 'object') {\n formatted_value = detail_obj_to_html(val, indent + 1);\n } else {\n formatted_value = val;\n }\n result += '<p style=\"margin-left: ' + indent + 'em\"><strong>' + key + '</strong>: ' + formatted_value + '</p>';\n });\n return result;\n }", "function jsonToHTML (data) {\n \n var html;\n \n \n \n return html;\n}", "function teaObjtoHTML(obj) {\n var availability = availFunction(obj.available);\n\n var teaInfo = '<li class=\"list-group-item ' + obj.category + '\">';\n teaInfo += '<div class=\"col-md-6\">name: ' + obj.name + '; id#: ' + obj.id + '<br> ';\n teaInfo += 'Category: ' + obj.category + ' <br> ';\n teaInfo += 'price per cup: ' + obj.priceCup + ' <br> ';\n teaInfo += 'price per pot: ' + obj.pricePot + ' <br> ';\n teaInfo += 'price per oz: ' + obj.priceOz + ' <br> ';\n teaInfo += 'description: ' + obj.description + ' <br> ';\n teaInfo += 'tea types: ' + obj.teaTypes + '<br>';\n teaInfo += 'availability: ' + availability + ' <br> ';\n teaInfo += '<img class=\"col-md-12 \" src=\"https://static1.squarespace.com/static/5254245de4b0d49865bf2ad0/551db655e4b0c1bae096e600/551db6e9e4b0a007421e8164/1428010733370/golden+assam.jpg?format=500w\">';\n teaInfo = appendDeleteButton(teaInfo, obj); // see below\n teaInfo += '</li>';\n\n return teaInfo;\n\n }", "function createHtml(o){\n var b = '',\n attr,\n val,\n key,\n keyVal,\n cn;\n\n if(typeof o == \"string\"){\n b = o;\n } else if (Ext.isArray(o)) {\n for (var i=0; i < o.length; i++) {\n if(o[i]) {\n b += createHtml(o[i]);\n }\n };\n } else {\n b += '<' + (o.tag = o.tag || 'div');\n for (attr in o) {\n val = o[attr];\n if(!confRe.test(attr)){\n if (typeof val == \"object\") {\n b += ' ' + attr + '=\"';\n for (key in val) {\n b += key + ':' + val[key] + ';';\n };\n b += '\"';\n }else{\n b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '=\"' + val + '\"';\n }\n }\n };\n // Now either just close the tag or try to add children and close the tag.\n if (emptyTags.test(o.tag)) {\n b += '/>';\n } else {\n b += '>';\n if ((cn = o.children || o.cn)) {\n b += createHtml(cn);\n } else if(o.html){\n b += o.html;\n }\n b += '</' + o.tag + '>';\n }\n }\n return b;\n }", "function createHtml(o){\n var b = '',\n attr,\n val,\n key,\n cn;\n\n if(typeof o == \"string\"){\n b = o;\n } else if (Ambow.isArray(o)) {\n for (var i=0; i < o.length; i++) {\n if(o[i]) {\n b += createHtml(o[i]);\n }\n };\n } else {\n b += '<' + (o.tag = o.tag || 'div');\n for (attr in o) {\n val = o[attr];\n if(!confRe.test(attr)){\n if (typeof val == \"object\") {\n b += ' ' + attr + '=\"';\n for (key in val) {\n b += key + ':' + val[key] + ';';\n };\n b += '\"';\n }else{\n b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '=\"' + val + '\"';\n }\n }\n };\n // Now either just close the tag or try to add children and close the tag.\n if (emptyTags.test(o.tag)) {\n b += '/>';\n } else {\n b += '>';\n if ((cn = o.children || o.cn)) {\n b += createHtml(cn);\n } else if(o.html){\n b += o.html;\n }\n b += '</' + o.tag + '>';\n }\n }\n return b;\n }", "function _html(pobj, obj, template, options, index){\n \n //Create a new ihtml object for the parent and it's children\n var parent = new iHTML(),\n children = new iHTML();\n \n //Set the default html element key\n\t\tvar ele = \"<>\";\n\t\t\n\t\t//Look into the properties of this template\n\t\tfor (var prop in template) {\n\t\t \n\t\t\tswitch(prop) {\n\t\t\t\t\n\t\t\t\t//DEPRECATED (use <> instead)\n\t\t\t\tcase \"tag\":\n\t\t\t\t \n\t\t\t\t //Signal we're using a deprecated property\n\t\t\t\t //TODO output warning??\n\t\t\t\t ele = \"tag\";\n\t\t\t\t \n\t\t\t\t//HTML element\n\t\t\t\tcase \"<>\":\n\t\t\t\t\t\n\t\t\t\t\t//Get the element name (this can be tokenized)\n \t\tparent.name = _getValue(pobj || obj, template, ele, options, index);\n \t\t\n \t\t//Create a new element\n\t\t parent.appendHTML(\"<\" + parent.name);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//Data object\n\t\t case \"obj\":\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//Encode text\n\t\t\t\tcase \"text\":\n\t\t\t\t\t\n\t\t\t\t\t//Determine what kind of object this is\n\t\t\t\t\t// array => NOT SUPPORTED\n\t\t\t\t\t// other => text\n\t\t\t\t\t// Encode the value as text and add it to the children\n\t\t\t\t\tif(!_isArray(template[prop])) children.appendHTML( json2html.toText( _getValue(obj,template,prop,options,index) ) );\n\t\t\t\t\t \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//DEPRECATED (use HTML instead)\n\t\t\t\tcase \"children\":\n\t\t\t\t \n\t\t\t\t//TODO output warning??\n\t\t\t\t \n\t\t\t\t//Encode as HTML\n\t\t\t\t// accepts array of children, functions, string, number, boolean\n\t\t\t\tcase \"html\":\n\t\t\t\t \n\t\t\t\t\t//Determine if we have more than one template\n\t\t\t\t\t// array & function => children\n\t\t\t\t\t// other => html\n\t\t\t\t\tswitch(_typeof(template[prop],true)) {\n \n case \"array\":\n \n //render the children\n\t\t\t\t children.append( _render(obj, template[prop], options, index) );\n break;\n \n case \"function\":\n \n //Get the result from the function\n var temp = template[prop].call(obj, obj, index, options.data, options.$ihtml);\n \n //Determine what type of result we have\n switch(_typeof(temp,true)) {\n \n //Only returned by json2html.render or $.json2html calls\n case \"object\":\n \n //Check the type of object\n switch(temp.type) {\n \n //Add the object as a template\n case \"iHTML\":\n children.append(temp);\n break;\n \n //Otherwise don't render\n default:\n \n break;\n }\n \n break;\n \n //Not supported\n case \"function\":\n case \"undefined\":\n case \"null\":\n break; \n \n //Render the array as a string\n // append to html\n case \"array\":\n children.appendHTML(temp.toString());\n break;\n \n //string, number, boolean, etc..\n // append to html\n default:\n \tchildren.appendHTML(temp);\n break;\n }\n break;\n \n default:\n //Get the HTML associated with this element\n children.appendHTML( _getValue(obj,template,prop,options,index) );\n break;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t//Add the property as a attribute if it's not a key one\n\t\t\t\t\tvar isEvent = false;\n\t\t\t\t\t\n\t\t\t\t\t//Check if the first two characters are 'on' then this is an event\n\t\t\t\t\tif( prop.length > 2 )\n\t\t\t\t\t\tif( prop.substring(0,2).toLowerCase() === \"on\" ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Determine if we should add events\n\t\t\t\t\t\t\tif(options.output === \"ihtml\") {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t//if so then setup the event data\n\t\t\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\t\t\t\"obj\":obj,\n\t\t\t\t\t\t\t\t\t\"data\":options.data,\n\t\t\t\t\t\t\t\t\t\"index\":index\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//create a new id for this event\n\t\t\t\t\t\t\t\tvar id = _id();\n\n\t\t\t\t\t\t\t\t//append the new event\n\t\t\t\t\t\t\t\tparent.events.push( {\"id\":id,\"type\":prop.substring(2),\"data\":data,\"action\":template[prop]} );\n\n\t\t\t\t\t\t\t\t//Insert temporary event property -j2h-e\n\t\t\t\t\t\t\t\tparent.appendHTML(\" -j2h-e='\" + id + \"'\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//this is an event\n\t\t\t\t\t\t\tisEvent = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t//If this wasn't an event AND we actually have a value then add it as a property\n\t\t\t\t\tif(!isEvent){\n\t\t\t\t\t\t//Get the value\n\t\t\t\t\t\tvar val = _getValue(obj, template, prop, options, index);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Make sure we have a value\n\t\t\t\t\t\tif(val !== undefined) {\n\t\t\t\t\t\t\tvar out;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Determine the output type of this value (wrap with quotes)\n\t\t\t\t\t\t\tif(typeof val === \"string\") out = '\"' + val.replace(/\"/g, '&quot;') + '\"';\n\t\t\t\t\t\t\telse out = val;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//create the name value pair\n\t\t\t\t\t\t\tparent.appendHTML(\" \" + prop + \"=\" + out);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check to see if the parent is an html element\n\t\t// or just a container\n\t\tif(parent.name) {\n\t\t \n\t\t //Determine if this is a void element\n // shouldn't have any contents\n if(_isVoidElement(parent.name)) parent.appendHTML(\"/>\");\n else {\n \n \t//Close the opening tag\n \tparent.appendHTML(\">\");\n \t\n \t//add the children\n \tparent.append(children);\n \t\n \t//add the closing tag\n \tparent.appendHTML(\"</\" + parent.name + \">\");\n }\n\t\t} else {\n\t\t \n\t\t //Otherwise we don't have a parent html element\n\t\t // so just add the children to the empty parent\n \tparent.append(children);\n\t\t}\n\t\t\n\t\treturn(parent);\n }", "function generateContent(object) {\n let { name, capital, languages, population, flag, currency } = object;\n return `<div class = \"country-wrapper\">\n <img src =\"${flag}\">\n <p>${name}</p>\n <p>${capital}</p>\n <p>${languages}</p>\n <p>${population}</p>\n <p>${currency}</p>\n </div>`;\n}", "function renderObjectAsUL(obj){\r\n var output = '<ul>'; \r\n for(x in obj){\r\n output += '<li><strong>' + x + ' </strong>: ' + obj[x] + '</li>';\r\n }; \r\n output+= '</ul>';\r\n return output;\r\n }", "function _render(obj, template, options, index, pobj) {\n\n\t\tvar ihtml = new iHTML();\n\t\t\n\t\t//Check to see what type of object we're rending\n\t\tswitch(_typeof(obj,true)) {\n \n case \"array\":\n \n //Itterrate through the array and render each\n var len=obj.length;\n for(var j=0;j<len;++j) {\t\n \n //Render the object using this template depending on the type of object\n ihtml.append( _renderObj(obj[j], template, options, j, pobj) );\n }\n break;\n \n //Don't render for undefined or null objects\n case \"undefined\":\n case \"null\":\n break;\n \n //Make sure to allow for literals as well\n default:\n \n //Render the object using this template depending on the type of object\n ihtml.append( _renderObj(obj, template, options, index, pobj) );\n break;\n\t\t}\n\t\t\n\t\treturn(ihtml);\n\t}", "function changeJavaScriptToHTML(obj)\n\t{\n\t var string = new String(obj);\n\t var result = \"\";\n\t\n\t for (var i=0; i < string.length; i++ ) {\n\t if (string.charAt(i) == \"<\") result += \"&lt;\";\n\t else if (string.charAt(i) == \">\") result += \"&gt;\";\n\t else if (string.charAt(i) == \"&\") result += \"&amp;\";\n\t else if (string.charAt(i) == \"'\") result += \"&#39;\";\n\t else if (string.charAt(i) == \"\\\"\") result += \"&quot;\";\n\t else result += string.charAt(i);\n\t }\n\t return result;\n\t}", "function treeHTML(element, object) {\n var typeName = element.nodeName;\n //Personalized converter types\n typeName = \"I\" + typeName;\n object[\"elemento\"] = typeName;\n\n var nodeList = element.childNodes;\n if (nodeList !== null) {\n if (nodeList.length) {\n object[\"content\"] = [];\n for (var i = 0; i < nodeList.length; i++) {\n if (nodeList[i].nodeType === 3) {// 1 Element 2 Attr 3 Text\n if (!nodeList[i].nodeValue.startsWith('\\n')) {\n object[\"texto\"] = nodeList[i].nodeValue;\n }\n } else {\n object[\"content\"].push({});\n treeHTML(nodeList[i], object[\"content\"][object[\"content\"].length - 1]);\n }\n }\n }\n }\n if (element.attributes !== null) {\n if (element.attributes.length) {\n object[\"attributes\"] = {};\n for (var i = 0; i < element.attributes.length; i++) {\n if (element.value) {\n object[\"attributes\"][\"valor\"] = element.value;\n }\n if (element.attributes[i].nodeName === \"style\") {\n //Get style an remove spaces to separated after\n var styles = element.attributes[i].nodeValue.toString().replace(/ /g, '');\n var arrayStyle = styles.split(\";\");\n for (var p = 0; p < arrayStyle.length; p++) {\n if (arrayStyle[p] !== \"\") {//Add another estilos\n var getPropertie = arrayStyle[p].split(\":\");\n if (getPropertie[0] === \"width\") {\n object[\"attributes\"][\"ancho\"] = getPropertie[1];\n } else if (getPropertie[0] === \"height\") {\n object[\"attributes\"][\"alto\"] = getPropertie[1];\n } else if (getPropertie[0] === \"display\") {\n object[\"attributes\"][\"display\"] = getPropertie[1];\n } else if (getPropertie[0] === \"max-width\") {\n object[\"attributes\"][\"maxAlto\"] = getPropertie[1];\n }\n //display\n // console.log(\"NameProp: \" + getPropertie[0] + \" Valueprop: \" + getPropertie[1]);\n }\n }\n }\n else {\n object[\"attributes\"][element.attributes[i].nodeName] = element.attributes[i].nodeValue;\n }\n }\n }\n }\n }", "function renderDbValuesToHtml(jsonObj){\n\n\n\n // pentru tab-ul \"Your details\"\n\n var output = Mustache.render(\"<h5>First name: <span> {{first_name}}</span></h5>\\n\" +\n \" <h5>Last name: <span> {{last_name}}</span></h5>\\n\" +\n \" <h5>Country: <span> {{country}}</span></h5>\\n\" +\n \" <h5>Registered at: <span> {{created_at}}</span></h5>\\n\"\n\n , jsonObj );\n\n document.getElementById('user-info').innerHTML = output;\n\n\n // Pentru numele de sub poza de profil din header\n document.getElementById('header-name').innerHTML = Mustache.render(\"{{first_name}} {{last_name}}\",jsonObj);\n\n\n // pentru culoarea nivelului (kimono + titlu) vom apela functia din level-of-belt-action.js\n setLevelColorForKimonoAndTitle(jsonObj.stats.level.color);\n\n // pentru header si poza de profil\n\n document.getElementById('photo_bg').setAttribute('src',jsonObj.photo_url);\n document.getElementById('pht_avtr').setAttribute('src',jsonObj.photo_url);\n\n}", "function displayJson( obj, domItem ) {\n for( node in obj ) {\n displayStr += node;\n }\n domItem.innterHTML = displayStr;\n}", "function printStructure( obj ){\r\tvar result = toStringObj( obj );\r\tif( result == null || result == undefined ) {\r\t\talert(\"non result\");\r\t\treturn;\r\t}\r\t\r\tvar outputPath = baseURL+ baseDir;\r\tvar filePath = outputPath;\r\t\r if(File.fs == \"Windows\" ) {\r filePath.replace(/([A-Za-z]+)\\:(.*)/,\"file:///\" +RegExp.$1+\"|\"+RegExp.$2 );\r filePath = \"file:///\" +RegExp.$1+\"|\"+RegExp.$2;\r }\r else {\r //dir.replace(/([A-Za-z]+)\\:(.*)/,\"file:///\" +RegExp.$1+\"|\"+RegExp.$2 );\r filePath = \"file://Macintosh HD\" + filePath;\r }\r\r var htmlFile = new File( outputPath + getNameRemovedExtendType(document) + \".html\");\r\thtmlFile.open(\"w\");\r\thtmlFile.encoding = \"utf-8\";\r \r var cssFileName = getNameRemovedExtendType(document) + \".css\";\r var cssFile = new File( outputPath + cssFileName);\r\tcssFile.open(\"w\");\r\tcssFile.encoding = \"utf-8\";\r var css = [];\r var html = [\r '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">',\r'<html>',\r'\t<head>',\r'\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />',\r'\t\t<title></title>',\r'\t\t<link rel=\"stylesheet\" charset=\"utf-8\" href=\"' + cssFileName + '\" media=\"all\" />',\r'\t</head>',\r'\t<body>'];\r \r css.push('.artlayer { position: absolute; overflow: hidden; }');\r css.push('.text { position: absolute; }');\r for (var i=0,l=obj.length;i<l;i++)\r {\r if (obj[i].type == \"image\")\r {\r html.push('\t\t<div id=\"image' + i + '\" class=\"artlayer\"></div>');\r css.push('#image' + i + ' { left:' + parseInt( obj[i].position[0] ) +'px; top: ' + parseInt( obj[i].position[1] ) +'px; width: ' + obj[i].width + 'px; height: ' + obj[i].height + 'px; background-image: url(\"' + unescape(obj[i].filename) + '\"); background-size: ' + obj[i].width + 'px ' + obj[i].height + 'px; }');\r }\r else\r {\r html.push('\t\t<div id=\"text' + i + '\" class=\"text\">' + obj[i].text +'</div>');\r css.push('#text' + i + ' { left:' + parseInt( obj[i].position[0] ) +'px; top: ' + parseInt( obj[i].position[1] ) +'px; width: ' + obj[i].width + 'px; height: ' + obj[i].height + 'px; }');\r }\r }\r \r html.push('\t</body>');\r html.push('</html>');\r htmlFile.write(html.join(\"\\n\"));\r htmlFile.close();\r cssFile.write(css.join(\"\\n\"));\r cssFile.close();\r \r}", "function objectToHTML(json, path) {\n let numProps = Object.keys(json).length;\n if (numProps === 0) {\n return '{ }';\n }\n let output = '';\n for (const prop in json) {\n let subPath = '';\n let escapedProp = JSON.stringify(prop).slice(1, -1);\n const bare = isBareProp(prop);\n if (bare) {\n subPath = `${path}.${escapedProp}`;\n }\n else {\n escapedProp = `\"${escapedProp}\"`;\n }\n output += `<li><span class=\"prop${(bare ? '' : ' quoted')}\" title=\"${htmlEncode(subPath)}\"><span class=\"q\">&quot;</span>${jsString(prop)}<span class=\"q\">&quot;</span></span>: ${valueToHTML(json[prop], subPath)}`;\n if (numProps > 1) {\n output += ',';\n }\n output += '</li>';\n numProps--;\n }\n return `<span class=\"collapser\"></span>{<ul class=\"obj collapsible\">${output}</ul>}`;\n }", "function opinion2html(opinion) {\r\n //in the case of Mustache, we must prepare data beforehand:\r\n opinion.createdDate = new Date(opinion.created).toDateString();\r\n\r\n //get the template:\r\n const template = document.getElementById(\"mTmplOneOpinion\").innerHTML;\r\n //use the Mustache:\r\n //const htmlWOp = Mustache.render(template,opinion);\r\n const htmlWOp = render(template, opinion);\r\n\r\n //delete the createdDate item as we created it only for the template rendering:\r\n delete opinion.createdDate;\r\n\r\n //return the rendered HTML:\r\n return htmlWOp;\r\n}", "function treeHTML(element, object) {\n\t\t\tobject[\"type\"] = element.nodeName;\n\t\t\tvar nodeList = element.childNodes;\n\t\t\tif (nodeList != null) {\n\t\t\t\tif (nodeList.length) {\n\t\t\t\t\tobject[\"content\"] = [];\n\t\t\t\t\tfor (var i = 0; i < nodeList.length; i++) {\n\t\t\t\t\t\tif (nodeList[i].nodeType == 3) {\n\t\t\t\t\t\t\tobject[\"content\"].push(nodeList[i].nodeValue);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tobject[\"content\"].push({});\n\t\t\t\t\t\t\ttreeHTML(nodeList[i], object[\"content\"][object[\"content\"].length -1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (element.attributes != null) {\n\t\t\t\tif (element.attributes.length) {\n\t\t\t\t\tobject[\"attributes\"] = {};\n\t\t\t\t\tfor (var i = 0; i < element.attributes.length; i++) {\n\t\t\t\t\t\tobject[\"attributes\"][element.attributes[i].nodeName] = element.attributes[i].nodeValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function makeHtml(data) {\n var html = (new Showdown.converter()).makeHtml(data);\n $(document.body).html(html);\n }", "renderHTML() {\n \n }", "toHtml()\n\t{\n //to finish \n var answer = '<div class=\"student-project-panel\"><div class=\"personal-row\"> <h3>' \n\t\t+ this.name + '</h3><span class=\"'+ map_dot[this.status]+'\"></span></div></div>'\n\t\treturn answer;\n\t}", "function jsonHtml ( data ) {\n //!-bringVar:\n var ObjKeys = Object.keys\n var tagtxt = \"\"\n var postTag = []\n if ( typeof data[ 0 ] == 'object'){ jsonHtmlcore( data[ 0 ] ) }\n for ( var i = 1; i < data.length; i++ ){\n if ( data[ i ] instanceof Array ) { tagtxt += jsonHtml ( data[ i ] ); continue }\n jsonHtmlcore( data[ i ] )\n }\n return tagtxt + postTag.reverse().toString().replace( /,/g , '')\n //______ jsonHtmlore ___________//\n function jsonHtmlcore ( data ) {\n if ( data || data == '' ) {\n if ( typeof data == \"object\" ){ \n var dataObjKeys = ObjKeys( data ) \n var tagName = dataObjKeys[ 0 ]\n var content = data[ tagName ]\n var objclass = content \n var cls = \"\"\n /// gestion class \\\\\\\n if ( typeof content == 'object' ) { \n cls= \"class='\"\n while ( typeof ( cls += ObjKeys( content )[0] + \" \", content = content[ObjKeys( content )[0]] ) == 'object' ){}\n cls += \"' \"\n }\n content = cls + content\n /// gestion id \\\\\\\n // if ( ObjKeys( data )[ 1 ] == 'id' ) { id = \"id='\"+data[ ObjKeys( data )[ 1 ] ] + \"'\" }\n for ( var i = 1; i < dataObjKeys.length; i++){\n content = dataObjKeys[i]+ \"='\"+data[ dataObjKeys[i]] + \"' \" + content }\n tagtxt += '<'+tagName+ ( content? ' '+content+'' : '') + '>' \n postTag.push('</'+tagName+'>')\n return jsonHtmlcore\n }\n tagtxt += data // texte dans inner\n return jsonHtmlcore\n }\n /// <br /> \\\\\\ \n tagtxt += '<br />' // br dans inner\n return jsonHtmlcore\n }\n }", "function make_elements(obj){\n return [\n base.make_text_element('h3',obj.title),\n base.make_text_element('p', obj.description),\n base.make_text_element('p', obj.publishedAt),\n base.make_image(obj.urlToImage)\n ]\n }", "function html(object, root) {\n var doc, docStart, docEnd, sectionStart, sectionEnd, s;\n \n // templates\n docStart = '<html><head>'\n docStart += '<title>{title}</title>'\n docStart += '<link rel=\"stylesheet\" href=\"'+root+'/files/html.css\" />'\n docStart += '</head><body>';\n sectionStart = \"<h1>{section}</h1><div>\";\n sectionEnd = \"</div>\";\n docEnd = \"</body></html>\";\n \n doc = \"\";\n doc += docStart;\n \n // handle sections\n s=\"\";\n for(s in object) {\n doc += sectionStart.replace(\"{section}\",s);\n doc = doc.replace(\"{title}\",s);\n \n switch(s) {\n case \"home\":\n doc += processHome(object[s], root);\n break;\n case \"task\":\n doc += processTasks(object[s], root, s);\n break;\n case \"category\":\n doc += processCategory(object[s], root, s);\n break;\n case \"user\":\n doc += processUser(object[s], root, s);\n break;\n case \"actions\":\n doc += processActions(object[s], root, s);\n break;\n case \"error\":\n doc += processError(object[s], root);\n break;\n default:\n doc += \"<pre>\"+JSON.stringify(object, null, 2)+\"<pre>\";\n break;\n }\n doc += sectionEnd;\n }\n doc += docEnd;\n \n return doc;\n}", "toHTML() {\n return '';\n }", "function getSourceHtml(sourceObject) {\n let htmlString = '';\n\n for (const category in sourceObject) {\n htmlString += getSourceCategoryHtml(sourceObject[category], category);\n }\n\n return htmlString;\n}", "_generateMarkup() {\n // console.log(this._data); // data is in the form of an array. We want to return one of the below html elements for each of the elements in that array\n\n return this._data.map(this._generateMarkupPreview).join('');\n }", "get html() {\n let html = '<div style=\"background: #fff; border: solid 1px #000; border-radius: 5px; font-weight: bold; margin-bottom: 1em; overflow: hidden;\">';\n html += '<div style=\"background: #000; color: #fff; text-align: center;\">' + this._header + '</div>';\n html += '<div style=\"padding: 5px;\">' + this._content + '</div>';\n html += '</div>';\n return html;\n }", "function readyToPutInTheDOM(arr) {\n return arr.map(function(obj) {\n return \"<h1>\" +obj.name +\"</h1>\" + \"<h2>\" + obj.age +\"</h2>\";\n });\n }", "function _renderObj(obj, template, options, index, pobj) {\n\t\t\n\t\tvar ihtml = new iHTML();\n\t\t\n\t\t//Check the type of template we want to apply\n\t\tswitch(_typeof(template,true)) {\n\t\t \n //Array of templates\n case \"array\":\n \n //Itterate through each template\n var t_len = template.length;\n for(var t=0; t < t_len; ++t) {\n \t\n \t//Render the template and append\n \tihtml.append( _renderObj(obj, template[t], options, index) );\n }\n \n break;\n \n //single template & single object\n case \"object\":\n \n //Check to see if this template uses it's own data object\n // allows us to run the template under a different data object\n // AND we haven't already got the parent before (in the case of an array)\n if( _typeof(template.obj) === \"function\" && !pobj) {\n \n //Set the parent object\n pobj = obj;\n \n //Get the new object\n obj = template.obj.call(obj,obj,index);\n \n //Render the object (might be an array)\n ihtml.append( _render(obj, template, options, index, pobj) );\n } else {\n \n //Render the component\n // or html\n if(template[\"[]\"]) ihtml.append( _component(pobj, obj, template, options, index) );\n else ihtml.append( _html(pobj, obj, template, options, index) );\n }\n break;\n\t\t}\n\t\t\n\t\treturn(ihtml);\n\t}", "function convertToListHtml(mensaje){\n if(Array.isArray(mensaje)){\n //console.log(\"es un arreglo\"+mensaje.length);\n if(mensaje.length>=1){\n var arrayMensaje = mensaje;\n var mensaje = \"<ul>\";\n for(var i = 0;i<arrayMensaje.length;i++){\n mensaje +='<li>'+arrayMensaje[i]+'</li>';\n }\n mensaje += '</ul>';\n }\n }else if(typeof mensaje === 'object'){\n var objectMensaje = mensaje;\n mensaje = \"<ul>\";\n $.each(objectMensaje,function(i,item){\n mensaje += \"<li>\"+item+\"</li>\";\n });\n mensaje += '</ul>';\n }\n return mensaje;\n }", "function valueToHTML(value) {\n var valueType = typeof value;\n\n var output = \"\";\n if (value == null) {\n output += decorateWithSpan('null', 'null');\n } else if (value && value.constructor == Array) {\n output += arrayToHTML(value);\n } else if (valueType == 'object') {\n output += objectToHTML(value);\n } else if (valueType == 'number') {\n output += decorateWithSpan(value, 'num');\n } else if (valueType == 'string') {\n if (/^(http|https):\\/\\/[^\\s]+$/.test(value)) {\n value = htmlEncode(value);\n output += '<a href=\"' + value + '\">' + value + '</a>';\n } else {\n output += decorateWithSpan('\"' + value + '\"', 'string');\n }\n } else if (valueType == 'boolean') {\n output += decorateWithSpan(value, 'bool');\n }\n\n return output;\n }", "function outPutDATAtoHTML() {\n let displayResult = STATE.searchResult.map(singleRest => {\n return `<div class=\"col-12\">\n <div class=\"col text-color\">\n <p>Name: ${singleRest.name} </p>\n <p>Address: ${singleRest.address}</p>\n <p> Price Range <img class=\"raiting-size\" src=\"images/dollar.png\" alt=\"Price rating\"> ${\n singleRest.priceRange\n } </p>\n <p>Rating <img class=\"raiting-size\" src=\"images/star.png\" alt=\"Restaurant rating\"> ${\n singleRest.ratings\n }</p>\n </div>\n <hr>\n </div>`;\n });\n \n $(\"#show-search-result\").html(displayResult);\n }", "function renderObjects(data){\n\t\tvar template = $('#objectTemplate').html();\n\t\tvar html = Mustache.to_html(template, data);\n\t $('#objects').html(html);\n\t $('body').removeClass(\"loading\");\n }", "tableObject(obj){\n\t\tif (Array.isArray(obj)){\n\t\t\t//if its an array create an ordered list\n\t\t\tlet datarows=obj.map((val,i)=>{\n\t\t\t\treturn <li key={i}>{this.tableObject(val)}</li>\n\t\t\t})\n\t\t\treturn(<ol>{datarows}</ol>)\n\t\t}\n\t\telse if ((typeof(obj)===\"object\") && (obj!==null)){\n\t\t\t//if its an object, create a new table inside the table\n\t\t\tlet datarows=Object.keys(obj).filter(key=>!(key===\"show\")).map(key=>{\n\t\t\t\t\treturn(\n\t\t\t\t\t\t<tr key={key}>\n\t\t\t\t\t\t\t<td>{key}</td>\n\t\t\t\t\t\t\t<td>{this.tableObject(obj[key])}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t)\n\t\t\t\n\t\t\t\t})\n\t\t\treturn(<table><tbody>{datarows}</tbody></table>)\n\t\t} else if(obj!==null) {\n\t\t\t//otherwise if it is probably a link, treat it as one\n\t\t\tif((typeof(obj)==='string') && (obj.includes(\"http\"))){\n\t\t\t\treturn (<a href={obj}>{obj}</a>)\n\t\t\t}\n\t\t}\n\t\t//otherwise return the value\n\t\treturn obj\n\t}", "function domHTML(element, object) {\n object[element.nodeName] = element.nodeName;\n var nodeList = element.childNodes;\n\n if (nodeList != null) {\n if (nodeList.length) {\n object[element.nodeName] = [];\n for (var i = 0; i < nodeList.length; i++) {\n if(!/\\S/.test(nodeList[i].nodeValue)){\n continue;\n }\n if (nodeList[i].nodeType == 3) {\n object[element.nodeName].push(nodeList[i].nodeValue);\n } else {\n object[element.nodeName].push({});\n domHTML(nodeList[i], object[element.nodeName][object[element.nodeName].length-1]);\n }\n }\n }\n }\n }", "function general_render(obj) {\n obj.render();\n }", "getHtmlTemplateString(employeesObjectArray) {\n let employeeDetails = \"\";\n let iconHtml = \"\";\n const returnedHtmlObjects = [];\n //iterate over each employee\n for (const employee of employeesObjectArray) {\n // https://stackoverflow.com/questions/10314338/get-name-of-object-or-class\n const currentObjectTypeName = employee.constructor.name;\n //different employee types get different HTML\n if (currentObjectTypeName == \"Manager\") {\n employeeDetails = this.getHtmlManagerDetails(employee.getId(), employee.getEmail(), employee.getOfficeNumber());\n iconHtml = \"<i class='fas fa-tasks'></i>\";\n } else if (currentObjectTypeName == \"Engineer\") {\n employeeDetails = this.getHtmlEngineerDetails(employee.getId(), employee.getEmail(), employee.getGitHub());\n iconHtml = \"<i class='fas fa-laptop-code'></i>\";\n } else if (currentObjectTypeName == \"Intern\") {\n employeeDetails = this.getHtmlInternDetails(employee.getId(), employee.getEmail(), employee.getSchool());\n iconHtml = \"<i class='fas fa-glasses'></i>\";\n }\n //add each iteration to an array\n returnedHtmlObjects.push(this.getHtmlEmployeeString(employee.getName(), employee.getDescription(), iconHtml, currentObjectTypeName, employee.getImageUrl(), employeeDetails));\n }\n //pass the array to be wrapped and return constructed and formatted HTML\n const innerHtml = this.wrapInParentHtml(returnedHtmlObjects);\n return `\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Our Software Team</title>\n <link rel=\"stylesheet\" href=\"https://unpkg.com/[email protected]/css/bulma.min.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"./hero.css\">\n <script src=\"https://kit.fontawesome.com/e6ff202c8b.js\" crossorigin=\"anonymous\"></script>\n </head>\n <body>\n <section class=\"hero is-info is-small\">\n <div class=\"hero-body\">\n <div class=\"container has-text-centered\">\n <p class=\"title\">\n Our Software Team\n </p>\n </div>\n </div>\n </section>\n <section class=\"container\">\n ${innerHtml}\n </section>\n </body>\n </html>`.replace(/\\s+/g, ' ');\n }", "renderAsHtml() {\n return this.clone(View, \"renderashtml\")();\n }", "function _arrayToHTML(a) {\n if (a.length === 0) {\n return \"\";\n }\n if (typeof(a[0]) != 'object') {\n return toHTML(_objectToOL(a));\n } else if (! _sameProperties(a[0], a[1])) {\n return toHTML(_objectToOL(a));\n } else {\n return _likeObjectsToHTML(function (f) {\n\ta.forEach(function(value, i) {\n\t f({index: i}, value, {});\n\t });}, null);\n }\n}", "render(){return html``}", "function manipulation_toString() {\n return this._render(this);\n}", "createMarkup(html) {\n return {\n __html: html\n };\n }", "function itemtoHTML() {\n for (let i = 0; i < all_html.length; i++) {\n $(\".items\").append([all_html[i]].map(movie_item_template).join(\"\"));\n }\n }", "function render() {\n var bodVal = tBody.val(); // Raw article markup\n var m = marked(bodVal); // Convert markup to html\n\n // Render article preview (rendered HTML)\n pMarkOut.html(m);\n //3. Finds each <pre><code> tag in the pMarkOut jQuery element\n pMarkOut.find('pre code').each(function(i, block) {\n //4. Applies highlighting to each block it finds. Returns an object with language, relevance, value (HTML string), and top properties; value HTML string is then rendered in the DOM\n hljs.highlightBlock(block); // Syntax-highlight each code block \"in place\"\n });\n\n pHrawOut.text(m); // Draw raw HTML\n\n // Update JSON article\n //5a. Use dot notation to assign the articleBody key a value of m, (the markup converted to HTML in line 10); user sees entered markup rendered as HTML\n mObj.articleBody = m;\n //5b. Populate the #pJson element's text with the JSON version of the mObj object. Stringify converts mObj from a javascript object to JSON format which the user can now see.\n var jsonStr = pJson.text(JSON.stringify(mObj));\n }", "displayHTML() {\n return `<p>Name: ${this.name}</p>\n <p>Email: ${this.email}</p>\n <p>Phone: ${this.phone}</p>\n <p>Relation: ${this.relation}</p>`;\n }", "function build(obj, container) {\n\n for(let key in obj) {\n // console.log(\"Key: \", key, \" value:\", obj[key])\n // create a <p> with key and value\n let p = document.createElement(\"p\")\n p.innerHTML = key + \": \" + obj[key]\n\n //append p to body\n container.appendChild(p)\n }\n}", "render() {\n\n return this.data()\n .then(data => {\n return { \"text\": mustache.render(this.text, data), ...this.properties }\n })\n }", "function CreateOtherData(ppl_object)\n{\n//name and title\n\tvar string=\"\";\n\tfor ( key in ppl_object)\n\t{\n\t\tstring+=\"<br> <b>\"+ ppl_object[key][\"title\"] + \": </b>\" +ppl_object[ key][\"name\"];\n\t}\n\treturn string;\n}", "function render(object) {\n let $imageSection = $('<section></section>').attr('data-keyword', object.keyword);\n let $title = $('<h2></h2>').text(object.title);\n let $image = $('<img>').attr({ src: object.image_url, alt: object.description });\n let $horns = $('<p></p>').text(`# of horns: ${object.horns}`);\n $imageSection.append($title, $image, $horns);\n $('main').append($imageSection);\n }", "function returnHtml(item){\n var output = `<div class=\"newsitem\"><div class=\"itemleft\"><div class=\"itemimg\"><img src=\"`+item.thumbnail+`\"></div></div>`\n + `<div class=\"itemright\"><div class=\"itemtitle\">`+item.title+`</div>`\n +`<div class=\"itemabstract\">`+item.abstract+`</div>`\n +`<div class=\"itemdate\">`+item.published_date+`</div>`\n +`<div class=\"itemlink\"><a target=\"_blank\" href=\"`+item.url+`\">Open in new tab</a></div></div></div>`\n ;\n return output;\n }", "function toString() {\n return static_1.html(this, this.options);\n}", "function showAllJSonFormatted(target, obj, inherited) {\n\n // - keyfield sets field width and float:left property\n // - valueField can be used for further styling\n\n /* show own properties, both enumerable and nonenumerable */\n\n var elem = document.getElementById(target);\n\n var found = [];\n var Props = Object.getOwnPropertyNames(obj);\n\n var table = '<table>';\n for (var prop in Props) {\n found.push(Props[prop]);\n table += \n '<tr><td class=\"keyfield\">' + Props[prop] +\n '</td><td> : </td><td class=\"valuefield\">' + obj[Props[prop]] + '</td></tr>';\n }\n /* show prototype's properties, both enumerable and nonenumerable */\n\n if (!(inherited === true)) {\n table += '</table>';\n elem.innerHTML = table;\n return;\n } \n else {\n var Props2 = Object.getOwnPropertyNames(obj.__proto__);\n for (var prop in Props2) {\n if (!(Props[prop] in found)) {\n table +=\n '<tr><td class=\"keyfield\">' + Props2[prop] +\n '</td><td class=\"top\"> : </td><td class=\"valuefield\">' + obj[Props2[prop]] + '</td></tr>'\n }\n }\n } \n table += '</table>';\n\n elem.innerHTML = table;\n //alert('at end');\n}", "function json2html(json) {\n 'use strict';\n var i, ret = document.createElement('ul'),\n a, li, span;\n for (i in json) {\n li = ret.appendChild(document.createElement('li'));\n if (typeof json[i] === 'object') {\n span = li.appendChild(document.createElement('span'));\n span.appendChild(document.createTextNode(i));\n } else {\n a = li.appendChild(document.createElement('a'));\n a.appendChild(document.createTextNode(i));\n a.title = i;\n a.href = json[i];\n }\n if (typeof json[i] === 'object') {\n li.appendChild(json2html(json[i]));\n }\n }\n return ret;\n}", "function VIEWAS_boring_default(obj) {\n //tabulator.log.debug(\"entered VIEWAS_boring_default...\");\n var rep; //representation in html\n\n if (obj.termType == 'literal')\n {\n var styles = { 'integer': 'text-align: right;',\n 'decimal': 'text-align: \".\";',\n 'double' : 'text-align: \".\";',\n };\n rep = myDocument.createElement('span');\n rep.textContent = obj.value;\n // Newlines have effect and overlong lines wrapped automatically\n var style = '';\n if (obj.datatype && obj.datatype.uri) {\n var xsd = tabulator.ns.xsd('').uri;\n if (obj.datatype.uri.slice(0, xsd.length) == xsd)\n style = styles[obj.datatype.uri.slice(xsd.length)];\n }\n rep.setAttribute('style', style ? style : 'white-space: pre-wrap;');\n\n } else if (obj.termType == 'symbol' || obj.termType == 'bnode') {\n rep = myDocument.createElement('span');\n rep.setAttribute('about', obj.toNT());\n thisOutline.appendAccessIcons(kb, rep, obj);\n\n if (obj.termType == 'symbol') {\n if (obj.uri.slice(0,4) == 'tel:') {\n var num = obj.uri.slice(4);\n var anchor = myDocument.createElement('a');\n rep.appendChild(myDocument.createTextNode(num));\n anchor.setAttribute('href', obj.uri);\n anchor.appendChild(tabulator.Util.AJARImage(tabulator.Icon.src.icon_telephone,\n 'phone', 'phone '+num,myDocument))\n rep.appendChild(anchor);\n anchor.firstChild.setAttribute('class', 'phoneIcon');\n } else { // not tel:\n rep.appendChild(myDocument.createTextNode(tabulator.Util.label(obj)));\n }\n } else { // bnode\n rep.appendChild(myDocument.createTextNode(tabulator.Util.label(obj)));\n }\n } else if (obj.termType=='collection'){\n // obj.elements is an array of the elements in the collection\n rep = myDocument.createElement('table');\n rep.setAttribute('about', obj.toNT());\n /* Not sure which looks best -- with or without. I think without\n\n var tr = rep.appendChild(document.createElement('tr'));\n tr.appendChild(document.createTextNode(\n obj.elements.length ? '(' + obj.elements.length+')' : '(none)'));\n */\n for (var i=0; i<obj.elements.length; i++){\n var elt = obj.elements[i];\n var row = rep.appendChild(myDocument.createElement('tr'));\n var numcell = row.appendChild(myDocument.createElement('td'));\n numcell .setAttribute('notSelectable','false')\n numcell.setAttribute('about', obj.toNT());\n numcell.innerHTML = (i+1) + ')';\n row.appendChild(thisOutline.outline_objectTD(elt));\n }\n } else if (obj.termType=='formula'){\n rep = tabulator.panes.dataContentPane.statementsAsTables(obj.statements, myDocument);\n rep.setAttribute('class', 'nestedFormula')\n\n } else {\n tabulator.log.error(\"Object \"+obj+\" has unknown term type: \" + obj.termType);\n rep = myDocument.createTextNode(\"[unknownTermType:\" + obj.termType +\"]\");\n } //boring defaults.\n tabulator.log.debug(\"contents: \"+rep.innerHTML);\n return rep;\n } //boring_default", "function JsontoHTML() {\n $(\"ul.items\").empty()\n all_html = []\n for (let i = 0; i < databaseObj.length; i++) {\n c = databaseObj[i];\n let keywrd = (JSON.parse(c[\"keywords\"]))\n kwrds = []\n for (let a = 0; a < keywrd.length; a++) {\n kwrds.push(keywrd[a][\"name\"])\n }\n let movieObj = new MovieInfo(c[\"budget\"], c[\"genres\"], c[\"homepage\"], c[\"runtime\"], c[\"vote_average\"],\n kwrds, c[\"title\"], c[\"id\"], c[\"image_url\"], c[\"image_url1\"], c[\"image_url2\"],\n c[\"overview\"])\n all_html.push(movieObj)\n }\n }", "function makeContactHTML(contactObject) {\n\t\tif (contactObject.filteredFor) {\n\t\tlet html = `\n\t\t\t<div id=\"${contactObject.id}\" class=\"contact\">\n\t\t\t\t<div class=\"thumb-div\">\n\t\t\t\t\t<img src=\"${contactObject.picture.large}\" class=\"thumbnail\">\n\t\t\t\t</div>\n\t\t\t\t<div class=\"contact-summary\">\n\t\t\t\t\t<h3>${contactObject.name.first} ${contactObject.name.last}</h3>\n\t\t\t\t\t<p>${contactObject.email}</p>\n\t\t\t\t\t<p class=\"location\">${contactObject.location.city}</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`;\n\t\treturn html;\n\t\t}\n\t}", "function htmlEncode() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utTransform,\n sp: utilitymanager_1.um.TIXSelPolicy.Line,\n }, function (up) {\n var d = document.createElement('div');\n d.textContent = up.intext;\n return d.innerHTML;\n });\n }", "renderAsHtml() {\r\n return this.clone(SharePointQueryable, \"renderashtml\").get();\r\n }", "toString(){\n return this.prettify().toString();\n }", "function codigohtml (dato) {\n\tvar html=\"<article>\";\n\t\thtml=\"<div>\"+dato+\"</div>\";\n\thtml+=\"</article>\";\n\treturn html;\n}", "toHTML ( theMode, sigDigs , params) {}", "function modelToString() {\n\t\t// format as a UL\n\t\tvar html = \"<ul>\";\n\t\tvar len = circles.length;\n\t\t// var outputString = '';\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar item = circles[i];\n\t\t\t// html+=\"<li>Id is :\"+item.id+\"</li>\"\n\t\t\t// outputString += \"circle (\" + item.attrs.cx + \" ,\" + item.attrs.cy + \",radius); \";\n\t\t\thtml += \"<li> var color = <div class='circleColor \" + item.node.className.baseVal + \"' contentEditable autocorrect='off'> type a color </div>; </li>\" + \"<li> var radius = \" + parseInt(item.attrs.r) + \"; </li>\" + \"<li> circle (\" + item.attrs.cx + \" ,\" + item.attrs.cy + \", radius); </li>\";\n\t\t\t// outputString += \"\\n\";\n\t\t\t// console.log(item.node.className.animVal);\n\t\t}\n\t\thtml += \"</ul> <br>\";\n\t\t// return outputString;\n\t\treturn html;\n\t}", "function tplRender (arr, obj) {\n\t\t\tvar\n\t\t\tcallee = arguments.callee,\n\t\t\thtml = '',\n\t\t\ti = -1,\n\t\t\te;\n\t\t\twhile ((e = arr[++i]) !== undefined) {\n\t\t\t\tif (e.constructor === {}.constructor) {\n\t\t\t\t\tvar\n\t\t\t\t\tchr = e.condition[0],\n\t\t\t\t\tvarName = e.condition[1],\n\t\t\t\t\tvarValue = (new Function('return arguments[0].'+varName))(obj),\n\t\t\t\t\tei, eo;\n\t\t\t\t\t// print\n\t\t\t\t\tif (chr === storage.printer && isPositive(varValue)) html += varValue;\n\t\t\t\t\t// if\n\t\t\t\t\telse if (chr === storage.iffer && isPositive(varValue)) html += callee(e.children, obj);\n\t\t\t\t\t// if not\n\t\t\t\t\telse if (chr === storage.notter && !isPositive(varValue)) html += callee(e.children, obj);\n\t\t\t\t\t// loop\n\t\t\t\t\telse if (chr === storage.looper && isPositive(varValue)) {\n\t\t\t\t\t\tei = -1;\n\t\t\t\t\t\teo = {};\n\t\t\t\t\t\twhile ((eo[varName] = varValue[++ei]) !== undefined) html += callee(e.children, eo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse html += e;\n\t\t\t}\n\t\t\treturn html;\n\t\t}", "function IntObject_CreateHTML()\n{\n\t//ping as this will take time\n\tMain_Ping();\n\t//update our interface look\n\tthis.UpdateInterfaceLook();\n\t//result\n\tvar html = null;\n\t//destroy current state (if any)\n\tthis.CurrentState = {};\n\t//check for legend\n\tvar legendData = GroupBox_GetLegendData(this);\n\t//are we legend data?\n\tif (legendData && !legendData.IsIgnore)\n\t{\n\t\t//create via groupBox legend\n\t\thtml = GroupBox_CreateHTMLLegend(this);\n\t}\n\telse\n\t{\n\t\t//switch according to our class\n\t\tswitch (this.DataObject.Class)\n\t\t{\n\t\t\tcase __NEMESIS_CLASS_FORM:\n\t\t\tcase __NEMESIS_CLASS_MDIFORM:\n\t\t\t\t//create via form\n\t\t\t\thtml = Form_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_EDIT:\n\t\t\t\t//create via edit\n\t\t\t\thtml = Edit_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_LABEL:\n\t\t\tcase __NEMESIS_CLASS_LINK:\n\t\t\t\t//create via label\n\t\t\t\thtml = Label_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_PUSH_BUTTON:\n\t\t\tcase __NEMESIS_CLASS_IMAGE_BUTTON:\n\t\t\t\t//create via pushbutton\n\t\t\t\thtml = PushButton_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_COMBO_BOX:\n\t\t\t\t//create via combobox\n\t\t\t\thtml = ComboBox_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_FIELDSET:\n\t\t\tcase __NEMESIS_CLASS_GROUP_BOX:\n\t\t\t\t//create via GroupBox\n\t\t\t\thtml = GroupBox_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_RADIO_BUTTON:\n\t\t\t\t//create via RadioButton\n\t\t\t\thtml = RadioButton_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_CHECK_BOX:\n\t\t\t\t//create via CheckBox\n\t\t\t\thtml = CheckBox_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_TAB_CONTROL:\n\t\t\t\t//create via tabs\n\t\t\t\thtml = TabControl_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_TAB_SHEET:\n\t\t\t\t//create via tabs\n\t\t\t\thtml = TabSheet_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_STATUSBAR:\n\t\t\t\t//create via statusbar\n\t\t\t\thtml = StatusBar_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_TOOL_BAR:\n\t\t\t\t//create via toolbar\n\t\t\t\thtml = ToolBar_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_TREE_VIEW:\n\t\t\t\t//create via treeview\n\t\t\t\thtml = TreeView_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_LIST_BOX:\n\t\t\t\t//create via ListBox\n\t\t\t\thtml = ListBox_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_LIST_VIEW:\n\t\t\t\t//create via ListView\n\t\t\t\thtml = ListView_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_TREE_GRID:\n\t\t\t\t//create via TreeGrid\n\t\t\t\thtml = TreeGrid_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_WEB_BROWSER:\n\t\t\t\t//create via Web Browser\n\t\t\t\thtml = WebBrowser_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_POPUP_MENU:\n\t\t\t\t//create via Popup Menu\n\t\t\t\thtml = PopupMenu_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_NAV_BAR:\n\t\t\t\t//create via NavBar\n\t\t\t\thtml = NavBar_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_TRACK_BAR:\n\t\t\t\t//create via TrackBar\n\t\t\t\thtml = TrackBar_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_VIDEO_PLAYER:\n\t\t\t\t//create via Video Player\n\t\t\t\thtml = VideoPlayer_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_ULTRAGRID:\n\t\t\t\t//create via UltraGrid\n\t\t\t\thtml = UltraGrid_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\t\t\tcase __NEMESIS_CLASS_MDIFRAME:\n\t\t\tcase __NEMESIS_CLASS_CFOS:\n\t\t\tcase __NEMESIS_CLASS_UNKNOWN:\n\t\t\tcase __NEMESIS_CLASS_IMAGE:\n\t\t\tdefault:\n\t\t\t\t//create via unknown\n\t\t\t\thtml = Unknown_CreateHTMLObject(this);\n\t\t\t\tbreak;\n\n\t\t\tcase __NEMESIS_CLASS_HOTSPOT:\n\t\t\t\t//oops! report it\n\t\t\t\tCommon_Error(\"IntObject_CreateHTML -> class-> __NEMESIS_CLASS_HOTSPOT\");\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t//return it\n\treturn html;\n}", "toString() {\n return this.doctype + this.newline + this.el.outerHTML;\n }", "function convert() {\n\t\tlet result = mdTableToHTML(textarea.val())\n\t\tdivRenderOutput.html(result.html)\n\t\ttextareaHTMLOutput.val(result.htmlString)\n\t}", "function NavBar_CreateHTMLObject(theObject)\n{\n\t//create the div\n\tvar theHTML = document.createElement(\"div\");\n\t//simple add\n\ttheHTML = Basic_SetParent(theHTML, theObject);\n\t//set its Basic Properties\n\tBasic_SetBasicProperties(theHTML, theObject);\n\t//set interpreter methods\n\ttheHTML.UpdateProperties = NavBar_UpdateProperties;\n\ttheHTML.GetHTMLTarget = NavBar_GetHTMLTarget;\n\t//update the content\n\tNavBar_UpdateContent(theHTML, theObject);\n\t//return the newly created object\n\treturn theHTML;\n}", "function createMarkup() {\n if (episode.summary) {\n let newSummary = episode.summary; //Convert response for summary to Markup.\n let newLength = episode.summary.length;\n let regex = /[.,]/g;\n if (newLength > 100) {\n newSummary = newSummary.slice(3, newSummary.search(regex)).concat('...'); // WIll cut the string for summary if it's longer than 100 without removing the markup tag\n }\n return { __html: newSummary }; // (Dangerously) going to set html.\n }\n }", "function createMarkup(data) {\n return { __html: data };\n}", "function JSONToHTML(json) {\n let html=\"<table>\\n\";\n let arr=JSON.parse(json);\n html+=\" <tr>\";\n for(let key of Object.keys(arr[0])) {\n html+='<th>${htmlEscape(key)}</th>>';\n }\n html+='</tr>\\n';\n\n for(let obj of arr) {\n for(let keys of Object.keys(arr[0])) {\n html += '<td>${htmlEscape(obj[keys])}</td>'\n }\n } html+='</tr>\\n';\n return html+\"</table>\";\n function htmlEscape(text) {\n return text\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&#039;\");}\n\n\n}", "_generateMarkup() {\n return this._data.map(result => PreviewView.render(result, false)).join('');\n }", "function projectHtmlFromObject(key, project){\n return '<div class=\"item\">'\n +' <div class=\"blog-card\">'\n + '<div class=\"media-block\">'\n + ' <a href=\"blog/blog-post.html?pagekey='+project.id+'\">'\n + ' <img class=\"post-image img-responsive\" src=\"'+project.blogimg+'\" alt=\"blog-post\" />'\n + '<div class=\"mask\"></div>'\n + '<div class=\"post-date\"><span class=\"month\">'+project.date+'</span></div>'\n +'</a>'\n +'</div>'\n +'<div class=\"post-info\">'\n + ' <ul class=\"category'\n + ' <li><a href=\"#\">'+project.subject+'</a></li>'\n + '</ul>'\n + '<a href=\"blog/blog-post.html?pagekey='+project.id+'\"><h4 class=\"blog-item-title\">'+project.title+'</h4></a>'\n +'</div>'\n +'</div>'\n +'</div>'\n \n}", "function TrackBar_CreateHTMLObject(theObject)\n{\n\t//create the div\n\tvar theHTML = document.createElement(\"div\");\n\t//simple add\n\ttheHTML = Basic_SetParent(theHTML, theObject);\n\t//set ourselves as directly the child container\n\ttheObject.HTMLParent = theHTML;\n\t//set its Basic Properties\n\tBasic_SetBasicProperties(theHTML, theObject);\n\t//set interpreter methods\n\ttheHTML.UpdateProperties = TrackBar_UpdateProperties;\n\t//update all\n\tTrackBar_Update(theObject);\n\t//return the newly created object\n\treturn theHTML;\n}", "render(obj, currentLine=1) {\r\n\r\n // input is an array: render elements and join strings\r\n if (obj instanceof ResultArray) {\r\n let line = currentLine;\r\n return obj.arr.map(x => {\r\n let txt = this.render(x, line);\r\n line += x.lines;\r\n return txt\r\n }).join('');\r\n\r\n // input is an AST element: render with template\r\n } else if (obj instanceof Result) {\r\n\r\n // identify template\r\n var fn;\r\n if (fn = this.rules[obj.rule.name]) {\r\n\r\n // render nested AST elements\r\n let attr = {};\r\n Object.keys(obj.attr).forEach(f => {\r\n attr[f] = this.render(obj.attr[f], currentLine)\r\n })\r\n\r\n // attach line number\r\n attr.sourceLine = currentLine;\r\n\r\n // perform post-processing if applicable\r\n if (obj.rule.processor) {\r\n obj.rule.processor(attr);\r\n }\r\n\r\n // call template rendering function\r\n return this.rules[obj.rule.name](attr)\r\n\r\n // error if template wasn't found\r\n } else {\r\n throw new Error('No template defined for rule: '+obj.rule.name)\r\n }\r\n\r\n // otherwise pass through raw value\r\n } else {\r\n return obj\r\n }\r\n }", "function renderHTML(data) {\n var htmlString = \"\";\n //for loop to concatinate each object info into a sentence\n for (var i = 0; i < data.length; i++) {\n htmlString += \"<p>\" + data[i].name + \" is a \" + data[i].species + \" that likes to eat \";\n\n for (var ii = 0; ii < data[i].foods.likes.length; ii++) {\n if (ii == 0) {\n htmlString += data[i].foods.likes[ii]\n\n }\n else {\n htmlString += \" and \" + data[i].foods.likes[ii]\n }\n }\n\n htmlString += \" and dislikes \";\n\n for (var ii = 0; ii < data[i].foods.dislikes.length; ii++) {\n if (ii == 0) {\n htmlString += data[i].foods.dislikes[ii]\n\n }\n else {\n htmlString += \" and \" + data[i].foods.dislikes[ii]\n }\n }\n\n htmlString += \".</p>\"\n }\n animals.insertAdjacentHTML('beforeend', htmlString);\n}", "renderJournalEntries (interiorEntryObject) {\n let entryHTMLTrigg= document.querySelector(\".entryLog\")\n entryHTMLTrigg.innerHTML= \"\"\n \n for(interiorEntryObject of API.journalEntries){\n // Convert the entry object HTML representation\n const entryHTML = entryHTMLRepresentation.entryConverter(interiorEntryObject);\n\n // Find the Trigg element in index.html to store information\n const triggElement = document.querySelector('.entryLog');\n \n //Now the converters info is being shoved into that entryHTML\n triggElement.innerHTML += entryHTML; \n }\n}", "toObject() {\n\t\treturn {\n\t\t\ttext: this.text,\n\t\t\thtml: this.html\n\t\t}\n\t}", "function contactHtmlFromObject(contact){\r\n console.log( contact );\r\n var html = '';\r\n html += '<li class=\"list-group-item contact\">';\r\n html += '<div>';\r\n html += '<p class=\"lead\">'+contact.name+'</p>';\r\n html += '<p>'+contact.email+'</p>';\r\n html += '<p>'+contact.message+'</p>';\r\n html += '<p><small title=\"'+contact.location.zip+'\">'+contact.location.city+', '+contact.location.state+'</small></p>';\r\n html += '</div>';\r\n html += '</li>';\r\n return html;\r\n}", "function _getObjectHTML(url, type, dims, classid) {\n\t\treturn '<object' + _getAsAttributeList($.extend({\n\t\t\t\tclassid: 'clsid:' + classid\n\t\t\t}, dims)) + '>' +\n\t\t\t_getAsParameterList({\n\t\t\t\tmovie: url\n\t\t\t}) +\n\t\t\t'<!--[if IE lt 9]>--><object' + _getAsAttributeList($.extend({\n\t\t\t\ttype: type,\n\t\t\t\tdata: url\n\t\t\t}, dims)) + '></object><!--<![endif]-->' +\n\t\t'</object>';\n\t}", "render() {\n return html ``;\n }", "function BN_toHTML (BN) {\r\n let html;\r\n let type = BN.type;\r\n if (type == \"folder\") {\r\n\thtml = \"<DL><DT>\"+BN.title+\"</DT>\";\r\n\tlet children = BN.children;\r\n\tif (children != undefined) {\r\n\t let len = children.length;\r\n\t for (let i=0 ; i<len ;i++) {\r\n\t\thtml += \"<DD>\"+BN_toHTML(children[i])+\"</DD>\";\r\n\t }\r\n\t}\r\n\thtml += \"</DL>\";\r\n }\r\n else if (type == \"bookmark\") {\r\n\thtml = \"<A HREF=\\\"\"+BN.url+\"\\\">\"+BN.title+\"</A>\";\r\n }\r\n else {\r\n\thtml = \"<HR>\";\r\n }\r\n return(html);\r\n}", "function renderHTML(data) {\n var htmlString = \"\";\n\n for (i = 0; i < data.length; i++) {\n htmlString += \"<p>\" +data[i].name + \" is \" + data[i].age + \" years old.\" + \"</p>\";\n\n }\n infoContainer.insertAdjacentHTML('beforeend', htmlString);\n}", "function jsonToHTMLBody(json) {\n return `<div id=\"json\">${valueToHTML(json, '<root>')}</div>`;\n }", "function render() {\n $insert.html(template(bandObject)); //inserts into template, in {{#each this}} it is THIS\n }", "function renderHTML(data) {\n\tvar htmlString = \"\";\n\n\tfor (i = 0; i < data.length; i ++) {\n\t\thtmpString += \"<p>\" + data[i].name + \" is a \" + data[i].species + \".</p>\";\n\t}\n\n\tanimalContainer.insertAdjacentHTML('beforeend', htmlString);\n}", "prettify(){\n const contents = this.contents.map((o)=>{\n return o.prettify();\n });\n\n return {\n x: this.position.x,\n y: this.position.y,\n type: privateMembers.get(this).type,\n isBlocked: this.isBlocked,\n contents: contents\n };\n }", "function getObjectTable(data){\n\tlet table_body = \"\";\n\tdata.forEach((obj) => {\n\t\tlet id = obj.objectid;\n\t\tlet title = obj.title;\n\t\ttable_body += `<tr><td><input id=\"obj\" type=\"button\" onclick=\"viewObjectDetails(${id})\"></td><td>${title}</td></tr>`\n\t});\n\treturn table_body;\n}", "function generateHTML() {\n\n \n fs.writeFile(outputPath, render(members), \"UTF-8\", (err) => {\n \n\n \n if (err) throw err;\n \n });\n \n console.log(members);\n\n }", "html()\n{\n console.log(\"Rendering\");\n const html = ` <h2>${this.name}</h2>\n <div class=\"image\"><img src=\"${this.imgSrc}\" alt=\"${this.imgAlt}\"></div>\n <div>\n <div>\n <h3>Distance</h3>\n <p>${this.distance}</p>\n </div>\n <div>\n <h3>Difficulty</h3>\n <p>${this.difficulty}</p>\n </div>\n </div>`;\n\n return html;\n}", "function layerToHtml (thisLayer) {\n var layerName = String(thisLayer.name);\n \n // var sublayers = thisLayer.layers.length;\n\n // if (sublayers > 0) {\n // for (j=0; j<sublayers; j++) {\n // f += \"\\n\\t\" + layerToHtml(thisLayer.layers[j]);\n // }\n // }\n\n e = \"<div class='\" + layerName + \"'></div>\\n\";\n\n return e;\n }", "function formatToHTML(data) {\n var i = 0;\n if (isDict(data)) {\n html = \"<table border=0 width=992>\";\n for (var key in data) {\n var color = (i % 2 == 0) ? '#eee' : '#fff';\n i += 1;\n html += \"<tr bgcolor='\" + color + \"'>\";\n html += \"<td><b><p>\" + key + \":</p></b></td>\";\n html += \"<td><p>\" + formatIfURL(data[key]) + \"</p></td>\";\n html += \"</tr>\";\n }\n html += \"</table>\";\n return html;\n }\n if (Array.isArray(data)) {\n html = \"<table border=0 style='width: 100%>\";\n for (var i = 0; i < data.length; i++) {\n var color = (i % 2 == 0) ? '#eee' : '#fff';\n html += \"<tr bgcolor='\" + color + \"'>\";\n html += \"<td><b><p>\" + i + \":</p></b></td>\";\n html += \"<td><p>\" + formatIfURL(data[i]) + \"</p></td>\";\n html += \"</tr>\";\n }\n html += \"</table>\";\n return html;\n }\n return formatIfURL(data);\n}", "function convertToHTML(doc_id){\r\n var body = DocumentApp.openById(doc_id).getBody();\r\n var numChildren = body.getNumChildren();\r\n var output = [];\r\n var images = [];\r\n var listCounters = {};\r\n\r\n // Walk through all the child elements of the body.\r\n for (var i = 0; i < numChildren; i++) {\r\n var child = body.getChild(i);\r\n output.push(processItem(child, listCounters, images));\r\n }\r\n\r\n return output.join('\\n')\r\n}", "function render() {\n\t$(\"#content\").empty();\n\n\tfor (let i = 0; i < employeeList.length; i++) {\n\t\tlet info = employeeList[i];\n\n\t\tlet nameData = info.name;\n\t\tlet officeData = info.office;\n\t\tlet phoneData = info.phone;\n\n\t\tlet objectDiv = `<div class=\"objectDiv\"><p>Employee: ${nameData}</p><p>Office: ${officeData}</p><p>Phone Number: ${phoneData}</p></div>`\n\t\t$(\"#content\").append(objectDiv);\n\t}\n}", "serialize(obj, children) {\n if (obj.object == \"block\") {\n switch (obj.type) {\n case \"paragraph\":\n return <p>{children}</p>;\n case \"block-quote\":\n return <blockquote>{children}</blockquote>;\n case \"code_block\":\n return (\n <div className={obj.data.get(\"className\")}>\n <pre>\n <div>{children}</div>\n </pre>\n </div>\n );\n case \"bulleted-list\":\n return <ul>{children}</ul>;\n case \"list-item\":\n return <li>{children}</li>;\n case \"numbered-list\":\n return <ol>{children}</ol>;\n case \"heading-one\":\n return <h1>{children}</h1>;\n case \"heading-two\":\n return <h2>{children}</h2>;\n case \"code_line\":\n return <div subType={\"code_line\"}>{children}</div>;\n case \"image\":\n const align = obj.data.get(\"align\");\n return (\n <div style={{ width: \"260px\", ...styles[align] }}>\n <img\n align={align}\n src={obj.data.get(\"src\")}\n style={styles[align]}\n />\n </div>\n );\n }\n }\n }", "function toHTML(links) {\n var linkStand = asTable();\n\n for (var i = 0 ; i < links.length ; i++) {\n\n linkStand.write({name:links[i].name, url: links[i].url})\n }\n\n linkStand.end();\n\n return linkStand;\n}", "function render(data){\n //Map: crea un nuevo arreglo, y por cada elemento devuelve un string, se junta en un string grande(pero queda muy desprolijo y feo), entonces para eso se usa join\n let html = data.map(mje =>{\n return (`\n <p> \n <strong class= \"autor_txt\">${mje.autor}</strong> :\n <span class=\"txt_contenido\">${mje.texto}</span>\n </p>\n `)\n }).join(' '); //Join = lo junta los elemetnos del arreglo y lo convierte en un string, separado por espacio ' ' que en si baja un elemento tras otro .\n\n //Agarra el elemento del archivo index.html y le incrusta/inyecta lo que trae de la funcion render.\n document.getElementById(\"mensajes\").innerHTML = html\n}", "function renderQuestion(questionObj) {\n questionEl.innerHTML = questionObj.question;\n}", "function createHTML(item) {\n return '<li class=\"item\" >\\n' +\n ' <img src=\"'+item.image+'\" alt=\"image\" class=\"itemPoint\" data-key=\"image\" data-value=\"'+item.image+'\">' +\n ' <span class=\"itemDetail\">'\n +item.gender+' / '+item.size+' / '+item.color+\n '</span>\\n' +\n ' </li>';\n}" ]
[ "0.75345165", "0.73364747", "0.7290966", "0.70888644", "0.69863486", "0.6939569", "0.6914273", "0.68218917", "0.6696153", "0.664422", "0.6641676", "0.6617087", "0.6599305", "0.64678276", "0.64626235", "0.6448896", "0.6429585", "0.64055693", "0.6401883", "0.6337124", "0.63128394", "0.63089514", "0.625318", "0.6237777", "0.62259096", "0.622509", "0.62114984", "0.6163857", "0.615849", "0.61286455", "0.6103012", "0.6101052", "0.60911494", "0.6085228", "0.6060058", "0.60480464", "0.60087687", "0.60081", "0.5988686", "0.5987632", "0.59803504", "0.5962411", "0.59551", "0.595441", "0.594008", "0.59361374", "0.59317577", "0.5925804", "0.5918511", "0.5914238", "0.5911741", "0.5909628", "0.59061897", "0.5905239", "0.5895341", "0.5889306", "0.58859706", "0.5884657", "0.5871826", "0.5870115", "0.5866962", "0.5861551", "0.58557385", "0.58518004", "0.58469576", "0.5843525", "0.58434594", "0.58358127", "0.58330375", "0.58312076", "0.5828997", "0.5824879", "0.5808017", "0.58018875", "0.5799664", "0.5796277", "0.5789825", "0.57875884", "0.5769593", "0.57478845", "0.5741584", "0.5740449", "0.57381946", "0.57233053", "0.5717458", "0.57125646", "0.5700225", "0.5699776", "0.5697027", "0.56914806", "0.5683933", "0.56834775", "0.567993", "0.56742644", "0.567333", "0.56716144", "0.56672215", "0.56646365", "0.5662419", "0.56612164", "0.56580234" ]
0.0
-1
build a list of this object from Json object
static createListFromJson(jsonObj) { var answer = []; for (var publicationIndex = 0; publicationIndex < jsonObj.length; publicationIndex++) { answer.push(PublicationCard.createFromJson(jsonObj[publicationIndex])); } return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createListFromJson(jsonObj)\n\t{\n\t\tvar answer = [];\n\t\tfor (var projectIndex = 0; projectIndex < jsonObj.length; projectIndex++)\n\t\t{\n\t\t\tanswer.push(ProjectStudent.createFromJson(jsonObj[projectIndex]));\n\t\t}\n\t\treturn answer;\n\t}", "function createData(json) {\n\tconsole.log(json);\n\tdataList = [];\n\tvar truth = false;\n\tfor (var i = 0; i < json.length; i++) {\n\t\ttype = json[i]['type'];\n\t\ttruth = false;\n\t\tif (type === \"Twitter\") {\n\t\t\tpossibleTweet = new Tweet(json[i]);\n\t\t\tfor (var j=0; j < i; j++){\n\t\t\t\tif(possibleTweet.id === dataList[j].id){\n\t\t\t\t\ttruth = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(truth === false){\n\t\t\t\tdataList.push(possibleTweet);\n\t\t\t}\n\t\t}\n\n\t\tif (type === \"Instagram\") {\n\t\t\tdataList.push(new Gram(json[i]));\n\t\t}\n\t\tif(type === \"Soundcloud\"){\n\t\t\tdataList.push(new Song(json[i]))\n\t\t}\n\t}\n\treturn dataList;\n}", "static fromJSON(shoppinglists) {\n let result = [];\n\n if (Array.isArray(shoppinglists)) {\n shoppinglists.forEach((sl) => {\n Object.setPrototypeOf(sl, ShoppingListBO.prototype)\n result.push(sl)\n })\n } else {\n\n let sl = shoppinglists\n Object.setPrototypeOf(sl, ShoppingListBO.prototype)\n result.push(sl)\n }\n\n return result;\n }", "constructor (json) {\n\t\tthis.loadJSON(json);\n\t}", "addJSONLists() {\n\t\tthis.characterPieces = characterAssetsJsonObject.frames; \n\n\t\tthis.categories = ['none', 'A'];\n\t\tthis.sizes = ['Large_Feminine', 'Medium_Feminine', 'Small_Feminine', 'Large_Masculine', 'Medium_Masculine', 'Small_Masculine'];\n\t\tthis.handed = [\n\t\t\t'none',\n\t\t\t{ hand: 'RightHanded2', category: 'A' },\n\t\t\t{ hand: 'LeftHanded2', category: 'A' }\n\t\t];\n\t}", "constructor(_json) {\n\t\t//Create timetableDay from JSON\n\t\tthis.usedIds = new Array();\n\t\tthis.subjects = new Array();\n\t\t_json = JSON.parse(_json);\n\t\tif (_json) {\n\t\t\tthis.updateViaJSON(_json);\n\t\t}\n\t}", "static fromJSON(users) {\n let result = [];\n\n if (Array.isArray(users)) {\n users.forEach((a) => {\n Object.setPrototypeOf(a, UserBO.prototype);\n result.push(a);\n })\n } else {\n // Es handelt sich offenbar um ein singuläres Objekt\n let a = users;\n Object.setPrototypeOf(a, UserBO.prototype);\n result.push(a);\n }\n return result;\n }", "function treatJsonData(data) {\n data.forEach((stud) => {\n //copy the object prototype as many times as json objects there are\n const student = Object.create(Student);\n //modify the original data according to requirements\n //clean empty space around strings\n let fullName = stud.fullname.trim();\n let house = stud.house.trim();\n //define elements\n student.firstName = getFirstName(fullName);\n student.lastName = getLastName(fullName);\n //if middle name\n student.middleName = getMiddleName(fullName);\n //if nickname\n student.nickName = getNickName(fullName);\n student.image = getImage(fullName);\n student.house = getStudentHouse(house);\n student.prefect = false;\n student.quidditch = false;\n student.inquisitorial = false;\n student.bloodStatus = calculateBloodStatus(student.lastName);\n //push object into empty array\n listOfStudents.push(student);\n });\n return listOfStudents;\n}", "function convert(jsonResult, Constructor) {\n if (angular.isArray(jsonResult)) {\n // Array: So we need to convert each element and push it into a new array to send back\n var models = [];\n angular.forEach(jsonResult, function (item) {\n models.push(convertItem(item, Constructor));\n });\n return models;\n } else {\n return convertItem(jsonResult, Constructor);\n }\n }", "storageEventBackToObject(jsonObject){\n let eventObjects = []\n //Need to convert JSON OBJECT to a \n jsonObject.forEach(function(event){\n let eventObject = new Event(event._title, event._eventDate)\n \n console.log(eventObject)\n eventObjects.push(eventObject)\n })\n return eventObjects\n \n }", "function parseJson(items, listToAppendTo, propertyToDisplay) {\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var listElement = document.createElement('li');\n listElement.innerHTML = item[propertyToDisplay];\n listToAppendTo.appendChild(listElement);\n }\n}", "loadFromJson(data) {\n // TODO: Load this object from the data\n const parsedState = JSON.parse(data);\n parsedState.categories.forEach((category, index) => {\n this.setCategory(category, index);\n });\n parsedState.toDoList.forEach(todo => {\n if (todo.text) {\n this.pushTodo(new Note(todo.text, todo.completed));\n } else if (todo.title) {\n this.pushTodo(new Task(todo.title, todo.categoryIndex, todo.description, todo.completed));\n }\n });\n }", "static fromJSON(semesters) {\n let result = [];\n\n if (Array.isArray(semesters)) {\n semesters.forEach((s) => {\n Object.setPrototypeOf(s, SemesterBO.prototype);\n result.push(s);\n })\n } else {\n // Es handelt sich offenbar um ein singuläres Objekt\n let s = semesters;\n Object.setPrototypeOf(s, SemesterBO.prototype);\n result.push(s);\n }\n\n return result;\n }", "function createCards(jsonObj){\n var x = 1\n var jsonCards = jsonObj['cards'];\n for(var i = 0; i < jsonCards.length; i++){\n cards[i] = new Card(jsonCards[i].name, jsonCards[i].value, jsonCards[i].id, jsonCards[i].image);\n console.log(cards[i]);\n }\n}", "static fromJSON(chatMessages) {\n let result = [];\n\n if (Array.isArray(chatMessages)) {\n chatMessages.forEach((m) => {\n Object.setPrototypeOf(m, ChatMessageBO.prototype);\n result.push(m);\n })\n } else {\n // Es handelt sich offenbar um ein singuläres Objekt\n let m = chatMessages;\n Object.setPrototypeOf(m, ChatMessageBO.prototype);\n result.push(m);\n }\n\n return result;\n }", "function getUsers(json) { return json.map(function (obj){ return obj.user; } ); }", "function createNewObject(jsonData) {\n jsonData.forEach(task => {\n const tasks = Object.create(taskPrototype);\n tasks.id = task.id;\n tasks.day = task.day;\n tasks.time = task.time;\n tasks.description = task.desc;\n //push to array\n arrayTasks.push(task);\n });\n // console.log(arrayTasks);\n displayTasks(arrayTasks);\n}", "static fromJSON(persons) {\n let result = [];\n\n if (Array.isArray(persons)) {\n persons.forEach((n) => {\n Object.setPrototypeOf(n, PersonBO.prototype);\n result.push(n);\n })\n } else {\n let n = persons;\n Object.setPrototypeOf(n, PersonBO.prototype);\n result.push(n);\n }\n\n return result;\n }", "function createStudentList(jsonData) {\n//console.log(jsonData);\nstudentList = [];\nfor(x=0;x<jsonData.length;x++) {\n\tstudentList.push(jsonData[x]);\t\t\n\t}\nconsole.log(studentList)\n}", "static fromJSON({id,tarea,completado,creado}){\n const tempTodo = new Todo(tarea);\n tempTodo.id = id;\n tempTodo.completado = completado;\n tempTodo.creado = creado;\n\n return tempTodo; // retornamos la instancia\n }", "toJSON () {\n return this.list;\n }", "function sacarUsuarios(json){\n \n for(let usuario of json){ \n var id = usuario.id;\n var email = usuario.email;\n var pass = usuario.password;\n\n var objetoUsers = new constructorUsers(id,email,pass);\n datosUser.push(objetoUsers);\n\n contadorId=usuario.id; //sacar el ultimo valor de ID que esta en el JSON\n }\n return datosUser; \n}", "function retrieve(jsonArr){\njsonArr = JSON.parse(jsonArr);\n for (j = 0; j < jsonArr.length; j++){\n new listItem(jsonArr[j].name,jsonArr[j].id,jsonArr[j].done).getHtml();\n }\n}", "function renderJson(json) {\n\t\tlistView.setSections([]);\n\t\tvar data = [];\n\t\tvar sections = [];\n\t\tif (_title === 'Find by Breeder' || _title === 'Find by Owner') {\n\t\t\tfor (var i = 0,\n\t\t\t j = j = json.length; i < j; i++) {\n\t\t\t\tdata.push({\n\t\t\t\t\ttitle : {\n\t\t\t\t\t\ttext : json[i].contact_name + ', ' + json[i].email\n\t\t\t\t\t},\n\t\t\t\t\t// Sets the regular list data properties\n\t\t\t\t\tproperties : {\n\t\t\t\t\t\taccessoryType : Ti.UI.LIST_ACCESSORY_TYPE_NONE\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var i = 0,\n\t\t\t j = j = json.length; i < j; i++) {\n\t\t\t\tdata.push({\n\t\t\t\t\ttitle : {\n\t\t\t\t\t\ttext : json[i].horse.official_name\n\t\t\t\t\t},\n\t\t\t\t\t// Sets the regular list data properties\n\t\t\t\t\tproperties : {\n\t\t\t\t\t\titemId : json[i].horse.id,\n\t\t\t\t\t\taccessoryType : Ti.UI.LIST_ACCESSORY_TYPE_NONE\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar _section = Ti.UI.createListSection({\n\t\t\titems : data\n\t\t});\n\n\t\tsections.push(_section);\n\t\tlistView.setSections(sections);\n\t}", "loadLists(obj) {\n var listData = [];\n var i;\n console.log(obj)\n for(i = 0; i < obj.length; i++) {\n listData.push({title: obj[i]['name'], activityCount: obj[i]['activity_count'], key: obj[i]['id'].toString()})\n }\n \n this.setState({listData: listData});\n }", "parse (json) {\n const references = []\n const parsed = [ JSON.parse(json) ]\n function visit (object, index, value) {\n if (typeof value == 'object' && value != null) {\n if (Array.isArray(value)) {\n switch (value[0]) {\n case '_reference':\n references.push({ object, index, path: value[1] })\n break\n case '_undefined':\n object[index] = void 0\n break\n case '_array':\n value.shift()\n default:\n for (let i = 0, I = value.length; i < I; i++) {\n visit(value, i, value[i])\n }\n }\n } else {\n for (const property in value) {\n visit(value, property, value[property])\n }\n }\n }\n }\n visit(parsed, 0, parsed[0])\n for (const { object, index, path } of references) {\n object[index] = get(parsed[0], path)\n }\n return parsed[0]\n }", "function buildFormFields(json) {\n var formFields = [];\n for (var key in json) {\n var item = json[key];\n switch (item.type) {\n case \"number\":\n var div = document.createElement('div');\n div.setAttribute(\"class\", \"custom-input-field\");\n div.setAttribute(\"id\", key + \"-input-field\");\n var label = buildLabel(key, key);\n var input = buildNumberField(key, item);\n var suffix = buildLabel(key, item.unit);\n div.appendChild(label);\n div.appendChild(input);\n div.appendChild(suffix);\n formFields.push(div);\n break;\n default:\n console.log(\"KEY: \", key, \" not found\");\n }\n }\n return formFields;\n}", "static fromJson(js) {\n function recursive(jsnode, name, parent) {\n let node = new NodeTree_1.default(name, parent);\n if (jsnode !== null) {\n for (let key in jsnode) {\n node.childs.push(recursive(jsnode[key], key, node));\n }\n }\n return node;\n }\n let tree = new Tree();\n if (js !== null && Object.keys(js).length != 0) {\n let rootName = Object.keys(js)[0];\n tree.root = recursive(js[rootName], rootName, null);\n }\n return tree;\n }", "function buildList(json) {\n var html = '<table><thead>' + buildHeader(json[0]) + '</thead><tbody>';\n\n for (var i = 0; i < json.length; i++) {\n html += buildRow(json[i], null, (i % 2 == 1));\n }\n html += '</tbody></table>';\n\n return html;\n}", "function list () {\n return _.cloneDeep(data);\n}", "function MakeObjectToAddInList(success) {\n return {\n \"itemId\": success.data.data.id,\n \"itemName\": success.data.data.itemName,\n \"itemPrice\": null,\n \"collection\": null,\n \"images\": [],\n \"quantity\": null,\n \"dateOfPurchase\": success.data.data.dateOfPurchase,\n \"category\": null,\n \"rooms\": null,\n \"currentValue\": null,\n \"brand\": success.data.data.brand,\n \"model\": success.data.data.model,\n \"description\": success.data.data.description,\n \"roomId\": null,\n \"collectionId\": null,\n \"price\": success.data.data.quotedPrice,\n \"categoryId\": success.data.data.category.id,\n \"categoryName\": GetCategoryOrSubCategoryOnId(true, success.data.data.category.id),\n \"subCategoryId\": success.data.data.subCategory.id,\n \"subCategoryName\": GetCategoryOrSubCategoryOnId(false, success.data.data.subCategory.id),\n \"templateType\": null,\n \"itemWorth\": 0,\n \"policyNumber\": null,\n \"appraisalValue\": null,\n \"productSerialNo\": null,\n \"imageId\": null,\n \"jwelleryTypeId\": null,\n \"jwelleryType\": null,\n \"claimed\": false,\n \"claimId\": success.data.data.claimId,\n \"vendorId\": null,\n \"age\": success.data.data.age,\n \"status\": null,\n \"statusId\": success.data.data.statusId,\n \"itemCategory\": null,\n \"contact\": null,\n \"notes\": null,\n \"additionalInfo\": null,\n \"approved\": false,\n \"scheduled\": success.data.data.isScheduledItem\n }\n }", "static async read() {\n let json = (await IO.parseFileJSON(Paths.FILE_SONGS)).list;\n let l = json.length;\n this.list = new Array(l);\n let i, j, m, n, jsonHash, k, jsonList, jsonSong, id, list, song;\n for (i = 0; i < l; i++) {\n jsonHash = json[i];\n k = jsonHash.k;\n jsonList = jsonHash.v;\n // Get the max ID\n m = jsonList.length;\n n = 0;\n for (j = 0; j < m; j++) {\n jsonSong = jsonList[j];\n id = jsonSong.id;\n if (id > n) {\n n = id;\n }\n }\n // Fill the songs list\n list = new Array(n + 1);\n for (j = 0; j < n + 1; j++) {\n jsonSong = jsonList[j];\n if (jsonSong) {\n id = jsonSong.id;\n song = new System.Song(jsonSong, k);\n if (k !== SongKind.Sound) {\n song.load();\n }\n if (id === -1) {\n id = 0;\n }\n list[id] = song;\n }\n }\n this.list[k] = list;\n }\n }", "getBotsList() {\n let bot_status = {};\n bot_status.count = utils.objectLength(this.bots);\n let bots_list = [];\n for (const idx in this.bots) {\n let url = new URL(this.bots[idx].page.url());\n let room_url = url.origin + url.pathname;\n bots_list.push({\n uuid: this.bots[idx].uuid,\n name: this.bots[idx].name,\n room_url: room_url,\n avatar_id: this.bots[idx].avatar_id,\n });\n }\n bot_status.bots = bots_list;\n return utils.buildJsonResponse({\n command: \"bots list\",\n success: true,\n message: \"Ok\",\n data: bots_list,\n });\n }", "function populateList(json, serviceName, listItemTitle, selectionHandler) {\n\n //Handle Array Items\n var tableNodes = null;\n\n //get list items from json\n if (json[\"Response\"][serviceName + \"TableArray\"] != undefined) {\n //if Object, convert to Array\n tableNodes = [].concat(json[\"Response\"][serviceName + \"TableArray\"][serviceName + \"ArrayItem\"]);\n }\n\n populateListItems(tableNodes, listItemTitle, selectionHandler);\n}", "processLocationData(obj) {\n var listData = [];\n var i;\n for(i = 0; i < obj.length; i++) {\n listData.push({\n key: obj[i][\"id\"].toString(),\n name: obj[i][\"name\"],\n imageURL: obj[i][\"imageurl\"]\n });\n }\n this.setState({\n locationsList: listData\n });\n }", "static fromJSON(modules) {\n let res = [];\n\n if (Array.isArray(modules)) {\n modules.forEach((s) => {\n Object.setPrototypeOf(s, ModuleBO.prototype);\n res.push(s);\n })\n }\n // it's a single object and not an array\n else {\n let s = modules;\n Object.setPrototypeOf(s, ModuleBO.prototype);\n res.push(s);\n }\n\n return res\n }", "constructor(settingsJson){\n\n //emails holder\n this.emails = [];\n\n //get all emails\n for(let email of settingsJson.emails){\n\n let emailObj = new Email(email);\n\n this.emails.push(emailObj);\n\n }\n\n }", "function generateListItem(itemJson){\n\n var itemList = document.createElement(\"li\");\n itemList.classList.add(\"productLine\");\n\n itemList.appendChild(formatListItem(itemJson.imagem, \"productImage\"));\n itemList.appendChild(formatListItem(itemJson.titulo, \"productHeader\"));\n itemList.appendChild(formatListItem(itemJson.descricao, \"productParagraph\"));\n\n return itemList;\n\n}", "function convertJsonToObj( data ) {\n\t\t\tvar index = 0,\n\t\t\t obj = {},\n\t\t\t list = {},\n\t\t\t eventArgs = {\n\t\t\t\t\tfailMessage: '',\n\t\t\t\t\tfailed: []\n\t\t\t\t};\n\n\t\t\tdata = angular.fromJson( data );\n\n\t\t\tfor ( index = 0; index < data.length; index++ ) {\n\t\t\t\tobj = {};\n\t\t\t\tobj.id = data[ index ].hashed_id;\n\t\t\t\tobj.name = data[ index ].name;\n\t\t\t\tobj.thumbnail = data[ index ].thumbnail;\n\t\t\t\tobj.date = data[ index ].updated;\n\t\t\t\tobj.status = data[ index ].status;\n\n\t\t\t\t// Remove videos that have been processed from the queue\n\t\t\t\tswitch ( obj.status ) {\n\t\t\t\t\tcase 'failed':\n\t\t\t\t\t\teventArgs.failMessage = 'Could not process the following file(s). Please ensure your files meet size and format restrictions, and try again.';\n\t\t\t\t\t\teventArgs.failed.push( obj.name );\n\n\t\t\t\t\t\t$rootScope.$broadcast( 'couldNotProcessVideo', eventArgs );\n\n\t\t\t\t\t\t// Remove from processing queue\n\t\t\t\t\t\t$rootScope.$broadcast( 'removeVideoFromProcessQueue', { id: obj.id } );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'ready':\n\n\t\t\t\t\t\t// Only return videos that are ready\n\t\t\t\t\t\tlist[ data[ index ].id ] = obj;\n\n\t\t\t\t\t\t// Remove from processing queue\n\t\t\t\t\t\t$rootScope.$broadcast( 'removeVideoFromProcessQueue', { id: obj.id } );\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn list;\n\t\t}", "constructor(issueJson) {\n this.id = issueJson.id;\n this.key = issueJson.key;\n this.title = issueJson.fields.summary;\n this.labels = issueJson.fields.labels;\n this.type = issueJson.fields.issuetype.id;\n this.status = issueJson.fields.status.id;\n this.storypoints = issueJson.fields.customfield_10026;\n this.assignee = issueJson.fields.assignee ? issueJson.fields.assignee.displayName: \"\";\n\n // this.statusChanges = issueJson.changelog.histories.forEach(\n // (history) => {\n // return history.items\n // .filter((item) => item.field == \"status\")\n // .map((item) => {\n // return {\n // from: getStatusType(item.from),\n // to: getStatusType(item.to),\n // date: dayjs(history.created),\n // };\n // });\n // }\n // );\n // .flatMap(history => {\n // });\n // console.log(issueJson);\n }", "function createJsonList(){\n var padElms = document.getElementsByClassName(\"padElm\");\n var jsonArr = [];\n for(var i =0; i < padElms.length; i++){\n var cur = padElms[i];\n var next = {\n \"text\":cur.innerHTML,\n \"size\":cur.style.fontSize,\n \"posX\":cur.style.left,\n \"posY\":cur.style.top,\n \"id\": cur.id,\n \"selected\":\"false\",\n \"sub\":\"none\"\n }\n jsonArr.push(next);\n }\n return jsonArr;\n}", "static fromJSON(groupinvitations) {\n let result = [];\n\n if (Array.isArray(groupinvitations)) {\n groupinvitations.forEach((a) => {\n Object.setPrototypeOf(a, GroupInvitationBO.prototype);\n result.push(a);\n })\n } else {\n // Es handelt sich offenbar um ein singuläres Objekt\n let a = groupinvitations;\n Object.setPrototypeOf(a, GroupInvitationBO.prototype);\n result.push(a);\n }\n\n return result;\n }", "constructor() {\n this.list = {};\n }", "initFromJson(jsonNode) {\n this.setName(jsonNode.name);\n this.setId(jsonNode.name);\n this.setFullPackageName(jsonNode.packageName);\n if (jsonNode.fields !== undefined) {\n const fields = jsonNode.fields.map((field) => {\n return BallerinaEnvFactory.createObjectField({\n type: field.type,\n name: field.name,\n defaultValue: field.defaultValue,\n packageName: field.packageName\n });\n });\n this.setFields(fields);\n }\n }", "editJsonList(input) {\n let jvalue = this.get(input.path);\n if (jvalue) {\n if (jvalue.constructor === Array) {\n let listObj = jvalue.find(obj => obj[input.id] === input.value);\n const foundIndex = jvalue.findIndex(obj => obj[input.id] === input.value);\n\n if (listObj) {\n const new_configs = input.body\n Object.keys(new_configs).forEach((key) => {\n let value = findValue(listObj, key);\n if (value) {\n if (value.constructor === Array) {\n value.push(new_configs[key]);\n new_configs[key] = value;\n }\n }\n const jeditor = new this.constructor(listObj);\n jeditor.set(key, new_configs[key]);\n listObj = jeditor.toObject();\n });\n jvalue[foundIndex] = listObj;\n this.set(input.path, jvalue);\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"No Such object found.\" } });\n }\n\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Expecting Array but found Object/String.\" } });\n }\n }\n return ({ isError: false, data: this.toObject() });\n\n }", "function createCategoryArray(jsonList) {\n // Redefine the global as an empty array\n categoryList = [];\n\n /* If the page contains a quizSearchResults container elem, the */\n /* categoryList global will be utilised by a filter select box. Add an */\n /* additional 'All' object at position 0 */\n if ($('#quizSearchResults').length) {\n categoryList.push({'category': 'All', 'category_icon': 'fa-asterisk'});\n }\n\n // For each object in the list...\n jsonList.forEach(function (obj) {\n // Add an object to the global categoryList array\n categoryList.push({\"category\": obj.category, // category name\n \"category_icon\": obj.category_icon.class}); // icon class\n });\n}", "function processResult(json) {\n\n var ret = {};\n\n ret.id = json.uuid;\n ret.name = json.name;\n ret.handle = json.handle;\n ret.type = json.type;\n ret.copyrightText = json.copyrightText;\n ret.introductoryText = json.introductoryText;\n ret.shortDescription = json.shortDescription;\n if (typeof json.permission !== 'undefined') {\n ret.canAdminister = json.permission.canAdminister;\n }\n ret.countItems = json.countItems;\n var logo = {};\n if (json.logo !== null) {\n logo.id = json.logo.uuid;\n logo.retrieveLink = json.logo.retrieveLink;\n logo.sizeBytes = json.logo.sizeBytes;\n logo.mimeType = json.logo.mimeType;\n\n }\n ret.logo = logo;\n\n var collections = [];\n var itemTotal = 0;\n for (var i = 0; i < json.collections.length; i++) {\n\n var tmp = {};\n tmp.id = json.collections[i].id;\n tmp.name = json.collections[i].name;\n tmp.handle = json.collections[i].handle;\n tmp.type = json.collections[i].type;\n tmp.copyrightText = json.collections[i].copyrightText;\n tmp.introductoryText = json.collections[i].introductoryText;\n tmp.shortDescription = json.collections[i].shortDescription;\n tmp.numberItems = json.collections[i].numberItems;\n collections[i] = tmp;\n\n // increment total item count\n itemTotal += tmp.numberItems;\n\n }\n ret.items = collections;\n ret.itemTotal = itemTotal;\n\n return ret;\n }", "static createFromJson(jsonObj)\n\t{\n\t\treturn new PublicationCard(jsonObj[\"name\"],\n\t\tjsonObj[\"description\"],\n\t\tActionButton.createListFromJson(jsonObj[\"fileLinks\"]),\n\t\tjsonObj[\"authors\"],\n\t\tjsonObj[\"year\"],\n\t\tjsonObj[\"topic\"],\n\t\tjsonObj[\"type\"],\n\t\tjsonObj[\"publisher\"],\n\t\tjsonObj[\"publicationStatus\"]);\n\t}", "static fromJSON(learnProfiles) {\n let result = [];\n\n if (Array.isArray(learnProfiles)) {\n learnProfiles.forEach((p) => {\n Object.setPrototypeOf(p, LearnProfileBO.prototype);\n result.push(p);\n })\n } else {\n\n let p = learnProfiles;\n Object.setPrototypeOf(p, LearnProfileBO.prototype);\n result.push(p);\n }\n\n return result;\n }", "function ObtenListaJsonFuenteCadena(datos) {\n var listaClima = [];\n for (i = 0; i < datos.length; i++) {\n listaClima.push(JSON.parse(datos[i]) );\n }\n return listaClima;\n}", "function sucessJsonList1(res) {\n let configObject = {};\n let configObjectList = [];\n\n for (let i = 0; i < res.length; i++) {\n let attributeList = [];\n let attribute = {};\n let dataObjectdata = configObjectList.find(obj => obj.id == res[i].id);\n if (dataObjectdata) {\n let dataObjectDetails = configObjectList.find(obj => obj.id == res[i].id);\n if (null != res[i].configobjectattributeid) {\n let datatypes = {};\n if (null != res[i].datatypesid) {\n datatypes = {\n id: res[i].datatypesid,\n name: res[i].datatypesname\n }\n }\n\n attribute = {\n id: res[i].configobjectattributeid,\n name: res[i].configobjectattributename,\n datatypes: datatypes\n }\n dataObjectDetails.attributeList.push(attribute);\n }\n\n\n } else {\n\n if (null != res[i].configobjectattributeid) {\n let datatypes = {};\n if (null != res[i].datatypesid) {\n datatypes = {\n id: res[i].datatypesid,\n name: res[i].datatypesname\n }\n }\n\n attribute = {\n id: res[i].configobjectattributeid,\n name: res[i].configobjectattributename,\n datatypes: datatypes\n }\n attributeList.push(attribute);\n }\n\n\n configObject = {\n id: res[i].id,\n name: res[i].name,\n description: res[i].description,\n attributeList: attributeList\n }\n configObjectList.push(configObject)\n\n }\n\n\n\n\n }\n \n return configObjectList;\n}", "parsing(data) {\r\n let jsonStructure = new jsonParser(data);\r\n }", "setPropsFromObject(obj) {\n this.id = obj.id;\n this.name = obj.name;\n this.groceries = [];\n\n for(var i = 0; i < obj.groceries.length; i++) {\n var grocery = new Grocery();\n grocery.setPropsFromObject(obj.groceries[i]);\n this.groceries.push(grocery);\n }\n }", "buildFromJSON(JSONObject) {\n const attributeDescriptors = this.constructor.attributeDescriptors;\n Object.entries(attributeDescriptors).forEach(([localName, attributeObj]) => {\n if (attributeObj.remoteName in JSONObject) {\n const value = JSONObject[attributeObj.remoteName];\n if (attributeObj.attributeType == NUAttribute.ATTR_TYPE_INTEGER || attributeObj.attributeType == NUAttribute.ATTR_TYPE_FLOAT) {\n this[localName] = (!value && value !== 0) ? null : Number(value);\n } else {\n this[localName] = value;\n }\n }\n });\n return this;\n }", "function search_successCB(data) {\n\n // Object created from json\n resultJSON = JSON.parse(data);\n\n generate_list(resultJSON)\n\n console.log(\"Success callback\");\n }", "function populateList() {\n // adds a new element (specified JSON object) to $scope.itemsList\n $scope.itemsList.push({\"name\":\"big screen TV\", \"room\":\"Basement\"});\n $scope.itemsList.push({\"name\":\"Xbox One\", \"room\":\"Basement\"});\n $scope.itemsList.push({\"name\":\"Ice Maker\", \"room\":\"Kitchen\"});\n }", "function restoreObj(json, par) {\n var childArr = [];\n if (json) {\n for (var i = 0; i < json.length; ++i) {\n window.ASUHeaderMakerJSON.count++;\n var newObj = Object.create(MenuItem);\n newObj.id = 'asu-header-item-' + window.ASUHeaderMakerJSON.count;;\n// newObj.id = json[i].id;\n newObj.title = json[i].title;\n newObj.url = json[i].url;\n newObj.buildDomItem();\n newObj.parent = par || window.ASUHeaderMakerJSON;\n newObj.children = restoreObj(json[i].children, newObj);\n newObj.updateDomChildren();\n newObj.index = childArr.push(newObj) - 1;\n }\n }\n return childArr;\n }", "function JsonToArray(list,key){\r\n\r\n\tvar array = [];\r\n\r\n\tif(!list){\r\n\t\treturn array;\r\n\t}\r\n\r\n\t$.each(list,function(i,v){\r\n\t\tif(v[key] != undefined){\r\n\t\t\tarray.push(v[key]);\r\n\t\t}\r\n\t});\r\n\r\n\treturn array;\r\n}", "function listSongs () {\n $.getJSON(\"/songs\", function(songs){\n $.each(songs, function(index, song) {\n var the_song = new Song(song)\n $(\"#song_list\").append(the_song.formatSong())\n })\n })\n}", "static fromJSON(json) {\n\t\tlet poll = new Poll(\"\", [0, 0], \".temp\");\n\t\tObject.assign(poll, json);\n\t\treturn poll;\n\t}", "function parseJsonFeatured() {\n var results = metadata;\n\n // can't bind elements to carousel due to possible bug\n for (var i=0;i<4;i++)\n {\n var shelf = getActiveDocument().getElementsByTagName(\"shelf\").item(i)\n var section = shelf.getElementsByTagName(\"section\").item(0)\n \n //create an empty data item for the section\n section.dataItem = new DataItem()\n \n //create data items from objects\n let newItems = results.map((result) => {\n let objectItem = new DataItem(result.type, result.ID);\n objectItem.url = result.url;\n objectItem.title = result.title;\n objectItem.onselect = result.onselect;\n objectItem.watchtime = result.watchtime;\n return objectItem;\n });\n \n //add the data items to the section's data item; 'images' relates to the binding name in the protoype where items:{images} is all of the newItems being added to the sections' data item;\n section.dataItem.setPropertyPath(\"images\", newItems)\n }\n}", "function createLines(json) {\n var meta = json.meta;\n var data = json.data;\n\n var newLines = [];\n\n for (var i=0; i < meta.lines.length; i++) {\n // Get the tag\n var lineTag = meta.lines[i].tag;\n\n newLines.push([]);\n // Generate the list of data (month, measurement)\n for (var j=0; j < data.length; j++) {\n // Assumes data has a \"Length\" tag in each element\n newLines[i].push([data[j][\"Length\"], data[j][lineTag]]);\n }\n }\n return newLines;\n }", "function populateScrollable()\n{\n $(\".plantsClickable\").remove();\n $.each(plantsJson, function(i, field)\n {\n $('.scrollable').append(\"<li class='plantsClickable'>\" + field.Name + \"</li>\");\n });\n}", "function loadActivities(){\n var activitiesJSONified = JSON.parse(Activities); //read the JSON file\n for (var i=0; i<activitiesJSONified.length; i++){\n activityBucket.push(new Activity( //process contents through object constructor and push to array.\n activitiesJSONified[i].title,\n activitiesJSONified[i].image,\n activitiesJSONified[i].shortContent\n ));\n }\n}", "deserializeArray(cls, json, options) {\n const jsonObject = JSON.parse(json);\n return this.plainToInstance(cls, jsonObject, options);\n }", "function fromJSON(pb, value) {\n var ctors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (typeof pb === 'function') {\n pb = new pb();\n }\n if ((0, _lodashEs.isPlainObject)(value)) {\n Object.keys(value).forEach(function (k) {\n var setter = 'set' + (k.charAt(0).toUpperCase() + k.slice(1));\n var val = value[k];\n if ((0, _lodashEs.isArray)(val)) {\n setter += 'List';\n }\n if (setter in pb) {\n if (isPrimitive(val)) {\n pb[setter](val);\n } else if ((0, _lodashEs.isPlainObject)(val)) {\n var Ctor = ctors[k + '.ctors'];\n if (Ctor) {\n var subPb = new Ctor();\n fromJSON(subPb, val, ctors[k]);\n pb[setter](subPb);\n }\n } else if ((0, _lodashEs.isArray)(val) && val.length) {\n var firstEl = val[0];\n if (isPrimitive(firstEl)) {\n pb[setter](val);\n } else if ((0, _lodashEs.isPlainObject)(val)) {\n var array = [];\n var _Ctor = ctors[k + '.ctors'];\n if (_Ctor) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = val[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var el = _step.value;\n\n var sub = new _Ctor();\n array.push(fromJSON(sub, el, ctors[k]));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n pb[setter](val);\n }\n }\n }\n }\n });\n }\n return pb;\n}", "function MenuList(json) {\n return {\n type: 'GET_MENU_LIST',\n lists: json,\n receivedAt: Date.now()\n }\n}", "function GroceryList(listObj) {\n this.list = listObj;\n}", "initializeFromJSON(dataObject) {\n\n console.log('dataObject', dataObject);\n\n if(!dataObject) { return; }\n\n for(const stringifiedData of dataObject) {\n const fields = stringifiedData.split('-');\n\n const proteinId = fields[0];\n const start = parseInt(fields[1]);\n const end = parseInt(fields[2]);\n const color = fields[3];\n\n this.addProteinColorAnnotation({\n proteinId:proteinId,\n start:start,\n end:end,\n color:color\n });\n }\n }", "function loadList() {\n return $.ajax(apiUrl, {\n method: 'GET',\n dataType: 'json'\n }).then(function(item) {\n //console.log(item.results); //array of objects for JS generated */\n $.each(item.results, (function(index, result) {\n //console.log(item);\n const pokemon = {\n name: result.name,\n detailsUrl: result.url\n };\n add(pokemon);\n }));\n }).catch(function(e) {\n console.error(e);\n });\n }", "deserialize(cls, json, options) {\n const jsonObject = JSON.parse(json);\n return this.plainToInstance(cls, jsonObject, options);\n }", "setFromJSON(jsnmphtgt) {\n//----------\nthis.fourCCName = FourCC.fourCCInt(jsnmphtgt.morphTargetName);\nreturn this.vertices = jsnmphtgt.morphSets.map(MorphVertex.fromJSON);\n}", "function createRoleArray(jsonList) {\n // Redefine the global as an empty array\n roleList = [];\n\n // For each object in the list...\n jsonList.forEach(function (obj) {\n // Add an object to the global roleList array\n roleList.push({\"role\": obj.role, // role name\n \"member_count\": obj.member_count, // role members\n \"role_icon\": obj.role_icon.class}); // icon class\n });\n}", "function populateSongList(json) {\n\tvar elmt = $('#song-list');\n\n\tfor (var i in json) {\n\t\tvar name = json[i]['name'];\n\t\tvar path = json[i]['path'];\n\t\tvar html = '<div class=\"draggable-song\" data-name=\"' + name + '\" data-path=\"' + path + '\">';\n\n\t\thtml += '<div class=\"text\">' + name + '</div>';\n\t\thtml += '</div>';\n\n\t\telmt.append(html);\n\t}\n\n\t$('.draggable-song').draggable({ \n\t\tappendTo: 'body',\n\t\tcontainment: 'window',\n\t\tscroll: false,\n\t\thelper: 'clone'\n\t});\n}", "function process(json) {\n var movies = [];\n\n json.Movies.forEach(function (movie) {\n var newmovie = {\n 'title' : movie.Title,\n 'poster' : movie.Cover,\n 'torrents' : []\n };\n\n movie.Torrents.forEach(function (torrent) {\n if (config[config.movies].resolutions.indexOf(torrent.Resolution) != -1 &&\n config[config.movies].sources.indexOf(torrent.Source) != -1)\n newmovie.torrents.push(torrent);\n });\n\n if (newmovie.torrents.length)\n movies.push(newmovie);\n });\n\n return movies;\n}", "function jsonAnswerDataToListElements(json_answer) {\n var data = json_answer;\n var n = data.length;\n var r = []\n for (var i = 0; i < n; ++i) {\n var row = data[i];\n var geomJson = $.parseJSON(row.st_asgeojson);\n r.push(geomJson);\n }\n return r;\n}", "constructor(data) {\n let temp = data.split('\\n').map(item => {\n return item.split(',')\n })\n let label = temp.shift()\n\n let result = []\n\n for (var node of temp) {\n let json = {}\n for (var variable in node) {\n json[label[variable]] = node[variable]\n }\n result.push(json)\n }\n\n this.nodes = result\n }", "buildJSON() {\n return JSON.stringify(this.toObject());\n }", "static createFromJson(jsonObj)\n\t{\n\t\treturn new ProjectStudent(jsonObj[\"name\"],\n\t\tjsonObj[\"description\"], \n\t\tjsonObj[\"status\"]);\n\t}", "function populateMonsterList(json) {\n for (monster of json) {\n renderSingleMonster(monster);\n }\n}", "getList() {\n return this.value ? [] : this.nestedList;\n }", "asJson() {\n return mapValues(response => {\n if (response.stories) {\n return Object.assign({}, response, {\n stories: response.stories.map(story => story.asJson())\n });\n } else {\n return response;\n }\n }, this.results);\n }", "function parseContestantData(json) {\n 'use strict';\n var fieldsNames = [\n ['Imię', 'first_name'],\n ['Nazwisko', 'last_name'],\n ['Płeć', 'gender'],\n ['Wiek', 'age'],\n ['Rodzaj Szkoły', 'school'],\n ['styl i dystans', 'styles_distances']\n ];\n var fragment = document.createDocumentFragment();\n var elementUl = document.createElement('ul');\n var elementLi;\n\n fieldsNames.forEach(function(field) {\n elementLi = document.createElement('li');\n elementLi.appendChild(document.createTextNode(field[0] + ': ' + json[field[1]]));\n elementUl.appendChild(elementLi);\n });\n fragment.appendChild(elementUl);\n\n return fragment;\n}", "updateFromJson(json) {\n const self = this;\n self.set('marketplaces', json);\n\n const keys = Object.keys(json);\n\n keys.forEach(key => { self.set(key, json[key]) });\n }", "function $d_LOV_from_JSON(){\n var that = this;\n /**\n * @type String\n * SELECT,MULTISELECT,SHUTTLE,CHECK,RADIO,FILTER.\n * */\n this.l_Type = false;\n /**\n * @type String\n * JSON Formated String\n * */\n this.l_Json = false;\n this.l_This = false;\n this.l_JSON = false;\n this.l_Id = 'json_temp';\n this.l_NewEls = [];\n this.create = create;\n this.l_Dom = false;\n return;\n\n /**\n * @param {?} pThis\n * @param {?} pJSON\n * @param {?} pType\n * @param {?} pId\n * @param {?} pCheckedValue\n * @param {?} pForceNewLine\n *\n * @instance\n * @memberOf $d_LOV_from_JSON\n * */\n function create(pThis,pJSON,pType,pId,pCheckedValue,pForceNewLine){\n var myObject = apex.jQuery.parseJSON( pJSON );\n if(that.l_Type == 'SHUTTLE'){/* SHUTTLE */\n var lvar = '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"ajax_shuttle\" summary=\"\"><tbody><tr><td class=\"shuttleSelect1\" id=\"shuttle1\"></td><td align=\"center\" class=\"shuttleControl\"><img title=\"Reset\" alt=\"Reset\" onclick=\"g_Shuttlep_v01.reset();\" src=\"/i/htmldb/icons/shuttle_reload.png\"/><img title=\"Move All\" alt=\"Move All\" onclick=\"g_Shuttlep_v01.move_all();\" src=\"/i/htmldb/icons/shuttle_last.png\"/><img title=\"Move\" alt=\"Move\" onclick=\"g_Shuttlep_v01.move();\" src=\"/i/htmldb/icons/shuttle_right.png\"/><img title=\"Remove\" alt=\"Remove\" onclick=\"g_Shuttlep_v01.remove();\" src=\"/i/htmldb/icons/shuttle_left.png\"/><img title=\"Remove All\" alt=\"Remove All\" onclick=\"g_Shuttlep_v01.remove_all();\" src=\"/i/htmldb/icons/shuttle_first.png\"/></td><td class=\"shuttleSelect2\" id=\"shuttle2\"></td><td class=\"shuttleSort2\"><img title=\"Top\" alt=\"Top\" onclick=\"g_Shuttlep_v01.sort2(\\'T\\');\" src=\"/i/htmldb/icons/shuttle_top.png\"/><img title=\"Up\" alt=\"Up\" onclick=\"g_Shuttlep_v01.sort2(\\'U\\');\" src=\"/i/htmldb/icons/shuttle_up.png\"/><img title=\"Down\" alt=\"Down\" onclick=\"g_Shuttlep_v01.sort2(\\'D\\');\" src=\"/i/htmldb/icons/shuttle_down.png\"/><img title=\"Bottom\" alt=\"Bottom\" onclick=\"g_Shuttlep_v01.sort2(\\'B\\');\" src=\"/i/htmldb/icons/shuttle_bottom.png\"/></td></tr></tbody></table>';\n $x(pThis).innerHTML = lvar;\n var lSelect = $dom_AddTag('shuttle1','select');\n var lSelect2 = $dom_AddTag('shuttle2','select');\n lSelect.multiple = true;\n lSelect2.multiple = true;\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i]) {\n var lTest = (!!myObject.row[i].C)?parseInt(myObject.row[i].C):false;\n if(lTest){var lOption = $dom_AddTag(lSelect2,'option');}\n else{var lOption = $dom_AddTag(lSelect,'option');}\n lOption.text = myObject.row[i].D;\n lOption.value = myObject.row[i].R;\n }\n }\n window.g_Shuttlep_v01 = null;\n if(!flowSelectArray){var flowSelectArray = [];}\n flowSelectArray[2] = lSelect;\n flowSelectArray[1] = lSelect2;\n window.g_Shuttlep_v01 = new dhtml_ShuttleObject(lSelect,lSelect2);\n return window.g_Shuttlep_v01;\n\n }else if(that.l_Type == 'SELECT' || that.l_Type == 'MULTISELECT'){\n var lSelect = $dom_AddTag(pThis,'select');\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i]) {\n var lOption = $dom_AddTag(lSelect,'option');\n lOption.text = myObject.row[i].D;\n lOption.value = myObject.row[i].R;\n var lTest = parseInt(myObject.row[i].C);\n lOption.selected=lTest;\n }\n }\n that.l_Dom = lSelect;\n return that;\n }else if(that.l_Type == 'RADIO'){\n var ltable = $dom_AddTag(pThis,'table');\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i]) {\n if (i % 10==0 || pForceNewLine) {\n lrow = $dom_AddTag(ltable,'tr');\n }\n var lTd = $dom_AddTag(lrow,'td');\n //var lTest = parseInt(myObject.row[i].C)\n var lTest = false;\n if (pCheckedValue) {\n if (pCheckedValue == myObject.row[i].R) {\n lTest = true;\n }\n }\n var lCheck = $dom_AddInput(lTd,'radio',myObject.row[i].R);\n lCheck.checked=lTest;\n $dom_AddTag(lTd,'span',myObject.row[i].D);\n }\n }\n that.l_Dom = lSelect;\n return that;\n }else if(that.l_Type == 'CHECKBOX'){\n var ltable = $dom_AddTag(pThis,'table');\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i]) {\n if (i % 10==0 || pForceNewLine) {lrow = $dom_AddTag(ltable,'tr');}\n var lTd = $dom_AddTag(lrow,'td');\n var lTest = parseInt(myObject.row[i].C);\n var lCheck = $dom_AddInput(lTd,'checkbox',myObject.row[i].R);\n lCheck.checked=lTest;\n $dom_AddTag(lTd,'span',myObject.row[i].D)\n }\n }\n that.l_Dom = lSelect;\n return that;\n }else{\n var lHolder = $dom_AddTag(pThis,'div');\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i] && myObject.row[i].R ) {\n var l_D = (!!myObject.row[i].D)?myObject.row[i].D:myObject.row[i].R;\n var lThis = $dom_AddTag(lHolder,that.l_Type.toUpperCase(),l_D);\n that.l_NewEls[that.l_NewEls.length] = lThis;\n lThis.id = myObject.row[i].R;\n var lTest = parseInt(myObject.row[i].C);\n if (lTest) {lThis.className = 'checked';}\n }\n }\n that.l_Dom = lHolder;\n return that;\n }\n\n }\n}", "createMyList(data,_pre){\n var _this=this,cLen=0;\n data.map(function(i){\n cLen=0;\n i.child.map(function(data){\n if(data.folderName){\n cLen++;\n }\n });\n _this.state.displayList.push({child:cLen,folder:i.folderName,level:i.level, _on:i._on, editable:i.editable,rel:_pre+'/'+i.folderName,type:i.type});\n if(_this.state.exAll){\n i._on =true;\n }\n if(_this.state.colAll){\n i._on =false;\n }\n if(i._on){\n _this.createMyList(i.child,_pre+'/'+i.folderName); // recursive call to iterate over the nested data structure\n }\n });\n }", "removeJsonList(input) {\n let pathList = input.path.split(\"#\")\n let idList = input.id.split(\"#\")\n let valueList = input.value.split(\"#\")\n let jvalue = this.get(pathList[0]);\n\n if (pathList.length == 2) {\n if (jvalue) { //ACCOUNTS\n if (jvalue.constructor === Array) {\n let listObj = jvalue.find(obj => obj[idList[0]] === valueList[0]); // ONE ACNT OBJ\n const foundIndex = jvalue.findIndex(obj => obj[input.id] === input.value);\n\n if (listObj) {\n let rvalue = findValue(listObj, pathList[1]);\n if (rvalue.constructor === Array) {\n let filter = rvalue.filter(obj => obj[idList[1]] !== valueList[1]); // ONE ACNT OBJ\n const jeditor = new this.constructor(listObj);\n jeditor.set(pathList[1], filter);\n listObj = jeditor.toObject();\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Expecting Array but found Object/String.\" } });\n }\n jvalue[foundIndex] = listObj;\n this.set(pathList[0], jvalue);\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"No Such object found.\" } });\n }\n\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Expecting Array but found Object/String.\" } });\n }\n }\n }else if (pathList.length == 1){\n if (jvalue) { //ACCOUNTS\n if (jvalue.constructor === Array) {\n let filter = jvalue.filter(obj => obj[idList[0]] !== valueList[0]);\n this.set(pathList[0], filter);\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Expecting Array but found Object/String.\" } });\n }\n }\n }else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Not handling more than two level list iteration.\" } });\n }\n\n return ({ isError: false, data: this.toObject() });\n }", "createFormsFromJSON() {\n if(this.qajson) {\n let jsonarr = this.qajson;\n for(var i = 0; i < jsonarr.length; i++) {\n let qdata = jsonarr[i];\n let newform = this.createQuestionForm(qdata[\"question\"], qdata[\"answers\"], qdata[\"correct\"]);\n if(newform) this.questionWrapper.appendChild(newform);\n }\n }\n }", "function _constructJSON(xmlParams) {\n const json = xmlParams.list;\n let listMPUResultArray = [\n { _attr: { xmlns: 'http://s3.amazonaws.com/doc/2006-03-01/' } },\n { Bucket: xmlParams.bucketName },\n { KeyMarker: xmlParams.keyMarker },\n { UploadIdMarker: xmlParams.uploadIdMarker },\n { NextKeyMarker: json.NextKeyMarker },\n { NextUploadIdMarker: json.NextUploadIdMarker },\n { Delimiter: json.Delimiter },\n { Prefix: xmlParams.prefix },\n { MaxUploads: json.MaxKeys },\n { IsTruncated: json.IsTruncated },\n ];\n\n const contents = json.Uploads.map(upload => {\n let key = upload.key;\n if (xmlParams.encoding === 'url') {\n key = querystring.escape(key);\n }\n const uploadVal = upload.value;\n return {\n Upload: [\n { Key: key },\n { UploadId: uploadVal.UploadId },\n { Initiator: [\n { ID: uploadVal.Initiator.ID },\n { DisplayName: uploadVal.Initiator.DisplayName },\n ] },\n { Owner: [\n { ID: uploadVal.Owner.ID },\n { DisplayName: uploadVal.Owner.DisplayName },\n ] },\n { StorageClass: uploadVal.StorageClass },\n // Initiated date was converted to take out \"-\"\n // and \".\" to prevent routing errors. Need\n // to replace back.\n { Initiated: uploadVal.Initiated },\n ],\n };\n });\n\n if (contents.length > 0) {\n listMPUResultArray = listMPUResultArray.concat(contents);\n }\n\n const commonPrefixes = json.CommonPrefixes.map(item =>\n ({ CommonPrefixes: [{ Prefix: item }] }));\n\n if (commonPrefixes.length > 0) {\n listMPUResultArray = listMPUResultArray.concat(commonPrefixes);\n }\n\n const constructedJSON = { ListMultipartUploadsResult: listMPUResultArray };\n\n return constructedJSON;\n}", "function createStudentList(jsonData) {\n\t//console.log(jsonData);\n\t\n\t//for IE 11 - other sultion needed array push not working\n\nstudentList = [];\nfor(x=0;x<jsonData.length;x++) {\n\tstudentList.push(jsonData[x]);\t\t\n\t}\n}", "function ListObject(user,name,listArr) {\n this.user = user,\n this.name = name,\n this.listArr = listArr\n\n}", "static fromJson(json) {\n return new Paginator(json.nbHits, json.nbPages, json.page);\n }", "function getObjects(data){\n programms = [];\n for(count in (data.programme)){\n\n programms[count] = new Program(data.programme[count].title.de, data.programme[count].start, data.programme[count].stop);\n }\n}", "static fromJSON(jsnmphtgt) {\nvar mphtgt;\n//--------\nmphtgt = new MorphTarget();\nmphtgt.setFromJSON(jsnmphtgt);\nreturn mphtgt;\n}", "function getQuestionListJsonByInput(){\n var json_question = []; \n $('.json_question').each(function(key){\n if($(this).val() != ''){\n json_question.push(jQuery.parseJSON($(this).val()));\n json_question[key]['key'] = key;\n }\n });\n pRunQuestionListPreview(json_question);\n \n}", "function jsonParsing(jsonData, jsonLegData) {\r\n time.push({\r\n walkingTime : jsonData.itineraries[0].walkTime,\r\n transitTime : jsonData.itineraries[0].transitTime,\r\n waitingTime : jsonData.itineraries[0].waitingTime,\r\n start : jsonData.itineraries[0].startTime,\r\n end : jsonData.itineraries[0].endTime,\r\n transfers : jsonData.itineraries[0].transfers,\r\n });\r\n for (j=0; j < jsonLegData.length; j++) {\r\n legInfo.push({ currentLeg:j + 1,\r\n transitMode:jsonLegData[j].mode, \r\n legDuration : (jsonLegData[j].endTime - jsonLegData[j].startTime) / 1000,\r\n departurePlace : jsonLegData[j].from.name,\r\n departureTime : jsonLegData[j].from.departure,\r\n arrivalPlace : jsonLegData[j].to.name,\r\n arrivalTime : jsonLegData[j].to.arrival,\r\n legPolyline : decodeGeometry(jsonLegData[j].legGeometry.points)});\r\n }\r\n return {time, legInfo};\r\n}", "verificar() {\n const arreglo = this.state.data;\n let arreglo2 = [];\n arreglo.map(item => {\n arreglo2 = arreglo2.concat(new this.crearJSON(item.id_rec, item.obs, item.obs_upg, item.validado, item.ubic));\n return null;\n });\n this.setState({\n JSON: arreglo2\n });\n // console.log(arreglo2);\n return arreglo2;\n }", "function auxiliar(json){\n if(json.length==0 || json == null){\n alert(\"No hay productos en ese rango de precios\");\n return;\n }\n for(let producto of json){\n items(producto);\n }\n }", "function createHTMLListFromObject(jsObject) {\n var list = document.createElement('ul');\n // Change the padding (top: 0, right:0, bottom:0 and left:1.5)\n list.style.padding = '0 0 0 1.5rem';\n // For each property of the object\n Object.keys(jsObject).forEach(function _(property) {\n // create item\n var item = document.createElement('li');\n // append property name\n item.appendChild(document.createTextNode(property));\n\n if (jsObject[property] === null) {\n jsObject[property] = 'null';\n }\n\n if (typeof jsObject[property] === 'object') {\n // if property value is an object, then recurse to\n // create a list from it\n item.appendChild(\n createHTMLListFromObject(jsObject[property]));\n } else {\n // else append the value of the property to the item\n item.appendChild(document.createTextNode(': '));\n item.appendChild(\n document.createTextNode(jsObject[property]));\n }\n list.appendChild(item);\n });\n return list;\n}", "function sucessJsonList(res, resJson) {\n let configObject = {};\n let configObjectList = [];\n\n for (let i = 0; i < res.length; i++) {\n let attributeList = [];\n let attribute = {};\n let dataObjectdata = configObjectList.find(obj => obj.id == res[i].id);\n if (dataObjectdata) {\n let dataObjectDetails = configObjectList.find(obj => obj.id == res[i].id);\n if (null != res[i].configobjectattributeid) {\n let datatypes = {};\n if (null != res[i].datatypesid) {\n datatypes = {\n id: res[i].datatypesid,\n name: res[i].datatypesname\n }\n }\n\n attribute = {\n id: res[i].configobjectattributeid,\n name: res[i].configobjectattributename,\n datatypes: datatypes\n }\n dataObjectDetails.attributeList.push(attribute);\n }\n\n\n } else {\n\n if (null != res[i].configobjectattributeid) {\n let datatypes = {};\n if (null != res[i].datatypesid) {\n datatypes = {\n id: res[i].datatypesid,\n name: res[i].datatypesname\n }\n }\n\n attribute = {\n id: res[i].configobjectattributeid,\n name: res[i].configobjectattributename,\n datatypes: datatypes\n }\n attributeList.push(attribute);\n }\n\n\n configObject = {\n id: res[i].id,\n name: res[i].name,\n description: res[i].description,\n attributeList: attributeList\n }\n configObjectList.push(configObject)\n\n }\n\n\n\n\n }\n resJson = {\n \"status\": \"SUCCESS\",\n \"data\": configObjectList,\n \"msg\": null,\n \"errormsg\": \"\",\n\n }\n return resJson;\n}" ]
[ "0.6511763", "0.6003714", "0.5967254", "0.5797491", "0.5694719", "0.56515944", "0.5651211", "0.5574462", "0.55693215", "0.55429196", "0.55225444", "0.5520386", "0.55173886", "0.54675996", "0.545905", "0.544704", "0.5379877", "0.5379143", "0.53785515", "0.537014", "0.53679097", "0.53634995", "0.53594124", "0.5356047", "0.5342227", "0.5342156", "0.53413916", "0.5296446", "0.52948993", "0.528939", "0.5277473", "0.5275169", "0.5273031", "0.5250985", "0.5218482", "0.5212362", "0.52040076", "0.52014744", "0.51941365", "0.51879317", "0.5186681", "0.5186571", "0.5170146", "0.51697916", "0.5161471", "0.5139346", "0.5137023", "0.5135339", "0.51340973", "0.5121586", "0.51215553", "0.5105946", "0.51012045", "0.509779", "0.5097713", "0.5094365", "0.5075922", "0.50753874", "0.50736195", "0.50422126", "0.50415695", "0.50392324", "0.50358015", "0.50326", "0.5030054", "0.50264406", "0.50134766", "0.5012261", "0.50062066", "0.50060326", "0.49972886", "0.49943256", "0.49940372", "0.4991457", "0.49875975", "0.4983158", "0.49816787", "0.49802166", "0.49796942", "0.49774635", "0.49699405", "0.4967996", "0.49655288", "0.4959649", "0.4958242", "0.49579525", "0.4956773", "0.49532712", "0.49508956", "0.49470192", "0.49416777", "0.4940714", "0.49274516", "0.4925885", "0.49240673", "0.49191397", "0.49188364", "0.49016526", "0.4900379", "0.48987857" ]
0.6721883
0
build a list of this object from Json object
static createFromJson(jsonObj) { return new PublicationCard(jsonObj["name"], jsonObj["description"], ActionButton.createListFromJson(jsonObj["fileLinks"]), jsonObj["authors"], jsonObj["year"], jsonObj["topic"], jsonObj["type"], jsonObj["publisher"], jsonObj["publicationStatus"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static createListFromJson(jsonObj)\n\t{\n\t\tvar answer = [];\n\t\tfor (var publicationIndex = 0; publicationIndex < jsonObj.length; publicationIndex++)\n\t\t{\n\t\t\tanswer.push(PublicationCard.createFromJson(jsonObj[publicationIndex]));\n\t\t}\n\t\treturn answer;\n\t}", "static createListFromJson(jsonObj)\n\t{\n\t\tvar answer = [];\n\t\tfor (var projectIndex = 0; projectIndex < jsonObj.length; projectIndex++)\n\t\t{\n\t\t\tanswer.push(ProjectStudent.createFromJson(jsonObj[projectIndex]));\n\t\t}\n\t\treturn answer;\n\t}", "function createData(json) {\n\tconsole.log(json);\n\tdataList = [];\n\tvar truth = false;\n\tfor (var i = 0; i < json.length; i++) {\n\t\ttype = json[i]['type'];\n\t\ttruth = false;\n\t\tif (type === \"Twitter\") {\n\t\t\tpossibleTweet = new Tweet(json[i]);\n\t\t\tfor (var j=0; j < i; j++){\n\t\t\t\tif(possibleTweet.id === dataList[j].id){\n\t\t\t\t\ttruth = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(truth === false){\n\t\t\t\tdataList.push(possibleTweet);\n\t\t\t}\n\t\t}\n\n\t\tif (type === \"Instagram\") {\n\t\t\tdataList.push(new Gram(json[i]));\n\t\t}\n\t\tif(type === \"Soundcloud\"){\n\t\t\tdataList.push(new Song(json[i]))\n\t\t}\n\t}\n\treturn dataList;\n}", "static fromJSON(shoppinglists) {\n let result = [];\n\n if (Array.isArray(shoppinglists)) {\n shoppinglists.forEach((sl) => {\n Object.setPrototypeOf(sl, ShoppingListBO.prototype)\n result.push(sl)\n })\n } else {\n\n let sl = shoppinglists\n Object.setPrototypeOf(sl, ShoppingListBO.prototype)\n result.push(sl)\n }\n\n return result;\n }", "constructor (json) {\n\t\tthis.loadJSON(json);\n\t}", "addJSONLists() {\n\t\tthis.characterPieces = characterAssetsJsonObject.frames; \n\n\t\tthis.categories = ['none', 'A'];\n\t\tthis.sizes = ['Large_Feminine', 'Medium_Feminine', 'Small_Feminine', 'Large_Masculine', 'Medium_Masculine', 'Small_Masculine'];\n\t\tthis.handed = [\n\t\t\t'none',\n\t\t\t{ hand: 'RightHanded2', category: 'A' },\n\t\t\t{ hand: 'LeftHanded2', category: 'A' }\n\t\t];\n\t}", "constructor(_json) {\n\t\t//Create timetableDay from JSON\n\t\tthis.usedIds = new Array();\n\t\tthis.subjects = new Array();\n\t\t_json = JSON.parse(_json);\n\t\tif (_json) {\n\t\t\tthis.updateViaJSON(_json);\n\t\t}\n\t}", "static fromJSON(users) {\n let result = [];\n\n if (Array.isArray(users)) {\n users.forEach((a) => {\n Object.setPrototypeOf(a, UserBO.prototype);\n result.push(a);\n })\n } else {\n // Es handelt sich offenbar um ein singuläres Objekt\n let a = users;\n Object.setPrototypeOf(a, UserBO.prototype);\n result.push(a);\n }\n return result;\n }", "function treatJsonData(data) {\n data.forEach((stud) => {\n //copy the object prototype as many times as json objects there are\n const student = Object.create(Student);\n //modify the original data according to requirements\n //clean empty space around strings\n let fullName = stud.fullname.trim();\n let house = stud.house.trim();\n //define elements\n student.firstName = getFirstName(fullName);\n student.lastName = getLastName(fullName);\n //if middle name\n student.middleName = getMiddleName(fullName);\n //if nickname\n student.nickName = getNickName(fullName);\n student.image = getImage(fullName);\n student.house = getStudentHouse(house);\n student.prefect = false;\n student.quidditch = false;\n student.inquisitorial = false;\n student.bloodStatus = calculateBloodStatus(student.lastName);\n //push object into empty array\n listOfStudents.push(student);\n });\n return listOfStudents;\n}", "function convert(jsonResult, Constructor) {\n if (angular.isArray(jsonResult)) {\n // Array: So we need to convert each element and push it into a new array to send back\n var models = [];\n angular.forEach(jsonResult, function (item) {\n models.push(convertItem(item, Constructor));\n });\n return models;\n } else {\n return convertItem(jsonResult, Constructor);\n }\n }", "storageEventBackToObject(jsonObject){\n let eventObjects = []\n //Need to convert JSON OBJECT to a \n jsonObject.forEach(function(event){\n let eventObject = new Event(event._title, event._eventDate)\n \n console.log(eventObject)\n eventObjects.push(eventObject)\n })\n return eventObjects\n \n }", "function parseJson(items, listToAppendTo, propertyToDisplay) {\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var listElement = document.createElement('li');\n listElement.innerHTML = item[propertyToDisplay];\n listToAppendTo.appendChild(listElement);\n }\n}", "loadFromJson(data) {\n // TODO: Load this object from the data\n const parsedState = JSON.parse(data);\n parsedState.categories.forEach((category, index) => {\n this.setCategory(category, index);\n });\n parsedState.toDoList.forEach(todo => {\n if (todo.text) {\n this.pushTodo(new Note(todo.text, todo.completed));\n } else if (todo.title) {\n this.pushTodo(new Task(todo.title, todo.categoryIndex, todo.description, todo.completed));\n }\n });\n }", "static fromJSON(semesters) {\n let result = [];\n\n if (Array.isArray(semesters)) {\n semesters.forEach((s) => {\n Object.setPrototypeOf(s, SemesterBO.prototype);\n result.push(s);\n })\n } else {\n // Es handelt sich offenbar um ein singuläres Objekt\n let s = semesters;\n Object.setPrototypeOf(s, SemesterBO.prototype);\n result.push(s);\n }\n\n return result;\n }", "function createCards(jsonObj){\n var x = 1\n var jsonCards = jsonObj['cards'];\n for(var i = 0; i < jsonCards.length; i++){\n cards[i] = new Card(jsonCards[i].name, jsonCards[i].value, jsonCards[i].id, jsonCards[i].image);\n console.log(cards[i]);\n }\n}", "static fromJSON(chatMessages) {\n let result = [];\n\n if (Array.isArray(chatMessages)) {\n chatMessages.forEach((m) => {\n Object.setPrototypeOf(m, ChatMessageBO.prototype);\n result.push(m);\n })\n } else {\n // Es handelt sich offenbar um ein singuläres Objekt\n let m = chatMessages;\n Object.setPrototypeOf(m, ChatMessageBO.prototype);\n result.push(m);\n }\n\n return result;\n }", "function getUsers(json) { return json.map(function (obj){ return obj.user; } ); }", "function createNewObject(jsonData) {\n jsonData.forEach(task => {\n const tasks = Object.create(taskPrototype);\n tasks.id = task.id;\n tasks.day = task.day;\n tasks.time = task.time;\n tasks.description = task.desc;\n //push to array\n arrayTasks.push(task);\n });\n // console.log(arrayTasks);\n displayTasks(arrayTasks);\n}", "static fromJSON(persons) {\n let result = [];\n\n if (Array.isArray(persons)) {\n persons.forEach((n) => {\n Object.setPrototypeOf(n, PersonBO.prototype);\n result.push(n);\n })\n } else {\n let n = persons;\n Object.setPrototypeOf(n, PersonBO.prototype);\n result.push(n);\n }\n\n return result;\n }", "function createStudentList(jsonData) {\n//console.log(jsonData);\nstudentList = [];\nfor(x=0;x<jsonData.length;x++) {\n\tstudentList.push(jsonData[x]);\t\t\n\t}\nconsole.log(studentList)\n}", "static fromJSON({id,tarea,completado,creado}){\n const tempTodo = new Todo(tarea);\n tempTodo.id = id;\n tempTodo.completado = completado;\n tempTodo.creado = creado;\n\n return tempTodo; // retornamos la instancia\n }", "toJSON () {\n return this.list;\n }", "function sacarUsuarios(json){\n \n for(let usuario of json){ \n var id = usuario.id;\n var email = usuario.email;\n var pass = usuario.password;\n\n var objetoUsers = new constructorUsers(id,email,pass);\n datosUser.push(objetoUsers);\n\n contadorId=usuario.id; //sacar el ultimo valor de ID que esta en el JSON\n }\n return datosUser; \n}", "function retrieve(jsonArr){\njsonArr = JSON.parse(jsonArr);\n for (j = 0; j < jsonArr.length; j++){\n new listItem(jsonArr[j].name,jsonArr[j].id,jsonArr[j].done).getHtml();\n }\n}", "function renderJson(json) {\n\t\tlistView.setSections([]);\n\t\tvar data = [];\n\t\tvar sections = [];\n\t\tif (_title === 'Find by Breeder' || _title === 'Find by Owner') {\n\t\t\tfor (var i = 0,\n\t\t\t j = j = json.length; i < j; i++) {\n\t\t\t\tdata.push({\n\t\t\t\t\ttitle : {\n\t\t\t\t\t\ttext : json[i].contact_name + ', ' + json[i].email\n\t\t\t\t\t},\n\t\t\t\t\t// Sets the regular list data properties\n\t\t\t\t\tproperties : {\n\t\t\t\t\t\taccessoryType : Ti.UI.LIST_ACCESSORY_TYPE_NONE\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var i = 0,\n\t\t\t j = j = json.length; i < j; i++) {\n\t\t\t\tdata.push({\n\t\t\t\t\ttitle : {\n\t\t\t\t\t\ttext : json[i].horse.official_name\n\t\t\t\t\t},\n\t\t\t\t\t// Sets the regular list data properties\n\t\t\t\t\tproperties : {\n\t\t\t\t\t\titemId : json[i].horse.id,\n\t\t\t\t\t\taccessoryType : Ti.UI.LIST_ACCESSORY_TYPE_NONE\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tvar _section = Ti.UI.createListSection({\n\t\t\titems : data\n\t\t});\n\n\t\tsections.push(_section);\n\t\tlistView.setSections(sections);\n\t}", "loadLists(obj) {\n var listData = [];\n var i;\n console.log(obj)\n for(i = 0; i < obj.length; i++) {\n listData.push({title: obj[i]['name'], activityCount: obj[i]['activity_count'], key: obj[i]['id'].toString()})\n }\n \n this.setState({listData: listData});\n }", "parse (json) {\n const references = []\n const parsed = [ JSON.parse(json) ]\n function visit (object, index, value) {\n if (typeof value == 'object' && value != null) {\n if (Array.isArray(value)) {\n switch (value[0]) {\n case '_reference':\n references.push({ object, index, path: value[1] })\n break\n case '_undefined':\n object[index] = void 0\n break\n case '_array':\n value.shift()\n default:\n for (let i = 0, I = value.length; i < I; i++) {\n visit(value, i, value[i])\n }\n }\n } else {\n for (const property in value) {\n visit(value, property, value[property])\n }\n }\n }\n }\n visit(parsed, 0, parsed[0])\n for (const { object, index, path } of references) {\n object[index] = get(parsed[0], path)\n }\n return parsed[0]\n }", "function buildFormFields(json) {\n var formFields = [];\n for (var key in json) {\n var item = json[key];\n switch (item.type) {\n case \"number\":\n var div = document.createElement('div');\n div.setAttribute(\"class\", \"custom-input-field\");\n div.setAttribute(\"id\", key + \"-input-field\");\n var label = buildLabel(key, key);\n var input = buildNumberField(key, item);\n var suffix = buildLabel(key, item.unit);\n div.appendChild(label);\n div.appendChild(input);\n div.appendChild(suffix);\n formFields.push(div);\n break;\n default:\n console.log(\"KEY: \", key, \" not found\");\n }\n }\n return formFields;\n}", "static fromJson(js) {\n function recursive(jsnode, name, parent) {\n let node = new NodeTree_1.default(name, parent);\n if (jsnode !== null) {\n for (let key in jsnode) {\n node.childs.push(recursive(jsnode[key], key, node));\n }\n }\n return node;\n }\n let tree = new Tree();\n if (js !== null && Object.keys(js).length != 0) {\n let rootName = Object.keys(js)[0];\n tree.root = recursive(js[rootName], rootName, null);\n }\n return tree;\n }", "function buildList(json) {\n var html = '<table><thead>' + buildHeader(json[0]) + '</thead><tbody>';\n\n for (var i = 0; i < json.length; i++) {\n html += buildRow(json[i], null, (i % 2 == 1));\n }\n html += '</tbody></table>';\n\n return html;\n}", "function list () {\n return _.cloneDeep(data);\n}", "function MakeObjectToAddInList(success) {\n return {\n \"itemId\": success.data.data.id,\n \"itemName\": success.data.data.itemName,\n \"itemPrice\": null,\n \"collection\": null,\n \"images\": [],\n \"quantity\": null,\n \"dateOfPurchase\": success.data.data.dateOfPurchase,\n \"category\": null,\n \"rooms\": null,\n \"currentValue\": null,\n \"brand\": success.data.data.brand,\n \"model\": success.data.data.model,\n \"description\": success.data.data.description,\n \"roomId\": null,\n \"collectionId\": null,\n \"price\": success.data.data.quotedPrice,\n \"categoryId\": success.data.data.category.id,\n \"categoryName\": GetCategoryOrSubCategoryOnId(true, success.data.data.category.id),\n \"subCategoryId\": success.data.data.subCategory.id,\n \"subCategoryName\": GetCategoryOrSubCategoryOnId(false, success.data.data.subCategory.id),\n \"templateType\": null,\n \"itemWorth\": 0,\n \"policyNumber\": null,\n \"appraisalValue\": null,\n \"productSerialNo\": null,\n \"imageId\": null,\n \"jwelleryTypeId\": null,\n \"jwelleryType\": null,\n \"claimed\": false,\n \"claimId\": success.data.data.claimId,\n \"vendorId\": null,\n \"age\": success.data.data.age,\n \"status\": null,\n \"statusId\": success.data.data.statusId,\n \"itemCategory\": null,\n \"contact\": null,\n \"notes\": null,\n \"additionalInfo\": null,\n \"approved\": false,\n \"scheduled\": success.data.data.isScheduledItem\n }\n }", "static async read() {\n let json = (await IO.parseFileJSON(Paths.FILE_SONGS)).list;\n let l = json.length;\n this.list = new Array(l);\n let i, j, m, n, jsonHash, k, jsonList, jsonSong, id, list, song;\n for (i = 0; i < l; i++) {\n jsonHash = json[i];\n k = jsonHash.k;\n jsonList = jsonHash.v;\n // Get the max ID\n m = jsonList.length;\n n = 0;\n for (j = 0; j < m; j++) {\n jsonSong = jsonList[j];\n id = jsonSong.id;\n if (id > n) {\n n = id;\n }\n }\n // Fill the songs list\n list = new Array(n + 1);\n for (j = 0; j < n + 1; j++) {\n jsonSong = jsonList[j];\n if (jsonSong) {\n id = jsonSong.id;\n song = new System.Song(jsonSong, k);\n if (k !== SongKind.Sound) {\n song.load();\n }\n if (id === -1) {\n id = 0;\n }\n list[id] = song;\n }\n }\n this.list[k] = list;\n }\n }", "getBotsList() {\n let bot_status = {};\n bot_status.count = utils.objectLength(this.bots);\n let bots_list = [];\n for (const idx in this.bots) {\n let url = new URL(this.bots[idx].page.url());\n let room_url = url.origin + url.pathname;\n bots_list.push({\n uuid: this.bots[idx].uuid,\n name: this.bots[idx].name,\n room_url: room_url,\n avatar_id: this.bots[idx].avatar_id,\n });\n }\n bot_status.bots = bots_list;\n return utils.buildJsonResponse({\n command: \"bots list\",\n success: true,\n message: \"Ok\",\n data: bots_list,\n });\n }", "function populateList(json, serviceName, listItemTitle, selectionHandler) {\n\n //Handle Array Items\n var tableNodes = null;\n\n //get list items from json\n if (json[\"Response\"][serviceName + \"TableArray\"] != undefined) {\n //if Object, convert to Array\n tableNodes = [].concat(json[\"Response\"][serviceName + \"TableArray\"][serviceName + \"ArrayItem\"]);\n }\n\n populateListItems(tableNodes, listItemTitle, selectionHandler);\n}", "processLocationData(obj) {\n var listData = [];\n var i;\n for(i = 0; i < obj.length; i++) {\n listData.push({\n key: obj[i][\"id\"].toString(),\n name: obj[i][\"name\"],\n imageURL: obj[i][\"imageurl\"]\n });\n }\n this.setState({\n locationsList: listData\n });\n }", "static fromJSON(modules) {\n let res = [];\n\n if (Array.isArray(modules)) {\n modules.forEach((s) => {\n Object.setPrototypeOf(s, ModuleBO.prototype);\n res.push(s);\n })\n }\n // it's a single object and not an array\n else {\n let s = modules;\n Object.setPrototypeOf(s, ModuleBO.prototype);\n res.push(s);\n }\n\n return res\n }", "constructor(settingsJson){\n\n //emails holder\n this.emails = [];\n\n //get all emails\n for(let email of settingsJson.emails){\n\n let emailObj = new Email(email);\n\n this.emails.push(emailObj);\n\n }\n\n }", "function generateListItem(itemJson){\n\n var itemList = document.createElement(\"li\");\n itemList.classList.add(\"productLine\");\n\n itemList.appendChild(formatListItem(itemJson.imagem, \"productImage\"));\n itemList.appendChild(formatListItem(itemJson.titulo, \"productHeader\"));\n itemList.appendChild(formatListItem(itemJson.descricao, \"productParagraph\"));\n\n return itemList;\n\n}", "function convertJsonToObj( data ) {\n\t\t\tvar index = 0,\n\t\t\t obj = {},\n\t\t\t list = {},\n\t\t\t eventArgs = {\n\t\t\t\t\tfailMessage: '',\n\t\t\t\t\tfailed: []\n\t\t\t\t};\n\n\t\t\tdata = angular.fromJson( data );\n\n\t\t\tfor ( index = 0; index < data.length; index++ ) {\n\t\t\t\tobj = {};\n\t\t\t\tobj.id = data[ index ].hashed_id;\n\t\t\t\tobj.name = data[ index ].name;\n\t\t\t\tobj.thumbnail = data[ index ].thumbnail;\n\t\t\t\tobj.date = data[ index ].updated;\n\t\t\t\tobj.status = data[ index ].status;\n\n\t\t\t\t// Remove videos that have been processed from the queue\n\t\t\t\tswitch ( obj.status ) {\n\t\t\t\t\tcase 'failed':\n\t\t\t\t\t\teventArgs.failMessage = 'Could not process the following file(s). Please ensure your files meet size and format restrictions, and try again.';\n\t\t\t\t\t\teventArgs.failed.push( obj.name );\n\n\t\t\t\t\t\t$rootScope.$broadcast( 'couldNotProcessVideo', eventArgs );\n\n\t\t\t\t\t\t// Remove from processing queue\n\t\t\t\t\t\t$rootScope.$broadcast( 'removeVideoFromProcessQueue', { id: obj.id } );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'ready':\n\n\t\t\t\t\t\t// Only return videos that are ready\n\t\t\t\t\t\tlist[ data[ index ].id ] = obj;\n\n\t\t\t\t\t\t// Remove from processing queue\n\t\t\t\t\t\t$rootScope.$broadcast( 'removeVideoFromProcessQueue', { id: obj.id } );\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn list;\n\t\t}", "constructor(issueJson) {\n this.id = issueJson.id;\n this.key = issueJson.key;\n this.title = issueJson.fields.summary;\n this.labels = issueJson.fields.labels;\n this.type = issueJson.fields.issuetype.id;\n this.status = issueJson.fields.status.id;\n this.storypoints = issueJson.fields.customfield_10026;\n this.assignee = issueJson.fields.assignee ? issueJson.fields.assignee.displayName: \"\";\n\n // this.statusChanges = issueJson.changelog.histories.forEach(\n // (history) => {\n // return history.items\n // .filter((item) => item.field == \"status\")\n // .map((item) => {\n // return {\n // from: getStatusType(item.from),\n // to: getStatusType(item.to),\n // date: dayjs(history.created),\n // };\n // });\n // }\n // );\n // .flatMap(history => {\n // });\n // console.log(issueJson);\n }", "function createJsonList(){\n var padElms = document.getElementsByClassName(\"padElm\");\n var jsonArr = [];\n for(var i =0; i < padElms.length; i++){\n var cur = padElms[i];\n var next = {\n \"text\":cur.innerHTML,\n \"size\":cur.style.fontSize,\n \"posX\":cur.style.left,\n \"posY\":cur.style.top,\n \"id\": cur.id,\n \"selected\":\"false\",\n \"sub\":\"none\"\n }\n jsonArr.push(next);\n }\n return jsonArr;\n}", "static fromJSON(groupinvitations) {\n let result = [];\n\n if (Array.isArray(groupinvitations)) {\n groupinvitations.forEach((a) => {\n Object.setPrototypeOf(a, GroupInvitationBO.prototype);\n result.push(a);\n })\n } else {\n // Es handelt sich offenbar um ein singuläres Objekt\n let a = groupinvitations;\n Object.setPrototypeOf(a, GroupInvitationBO.prototype);\n result.push(a);\n }\n\n return result;\n }", "constructor() {\n this.list = {};\n }", "initFromJson(jsonNode) {\n this.setName(jsonNode.name);\n this.setId(jsonNode.name);\n this.setFullPackageName(jsonNode.packageName);\n if (jsonNode.fields !== undefined) {\n const fields = jsonNode.fields.map((field) => {\n return BallerinaEnvFactory.createObjectField({\n type: field.type,\n name: field.name,\n defaultValue: field.defaultValue,\n packageName: field.packageName\n });\n });\n this.setFields(fields);\n }\n }", "editJsonList(input) {\n let jvalue = this.get(input.path);\n if (jvalue) {\n if (jvalue.constructor === Array) {\n let listObj = jvalue.find(obj => obj[input.id] === input.value);\n const foundIndex = jvalue.findIndex(obj => obj[input.id] === input.value);\n\n if (listObj) {\n const new_configs = input.body\n Object.keys(new_configs).forEach((key) => {\n let value = findValue(listObj, key);\n if (value) {\n if (value.constructor === Array) {\n value.push(new_configs[key]);\n new_configs[key] = value;\n }\n }\n const jeditor = new this.constructor(listObj);\n jeditor.set(key, new_configs[key]);\n listObj = jeditor.toObject();\n });\n jvalue[foundIndex] = listObj;\n this.set(input.path, jvalue);\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"No Such object found.\" } });\n }\n\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Expecting Array but found Object/String.\" } });\n }\n }\n return ({ isError: false, data: this.toObject() });\n\n }", "function createCategoryArray(jsonList) {\n // Redefine the global as an empty array\n categoryList = [];\n\n /* If the page contains a quizSearchResults container elem, the */\n /* categoryList global will be utilised by a filter select box. Add an */\n /* additional 'All' object at position 0 */\n if ($('#quizSearchResults').length) {\n categoryList.push({'category': 'All', 'category_icon': 'fa-asterisk'});\n }\n\n // For each object in the list...\n jsonList.forEach(function (obj) {\n // Add an object to the global categoryList array\n categoryList.push({\"category\": obj.category, // category name\n \"category_icon\": obj.category_icon.class}); // icon class\n });\n}", "function processResult(json) {\n\n var ret = {};\n\n ret.id = json.uuid;\n ret.name = json.name;\n ret.handle = json.handle;\n ret.type = json.type;\n ret.copyrightText = json.copyrightText;\n ret.introductoryText = json.introductoryText;\n ret.shortDescription = json.shortDescription;\n if (typeof json.permission !== 'undefined') {\n ret.canAdminister = json.permission.canAdminister;\n }\n ret.countItems = json.countItems;\n var logo = {};\n if (json.logo !== null) {\n logo.id = json.logo.uuid;\n logo.retrieveLink = json.logo.retrieveLink;\n logo.sizeBytes = json.logo.sizeBytes;\n logo.mimeType = json.logo.mimeType;\n\n }\n ret.logo = logo;\n\n var collections = [];\n var itemTotal = 0;\n for (var i = 0; i < json.collections.length; i++) {\n\n var tmp = {};\n tmp.id = json.collections[i].id;\n tmp.name = json.collections[i].name;\n tmp.handle = json.collections[i].handle;\n tmp.type = json.collections[i].type;\n tmp.copyrightText = json.collections[i].copyrightText;\n tmp.introductoryText = json.collections[i].introductoryText;\n tmp.shortDescription = json.collections[i].shortDescription;\n tmp.numberItems = json.collections[i].numberItems;\n collections[i] = tmp;\n\n // increment total item count\n itemTotal += tmp.numberItems;\n\n }\n ret.items = collections;\n ret.itemTotal = itemTotal;\n\n return ret;\n }", "static fromJSON(learnProfiles) {\n let result = [];\n\n if (Array.isArray(learnProfiles)) {\n learnProfiles.forEach((p) => {\n Object.setPrototypeOf(p, LearnProfileBO.prototype);\n result.push(p);\n })\n } else {\n\n let p = learnProfiles;\n Object.setPrototypeOf(p, LearnProfileBO.prototype);\n result.push(p);\n }\n\n return result;\n }", "function ObtenListaJsonFuenteCadena(datos) {\n var listaClima = [];\n for (i = 0; i < datos.length; i++) {\n listaClima.push(JSON.parse(datos[i]) );\n }\n return listaClima;\n}", "function sucessJsonList1(res) {\n let configObject = {};\n let configObjectList = [];\n\n for (let i = 0; i < res.length; i++) {\n let attributeList = [];\n let attribute = {};\n let dataObjectdata = configObjectList.find(obj => obj.id == res[i].id);\n if (dataObjectdata) {\n let dataObjectDetails = configObjectList.find(obj => obj.id == res[i].id);\n if (null != res[i].configobjectattributeid) {\n let datatypes = {};\n if (null != res[i].datatypesid) {\n datatypes = {\n id: res[i].datatypesid,\n name: res[i].datatypesname\n }\n }\n\n attribute = {\n id: res[i].configobjectattributeid,\n name: res[i].configobjectattributename,\n datatypes: datatypes\n }\n dataObjectDetails.attributeList.push(attribute);\n }\n\n\n } else {\n\n if (null != res[i].configobjectattributeid) {\n let datatypes = {};\n if (null != res[i].datatypesid) {\n datatypes = {\n id: res[i].datatypesid,\n name: res[i].datatypesname\n }\n }\n\n attribute = {\n id: res[i].configobjectattributeid,\n name: res[i].configobjectattributename,\n datatypes: datatypes\n }\n attributeList.push(attribute);\n }\n\n\n configObject = {\n id: res[i].id,\n name: res[i].name,\n description: res[i].description,\n attributeList: attributeList\n }\n configObjectList.push(configObject)\n\n }\n\n\n\n\n }\n \n return configObjectList;\n}", "parsing(data) {\r\n let jsonStructure = new jsonParser(data);\r\n }", "setPropsFromObject(obj) {\n this.id = obj.id;\n this.name = obj.name;\n this.groceries = [];\n\n for(var i = 0; i < obj.groceries.length; i++) {\n var grocery = new Grocery();\n grocery.setPropsFromObject(obj.groceries[i]);\n this.groceries.push(grocery);\n }\n }", "buildFromJSON(JSONObject) {\n const attributeDescriptors = this.constructor.attributeDescriptors;\n Object.entries(attributeDescriptors).forEach(([localName, attributeObj]) => {\n if (attributeObj.remoteName in JSONObject) {\n const value = JSONObject[attributeObj.remoteName];\n if (attributeObj.attributeType == NUAttribute.ATTR_TYPE_INTEGER || attributeObj.attributeType == NUAttribute.ATTR_TYPE_FLOAT) {\n this[localName] = (!value && value !== 0) ? null : Number(value);\n } else {\n this[localName] = value;\n }\n }\n });\n return this;\n }", "function search_successCB(data) {\n\n // Object created from json\n resultJSON = JSON.parse(data);\n\n generate_list(resultJSON)\n\n console.log(\"Success callback\");\n }", "function populateList() {\n // adds a new element (specified JSON object) to $scope.itemsList\n $scope.itemsList.push({\"name\":\"big screen TV\", \"room\":\"Basement\"});\n $scope.itemsList.push({\"name\":\"Xbox One\", \"room\":\"Basement\"});\n $scope.itemsList.push({\"name\":\"Ice Maker\", \"room\":\"Kitchen\"});\n }", "function restoreObj(json, par) {\n var childArr = [];\n if (json) {\n for (var i = 0; i < json.length; ++i) {\n window.ASUHeaderMakerJSON.count++;\n var newObj = Object.create(MenuItem);\n newObj.id = 'asu-header-item-' + window.ASUHeaderMakerJSON.count;;\n// newObj.id = json[i].id;\n newObj.title = json[i].title;\n newObj.url = json[i].url;\n newObj.buildDomItem();\n newObj.parent = par || window.ASUHeaderMakerJSON;\n newObj.children = restoreObj(json[i].children, newObj);\n newObj.updateDomChildren();\n newObj.index = childArr.push(newObj) - 1;\n }\n }\n return childArr;\n }", "function JsonToArray(list,key){\r\n\r\n\tvar array = [];\r\n\r\n\tif(!list){\r\n\t\treturn array;\r\n\t}\r\n\r\n\t$.each(list,function(i,v){\r\n\t\tif(v[key] != undefined){\r\n\t\t\tarray.push(v[key]);\r\n\t\t}\r\n\t});\r\n\r\n\treturn array;\r\n}", "function listSongs () {\n $.getJSON(\"/songs\", function(songs){\n $.each(songs, function(index, song) {\n var the_song = new Song(song)\n $(\"#song_list\").append(the_song.formatSong())\n })\n })\n}", "static fromJSON(json) {\n\t\tlet poll = new Poll(\"\", [0, 0], \".temp\");\n\t\tObject.assign(poll, json);\n\t\treturn poll;\n\t}", "function parseJsonFeatured() {\n var results = metadata;\n\n // can't bind elements to carousel due to possible bug\n for (var i=0;i<4;i++)\n {\n var shelf = getActiveDocument().getElementsByTagName(\"shelf\").item(i)\n var section = shelf.getElementsByTagName(\"section\").item(0)\n \n //create an empty data item for the section\n section.dataItem = new DataItem()\n \n //create data items from objects\n let newItems = results.map((result) => {\n let objectItem = new DataItem(result.type, result.ID);\n objectItem.url = result.url;\n objectItem.title = result.title;\n objectItem.onselect = result.onselect;\n objectItem.watchtime = result.watchtime;\n return objectItem;\n });\n \n //add the data items to the section's data item; 'images' relates to the binding name in the protoype where items:{images} is all of the newItems being added to the sections' data item;\n section.dataItem.setPropertyPath(\"images\", newItems)\n }\n}", "function createLines(json) {\n var meta = json.meta;\n var data = json.data;\n\n var newLines = [];\n\n for (var i=0; i < meta.lines.length; i++) {\n // Get the tag\n var lineTag = meta.lines[i].tag;\n\n newLines.push([]);\n // Generate the list of data (month, measurement)\n for (var j=0; j < data.length; j++) {\n // Assumes data has a \"Length\" tag in each element\n newLines[i].push([data[j][\"Length\"], data[j][lineTag]]);\n }\n }\n return newLines;\n }", "function populateScrollable()\n{\n $(\".plantsClickable\").remove();\n $.each(plantsJson, function(i, field)\n {\n $('.scrollable').append(\"<li class='plantsClickable'>\" + field.Name + \"</li>\");\n });\n}", "function loadActivities(){\n var activitiesJSONified = JSON.parse(Activities); //read the JSON file\n for (var i=0; i<activitiesJSONified.length; i++){\n activityBucket.push(new Activity( //process contents through object constructor and push to array.\n activitiesJSONified[i].title,\n activitiesJSONified[i].image,\n activitiesJSONified[i].shortContent\n ));\n }\n}", "deserializeArray(cls, json, options) {\n const jsonObject = JSON.parse(json);\n return this.plainToInstance(cls, jsonObject, options);\n }", "function fromJSON(pb, value) {\n var ctors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (typeof pb === 'function') {\n pb = new pb();\n }\n if ((0, _lodashEs.isPlainObject)(value)) {\n Object.keys(value).forEach(function (k) {\n var setter = 'set' + (k.charAt(0).toUpperCase() + k.slice(1));\n var val = value[k];\n if ((0, _lodashEs.isArray)(val)) {\n setter += 'List';\n }\n if (setter in pb) {\n if (isPrimitive(val)) {\n pb[setter](val);\n } else if ((0, _lodashEs.isPlainObject)(val)) {\n var Ctor = ctors[k + '.ctors'];\n if (Ctor) {\n var subPb = new Ctor();\n fromJSON(subPb, val, ctors[k]);\n pb[setter](subPb);\n }\n } else if ((0, _lodashEs.isArray)(val) && val.length) {\n var firstEl = val[0];\n if (isPrimitive(firstEl)) {\n pb[setter](val);\n } else if ((0, _lodashEs.isPlainObject)(val)) {\n var array = [];\n var _Ctor = ctors[k + '.ctors'];\n if (_Ctor) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = val[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var el = _step.value;\n\n var sub = new _Ctor();\n array.push(fromJSON(sub, el, ctors[k]));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n pb[setter](val);\n }\n }\n }\n }\n });\n }\n return pb;\n}", "function MenuList(json) {\n return {\n type: 'GET_MENU_LIST',\n lists: json,\n receivedAt: Date.now()\n }\n}", "function GroceryList(listObj) {\n this.list = listObj;\n}", "initializeFromJSON(dataObject) {\n\n console.log('dataObject', dataObject);\n\n if(!dataObject) { return; }\n\n for(const stringifiedData of dataObject) {\n const fields = stringifiedData.split('-');\n\n const proteinId = fields[0];\n const start = parseInt(fields[1]);\n const end = parseInt(fields[2]);\n const color = fields[3];\n\n this.addProteinColorAnnotation({\n proteinId:proteinId,\n start:start,\n end:end,\n color:color\n });\n }\n }", "function loadList() {\n return $.ajax(apiUrl, {\n method: 'GET',\n dataType: 'json'\n }).then(function(item) {\n //console.log(item.results); //array of objects for JS generated */\n $.each(item.results, (function(index, result) {\n //console.log(item);\n const pokemon = {\n name: result.name,\n detailsUrl: result.url\n };\n add(pokemon);\n }));\n }).catch(function(e) {\n console.error(e);\n });\n }", "deserialize(cls, json, options) {\n const jsonObject = JSON.parse(json);\n return this.plainToInstance(cls, jsonObject, options);\n }", "setFromJSON(jsnmphtgt) {\n//----------\nthis.fourCCName = FourCC.fourCCInt(jsnmphtgt.morphTargetName);\nreturn this.vertices = jsnmphtgt.morphSets.map(MorphVertex.fromJSON);\n}", "function createRoleArray(jsonList) {\n // Redefine the global as an empty array\n roleList = [];\n\n // For each object in the list...\n jsonList.forEach(function (obj) {\n // Add an object to the global roleList array\n roleList.push({\"role\": obj.role, // role name\n \"member_count\": obj.member_count, // role members\n \"role_icon\": obj.role_icon.class}); // icon class\n });\n}", "function populateSongList(json) {\n\tvar elmt = $('#song-list');\n\n\tfor (var i in json) {\n\t\tvar name = json[i]['name'];\n\t\tvar path = json[i]['path'];\n\t\tvar html = '<div class=\"draggable-song\" data-name=\"' + name + '\" data-path=\"' + path + '\">';\n\n\t\thtml += '<div class=\"text\">' + name + '</div>';\n\t\thtml += '</div>';\n\n\t\telmt.append(html);\n\t}\n\n\t$('.draggable-song').draggable({ \n\t\tappendTo: 'body',\n\t\tcontainment: 'window',\n\t\tscroll: false,\n\t\thelper: 'clone'\n\t});\n}", "function process(json) {\n var movies = [];\n\n json.Movies.forEach(function (movie) {\n var newmovie = {\n 'title' : movie.Title,\n 'poster' : movie.Cover,\n 'torrents' : []\n };\n\n movie.Torrents.forEach(function (torrent) {\n if (config[config.movies].resolutions.indexOf(torrent.Resolution) != -1 &&\n config[config.movies].sources.indexOf(torrent.Source) != -1)\n newmovie.torrents.push(torrent);\n });\n\n if (newmovie.torrents.length)\n movies.push(newmovie);\n });\n\n return movies;\n}", "function jsonAnswerDataToListElements(json_answer) {\n var data = json_answer;\n var n = data.length;\n var r = []\n for (var i = 0; i < n; ++i) {\n var row = data[i];\n var geomJson = $.parseJSON(row.st_asgeojson);\n r.push(geomJson);\n }\n return r;\n}", "constructor(data) {\n let temp = data.split('\\n').map(item => {\n return item.split(',')\n })\n let label = temp.shift()\n\n let result = []\n\n for (var node of temp) {\n let json = {}\n for (var variable in node) {\n json[label[variable]] = node[variable]\n }\n result.push(json)\n }\n\n this.nodes = result\n }", "buildJSON() {\n return JSON.stringify(this.toObject());\n }", "static createFromJson(jsonObj)\n\t{\n\t\treturn new ProjectStudent(jsonObj[\"name\"],\n\t\tjsonObj[\"description\"], \n\t\tjsonObj[\"status\"]);\n\t}", "function populateMonsterList(json) {\n for (monster of json) {\n renderSingleMonster(monster);\n }\n}", "getList() {\n return this.value ? [] : this.nestedList;\n }", "asJson() {\n return mapValues(response => {\n if (response.stories) {\n return Object.assign({}, response, {\n stories: response.stories.map(story => story.asJson())\n });\n } else {\n return response;\n }\n }, this.results);\n }", "function parseContestantData(json) {\n 'use strict';\n var fieldsNames = [\n ['Imię', 'first_name'],\n ['Nazwisko', 'last_name'],\n ['Płeć', 'gender'],\n ['Wiek', 'age'],\n ['Rodzaj Szkoły', 'school'],\n ['styl i dystans', 'styles_distances']\n ];\n var fragment = document.createDocumentFragment();\n var elementUl = document.createElement('ul');\n var elementLi;\n\n fieldsNames.forEach(function(field) {\n elementLi = document.createElement('li');\n elementLi.appendChild(document.createTextNode(field[0] + ': ' + json[field[1]]));\n elementUl.appendChild(elementLi);\n });\n fragment.appendChild(elementUl);\n\n return fragment;\n}", "updateFromJson(json) {\n const self = this;\n self.set('marketplaces', json);\n\n const keys = Object.keys(json);\n\n keys.forEach(key => { self.set(key, json[key]) });\n }", "function $d_LOV_from_JSON(){\n var that = this;\n /**\n * @type String\n * SELECT,MULTISELECT,SHUTTLE,CHECK,RADIO,FILTER.\n * */\n this.l_Type = false;\n /**\n * @type String\n * JSON Formated String\n * */\n this.l_Json = false;\n this.l_This = false;\n this.l_JSON = false;\n this.l_Id = 'json_temp';\n this.l_NewEls = [];\n this.create = create;\n this.l_Dom = false;\n return;\n\n /**\n * @param {?} pThis\n * @param {?} pJSON\n * @param {?} pType\n * @param {?} pId\n * @param {?} pCheckedValue\n * @param {?} pForceNewLine\n *\n * @instance\n * @memberOf $d_LOV_from_JSON\n * */\n function create(pThis,pJSON,pType,pId,pCheckedValue,pForceNewLine){\n var myObject = apex.jQuery.parseJSON( pJSON );\n if(that.l_Type == 'SHUTTLE'){/* SHUTTLE */\n var lvar = '<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"ajax_shuttle\" summary=\"\"><tbody><tr><td class=\"shuttleSelect1\" id=\"shuttle1\"></td><td align=\"center\" class=\"shuttleControl\"><img title=\"Reset\" alt=\"Reset\" onclick=\"g_Shuttlep_v01.reset();\" src=\"/i/htmldb/icons/shuttle_reload.png\"/><img title=\"Move All\" alt=\"Move All\" onclick=\"g_Shuttlep_v01.move_all();\" src=\"/i/htmldb/icons/shuttle_last.png\"/><img title=\"Move\" alt=\"Move\" onclick=\"g_Shuttlep_v01.move();\" src=\"/i/htmldb/icons/shuttle_right.png\"/><img title=\"Remove\" alt=\"Remove\" onclick=\"g_Shuttlep_v01.remove();\" src=\"/i/htmldb/icons/shuttle_left.png\"/><img title=\"Remove All\" alt=\"Remove All\" onclick=\"g_Shuttlep_v01.remove_all();\" src=\"/i/htmldb/icons/shuttle_first.png\"/></td><td class=\"shuttleSelect2\" id=\"shuttle2\"></td><td class=\"shuttleSort2\"><img title=\"Top\" alt=\"Top\" onclick=\"g_Shuttlep_v01.sort2(\\'T\\');\" src=\"/i/htmldb/icons/shuttle_top.png\"/><img title=\"Up\" alt=\"Up\" onclick=\"g_Shuttlep_v01.sort2(\\'U\\');\" src=\"/i/htmldb/icons/shuttle_up.png\"/><img title=\"Down\" alt=\"Down\" onclick=\"g_Shuttlep_v01.sort2(\\'D\\');\" src=\"/i/htmldb/icons/shuttle_down.png\"/><img title=\"Bottom\" alt=\"Bottom\" onclick=\"g_Shuttlep_v01.sort2(\\'B\\');\" src=\"/i/htmldb/icons/shuttle_bottom.png\"/></td></tr></tbody></table>';\n $x(pThis).innerHTML = lvar;\n var lSelect = $dom_AddTag('shuttle1','select');\n var lSelect2 = $dom_AddTag('shuttle2','select');\n lSelect.multiple = true;\n lSelect2.multiple = true;\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i]) {\n var lTest = (!!myObject.row[i].C)?parseInt(myObject.row[i].C):false;\n if(lTest){var lOption = $dom_AddTag(lSelect2,'option');}\n else{var lOption = $dom_AddTag(lSelect,'option');}\n lOption.text = myObject.row[i].D;\n lOption.value = myObject.row[i].R;\n }\n }\n window.g_Shuttlep_v01 = null;\n if(!flowSelectArray){var flowSelectArray = [];}\n flowSelectArray[2] = lSelect;\n flowSelectArray[1] = lSelect2;\n window.g_Shuttlep_v01 = new dhtml_ShuttleObject(lSelect,lSelect2);\n return window.g_Shuttlep_v01;\n\n }else if(that.l_Type == 'SELECT' || that.l_Type == 'MULTISELECT'){\n var lSelect = $dom_AddTag(pThis,'select');\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i]) {\n var lOption = $dom_AddTag(lSelect,'option');\n lOption.text = myObject.row[i].D;\n lOption.value = myObject.row[i].R;\n var lTest = parseInt(myObject.row[i].C);\n lOption.selected=lTest;\n }\n }\n that.l_Dom = lSelect;\n return that;\n }else if(that.l_Type == 'RADIO'){\n var ltable = $dom_AddTag(pThis,'table');\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i]) {\n if (i % 10==0 || pForceNewLine) {\n lrow = $dom_AddTag(ltable,'tr');\n }\n var lTd = $dom_AddTag(lrow,'td');\n //var lTest = parseInt(myObject.row[i].C)\n var lTest = false;\n if (pCheckedValue) {\n if (pCheckedValue == myObject.row[i].R) {\n lTest = true;\n }\n }\n var lCheck = $dom_AddInput(lTd,'radio',myObject.row[i].R);\n lCheck.checked=lTest;\n $dom_AddTag(lTd,'span',myObject.row[i].D);\n }\n }\n that.l_Dom = lSelect;\n return that;\n }else if(that.l_Type == 'CHECKBOX'){\n var ltable = $dom_AddTag(pThis,'table');\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i]) {\n if (i % 10==0 || pForceNewLine) {lrow = $dom_AddTag(ltable,'tr');}\n var lTd = $dom_AddTag(lrow,'td');\n var lTest = parseInt(myObject.row[i].C);\n var lCheck = $dom_AddInput(lTd,'checkbox',myObject.row[i].R);\n lCheck.checked=lTest;\n $dom_AddTag(lTd,'span',myObject.row[i].D)\n }\n }\n that.l_Dom = lSelect;\n return that;\n }else{\n var lHolder = $dom_AddTag(pThis,'div');\n for (var i=0,len=myObject.row.length;i<len;i++){\n if (!!myObject.row[i] && myObject.row[i].R ) {\n var l_D = (!!myObject.row[i].D)?myObject.row[i].D:myObject.row[i].R;\n var lThis = $dom_AddTag(lHolder,that.l_Type.toUpperCase(),l_D);\n that.l_NewEls[that.l_NewEls.length] = lThis;\n lThis.id = myObject.row[i].R;\n var lTest = parseInt(myObject.row[i].C);\n if (lTest) {lThis.className = 'checked';}\n }\n }\n that.l_Dom = lHolder;\n return that;\n }\n\n }\n}", "createMyList(data,_pre){\n var _this=this,cLen=0;\n data.map(function(i){\n cLen=0;\n i.child.map(function(data){\n if(data.folderName){\n cLen++;\n }\n });\n _this.state.displayList.push({child:cLen,folder:i.folderName,level:i.level, _on:i._on, editable:i.editable,rel:_pre+'/'+i.folderName,type:i.type});\n if(_this.state.exAll){\n i._on =true;\n }\n if(_this.state.colAll){\n i._on =false;\n }\n if(i._on){\n _this.createMyList(i.child,_pre+'/'+i.folderName); // recursive call to iterate over the nested data structure\n }\n });\n }", "removeJsonList(input) {\n let pathList = input.path.split(\"#\")\n let idList = input.id.split(\"#\")\n let valueList = input.value.split(\"#\")\n let jvalue = this.get(pathList[0]);\n\n if (pathList.length == 2) {\n if (jvalue) { //ACCOUNTS\n if (jvalue.constructor === Array) {\n let listObj = jvalue.find(obj => obj[idList[0]] === valueList[0]); // ONE ACNT OBJ\n const foundIndex = jvalue.findIndex(obj => obj[input.id] === input.value);\n\n if (listObj) {\n let rvalue = findValue(listObj, pathList[1]);\n if (rvalue.constructor === Array) {\n let filter = rvalue.filter(obj => obj[idList[1]] !== valueList[1]); // ONE ACNT OBJ\n const jeditor = new this.constructor(listObj);\n jeditor.set(pathList[1], filter);\n listObj = jeditor.toObject();\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Expecting Array but found Object/String.\" } });\n }\n jvalue[foundIndex] = listObj;\n this.set(pathList[0], jvalue);\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"No Such object found.\" } });\n }\n\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Expecting Array but found Object/String.\" } });\n }\n }\n }else if (pathList.length == 1){\n if (jvalue) { //ACCOUNTS\n if (jvalue.constructor === Array) {\n let filter = jvalue.filter(obj => obj[idList[0]] !== valueList[0]);\n this.set(pathList[0], filter);\n } else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Expecting Array but found Object/String.\" } });\n }\n }\n }else {\n return ({ isError: true, error: { errorType: \"BadRequest\", \"message\": \"Not handling more than two level list iteration.\" } });\n }\n\n return ({ isError: false, data: this.toObject() });\n }", "createFormsFromJSON() {\n if(this.qajson) {\n let jsonarr = this.qajson;\n for(var i = 0; i < jsonarr.length; i++) {\n let qdata = jsonarr[i];\n let newform = this.createQuestionForm(qdata[\"question\"], qdata[\"answers\"], qdata[\"correct\"]);\n if(newform) this.questionWrapper.appendChild(newform);\n }\n }\n }", "function _constructJSON(xmlParams) {\n const json = xmlParams.list;\n let listMPUResultArray = [\n { _attr: { xmlns: 'http://s3.amazonaws.com/doc/2006-03-01/' } },\n { Bucket: xmlParams.bucketName },\n { KeyMarker: xmlParams.keyMarker },\n { UploadIdMarker: xmlParams.uploadIdMarker },\n { NextKeyMarker: json.NextKeyMarker },\n { NextUploadIdMarker: json.NextUploadIdMarker },\n { Delimiter: json.Delimiter },\n { Prefix: xmlParams.prefix },\n { MaxUploads: json.MaxKeys },\n { IsTruncated: json.IsTruncated },\n ];\n\n const contents = json.Uploads.map(upload => {\n let key = upload.key;\n if (xmlParams.encoding === 'url') {\n key = querystring.escape(key);\n }\n const uploadVal = upload.value;\n return {\n Upload: [\n { Key: key },\n { UploadId: uploadVal.UploadId },\n { Initiator: [\n { ID: uploadVal.Initiator.ID },\n { DisplayName: uploadVal.Initiator.DisplayName },\n ] },\n { Owner: [\n { ID: uploadVal.Owner.ID },\n { DisplayName: uploadVal.Owner.DisplayName },\n ] },\n { StorageClass: uploadVal.StorageClass },\n // Initiated date was converted to take out \"-\"\n // and \".\" to prevent routing errors. Need\n // to replace back.\n { Initiated: uploadVal.Initiated },\n ],\n };\n });\n\n if (contents.length > 0) {\n listMPUResultArray = listMPUResultArray.concat(contents);\n }\n\n const commonPrefixes = json.CommonPrefixes.map(item =>\n ({ CommonPrefixes: [{ Prefix: item }] }));\n\n if (commonPrefixes.length > 0) {\n listMPUResultArray = listMPUResultArray.concat(commonPrefixes);\n }\n\n const constructedJSON = { ListMultipartUploadsResult: listMPUResultArray };\n\n return constructedJSON;\n}", "function createStudentList(jsonData) {\n\t//console.log(jsonData);\n\t\n\t//for IE 11 - other sultion needed array push not working\n\nstudentList = [];\nfor(x=0;x<jsonData.length;x++) {\n\tstudentList.push(jsonData[x]);\t\t\n\t}\n}", "function ListObject(user,name,listArr) {\n this.user = user,\n this.name = name,\n this.listArr = listArr\n\n}", "static fromJson(json) {\n return new Paginator(json.nbHits, json.nbPages, json.page);\n }", "function getObjects(data){\n programms = [];\n for(count in (data.programme)){\n\n programms[count] = new Program(data.programme[count].title.de, data.programme[count].start, data.programme[count].stop);\n }\n}", "static fromJSON(jsnmphtgt) {\nvar mphtgt;\n//--------\nmphtgt = new MorphTarget();\nmphtgt.setFromJSON(jsnmphtgt);\nreturn mphtgt;\n}", "function getQuestionListJsonByInput(){\n var json_question = []; \n $('.json_question').each(function(key){\n if($(this).val() != ''){\n json_question.push(jQuery.parseJSON($(this).val()));\n json_question[key]['key'] = key;\n }\n });\n pRunQuestionListPreview(json_question);\n \n}", "function jsonParsing(jsonData, jsonLegData) {\r\n time.push({\r\n walkingTime : jsonData.itineraries[0].walkTime,\r\n transitTime : jsonData.itineraries[0].transitTime,\r\n waitingTime : jsonData.itineraries[0].waitingTime,\r\n start : jsonData.itineraries[0].startTime,\r\n end : jsonData.itineraries[0].endTime,\r\n transfers : jsonData.itineraries[0].transfers,\r\n });\r\n for (j=0; j < jsonLegData.length; j++) {\r\n legInfo.push({ currentLeg:j + 1,\r\n transitMode:jsonLegData[j].mode, \r\n legDuration : (jsonLegData[j].endTime - jsonLegData[j].startTime) / 1000,\r\n departurePlace : jsonLegData[j].from.name,\r\n departureTime : jsonLegData[j].from.departure,\r\n arrivalPlace : jsonLegData[j].to.name,\r\n arrivalTime : jsonLegData[j].to.arrival,\r\n legPolyline : decodeGeometry(jsonLegData[j].legGeometry.points)});\r\n }\r\n return {time, legInfo};\r\n}", "verificar() {\n const arreglo = this.state.data;\n let arreglo2 = [];\n arreglo.map(item => {\n arreglo2 = arreglo2.concat(new this.crearJSON(item.id_rec, item.obs, item.obs_upg, item.validado, item.ubic));\n return null;\n });\n this.setState({\n JSON: arreglo2\n });\n // console.log(arreglo2);\n return arreglo2;\n }", "function auxiliar(json){\n if(json.length==0 || json == null){\n alert(\"No hay productos en ese rango de precios\");\n return;\n }\n for(let producto of json){\n items(producto);\n }\n }", "function createHTMLListFromObject(jsObject) {\n var list = document.createElement('ul');\n // Change the padding (top: 0, right:0, bottom:0 and left:1.5)\n list.style.padding = '0 0 0 1.5rem';\n // For each property of the object\n Object.keys(jsObject).forEach(function _(property) {\n // create item\n var item = document.createElement('li');\n // append property name\n item.appendChild(document.createTextNode(property));\n\n if (jsObject[property] === null) {\n jsObject[property] = 'null';\n }\n\n if (typeof jsObject[property] === 'object') {\n // if property value is an object, then recurse to\n // create a list from it\n item.appendChild(\n createHTMLListFromObject(jsObject[property]));\n } else {\n // else append the value of the property to the item\n item.appendChild(document.createTextNode(': '));\n item.appendChild(\n document.createTextNode(jsObject[property]));\n }\n list.appendChild(item);\n });\n return list;\n}", "function sucessJsonList(res, resJson) {\n let configObject = {};\n let configObjectList = [];\n\n for (let i = 0; i < res.length; i++) {\n let attributeList = [];\n let attribute = {};\n let dataObjectdata = configObjectList.find(obj => obj.id == res[i].id);\n if (dataObjectdata) {\n let dataObjectDetails = configObjectList.find(obj => obj.id == res[i].id);\n if (null != res[i].configobjectattributeid) {\n let datatypes = {};\n if (null != res[i].datatypesid) {\n datatypes = {\n id: res[i].datatypesid,\n name: res[i].datatypesname\n }\n }\n\n attribute = {\n id: res[i].configobjectattributeid,\n name: res[i].configobjectattributename,\n datatypes: datatypes\n }\n dataObjectDetails.attributeList.push(attribute);\n }\n\n\n } else {\n\n if (null != res[i].configobjectattributeid) {\n let datatypes = {};\n if (null != res[i].datatypesid) {\n datatypes = {\n id: res[i].datatypesid,\n name: res[i].datatypesname\n }\n }\n\n attribute = {\n id: res[i].configobjectattributeid,\n name: res[i].configobjectattributename,\n datatypes: datatypes\n }\n attributeList.push(attribute);\n }\n\n\n configObject = {\n id: res[i].id,\n name: res[i].name,\n description: res[i].description,\n attributeList: attributeList\n }\n configObjectList.push(configObject)\n\n }\n\n\n\n\n }\n resJson = {\n \"status\": \"SUCCESS\",\n \"data\": configObjectList,\n \"msg\": null,\n \"errormsg\": \"\",\n\n }\n return resJson;\n}" ]
[ "0.6721883", "0.6511763", "0.6003714", "0.5967254", "0.5797491", "0.5694719", "0.56515944", "0.5651211", "0.5574462", "0.55693215", "0.55429196", "0.55225444", "0.5520386", "0.55173886", "0.54675996", "0.545905", "0.544704", "0.5379877", "0.5379143", "0.53785515", "0.537014", "0.53679097", "0.53634995", "0.53594124", "0.5356047", "0.5342227", "0.5342156", "0.53413916", "0.5296446", "0.52948993", "0.528939", "0.5277473", "0.5275169", "0.5273031", "0.5250985", "0.5218482", "0.5212362", "0.52040076", "0.52014744", "0.51941365", "0.51879317", "0.5186681", "0.5186571", "0.5170146", "0.51697916", "0.5161471", "0.5139346", "0.5137023", "0.51340973", "0.5121586", "0.51215553", "0.5105946", "0.51012045", "0.509779", "0.5097713", "0.5094365", "0.5075922", "0.50753874", "0.50736195", "0.50422126", "0.50415695", "0.50392324", "0.50358015", "0.50326", "0.5030054", "0.50264406", "0.50134766", "0.5012261", "0.50062066", "0.50060326", "0.49972886", "0.49943256", "0.49940372", "0.4991457", "0.49875975", "0.4983158", "0.49816787", "0.49802166", "0.49796942", "0.49774635", "0.49699405", "0.4967996", "0.49655288", "0.4959649", "0.4958242", "0.49579525", "0.4956773", "0.49532712", "0.49508956", "0.49470192", "0.49416777", "0.4940714", "0.49274516", "0.4925885", "0.49240673", "0.49191397", "0.49188364", "0.49016526", "0.4900379", "0.48987857" ]
0.5135339
48
sort according to some property list of this object
static sortByProperty(ObjList, property) { return ObjList.sort(function(a, b) { var x = a[property + ""]; var y = b[property + ""]; return ((x < y) ? -1 : ((x > y) ? 1 : 0)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function SortByProperty(a,b)\n\t{\n\t\treturn a[sortType] - b[sortType];\n\t}", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] > b[property]) \n return 1; \n else if(a[property] < b[property]) \n return -1; \n \n return 0; \n } \n}", "function sort(property) {\n let sortedCommercial = Object.create(commercial);\n sortedCommercial = sortedCommercial.sort((a, b) => {\n return a[property].localeCompare(b[property]);\n });\n setCommercial(sortedCommercial);\n }", "function sortBy(prop){\r\n return function(a,b){\r\n if( a[prop] > b[prop]){\r\n return 1;\r\n }else if( a[prop] < b[prop] ){\r\n return -1;\r\n }\r\n return 0;\r\n }\r\n}", "function dynamicSort(property) {\n\n var sortOrder = -1;\n\n return function (a,b) {\n // if first of properties to sort is undefined, push it to the end\n if (!a[property]) {\n return 1;\n // if second of properties to sort is undefined, push it to the end\n } else if (!b[property]) {\n return -1; \n } else { \n // compare the selected property of each person\n if (sortOrder == -1) {\n return b[property].localeCompare(a[property]);\n } else {\n return a[property].localeCompare(b[property]);\n } \n }\n }\n}", "function sortByProp(prop) {\n return (a, b) => {\n if (a[prop] > b[prop]) {\n return 1;\n }\n if (a[prop] < b[prop]) {\n return -1;\n }\n return 0;\n };\n}", "_dynamicSort(property) {\n let sortOrder = 1;\n\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n let result = (a['attributes'][property] < b['attributes'][property]) ? -1 :\n (a['attributes'][property] > b['attributes'][property]) ? 1 : 0;\n return result * sortOrder;\n };\n }", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n }", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function(a, b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n }", "function dynamicSort(property) {\r\n var sortOrder = 1;\r\n if (property[0] === \"-\") {\r\n sortOrder = -1;\r\n property = property.substr(1);\r\n }\r\n return function (a, b) {\r\n var result = (a[property] > b[property]) ? -1 : (a[property] < b[property]) ? 1 : 0;\r\n return result * sortOrder;\r\n }\r\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if(property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if(property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n }\n}", "function dynamicSort(property) {\r\n var sortOrder = 1;\r\n if (property[0] === \"-\") {\r\n sortOrder = -1;\r\n property = property.substr(1);\r\n }\r\n\r\n return function(a, b) {\r\n if (sortOrder == -1) {\r\n return b[property].localeCompare(a[property]);\r\n } else {\r\n return a[property].localeCompare(b[property]);\r\n }\r\n }\r\n}", "function dynamicSort( property ) {\n var sortOrder = 1;\n if ( property[ 0 ] === \"-\" ) {\n sortOrder = -1;\n property = property.substr( 1 );\n }\n return function ( a, b ) {\n var result = ( a[ property ] < b[ property ] ) ? -1 : ( a[ property ] > b[ property ] ) ? 1 : 0;\n return result * sortOrder;\n };\n }", "function dynamicSort(property) {\n var sortOrder = 1;\n if(property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n };\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function(a, b) {\n var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n return result * sortOrder;\n };\n}", "function dynamicSort(property) {\n\t var sortOrder = 1;\n\t if(property[0] === \"-\") {\n\t sortOrder = -1;\n\t property = property.substr(1);\n\t }\n\t return function (a,b) {\n\t var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;\n\t return result * sortOrder;\n\t }\n\t}", "function sortByProperty({\n array,\n propertyForSort,\n descending = false,\n withParse = true,\n}) {\n array.sort((item1, item2) => {\n let value1;\n let value2;\n if (withParse) {\n value1 = parseFloat(item1[propertyForSort]);\n value2 = parseFloat(item2[propertyForSort]);\n } else {\n value1 = item1[propertyForSort];\n value2 = item2[propertyForSort];\n }\n\n if (value1 === value2) {\n if (descending) {\n return item1.id - item2.id;\n }\n return item2.id - item1.id;\n }\n\n if (withParse) {\n if (descending) {\n return value2 - value1;\n }\n return value1 - value2;\n }\n if (descending) {\n // convert true into 1 and false into -1\n return 2 * (value2 > value1) - 1;\n }\n // convert true into 1 and false into -1\n return 2 * (value1 > value2) - 1;\n });\n}", "function dynamicSort(property) {\n var sortOrder = 1;\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n\n return function(a, b) {\n if (sortOrder == -1) {\n return b[property].localeCompare(a[property]);\n } else {\n return a[property].localeCompare(b[property]);\n }\n }\n}", "function propertySort(itemsKey, sortPropertiesKey) {\n var cp = new _emberMetalComputed.ComputedProperty(function (key) {\n var _this5 = this;\n\n function didChange() {\n this.notifyPropertyChange(key);\n }\n\n var items = itemsKey === '@this' ? this : _emberMetalProperty_get.get(this, itemsKey);\n var sortProperties = _emberMetalProperty_get.get(this, sortPropertiesKey);\n\n if (items === null || typeof items !== 'object') {\n return _emberMetalCore.default.A();\n }\n\n // TODO: Ideally we'd only do this if things have changed\n if (cp._sortPropObservers) {\n cp._sortPropObservers.forEach(function (args) {\n return _emberMetalObserver.removeObserver.apply(null, args);\n });\n }\n\n cp._sortPropObservers = [];\n\n if (!_emberRuntimeUtils.isArray(sortProperties)) {\n return items;\n }\n\n // Normalize properties\n var normalizedSort = sortProperties.map(function (p) {\n var _p$split = p.split(':');\n\n var prop = _p$split[0];\n var direction = _p$split[1];\n\n direction = direction || 'asc';\n\n return [prop, direction];\n });\n\n // TODO: Ideally we'd only do this if things have changed\n // Add observers\n normalizedSort.forEach(function (prop) {\n var args = [_this5, itemsKey + '.@each.' + prop[0], didChange];\n cp._sortPropObservers.push(args);\n _emberMetalObserver.addObserver.apply(null, args);\n });\n\n return _emberMetalCore.default.A(items.slice().sort(function (itemA, itemB) {\n for (var i = 0; i < normalizedSort.length; ++i) {\n var _normalizedSort$i = normalizedSort[i];\n var prop = _normalizedSort$i[0];\n var direction = _normalizedSort$i[1];\n\n var result = _emberRuntimeCompare.default(_emberMetalProperty_get.get(itemA, prop), _emberMetalProperty_get.get(itemB, prop));\n if (result !== 0) {\n return direction === 'desc' ? -1 * result : result;\n }\n }\n\n return 0;\n }));\n });\n\n return cp.property(itemsKey + '.[]', sortPropertiesKey + '.[]').readOnly();\n }", "function sortProperties(obj){\n // convert object into array\n\tvar sortable=[];\n\tfor(var key in obj)\n\t\tif(obj.hasOwnProperty(key))\n\t\t\tsortable.push([key, obj[key]]); // each item is an array in format [key, value]\n\t\n\t// sort items by value\n\tsortable.sort(function(a, b)\n\t{\n\t return a[1]-b[1]; // compare numbers\n\t});\n\treturn sortable; // array in format [ [ key1, val1 ], [ key2, val2 ], ... ]\n}", "function sortByProperty(array, property) {\n array.sort((a, b) => {\n if (a[property] < b[property]) {\n return -1;\n }\n if (a[property] > b[property]) {\n return 1;\n }\n return 0;\n });\n}", "sort (sort = {}) {\n let obj = Helpers.is(sort, 'Object') ? sort : { default: sort };\n Object.keys(obj).forEach((key, idx) => {\n Array.prototype.sort.call(this, (a, b) => {\n let vals = (Helpers.is(a.value, 'Object') && Helpers.is(b.value, 'Object')) ? Helpers.dotNotation(key, [a.value, b.value]) : [a, b];\n return (vals[0] < vals[1]) ? -1 : ((vals[0] > vals[1]) ? 1 : 0);\n })[obj[key] === -1 ? 'reverse' : 'valueOf']().forEach((val, idx2) => {\n return this[idx2] = val;\n });\n });\n return this;\n }", "function sortProperties(obj)\n{\n // convert object into array\n\tvar sortable=[];\n\tfor(var key in obj)\n\t\tif(obj.hasOwnProperty(key))\n\t\t\tsortable.push([key, obj[key]]); // each item is an array in format [key, value]\n\t\n\t// sort items by value\n\tsortable.sort(function(a, b)\n\t{\n\t return a[1]['sum']>b[1]['sum'] ? -1 : a[1]['sum']<b[1]['sum'] ? 1 : a[1]['last_time']>b[1]['last_time'] ? -1 : a[1]['last_time']<b[1]['last_time'] ? 1 : 0;\n\t});\n\treturn sortable; // array in format [ [ key1, val1 ], [ key2, val2 ], ... ]\n}", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "function jsSort(list, byProperty) {\n\n // using q and z just to show there's nothing magical about a and b. \n // q and z are just elements in the array and the funcction has to return negative or positive or zero \n // depending on the comparison of q and z.\n // using JS associative array notation (property name char string used inside square brackets \n // as it if was an index value). \n\n list.sort(function (q, z) { // in line (and anonymous) def'n of fn to compare list elements. \n // the function you create is supposed to return positive (if first bigger), 0 if equal, negative otherwise.\n\n // using JS associative array notation, extract the 'byProperty' property from the two\n // list elements so you can compare them.\n var qVal = q[byProperty];\n var zVal = z[byProperty];\n\n var c = 0;\n if (qVal > zVal) {\n c = 1;\n } else if (qVal < zVal) {\n c = -1;\n }\n console.log(\"comparing \" + qVal + \" to \" + zVal + \" is \" + c);\n return c;\n });\n}", "function sortObj(prop, array, order){\n\torder = order || false\n\tprop = prop.toString()\n\tarray.sort(function(a, b){\n\t\tif(a[prop] > b[prop]) return order ? -1 : 1\n\t\telse if(a[prop] < b[prop]) return order ? 1 : -1\n\t\treturn 0\n\t})\n}", "function GetSortOrder(prop) { \n return function(a, b) { \n if (a[prop] > b[prop]) { \n return 1; \n } else if (a[prop] < b[prop]) { \n return -1; \n } \n return 0; \n } \n }", "function sort(list, attrName){\n for(var i=0; i<list.length-1; i++)\n for(var j=i+1; j<list.length; j++){\n var left = list[i],\n right = list[j];\n if (left[attrName] > right[attrName]){\n list[i] = list[j];\n list[j] = left;\n }\n }\n }", "function sortProps(a,b){\n\tvar c = b.weight - a.weight;\n\treturn (c == 0) ? b.index - a.index : c;\n\t}", "sortByProperty(arr, property, order) {\n if (!_.isArray(arr))\n TypeException(\"arr\", \"array\");\n if (!_.isString(property))\n TypeException(\"property\", \"string\");\n if (!_.isUnd(order))\n order = \"asc\";\n order = _.isNumber(order) ? order : (/^asc/i.test(order) ? 1 : -1);\n var o = {};\n o[property] = order;\n return this.sortBy(arr, o);\n }", "function propertySort(itemsKey, sortPropertiesKey) {\n var cp = new _emberMetal.ComputedProperty(function (key) {\n var _this4 = this;\n\n var sortProperties = (0, _emberMetal.get)(this, sortPropertiesKey);\n\n (true && !((0, _utils.isArray)(sortProperties) && sortProperties.every(function (s) {\n return typeof s === 'string';\n })) && (0, _emberDebug.assert)('The sort definition for \\'' + key + '\\' on ' + this + ' must be a function or an array of strings', (0, _utils.isArray)(sortProperties) && sortProperties.every(function (s) {\n return typeof s === 'string';\n })));\n\n\n // Add/remove property observers as required.\n var activeObserversMap = cp._activeObserverMap || (cp._activeObserverMap = new WeakMap());\n var activeObservers = activeObserversMap.get(this);\n\n if (activeObservers !== undefined) {\n activeObservers.forEach(function (args) {\n return _emberMetal.removeObserver.apply(undefined, args);\n });\n }\n\n function sortPropertyDidChange() {\n this.notifyPropertyChange(key);\n }\n\n var itemsKeyIsAtThis = itemsKey === '@this';\n var normalizedSortProperties = normalizeSortProperties(sortProperties);\n activeObservers = normalizedSortProperties.map(function (_ref) {\n var prop = _ref[0];\n\n var path = itemsKeyIsAtThis ? '@each.' + prop : itemsKey + '.@each.' + prop;\n (0, _emberMetal.addObserver)(_this4, path, sortPropertyDidChange);\n return [_this4, path, sortPropertyDidChange];\n });\n\n activeObserversMap.set(this, activeObservers);\n\n var items = itemsKeyIsAtThis ? this : (0, _emberMetal.get)(this, itemsKey);\n if (!(0, _utils.isArray)(items)) {\n return (0, _array.A)();\n }\n\n if (normalizedSortProperties.length === 0) {\n return (0, _array.A)(items.slice());\n } else {\n return sortByNormalizedSortProperties(items, normalizedSortProperties);\n }\n }, { dependentKeys: [sortPropertiesKey + '.[]'], readOnly: true });\n\n cp._activeObserverMap = undefined;\n\n return cp;\n }", "function propertySort(itemsKey, sortPropertiesKey) {\n var cp = new _emberMetal.ComputedProperty(function (key) {\n var _this4 = this;\n\n var sortProperties = (0, _emberMetal.get)(this, sortPropertiesKey);\n\n (true && !((0, _utils.isArray)(sortProperties) && sortProperties.every(function (s) {\n return typeof s === 'string';\n })) && (0, _emberDebug.assert)('The sort definition for \\'' + key + '\\' on ' + this + ' must be a function or an array of strings', (0, _utils.isArray)(sortProperties) && sortProperties.every(function (s) {\n return typeof s === 'string';\n })));\n\n\n // Add/remove property observers as required.\n var activeObserversMap = cp._activeObserverMap || (cp._activeObserverMap = new WeakMap());\n var activeObservers = activeObserversMap.get(this);\n\n if (activeObservers !== undefined) {\n activeObservers.forEach(function (args) {\n return _emberMetal.removeObserver.apply(undefined, args);\n });\n }\n\n function sortPropertyDidChange() {\n this.notifyPropertyChange(key);\n }\n\n var itemsKeyIsAtThis = itemsKey === '@this';\n var normalizedSortProperties = normalizeSortProperties(sortProperties);\n activeObservers = normalizedSortProperties.map(function (_ref) {\n var prop = _ref[0];\n\n var path = itemsKeyIsAtThis ? '@each.' + prop : itemsKey + '.@each.' + prop;\n (0, _emberMetal.addObserver)(_this4, path, sortPropertyDidChange);\n return [_this4, path, sortPropertyDidChange];\n });\n\n activeObserversMap.set(this, activeObservers);\n\n var items = itemsKeyIsAtThis ? this : (0, _emberMetal.get)(this, itemsKey);\n if (!(0, _utils.isArray)(items)) {\n return (0, _array.A)();\n }\n\n if (normalizedSortProperties.length === 0) {\n return (0, _array.A)(items.slice());\n } else {\n return sortByNormalizedSortProperties(items, normalizedSortProperties);\n }\n }, { dependentKeys: [sortPropertiesKey + '.[]'], readOnly: true });\n\n cp._activeObserverMap = undefined;\n\n return cp;\n }", "function sortByName(a, b)\n{\n return (b.properties.name.toLowerCase() > a.properties.name.toLowerCase() ? -1 : 1);\n}", "function propertySort(itemsKey, sortPropertiesKey) {\n var cp = new _emberMetal.ComputedProperty(function (key) {\n var _this4 = this;\n\n var sortProperties = (0, _emberMetal.get)(this, sortPropertiesKey);\n\n (true && !((0, _utils.isArray)(sortProperties) && sortProperties.every(function (s) {\n return typeof s === 'string';\n })) && (0, _emberDebug.assert)('The sort definition for \\'' + key + '\\' on ' + this + ' must be a function or an array of strings', (0, _utils.isArray)(sortProperties) && sortProperties.every(function (s) {\n return typeof s === 'string';\n })));\n\n\n // Add/remove property observers as required.\n var activeObserversMap = cp._activeObserverMap || (cp._activeObserverMap = new _emberMetal.WeakMap());\n var activeObservers = activeObserversMap.get(this);\n\n if (activeObservers !== undefined) {\n activeObservers.forEach(function (args) {\n return _emberMetal.removeObserver.apply(undefined, args);\n });\n }\n\n var itemsKeyIsAtThis = itemsKey === '@this';\n var items = itemsKeyIsAtThis ? this : (0, _emberMetal.get)(this, itemsKey);\n if (!(0, _utils.isArray)(items)) {\n return (0, _native_array.A)();\n }\n\n function sortPropertyDidChange() {\n this.notifyPropertyChange(key);\n }\n\n var normalizedSortProperties = normalizeSortProperties(sortProperties);\n activeObservers = normalizedSortProperties.map(function (_ref) {\n var prop = _ref[0];\n\n var path = itemsKeyIsAtThis ? '@each.' + prop : itemsKey + '.@each.' + prop;\n (0, _emberMetal.addObserver)(_this4, path, sortPropertyDidChange);\n return [_this4, path, sortPropertyDidChange];\n });\n\n activeObserversMap.set(this, activeObservers);\n\n return sortByNormalizedSortProperties(items, normalizedSortProperties);\n }, { dependentKeys: [sortPropertiesKey + '.[]'], readOnly: true });\n\n cp._activeObserverMap = undefined;\n\n return cp;\n }", "function sortdata(data,prop,updown) {\n data.sort(thesortcomparer(prop,updown));\n return data;\n}", "function sortByProperties(objects, properties, ignoreCase) {\n return objects.sort(\n function(objectA, objectB) {\n for (var i=0; i < properties.length; i++) {\n var property = properties[i];\n var comparisonResult = undefined;\n var objectPropertyA = '';\n var objectPropertyB = '';\n\n if (objectA[property] !== undefined) {\n objectPropertyA = objectA[property];\n }\n if (objectB[property] !== undefined) {\n objectPropertyB = objectB[property];\n }\n\n if (ignoreCase) {\n objectPropertyA = objectPropertyA.toLowerCase();\n objectPropertyB = objectPropertyB.toLowerCase();\n }\n\n if (objectPropertyA < objectPropertyB) {\n comparisonResult = -1;\n }\n else if (objectPropertyA > objectPropertyB) {\n comparisonResult = 1;\n }\n \n if (comparisonResult !== undefined) {\n return comparisonResult;\n }\n }\n return 0;\n }\n );\n}", "dynamicSort(property) {\n var sortOrder = 1;\n //check for \"-\" operator and sort asc/desc depending on that\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result =\n a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;\n return result * sortOrder;\n };\n }", "sortItems(items, propertyName) {\n // sort the custom items by their position in the list\n if (Array.isArray(items)) {\n items.sort((itemA, itemB) => {\n if (itemA && itemB && itemA.hasOwnProperty(propertyName) && itemB.hasOwnProperty(propertyName)) {\n return itemA[propertyName] - itemB[propertyName];\n }\n return 0;\n });\n }\n }", "sortData() {\n this.data.sort(($val1, $val2 ) => {\n const a = JSON.stringify($val1[this.sortBy]);\n const b = JSON.stringify($val2[this.sortBy]);\n if ( a < b ){\n return -this.sortDir;\n }\n if ( a > b ){\n return this.sortDir;\n }\n return 0;\n });\n }", "function sortByProp(arr, prop, order) {\n\treturn arr.sort(function(a, b) {\n\t\treturn order * (a[prop] - b[prop]);\n\t});\n}", "function sortPropFields(fields){\n var reqFields = [];\n var optFields = [];\n\n /** Compare by schema property 'lookup' meta-property, if available. */\n function sortSchemaLookupFunc(a,b){\n var aLookup = (a.props.schema && a.props.schema.lookup) || 750,\n bLookup = (b.props.schema && b.props.schema.lookup) || 750,\n res;\n\n if (typeof aLookup === 'number' && typeof bLookup === 'number') {\n //if (a.props.field === 'ch02_power_output' || b.props.field === 'ch02_power_output') console.log('X', aLookup - bLookup, a.props.field, b.props.field);\n res = aLookup - bLookup;\n }\n\n if (res !== 0) return res;\n else {\n return sortTitle(a,b);\n }\n }\n\n /** Compare by property title, alphabetically. */\n function sortTitle(a,b){\n if (typeof a.props.field === 'string' && typeof b.props.field === 'string'){\n if(a.props.field.toLowerCase() < b.props.field.toLowerCase()) return -1;\n if(a.props.field.toLowerCase() > b.props.field.toLowerCase()) return 1;\n }\n return 0;\n }\n\n _.forEach(fields, function(field){\n if (!field) return;\n if (field.props.required) {\n reqFields.push(field);\n } else {\n optFields.push(field);\n }\n });\n\n reqFields.sort(sortSchemaLookupFunc);\n optFields.sort(sortSchemaLookupFunc);\n\n return reqFields.concat(optFields);\n}", "function sortBy(arr, prop, dir) {\n return arr.sort(function(a,b) {\n if (!a[prop]) return -1;\n if (!b[prop]) return 1;\n if (dir === 'desc') return a[prop]>b[prop] ? -1 : 1;\n else return a[prop]<b[prop] ? -1 : 1;\n });\n }", "function jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n }", "function property_sort_value(bbs, property)\n{\n\tvar value=\"\";\n\n\tswitch(property) {\n\t\tcase \"name\":\n\t\t\tif(bbs.name.toLowerCase().slice(0, 4) == \"the \")\n\t\t\t\treturn bbs.name.slice(4);\n\t\t\treturn bbs.name;\n\t\tcase \"storage\":\n\t\t\tif(bbs.total)\n\t\t\t\treturn numeric_sort_value(bbs.total.storage);\n\t\t\tbreak;\n\t\tcase \"files\":\n\t\t\tif(bbs.total)\n\t\t\t\treturn numeric_sort_value(bbs.total.files);\n\t\t\tbrak;\n\t\tcase \"msgs\":\n\t\t\tif(bbs.total)\n\t\t\t\treturn numeric_sort_value(bbs.total.msgs);\n\t\t\tbreak;\n\t\tcase \"dirs\":\n\t\t\tif(bbs.total)\n\t\t\t\treturn numeric_sort_value(bbs.total.dirs);\n\t\t\tbreak;\n\t\tcase \"subs\":\n\t\t\tif(bbs.total)\n\t\t\t\treturn numeric_sort_value(bbs.total.subs);\n\t\t\tbreak;\n\t\tcase \"users\":\n\t\t\tif(bbs.total)\n\t\t\t\treturn numeric_sort_value(bbs.total.users);\n\t\t\tbreak;\n\t\tcase \"doors\":\n\t\t\tif(bbs.total)\n\t\t\t\treturn numeric_sort_value(bbs.total.doors);\n\t\t\tbreak;\n\t\tcase \"nodes\":\n\t\t\tif(bbs.terminal)\n\t\t\t\treturn numeric_sort_value(bbs.terminal.nodes);\n\t\t\tbreak;\n\t\tcase \"created_on\":\n\t\t\treturn new Date(bbs.entry.created.on).valueOf();\n\t\tcase \"updated_on\":\n\t\t\tif(bbs.entry.updated)\n\t\t\t\treturn new Date(bbs.entry.updated.on).valueOf();\n\t\t\tbreak;\n\t\tcase \"verified_on\":\n\t\t\tif(bbs.entry.verified)\n\t\t\t\treturn new Date(bbs.entry.verified.on).valueOf();\n\t\t\tbreak;\n\t}\n\treturn property_value(bbs, property);\n}", "function sort (dataSet, property) {\n\treturn dataSet.sort(function (a,b) {\n\t\tif ( a[property] > b[property] )\n\t\t\treturn -1;\n\t\telse if ( a[property] < b[property] )\n\t\t\treturn 1;\n\t\telse {\n\t\t\tif (property == 'visibility')\n\t\t\t\treturn sort(dataSet, \"size\");\n\t\t\telse\n\t\t\t\treturn 0;\n\t\t}\n\t});\n}", "function GetSortOrder(prop) {\n return function (a, b) {\n if (a.district[prop] > b.district[prop]) {\n return -1;\n } else if (a.district[prop] < b.district[prop]) {\n return 1;\n }\n return 0;\n }\n }", "function sortList(currentList) {\n let sortedList;\n\n currentList.sort(sortByProperty);\n console.log(currentSort);\n\n function sortByProperty(a, b) {\n if (sortDirection === \"asc\") {\n if (a[currentSort] < b[currentSort]) {\n return -1;\n } else {\n return 1;\n }\n } else {\n if (b[currentSort] < a[currentSort]) {\n return -1;\n } else {\n return 1;\n }\n }\n }\n return sortedList;\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n }", "function jssPropsSort() {\n var sort = function sort1(prop0, prop1) {\n if (prop0.length === prop1.length) return prop0 > prop1 ? 1 : -1;\n return prop0.length - prop1.length;\n };\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {\n };\n var props = Object.keys(style).sort(sort);\n for(var i = 0; i < props.length; i++)newStyle[props[i]] = style[props[i]];\n return newStyle;\n }\n };\n}", "function jssPropsSort() {\n\t function sort(prop0, prop1) {\n\t return prop0.length - prop1.length;\n\t }\n\n\t function onProcessStyle(style, rule) {\n\t if (rule.type !== 'style') return style;\n\n\t var newStyle = {};\n\t var props = Object.keys(style).sort(sort);\n\t for (var prop in props) {\n\t newStyle[props[prop]] = style[props[prop]];\n\t }\n\t return newStyle;\n\t }\n\n\t return { onProcessStyle: onProcessStyle };\n\t}", "function sorterProdukter(prop) {\n return function (a, b) {\n if (a[prop] > b[prop]) {\n return 1;\n } else if (a[prop] < b[prop]) {\n return -1;\n }\n return 0;\n }\n}", "function sortInns(prop, asc) {\n $scope.inns = $scope.inns.sort(function(a, b) {\n if (asc) {\n return (a[prop] > b[prop]) ? -1 : ((a[prop] < b[prop]) ? 1 : 0);\n } else {\n return (b[prop] > a[prop]) ? -1 : ((b[prop] < a[prop]) ? 1 : 0);\n }\n });\n }", "function sortProperties(obj) {\n // convert object into array\n var sortable = [];\n for (var key in obj)\n if (obj.hasOwnProperty(key))\n sortable.push([key, obj[key]]); // each item is an array in format [key, value]\n\n // sort items by value\n sortable.sort(function(a, b) {\n return b[1] - a[1]; // compare numbers\n });\n return sortable; // array in format [ [ key1, val1 ], [ key2, val2 ], ... ]\n}", "function jssPropsSort() {\n\t function sort(prop0, prop1) {\n\t return prop0.length - prop1.length;\n\t }\n\t\n\t function onProcessStyle(style, rule) {\n\t if (rule.type !== 'style') return style;\n\t\n\t var newStyle = {};\n\t var props = Object.keys(style).sort(sort);\n\t for (var prop in props) {\n\t newStyle[props[prop]] = style[props[prop]];\n\t }\n\t return newStyle;\n\t }\n\t\n\t return { onProcessStyle: onProcessStyle };\n\t}", "function propertyComparator(idx1, idx2) {\n\tfunction _computeWeight(idx) {\n\t\t// Order: properties by location, then utilities, then railroads.\n\t\tif (Railroads.includes(idx)) {\n\t\t\treturn idx + 200;\n\t\t}\n\t\tif (Utilities.includes(idx)) {\n\t\t\treturn idx + 100;\n\t\t}\n\t\treturn idx;\n\t}\n\n\treturn _computeWeight(idx1) - _computeWeight(idx2);\n}", "function sortArrayByProperty(array, prop = \"start\", prop2 = \"end\") {//array[i]={start:x,end:y,image:z,webgroup:w}\n //wenn <0, dann davor sortiert, wenn =0 gleicher Rang, wenn >0, dann danach sortiert\n return array.sort(function (a, b) {\n //Wenn Startzeitpunkt vorher, dann sortiere davor\n let difference = a[prop] - b[prop];\n //Wenn gleich sortiere nach Endzeit\n if (difference === 0)\n return a[prop2] - b[prop2];\n return difference;\n });\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function jssPropsSort() {\n function sort(prop0, prop1) {\n return prop0.length - prop1.length;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n for (var prop in props) {\n newStyle[props[prop]] = style[props[prop]];\n }\n return newStyle;\n }\n\n return { onProcessStyle: onProcessStyle };\n}", "function sort() {\n var keys = arguments.length <= 0 || arguments[0] === undefined ? [[_const.FIELDS[0], true]] : arguments[0];\n\n var results = [];\n var sort = sortBy(keys);\n return _through22['default'].obj(function (data, env, next) {\n results.push(data);\n next();\n }, function (next) {\n var _this = this;\n\n results.sort(sort).forEach(function (data) {\n return _this.push(data);\n });\n next();\n });\n}", "function objectSort(a, b) {\r\n return a.age - b.age;\r\n}", "function jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}", "function jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}", "function jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}", "function jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}", "function jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}" ]
[ "0.73198926", "0.7296321", "0.7296321", "0.72160774", "0.7187887", "0.71842307", "0.7149367", "0.7125927", "0.70316625", "0.69431007", "0.68770385", "0.68661344", "0.6842619", "0.683528", "0.6831407", "0.6830048", "0.6805293", "0.6801186", "0.6793107", "0.67834175", "0.6781196", "0.67732024", "0.67619777", "0.6737258", "0.66989744", "0.66691124", "0.66138303", "0.65936387", "0.6559909", "0.6555895", "0.65463185", "0.6527625", "0.6503378", "0.65016", "0.6499537", "0.6497718", "0.6497718", "0.6490104", "0.64861906", "0.6474262", "0.64716053", "0.64709", "0.645724", "0.64512575", "0.6450359", "0.6428276", "0.64255637", "0.64211446", "0.642035", "0.640954", "0.640444", "0.6404218", "0.637836", "0.63686836", "0.6329052", "0.6320847", "0.63191545", "0.63152564", "0.6305374", "0.63021225", "0.63013303", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.62983245", "0.6294953", "0.6283441", "0.6282709", "0.6282709", "0.6282709", "0.6282709", "0.6282709" ]
0.7727587
0
filter the list according to some property and value
static filterList(objList, property, filterValue) { var answer = []; for (var objIndex = 0; objIndex < objList.length; objIndex++) { if (objList[objIndex][property + ""] == filterValue) { answer.push(objList[objIndex]); } } return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "filter(predicate = this._compare) {\n return this._list.getValue().filter((_) => predicate(_));\n }", "function where(list, properties, k) {\n var names = []\n return reduce(list, function(list, v, k) {\n var names = true\n for (var k in properties) {\n if (properties[k] !== v[k]) {\n names = false\n }\n }\n if (names == true) {\n list.push(v)\n }\n return list\n }, names)\n}", "function filter(list, predicateFn) {\n\n}", "function handmadeFilter(list,f) {\n var result = [];\n for (var i in list) {\n if (f(list[i])) { result.push(list[i]) };\n }\n return result;\n}", "function filterItems(by, value, items){\n\tif(!value || value == ''){\n\t\treturn items;\n\t}\n\t\n\tvar debug = '';\n\tvar filteredItems = [];\n\t$.each(items, function(key, item) {\n\t\tif(by == 'shelf'){\n\t\t\tif(String(value) == String(item.shelf)){\n\t\t\t\tdebug += item.title + \"\\n\";\n\t\t\t\tfilteredItems.push(item);\n\t\t\t}\n\t\t\t\n\t\t} else if(by == 'search'){\n\t\t\tif(\t(String(item.title).toLowerCase().indexOf(String(value).toLowerCase()) >= 0) || \n\t\t\t\t(String(item.creator).toLowerCase().indexOf(String(value).toLowerCase()) >= 0)\n\t\t\t\t){\n\t\t\t\tdebug += item.title + \"\\n\";\n\t\t\t\tfilteredItems.push(item);\n\t\t\t}\n\t\t}\n\t});\n\t\n\t//alert(debug);\n\treturn filteredItems;\n}", "function where(list, properties) {\n // so for the test below we need a function that operates on a list and returns all of\n // the properties. There are three so loops/conditionals are needed. maybe if I use\n // if if else if else and make if the last property called I can get multiple passes?\n}", "function filterItems(items, value) {\n var result = [];\n for(var id in items){\n if(items[id].hasOwnProperty(\"completed\") && \n items[id].completed === value){\n result.push(items[id]);\n }\n }\n return result;\n }", "function filterObject(filter, type, data) { \n filter = _.filter(filter, function(item) {\n return (item !== false) ? item : false;\n }); \n if (filter.length < 1) { return data }\n return _.filter(data, function(item) {\n var boo = false;\n for(var i in filter) { \n if(_.contains(item[type], filter[i])) {\n boo = true;\n } else {\n boo = false;\n break; \n } \n }\n return (boo === true) ? item : false; \n }); \n }", "_filter(value) {\n //convert text to lower case\n const filterValue = value.toLowerCase();\n //get matching products\n return this.products.filter(option => option.toLowerCase().includes(filterValue));\n }", "singleFilterCollection(collection, filterBy) {\n let filteredCollection = [];\n if (filterBy) {\n const objectProperty = filterBy.property;\n const operator = filterBy.operator || OperatorType.equal;\n // just check for undefined since the filter value could be null, 0, '', false etc\n const value = typeof filterBy.value === 'undefined' ? '' : filterBy.value;\n switch (operator) {\n case OperatorType.equal:\n if (objectProperty) {\n filteredCollection = collection.filter((item) => item[objectProperty] === value);\n }\n else {\n filteredCollection = collection.filter((item) => item === value);\n }\n break;\n case OperatorType.contains:\n if (objectProperty) {\n filteredCollection = collection.filter((item) => item[objectProperty].toString().indexOf(value.toString()) !== -1);\n }\n else {\n filteredCollection = collection.filter((item) => (item !== null && item !== undefined) && item.toString().indexOf(value.toString()) !== -1);\n }\n break;\n case OperatorType.notContains:\n if (objectProperty) {\n filteredCollection = collection.filter((item) => item[objectProperty].toString().indexOf(value.toString()) === -1);\n }\n else {\n filteredCollection = collection.filter((item) => (item !== null && item !== undefined) && item.toString().indexOf(value.toString()) === -1);\n }\n break;\n case OperatorType.notEqual:\n default:\n if (objectProperty) {\n filteredCollection = collection.filter((item) => item[objectProperty] !== value);\n }\n else {\n filteredCollection = collection.filter((item) => item !== value);\n }\n }\n }\n return filteredCollection;\n }", "function _.filter(list, predicate){ \n var array = [];\n if (list == null){\n return list;\n };\n _.each(list, function(item) { \n if (predicate(item)) {\n array.push(predicate(item));\n }\n })\n return array;\n}", "function PropertyFilter(name, operator, value){\n if(name == '__key__'){\n this.propertyFilter = {\n property: { name: name },\n operator: operator,\n value: {keyValue: value}\n };\n }else{\n this.propertyFilter = {\n property: { name: name },\n operator: operator,\n value: convert.createValueObject(value)\n };\n }\n\n\n this.getFilterType = function(){\n return 'propertyFilter';\n };\n\n this.getFilter = function(){\n return this.propertyFilter;\n };\n}", "function myFilter(list, fn) {\n let filtered = [];\n for (let i = 0; i < list.length; i++) {\n if (fn(list[i])) {\n filtered.push(list[i])\n }\n }\n return filtered;\n}", "filterSelectedFromList(list) {\n const filteredList = list.filter(\n // eslint-disable-next-line no-undef\n checked = true\n );\n return filteredList\n }", "function find (properties) {\n return _.cloneDeep(_.filter(data, properties));\n}", "function filter_list_by_dict(list, dict, key)\n{\n var r = filter_list(list, function (elem) {\n var value = elem[key];\n return (dict[value] !== undefined);\n });\n return r;\n}", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n }", "function filterValues(data) \r\n{\r\n data = data.filter(isEligible);\r\n return data;\r\n}", "@computed get filteredTodos() {\r\n var matchesFilter = new RegExp(this.filter, \"i\");\r\n //\"i\" means ignore groß und kleinschreibung\r\n return this.todos.filter(\r\n todo => !this.filter || matchesFilter.test(todo.value)\r\n );\r\n // test will test the RegExp, so this.props.store.filter will automtaticly return\r\n // the filtered Value, on the CLient Side\r\n }", "function filterItem(value) {\n if (value == \"\") {\n // console.log(\"default\")\n setDefaultList();\n } // when nothing has typed\n let filteredItems = Object.assign([], taskTemporaly).filter(\n item => item.nameTaskAdd.toLowerCase().indexOf(value.toLowerCase()) > -1\n )\n setNewList(filteredItems);\n\n}", "function filter(field, value)\n {\n \n }", "function filter_by(data, parameter) {\n //Make sure parameter is not empty\n if (eval(parameter) != 0 & eval(parameter) != null) {\n var data = $.grep(data, function (e) {\n return e[parameter] === eval(parameter)\n });\n\n }\n return data;\n }", "filterBySomeAttribute(attribute, value){\n this.props.filters[attribute].filter(value);\n this.props.updateFilteredData()\n }", "function filter(obj, action) {\n var filtered = [];\n each(obj, function(item) {\n if(action(item)) {\n filtered.push(item);\n }\n });\n return filtered;\n}", "filterByStatus(status) {\n this.stats = status;\n if (status === null) this.list = ls.getList() || []\n else this.list = ls.getList().filter(v => v.open == status)\n }", "function findProp(list, property, name){\n\treturn $.grep(list, function(item){\n\t\treturn item[property] == name;\n\t});\n}", "function filterData(dataSource, value) {\n var newData = [];\n dataSource.filter(function (data) {\n if ((data.id).indexOf(value) !== -1) {\n newData.push(data);\n }\n });\n return newData;\n }", "function filterValue(obj, prop, func) {\n for (var p in obj) {\n if (obj.hasOwnProperty(p) === false) {\n continue;\n }\n else if (p === prop) {\n if (func && (typeof func === 'function')) {\n (func)(obj, prop);\n }\n }\n else if (typeof obj[p] === 'object') {\n filterValue(obj[p], prop, func);\n }\n }\n}", "function filterItems() {\n //returns newPropList, array of properties\n var newPropList = featured;\n //Beds\n console.log(1, newPropList);\n if(currentFilters.beds == 5) {\n newPropList = newPropList.filter(item => item.bedrooms >= currentFilters.beds);\n }\n else if (currentFilters.beds == 0) {\n\n }\n else {\n newPropList = newPropList.filter(item => item.bedrooms == currentFilters.beds);\n }\n console.log(2, newPropList);\n //Baths\n if(currentFilters.baths == 5) {\n newPropList = newPropList.filter(item => item.fullBaths >= currentFilters.baths);\n }\n else if (currentFilters.baths == 0) {\n\n }\n else {\n newPropList = newPropList.filter(item => item.fullBaths == currentFilters.baths);\n }\n console.log(3, newPropList);\n //Price\n if(currentFilters.max == 0) {\n\n }\n else if(currentFilters.min == 1000000) {\n newPropList = newPropList.filter(item => item.rntLsePrice >= currentFilters.min);\n }\n else {\n newPropList = newPropList.filter(item => item.rntLsePrice >= currentFilters.min && item.rntLsePrice <= currentFilters.max);\n }\n console.log(4, newPropList);\n //Type\n console.log(currentFilters.type);\n if(currentFilters.type == \"All\") {\n console.log('all');\n }\n else if(currentFilters.type == \"Other\") {\n newPropList = newPropList.filter(item => item.idxPropType == \"Residential Income\" || item.idxPropType == \"Lots And Land\");\n console.log('other');\n }\n else {\n newPropList = newPropList.filter(item => item.idxPropType == currentFilters.type);\n console.log('normal');\n }\n //Search Term\n console.log(5, newPropList);\n if(currentFilters.term != '')\n {\n newPropList = newPropList.filter(item => \n item.address.toLowerCase().indexOf(currentFilters.term.toLowerCase()) != -1 ||\n item.cityName.toLowerCase().indexOf(currentFilters.term.toLowerCase()) != -1\n );\n }\n console.log(6, newPropList);\n return newPropList;\n }", "filterTrips (type, operator, value) {\n // Would like to solve this...currently unable to have the filter read values from tripList obj\n // Read comparitors from the tripList obj tp make them available to the filter\n const comparitors = this.comparitors\n const tripFetch = this.tripFetch\n // Gets which function to perform based on the operator variable passed from a controller\n const filteredArr = this.allMyTrips.filter(function (trip) {\n // function to take the type variable and fetch trip data based on the input\n return (comparitors[operator](tripFetch[type](trip), value))\n })\n return filteredArr\n }", "function propertyFilter(selectedProp){\n return function(a, b){\n var valA = [];\n var valB = [];\n var prpA = $(a).children(\"td\").eq(7).children(\".property\");\n var prpB = $(b).children(\"td\").eq(7).children(\".property\");\n var idA = $(a).children(\"td\").eq(1).html();\n var idB = $(b).children(\"td\").eq(1).html();\n for(var i = 0; i < prpA.length; i++){\n valA.push(prpA.eq(i).attr(\"data-prop\"));\n }\n for(var i = 0; i < prpB.length; i++){\n valB.push(prpB.eq(i).attr(\"data-prop\"));\n }\n totalA = selectedProp.every(function(i){return valA.indexOf(i) != -1}) ? 1 : 0;\n totalB = selectedProp.every(function(i){return valB.indexOf(i) != -1}) ? 1 : 0;\n valA.forEach(function(i){\n value = selectedProp.indexOf(i);\n if(value != -1) totalA += 10**(4 - value);\n });\n valB.forEach(function(i){\n value = selectedProp.indexOf(i);\n if(value != -1) totalB += 10**(4 - value);\n });\n if(totalA == totalB) return idA - idB;\n return totalB - totalA;\n }\n}", "applyFiltersAndSorts() {\n var list = this.props.list.filter(this.matchesFilterEnergyLevel);\n list = list.filter(this.matchesFilterFunLevel)\n var sort_type = this.getSortFunction()\n if(sort_type != null){\n list = list.sort(sort_type)\n }\n return list\n\n }", "function fprop(a,p){return a.filter(function(x){return x[p]})}", "function PropertyFilter(property, operator, value) {\n\t\t\tthis.property = property;\n\t\t\tthis.operator = operator.toLowerCase();\n\t\t\tthis.value = value;\n\t\t}", "function filterObjectBy(obj,objfilt){\n\n if(!objfilt){\n return true;\n } else if((Object.keys(objfilt).length === 0))\n {\n return true;\n }\n\n var res;\n\n var compareIndividual = function (valueorig,valuefilt){\n\n //console.info(\"typeof valuefilt\",typeof valuefilt);\n if (typeof valuefilt === \"string\") {//se busca sobre un array\n //console.info(\"es un string\",valueorig.toLowerCase().indexOf(valuefilt.toLowerCase()));\n //console.info(\"valueorig\",valueorig);\n if(valueorig && valueorig.toLowerCase().trim().indexOf(valuefilt.toLowerCase().trim()) > -1){\n //console.log(\"son iguales string\");\n return true;\n }\n\n\n }else if(typeof valuefilt === \"boolean\"){\n var value_orig = Boolean(valueorig);\n var value_filt = Boolean(valuefilt);\n //console.info(\"booleanos\",(value_orig === value_filt),value_orig , value_filt);\n if(value_orig === value_filt){\n return true;\n }\n\n }else if(valueorig === valuefilt){\n //console.log(\"son iguales simple\");\n return true;\n }\n //console.info(\"no son iguales\");\n return false;\n\n\n };\n\n\n for(var key in objfilt){\n //console.info(key,obj[key]);\n if(obj[key] !== undefined ){//existe la propiedad en el original\n //console.info(\"existe\",objfilt[key]);\n if (objfilt[key] instanceof Array) {//se busca sobre un array\n //console.info(\"es un array\");\n var array = objfilt[key];\n var length = array.length;\n var resArray = null;\n for (var i = 0; i < length; i++) {\n var item = array[i];\n\n var compareIndividualResult = compareIndividual(obj[key], item);\n resArray = resArray || compareIndividualResult;\n //console.info(\"resArray\",resArray,item,\"compareIndividualResult\",compareIndividualResult);\n }\n res = (res)?(res && resArray):resArray;\n //console.info(\"res\",res,objfilt[key]);\n }else{\n //console.info(\"no es un array\");\n res = compareIndividual(obj[key],objfilt[key]);\n\n }\n\n }else{\n res = false;\n\n }\n if(res){\n continue;\n\n }else{\n break;\n }\n\n }\n //console.info(\"return res\",res);\n return res || false;\n}", "function filterPets(){\r\n for(let i = 0; i < listings.length; i++){\r\n let l = listings[i].val;\r\n listings[i].visible = l.pets && listings[i].visible;\r\n }\r\n}", "function filter(list, predicate) {\n var new_list = [];\n for (var i = 0, len = list.length; i < len; i++) {\n if (predicate(list[i])) new_list.push(list[i]);\n }\n return new_list;\n}", "getFilteredItems(query){\r\n return this.source.filter((item) =>item[this.getOptionLabel].toLowerCase().startsWith(query.toLowerCase(), 0) && !item.invisible);\r\n }", "filterlist(){\n\n\t\t\t// filterlist object\n\t\t\t// returns a filter funtion over the constructed post\n\t\t\treturn this.postlist.filter((post)=>{\n\n\t\t\t\t// of an inculded array of title-toLowerCase matching any keyword-toLowerCase returned\n\t\t\t\treturn post.title.toLowerCase().includes(this.keyword.toLowerCase());\n\t\t\t});\n\t\t}", "function filter(list, test) {\n var result_list = new Array();\n for (var i = 0; i < list.length; i++) {\n if (test(list[i])) result_list.push(list[i]);\n }\n return result_list;\n}", "function filtreParNombreDeProduit(list, nombreDeProduit) {\n let newList = [];\n list.forEach((value) => {\n if (value.total > nombreDeProduit) {\n newList.push(value);\n }\n });\n return newList;\n}", "function findBy(key,val){return _items.filter(function(item){return item[key]===val;});}", "filterList(queryString) {\n this.doFilter(queryString);\n }", "filterList(queryString) {\n this.doFilter(queryString);\n }", "filteredList() {\n return this.list1.filter((post) => {\n return post.name\n .toLowerCase()\n .includes(this.searchRelated.toLowerCase());\n });\n }", "list(filterFn = this._list_filter) {\n const list = this.get('list') || [];\n return list.reduce((a, i) => {\n if (filterFn(i)) {\n a.push(i);\n }\n return a;\n }, []);\n }", "function filterByStatus(val){\n return val.status == this;\n }", "function forFilter(){\n return (x) => x.obj_status === 'active';\n}", "function filterInside(f, ll) { \n console.log(\"filtering\"); console.log(JSON.stringify(ll));\n return ll.map(function (l) { return l.filter(f); }); \n}", "function $FHml$var$filter(xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n\n return res;\n}", "function removeFromList(list, value){\n return list.filter(val => val+\"\" !== value+\"\");\n}", "function filterSearch() {\n const searchValue = this.value;\n currentFilter = searchValue;\n console.log(searchValue);\n buildList(searchValue);\n}", "_filter(value) {\n const filterValue = value.toLowerCase();\n return this.tags_all.filter(option => option.text.toLowerCase().includes(filterValue));\n }", "function filterList(query) {\n filteredArray = studentArray.filter(function(student) {\n return student.house.indexOf(query) > -1;\n });\n sortList(filteredArray);\n}", "function filter(coll, f){\n //create true accu\n var acc = [];\n each(coll, function(element, index ){\n if(f(element)){\n acc.push(element);\n }\n });\n return acc;\n}", "function searchingProducts(listToFilter) {\n\n if (searchValue.value) {\n listToFilter = listToFilter.filter(availProduct => {\n return availProduct.name.toLowerCase().includes(searchValue.value.toLowerCase());\n });\n }\n\n if (countryValue.options[countryValue.selectedIndex].value) {\n listToFilter = listToFilter.filter(availProduct => {\n return availProduct.shipsTo.map(selectOption => selectOption.toLowerCase()).includes(countryValue.options[countryValue.selectedIndex].value.toLowerCase());\n });\n } \n\n sortProducts(listToFilter);\n\n renderProducts(listToFilter);\n}", "function filterByValue(arr, key) {\n return arr.filter(function(val) {\n return val[key] !== undifined;\n }); \n}", "filterFunc (searchExpression, value) {\n const itemValue = value.name\n\n return (!searchExpression || !itemValue)\n ? false\n : itemValue.toUpperCase().indexOf(searchExpression.toUpperCase()) !== -1\n }", "function filterCards(property, type) {\n const output = ideasArray.filter(card => {\n return card[property] === type;\n });\n filteredIdeas = output;\n appendCards(filteredIdeas);\n}", "function search(res, value) {\n\tres = res.filter(res => res.name.toLowerCase().includes(value.toLowerCase()) ||\n\t\tres.employeeId.toString().includes(value.toLowerCase()));\n\treturn res;\n}", "function filteredjson(obj,key,val) {\n var res = jQuery.grep(obj, function (el, i) {\n return (el[key]==val);\n });\n return res;\n}", "function filterUl(value) {\n var list = $(\"#drag-list-container li\").hide()\n .filter(function () {\n var item = $(this).text();\n var padrao = new RegExp(value, \"i\");\n return padrao.test(item);\n }).closest(\"li\").show();\n}", "function filterJsonList(myObjectClass) {\r\n var filterId = dojo.byId('listIdFilter');\r\n var filterName = dojo.byId('listNameFilter');\r\n var grid = dijit.byId(\"objectGrid\");\r\n if (grid && (filterId || filterName)) {\r\n filter = {};\r\n unselectAllRows(\"objectGrid\");\r\n filter.id = '*'; // delfault\r\n if (filterId) {\r\n saveDataToSession('listIdFilter'+myObjectClass, dojo.byId('listIdFilter').value, false);\r\n if (filterId.value && filterId.value != '') {\r\n filter.id = '*' + filterId.value + '*';\r\n }\r\n }\r\n if (filterName) {\r\n saveDataToSession('listNameFilter'+myObjectClass, dojo.byId('listNameFilter').value, false);\r\n if (filterName.value && filterName.value != '') {\r\n filter.name = '*' + filterName.value + '*';\r\n }\r\n }\r\n grid.query = filter;\r\n grid._refresh();\r\n }\r\n refreshGridCount();\r\n selectGridRow();\r\n}", "function ListFilter(type, key, default_value, params)\n {\n var filter = this;\n filter.isolated = false;\n filter.getValue = getValue;\n filter.setValue = setValue;\n filter.hasDefaultValue = hasDefaultValue;\n init();\n\n ///////////\n\n /**\n * Initialize ListFilter.\n */\n function init()\n {\n if(typeof params === 'undefined' || params === undefined)\n {\n params = {};\n }\n filter.type = type;\n\n // KEYS\n filter.key = key;\n filter.static = !!params.static ? params.static : false;\n filter.query_key = params.query_key ? params.query_key : filter.key;\n\n // VALUES\n filter.default_value = default_value;\n if(params.value)\n {\n if(params.value === 'fromStateParams')\n {\n filter.setValue($stateParams[key] ? $stateParams[key] : default_value);\n }\n else\n {\n filter.setValue(params.value);\n }\n }\n else\n {\n filter.setValue(default_value);\n }\n\n // PARAMS\n filter.force_bool = !!params.force_bool;\n }\n\n /**\n * Get the computed value (null if default)\n * @returns {*}\n */\n function getValue()\n {\n if(hasDefaultValue())\n {\n return null;\n }\n if(typeof filter.value === 'boolean')\n {\n return filter.value ? 'True' : 'False';\n }\n return filter.value;\n }\n\n /**\n * Set the value.\n * @param value\n */\n function setValue(value)\n {\n if(filter.force_bool)\n {\n filter.value = !!value;\n }\n filter.value = value;\n }\n\n function hasDefaultValue()\n {\n return filter.value === filter.default_value;\n }\n }", "filtering(data, filters) { // eslint-disable-line\n /**\n * Inputs:\n * data: List of JSON objects to filter\n * example: data = [\n * {\n * name: 'Joe',\n * ...\n * },\n * ...\n * ]\n * filters: The filters to apply.\n * example: filters = [\n * {\n * name: 'SexualOrient',\n * type: FILTER_CATEGORICAL,\n * value: ['Bi', 'Het'], // Take OUT 'Bi', 'Het'\n * },\n * {\n * name: 'Alcohol',\n * type: FILTER_CONTINUOUS,\n * minVal: 1,\n * maxVal: 24,\n * },\n * {\n * name: 'Age',\n * type: FILTER_BUCKETED,\n * buckets: [\n * { minVal: null, maxVal: 20 },\n * { minVal: 20, maxVal: 30 },\n * { minVal: 30, maxVal: null },\n * ]\n * },\n * {\n * name: 'date',\n * type: FILTER_DATE,\n * startYear: 2000,\n * endYear: 2012,\n * },\n * ]\n */\n // Filter each data item\n return data.filter((elem) => {\n let show = true;\n\n filters.forEach((eachFilter) => {\n switch (eachFilter.type) {\n case FILTER_CATEGORICAL: {\n show = show && eachFilter.value.indexOf(elem[eachFilter.name]) === -1;\n break;\n }\n case FILTER_CONTINUOUS: {\n show = (show && elem[eachFilter.name] >= eachFilter.minVal &&\n elem[eachFilter.name] < eachFilter.maxVal);\n break;\n }\n case FILTER_BUCKETED: {\n show = (show && elem[eachFilter.name] >= eachFilter.minVal &&\n elem[eachFilter.name] < eachFilter.maxVal);\n break;\n }\n case FILTER_DATE: {\n const date = new Date(elem[eachFilter.name]);\n\n // Make sure it is a valid date\n show = !isNaN(date.valueOf());\n\n show = (show && date.getFullYear() >= eachFilter.startYear && date.getFullYear() < eachFilter.endYear);\n break;\n }\n default:\n }\n });\n return show;\n });\n }", "function filterAttributes(a, prop) {\n var trimmedAttribute = {}\n a.filter((attribute) => (\n trimmedAttribute.hasOwnProperty(attribute[prop]) ? false : (trimmedAttribute[attribute[prop]] = true)\n ));\n return trimmedAttribute;\n }", "function useFilter1(inputArr) {\n inputArr.filter((obj) => {\n if (obj.gender == \"male\") {\n console.log(obj)\n }\n })\n}", "onFilterInputChange(e){\n\n\t\tconst sortedList = this.state.sortedItems;\n const updatedList = sortedList.filter(function(item){\n return (item.value.title.toLowerCase().search(\n e.target.value.toLowerCase()) !== -1) ||\n\t\t\t\t(item.value.field.toLowerCase().search(\n\t e.target.value.toLowerCase()) !== -1);\n });\n this.setState({ filteredItems: updatedList });\n }", "@expression(\"items (in|of) <List> where <method>\", { types: [ List, Function ], returns: List })\n\tstatic items_where(list, method) {\n\t\tif (!(list instanceof List)) return undefined\n\t\tif (!(method instanceof Function)) return undefined\n\t\tresults = List.duplicate(list)\n\t\tList.empty(results)\n\t\tfor (let item in list.items) {\n\t\t\tif (Type.is_truthy(method(item))) List.add(results, item)\n\t\t}\n\t\treturn results\n\t}", "function filtrar(value) {\n $(\".items\").filter(function () {\n $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);//SI ES DIFERENTE A -1 ES QUE ENCONTRO\n });\n}", "filteredListings() {\n const filter = this.state.filters.name\n if (this.state.filters.name === 'All') return this.sortedListings()\n return this.sortedListings().filter(category => {\n return category.categories.some(category => category.name === filter)\n })\n }", "function filterByValue(arr, key){\n return arr.filter(curVal => curVal[key] !== undefined);\n}", "function objFilter(obj, callback) {\n\n}", "function filterObject(obj, index, value, type, match){\r\n\ttype = type || 'middle';\r\n\tmatch = typeof(match) != 'undefined' ? match : true;\r\n\tvar result = Array();\r\n\tvalue = normalize(value);\r\n\tif (match) {\r\n\t\t$.each( obj, function( key, element ) {\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase 'exact':\r\n\t\t\t\t\tif (normalize(element[index]) == value){\r\n\t\t\t\t\t\tresult.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak; \r\n\t\t\t\tcase 'middle':\r\n\t\t\t\t\tvar first = normalize(element[index]).indexOf(value); \r\n\t\t\t\t\tif (first > -1){\r\n\t\t\t\t\t\tresult.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\telse if (!match) {\r\n\t\t$.each( obj, function( key, element ) {\r\n\t\t\tswitch(type){\r\n\t\t\t\tcase 'exact':\r\n\t\t\t\t\tif (normalize(element[index]) != value){\r\n\t\t\t\t\t\tresult.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak; \r\n\t\t\t\tcase 'middle':\r\n\t\t\t\t\tvar first = normalize(element[index]).indexOf(value);\r\n\t\t\t\t\tif (first == -1){\r\n\t\t\t\t\t\tresult.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn result;\r\n}", "filterMatchingItems(item) {\n if (this.state.shelf_life === 'All' && this.state.type === 'All') {\n return true;\n } else if (this.state.shelf_life === 'All' && this.state.type === item.type) {\n return true;\n } else if (this.state.shelf_life === item.shelf_life && this.state.type === \"All\") {\n return true;\n } else if (this.state.shelf_life === item.shelf_life && this.state.type === item.type) {\n return true;\n } else {\n return false;\n }\n\n }", "function objectFilter(obj, kvPredicate) {\r\n var result = {};\r\n for (var key in obj) {\r\n if (hasOwnProperty.call(obj, key)) {\r\n var value = obj[key];\r\n if (kvPredicate(key, value)) {\r\n result[key] = value;\r\n }\r\n }\r\n }\r\n return result;\r\n }", "filterByStatus(status){\n let todosTemp = [];\n \n this.props.observer.filteredTodos.forEach(function (todo) {\n debugger;\n if(todo.props.isSelected){\n todosTemp.push(todo);\n }\n });\n \n return todosTemp; \n }", "function filterValues(obj, callback, thisObj) {\n\t callback = makeIterator(callback, thisObj);\n\t var output = {};\n\t forOwn(obj, function(value, key, obj) {\n\t if (callback(value, key, obj)) {\n\t output[key] = value;\n\t }\n\t });\n\n\t return output;\n\t }", "equals(name, value) {\n\t\tthis.filter.push([`'${name}' == ${value}`, m => propertyValue(m, name) == value ])\n\n\t\treturn this;\n\t}", "function isPropFiltered(propertyKey) {\n let filtered = false;\n filtered = Object.keys(propertyKey).some((propertyValue) => !propertyKey[propertyValue][0]);\n return filtered;\n }", "function CfnPipeline_FilterPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('filter', cdk.requiredValidator)(properties.filter));\n errors.collect(cdk.propertyValidator('filter', cdk.validateString)(properties.filter));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n errors.collect(cdk.propertyValidator('next', cdk.validateString)(properties.next));\n return errors.wrap('supplied properties not correct for \"FilterProperty\"');\n}", "function where(collection, properties){\n\tvar arr = [];\n\teach(collection, function(itm){\n\t\tfor(key in properties){\n\t\t\tif(!(itm[key]) || itm[key] !== properties[key]) return;\n\t\t}\n\t\tarr.push(itm);\n\t});\n\treturn arr;\n}", "function filter_list(l) {\n return l.filter( function filt(value){return typeof value === \"number\"});\n}", "function TestFilter(){\n\t\treturn function(arr, param1, param2){\n\t\t\tconsole.log(\"filter called\");\n\t\t\tif(param1){\n\t\t\t\tvar filtered = _.select(arr, function(item) {\n\t \t\t\t\treturn item.indexOf( param1 ) !== -1;\n\t\t\t\t});\t\n\n\t\t\t\treturn filtered;\n\t\t\t} else{\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t};\n\t}", "function filterDropdown (list) {\n return _.filter(list, function(mug_) {\n return (mug.ufid !== mug_.id) &&\n (mug_.name && !_.isUndefined(mug_.displayLabel));\n });\n }", "setFilter (filter, value) {\n if (filter === 'rating') {\n this.filters.rating = Number(value);\n }\n\n if (filter === 'genres') {\n const index = this.filters.genres.indexOf(parseInt(value));\n\n // Here if the genre exist it is removed. Otherwise it is added. This allows to call setFilter for genres\n // always with value, no need to specify add/remove. This does it automatically.\n if (index >= 0) {\n this.filters.genres.splice(index, 1);\n } else {\n this.filters.genres.push(value);\n }\n }\n }", "function filter(f, o){\n\n // control the parameters received from the component and assign the control variable \n if(o === \"companie\"){\n filterDefaut.C = f;\n }\n else if(o === \"state\"){\n filterDefaut.S = f;\n }\n else if(o === \"age\"){\n filterDefaut.A = f;\n }\n else{\n console.log(\"information out of default\") \n }\n\n if(filterDefaut.A === \"all\" && filterDefaut.C === \"all\" && filterDefaut.S === \"all\"){\n filtered = peoples.filter( ()=> true); // filter all\n }\n\n if(filterDefaut.C != \"all\" && filterDefaut.S === \"all\" && filterDefaut.A === \"all\"){\n filtered = peoples.filter( item => filterDefaut.C === item.companie);\n }\n else if(filterDefaut.S != \"all\" && filterDefaut.C === \"all\" && filterDefaut.A === \"all\"){\n filtered = peoples.filter( item => filterDefaut.S === item.state); \n }\n else if(filterDefaut.A != \"all\" && filterDefaut.C === \"all\" && filterDefaut.S === \"all\"){\n range = filterDefaut.A.split(\"-\");\n filtered = peoples.filter( item => {\n if( item.age >= range[0] && item.age <= range[1]){\n return true;\n }\n })\n }\n else if(filterDefaut.S != \"all\" && filterDefaut.C != \"all\" && filterDefaut.A === \"all\"){\n \n filtered = peoples.filter( item => {\n if(filterDefaut.S === item.state && filterDefaut.C === item.companie){\n return true;\n }\n }); \n }\n else if(filterDefaut.S != \"all\" && filterDefaut.C != \"all\" && filterDefaut.A === \"all\"){\n \n filtered = peoples.filter( item => {\n if(filterDefaut.S === item.state && filterDefaut.C === item.companie){\n return true;\n }\n }); \n }\n else if(filterDefaut.S != \"all\" && filterDefaut.C != \"all\" && filterDefaut.A != \"all\"){\n range = filterDefaut.A.split(\"-\");\n filtered = peoples.filter( item => {\n if(filterDefaut.S === item.state && filterDefaut.C === item.companie && item.age >= range[0] && item.age <= range[1]){\n return true;\n }\n }); \n }\n else{\n // console.log(\"information out of default\")\n }\n\n\n let data = filtered.map( item =>\n `<tr>\n <td>${item.name}</td>\n <td>${item.age}</td>\n <td>${item.state}</td>\n <td>${item.office}</td>\n <td>${item.companie}</td>\n </tr>\n `\n )\n \n tableInfo.innerHTML = data.join(\"\");\n \n $Infomation.insertBefore(tableInfo, null);\n}", "function filterObject(obj, filter) {\n // returns a key/value object of all of the k/v from the obj that are true for the filter\n var filtered = {};\n\n $.each(instance, function (k, v) {\n if (filter(k, v)) {\n filtered[k] = v;\n }\n });\n\n return filtered;\n }", "function filterByMatch(value) {\n let filteredList = [];\n for (var i = 0; i < currentTrails.length; i++) {\n let rating = currentTrails[i].difficulty;\n if (rating === value) {\n filteredList.push(currentTrails[i]);\n }\n }\n return filteredList;\n}", "function filtro(arreglo, criterios,signo) { \n return arreglo.filter(function(obj) {return Object.keys(criterios).every(function(c) { //retorna los objetos que no cumplan los criterios si signo es true\n if (signo) //retorna los objetos que cumplen los criterios si signo es false\n return obj[c] != criterios[c]; // ejmplo de uso (arregloObjetos,{atributo1:a,atributo2:b},true)\n else \n return obj[c] == criterios[c]; \n }); \n }); \n }", "function filterSmoking(){\r\n for(let i = 0; i < listings.length; i++){\r\n let l = listings[i].val;\r\n listings[i].visible = l.smoking && listings[i].visible;\r\n }\r\n}", "function filterProduce() {\n let filteredListings = sortedListings;\n if (checkedSeasonFilters.length > 0) {\n filteredListings = filteredListings.filter(\n (listing) => checkedSeasonFilters.includes(listing.season),\n );\n }\n if (checkedProdFilters.length > 0) {\n filteredListings = filteredListings.filter(\n (listing) => checkedProdFilters.includes(listing.produceType),\n );\n }\n // If applied range exists, hard limit to min/max\n if (appliedRange.length > 0) {\n filteredListings = filteredListings.filter(\n (listing) => inAppliedRange(listing.palletPrice),\n );\n }\n if (checkedPriceFilters.length > 0) {\n filteredListings = filteredListings.filter(\n (listing) => inFilterPriceRange(listing.palletPrice),\n );\n }\n // Only filter if 1 of standard/agency options checked (if both, filtering is redundant)\n if (checkedItemTypes.length === 1) {\n if (checkedItemTypes[0] === 'Agency Price') {\n filteredListings = filteredListings.filter(\n (listing) => listing.hasAgencyPrice === true,\n );\n } else {\n filteredListings = filteredListings.filter(\n (listing) => listing.hasAgencyPrice === false,\n );\n }\n }\n setFilteredProduce(filteredListings);\n }" ]
[ "0.69004273", "0.6489177", "0.63892597", "0.633543", "0.6235546", "0.621389", "0.610121", "0.6040775", "0.60404855", "0.6020834", "0.5991925", "0.59573346", "0.5935419", "0.5934845", "0.5932653", "0.5930276", "0.5890107", "0.5890107", "0.5890107", "0.5890107", "0.5890107", "0.5890107", "0.5890107", "0.5890107", "0.5890107", "0.58834994", "0.5862186", "0.58596367", "0.5852908", "0.58290684", "0.5784265", "0.5741781", "0.5737321", "0.5723448", "0.5708381", "0.57058024", "0.5690366", "0.56455797", "0.564511", "0.5644201", "0.56382", "0.56341004", "0.5633528", "0.56251353", "0.5623013", "0.55924577", "0.5577456", "0.557045", "0.5562673", "0.55547446", "0.5554077", "0.5554077", "0.5547158", "0.5544497", "0.5536985", "0.55331326", "0.5512913", "0.5505177", "0.54979384", "0.5489771", "0.5484115", "0.54838216", "0.54612505", "0.5460984", "0.545853", "0.545545", "0.542781", "0.54264987", "0.54173195", "0.54083556", "0.5404952", "0.53914857", "0.5387621", "0.5386566", "0.5364635", "0.536036", "0.5358742", "0.5355803", "0.53548986", "0.53428566", "0.53380924", "0.53364897", "0.5331402", "0.5328214", "0.5327599", "0.5324429", "0.53169644", "0.5311088", "0.53073645", "0.5301006", "0.5297134", "0.5296975", "0.52951026", "0.52946216", "0.5293916", "0.5289269", "0.5288107", "0.52838403", "0.5268113", "0.5265135" ]
0.7527607
0
split list into list of lists according to some property
static splitByProperty(ObjList, property) { var answer = {}; var spliter = ObjList[0][property + ""]; var subGroup = [ObjList[0]]; for (var publicationIndex = 1; publicationIndex < ObjList.length; publicationIndex++) { if (ObjList[publicationIndex][property + ""] != spliter) { answer[spliter] = [...subGroup]; spliter = ObjList[publicationIndex][property + ""]; subGroup = [ObjList[publicationIndex]]; } else { subGroup.push(ObjList[publicationIndex]); } } answer[spliter] = [...subGroup]; return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function groupBy2(xs, prop) {\n var grouped = {};\n for (var i=0; i<xs.length; i++) {\n var p = xs[i][prop];\n if (!grouped[p]) { grouped[p] = []; }\n grouped[p].push(xs[i]);\n }\n return grouped;\n}", "function groupItems(list) {\n return list.reduce(function (groupedList, element) {\n var key = element.group.toLowerCase();\n if (!groupedList[key]) {\n groupedList[key] = [];\n }\n if (element.nameOrder == \"reverse\") {\n groupedList[key].push({name: element.last + \" \" + element.first});\n } else {\n groupedList[key].push({name: element.first + \" \" + element.last});\n }\n return groupedList;\n }, {});\n}", "function groupBy(data_array, property) {\r\n return data_array.reduce(function (accumulator, current_object) {\r\n let key = current_object[property];\r\n if (!accumulator[key]) {\r\n accumulator[key] = [];\r\n }\r\n accumulator[key].push(current_object);\r\n return accumulator;\r\n }, {});\r\n }", "function splitHands(l) {\n return l.reduce(function(result, value, index) {\n if (index % 2 === 0)\n result.push(l.slice(index, index + 2));\n return result;\n }, []);\n}", "function groupBy(arr, prop) {\n\treturn arr.reduce((a, v) => {\n\t\tconst key = v[prop];\n\t\tif (!a[key]) a[key] = [];\n\t\ta[key].push(v);\n\t\treturn a;\n\t}, {});\n}", "function groupPersons(persons, prop) {\n var groupedPersons = {},\n i;\n for (i = 0; i < persons.length; i++) {\n if (groupedPersons[persons[i][prop]]) {\n groupedPersons[persons[i][prop]].push(persons[i]);\n } else {\n groupedPersons[persons[i][prop]] = new Array(persons[i]);\n }\n }\n return groupedPersons;\n}", "function groupBy2(arr, prop) {\n\t// Create a holder object\n\tconst a = {};\n\t// Map over the array\n\tarr.map(v => {\n\t\t// Create a key equal to the current object's 'prop' property value\n\t\tconst key = v[prop];\n\t\t// Unless there's already a property in 'a' by the name of 'key', create it and set it equal to an empty array.\n\t\tif(!a[key]) a[key] = [];\n\t\t// Push the current object into the array\n\t\ta[key].push(v);\n\t});\n\t// return the holder object\n\treturn a;\n}", "function split(parsed){\n\tvar ret = [];\n\tvar chunk = [];\n\tfor(var i=0; i<parsed.length; i++){\n\n\t\tvar item = parsed[i];\n\t\tvar flags = item.flags;\n\t\t\n\t\tfor(var f=0; f<flags.length; f++){\n\t\t\tvar flagList = flags[f];\n\t\t\tif(spliton.indexOf(flagList.flag) > -1){\n\t\t\t\tif(chunk.length){\n\t\t\t\t\t//ret.push(chunk.slice());\n\t\t\t\t\tret.push(chunk);\n\t\t\t\t\tchunk = [];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tchunk.push(item);\n\t\t\n\t}\n\n\t//ret.push(chunk.slice());\n\tret.push(chunk);\n\n\treturn ret;\n}", "list(filterFn = this._list_filter) {\n const list = this.get('list') || [];\n return list.reduce((a, i) => {\n if (filterFn(i)) {\n a.push(i);\n }\n return a;\n }, []);\n }", "function partition(collection,fn){var result={lhs:[],rhs:[]};_.forEach(collection,function(value){if(fn(value)){result.lhs.push(value)}else{result.rhs.push(value)}});return result}", "function splitListItem(opts, change) {\n var value = change.value;\n\n var currentItem = (0, _utils.getCurrentItem)(opts, value);\n if (!currentItem) {\n return change;\n }\n\n var splitOffset = value.startOffset;\n\n return change.splitDescendantsByKey(currentItem.key, value.startKey, splitOffset);\n}", "static GroupBy(list, keyGetter) {\n const map = new Map();\n list.forEach((item) => {\n const key = keyGetter(item);\n const collection = map.get(key);\n if (!collection) {\n map.set(key, [item]);\n }\n else {\n collection.push(item);\n }\n });\n return map;\n }", "function groupBy(list, key) {\n throw 'not implemented';\n}", "function splitArray(arr,count){var newArray=[];arr=arr.map(function(el,index){el.position=index+1;return el;});while(arr.length>0){newArray.push(arr.splice(0,count));}return newArray;}", "groupBy(list, keyGetter) {\n const map = new Map();\n list.forEach((item) => {\n const key = keyGetter(item);\n const collection = map.get(key);\n if (!collection) {\n map.set(key, [item]);\n } else {\n collection.push(item);\n }\n });\n return map;\n }", "function groupBy(objectArray, property) {\r\n return objectArray.reduce((acc, obj) => {\r\n const key = obj[property];\r\n if (!acc[key]) {\r\n acc[key] = [];\r\n }\r\n // Add object to list for given key's value\r\n acc[key].push(obj);\r\n return acc;\r\n }, {});\r\n }", "function groupBy(objectArray, property) {\r\n return objectArray.reduce((acc, obj) => {\r\n const key = obj[property];\r\n if (!acc[key]) {\r\n acc[key] = [];\r\n }\r\n // Add object to list for given key's value\r\n acc[key].push(obj);\r\n return acc;\r\n }, {});\r\n }", "function groupBy(objectArray, property) {\r\n return objectArray.reduce((acc, obj) => {\r\n const key = obj[property];\r\n if (!acc[key]) {\r\n acc[key] = [];\r\n }\r\n // Add object to list for given key's value\r\n acc[key].push(obj);\r\n return acc;\r\n }, {});\r\n }", "function groupBy(objectArray, property) {\r\n return objectArray.reduce((acc, obj) => {\r\n const key = obj[property];\r\n if (!acc[key]) {\r\n acc[key] = [];\r\n }\r\n // Add object to list for given key's value\r\n acc[key].push(obj);\r\n return acc;\r\n }, {});\r\n }", "function groupBy(objectArray, property) {\r\n return objectArray.reduce((acc, obj) => {\r\n const key = obj[property];\r\n if (!acc[key]) {\r\n acc[key] = [];\r\n }\r\n // Add object to list for given key's value\r\n acc[key].push(obj);\r\n return acc;\r\n }, {});\r\n }", "function groupBy(objectArray, property) {\r\n return objectArray.reduce((acc, obj) => {\r\n const key = obj[property];\r\n if (!acc[key]) {\r\n acc[key] = [];\r\n }\r\n // Add object to list for given key's value\r\n acc[key].push(obj);\r\n return acc;\r\n }, {});\r\n }", "function splitOnVal(list, num) {\n let current = list.head,\n newList = new SinglyList(),\n found = false,\n previous;\n if (!current) {\n // list is empty, return null:\n console.log(null);\n return null;\n }\n // loop through list:\n while (current.next) {\n if (current.val === num) {\n // num found, split list:\n newList.head = current;\n // Set previous node's next to null (since node before this is now an end node):\n if (previous) {\n // set previous to null:\n previous.next = null;\n }\n found = true;\n }\n previous = current;\n current = current.next;\n }\n // now we are on last node, check if val:\n if (current.val === num) {\n // split list at last node:\n newList.head = current;\n previous.next = null; // set previous node's next to null:\n found = true;\n }\n\n if (!found) {\n console.log(\"Value does not exist in list.\");\n return null;\n }\n\n // return latter half of list:\n console.log(newList);\n return newList;\n}", "function split(numList) {\n let midpoint = numList.length / 2\n let splitList = {}\n splitList.left = numList.slice(0,midpoint)\n splitList.right = numList.splice(midpoint, numList.length)\n console.log(\"Splitting: \" + splitList.left + \",\" + splitList.right + \" into \" + splitList.left + \" and \" + splitList.right)\n return splitList\n}", "function group(people, property) {\n var result = {};\n\n for (person of people) {\n var groupProperty = person[property];\n\n if (!result.hasOwnProperty(groupProperty)) {\n result[groupProperty] = [];\n }\n result[groupProperty].push(person);\n }\n\n return result;\n}", "static filterList(objList, property, filterValue)\n\t{\n\t\tvar answer = [];\n\t\tfor (var objIndex = 0; objIndex < objList.length; objIndex++)\n\t\t{\n\t\t\tif (objList[objIndex][property + \"\"] == filterValue)\n\t\t\t{\n\t\t\t\tanswer.push(objList[objIndex]);\n\t\t\t}\n\t\t}\n\t\treturn answer;\n\t}", "function partitionBy(arr, pred) {\n let ret = arr.length ? [[arr[0]]] : [[]];\n let retidx = 0;\n for (let i = 1; i < arr.length; i++) {\n if (pred(arr[i], i, arr)) {\n ret.push([arr[i]]);\n retidx++;\n }\n else {\n ret[retidx].push(arr[i]);\n }\n }\n return ret;\n}", "function splitArrayByPrayerGroup(array) {\n var _groups = []\n array.forEach(function(element) {\n if (_groups.indexOf(element.prayergroup) == -1) {\n _groups.push(element.prayergroup)\n }\n });\n return _groups;\n }", "function partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n _.each(collection, function(value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}", "function partition(p, xs) {\n return xs.reduce(function (a, x) {\n return (\n a[p(x) ? 0 : 1].push(x),\n a\n );\n }, [[], []]);\n }", "function splitListItem(opts, editor) {\n const { value } = editor;\n const currentItem = getCurrentItem(opts, value);\n if (!currentItem) {\n return editor;\n }\n\n const splitOffset = value.startOffset;\n\n return editor.splitDescendantsByKey(\n currentItem.key,\n value.start.key,\n splitOffset\n );\n}", "function splitFilter(a, b, predicate) {\n var aOut = [];\n var bOut = [];\n\n for (var index = 0; index < a.length; index++) {\n if (predicate(a[index], index, a, b)) {\n aOut.push(a[index]);\n } else {\n bOut.push(a[index]);\n }\n }\n\n return [aOut, bOut];\n} // can be invoked on a style rule to subset its selectors (with reverse mirroring)", "function sublistByProperty(arr, spec) {\n\n spec = spec.slice(0),\n speccount = spec.length;\n var sublist = new Array(speccount);\n arr.forEach(function(arrayel) {\n var success = false;\n if(arrayel.used) {\n return false;\n }\n if(spec.length < 1)\n return false; // already done\n spec.forEach(function(specel, i) {\n if(success || !specel)\n return;\n if(Object.keys(specel).reduce(function(current, spkey) {\n if(typeof specel[spkey] === \"function\") {\n return current && specel[spkey](arrayel[spkey], arrayel, sublist);\n } else {\n return current && specel[spkey] === arrayel[spkey];\n }\n }, true)) {\n // spec matched. Remove it and mark success\n delete spec[i];\n speccount --;\n success = true;\n sublist[i] = arrayel;\n }\n });\n });\n if(speccount < 1) {\n return sublist;\n } else {\n return null;\n }\n }", "function partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n _.forEach(collection, function(value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}", "function partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n _.forEach(collection, function(value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}", "function partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n _.forEach(collection, function(value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}", "function partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n _.forEach(collection, function(value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}", "function processList(ilist) {\n let probj = {};\n let temp = \"\";\n for (let x of ilist) {\n let key = Object.keys(x)[0];\n if (temp === key) {\n if (!Array.isArray(probj[key])) {\n probj[key] = [Object.values(x)[0]];\n } else {\n probj[key].push(Object.values(x)[0]);\n }\n } else {\n probj[key] = [Object.values(x)[0]];\n temp = key;\n }\n }\n return probj;\n}", "function getSplitProposition(proposition) {\n const searchResults = /\\((.*)\\)/g.exec(proposition)\n const mainResult = searchResults[searchResults.length - 1]\n\n const resultParts = [\n ...new Set(\n new RegExp(\n `^((\\\\(.*\\\\))|(.*)) [${logicKeys}] ((\\\\(.*\\\\))|(.*))$`, 'g'\n )\n .exec(mainResult)\n .slice(1)\n )\n ].filter(x => x)\n\n return [mainResult, resultParts]\n}", "function partitionCustom(list, pivot) {\n let leftList = []; // the left side of pivots\n let rightList = []; // the right side of pivot\n let pivotList = [];\n let pivotVal = list[pivot]\n for (let i = 0; i < list.length; i++){\n if(list[i] < pivotVal) leftList.push(list[i])\n else if(list[i] > pivotVal) rightList.push(list[i])\n else pivotList.push(pivotVal);\n }\n return [leftList, rightList, pivotList]\n}", "function partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n lodash_1.forEach(collection, function(value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}", "function groupBy(eq, xs){\r\n if(!xs.length)\r\n return emptyListOf(xs);\r\n var a = uncons(xs),\r\n b = span(function(e){ return eq(x, e) }, xs);\r\n return cons(cons(a.head, b.ys), groupBy(eq, b.zs));\r\n}", "function groupBy(list, keyGetter) {\n const map = new Map();\n list.forEach((item) => {\n const key = keyGetter(item);\n let collection = map.get(key);\n if (!collection) {\n //map.set(key, [item]);\n map.set(key, item);\n } else {\n //collection.push(item);\n collection = item;\n }\n });\n return map;\n}", "splitOnVal(value){\r\n // As usual, let's check to see if the list is empty.\r\n if(this.isEmpty()) {\r\n console.log(\"There's no list to split.\");\r\n return false;\r\n }\r\n // Now we need to check if the head's value is the one we're trying to split from\r\n else if(this.head.value == value) {\r\n // If it is, then basically we clear the current list and return a new list\r\n // that contains everything that was in the current list.\r\n\r\n // Create the new list\r\n let newList = new SLList();\r\n // Set the new list's head to the current head (since it's the value we're looking for)\r\n newList.head = this.head;\r\n // Now, clear the current list\r\n this.head = null;\r\n // And return the new list.\r\n return newList;\r\n }\r\n else {\r\n\r\n // Let's start a runner\r\n let runner = this.head;\r\n // We want to keep moving the runner down the line \r\n while(runner.next != null) {\r\n // Let's check to see if the next node's value is the one we're trying to\r\n // split at. If it is, we'll create our new list and call it a day!\r\n if(runner.next.value == value){\r\n // Create the new list\r\n let newList = new SLList();\r\n // Set its head to the next node;\r\n newList.head = runner.next;\r\n // Set runner's .next to null to end the current list\r\n runner.next = null;\r\n // and return the new list!\r\n return newList;\r\n }\r\n // Otherwise, move runner down the line.\r\n runner = runner.next;\r\n }\r\n // If we've gotten this far, the value isn't in the list.\r\n console.log(\"Could not find a node with that value.\")\r\n return false;\r\n }\r\n }", "function partition(collection, fn) {\n\t var result = {\n\t lhs: [],\n\t rhs: []\n\t };\n\n\t _.forEach(collection, function (value) {\n\t if (fn(value)) {\n\t result.lhs.push(value);\n\t } else {\n\t result.rhs.push(value);\n\t }\n\t });\n\n\t return result;\n\t }", "function myPluck (array,property){\n let newArray = [];\n\n array.forEach((element) => newArray.push(element[property]));\n\n return newArray;\n}", "function pluck(array, property, list) {\n var list = [];\n for (i = 0; i < array.length; ++i) {\n list[i] = array[i][property];\n }\n\n return list;\n }", "function getPriceGroups(){\n\tlet result = _.groupBy(pizzaToppingPrices, (item) => {\n\t\t//this will return based on item passes in and value\n return Math.floor(item.price / 1.0) \n })\n\treturn result;\n}", "function split(list) {\n if (list && list.split) return list.split(\",\").map(item => item.trim());\n if (Array.isArray(list)) return list;\n return [];\n}", "function filter_list(l) {\n return l.reduce((a, b) => { if (typeof b === 'number') a.push(b); return a; }, []);\n}", "function groupBy(f, xs) {\n var keys = [], iter = xs[Symbol.iterator]();\n var acc = create(), cur = iter.next();\n while (!cur.done) {\n var k = f(cur.value), vs = tryFind(k, acc);\n if (vs == null) {\n keys.push(k);\n acc = add(k, [cur.value], acc);\n }\n else {\n vs.push(cur.value);\n }\n cur = iter.next();\n }\n return keys.map(function (k) { return [k, acc.get(k)]; });\n}", "function splitGroups(lines) {\n let result = [];\n let group = [];\n for (const line of lines) {\n if (line) {\n group.push(line);\n } else if (group.length) {\n result.push(group);\n group = [];\n }\n }\n\n if (group.length) {\n result.push(group);\n }\n\n return result;\n}", "function groupItemsByProperties(array, groupProperties) {\n\t\t\t\t\t\t return $q(function (resolve, reject) {\n\t\t\t\t\t\t\t\t var groupedArrays = groupBy(array, function (item) {\n\t\t\t\t\t\t\t\t\t\t return getGroupProperties(item, groupProperties);\n\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t resolve(groupedArrays);\n\t\t\t\t\t\t });\n\t\t\t\t\t }", "function splitProperty(line, delimiter) {\n var parts = [], last = 0, inBrackets = false;\n\n for (var i = 0; i < line.length; i++) {\n if (inBrackets) {\n if (line[i] === '>') {\n inBrackets = false;\n }\n } else if (line[i] === '<') {\n inBrackets = true;\n } else if (line.substr(i, delimiter.length) === delimiter) {\n parts.push(line.substr(last, i - last));\n i += delimiter.length - 1;\n last = i + 1;\n }\n }\n\n if (last < line.length) {\n parts.push(line.substr(last, line.length - last));\n }\n\n return parts;\n}", "function groupBy(arr, criteria) {\n var groups = [];\n for (var index = 0; index < arr.length; index++) {\n var person = arr[index];\n var personKeys = Object.keys(person);\n if(personKeys.indexOf(criteria) === -1) {\n console.log('The people have no such property as criteria you have entered!');\n return;\n }\n else {\n var groupKey = person[criteria];\n if(groups[groupKey] === undefined) {\n groups[groupKey] = new Array;\n }\n groups[groupKey].push(person);\n }\n }\n return groups;\n}", "function partitionArray(arr, conditionFn) {\n const truthy = [];\n const falsy = [];\n for (const item of arr) {\n (conditionFn(item) ? truthy : falsy).push(item);\n }\n return [truthy, falsy];\n}", "function partitionArray(arr, conditionFn) {\n const truthy = [];\n const falsy = [];\n for (const item of arr) {\n (conditionFn(item) ? truthy : falsy).push(item);\n }\n return [truthy, falsy];\n}", "function split(object, size) {\n var arr = [];\n var i = 0;\n angular.forEach(object, function (value, key) {\n var index = i++ % size;\n if (!arr[index]) {\n arr[index] = {};\n }\n arr[index][key] = value;\n });\n return arr;\n }", "function pluck(list, prop) {\n var coop = [];\n for (var i = 0; i < list.length; i += 1) {\n //access value with [] to avoid stringifying key property\n coop.push(list[i][prop])\n };\n \n return coop;\n}", "function groupBy(f) {\n return function(xs) {\n if (xs.length === 0) return [];\n var x0 = xs[0]; // :: a\n var active = [x0]; // :: Array a\n var result = [active]; // :: Array (Array a)\n for (var idx = 1; idx < xs.length; idx += 1) {\n var x = xs[idx];\n if (f (x0) (x)) active.push (x); else result.push (active = [x0 = x]);\n }\n return result;\n };\n }", "function _restructureInfoList(infoList, dataType){\n\t\t\tvar templateClass,\n\t\t\t\tresInfoList = new Array(),\n\t\t\t\tgetValHandle;\n\t\t\tswitch(dataType){\n\t\t\tcase WOE_Setting._WOEColumnType.numeric:\n\t\t\t\ttemplateClass = WOE_Setting._WOENumericNode;\n\t\t\t\tgetValHandle = function(item, attr){\n\t\t\t\t\treturn WOE_Operator.getValueFromGrid(item[attr]);//alpine.flow.WorkFlowVariableReplacer.replaceVariable(WOE_Operator.getValueFromGrid(item[attr]));\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase WOE_Setting._WOEColumnType.text:\n\t\t\t\ttemplateClass = WOE_Setting._WOENominalNode;\n\t\t\t\tgetValHandle = function(item, attr){\n\t\t\t\t\tif(attr == WOE_Setting._WOENominalNode.optionalVal){// check if optional values then just return it. Because it already a Array\n\t\t\t\t\t\treturn item[attr];\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn WOE_Operator.getValueFromGrid(item[attr]);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(var i = 0;i < infoList.length;i++){\n\t\t\t\tvar info = infoList[i],\n\t\t\t\t\tresInfo = {};\n\t\t\t\tfor(var fieldNameItem in templateClass){\n\t\t\t\t\tvar fieldName = templateClass[fieldNameItem];\n\t\t\t\t\tresInfo[fieldName] = getValHandle(info, fieldName);\n\t\t\t\t}\n\t\t\t\tresInfoList.push(resInfo);\n\t\t\t}\n\t\t\treturn resInfoList;\n\t\t}", "function groupPartition(partition) {\n if (partition.length == 0)\n return [];\n var i = 0, j = 0;\n var groups = [];\n while (i < partition.length) {\n for (j = i; j < partition.length; j++)\n if (partition[i] != partition[j])\n break;\n groups.push([partition[i], j - i]);\n i = j;\n }\n return groups;\n}", "function filter(list, predicate) {\n var new_list = [];\n for (var i = 0, len = list.length; i < len; i++) {\n if (predicate(list[i])) new_list.push(list[i]);\n }\n return new_list;\n}", "function listToStyles(parentId, list) {\n var styles = [];\n var newStyles = {};\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = item[0];\n var css = item[1];\n var media = item[2];\n var sourceMap = item[3];\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n };\n\n if (!newStyles[id]) {\n styles.push(newStyles[id] = {\n id: id,\n parts: [part]\n });\n } else {\n newStyles[id].parts.push(part);\n }\n }\n\n return styles;\n}", "function listToStyles(parentId, list) {\n var styles = [];\n var newStyles = {};\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = item[0];\n var css = item[1];\n var media = item[2];\n var sourceMap = item[3];\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n };\n\n if (!newStyles[id]) {\n styles.push(newStyles[id] = {\n id: id,\n parts: [part]\n });\n } else {\n newStyles[id].parts.push(part);\n }\n }\n\n return styles;\n}", "function listToArray(list) {\n var arr = [];\n \n for (var listLocation = list; listLocation; listLocation = listLocation.rest) {\n \tarr.push(listLocation.value);\n }\n\n return arr;\n}", "function sortByGroup(array ,group, property) {\n var unknownGroup = [],\n i, j,\n resultArray = [];\n for(i = 0; i < group.length; i++) {\n for(j = 0; j < array.length;j ++) {\n if(!array[j][property]) {\n unknownGroup.push(array[j]);\n } else if(array[j][property] === group[i]) {\n resultArray.push(array[j]);\n }\n }\n }\n\n resultArray = resultArray.concat(unknownGroup);\n\n return resultArray;\n}", "function listToStyles(parentId, list) {\n var styles = [];\n var newStyles = {};\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = item[0];\n var css = item[1];\n var media = item[2];\n var sourceMap = item[3];\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n };\n\n if (!newStyles[id]) {\n styles.push(newStyles[id] = {\n id: id,\n parts: [part]\n });\n } else {\n newStyles[id].parts.push(part);\n }\n }\n\n return styles;\n }", "separateByDiscNumber(tracks){\n let discCounter = 1;\n let separatedDiscs = [];\n separatedDiscs.push([]);\n tracks.forEach((item) => {\n if (discCounter < item.disc_number) {\n separatedDiscs.push([]);\n discCounter++;\n }\n separatedDiscs[discCounter - 1].push(item);\n });\n return separatedDiscs;\n }", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n }", "function split(arr){\n return [[].concat(...arr), arr.map(a => [a.length])];\n\n}", "function wrapListItems(groups) {\n return groups.map(group => {\n let firstEl = group[0];\n\n // If it's not a list item, it's fine as it is.\n if (firstEl.nodeName !== 'LI') return group;\n\n let wrapper = document.createElement(firstEl.dataset.liType);\n group.forEach(li => {\n delete li.dataset.liType; // Remove the temporary thing.\n wrapper.appendChild(li);\n });\n\n return [wrapper];\n });\n}", "function filtreParNombreDeProduit(list, nombreDeProduit) {\n let newList = [];\n list.forEach((value) => {\n if (value.total > nombreDeProduit) {\n newList.push(value);\n }\n });\n return newList;\n}", "function list(weirdlist) {\r\n\t\treturn Array.prototype.slice.call(weirdlist);\r\n\t}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}", "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}" ]
[ "0.5736494", "0.55942863", "0.55851495", "0.5567104", "0.5532998", "0.5500809", "0.5461137", "0.5460786", "0.53871804", "0.5371475", "0.535328", "0.5328581", "0.53005475", "0.5291793", "0.5284913", "0.5275434", "0.5275434", "0.5275434", "0.5275434", "0.5275434", "0.5272965", "0.5188106", "0.5181905", "0.5173742", "0.5130942", "0.51245165", "0.5113945", "0.51025295", "0.50978273", "0.5089894", "0.5076403", "0.50655925", "0.50510424", "0.50510424", "0.50510424", "0.50510424", "0.5025662", "0.5023161", "0.500025", "0.49639943", "0.4962075", "0.49582908", "0.4929535", "0.49219537", "0.49093196", "0.49089175", "0.48973802", "0.4879113", "0.4873405", "0.48538387", "0.48493075", "0.48416975", "0.48204207", "0.48169217", "0.48142853", "0.48142853", "0.48122945", "0.48090068", "0.4787059", "0.47847354", "0.47844446", "0.4761848", "0.47614983", "0.47614983", "0.4754118", "0.47499973", "0.47458467", "0.47445884", "0.4738506", "0.47351", "0.47321382", "0.47281408", "0.4723802", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308", "0.47181308" ]
0.7096044
0
that code calculates the area of a circle. If you want to reuse that code, or that calcuation, you can store it in a function. in order to create a function, we use the fucntion keyword, a unique name, and a pair of parentheses. Once created, we can reuse it whenever we want.
function sayHello() { console.log("Hello"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function computeAreaOfACircle(radius) {\n // your code here\n return Math.PI * radius**2;\n}", "function areaOfCircle(radius) {\r\n\r\n function square() {\r\n return radius * radius;\r\n }\r\n console.log(3.14 * square())\r\n}", "function calcArea(CircleRadius){\r\n\r\n\r\n\tvar CircArea = Math.PI * CircleRadius * CircleRadius;\r\n\talert(\"The area is \" + CircArea);\r\n\r\n}", "function circleArea(r){\n //calc area PI * r*r\n var area = Math.PI *r * r;\n //Return the value\n return area;\n\n}", "function circleArea(r){\n //calc area Pi * r * r\n var area = Math.PI * r * r;\n //Return the value\n return area;\n\n }", "function areaOfCircle(radius){\n area = Math.PI * Math.pow(radius, 2)\n return area\n}", "function areaCircle(radius){\n const pi = 3.14;\n return(pi*(radius**2));\n }", "function AreaOfSquareCircumscribedByCircle() {\n // Radius of a circle\n let r = 3;\n document.write(\" Area of square = \" + find_Area(r));\n\n // Function to find area of square\n function find_Area(r) {\n return (2 * r * r);\n }\n}", "function area(radius) {\n return pi * radius * radius;\n}", "function areaOfCircle(radnum){\n\n console.log(`The area for a circle with radius ${radnum} is ${3.14*radnum*2}`)\n return 3.14*radnum*2 \n\n}", "area() {\n return 4 * (3.14) * (this.radius**2)\n }", "function area(radius) {\r\n return (radius ** 2) * PI;\r\n}", "function calcArea(radius) {\n // circleArea = PI * r * r\n return \"The area is \" + Math.PI * radius * radius + \" cm^2\";\n }", "function circleArea(radius) {\n return radius * radius * PI;\n}", "function areaOfACircle(radius) {\n\tvar area = (radius*radius) * Math.PI; \n\tconsole.log(area);\n}", "function calculateArea(radius) {\n return Math.PI * radius * radius;\n}", "function areaOfCircle (radius){\n let area = Math.PI * (radius * radius);\n console.log(`The area for a circle with radius ${radius} is ${area}`);\n}", "function circleArea(radius) {\n return Math.PI * radius * radius\n}", "function calcArea(radius) {\n\tvar area = Math.PI * radius * radius;\n\talert(\"The area is \" + area);\n}", "function areaOfCircle(radius) {\n let area = MathPI * squareNumber (radius); \n console.log(`The area of circle ${areaOfCircle} with radius + radius + 'is' + area`);\n return area; \n \n}", "function calculateArea(radius) {\n var result = radius * radius * Math.PI;\n console.log(result);\n}", "function calcArea() {\n //Creates variables for width, height and area\n var width = 20;\n var height= 30\n var area = width*height;\n console.log('The area is '+area);\n}", "function areaOfCircle(num) {\n\tvar equation = Math.PI * (num * num);\n\tvar area = equation.toFixed(2);\n\tconsole.log('The area for a circle with a radius of ' + num + ' is ' + area);\n\treturn area;\n}", "function calcArea(){\n //Create variables for width, height, and area.\n var width=20;\n var height=30;\n var area=width*height;\n console.log(\"The are is \"+area);\n}", "function calcArea() {\n //create variables for the width, height and area\n var width =20\n var height=30\n var area= width*height\n console.log(\"The area is \"+area)\n}", "function areaOfCircle(radius) {\n return (Math.PI)*Math.pow(radius,2);\n}", "function areaOfCircle(radius){\n let r = Math.pow(radius, 2);\n return Math.PI*r;\n}", "function pizzaArea1(r){\n // radius of circle r*r*PI\n var area= Math.pow(r,2)*Math.PI;\n return area;\n}", "function areaOfCircle( radius ) {\n return multiply( Math.PI, square( radius ) );\n}", "function calcArea (){\n //Create variables for W,H,A\n\n var width=20;\n var height=30;\n var area=width*height;\n console.log(\"The area of the recatangle is \" + area + \"sq Feet\");\n}", "findArea() {\n console.log(\"The area of this circle is: \" + this.pi * (this.rayon * this.rayon));\n }", "function areaCircle(diameter){\n var radius = diameter / 2;\n\n return Math.PI *(radius * radius);\n}", "function areaofCircle(radius) {\n return Math.PI*radius^2;\n }", "function area_of_circle() {\n var radius=prompt(\"Enter the radius\");\n var area=3.14*radius*radius;\n document.write(\"area of circle is = \"+area);\n}", "function getCircleArea(radius){\n const area = (3.14 * radius * radius);\n console.log(\"Circle area:\", area); // in square meter\n}", "function area(r) {\n \n return r*r\n}", "function areaCircle (radius) {\n\tconsole.log(Math.PI * radius * 2)\n}", "function getAreaOfCircle (radius) {\n \tvar Area;\n \t//QUESTION: I tried using Math.pi, but I would get NaN in the Terminal. Why??\n \tArea = 3.14 * radius * radius;\n \tconsole.log(Area);\n \treturn Area;\n }", "function calcArea(){\n\n\n //create the variable\n\n var width = 20;\n var height = 30;\n var area= width*height;\n\n console.log(\"Your rectangle has an area of \"+area)\n\n }", "function circle(x) {\n return \"Area of Circle = \" + x * x * 3.14;\n}", "function areaCuadrado(lado){\n return lado*lado;\n}", "function calcArea(w,h) { // Parameters go here\n \n \n //var width = 10;\n //var height = 20;\n //var area = width * height;\n \n \n var area=w*h;\n \n console.log(\"The area is \"+area);\n \n\n}", "function areaOfCircle (radius) {\n\tvar area = Math.PI * radius * radius;\n\tconsole.log('4) The area for a circle with radius ' + radius + ' is ' + \n\t\tarea + ' or ' + area.toFixed(2) + ', rounded.');\n\treturn area;\n}", "function calcArea(){\n var width = 20;\n var height = 30;\n var area = width * height;\n console.log(area);\n}", "function area(a, b){\n return (a*b);\n}", "function circleArea(radius) {\n let area = Math.PI * (radius * radius);\n console.log(area);\n console.log(Math.round(area*100)/100);\n}", "function calcArea () {\n\tvar width = 20;\n\tvar height = 30;\n\tvar area = width * height;\n console.log(area);\n}", "function areaOfCircle(){\n var areaInput = document.getElementById('area-input').value;\n var areaOutput = (areaInput*2)*3.14;\n console.log('The area for the circle with radius '+ areaInput + \" is \" + areaOutput)\n alert('The area for the circle with radius '+ areaInput + \" is \" + areaOutput)\n}", "function computePerimeterOfACircle(radius) {\n // your code here\n return 2 * Math.PI * radius;\n}", "function calcArea(w, h){\n var area = w*h;\n //REturns a variable\n return area;\n}", "function areaOfCircle(radius) {\n if (typeof radius !== 'number') {\n throw {\n 'name': 'TypeError',\n 'message': 'Function requires ' +\n 'a single numeric argument'\n };\n }\n if (radius < 0) {\n throw {\n 'name': 'ValueError',\n 'message': 'Radius myst ' +\n ' be non-negative'\n };\n }\n return Math.PI * (radius * radius);\n}", "function areaOfCircle (radius) {\n let area = (Math.pow(radius, 2) * Math.PI).toFixed(2);\n let eleAreaOfCircle = document.querySelector(`#item9`)\n eleAreaOfCircle.textContent = `The area of a circle with a radius of ${radius} is ${area}`;\n console.log(`The area of a circle with the raidus ${radius} is ${area}`);\n return area;\n}", "function calcArea(w, h){ //( , ) Parameters \n\tvar area = w * h;\n\treturn area; //function is spitting the information out... and this happens where the function is envoked\n}", "function AreaOfCircle(radius) {\n var area = Math.PI * (radius * radius);\n return area.toFixed(0);\n}", "function circleAreaPure(radius, pi) {\n return radius * radius * pi;\n}", "function areaCuadrado(lado) {\n return lado * lado;\n}", "function Circle(rayon, name) {\n this.rayon = rayon; // recuperate the argument from the parameter set\n this.name = name;\n // this.pi = 3.14; // pi can go here but because it's a constant, we can make a prototype\n\n // method\n this.findArea = function () {\n console.log(\"area of this circle: \" + this.pi * (this.rayon * this.rayon));\n }\n \n }", "function Area(){\nvar diameter = document.getElementById(\"diameter\");\nvar radius = document.getElementById(\"radius\");\nvar diametervalue = +diameter.value;\nvar radiusvalue = +(diameter.value/2);\nvar result1 = ((diameter.value/2)*(diameter.value/2)*Math.PI);\nvar result2 = (diameter.value*Math.PI);\nvar divresult1 = document.getElementById(\"divresult1\");\nvar divresult2 = document.getElementById(\"divresult2\");\ndivresult1.innerHTML = result1;\ndivresult2.innerHTML = result2;\n}", "function calcArea(w,h){\n //var width = 10;\n //var height = 20;\n var area=w*h;\n console.log(\"The area is \"+ area);\n }", "function getRadius(area) {\n return Math.sqrt((9*area)/Math.PI);\n}", "function computeArea(width, height) {\n // your code here\n return width * height;\n}", "function circleCalculation (radius) {\n\t//calculate the area of the circle, given the radius, to the nearest whole number\n\tvar area = Math.round(Math.PI * Math.pow(radius, 2));\n\t//calculate the perimeter of the circle, given the radius, to the nearest whole number\n\tvar perimeter = Math.round(2 * Math.PI * radius);\n\t// Return the full sentence with the full values of the area and perimeter\n\tconsole.log(\"The area of the circle is\" + area + \"and the perimeter of the circle is\" + perimeter + \".\"\n);\n}", "function area(l,w,b) {\nvar Areax = l * w * b;\nconsole.log (Areax); \n}", "function calculateCircleValues(radius){\n var pi = Math.pi();\n\n var diameter = 2 * radius;\n var circumference = 2 * pi * radius \n var area = pi * (radius ** 2);\n console.log (\" The circle's diameter is: \" + diameter + \". The circle's circumference is \" + circumference + \". The circle's area is \" + area + \".\"); \n}", "function calcArea(w , h){\n\n //create var for height , width , and area\n\n //var width = 20;\n //var height = 10;\n //var are = height * width\n\n //create var area using parimeters\n var area = w*h;\n console.log(area)\n}", "function areaRectangulo(ancho, alto){\r\n let area = ancho*alto;\r\n alert(\"Area\" + area);\r\n}", "function areaCuadrado(lado) {\n return lado * lado;\n}", "function areaCuadrado(lado) {\n return lado * lado;\n}", "function areaCuadrado(lado) {\n return lado * lado;\n}", "function area(a, b, c){ \n\tvar s = (a + b + c) / 2;\n\treturn Math.sqrt(s * (s-a) * (s-b) * (s-c));\n}", "function calcArea(a, b, c){\n let s = (a + b + c)/2;\n let area = Math.sqrt(s*(s-a)*(s-b)*(s-c));\n console.log(area);\n }", "function areaCuadrado(lado) {\n return lado * lado;\n}", "function calculatesArea(a, b){\n let area = a * b\n return area\n}", "function calcArea(w,l){//parameters go here.\n //var width=10;\n //var length=20;\n //var area=width*length;\n\n var area=w*l;\n console.log(\"area of rectangle is \"+area);\n\n}", "function calcAreaP(width, height) {\n \n //calculation\n var area=width*height\n console.log(area);\n //It will not have a return\n}", "function calcArea(w,h){\n //calc area\n var area = w*h;\n console.log(\"Inside the function the area is \"+area);\n //Return the area to the main code\n return area;\n }", "function area (a){\n\tvar area= a*a\n\treturn \"area =\" +area\n}", "function calcArea (w,h){//parameters go here\n//hard coded values for width and height - not good\n\n //var width = 10;\n //var height = 20;\n //var area= width*height;\n\n var area = w*h;\n\n console.log(\"the area of your rectangle is \"+area)\n }", "function calcAreaP(width, height){\n //Calculation\n var area = width * height\n console.log(area);\n //it will not have a return\n \n}", "function area(length, width){\r\n let areaCalc = length * width;\r\n return areaCalc;\r\n}", "function geometrizer()\n{\n\tradius = 4;\n\tcircumference = 2 * 3.142 * radius;\n\tarea = 3.142 * Math.pow(radius,2)\n\n\talert(\"The circumference is \"+ circumference);\n\talert(\"The area is \" + area);\n}", "function calcArea(w,h){\n //Calculate area\n var area = w*h\nconsole.log(\"Inside the function the area is \"+area);\n //return the area to the main code.\n return area;\n}", "function calcAreaP(width, height){\n //calculations\n var area = width * height;\n console.log(area);\n //it will not have a return\n}", "function circleArea(r, width) {\n\t return r * r * Math.acos(1 - width / r) - (r - width) * Math.sqrt(width * (2 * r - width));\n\t}", "function calcAreaByRadius(radius){\n let area = Math.PI * radius ** 2;\n console.log(area);\n console.log(area.toFixed(2));\n }", "function Circle(options){\r\n this.radius = options.radius || 2; //default value\r\n this.getArea = function(){\r\n return Math.PI * Math.pow(this.radius,2);\r\n }\r\n}", "function calcAreaF(width, height){\n var area = width * height;\n return area;\n}", "function calcAreaF(width, height){\n var area = width * height;\n return area;\n}", "function circleArea(r, width) {\n return r * r * Math.acos(1 - width/r) - (r - width) * Math.sqrt(width * (2 * r - width));\n}", "function cirArea(r){\n //cal area Pi * R * R\n var area = Math.PI*r*r;\n //retruns the value\n return area;\n}", "function calcArea(r) {\r\n area = (Math.PI * Math.pow(r, 2));\r\n console.log(\"The Area Is: \" + Math.round(area)); \r\n}", "function Area() {\n}", "function calcArea(wid, len){\n\nvar area = wid*len;\n\n console.log(\"The area inside of function is \"+area);\n\n //Return the area variable to the main code\n return area;\n\n }", "function circleArea(r, width) {\n return r * r * Math.acos(1 - width / r) - (r - width) * Math.sqrt(width * (2 * r - width));\n }", "function calcArea(w,h){\n\n //calc area\n var area = w*h;\n console.log(\"Inside the function the area is \"+area);\n //retrun the are to the main code\n return area;\n\n}", "function areaCirculo (radio){\n \n return (radio*radio)*PI;\n}", "function areaCirculo(radio){\n return (radio*radio)*pi;\n}", "function areaCalculator(length, width) {\n let area = length * width;\n return area;\n}", "function calcArea(w, h){\n //Create variables\n //width = 10;\n //height = 20;\n //Calculate the area\n var area = w * h;\n\n //Console log the area.\n console.log(\"The area of a rectangle with a width of \"+ w + \" and a height of \"+ h + \" is \" +area);\n}", "function area(width, height) {\n return width * height;\n}", "function areaOfRectangle(a,b){\n return a*b;\n}" ]
[ "0.78759056", "0.7857781", "0.7792947", "0.778629", "0.7708014", "0.77007234", "0.7675718", "0.7675128", "0.7586368", "0.7565583", "0.7539107", "0.7517293", "0.75137484", "0.7509697", "0.7502098", "0.74985695", "0.7496695", "0.74707025", "0.7447507", "0.7416571", "0.7415434", "0.7393819", "0.7360813", "0.7336849", "0.73333895", "0.7329778", "0.73251045", "0.7308631", "0.73083514", "0.72831845", "0.7274809", "0.7258981", "0.72524816", "0.7236038", "0.7202904", "0.7187458", "0.7185573", "0.71706027", "0.7170152", "0.71635115", "0.7124465", "0.7111532", "0.70791954", "0.7078075", "0.70369506", "0.7033419", "0.70310074", "0.7020277", "0.7019576", "0.7005334", "0.6973949", "0.69531566", "0.69525605", "0.6944412", "0.6925277", "0.6924789", "0.6913642", "0.6910333", "0.6903808", "0.68942714", "0.68931633", "0.68901294", "0.68660253", "0.6849906", "0.6842593", "0.68360513", "0.6834206", "0.6834206", "0.6834206", "0.6832961", "0.6831719", "0.6815191", "0.68092227", "0.68067956", "0.6797796", "0.6794525", "0.67925376", "0.6771684", "0.6754664", "0.674051", "0.6739099", "0.673188", "0.6731823", "0.67294186", "0.67187244", "0.6715873", "0.67141724", "0.67141724", "0.6711612", "0.6690695", "0.6683416", "0.66808265", "0.66772", "0.667208", "0.66615546", "0.6655221", "0.66444564", "0.66431403", "0.6638799", "0.6637205", "0.6608638" ]
0.0
-1
Much like how we passed values to methods (like console.log()), we can do the same with functions if we include a parameter
function calculateArea(radius) { var result = radius * radius * Math.PI; console.log(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myFunction(paramOne, paramTwo) {\n console.log(paramOne)\n console.log(paramTwo)\n}", "function log(foo){\n\tconsole.log(foo);\n}", "function f ([ name, val ]) {\n console.log(name, val);\n}", "function myfun(param){\n console.log(param());\n}", "function a(test){\nconsole.log(test)\n}", "function a(test){\nconsole.log(test)\n}", "function log(a) {\n console.log(a); //outputs function(){console.log('hi)}\n a(); //outputs 'hi'\n}", "function say(a, b){ //we can also have inputs to functions\n\tconsole.log(a+b);\n}", "function logValue() {\n console.log('Hello, world!');\n}", "function a(test){\n\tconsole.log(test);\n}", "function a(test){\n\tconsole.log(test);\n}", "function logParameter(value) {\n console.log(`${value} evaluated`);\n return function (target, propertyKey, parameterIndex) {\n console.log(`${value} called`);\n };\n}", "function foo(a) {\n console.log( a + b );\n}", "function awesomeMethod(param) {\r\n\tconsole.log(param);\r\n}", "function sayHi(param) {\n console.log(\"hi \", param);\n param();\n}", "function logTheArgument(someFunction) {\r\n someFunction();\r\n}", "function myDoubleConsoleLog (param1, param2) {\n if(typeof param1 === \"function\"){\n console.log(param1());\n }\n if(typeof param2 === \"function\"){\n console.log(param2());\n }\n}", "function a(x) {\n console.log(x);\n}", "function testFun(param1, param2) {\n console.log(\"My name is \" + param1 + \" \" + param2 + \" !\");\n}", "function bar(param) {\r\n console.log(param);\r\n}", "function print(value){console.log(value)}", "function takesFunc(f){\n\tvar a = 1;\n\tvar b = 2;\n\tconsole.log(f(a,b));\n}", "function fn1(val) {\n console.log(1, val);\n}", "function myFunction (argument) {\n console.log(argument)\n}", "function printer(value){\r\n return value; // => example of a function that can optionally take arguments \r\n}", "function myfunction(x, y){\n console.log(x + \" \" + y);\n }", "function logger(...params){\n console.log(params);\n}", "function somma(a, b) {\n console.log(a + b);\n}", "function printSomething(thing) {\n console.log(thing);\n}", "function a(v1) {\n console.log('function a(v1) called : + ' +v1);\n}", "function log(a) {\n a();\n}", "function passingValueToParamDemo(a,b,c) {\n\treturn \"This got passed to me A \" + a + \" B \" + b + \" C \" + c;\n}", "function foo(a, b, c, d, e) {\n console.log(a);\n console.log(b);\n console.log(c);\n console.log(d);\n console.log(e);\n}", "function log(a) {\n a();\n}", "function Display(fn) {\r\n console.log(fn(23, 45));\r\n}", "function f(x,y,z){\n\tconsole.log(x);\n\tconsole.log(y);\n\tconsole.log(z);\n}", "function greet(firstName, lastName){\n console.log (\"Hello \" + firstName + \" \" + lastName); \n //Inside of the function we have no idea what value firstName and lastName have \n\n}", "function printValue(value) {\n console.log(value);\n}", "function functionWithArgs(x, y) {\n console.log(x + y)\n}", "function soSomething (x, y=4){\n console.log(x,y);\n}", "function doSomething(x, y) {\r\n console.log(x + ' ' + y);\r\n return x + y;\r\n}", "function cbf(a){\r\n console.log(a);\r\n}", "function logSomething(){\n console.log(arguments)\n}", "function logResultOf(fx, arg) {\n console.log(fx.call(null, arg));\n}", "function print(value){ // => the word value here is a parameter/placeholder/passenger\r\n console.log(value);\r\n }", "function p(x) {\n console.log(x);\n}", "function functionWithArgs(a,b){\n console.log(a+b);\n }", "function doSomething(a, b, c) {\n console.log('a is ' + a)\n console.log('b is ' + b)\n console.log('c is ' + c)\n}", "function print(value) {\n console.log(value)\n}", "function logSomething(log) { log.info('something'); }", "function f(a, b, c, d) {\n console.log(a);\n console.log(b);\n console.log(c);\n console.log(d);\n}", "function a(x, y, z) {\n console.log(x);\n console.log(y);\n console.log(z);\n}", "function greet(name, lastName) {\n console.log('Hello ' + name + ' ' + lastName);\n}//parameter", "function parameterFunc(num){\n console.log(num);\n}", "function logit(obj){ console.log(obj);}", "function functionWithArgs (param1, param2) {\n console.log (param1 + param2);\n}", "function parameterFunc(num) {\n console.log(num);\n}", "function parameterFunc(num) {\n console.log(num);\n}", "function functionWithArgs(param1, param2) {\n console.log(param1 + param2);\n}", "function cl(arg){\r\n console.log(arg);\r\n}", "function parameterFunc (num) {\n console.log(num);\n}", "function exampleDef(a = 5, b = 10, c = 15) {\r\n console.log(`a=${a}, b=${b}, c=${c}`);\r\n}", "function functionWithArgs(a, b) {\n\tconsole.log(a + b);\n}", "function myFunction(kris) {\n // kris\n console.log('parameter value:', kris);\n}", "function hello(param) {\n console.log(\"Hi \", param);\n return param;\n}", "function functionWithArgs(a, b){\n console.log(a+b)\n}", "function say(x) {\n\tconsole.log(x);\n}", "function argFunction(value = 'test') {\n console.log(value)\n}", "function theFunction(name, profession) {\n console.log(\"My name is \" + name + \" and I am a \" + profession + \".\");\n}", "function a(b){\n return b*4;\n console.log(b);\n}", "function parameterUnderstanding(gotParam) {\n\tconsole.log(\"Stored in gotParam in function: \"+gotParam)\n}", "function functionWithArgs (para1, para2) {\nconsole.log(para1 + para2);\n}", "function functionWithArgs(a, b){\n console.log(a + b);\n}", "function bar(x, y, z) {\n console.log(`x: ${x}, y: ${y}, z: ${z}`)\n}", "function test(parameterObject, parameterArray, parameterBoolean) {\n return console.log(\"test\");\n}", "function greet(text, value, value2) {\n console.log(text);\n console.log(value);\n console.log(value2);\n}", "function example4() {\n\n var me = {\n name: \"Vlad\",\n surname: \"Argentum\"\n };\n\n function hi(_ref) {\n var _ref$name = _ref.name;\n var name = _ref$name === undefined ? \"Guest\" : _ref$name;\n var _ref$surname = _ref.surname;\n var s = _ref$surname === undefined ? \"Anon\" : _ref$surname;\n\n console.log(\"Hi, \" + name + \" \" + s);\n }\n\n hi({}); //Guest Anon\n hi(me); //Vlad Argentum\n\n //even can call without params\n function hi() {\n var _ref2 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var _ref2$name = _ref2.name;\n var name = _ref2$name === undefined ? \"No\" : _ref2$name;\n var _ref2$surname = _ref2.surname;\n var s = _ref2$surname === undefined ? \"Params\" : _ref2$surname;\n\n console.log(\"Hi, \" + name + \" \" + s);\n }\n hi(); //No Params\n}", "function debugPrint(...params) {\n console.log(params);\n}", "function cal(x,y){\n console.log(x+y)\n}", "function function2(parameter) {\n\tconsole.log(\"I am with parameter function and value of parameter is \"+parameter);\n}", "function a(b){\n return b*4;\n console.log(b);\n }", "function functionWithArgs(a, b) {\n console.log(a+b);\n}", "function functionWithArgs(a, b) {\n console.log(a+b);\n}", "function functionWithArgs(a, b) {\n console.log(a + b);\n}", "function functionWithArgs(a, b) {\n console.log(a + b);\n}", "function myFunction (w,x,y,z){\n console.log(w,x,y,z);\n}", "function add(a,b){\n console.log(a+b);\n}", "function add(a,b){\n console.log(a+b);\n}", "function test_param(name, age, gender) {\n console.log(name);\n console.log(age);\n console.log(gender);\n}", "function foo([x, y]) {\n console.log(x, y);\n}", "function example1() {\n\n function hi() {\n var name = arguments.length <= 0 || arguments[0] === undefined ? \"Guest\" : arguments[0];\n\n console.log(\"Hello, \" + name);\n }\n\n hi(); // Hello, Guest\n hi('Vlad'); // Hello, Vlad\n}", "function hola (sergio){\n console.log(\"Como estas\" + \" \" + sergio)\n}", "function myFunction(name){\n console.log(\"name\", name);\n}", "function MiFuncion(x, y){\n console.log(x + y)\n}", "function logParams(a, b, c) {\n console.log(a, b, c);\n}", "function normalFunction(normalFunctionparameters) {\n console.log(normalFunctionparameters);\n}", "function a(b){\n    console.log(b);\n return b*3;\n}", "function l(x) {\n console.log(x);\n}", "function logGreeting(fn){\n console.log(\"This one is from a function passed into another function:\");\n fn();\n}", "function a(b){\n console.log(b);\n return b*3;\n}", "function add(a,b) {\n console.log(a+b)\n}" ]
[ "0.70102", "0.6993688", "0.6991233", "0.6968121", "0.6944141", "0.6944141", "0.68953323", "0.68839353", "0.6883921", "0.68739927", "0.68739927", "0.6848996", "0.6830609", "0.682659", "0.6823787", "0.68170494", "0.68160105", "0.68063474", "0.67824453", "0.6777071", "0.6768093", "0.67492175", "0.6666415", "0.6648104", "0.66090226", "0.66043854", "0.660104", "0.65973914", "0.65970254", "0.65954494", "0.656406", "0.65579003", "0.65568244", "0.65515554", "0.65455735", "0.6544068", "0.65421945", "0.6528452", "0.651781", "0.6516079", "0.651097", "0.65067375", "0.6486543", "0.6475211", "0.6466221", "0.6458209", "0.64404786", "0.64389646", "0.6422869", "0.64218074", "0.6409332", "0.6408017", "0.63956857", "0.6394649", "0.6393674", "0.6383569", "0.63833606", "0.63833606", "0.6382542", "0.6377301", "0.6375073", "0.63721156", "0.63571197", "0.6354306", "0.6346925", "0.6346101", "0.6342149", "0.6334902", "0.6328487", "0.6320285", "0.63195926", "0.63156074", "0.63104665", "0.6299928", "0.6283707", "0.6279254", "0.62668246", "0.6263087", "0.6254538", "0.62483096", "0.6246447", "0.6246183", "0.6246183", "0.62434256", "0.62434256", "0.62401325", "0.62393343", "0.62393343", "0.62300026", "0.621797", "0.62148774", "0.62129074", "0.6200569", "0.61997557", "0.6198715", "0.61959887", "0.6193869", "0.61911833", "0.6189064", "0.6186598", "0.61743945" ]
0.0
-1
Parameters are temporary variables that we define in the parentheses after the function name and use to access values that we pass to the function. we can also create functions with multiple parameters. in the function definition, we simply separate them with commas
function insert(array, value, index) { array.splice(index, 0, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paraArguments(parameterOne, parameterTwo) {//function declared, with two parameters.\n return parameterOne + parameterTwo + 'argument!'; //body of function.\n}", "function functionStructure(parameterOne, parameterTwo, parameterThree) { //function declaration syntax.\n //body of prescribed code here.\n}", "function functionName (parameter1, parameter2) {\n // do something;\n}", "function myFunction(paramOne, paramTwo) {\n console.log(paramOne)\n console.log(paramTwo)\n}", "function name(parameters) {\n // function body\n}", "function myFunction(a, b) {\n var myFunction = (a,b); {\n\n }\n console.log(myFunction)\n\n }", "function myFunction(x, y, z) { }", "function functionName(parameter1, parameter2, parameter3) {\n this.parameter1 = parameter1;\n this.parameter2 = parameter2;\n this.parameter3 = parameter3;\n}", "function example(fruit) {\r\n // function name\r\n // params (a.k.a. \"function signature\" -- this is where you name your params\r\n} // function body", "function greet(name, lastName) {\n console.log('Hello ' + name + ' ' + lastName);\n}//parameter", "function normalFunction(normalFunctionparameters) {\n console.log(normalFunctionparameters);\n}", "function myFunction(parameterOne, parameterTwo) {\n\t// function body\n}", "function customFunction ( Parameters ) {\n // Statements using Parameters\n // returen the result\n}", "function functionName(arguments) {\n //code here\n}", "function function3(parameter1, parameter2) {\n\tconsole.log(\"I am 2 parameter function and here are the values of both parameters are \\n\");\n}", "function func(a, b, c, d){}", "function f(x, y, z) {\r\n // ...\r\n}", "function newFunction2(name='Alice', age=32, country='MX'){\n console.log(name, age, country);\n}", "function functionWithArgs(a,b){\n console.log(a+b);\n }", "function newFunction(param1, param2) { //param1 and param2 are the parameters or placeholders\n return param1 + param2; // returns 9\n }", "function blau(a,b,...params){\n return params;\n}", "function a(x, y, z) {\n}", "function nuevaFuncion(nombre = \"Tomas\", edad = \"21\", ciudad = \"Linares\")\n{\n console.log(nombre, edad, ciudad)\n}", "function abc (a, b, bla ){\n return bla(a,b)\n }", "function test_param(name, age, gender) {\n console.log(name);\n console.log(age);\n console.log(gender);\n}", "function newFunction2(name = 'oscar', age = '32', country = 'CO' ){\n console.log(name, age, country);\n}", "function exampleDef(a = 5, b = 10, c = 15) {\r\n console.log(`a=${a}, b=${b}, c=${c}`);\r\n}", "function function_a(a, b, c) {\r\n return 42;\r\n}", "function exampleFunc(a, b) { // a & b are parameters, local function variables\n return a + b; // code the function runs\n }", "function funcao({first_name, last_name}) {\n console.log(first_name);\n console.log(last_name);\n}", "function Hello(parameter1, parameter2, parameter3) {\n // code to be executed\n}", "function newFuction2(name = 'cristian',age = '26',country = 'COL'){\n console.log(name,age,country);\n}", "function functionWithArgs(a, b){\n console.log(a+b)\n}", "function foo(a, b, c, d, e) {\n console.log(a);\n console.log(b);\n console.log(c);\n console.log(d);\n console.log(e);\n}", "function myfunction(x, y){\n console.log(x + \" \" + y);\n }", "function functionWithArgs (para1, para2) {\nconsole.log(para1 + para2);\n}", "function a(x, y, z) {\n console.log(x);\n console.log(y);\n console.log(z);\n}", "function testFun(param1, param2) {\n console.log(\"My name is \" + param1 + \" \" + param2 + \" !\");\n}", "function myFunction(a, b){\n return a + b;\n}", "function f(x,y,z){\n\tconsole.log(x);\n\tconsole.log(y);\n\tconsole.log(z);\n}", "function newFunction2(name = 'oscar', age = 32, country = \"MX\") {\n console.log(name, age, country);\n}", "function newFunction2(name = 'oscar', age = 23, country = 'colombia') {\n console.log(name, age, country);\n}", "function example(param1, opt_param2, var_args){\n\t\n}", "function functionWithArgs(a, b){\n console.log(a + b);\n}", "function foo({name, age}){\n\tconsole.log(`${name} is ${age} years old!`);\n}", "function funcWithALotOfParams(param1, param2, param3, param4) {\n\treturn param1 + ' ' + param2 + ' ' + param3 + ' ' + param4;\n}", "function f(a, b, c, d) {\n console.log(a);\n console.log(b);\n console.log(c);\n console.log(d);\n}", "function myFunction(a,b)\n{\n return a+b;\n}", "function functionWithArgs(a, b) {\n console.log(a+b);\n}", "function functionWithArgs(a, b) {\n console.log(a+b);\n}", "function myFunction({ first, second, third}) {\r\n return [first, second, third];\r\n }", "function myFunction(x, y, z) {\n return x + y + z;\n}", "function boo({first=\"10\", second=\"true\"}) {\n\n}", "function functionWithArgs(x, y) {\n console.log(x + y)\n}", "function functionWithArgs(a, b) {\n console.log(a + b);\n}", "function functionWithArgs(a, b) {\n console.log(a + b);\n}", "function functionName(zeroOrMoreArguments) {\n // function body\n}", "function takesFunc(f){\n\tvar a = 1;\n\tvar b = 2;\n\tconsole.log(f(a,b));\n}", "function functionName([a, b, c=3]) {\n console.log(a, b, c);\n}", "function withParams(numOne, numTwo, numThree, numFour){ // function named withParams that has four parameters\n var myTotal = numOne + numTwo + numThree + numFour; // declare a variable named myTotal and assign the four parameters to it\n document.write(\"<br>\"+ myTotal+\"<br>\"); //print the value of myTotal\n}", "function example2 () {\n\n let sum = (a, b) => a + b\n \n function strParse (strings, ...params) {\n console.log(strings);\n console.log(strings.raw);\n console.log(params);\n }\n\n let a = 'test'\n let b = 13\n\n let s = strParse`Some ${a}\n string with another param ${b}\n and sum of 5 and 4, that is ${sum(5,4)}`\n}", "function hello(name) {\n console.log(\"Hello \" + name + \"!\"); // function with arguments\n}", "function foo({\n x,\n y\n}) {\n console.log(x, y);\n}", "function fun1( /*parametros opcionais*/ ){ /*retorno opcional*/ }", "function foo(bar1,bar2,bar3){\n return bar1 + bar2 + bar3\n}", "function e(b, c) {\n /* .. */\n}", "function functionWithArgs(param1, param2) {\n console.log(param1 + param2);\n}", "function greet(fname, lname) //parameters of 'greet' function\n{\n\n console.log('Hello ' + fname + \" \" + lname + \" !!\"); //concatenation of 2 strings\n\n}", "function something(greet, name) {\n function sayHi() {\n console.log(greet, name); // console.log(greet + ' ' + name)\n }\n\n sayHi();\n}", "function testFunction(test1 , test2);{\nconsole.log(test1);\nconsole.log(test2);\nreturn test1 + test2;\n}", "function f(...[a,b,c]){\r\n return a+b+c;\r\n}", "function functionWithArgs(a, b) {\n\tconsole.log(a + b);\n}", "function h([a, b, c]) {\n \n}", "function myFunction(x, y) {\r\n return x + y; \r\n}", "function twoParams(a, b){\n return a*b;\n}", "function myFunction (w,x,y,z){\n console.log(w,x,y,z);\n}", "function es1(params) {\n \n}", "function \n//declare a function\nfunction sum()\n//need parentheses for your parameters\nfunction sum(num1, num2) {}", "function foo([x, y]) {\n console.log(x, y);\n}", "function myFunc(...[x, y, z]) {\n return console.log(x * y * z);\n }", "function potato(sweet, idaho){\n //does stuff\n}", "function a(b,c){\n return b*c;\n}", "function a(b,c){\n return b*c;\n}", "function a(b,c){\n return b*c;\n}", "function sayHiTo(first) {\r\n return `hello ${first}`; // without passing parameters error\r\n}", "function someFunction([x1], number) {\n console.log(x1)\n}", "function myOwnFunctionName( param1, param2, param3, param4 ) {\n let result = param1 + param2; // for example!\n // a block of code\n return result;\n}", "function demo_3() {\n\tlet squareFunc1 = ( x ) => { return x * x };\n\t\t//or\n\tlet squareFunc2 = ( x ) => x * x;\n\t\t//or\n\t// Note: if there is only one input argument, the paranthesis can be ignored\t\n\tlet squareFunc3 = x => x * x;\n\n\tconsole.log(\"squareFunc1(3):\", squareFunc1(3));\n\tconsole.log(\"squareFunc2(3):\", squareFunc2(3));\n\tconsole.log(\"squareFunc3(3):\", squareFunc3(3));\n}", "function addFunction(a,b,c){\n return a + b + c;\n}", "function newFunction(name, age, country) {\n\tvar name = name || 'Armando';\n\tvar age = age || 22;\n\tvar country = country || 'MX';\n\tconsole.log(name, age, country); \n}", "function myOwnFunctionName( parameters ) {\n // a block of code\n}", "function functionWithArgs (param1, param2) {\n console.log (param1 + param2);\n}", "function foo( [ x, y ] ) {\n\tconsole.log( x, y );\n}", "function hello2(name, age) {\n console.log('Hello ' + name + ' you are ' + age + ' years old')\n}", "function example1() {\n\n function hi() {\n var name = arguments.length <= 0 || arguments[0] === undefined ? \"Guest\" : arguments[0];\n\n console.log(\"Hello, \" + name);\n }\n\n hi(); // Hello, Guest\n hi('Vlad'); // Hello, Vlad\n}", "function nameOfFunction(paramater) {\n //body of our code\n}", "function foo( {name , car, color} ) {\n c(name)\n c(color)\n // c(arguments[0])\n}", "funcArguments () {\n let args = [];\n let ch = this.next('(');\n\n while (ch) {\n ch = this.white();\n if (ch === ')') {\n this.next(')');\n return new Arguments(this, args)\n } else {\n args.push(this.expression());\n ch = this.white();\n }\n if (ch !== ')') { this.next(','); }\n }\n\n this.error('Bad arguments to function');\n }", "function theFunction(name, profession) {\n console.log(\"My name is \" + name + \" and I am a \" + profession + \".\");\n}", "function doSomething(a, b, c) {\n console.log('a is ' + a)\n console.log('b is ' + b)\n console.log('c is ' + c)\n}", "function add(a=10 , b = 20 ){\r\n\treturn a+b;\r\n}" ]
[ "0.70252794", "0.6892633", "0.6853644", "0.6838942", "0.6805797", "0.68047243", "0.67894596", "0.6785696", "0.67538816", "0.669484", "0.667844", "0.6659361", "0.66586256", "0.66089875", "0.6608813", "0.6601839", "0.65996045", "0.65868634", "0.6552125", "0.6549009", "0.654228", "0.65284", "0.65021026", "0.6473297", "0.6473296", "0.6467526", "0.6455991", "0.6440662", "0.6436212", "0.64362", "0.64299554", "0.6421286", "0.6419381", "0.64142406", "0.64065325", "0.6383947", "0.6383337", "0.63744444", "0.63711435", "0.63703185", "0.6368658", "0.63573617", "0.63492846", "0.6335627", "0.63233423", "0.6317458", "0.6305452", "0.6301645", "0.6291198", "0.6291198", "0.62860656", "0.6268936", "0.625693", "0.6226126", "0.6222272", "0.6222272", "0.6220466", "0.62196714", "0.62069017", "0.6206481", "0.62057775", "0.61996156", "0.6199213", "0.61674803", "0.61650026", "0.6164818", "0.61558604", "0.61457896", "0.61358416", "0.6134055", "0.61248946", "0.60900635", "0.60831785", "0.607586", "0.60654056", "0.6054468", "0.6051492", "0.6050268", "0.60479456", "0.6046936", "0.60445255", "0.6030153", "0.6030153", "0.6030153", "0.60285366", "0.60276866", "0.60256153", "0.60153073", "0.60114586", "0.5996336", "0.59937304", "0.5986684", "0.5985731", "0.59827137", "0.5982228", "0.5981495", "0.5979751", "0.5950163", "0.59497666", "0.59484404", "0.5947447" ]
0.0
-1
just like many method return values, we can have a function give back a value by putting a return keyword befroe the value we want to return
function calculateA(radius) { var result = radius * radius * Math.PI; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dummyReturn(){\n}", "function returnFunction() {\r\n // return 1+1; // will return undefined.\r\n return 1+1;\r\n}", "function returnTwo() {\n\treturn 2;\n}", "function DefaultReturnValue() {}", "function returnTwo() {\n return 2\n}", "function returnSomething(value){\n\t\tconsole.log('c');\n\t\treturn value;\n\t}", "function returnType(arg) {\n return arg;\n}", "function returnTwo() {\n return 2;\n }", "function return5(){\n\treturn 5;\n}", "function returnArg(arg) {\n return arg;\n}", "function noReturn() {}", "function return4 () {\n return 4;\n}", "function returnHi() {\n return \"Hi!\";\n}", "function $return(value) {\n return function() { return value }\n}", "function returnArg() {\n\treturn arg;\n}", "function sayHi() {\n console.log(`hi`)\n return 10\n}", "function FuncionReturn(num1,num2){\n return num1 + num2;\n}", "function ReturnValue(type, value){\n this.type = type\n this.value = value\n}", "function ReturnValue(type, value){\n this.type = type\n this.value = value\n}", "function sayHello() {\r\n // return 'Hello, '; // <-- Normal way of return\r\n\r\n // Also functions can be returned by another function\r\n // - We can do that, because we treated functions in JS as a value:\r\n return function () {\r\n return 'Hello';\r\n }\r\n}", "function returndemo(){\n\n return \"Hello!!!\";\n\n}", "function returnHi() {\n return 'Hi!';\n}", "function f(x) {\n //returning result\n return x;\n}", "function functionOne() {\n console.log('yo');\n\n //js always wants to return something\n return 'yo';\n}", "function msgar() {\r\n return \"Hellw this is return value function\"; \r\n}", "function myFun() {\n console.log(\"Hello\");\n return \"world\";\n console.log(\"byebye\");\n}", "function functionName(a){\nconsole.log(a);\nreturn(a);\n}", "function parserReturn(value){\r\n return function(scope, state, k){\r\n return k({ast: value, success: true});\r\n };\r\n}", "function doSomething(arg) {\n // do something\n return arg;\n}", "function doSomething(arg) {\n // do something\n return arg;\n}", "function test() {\n console.log('Hi Roman');\n return 'return'; \n}", "function emptyReturn() {return;}", "function one(){\n\n return 'ONE';\n\n // Nothing after 'return' gets executed\n console.log('THIS WILL NOT WORK!');\n\n}", "function abc() {\n return 100;\n}", "function printVal(value) {\n console.log(value);\n // return 1; // error\n}", "async function simpleReturn() {\n return 1;\n}", "function myFunction() {\n console.log('inside', 123);\n return 123;\n}", "function $return_val(arg) {\n return function() {\n return arg;\n }\n }", "function returnFun(x, y) {\n // return 2, 5 returns 5 because return must only have one value\n return [x, y];\n \n}", "function returnsWhatIsAsked() {\r\n return 10;\r\n}", "function noResult(arg1, arg2){\r\n result = arg1 + arg2\r\n //we omit the return here\r\n}", "function printReturn(num1,num2){\n console.log(num1);\n return(num2)\n}", "static returnStatement(value) {\r\n return (writer) => {\r\n writer.write(\"return \");\r\n writer.withHangingIndentationUnlessBlock(() => {\r\n writeValue(writer, value);\r\n writer.write(\";\");\r\n });\r\n };\r\n }", "function doSomething (){\n\n return 'yeah!';\n}", "function sum(a, b) {\n var c = a + b;\n //The return statement. A function always returns a value. If it doesn't return value explicitly, \n //it implicitly returns the value undefined.\n return c;\n}", "function testFunction() {\n return 1;\n }", "function add(num1, num2){\n console.log(num1 + num2);\n return // undefined as nothing is returnd\n}", "function a() {\n return 5\n}", "function add(a,b) {\n\treturn a + b; //return value from a function, using \"return\" keyword\n}", "function whenShouldIReturn1(val) {\n var tmp;\n if (val == \"foo\") {\n tmp = \"That's a foo brah...\";\n } else if (val === \"bar\") {\n tmp = \"That's a bar brah...\";\n } else {\n tmp = \"That's a something else brah...\";\n }\n return tmp;\n}", "function two() {\r\n console.log('work 2');\r\n return 54;\r\n}", "function functionName(){\n// (4)\n return value;\n}", "function doTheThing() {\n return \"yasssss\";\n}", "function returnTwo() {\n return 2; // otherwise it should rather just be a constant.\n}", "function test4(num1, num2) {\n return num2; //num2 will be returned only and next return will not be returned because once the function identifies the first return statement the execution of the function stops.\n return num1 * num2;\n}", "function sayHello() {\n console.log('hello'); // no return\n}", "function foo() {\n return 2;\n }", "function returned() {\n console.log(\"The king hath returned from the hunt!\");\n}", "function functionName() {\n// (4)\n return value\n}", "function functionName() {\n// (4)\n return value\n}", "function foo() {\n return;\n}", "function _returnValue()\t\t\t\t\n\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\tvar value = rtnValue.getValue();\n\t\t\t//var format = typeof(value);\n\t\t\t\n\t\t\tvar msg = rtnValue.get('syntaxError');\n\t\t\tif (msg)\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\trtnValue.setFail();\n\t\t\t\trtnValue.addMessage(msg);\n\t\t\t\t\t\t\t\t\t\t\t\t//set msg and value to syntaxError message\n\t\t\t\tmsg = value = JSON.plusV3.toScript(msg.join('\\n'));\n\t\t\t\t\n\t\t\t\tif (json instanceof Object)\t\t//determine expected returnFormat\n\t\t\t\t\tjson = json instanceof Array ? '[' : '{';\n\t\t\t\t\t\n\t\t\t\tif (typeof(json) != 'string')\t//return String if json String or undefined\n\t\t\t\t\tvoid(0)\n\t\n\t\t\t\telse if (json.substr(0,1) == '{' || json.substr(-1) == ']}')\n\t\t\t\t{\t\t\t\t\t\t\t\t//for expected Object, return Object with message key\n\t\t\t\t\tvalue = {message: value}\n\t\t\t\t}\n\t\t\t\telse if (json.substr(0,1) == '[' && json.substr(-1) == ']')\n\t\t\t\t{\t\t\t\t\t\t\t\t//for expected Array, return empty Array also\n\t\t\t\t\tvalue = [];\t\t\t\t\t//with named property key: message\n\t\t\t\t\tvalue.message = msg;\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t//if (rtnValue.get('objname'))\t\t//if objName/variable specified, set to rtnValue\n\t\t\t//\teval('\"' + rtnValue.get('objname') + '=' + value + '\"');\n\t\t\t\n\t\t\treturn rtnValue.save(value)\n\t\t}", "function returnsHandler(value) {\n return function() {\n return respond.json(value);\n };\n }", "function square(x) { return x*x; } // A function that has a return statement", "function returnFunc(arg) {\n return function () {\n return arg;\n };\n}", "function add(num1, num2){\n console.log(num1+num2);\n return ; // <--- ki return korbe bola nai\n}", "function a() {\n console.log('hello');\n return 15;\n}", "function two() {\n console.log('two');\n return 2;\n}", "function Te(){var e=null;\n// 'return' followed by a space and an identifier is very common.\n// 'return' followed by a space and an identifier is very common.\nreturn G(\"return\"),mt.inFunctionBody||q({},rt.IllegalReturn),32===at.charCodeAt(lt)&&s(at.charCodeAt(lt+1))?(e=ge(),H(),pt.createReturnStatement(e)):U()?pt.createReturnStatement(null):(Z(\";\")||Z(\"}\")||dt.type===Xe.EOF||(e=ge()),H(),pt.createReturnStatement(e))}", "function value() { }", "function returnObject()\n{\n if(someTrueThing)\n {\n return // <- Here will be introduce the automatically semi-colon\n {\n hi: 'hello'\n }\n }\n}", "ret() {\r\n return 0x00EE;\r\n }", "function test() {\n return 1;\n }", "function foo() {\n return 2;\n}", "function name1(param1) {\n return \"returning \" + param1;\n}", "function dataReturn (returnValue, result) {\n\t\tif (returnValue === 0) return result;\n\t\tthrow new Error('FALCON error: ' + returnValue);\n\t}", "function square(num) {\n num *= num; // function is without return;\n}", "function voidFunction() {\n // i don't return a value\n // return 10; // error TS2322: Type '10' is not assignable to type 'void'\n}", "function returnGreet() {\n return function sayGoodNight() {\n return \"Good Night!!\";\n };\n}", "function returnFun(x, y) {\n // return x, y returns 5 because return must only have one value\n return [x, y]\n}", "function a1(){\n\treturn 1;\n}", "function func1(){ // Em funções normais, não se pode omitir seus blocos, denotados por chaves. Apenas em arrow-functions.\r\n \r\n // O retorno de valor é facultativo. Caso você não ponha, ele retornará 'undefined'.\r\n }", "function foo1()\n{\n return {\n bar: \"hello\"\n };\n}", "function foo1()\n{\n return {\n bar: \"hello\"\n };\n}", "function bridgeReturnSimpleValue() { \n //Save and send the data\n if(BRIDGE.callback) {\n var value = BRIDGE.returnObj.getAttribute(\"return\");\n if (value) {\n //Parse the value by type\n if (value.length > 1 && value.charAt(0) == \"0\") {\n //Do nothing, leave number with leading zeros alone\n } else if(value*1 == value) { //Int\n value *= 1;\n } else {\n switch( value.toUpperCase() ) {\n //Boolean\n case \"FALSE\": value = false; break;\n case \"TRUE\": value = true; break;\n }\n }\n }\n BRIDGE.callback(value);\n BRIDGE.callback = null;\n }\n }", "function greetReturn(name,age) {\n var greeting = 'Hello ' + name + ' You Are ' + age + ' Years Old!';\n return greeting;\n}", "function foo() {\n return 2;\n}", "get theAnswer() { return 42; }", "function foo() {\r\n return 100;\r\n}", "function returnObjectValue(obval){\n\t\tconsole.log('d');\n\t\treturn obval;\t\t\n\t}", "function doSomething(){\n console.log( 'in doSomething' );\n return 'thingy';\n} // end basic function", "function test(){\n return a;\n}", "function valt() {\n return function() {\n return true;\n }\n}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function returnTrue() {\n\t\t\treturn true;\n\t\t}", "function getVal() {\n return 5;\n}", "function answer1(){\n //the answer should be \"yes\" or \"no\"\n return \"no\";\n}", "function a(b) {\r\n if (b < 10) {\r\n return 2;\r\n } else {\r\n return 4;\r\n }\r\n console.log(b);\r\n}", "function returnObjectLeave()\n{\n\treturn {\n\t\tname: \"Arreter le programme\",\n\t\tvalue: -2\n\t}\n}" ]
[ "0.75421745", "0.7495398", "0.73449737", "0.7290033", "0.72883666", "0.7245007", "0.71019113", "0.7052656", "0.701583", "0.6997545", "0.6958313", "0.68631935", "0.6858841", "0.68373716", "0.68356526", "0.6805576", "0.6785121", "0.6775347", "0.6775347", "0.67669547", "0.6766183", "0.6747979", "0.67345876", "0.67294526", "0.672748", "0.66897404", "0.66894096", "0.6668727", "0.6647331", "0.6647331", "0.66412985", "0.66128546", "0.66093516", "0.65989083", "0.6541816", "0.6534684", "0.6529779", "0.6524898", "0.6521757", "0.65072787", "0.64847016", "0.648035", "0.645135", "0.6444355", "0.6443804", "0.6388997", "0.63852435", "0.63752913", "0.6372503", "0.6363459", "0.63586813", "0.63580483", "0.6356009", "0.6354763", "0.6346018", "0.6341682", "0.6341124", "0.63388216", "0.6333027", "0.6333027", "0.6322293", "0.6310026", "0.6302048", "0.63019156", "0.62971056", "0.629399", "0.6288898", "0.62855184", "0.62806785", "0.6280451", "0.6271606", "0.6265803", "0.6264067", "0.6263015", "0.6262665", "0.6255806", "0.6250426", "0.6250407", "0.6245129", "0.6242164", "0.62357163", "0.6218724", "0.6208236", "0.6208236", "0.62079597", "0.61744744", "0.6157395", "0.61549866", "0.61523676", "0.61464", "0.61447257", "0.61430734", "0.6135282", "0.61268383", "0.61268383", "0.61268383", "0.61268383", "0.61234975", "0.6123309", "0.6122594", "0.61218256" ]
0.0
-1
great. if we assign a function to a variable without parantheses, the variable would store the function itself, as opposed to the value it returns this is also known as a function expression what is true of functions? 1. they're reuseable blocks of code that perform specific tasks 2. We invoke them with their name and parentheses 3. we create them with the function keyword
function convert(a) { for (i = 0; i < a.length; i++) { var c = []; c.push(parseInt(a[i])); } return c; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makefunc(x) {\r\n// return function() { return x; }\r\n// return new Function($direct_func_xxx$);\r\n return new Function(\"return x;\")\r\n}", "function funname() {} //literals", "function Addition(x){\r\n // it is return some reference no name of function just a refernce\r\n return function (y){\r\n return x+y;\r\n };\r\n}", "function createFn() {\n return function (a) {};\n}", "function myFunction(a, b) {\n var myFunction = (a,b); {\n\n }\n console.log(myFunction)\n\n }", "function myFunction() { //declaring and initializing a function\n return 1+2; //as mentioned before, this function is now available anywhere \n}", "function whoAmI () { \n // create a function inside of the function\n function nameSomeoneGaveMe () { return \"Chris\"; }\n //we will return a string with the function value\n return \"You look out of it, \" + nameSomeoneGaveMe(); \n }", "\"function name\"(){\n //do thing\n }", "function someFunc() {}", "function myFnCall(fn) {\n return new Function('return ' + fn)();\n }", "function Func_s() {\n}", "function newFunction(){ //function declaration\n console.log(\"hello world\");\n }", "function myFunction() {}", "function fn() {}", "function foo(x,y){\n\treturn function(){\n\t\treturn x + y;\n\t}\n}", "function myNewFunction(a, b) {\n\t\treturn a + b;\n\t}", "function add(a)\r\n{\r\n return function(b)\r\n {\r\n return a+b;\r\n }\r\n}", "function addition(x){\n return function(y){\n return x+y\n }\n}", "function plus(x) {\n return function(y) {\n return x+y;\n }\n\n}", "function plus( b ) { return function( a ) { return a + b; }; }", "function x(t){return\"function\"==typeof t?t:function(){return t}}", "function v(){return function(){}}", "function fun() { }", "function aa() {\n return function() {}\n }", "function whosThere() {\n var name = \"Scott\";\n return function sayHello() {\n return \"Hello \" + name + \". Nice to meet you.\"\n };\n}", "function createAddition(y) {\n return function (x) {\n return x + y;\n };\n}", "function add(a){\n return function(b){\n return a+b;\n }\n}", "function add(a){\n return function(b){\n return a+b;\n }\n}", "function addTwo(x) {\n return function(y) {\n return x + y;\n }\n\n}", "function createFunctionWithInput(input) {\n return function(){\n return input;\n }\n}", "function add(x){\n return function(y){\n return x + y\n }\n}", "function fuction() {\n\n}", "function functionName(){ //()=parenthisis\nconsole.log('I am a Function')\n\n}", "function myfunction(){\n\treturn(\"i am function\");\n}", "function add(x) {\n return function(y) {\n return x + y;\n } \n}", "function a() {}", "function a() {}", "function a() {}", "function newFunction(parameter) {\n //code here\n}", "function add(number){\n return function(a){\n return a + number;\n }\n}", "function construct_func(user_input){\n return function foo(){\n eval(user_input);\n };\n}", "function sum(a){ \n return function(b){\n return a+b;\n }\n}", "function sum (a){\n return function (b){\n return a+b;\n }\n}", "function makeFunct() {\n let value = \"Great value\";\n return function() {\n console.log(value);\n }\n}", "function demo_3() {\n\tlet squareFunc1 = ( x ) => { return x * x };\n\t\t//or\n\tlet squareFunc2 = ( x ) => x * x;\n\t\t//or\n\t// Note: if there is only one input argument, the paranthesis can be ignored\t\n\tlet squareFunc3 = x => x * x;\n\n\tconsole.log(\"squareFunc1(3):\", squareFunc1(3));\n\tconsole.log(\"squareFunc2(3):\", squareFunc2(3));\n\tconsole.log(\"squareFunc3(3):\", squareFunc3(3));\n}", "function g(){return function(){}}", "function someFunction() { return 'something'; }", "function myFunction() {\n return a+b;\n}", "function myFunc(x){\n\treturn function(y){\n\t\treturn x+y;\n\t};\n}", "function funcTest() {\n\tvar myFunc = new Function(\"a\", \"b\", \"return a * b\");\n\tvar x = myFunc(2, 3);\n\tconsole.log(\"func test: x = \" + x);\n\n\t// function's self call, have no function name\n\t// use \"()\" close the function content, and add \"()\" to call! \n\t(function() {\n\t\tdocument.getElementById(\"func_id\").innerHTML = \"hello, I am called By my self!\"\n\t})();\n\n\t(function(a, b) {\n\t\tconsole.log(\"arguments.length = \" + arguments.length);\n\t\tvar txt = myFunc.toString();\n\t\tconsole.log(\"func_toString: \" + txt);\n\t})();\n\n\n\t// function cluster test\n\tvar add = (function() {\n\t\tvar count = 0;\n\t\treturn function() {\n\t\t\treturn count += 1;\n\t\t}\n\t})();\n\n\n\tadd();\n\tadd();\n\tadd();\n\n\tconsole.log(\"add = \" + add());\n\n\t// addEventListener test!!\n\tdocument.getElementById(\"btn_id\").addEventListener(\"click\", alertFunc());\n}", "function sum(x){\n return function(y){\n return x+y\n }\n}", "function functionDeclaration() {}", "function functionName() { //coffee maker\n// (4)\n return value\n}", "function make_expr_fun(expr: string): Function {\n return new Function('$', '\"use strict\"; return (' + expr + ')');\n}", "function functionName() { console.log('I am a function') }", "function greet(){\n return function(){\n console.log('Hello !!');\n }\n}", "function Fn($1) { return function($2) { return Function_ ([$1, $2]); }; }", "function closureOfYourOwnCreation() {\n let name = \"Russ\";\n function greetme() {\n return \"my name is \" + name;\n };\n return greetme();\n}", "function sum(a) {\n return function(b) {\n return a+b\n }\n}", "function sum(a) {\n return function(b) {\n return a + b;\n }\n}", "function myFunction() {\n}", "function myFunc1() {}", "function example5() {\n\n function a() {} // a.name === 'a'\n\n var z = function b() {}; // b.name === 'b'\n\n //smart name assigning\n\n var c = function c() {};\n console.log(c.name); // c\n\n var user = {\n sayHi: function sayHi() {} //sayHi.name === 'sayHi'\n };\n}", "function identity(x) {\n var c = new Function('y', 'return function(){return y}')\n return c(x)\n}", "function identity(x) {\n var c = new Function('y', 'return function(){return y}')\n return c(x)\n}", "function identity(x) {\n var c = new Function('y', 'return function(){return y}')\n return c(x)\n}", "function identity(x) {\n var c = new Function('y', 'return function(){return y}')\n return c(x)\n}", "function identity(x) {\n var c = new Function('y', 'return function(){return y}')\n return c(x)\n}", "function identity(x) {\n var c = new Function('y', 'return function(){return y}')\n return c(x)\n}", "function identity(x) {\n var c = new Function('y', 'return function(){return y}')\n return c(x)\n}", "function identity(x) {\n var c = new Function('y', 'return function(){return y}')\n return c(x)\n}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function functionDeclaration31(foo = \"=>\", bar = \"()\") { return \"foo\"; }", "function identity(x) {\n var c = new Function(\"y\", \"return function(){return y}\")\n return c(x)\n}", "function a(fn) { fn()}", "function upfrontFoo(x,y) {\n var sum = x + y;\n return function() { return sum }\n}", "function makeFunc() {\n var name = 'Mozilla';\n function displayName() {\n console.log(name);\n }\n return displayName; //note we are returning the displayName function before executing it (this is called a CLOSURE)\n}", "function myOwnFunctionName() {\n let result = 1 + 2; // for example!\n // a block of code\n return result;\n}", "function sumFuncCreator(a) {\n return function(b) {\n return a + b;\n }; // The parameter 'a' becomes a closure within the return function\n // functions declared within another function can reference the outer functions variables\n}", "function greet() {\r\n name = 'Hammad';\r\n return function () {\r\n console.log('Hi ' + name);\r\n }\r\n}", "function greet() {\r\n name = 'Hammad';\r\n return function () {\r\n console.log('Hi ' + name);\r\n }\r\n}", "function functionExpressionHoisted() {\n var bar;\n var bar;\n\n bar = function() { return 1; }\n return bar();\n bar = function() { return 2; }\t// Unreachable\n}", "function makeFunc() {\n var name = 'Mozilla';\n function displayName() {\n console.log('Closure Example 2: ', name);\n }\n return displayName;//being returned from makeFunc() without being executed. \n}", "function myFunc() { \n\n}", "function myFunction() {\n \n}", "function functionDeclaration31a(foo = \"=>\", bar = \"()\") { return \"foo\"; }", "function moreMath (x) {\n return function (y) {\n return x + y;\n };\n}", "function add(a) {\n return function(b) {\n return a + b;\n };\n}" ]
[ "0.75538224", "0.7020425", "0.6956452", "0.69187003", "0.69023126", "0.6892972", "0.6796137", "0.66770905", "0.6635328", "0.66190654", "0.6609298", "0.65943956", "0.6583087", "0.6547502", "0.653279", "0.6521821", "0.6517512", "0.64656585", "0.6452493", "0.64265215", "0.64252687", "0.64189786", "0.6410268", "0.6404959", "0.6392805", "0.6381854", "0.6367559", "0.6367559", "0.63658965", "0.63486236", "0.63417405", "0.63342685", "0.63313514", "0.63288987", "0.6327797", "0.63101345", "0.63101345", "0.63101345", "0.63022006", "0.63021606", "0.629887", "0.6296659", "0.6275382", "0.6273053", "0.6271699", "0.626298", "0.62614703", "0.62515783", "0.62469935", "0.62299466", "0.6228783", "0.6209005", "0.6200181", "0.6197143", "0.6196404", "0.61957395", "0.61908746", "0.61889243", "0.6186446", "0.61841875", "0.6172407", "0.6171241", "0.61565167", "0.6156211", "0.6156211", "0.6156211", "0.6156211", "0.6156211", "0.6156211", "0.6156211", "0.6156211", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61558074", "0.61546075", "0.61545", "0.61486626", "0.6147425", "0.61437887", "0.61403465", "0.61357737", "0.61308306", "0.61308306", "0.613037", "0.61248255", "0.6119679", "0.61168253", "0.6110682", "0.61090547", "0.6104791" ]
0.0
-1
remember we can use function declatations or function expressions to define functions. Assigning a function in parentheses or using it with arguments invokes it
function add(a, b) { return a + b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makefunc(x) {\r\n// return function() { return x; }\r\n// return new Function($direct_func_xxx$);\r\n return new Function(\"return x;\")\r\n}", "function functionDeclaration31(foo = \"=>\", bar = \"()\") { return \"foo\"; }", "function funname() {} //literals", "function functionDeclaration31a(foo = \"=>\", bar = \"()\") { return \"foo\"; }", "function myFunction(a, b) {\n var myFunction = (a,b); {\n\n }\n console.log(myFunction)\n\n }", "function functionDeclaration() {}", "\"function name\"(){\n //do thing\n }", "function declaration() {\n console.log('I am a function declaration.');\n}", "function declaredFunctionTwo(a, b) {\n return a * b;\n}", "function make_expr_fun(expr: string): Function {\n return new Function('$', '\"use strict\"; return (' + expr + ')');\n}", "function newFunction(){ //function declaration\n console.log(\"hello world\");\n }", "function call() { //Modified this from function expression to function declaration.\r\n console.log(\"I am calling\");\r\n}", "function functionName(){ //()=parenthisis\nconsole.log('I am a Function')\n\n}", "function adder(x, y){ // Functions can defined after the call \n return x + y\n}", "function declaration() {\n console.log(\"I'm a function declaration!\");\n}", "function declaration() {\n console.log(\"I'm a Function Declaration.\");\n}", "function Func_s() {\n}", "function expressionFunction(name, fn, visitor) {\n if (arguments.length === 1) {\n return functionContext[name];\n }\n\n // register with the functionContext\n functionContext[name] = fn;\n\n // if there is an astVisitor register that, too\n if (visitor) astVisitors[name] = visitor;\n\n // if the code generator has already been initialized,\n // we need to also register the function with it\n if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;\n return this;\n }", "function declaration() {\n console.log(\"Hi, I'm a function declaration!\");\n }", "function example6() {\n\n if (true) {\n var sayHi = function sayHi() {\n return 'Hi';\n };\n\n sayHi();\n };\n\n // sayHi() // Error: sayHi is not defined\n}", "function f1(func) {\n func(\"hello anonymous function\");\n}", "function adder(x,y){ // Functions can be defined after the call\n return x + y\n}", "function fn() {}", "function demo_3() {\n\tlet squareFunc1 = ( x ) => { return x * x };\n\t\t//or\n\tlet squareFunc2 = ( x ) => x * x;\n\t\t//or\n\t// Note: if there is only one input argument, the paranthesis can be ignored\t\n\tlet squareFunc3 = x => x * x;\n\n\tconsole.log(\"squareFunc1(3):\", squareFunc1(3));\n\tconsole.log(\"squareFunc2(3):\", squareFunc2(3));\n\tconsole.log(\"squareFunc3(3):\", squareFunc3(3));\n}", "function someFunc() {}", "function Addition(x){\r\n // it is return some reference no name of function just a refernce\r\n return function (y){\r\n return x+y;\r\n };\r\n}", "function a(fn) { fn()}", "function FunctionExpression(node, print) {\n\t if (node.async) this.push(\"async \");\n\t this.push(\"function\");\n\t if (node.generator) this.push(\"*\");\n\n\t if (node.id) {\n\t this.push(\" \");\n\t print.plain(node.id);\n\t } else {\n\t this.space();\n\t }\n\n\t this._params(node, print);\n\t this.space();\n\t print.plain(node.body);\n\t}", "function FunctionExpression(node, print) {\n\t if (node.async) this.push(\"async \");\n\t this.push(\"function\");\n\t if (node.generator) this.push(\"*\");\n\n\t if (node.id) {\n\t this.push(\" \");\n\t print.plain(node.id);\n\t } else {\n\t this.space();\n\t }\n\n\t this._params(node, print);\n\t this.space();\n\t print.plain(node.body);\n\t}", "function _exec_funcdef(ast, context, debug) {\n var FRecord = new ObjectClass.SFunction();\n FRecord.closure_active_record = context;\n var funcName = \"\";\n for (var item in ast.sons) {\n if (ast.sons[item].type == \"NAME\"){\n funcName = ast.sons[item].value;\n FRecord.name = funcName;\n FRecord.ast = ast;\n }\n if (ast.sons[item].type == \"PARAMETERS\") {\n FRecord.argument_list = _exec_parameters(ast.sons[item],context);\n }\n }\n var func = new ObjectClass.SObject();\n func.type = \"Func\";\n func.value = FRecord;\n func.name = funcName;\n context.allEntry[funcName] = func;\n }", "function example7() {\n\n //base\n var inc = function inc(x) {\n return x + 1;\n };\n\n //self evaluated function\n var incEval = (function (x) {\n return x + 1;\n })();\n\n // add parenthes when no params\n var pi = function pi() {\n return 3.14;\n };\n\n // add parenthes when more then 1 param\n var sum = function sum(x, y) {\n return x + y;\n };\n\n // add curly brackets and explicit return, when multistring body\n var divide = function divide(x, y) {\n if (y !== 0) {\n return x / y;\n };\n };\n}", "function defineFunctionBuilders({type, htmlBuilder, mathmlBuilder}) {\n defineFunction({type, names: [], props: {numArgs: 0},\n handler() { throw new Error('Should never be called.'); },htmlBuilder});\n}", "function a(fn) {\n fn()\n}", "function plus(x) {\n return function(y) {\n return x+y;\n }\n\n}", "function myFunction() {\n console.log(\"Function declared with Function expression\");\n this.child = 10;\n}", "function functionName() { console.log('I am a function') }", "function expressionFunction(name, fn, visitor) {\n if (arguments.length === 1) {\n return functionContext[name];\n }\n\n // register with the functionContext\n functionContext[name] = fn;\n\n // if there is an astVisitor register that, too\n if (visitor) astVisitors[name] = visitor;\n\n // if the code generator has already been initialized,\n // we need to also register the function with it\n if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;\n return this;\n}", "function expressionFunction(name, fn, visitor) {\n if (arguments.length === 1) {\n return functionContext[name];\n }\n\n // register with the functionContext\n functionContext[name] = fn;\n\n // if there is an astVisitor register that, too\n if (visitor) astVisitors[name] = visitor;\n\n // if the code generator has already been initialized,\n // we need to also register the function with it\n if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;\n return this;\n}", "function plus( b ) { return function( a ) { return a + b; }; }", "function question4() {\n question2('functions in functions');\n}", "function myNewFunction(a, b) {\n\t\treturn a + b;\n\t}", "function addition(x){\n return function(y){\n return x+y\n }\n}", "function add(a)\r\n{\r\n return function(b)\r\n {\r\n return a+b;\r\n }\r\n}", "function foo(){\n function bar(){\n console.log(\"hello\");\n }\n}", "function FunctionExpression(node, print) {\n if (node.async) this.push(\"async \");\n this.push(\"function\");\n if (node.generator) this.push(\"*\");\n\n if (node.id) {\n this.push(\" \");\n print.plain(node.id);\n } else {\n this.space();\n }\n\n this._params(node, print);\n this.space();\n print.plain(node.body);\n}", "FunctionDeclaration() {\n pushContext();\n }", "function x(t){return\"function\"==typeof t?t:function(){return t}}", "function helloWorld(fn) {\n fn();\n}", "function add(x){\n return function(y){\n return x + y\n }\n}", "function a() {}", "function a() {}", "function a() {}", "function add(x) {\n return function(y) {\n return x + y;\n } \n}", "function \n//declare a function\nfunction sum()\n//need parentheses for your parameters\nfunction sum(num1, num2) {}", "function india() {\n console.log('warm');\n} //! Function declaration is defined during the parsing of the code", "defineFn(name, words) {this.fnDefs[name] = words;}", "function plus1(x) { // Define a function named \"plus1\" with parameter x\n return x + 1; // Return a value one larger than the value passed in\n} // Functions are enclosed in curly braces", "function fun() { }", "function adder(x, y){ // functions can be defined after the call\n return x + y\n}", "function add(a){\n return function(b){\n return a+b;\n }\n}", "function add(a){\n return function(b){\n return a+b;\n }\n}", "function addTwo(x) {\n return function(y) {\n return x + y;\n }\n\n}", "function foo(x,y){\n\treturn function(){\n\t\treturn x + y;\n\t}\n}", "function moreMath (x) {\n return function (y) {\n return x + y;\n };\n}", "function Fn($1) { return function($2) { return Function_ ([$1, $2]); }; }", "function statement() {\n console.log('I am a function statement'); \n}", "function functionStructure(parameterOne, parameterTwo, parameterThree) { //function declaration syntax.\n //body of prescribed code here.\n}", "function foo3(f) { f(1, 2); }", "function add(num1, num2){// named function\n return num1 + num2;\n}", "function register(name, fn, checkArgs, returns, evaluatedArgs) {\n\t MV_FUNCTIONS[name] = {\n\t checkArguments: checkArgs,\n\t evaluatedArgs: evaluatedArgs !== false,\n\t evaluate: fn,\n\t type: returns\n\t };\n\t }", "function myFnCall(fn) {\n return new Function('return ' + fn)();\n }", "function\nsetq_usrfunc(p1)\n{\n\tvar A, B, C, F;\n\n\tF = caadr(p1); // function name\n\tA = cdadr(p1); // function args\n\tB = caddr(p1); // function body\n\n\tif (find_func_defn(B))\n\t\tstopf(\"func defn in func\");\n\n\tif (!isusersymbol(F))\n\t\tstopf(\"user symbol expected\");\n\n\tif (lengthf(A) > 9)\n\t\tstopf(\"more than 9 arguments\");\n\n\tpush(B);\n\tconvert_body(A);\n\tC = pop();\n\n\tset_symbol(F, B, C);\n}", "function myFunction() {}", "function nameOfFunction(paramater) {\n //body of our code\n}", "operator(ctx, expr) {\n const ast = expr.ast, fn = ctx.functions;\n return _ => interpret(ast, fn, _);\n }", "function parseFunction(node, isStatement) {\n if (tokType === _name) node.id = parseIdent();\n else if (isStatement) unexpected();\n else node.id = null;\n node.params = [];\n var first = true;\n expect(_parenL);\n while (!eat(_parenR)) {\n if (!first) expect(_comma); else first = false;\n node.params.push(parseIdent());\n }\n\n // Start a new scope with regard to labels and the `inFunction`\n // flag (restore them to their old value afterwards).\n var oldInFunc = inFunction, oldLabels = labels;\n inFunction = true;\n labels = [];\n node.body = parseBlock(true);\n inFunction = oldInFunc;\n labels = oldLabels;\n\n // If this is a strict mode function, verify that argument names\n // are not repeated, and it does not try to bind the words `eval`\n // or `arguments`.\n if (strict || node.body.body.length && isUseStrict(node.body.body[0])) {\n for (var i = node.id ? -1 : 0; i < node.params.length; ++i) {\n var id = i < 0 ? node.id : node.params[i];\n if (isStrictReservedWord(id.name) || isStrictBadIdWord(id.name))\n raise(id.start, \"Defining '\" + id.name + \"' in strict mode\");\n if (i >= 0) for (var j = 0; j < i; ++j) if (id.name === node.params[j].name)\n raise(id.start, \"Argument name clash in strict mode\");\n }\n }\n\n return finishNode(node, isStatement ? \"FunctionDeclaration\" : \"FunctionExpression\");\n }", "function f5() {}", "function thisIsAFunction(parameter){ //declaration\n console.log(\"function\"); // execute code\n }", "function add() {\n //Lexical to add\n function sub() {\n return \"30\";\n }\n return \"Prince\";\n}", "function register(name, fn, checkArgs, returns) {\n\t MATH_FUNCTIONS[name] = {\n\t checkArguments: checkArgs,\n\t evaluatedArgs: true,\n\t evaluate: fn,\n\t type: returns\n\t };\n\t }", "function createFn() {\n return function (a) {};\n}", "function f27() {}", "function myFunction() { //declaring and initializing a function\n return 1+2; //as mentioned before, this function is now available anywhere \n}", "function sayHello1() {\nconsole.log('Function Declaration Syntax');\n}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "function f() {}", "visitFunctionDeclaration(tree) {}", "visitFunctionDeclaration(tree) {}", "visitFunctionDeclaration(tree) {}" ]
[ "0.67986", "0.65857077", "0.6580765", "0.6537802", "0.6498908", "0.6495669", "0.64590466", "0.6373023", "0.630702", "0.6298254", "0.62902963", "0.62835294", "0.626038", "0.6249343", "0.6232013", "0.6227945", "0.62082285", "0.6201448", "0.61984175", "0.61901116", "0.6180671", "0.61740184", "0.6172949", "0.61700094", "0.6159296", "0.6151725", "0.6151566", "0.61480176", "0.61480176", "0.6141158", "0.6118617", "0.61183286", "0.61157554", "0.61137646", "0.61064446", "0.6105405", "0.61046886", "0.61046886", "0.60912", "0.608185", "0.60683084", "0.6063344", "0.6056061", "0.60554206", "0.60544723", "0.6044136", "0.60331094", "0.603274", "0.60279596", "0.60270965", "0.60270965", "0.60270965", "0.6026705", "0.60146433", "0.6014563", "0.5991887", "0.5988598", "0.59829", "0.5982591", "0.59732246", "0.59732246", "0.59701896", "0.59652793", "0.5956981", "0.59516376", "0.5950183", "0.59496063", "0.5948614", "0.5946268", "0.5946065", "0.5944963", "0.592173", "0.59117675", "0.5905741", "0.5905392", "0.5888045", "0.58860415", "0.58822817", "0.5879187", "0.5872933", "0.58642226", "0.5861708", "0.58522975", "0.5849824", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.583031", "0.58229035", "0.58229035", "0.58229035" ]
0.0
-1
so both of those are correct Now what is wrong with this code?
function calculatePeriphery(r) { var result = 2 * r * Math.PI; return result; console.log(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "static private internal function m121() {}", "protected internal function m252() {}", "private public function m246() {}", "transient protected internal function m189() {}", "static private protected internal function m118() {}", "transient private protected internal function m182() {}", "static transient final private internal function m43() {}", "static transient private protected internal function m55() {}", "transient private internal function m185() {}", "transient final protected internal function m174() {}", "static transient private internal function m58() {}", "static transient private protected public internal function m54() {}", "static final private internal function m106() {}", "static transient final protected internal function m47() {}", "static protected internal function m125() {}", "function checkEquality(a, b) {\n return a === b;\n }", "static final private protected internal function m103() {}", "transient final private protected internal function m167() {}", "function o0(o1, o2) {\n try {\nreturn o34(o32, o36, o37);\n}catch(e){}\n}", "static private protected public internal function m117() {}", "function ok2(){ \n if(j-avain2<0){\n \n r=29-avain2+j;\n \n \n }\n else{\n r=(j-avain2);\n \n }\n}", "transient final private internal function m170() {}", "static transient private public function m56() {}", "static transient final protected public internal function m46() {}", "static transient final private protected internal function m40() {}", "transient private protected public internal function m181() {}", "static transient protected internal function m62() {}", "function comportement (){\n\t }", "function wR(a,b){this.Fb=[];this.HF=a;this.YE=b||null;this.Pq=this.un=!1;this.ai=void 0;this.Gz=this.AK=this.ez=!1;this.uu=0;this.cb=null;this.az=0}", "function re(a,b){this.O=[];this.za=a;this.la=b||null;this.J=this.D=!1;this.H=void 0;this.ha=this.Fa=this.S=!1;this.R=0;this.Ef=null;this.N=0}", "static transient final private protected public internal function m39() {}", "static get INVALID()\n\t{\n\t\treturn 2;\n\t}", "function match(a,b) { //creating a function to compare two numbers to see if they match\n if (a == b)\n return true;\n else\n return false;\n }", "static transient final protected function m44() {}", "static final protected internal function m110() {}", "function a(num1, num2) { // we have this predictable functioin\n // thats minimized the bugs in the code\n return num1 + num2\n}", "function _0x407e48(_0x18187c, _0x27f1e8) {\n 0x0;\n }", "function inside3() {\n //console.log('B= ' + b);\n }", "function T1a(a,b){if(w(a,b))return!0;if(!a||!b||Vp(a)!=Vp(b))return!1;a=a.a.gg();for(var c=0;c<a.length;c++)if(!b.U(a[c]))return!1;return!0}", "transient final private protected public internal function m166() {}", "static final private protected public internal function m102() {}", "function o0(stdlib,o1,buffer) {\n try {\no8[4294967294];\n}catch(e){}\n function o104(o49, o50, o73) {\n try {\no95(o49, o50, o73, this);\n}catch(e){}\n\n try {\no489.o767++;\n}catch(e){}\n\n try {\nif (o97 === o49) {\n try {\nreturn true;\n}catch(e){}\n }\n}catch(e){}\n\n try {\nreturn false;\n}catch(e){}\n };\n //views\n var o3 =this;\n\n function o4(){\n var o30\n var o6 = o2(1.5);\n try {\no3[1] = o6;\n}catch(e){}\n try {\nreturn +(o3[1])\n}catch(e){}\n }\n try {\nreturn o4;\n}catch(e){}\n}", "function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function sb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return rb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function checkss(){\n if (memory.length>1){\n if(/\\+|\\-/.test(memory.join())){\n sumres();\n checkss();\n }\n }\n }", "function tb(a, b) { var d, e; if (1 === b.length && c(b[0]) && (b = b[0]), !b.length) return sb(); for (d = b[0], e = 1; e < b.length; ++e) b[e].isValid() && !b[e][a](d) || (d = b[e]); return d }", "validate( _value, _utils ) {\n\t\t\treturn false;\n\t\t}", "function checklengthA(){\r\n\tfl3=numbertimes.toString()-numberlength9.toString();\r\n\tfl4=numbertimes.toString()-numberlength8.toString();\r\n\t\tt4=t4-fl3;\r\n\t\tfl3=0;\r\n\t\tt5=t5-fl4;\r\n\t\tfl4=0;\r\n\t\tconsole.log(fl3);\r\n\t\tconsole.log(t4);\t\r\nconsole.log(t5);\r\nif(numberlength8>numberlength9){\r\n\t\tnumberlength9=numberlength8;\r\n\t\t\r\n\t}\r\n\telse if(numberlength9>numberlength8){\r\n\t\tnumberlength8=numberlength9;\r\n\t}\t\r\n}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "function tb(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return sb();for(d=b[0],e=1;e<b.length;++e)b[e].isValid()&&!b[e][a](d)||(d=b[e]);return d}", "algoanagram(s1, s2) {\n\n var l1 = s1.length\n var l2 = s2.length\n var flag = true\n if (l1 != l2) {\n flag = false\n }\n else {\n var s3 = s1.toLowerCase()\n var s4 = s2.toLowerCase()\n\n s3 = s3.split('').sort().join('');\n s4 = s4.split('').sort().join('');\n\n // console.log(s3);\n // console.log(s4);\n flag = s3 === s4;\n // var c=a.split(\" \")\n // var c=b.split(\" \")\n\n\n //console.log(c)\n // console.log(d)\n\n\n\n\n\n }\n if (flag == true) {\n console.log(s1 + \" and \" + s2 + \" are anagram\")\n }\n else {\n console.log(s1 + \" and \" + s2 + \" are not anagram\")\n }\n }", "static equalTrans(ta, tb) {\n//----------\nreturn ta[0] === tb[0] && ta[1] === tb[1] && ta[2] === tb[2];\n}", "function o0(o1,o2,o3)\n{\n try {\no4.o5(o39 === true + \" index:\" + o2 + \" Object:\" + o3);\n}catch(e){}\n try {\nreturn true;\n}catch(e){}\n}", "get d812() { return this.c1.same(this.c8) && this.c2.same(this.c8) }", "function taumBday1(b, w, bc, wc, z) {\n // Write your code here\n console.log('b=', b);\n console.log('w=', w);\n console.log('bc=', bc);\n console.log('wc=', wc);\n console.log('z=', z);\n console.log('-------------------')\n\n b = new BigNumber(b);\n w = new BigNumber(w);\n bc = new BigNumber(bc);\n wc = new BigNumber(wc);\n z = new BigNumber(z);\n\n //[b, w, bc, wc, z] = [...arguments].map(value => new BigNumber(value));\n\n if(bc>wc+z) {\n // return wc * (w+b) + z * b;\n return wc.times(w.plus(b)).plus(z.times(b)).toFixed();\n\n } else if(wc>bc+z) {\n // return bc * (w+b) + z * w;\n return bc.times(w.plus(b)).plus(z.times(w)).toFixed();\n\n } else {\n // return wc * w + bc * b;\n // Not sure why it failed fo this when using bignumber, it passed when just using wc * w + bc * b\n console.log('i should be in here...');\n console.log('wc.times(w)=', wc.times(w).toFixed());\n console.log('bc.times(b)=', bc.times(b).toFixed());\n console.log('wc.times(w).plus(bc.times(b))=', wc.times(w).plus(bc.times(b)).toFixed());\n return wc.times(w).plus(bc.times(b)).toFixed();\n }\n\n}", "ac(inp) {\r\n\t\t\treturn inp;\r\n\t\t}", "transient private public function m183() {}", "function e(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||(e>=12544&&e<=12591||(e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||(e>=63744&&e<=64255||(e>=13056&&e<=13311||(e>=11904&&e<=12031||(e>=12736&&e<=12783||(e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||(e>=13312&&e<=19903||(e>=19968&&e<=40959||(e>=12800&&e<=13055||(e>=12592&&e<=12687||(e>=43360&&e<=43391||(e>=55216&&e<=55295||(e>=4352&&e<=4607||(e>=44032&&e<=55215||(e>=12352&&e<=12447||(e>=12272&&e<=12287||(e>=12688&&e<=12703||(e>=12032&&e<=12255||(e>=12784&&e<=12799||(e>=12448&&e<=12543&&12540!==e||(e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||(e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||(e>=5120&&e<=5759||(e>=6320&&e<=6399||(e>=65040&&e<=65055||(e>=19904&&e<=19967||(e>=40960&&e<=42127||e>=42128&&e<=42191)))))))))))))))))))))))))))))}", "static transient final private public function m41() {}", "function Squaring(){\n }", "function _checkAi(){return true;}", "SameSide() {}", "function ld(a,b){return void 0!==mg[a]&&(void 0===b?mg[a]:(mg[a]=b,!0))}", "function ld(a,b){return void 0!==mg[a]&&(void 0===b?mg[a]:(mg[a]=b,!0))}", "function ld(a,b){return void 0!==mg[a]&&(void 0===b?mg[a]:(mg[a]=b,!0))}", "function ld(a,b){return void 0!==mg[a]&&(void 0===b?mg[a]:(mg[a]=b,!0))}", "function common_operation(value1,value2){\r\n var x = name_3.id[0];\r\n var y = name_3.id[1];\r\n x = parseInt(x);\r\n y = parseInt(y);\r\n var z = castle_elephent_4(x,y,turn);\r\n if (z == 5){\r\n return assign(value1,value2,x,y,turn);\r\n }\r\n else{\r\n z = castle_elephent_3(x,y,turn);\r\n if (z == 5){\r\n return assign(value1,value2,x,y,turn);\r\n } \r\n else{\r\n z = castle_elephent_2(x,y,turn);\r\n if (z == 5){\r\n return assign(value1,value2,x,y,turn);\r\n } \r\n else{\r\n z = castle_elephent_1(x,y,turn);\r\n if (z == 5){\r\n return assign(value1,value2,x,y,turn);\r\n } \r\n else{\r\n \r\n } \r\n } \r\n } \r\n }\r\n}", "function f024checkFunc(set1, set2) {\n\n\t\treturn function() {\n\n\n\t\t\tif (set1.length === 0 || set2.length === 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (!hasSubfield(set1, 'a') || !hasSubfield(set2, 'a')) {\n\t\t\t\treturn null;\n\t\t\t} \n\n\t\t\tif (compareFuncs.isIdentical(set1, set2)) {\n\t\t\t\treturn SURE;\n\t\t\t}\n\n\t\t\tif (compareFuncs.isSubset(set1, set2) || compareFuncs.isSubset(set2, set1)) {\n\t\t\t\treturn SURE;\n\t\t\t}\n\n\t\t\tif (compareFuncs.intersection(set1, set2).length > 0) {\n\t\t\t\treturn ALMOST_SURE;\n\t\t\t}\n\n\t\t\treturn SURELY_NOT;\n\n\t\t};\n\n\t}", "function _is_simple_same(question, answer, msg){\n\t_complete(question == answer, msg);\n }", "function addiere(a,b) {\n\t\t\t\tvar erg = a + b;\n\t\t\t\treturn erg;\n\t\t}", "function o0(o1, o2) {\n try {\nreturn --this.o655 == 0;\n}catch(e){}\n}", "function checkEqual(a, b) {\n /*if(a == b) {\n return true;\n }\n else {\n return false;\n }\n}*/\n return a === b ? true : false;\n}", "checkAnagram2(str1, str2) {\n let unsortedStr1 = \"\" + str1;\n let unsortedStr2 = \"\" + str2;\n if (unsortedStr1.length != unsortedStr2.length) {\n return false;\n }\n sortedStr1 = this.sort1(unsortedStr1);\n sortedStr2 = this.sort1(unsortedStr2);\n let b = this.check(sortedStr1, sortedStr2);\n if (b == true) {\n return true;\n }\n else {\n return false;\n }\n }", "static private public function m119() {}", "function check_keyval(hash1, hash2) {\r\n\t\r\n\tvar v_exists = 0;\r\n\r\n\tObject.keys(hash1).forEach(function(key, index) {\r\n\t //console.log(this[key]+key);\r\n\t // 1 \r\n\t Object.keys(hash2).forEach(function(key2, index2) {\r\n\t // 2\r\n\t if (hash1[key]+key == hash2[key2]+key2) {\r\n\t //console.log(\"True: \" + hash1[key]+key + \" \" + hash2[key2]+key2);\r\n\t v_exists = v_exists + 1;\r\n\t } \r\n\t },hash1)\r\n\t });\r\n\t//3\r\n if (v_exists > 0) {return true;} else {return false;}\r\n}", "function diff(x, y){\n\t\t\t\tvar valueDiff = Math.abs(userArr[x]-answerArr[y]);\n\t\t\t\tcompatibility.push(valueDiff);\n\t\t\t}", "function miesiace(msc1, msc2) {\n if (msc1 == 8 || msc1 == 0 || msc1 == 2 || msc1 == 4 || msc1 == 6) {\n mss1 = 0;\n //document.write(\"0\");\n miesiac = mss1 + msc2;\n } else {\n mss1 = 1;\n //document.write(\"1\");\n miesiac = mss1 + msc2;\n }\n }", "function equal2() {\n var a = v6; //set number value to a\n var b = v3; //set number value to b\n return a - b;\n}", "campare(a, b) {\n const EPS = 0.1;\n if (Math.abs(Math.abs(a) - Math.abs(b)) < EPS) {\n return true;\n }\n return false;\n }", "static transient final private protected public function m38() {}" ]
[ "0.5810806", "0.5776088", "0.55144674", "0.5499322", "0.53955066", "0.52797455", "0.5268725", "0.5251933", "0.51337683", "0.51310575", "0.50844723", "0.50411975", "0.50137573", "0.4999178", "0.4998623", "0.49733442", "0.49540854", "0.4947042", "0.49179187", "0.49114943", "0.48886237", "0.48877814", "0.4833875", "0.48291212", "0.48179385", "0.4799531", "0.47813874", "0.47767645", "0.47642565", "0.47408485", "0.47273666", "0.47217414", "0.47035995", "0.47028023", "0.46988449", "0.46958137", "0.4695244", "0.46785158", "0.4675966", "0.46756554", "0.46711412", "0.46661642", "0.46636885", "0.46634948", "0.46634948", "0.46634948", "0.46634948", "0.46634948", "0.46634948", "0.46634948", "0.46634948", "0.466156", "0.46593806", "0.46520588", "0.46506178", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4646746", "0.4630028", "0.46272564", "0.46208638", "0.46039364", "0.4596326", "0.45847505", "0.45770365", "0.45762894", "0.4567061", "0.4564962", "0.45587888", "0.4552637", "0.4537306", "0.4537306", "0.4537306", "0.4537306", "0.45344418", "0.45201296", "0.45140266", "0.4495916", "0.44939753", "0.44931114", "0.44867194", "0.44861603", "0.44827807", "0.44807243", "0.44783986", "0.44780487", "0.44776568", "0.4472448" ]
0.0
-1
now if we want to create multiple objects with the same properties and methods, but different values, we can create a constructor function. and then we can use the new keyword to create as many instances of an object as we want.
function Hero(name, age, power) { this.name = name; this.age = age; this.power = power; this.speak = function() { console.log("Hi, I'm " + this.name + " and I'm gonna kick your ass!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NewObj(){}", "function NewObj() {}", "function createObj(a, b)\n{\n //var newObject = {}; // Not needed ctor function\n this.a = a; //newObject.a = a;\n this.b = b; //newObject.b = b;\n //return newObject; // Not needed for ctor function\n}", "construct (target, args) {\n return new target(...args)\n }", "function makeObj() {\n\tif (arguments.length % 2 != 0) {\n\t\targuments[arguments.length] = \"\";\n\t\t}\n\tfor ( var i = 0; i < arguments.length; i += 2 ) {\n\t\tthis[arguments[i]] = arguments[i + 1] ;\n \t}\n\treturn this;\n\t}", "static create(...args /* :Array<*> */) {\n\t\treturn new this(...args)\n\t}", "function construct(constructor, argList) {\r\n for (var argNames = '', i = argList.length; i--;) {\r\n argNames += (argNames ? ',a' : 'a') + i;\r\n }\r\n return Function(argNames, 'return new this(' + argNames + ')').apply(constructor, argList);\r\n }", "function ExampleNew(attrs) {\n this.one = attrs.one;\n this.two = attrs.two;\n this.three = attrs.three;\n console.log(this); // 'new' binds 'this' in ExampleNew function to obj1 and obj2 objects\n}", "function newObject(object) {\n switch (object) {\n case 'sketch':\n create(\"canvas\");\n break;\n case 'photo':\n create('img');\n break;\n case 'title':\n create('p');\n break;\n case 'grid':\n grid.openGridSettings();\n break;\n }\n}", "new() {\n let newInstance = Object.create(this);\n\n newInstance.init(...arguments);\n\n return newInstance;\n }", "function NewObject() {\n\t// returns an object\n}", "function new2() {\n const constructor = arguments[0];\n const args = [].slice.call(arguments, 1);\n const obj = new Object();\n obj.__proto__ = constructor.prototype;\n const ret = constructor.apply(obj, [...args]);\n if (ret && (typeof ret === 'object' || typeof ret === 'function')) {\n return ret;\n }\n return obj;\n}", "constructor(x, y) { // Constructor function to initialize new instances.\n this.x = x; // This keyword is the new object being initialized.\n this.y = y; // Store function arguments as object properties.\n }", "function new_constructor(initializer, methods, extend) {\n var prototype = Object.create(typeof extend === 'function'\n ? extend.prototype\n : extend);\n if (methods) {\n methods.keys().forEach(function (key) {\n prototype[key] = methods[key];\n}); }\n function constructor() {\n var that = Object.create(prototype);\n if (typeof initializer === 'function') {\n initializer.apply(that, arguments);\n }\n return that;\n }\n constructor.prototype = prototype;\n prototype.constructor = constructor;\n return constructor;\n }", "function construct(ctor, args) {\n ctor = asCtor(ctor);\n // This works around problems with (new Array()) and (new Date()) where\n // the returned object is not really a Date or Array on SpiderMonkey and\n // other interpreters.\n switch (args.length) {\n case 0: return new ctor();\n case 1: return new ctor(args[0]);\n case 2: return new ctor(args[0], args[1]);\n case 3: return new ctor(args[0], args[1], args[2]);\n case 4: return new ctor(args[0], args[1], args[2], args[3]);\n case 5: return new ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new ctor(args[0], args[1], args[2], args[3], args[4],\n args[5]);\n case 7: return new ctor(args[0], args[1], args[2], args[3], args[4],\n args[5], args[6]);\n case 8: return new ctor(args[0], args[1], args[2], args[3], args[4],\n args[5], args[6], args[7]);\n case 9: return new ctor(args[0], args[1], args[2], args[3], args[4],\n args[5], args[6], args[7], args[8]);\n case 10: return new ctor(args[0], args[1], args[2], args[3], args[4],\n args[5], args[6], args[7], args[8], args[9]);\n case 11: return new ctor(args[0], args[1], args[2], args[3], args[4],\n args[5], args[6], args[7], args[8], args[9],\n args[10]);\n case 12: return new ctor(args[0], args[1], args[2], args[3], args[4],\n args[5], args[6], args[7], args[8], args[9],\n args[10], args[11]);\n default:\n if (ctor.typeTag___ === 'Array') {\n return ctor.apply(USELESS, args);\n }\n var tmp = function (args) {\n return ctor.apply(this, args);\n };\n tmp.prototype = ctor.prototype;\n return new tmp(args);\n }\n }", "static createInstances(objects) {\n if(objects.length < 1) \n return console.warn(\"The array you provided is empty.\");\n if(!objects.every(object => object instanceof Object)) \n return console.warn(\"All the elements in the array must be objects.\")\n let newObjects = []\n for (let object of objects) {\n newObjects.push(new Movie(object));\n }\n return newObjects;\n }", "function MyNewObj(attributes) {\n this.name = attributes.name;\n this.age = attributes.age;\n this.speak = function() {\n return \"My name is \" + this.name;\n };\n}", "function objectName(prperty1, property2) {\n let objectName = Object.create(objectName.prototype);\n\n objectName.property1 = \"test\";\n objectName.property2 = \"test2\";\n\n objectName.prototype.doSomething1 = function name(params) {\n console.log(\"do something1\");\n };\n objectName.prototype.doSomething2 = function name(params) {\n console.log(\"do something2\");\n }\n return objectName;\n}", "function Constructor() {}", "function Constructor() {}", "function Constructor() {}", "function construct() { }", "function dummyObjects(name, age){\n this.name = name\n this.age = age\n}", "static create(params) {\n return {type: `${this.prefix}${this.name}`, _instance: new this(params)}; //eslint-disable-line\n }", "function tempCtor() {}", "function MyConstructor(){\n\t\tthis.prop1 = \"Maxsuel\";\n\t\tthis.prop2 = \"Storch\";\n\t}", "function mynew(fn,args){\n var obj =new Object()\n obj.__proto__ = fn.prototype\n var result = fn.apply(obj)\n return typeof result =='Object'?reslut:obj\n}", "function personFromConstructor(name, age) {\r\n \r\n // Create a new person using the new keyword, calling the PersonConstructor function above\r\n\tlet person = new PersonConstructor;\r\n \r\n // Assign name & age properties to object\r\n person.name = name;\r\n person.age = age;\r\n \r\n // Return new person\r\n return person;\r\n\r\n}", "function funConstructor(arg1, arg2) {\n this.fname = arg1;\n this.lname = arg2;\n}", "function createObject(makeNewItem, makeNewPrice) {\n\tthis.name = makeNewItem;\n\tthis.price = makeNewPrice;\n\treturn {name, price};\n}", "function makePerson(name, age) {\r\n\t// add code here\r\n\tlet personObj = Object.create(null);\r\n personObj.name = name;\r\n personObj.age = age;\r\n \r\n return personObj;\r\n\r\n}", "function applyNew(args){\n\t\t// create an object with ctor's prototype but without\n\t\t// calling ctor on it.\n\t\tvar ctor = args.callee, t = forceNew(ctor);\n\t\t// execute the real constructor on the new object\n\t\tctor.apply(t, args);\n\t\treturn t;\n\t}", "function applyNew(args){\n\t\t// create an object with ctor's prototype but without\n\t\t// calling ctor on it.\n\t\tvar ctor = args.callee, t = forceNew(ctor);\n\t\t// execute the real constructor on the new object\n\t\tctor.apply(t, args);\n\t\treturn t;\n\t}", "function applyNew(args){\n\t\t// create an object with ctor's prototype but without\n\t\t// calling ctor on it.\n\t\tvar ctor = args.callee, t = forceNew(ctor);\n\t\t// execute the real constructor on the new object\n\t\tctor.apply(t, args);\n\t\treturn t;\n\t}", "function construct(/*name, */constructor, args) {\n function F() {\n return constructor.apply(this, args);\n }\n F.prototype = constructor.prototype;\n return new F();\n /*\n this[name] = function() {\n return constructor.apply(this, args);\n };\n this[name].prototype = constructor.prototype;\n return new this[name]();\n */\n}", "function functionConstructorTest() {\n var f;\n\n /* Properties. */\n\n print('prototype' in Function, Function.prototype === Function.prototype);\n print('length' in Function, Function.length);\n\n /* Test Function() called both as a function and as a constructor. */\n\n f = Function('print(\"no args\");');\n f('foo', 'bar', 'quux');\n f = new Function('print(\"no args\");');\n f('foo', 'bar', 'quux');\n\n f = Function('x', 'print(\"one arg\", x);');\n f('foo', 'bar', 'quux');\n f = new Function('x', 'print(\"one arg\", x);');\n f('foo', 'bar', 'quux');\n\n f = Function('x', 'y', 'print(\"two args\", x, y);');\n f('foo', 'bar', 'quux');\n f = new Function('x', 'y', 'print(\"two args\", x, y);');\n f('foo', 'bar', 'quux');\n\n f = Function('a', 'b', 'c', 'd', 'e', 'f', 'g', 'print(\"seven args\", a, b, c, d, e, f, g);');\n f('foo', 'bar', 'quux');\n f = new Function('a', 'b', 'c', 'd', 'e', 'f', 'g', 'print(\"seven args\", a, b, c, d, e, f, g);');\n f('foo', 'bar', 'quux');\n\n /* Example from specification (E5.1, Section 15.3.2.1, NOTE at bottom). */\n\n f = new Function(\"a\", \"b\", \"c\", \"return a+b+c\");\n print(f('foo', 'bar', 'quux', 'baz'));\n f = new Function(\"a, b, c\", \"return a+b+c\");\n print(f('foo', 'bar', 'quux', 'baz'));\n f = new Function(\"a,b\", \"c\", \"return a+b+c\");\n print(f('foo', 'bar', 'quux', 'baz'));\n}", "function create(c) {\n return new c();\n}", "function create(c) {\n return new c();\n}", "function create(c) {\n return new c();\n}", "function create(c) {\n return new c();\n}", "function cheapNew(cls) {\n\t\t\t\tdisable_constructor = true;\n\t\t\t\tvar rv = new cls;\n\t\t\t\tdisable_constructor = false;\n\t\t\t\treturn rv;\n\t\t\t}", "function new_constructor(extend, initializer, methods){\n\t\t\tvar func,\n\t\t\t\tmethodsArr,\n\t\t\t\tmethodsLen,\n\t\t\t\tk,\n\t\t\t\tprototype = Object.create(extend && extend.prototype);\t// ES5, but backup function provided above\n\t\t\t\n\t\t\tif(methods){\n\t\t\t\tmethodsArr = Object.keys(methods);\t\t\t\t\t\t// ES5, but backup function provided above\n\t\t\t\tmethodsLen = methodsArr.length;\n\t\t\t\tfor(k = methodsLen; k--;){\n\t\t\t\t\tprototype[methodsArr[k]] = methods[methodsArr[k]];\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfunc = function(){\t\t\n\t\t\t\tvar that = Object.create(prototype);\t\t\t\t\t// ES5, but backup function provided above\n\t\t\t\tif(typeof initializer === \"function\"){\n\t\t\t\t\tinitializer.apply(that, arguments);\n\t\t\t\t}\n\t\t\t\treturn that;\n\t\t\t};\n\t\t\t\n\t\t\tfunc.prototype = prototype;\n\t\t\tprototype.constructor = func;\n\t\t\treturn func;\n\t\t}", "function _new(Cls) {\n return new(Cls.bind.apply(Cls, arguments))();\n }", "function create(...values) {\n return fromArray(values);\n}", "constructur() {}", "function construct(constructor, args) {\n var c = function () {\n return constructor.apply(this, args);\n };\n c.prototype = constructor.prototype;\n return new c();\n }", "function objectFactory() {\n\n var obj = new Object(),\n\n Constructor = [].shift.call(arguments);\n\n obj.__proto__ = Constructor.prototype;\n\n var ret = Constructor.apply(obj, arguments);\n\n return typeof ret === 'object' ? ret : obj;\n}", "function myNew(func, ...arg) {\n let obj = {};\n obj.__proto__ = func.prototype;\n let res = func.apply(obj, arg);\n return res instanceof Object? res: obj;\n}", "function new_(a, b, c, d, e, f, g, h, i) {\n\tswitch (arguments.length) {\n\t\tcase 0: return new this();\n\t\tcase 1: return new this(a);\n\t\tcase 2: return new this(a, b);\n\t\tcase 3: return new this(a, b, c);\n\t\tcase 4: return new this(a, b, c, d);\n\t\tcase 5: return new this(a, b, c, d, e);\n\t\tcase 6: return new this(a, b, c, d, e, f);\n\t\tcase 7: return new this(a, b, c, d, e, f, g);\n\t\tcase 8: return new this(a, b, c, d, e, f, g, h);\n\t\tcase 9: return new this(a, b, c, d, e, f, g, h, i);\n\t\tdefault:\n\t\t\t// Attempt the theorectically equivalent way\n\t\t\t// Native objects often detect this and throw;\n\t\t\t// luckily there aren't many native objects that take >9 arguments; so this case is rare\n\t\t\tvar obj = Object.create(this.prototype);\n\t\t\tvar ret = this.apply(obj, arguments);\n\t\t\treturn (typeof ret === 'object' && ret !== null)?ret:obj;\n\t}\n}", "function userCreater(name,score){\n\t//let newUser = objects.create()\n\tlet newUser = Object.create(userFunctions);\n\tnewUser.name = name;\n\tnewUser.score = score;\n\treturn newUser;\n}", "function construct(constructor, args) {\n var c = function () {\n return constructor.apply(this, args);\n };\n c.prototype = constructor.prototype;\n return new c();\n }", "function Ctor() {}", "function newOperator(constructor, ...params){\n const result = {}\n Object.setPrototypeOf(result, Person.prototype)\n constructor.apply(result, params)\n return result\n}", "function createPerson(name, age, job) {\n var o = new Object();\n o.name = name;\n o.age = age;\n o.job = job;\n o.sayName = function() {\n return this.name;\n }\n return o;\n}", "function StudentsObjectCreator(studentName, studentLastName, studentAge) {\n this.studentName = studentName;\n this.studentLastName = studentLastName;\n this.studentAge = studentAge;\n}", "function temporaryConstructor() {}", "function construct(constructor, args) {\n var c = function () {\n return new constructor();\n // return constructor.apply(this, args);\n };\n c.prototype = constructor.prototype;\n return new c();\n }", "function Person3 (name, age, job) {\n this.name = name;\n this.age = age;\n this.job = job;\n // every function is a new object\n this.sayName = sayName;\n}", "function construct(constructor, args) {\n var c = function () {\n return constructor.apply(this, args);\n };\n c.prototype = constructor.prototype;\n return new c();\n }", "function construct(constructor, args) {\n var c = function () {\n return constructor.apply(this, args);\n };\n c.prototype = constructor.prototype;\n return new c();\n }", "function construct(constructor, args) {\n var dynamicClass = function () {\n return constructor.apply(this, args);\n };\n dynamicClass.prototype = constructor.prototype;\n return new dynamicClass();\n }", "function xnew(thexPersonConstructor){\n\t//1. create a new object\n\tvar xobject ={}\n\t//2. Set the prototype\n\tObject.setPrototypeOf(xobject, thexPersonConstructor.prototype)\n\n\t//\"arguments\" key word returns the arguments you've added within a function\n\tconsole.log(arguments)//{ '0': [Function: Xperson], '1': 'I love dogs' }\n\n\t//This turns arguments into an array and gives you access to the slice prototype\n\tvar argsArray =Array.prototype.slice.apply(arguments)\n\tconsole.log(argsArray)//[ [Function: Xperson], 'I love dogs' ]\n\n\tconsole.log(argsArray.slice(1))//[ 'I love dogs' ]\n\t\n\t//3. execute constructor with \"this\" keyword (in this example the constructor is Xperson)\n\t//apply is similar to bind but it executs the function immediately\n\t//apply's first argument is the object you want to set as this (in this example it's xobj)\n\t//apply's second argument is an array of the arguments you want to use in the function\n\t//thexPersonConstructor.apply(xobject,['I love dogs'])\n\tthexPersonConstructor.apply(xobject, argsArray.slice(1))\n\t//4. return the created object\n\treturn xobject\n\n}", "function newPerson(name, age, occupation, phrases){\n\t\t// Incrementing 'count' class variable\n\t\tcount ++\n\t\t///////////////\n\n\t\t// Instantiating instance variables\n\t\tlet personName = name\n\t\tlet personAge = age\n\t\tlet personOccupation = occupation\n\t\tlet personPhrases = [...phrases]\n\t\t///////////////\n\n\t\t// Instance methods\n function whoAmI(){\n return `My name is ${this.getName()}. I am ${this.getAge()}, and I work as a ${this.getOccupation()}`\n }\n function sayRandomPhrase(){\n \treturn personPhrases[Math.floor(Math.random()*personPhrases.length)]\n }\n function addPhrase(phrase){\n \tpersonPhrases.push(phrase)\n }\n function removePhrase(index){\n \tpersonPhrases = [...personPhrases.slice(0,index), ...personPhrases.slice(index+1)]\n }\n ///////////////\n\n // Getters\n function getName(){\n \treturn personName\n }\n function getAge(){\n \treturn personAge\n }\n function getOccupation(){\n \treturn personOccupation\n }\n function getPhrases(){\n \treturn [...personPhrases]\n }\n ///////////////\n\n\n // Setters\n function setName(name) {\n \tpersonName = name\n }\n function setAge(age) {\n \tpersonAge = age\n }\n function setOccupation(occupation) {\n \tpersonOccupation = occupation\n }\n ///////////////\n\n\n // Building the Person instance object\n\n let personInstance = { \n \tgetPhrases: getPhrases,\n \tgetName: getName,\n \tgetAge: getAge,\n \tgetOccupation: getOccupation,\n \tsetName: setName,\n \tsetAge: setAge,\n \tsetOccupation: setOccupation,\n \twhoAmI: whoAmI,\n \taddPhrase: addPhrase,\n \tremovePhrase: removePhrase,\n \tsayRandomPhrase: sayRandomPhrase\n }\n ///////////////\n\n // Adding Person instance object to 'all' class variable\n\t\tall.push(personInstance)\n\t\t///////////////\n\n\t\treturn personInstance\n }", "function objectName(prperty1, property2) {\n let objectName = {};\n\n objectName.property1 = \"test\";\n objectName.property2 = \"test2\";\n\n objectName.doSomething1 = function name(params) {\n console.log(\"do something1\");\n };\n objectName.doSomething2 = function name(params) {\n console.log(\"do something2\");\n }\n return objectName;\n}", "static createRandomObject() {\n let o = new TestClass();\n o.value4 = new Date();\n o.value1 = o.value4.toDateString() + \"_\" + TestClass.counter.toString();\n o.value2 = o.value4.getMilliseconds() + TestClass.counter;\n let rnd;\n o.value3 = new Array(5);\n for (let i = 0; i < 5; i++) {\n rnd = Math.random();\n if (rnd > 0.5) {\n o.value3[i] = true;\n }\n else {\n o.value3[i] = false;\n }\n }\n TestClass.counter++;\n return o;\n }", "function ThingCreate(type, args) {\n var newthing = new Thing();\n Thing.apply(newthing, [type].concat(args));\n return newthing;\n}", "function createClass(props) {\n var constructoid = props['constructor'];\n\n function Class() {\n if (!(this instanceof Class)) {\n throw new TypeError('Cannot call a class as a function');\n }\n\n constructoid.apply(this, arguments);\n }\n\n for (var name in props) {\n if (name === 'constructor') continue;\n\n var method = props[name];\n\n Class.prototype[name] = method;\n }\n\n return Class;\n }", "function cheapNew(cls) {\n disable_constructor = true;\n var rv = new cls;\n disable_constructor = false;\n return rv;\n }", "function cheapNew(cls) {\n disable_constructor = true;\n var rv = new cls;\n disable_constructor = false;\n return rv;\n }", "function new_(constructor, argumentList) {\n if (!(constructor instanceof Function)) {\n throw new TypeError('new_ called with constructor type ' + typeof(constructor) + \" which is not a function\");\n }\n\n /*\n * Previously, the following line was just:\n\n function dummy() {};\n\n * Unfortunately, Chrome was preserving 'dummy' as the object's name, even though at creation, the 'dummy' has the\n * correct constructor name. Thus, objects created with IMVU.new would show up in the debugger as 'dummy', which\n * isn't very helpful. Using IMVU.createNamedFunction addresses the issue. Doublely-unfortunately, there's no way\n * to write a test for this behavior. -NRD 2013.02.22\n */\n var dummy = createNamedFunction(constructor.name, function(){});\n dummy.prototype = constructor.prototype;\n var obj = new dummy;\n\n var r = constructor.apply(obj, argumentList);\n return (r instanceof Object) ? r : obj;\n}", "function newObject() { return {}; }", "function functionConstructorTest() {\n var f;\n var pd;\n\n /* Properties. */\n\n print('prototype' in Function, Function.prototype === Function.prototype);\n pd = Object.getOwnPropertyDescriptor(Function, 'prototype');\n print(pd.writable, pd.enumerable, pd.configurable);\n print('length' in Function, Function.length);\n pd = Object.getOwnPropertyDescriptor(Function, 'length');\n print(pd.writable, pd.enumerable, pd.configurable);\n\n /* Test Function() called both as a function and as a constructor. */\n\n f = Function('print(\"no args\");');\n f('foo', 'bar', 'quux');\n f = new Function('print(\"no args\");');\n f('foo', 'bar', 'quux');\n\n f = Function('x', 'print(\"one arg\", x);');\n f('foo', 'bar', 'quux');\n f = new Function('x', 'print(\"one arg\", x);');\n f('foo', 'bar', 'quux');\n\n f = Function('x', 'y', 'print(\"two args\", x, y);');\n f('foo', 'bar', 'quux');\n f = new Function('x', 'y', 'print(\"two args\", x, y);');\n f('foo', 'bar', 'quux');\n\n f = Function('a', 'b', 'c', 'd', 'e', 'f', 'g', 'print(\"seven args\", a, b, c, d, e, f, g);');\n f('foo', 'bar', 'quux');\n f = new Function('a', 'b', 'c', 'd', 'e', 'f', 'g', 'print(\"seven args\", a, b, c, d, e, f, g);');\n f('foo', 'bar', 'quux');\n\n // Example from specification (E5.1, Section 15.3.2.1, NOTE at bottom).\n\n f = new Function('a', 'b', 'c', 'return a+b+c');\n print(f('foo', 'bar', 'quux', 'baz'));\n f = new Function('a, b, c', 'return a+b+c');\n print(f('foo', 'bar', 'quux', 'baz'));\n f = new Function('a,b', 'c', 'return a+b+c');\n print(f('foo', 'bar', 'quux', 'baz'));\n\n // In ES2015 the resulting function must have a .name of 'anonymous'.\n f = new Function('');\n pd = Object.getOwnPropertyDescriptor(f, 'name');\n print(typeof pd.value, pd.value, pd.writable, pd.enumerable, pd.configurable);\n pd = Object.getOwnPropertyDescriptor(f, 'length');\n print(typeof pd.value, pd.value, pd.writable, pd.enumerable, pd.configurable);\n f = new Function('a', 'b', 'return a+b');\n pd = Object.getOwnPropertyDescriptor(f, 'name');\n print(typeof pd.value, pd.value, pd.writable, pd.enumerable, pd.configurable);\n pd = Object.getOwnPropertyDescriptor(f, 'length');\n print(typeof pd.value, pd.value, pd.writable, pd.enumerable, pd.configurable);\n\n // Function is constructable.\n var fn = new Function('print(\"hello\");');\n x = new fn();\n print(typeof x);\n}", "function constructor(spec){\n // 1. initialize own members from spec\n let {member} = spec;\n\n // 2. composition with other objects\n // you can select only the parts that you want to use\n // you only \"inherit\" the stuff that you need\n let {other} = other_constructor(spec);\n\n // 3. methods\n let method = function(){ // close over other methods, variables and spec };\n\n // 4. Expose public API\n // Note new ES6 that lets you define object properties like this:\n // {method, other}\n // instea of\n // { method : method, other : other}\n return Object.freeze({ // immutable (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze)\n method,\n other\n });\n }\n}", "static getInstance(...rest) {\n\t\treturn new this(...rest);\n\t}", "function Multiton(limit) {\n let instances = [];\n // instance Constructor scoped to outer Constructor\n function Instance() {\n this.prop = 'value';\n this.someMethod = function () {\n /* ... */\n }\n }\n return {\n getInstance() {\n // instantiate n objects one time only\n if (instances.length === 0) {\n for (let i = 0; i < limit; i++) {\n instances.push(new Instance());\n }\n }\n // randomly access on of the instances\n // could easily be modified to return a specific instance (directory of singletons)\n const random = Math.floor(Math.random() * limit);\n return instances[random];\n }\n }\n}", "function createPerson()\n{ \n var person = new Object();\n person.name = \"siri\";\n person.age =\"28\";\n person.designation=\"trainer\";\n person.Phno = 9998788667;\n return person;\n}", "function createObject(proto) {\n\t\tvar f = function() {};\n\t\tf.prototype = proto;\n\t\treturn new f();\n\t}", "function objectMaker(value1, value2) {\n return {\n key1: value1,\n key2: value2\n }\n}", "function PersonConstructor(name, address, age) {\n\t// empty object\n\t//let personObj = {};\n\n\t//property creation and assignments\n\t// personObj.name = name;\n\t// personObj.address = address;\n\t// personObj.age = age;\n\n\t// new\n\tthis.name = name;\n\tthis.address = address;\n\tthis.age = age;\n\n\tthis.details = getDetails;\n\n\t//using the above created function --> getDetails\n\t// personObj.details = function() {\n\t// \treturn \"My name is \" + personObj.name + \" and I am from \" + personObj.address + \" and I am \" + personObj.age + \" years old.\";\n\t// };\n\n\t// returns the above created object;\n\t//return personObj;\n}", "function createAnother(original) { // 1\n\t \t\t\t\tvar clone = object(original); // 2 \n\t \t\t\t\tclone.sayHi = function() {\t\t\t// 3\n\t \t\t\t\t\treturn \"hello world\";\n\t \t\t\t\t};\n\t \t\t\t\treturn clone;\t\t\t\t\t\t\t// 4\n\t \t\t\t}", "function fakeNew(F, ...args) {\n const obj = Object.create(F.prototype); // prototype inheritance\n F.call(obj, ...args); // mixin\n return obj; // prototype + mixin is how js emulate class-based paradigm\n}", "function makeObj() {\n return {\n propA: 10,\n propB: 20,\n };\n}", "function createAnother(original){\n var clone = object(original); //create a new object by calling a function\n clone.sayHi = function(){ //augment the object in some way\n alert(\"hi\");\n };\n return clone; //return the object\n}", "function createNew(fn) {\n let obj = {};\n obj.__proto__ = fn.prototype;\n let result = fn.apply(obj, [...arguments].slice(1));\n if (result) {\n return result\n } else {\n return obj\n }\n}", "function Factory(n){\r\n\r\n }", "create() {}", "create() {}", "function makeAnObj(nameData, ageData){\n\tvar myObj = {\n\t\tname: nameData,\n\t\tage: ageData\n\t};\n\treturn myObj;\n}", "function individual_obj_factory(email_str, pwd_str, display_name_str, phone_str,\n ind_categories_obj, description_str, candidate_group_categories_obj, ready_status_int,\n candidates_array)\n {\n let individual_obj =\n {\n email : email_str,\n password : pwd_str,\n display_name : display_name_str,\n phone : phone_str,\n individual_categories : ind_categories_obj,\n description : description_str,\n candidate_group_categories : candidate_group_categories_obj,\n ready_status : ready_status_int,\n candidates : candidates_array\n }\n \n return individual_obj;\n }", "function createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}", "function createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}", "function createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}", "function createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}", "function createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}", "function createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}", "function createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}", "function createObject(proto) {\n\tvar f = function() {};\n\tf.prototype = proto;\n\treturn new f();\n}", "function object(o){\n function F(){}\n F.prototype = o;\n return new F();\n} // is the same as Object.create()", "function newGame(){\n\tvar create1 = new genQuestion(question1);\n\tvar create2 = new genQuestion(question2);\n\tvar create3 = new genQuestion(question3);\n\tvar create4 = new genQuestion(question4);\n\tvar create5 = new genQuestion(question5);\n}", "Constructor(args, returns, options = {}) {\r\n return { ...options, kind: exports.ConstructorKind, type: 'constructor', arguments: args, returns };\r\n }", "function SpoofConstructor(name){\n this.name=\"I am \" + name;\n return {name:\"I am Deadpool\"};\n}" ]
[ "0.7269592", "0.71305794", "0.6959858", "0.6889945", "0.6811198", "0.67037714", "0.66918826", "0.6671699", "0.6577214", "0.6538281", "0.65016484", "0.64441824", "0.6416497", "0.63833725", "0.6363711", "0.6361445", "0.6339496", "0.631635", "0.6316325", "0.6316325", "0.6316325", "0.6245002", "0.62356657", "0.62026334", "0.6181481", "0.6167156", "0.6159519", "0.61430293", "0.6137356", "0.612767", "0.6122722", "0.6119904", "0.6119904", "0.6119904", "0.6113268", "0.61125064", "0.6110727", "0.6110727", "0.6110727", "0.6110727", "0.6107868", "0.60971195", "0.60901135", "0.60788345", "0.6075698", "0.6068974", "0.60671484", "0.60650927", "0.60568136", "0.6054682", "0.60512173", "0.6037148", "0.6024644", "0.6018353", "0.60136056", "0.6003557", "0.6003058", "0.5994072", "0.5987169", "0.5987169", "0.5977061", "0.59703535", "0.5968856", "0.5966212", "0.5950773", "0.5928772", "0.5923495", "0.5918901", "0.5918901", "0.5918503", "0.5914621", "0.59062463", "0.5902401", "0.5902135", "0.5898727", "0.58952004", "0.5893481", "0.5879998", "0.58796597", "0.5876785", "0.5867169", "0.58661675", "0.58419144", "0.58249855", "0.5824971", "0.5812846", "0.5812846", "0.5811467", "0.5807385", "0.58067155", "0.58067155", "0.58067155", "0.58067155", "0.58067155", "0.58067155", "0.58067155", "0.58067155", "0.58042467", "0.5797921", "0.57950485", "0.57913965" ]
0.0
-1
May be removed. Not currently used
reset(){ this.ended = false; this.elements = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "private internal function m248() {}", "protected internal function m252() {}", "transient private protected internal function m182() {}", "transient private internal function m185() {}", "transient protected internal function m189() {}", "transient final protected internal function m174() {}", "static transient final private internal function m43() {}", "transient final private protected internal function m167() {}", "static final private internal function m106() {}", "transient final private internal function m170() {}", "static transient final protected internal function m47() {}", "transient private protected public internal function m181() {}", "static transient final protected public internal function m46() {}", "static transient final private protected internal function m40() {}", "static private internal function m121() {}", "static private protected internal function m118() {}", "static transient private protected internal function m55() {}", "transient private public function m183() {}", "transient final private protected public internal function m166() {}", "__previnit(){}", "static transient private protected public internal function m54() {}", "static transient final protected function m44() {}", "static final private protected internal function m103() {}", "transient final private public function m168() {}", "static transient private public function m56() {}", "static final private protected public internal function m102() {}", "static private protected public internal function m117() {}", "static transient private internal function m58() {}", "static transient final private public function m41() {}", "static protected internal function m125() {}", "obtain(){}", "static transient final private protected public function m38() {}", "static transient final private protected public internal function m39() {}", "static final protected internal function m110() {}", "function _____SHARED_functions_____(){}", "static final private public function m104() {}", "frame() {\n throw new Error('Not implemented');\n }", "postorder() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "function StupidBug() {}", "constructor () {\r\n\t\t\r\n\t}", "preorder() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "added() {}", "function TMP() {\n return;\n }", "constructor () { super() }", "static transient protected internal function m62() {}", "removed() {}", "removed() {}", "bfs() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "bfs() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "updated() {}", "function DWRUtil() { }", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "initialize() {}", "static private public function m119() {}", "method() {\n throw new Error('Not implemented');\n }", "constructor() {\n\n\t}", "init () {\n\t\treturn null;\n\t}", "function fm(){}", "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "compilable(_locator) {\n throw new Error('Method not implemented.');\n }", "toString(){\n\t\treturn 'not implemented';\n\t}", "constructor (){}", "update() {\n // Subclasses should override\n }", "__init25() {this.forceRenames = new Map()}", "_add () {\n throw new Error('not implemented')\n }", "function init() {\n\t \t\n\t }", "_initializeProperties(){}// prevent user code in connected from running", "constructor() {\n\t}", "constructor() {\n\t}", "lastUsed() { }", "function _construct()\n\t\t{;\n\t\t}", "_get () {\n throw new Error('_get not implemented')\n }", "function kp() {\n $log.debug(\"TODO\");\n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }", "constructor() {\n \n\n \n \n\n \n\n \n }" ]
[ "0.7391319", "0.73725605", "0.71413606", "0.69961905", "0.6908526", "0.6878456", "0.6851884", "0.65124625", "0.64934975", "0.64694625", "0.6425184", "0.64128214", "0.6326194", "0.62956107", "0.62510985", "0.61789596", "0.61450046", "0.6122066", "0.610433", "0.60626006", "0.6017636", "0.58802253", "0.5875726", "0.5810182", "0.57587516", "0.5720856", "0.5672496", "0.56616354", "0.56299084", "0.56136197", "0.5613228", "0.55976605", "0.5595528", "0.559163", "0.5588349", "0.55850595", "0.5550571", "0.54567206", "0.5430056", "0.53918046", "0.53751355", "0.53664494", "0.5334305", "0.53303796", "0.5277791", "0.526675", "0.52426416", "0.52426416", "0.5240627", "0.5240627", "0.5231755", "0.52170795", "0.5186555", "0.5186555", "0.5186555", "0.5186555", "0.5186555", "0.5186555", "0.5176127", "0.5175486", "0.51664263", "0.51643634", "0.5145701", "0.51129895", "0.51129895", "0.51129895", "0.5109644", "0.51056796", "0.5080986", "0.5079851", "0.50760114", "0.5071255", "0.5063175", "0.50598496", "0.50598496", "0.505949", "0.50569034", "0.50549346", "0.5053168", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356", "0.5048356" ]
0.0
-1
This method is used to set a custom terminal function for the push on the last created Flow in the Flow chain
setTerminalFunction(func){ if( Util.isFunction(func) ) this.terminalFunc = func; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "push(input){\n this.next !== null ? this.next.push(input) : this.terminalFunc(input);\n }", "Push() {\n\n }", "function Push() {\n console.debug(\"Push()\");\n}", "static get PUSH_LEFT() { return \"pushLeft\"; }", "function setTerminal() {\n \"use strict\";\n addInput(SHELLNEW);\n document.getElementById('terminalInputId').focus();\n}", "push (value) {\n this.stack.push(value)\n\n this.printStack()\n }", "function Terminal () {}", "pushToken(token: Token) {\n this.stack.push(token);\n }", "function setFunctions() {\r\n var commands = [\r\n { command: \"command1\", description: \"description1\" },\r\n { command: \"command2\", description: \"description2\" },\r\n ];\r\n messagePayload.commands = commands;\r\n\r\n console.log(\r\n JSON.stringify(\r\n sendPayload(\"setMyCommands\", messagePayload).getContentText()\r\n )\r\n );\r\n}", "push(param) {\n this.stack.push(param)\n //document.dispatchEvent(new Event(\"stack-change\"))\n }", "addToQueue(f, pushFront = false) {\n if (pushFront) {\n this.commandQueue.unshift(f);\n }\n else {\n this.commandQueue.push(f);\n }\n }", "get type() {\n return \"terminal\"\n }", "custom(fn) {\r\n\t\treturn this.push('fn', [...arguments]);\r\n\t}", "function pushOpFunc(func)\n {\n if (typeof func != 'function') {\n throw 'Passed operation is not a function';\n }\n \n opFuncStack.push(func);\n }", "addCommand(name, func) {\n return this.commands.push({\n name: name,\n func: func\n });\n }", "get push() { return this._push; }", "push(AnsiChar) {\n\t\tlet p = new Node(AnsiChar, this.top);\n\t\tthis.top = p;\n\t}", "function insertXMakeCommandText(func: string) {\n return func + '(${1})'\n}", "submit(){\n\t\tvar prompt = this.e.prompt.cloneNode(true);\n\t\tvar cmd = this.e.input.value;\n\t\tDB.terminal.history.push(cmd);\n\t\tthis.history = DB.terminal.history.length;\n\t\tprompt.replaceChild(createElement('span', {innerText:prompt.lastChild.value}), prompt.lastChild);\n\t\tprompt.className = 'prompt';\n\t\tthis.e.stdout.appendChild(prompt);\n\t\tthis.e.stdout.scrollTop = this.e.stdout.scrollHeight;\n\n\t\tthis.e.input.value = '';\n\t\tthis.e.input.setAttribute('disabled', '')\n\t\tAPI(\"terminal\", {id:this.id, stdin:cmd, env:this.env}).then(this.exe.bind(this, prompt)) \n\t}", "push(value) {\n\n// * create a new node from the value\n let newNode = new Node(value);\n\n// * point the next to the current `top`.\n newNode.next = this.top;\n\n// * set `top` of the stack to be our new `node`.\n this.top = newNode;\n }", "push(type, char){\n if(this.isempty()){\n if(type==1){ //No use of storing backspace operation for empty stack\n return;\n }\n this.stack.push([type,char]);\n this.size++;\n return;\n }\n let top=this.stack[this.size-1];\n if(type==top[0] && top[1].length<this.buffer){\n top=this.stack.pop();\n top=char+top[1]; //sequence is very imp because char+top[1] means most recent character at beginning\n //so if intially we had \"cba\" and push for 'd' is demanded then top will be \"dcba\" ..stack is \"dcba\" for \n //message typed as \"abcd\". this is required for delete operation.\n this.stack.push([type,top]);\n }\n else{\n this.stack.push([type,char]);\n this.size++;\n }\n return this.stack[this.size-1];\n }", "function push(stack, item) {\n stack.append(item)\n print(item + \" pushed to stack \")\n}", "addCommand(commandType, callback) {\n this.commands.push({\n type: commandType,\n callback: callback,\n })\n }", "unshift(_function, _arguments) {\n if (typeof _arguments !== 'undefined') {\n this.commandQueue.unshift([_function, _arguments]);\n }\n else {\n this.commandQueue.unshift(_function);\n }\n }", "push (behavior/*, ... params */) {\n let action = this.append(behavior)\n let params = toArray(arguments, 1)\n\n coroutine(action, action.behavior.apply(null, params), this)\n\n return action\n }", "push(_function, _arguments) {\n if (typeof _arguments !== 'undefined') {\n this.commandQueue.push([_function, _arguments]);\n }\n else {\n this.commandQueue.push(_function);\n }\n }", "function createCommand(socket) {\n return function(payload) {\n self.sendNotification(socket, payload);\n };\n }", "addCommand(command) {\n this.buffer.push(command)\n }", "function addOp(chr)\n\t{\n\t\tvar token;\n\t\tvar newToken = new tree.Token(tree.Token.functionType, chr);\n\n//\t\t//trace('addOp');\n//\t\tnewToken.printToken();\n\n\t\twhile (token = stack.pop())\n\t\t{\n//\t\t\ttoken.printToken();\n\n\t\t\t// DG: This is a bit suspect. I removed a redundant clause. Does it really cover all cases?\n\t\t\tif ((token.tokenType === tree.Token.functionType && token.getPrecedence() >= newToken.getPrecedence())\n\t\t\t\t|| token.tokenType === tree.Token.unaryNeg)\n\t\t\t{\n\t\t\t\tpostFixTokens.push(token);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Put back the one we didn't need to pop off\n\t\tif (token != undefined)\n\t\t\tstack.push(token);\n\n\t\tstack.push(newToken);\n\n//\t\tParser.printArray();\n\t}", "function addByPrecedence()\n\t{\n\t\tvar newToken = new tree.Token(tree.Token.functionType, nextChar);\n\n//\t\t//trace('addByPrecedence');\n//\t\tnewToken.printToken();\n\n\t\twhile (tempToken = stack.pop())\n\t\t{\n\t\t\tif (tempToken.getPrecedence() >= newToken.getPrecedence())\n\t\t\t\tpostFixTokens.push(tempToken);\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Put back the one we didn't need to pop off\n\t\tif (tempToken !== undefined)\n\t\t\tstack.push(tempToken);\n\n\t\tstack.push(newToken);\n\n//\t\tParser.printArray();\n\t}", "addHook (hook) {\n this.hooks.push(hook)\n }", "addFunctionToCallback(ƒ){\n this.createdCallback.push(ƒ);\n }", "popOperator() {\n if (top(this.operators) instanceof BinOp) {\n const t1 = this.operands.pop();\n const t0 = this.operands.pop();\n const operator = this.operators.pop()\n operator.setOperands(t0, t1);\n this.operands.push(operator);\n }\n else if (top(this.operators) instanceof UnOp) {\n const operator = this.operators.pop();\n operator.setOperands(this.operands.pop());\n this.operands.push(operator);\n }\n else if (top(this.operators) instanceof Func) {\n const operator = this.operators.pop();\n while (operator.args.length < operator.length) {\n operator.pushArg(this.operands.pop());\n }\n this.operands.push(operator);\n }\n }", "function push(val) {\n stack[++topp] = val;\n \n}", "push(v) {\n this.stack.push(v);\n }", "function push() {\n history.length = ++index.value;\n history.push(clone(circles.value));\n console.log(toRaw(history));\n }", "function pushOp( node, btc,target) {\n var reg1 = uniquegen()\n expnode(node.operand1, reg1, btc)\n var reg2 = uniquegen()\n expnode(node.operand2, reg2, btc)\n btc.push({\"type\":node.type,\"operand1\":reg1,\"operand2\":reg2,\"target\":target})\n }", "constructor(func) {\n super([\n new WriteVals([0, 0, 0, 0, 0, 0], 0),\n new WriteA0(null, 0),\n new _PopA5(func), //putchar\n new StackPivot(null, null),\n new Spacer(512),\n new PopA0(0), //this will get overwritten\n new PopS0(0x30000000), //this too\n new _CallA5(0),\n ]);\n }", "push(x){\r\n this.stack.push(x);\r\n this.size++;\r\n }", "function StackSym() {\r\n}", "writePushPop(command, segment, index) {\n const instructions = [\n this._addComment(`${command}, ${segment} ${index}`),\n ...this._transPushOrPop(command, segment, index),\n ]\n this._write(instructions.join(EOL))\n }", "function shared_nodeStackHandler(stack, item, add) {\n if (item) {\n if (add) {\n stack.unshift(item);\n } else {\n stack.shift();\n }\n }\n }", "function Assign_Stack_Lex() {\r\n}", "registerCommand(command){\n this.get('commands').push(command);\n\n command.register && command.register(this);\n }", "addnew() { return this.append(basics.objapply(BotCommand, [this.bot].concat(Array.from(arguments)))); }", "pushed(){\n console.log(\"push push!!! Energy!!\")\n this.energy+=10\n }", "pushTokens(tokens: Token[]) {\n this.stack.push(...tokens);\n }", "function Assign_Lex_Stack() {\r\n}", "pushOperator(op) {\n while (this.operators.length && op.getPrecedence() < top(this.operators).getPrecedence()) {\n this.popOperator();\n }\n this.operators.push(op);\n }", "push (value) {\n const newNode = new Node(value)\n\n if (this.length === 0) {\n this.top = newNode\n this.bottom = newNode\n } else {\n newNode.next = this.top\n this.top = newNode\n }\n\n this.length++\n // this.printStack()\n }", "@action addUndoStep(value) {\n let that = this;\n let undoHistory = that.undoHistory;\n\n undoHistory.pushObject(value);\n\n that.undoHistory = undoHistory;\n }", "function pushConsole(e, sender) {\n console.log(e, sender);\n}", "push(element) {\n this.stack.push(element);\n }", "function dup() {\r\n this.stack.push(this.stack[this.stack.length - 1]);\r\n}", "constructor() {\n this.command = \"\";\n }", "printLine() {\n console.log(\"+-----------+\");\n}", "enterProgram(ctx) { console.log(\" %s: %s\", __function, ctx.getText()); }", "function pushAdditional(fn) {\n\t var child = new this.constructor(this.client, this.tableCompiler, this.columnBuilder);\n\t fn.call(child, (0, _tail3.default)(arguments));\n\t this.sequence.additional = (this.sequence.additional || []).concat(child.sequence);\n\t}", "function myDoublerPusher() {\n\n}", "jumpPush(){\n\t\tthis.async_jump_pos.push(0);\n\t}", "function printn() {\r\n this.print(this.stack.pop().toString());\r\n}", "static push() {\n this.ctx.save();\n }", "function pusher(array) {\n return function(arg) {\n array.push(arg);\n };\n }", "pushOperator(value) {\n this.operation.push(value);\n }", "push(frame) {\n console.log('[CycleList push]:', this.cursor);\n var trace = this.data[this.cursor];\n var rootToken = frame.rootToken;\n\n var keys = Object.keys(trace);\n if (keys.indexOf(rootToken) === -1) {\n trace[rootToken] = [];\n }\n // trace[rootToken].push(frame.toString());\n trace[rootToken].push(frame);\n }", "function _handleNewTerminal() {\n terminalCollection.add({\n nodeConnection: nodeConnection\n });\n }", "addItem(value){\n this.first.addValue(value); // ? addValue is method called from stack\n }", "function createFunctionPrinter(input) {\n return () => console.log(input);\n}", "command() {\n return '';\n }", "function pushn(n) {\r\n this.stack.push(n);\r\n}", "select(func){\n var flow = new Flow();\n if( Util.isFunction(func) )\n flow.pipeFunc = func;\n else{\n flow.pipeFunc = function(input){\n return input[func];\n };\n }\n\n setRefs(this, flow);\n\n return flow;\n }", "pop() {\n // YOUR CODE HERE\n }", "function addToStack(value){\n prefixstack.push(value);\n display(prefixstack);\n}", "queueGo() {\n let commands = [wcCommands.go()];\n\n this.queue.push(...commands);\n\n debug('Queueing Go Command');\n }", "function _overwrite(args, t) {\n var previous = _stack[_index].graph;\n if (_index > 0) {\n _index--;\n _stack.pop();\n }\n _stack = _stack.slice(0, _index + 1);\n var actionResult = _act(args, t);\n _stack.push(actionResult);\n _index++;\n return change(previous);\n }", "function StackSymbol() {\r\n}", "function newThing(){\n console.log(\"HEY!\")\n}", "function createExecFunc(commandStr) {\n return function () {\n // TODO TY: should flash menu here on Mac\n //console.log(commandStr);\n CommandManager.execute(commandStr);\n };\n }", "_link() {\r\n if(this.store.activeTab === \"n0\") {\r\n this.push(\"/\")\r\n }\r\n else {\r\n this.push(`/console/${this.connections[this.store.activeTab]}`)\r\n }\r\n }", "_commandsChanged(newValue){this.addCommands(newValue)}", "addCommandEvents() {\n const { conf, command, creator } = this;\n const totalFrames = creator.getTotalFrames();\n const debug = conf.getVal('debug');\n\n // start\n command.on('start', commandLine => {\n const log = conf.getVal('log');\n if (log) console.log(commandLine);\n this.emits({ type: 'synthesis-start', command: commandLine });\n });\n\n // progress\n command.on('progress', progress => {\n const percent = progress.frames / totalFrames;\n this.emits({ type: 'synthesis-progress', percent });\n });\n\n // complete\n command.on('end', () => {\n if (!debug) this.deleteCacheFile();\n const output = conf.getVal('output');\n this.emits({ type: 'synthesis-complete', path: output, output });\n });\n\n // error\n command.on('error', (error, stdout, stderr) => {\n if (!debug) this.deleteCacheFile();\n this.emits({\n type: 'synthesis-error',\n error: `${error} \\n stdout: ${stdout} \\n stderr: ${stderr}`,\n pos: 'Synthesis',\n });\n });\n }", "pop() {\n\n }", "addAssistant(src){\n process.stdout.write(\"addAssistant\");\n }", "step(obs) {\n super.step(obs)\n if (!obs.observation.available_actions) {\n console.warn('************ MISSING obs.observation.available_actions ***********')\n console.warn(obs.observation)\n }\n const function_id = randomChoice(obs.observation.available_actions)\n const args = []\n this.action_spec.functions[function_id].args.forEach((arg) => {\n args.push(arg.sizes.map((size) => { //eslint-disable-line\n return Math.floor(Math.random() * size)\n }))\n })\n return new actions.FunctionCall(function_id, args)\n }", "function newcommand(oldstr, newstr) {\n AMsymbols.push({ input: oldstr, tag: \"mo\", output: newstr, tex: null, ttype: DEFINITION });\n refreshSymbols(); // this may be a problem if many symbols are defined!\n }", "setLastOperator(value) {\n this.operation[this.operation.length - 1] = value;\n }", "pop() {\n }", "push() {\n const address1 = this.sp - 1;\n const address2 = this.sp - 2;\n\n this.memory.writeROM(address1, this.a);\n this.memory.writeROM(address2, this.f);\n this.sp -= 2;\n }", "push(element){\n this.stack.push(element);\n this.top = this.stack[this.stack.length-1]\n }", "speak(line) {\n console.log(`This ${this.type} rabbit says '${line}'`);\n }", "function Useless()\n{\n\tconsole.log(\"Hardcoded command sent successfully\");\n}", "function lastPrintCar() {\n carBrand = \"Audi\";\n\n return function(type) {\n console.log(carBrand + \" \" + type)\n }\n}", "addToHistory({ commit }, command) {\n commit('ADD_TO_HISTORY', command)\n }", "function Pushable() {\n this.pushable = 1;\n \n this.pushMe = function(who) {\n let retval = {};\n retval[\"fin\"] = 0;\n retval[\"input\"] = \"&gt;\";\n if (IsAdjacent(this,who,\"nodiag\")) {\n retval[\"fin\"] = 1;\n let diffx = this.getx() - who.getx();\n let diffy = this.gety() - who.gety();\n let objmap = who.getHomeMap();\n let pushto = objmap.getTile(this.getx()+diffx,this.gety()+diffy);\n if (pushto === \"OoB\") { return this.pullMe(); }\n let canmove = pushto.canMoveHere(MOVE_WALK);\n let canpush = 0;\n if (canmove[\"canmove\"]) {\n canpush = 1;\n let fea = pushto.features.getAll();\n for (let i=0;i<fea.length;i++) {\n if (fea[i].nopush) { canpush = 0; }\n }\n }\n if (canpush) {\n objmap.moveThing(this.getx()+diffx,this.gety()+diffy,this);\n retval[\"txt\"] = \"Push: \" + this.getDesc() + \".\";\n if (\"facing\" in this) {\n let graphic;\n if (diffx > 0) { this.facing = 1; graphic = this.getGraphicFromFacing(1); }\n else if (diffx < 0) { this.facing = 3; graphic = this.getGraphicFromFacing(3); }\n else if (diffy > 0) { this.facing = 2; graphic = this.getGraphicFromFacing(2); }\n else if (diffy < 0) { this.facing = 0; graphic = this.getGraphicFromFacing(0); }\n this.setGraphicArray(graphic);\n }\n if ((typeof this.getLight === \"function\") && (this.getLight() !== 0)) {\n if (PC.getHomeMap() === objmap) {\n DrawMainFrame(\"draw\",objmap,PC.getx(),PC.gety());\n }\n } else {\n if ((PC.getHomeMap() === objmap) && (GetDistance(PC.getx(),PC.gety(),this.getx(),this.gety(),\"square\") <= 6)) {\n DrawMainFrame(\"one\",objmap,this.getx(),this.gety());\n DrawMainFrame(\"one\",objmap,this.getx()-diffx,this.gety()-diffy);\n }\n }\n } else {\n retval = this.pullMe(who);\n }\n } else {\n retval[\"txt\"] = \"You can't push that from here.\";\n }\n return retval;\n }\n this.pullMe = function(who) {\n let retval = {fin:1,input:\"&gt;\"};\n let objmap = this.getHomeMap();\n let diffx = this.getx()-who.getx();\n let diffy = this.gety()-who.gety();\n let movetox = who.getx();\n let movetoy = who.gety();\n if (movetox && movetoy && this.getx() && this.gety()) {\n objmap.moveThing(0,0,this);\n } else { objmap.moveThing(3,3,this); }\n let moveval = who.moveMe(diffx,diffy);\n objmap.moveThing(movetox,movetoy,this);\n retval[\"txt\"] = \"Pull: \" + this.getDesc() + \".\";\n retval[\"canmove\"] = moveval[\"canmove\"];\n if (\"facing\" in this) {\n let graphic;\n if (diffx > 0) { this.facing = 1; graphic = this.getGraphicFromFacing(1); }\n else if (diffx < 0) { this.facing = 3; graphic = this.getGraphicFromFacing(3); }\n else if (diffy > 0) { this.facing = 2; graphic = this.getGraphicFromFacing(2); }\n else if (diffy < 0) { this.facing = 0; graphic = this.getGraphicFromFacing(0); }\n this.setGraphicArray(graphic);\n }\n if (objmap === PC.getHomeMap()) { DrawMainFrame(\"one\",objmap,movetox,movetoy); }\n\n if ((typeof this.getLight === \"function\") && (this.getLight() !== 0)) {\n if (PC.getHomeMap() === objmap) {\n DrawMainFrame(\"draw\",objmap,PC.getx(),PC.gety());\n }\n } else {\n if ((PC.getHomeMap() === objmap) && (GetDistance(PC,this,\"square\") <= 6)) {\n DrawMainFrame(\"one\",objmap,this.getx(),this.gety());\n DrawMainFrame(\"one\",objmap,this.getx()-diffx,this.gety()-diffy);\n }\n }\n \n return retval;\n }\n}", "started () { this.state = Command.STATE.CREATE; }", "function onLoadLastHook(commandStr) {\n if(typeof(commandStr) == \"string\"){\n onLoadLastStack[onLoadLastStack.length] = commandStr;\n return true;\n }\n return false;\n}", "function setTypeToAdd(){\n type = \"add\";\n console.log(type);\n}", "function chainOperation(input) {\n opChain.push(input);\n}", "function push(){\n\t//push list onto list of moves for solution. Also does moves without showing them.\n\tfor (var i=0;i<push.arguments.length;i++){\n\t\tvar c=push.arguments[i];\n\t\tif(sequence.length && sequence[sequence.length-1]+c==3) sequence.length--;\n\t\telse sequence[sequence.length]=c;\n\t\tmove(c);\n\t}\n}", "function pushColor() {\n\t const rgb = getRGB();\n\t changeRGB(rgb, [10, 10, 10]);\n\t applyTargetColor(rgb);\n\t}" ]
[ "0.5894712", "0.5687585", "0.55689806", "0.55226415", "0.5410262", "0.53981024", "0.53510433", "0.53049326", "0.52745247", "0.5273706", "0.527057", "0.525383", "0.5235407", "0.520267", "0.5181505", "0.51257867", "0.51084137", "0.50890785", "0.5045798", "0.5039319", "0.5020774", "0.5018962", "0.5006827", "0.49782187", "0.4974333", "0.49734646", "0.49612144", "0.49371138", "0.49270514", "0.4923747", "0.4910288", "0.48858625", "0.48517117", "0.48290944", "0.48139855", "0.4813887", "0.4810059", "0.4796466", "0.4795957", "0.47852206", "0.47835347", "0.47775084", "0.47744146", "0.4764284", "0.47642463", "0.4757761", "0.4752864", "0.4752266", "0.47417745", "0.47399414", "0.47330764", "0.47305837", "0.4717141", "0.47153094", "0.47099993", "0.47096518", "0.46972957", "0.46971998", "0.4690029", "0.46896386", "0.46894222", "0.46889138", "0.4680604", "0.4678256", "0.46722382", "0.46665257", "0.46579504", "0.4655321", "0.46451405", "0.46386862", "0.46366277", "0.46349984", "0.463421", "0.4631562", "0.46228153", "0.46148598", "0.46142343", "0.4614014", "0.4607066", "0.45994037", "0.45909667", "0.45865494", "0.45854414", "0.45776078", "0.4574438", "0.45740557", "0.457008", "0.45685828", "0.45684642", "0.45632166", "0.4562628", "0.45620146", "0.45588624", "0.4556368", "0.45561677", "0.45539516", "0.45483017", "0.45415482", "0.4534857", "0.45333174" ]
0.6085474
0
This method create a Flow from several data types. Supported data types are: Array, Flow, Map, Set, Object, FileSystem, JAMLogger
static from(data){ return FlowFactory.getFlow(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Flow(nodeList, flows, node, type) {\n this.nodeList = nodeList;\n this.flows = flows;\n this.node = node;\n this.type = type;\n}", "static of(){\n if( arguments.length == 0 )\n return FlowFactory.getFlow([]);\n\n if( arguments.length > 1 )\n return FlowFactory.getFlow(arguments);\n\n if( arguments.length == 1 && Util.isNumber(arguments[0]) )\n return new IteratorFlow(FlowFactory.createIteratorWithEmptyArraysFromNumber(arguments[0]));\n\n return FlowFactory.getFlow(arguments[0]);\n }", "function example(arg1: number, arg2: MyObject): Array<Object> {\n// ^ variable\n// ^ punctuation.type.flowtype\n// ^ support.type.builtin.primitive.flowtype\n// ^ variable\n// ^ support.type.class.flowtype\n// ^ punctuation.type.flowtype\n// ^ support.type.builtin.class.flowtype\n// ^ punctuation.flowtype\n// ^ support.type.builtin.class.flowtype\n// ^ punctuation.flowtype\n}", "function astFromValue(value, type) {\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_6__[\"isNonNullType\"])(type)) {\n var astValue = astFromValue(value, type.ofType);\n\n if (astValue && astValue.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].NULL) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n\n if (value === null) {\n return {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].NULL\n };\n } // undefined, NaN\n\n\n if (Object(_jsutils_isInvalid__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(value)) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_6__[\"isListType\"])(type)) {\n var itemType = type.ofType;\n\n if (Object(iterall__WEBPACK_IMPORTED_MODULE_0__[\"isCollection\"])(value)) {\n var valuesNodes = [];\n Object(iterall__WEBPACK_IMPORTED_MODULE_0__[\"forEach\"])(value, function (item) {\n var itemNode = astFromValue(item, itemType);\n\n if (itemNode) {\n valuesNodes.push(itemNode);\n }\n });\n return {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].LIST,\n values: valuesNodes\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_6__[\"isInputObjectType\"])(type)) {\n if (value === null || _typeof(value) !== 'object') {\n return null;\n }\n\n var fields = Object(_polyfills_objectValues__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(type.getFields());\n var fieldNodes = [];\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = fields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var field = _step.value;\n var fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].OBJECT_FIELD,\n name: {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].NAME,\n value: field.name\n },\n value: fieldValue\n });\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].OBJECT,\n fields: fieldNodes\n };\n }\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_6__[\"isLeafType\"])(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(value);\n\n if (Object(_jsutils_isNullish__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(serialized)) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n\n if (typeof serialized === 'boolean') {\n return {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].BOOLEAN,\n value: serialized\n };\n } // JavaScript numbers can be Int or Float values.\n\n\n if (typeof serialized === 'number') {\n var stringNum = String(serialized);\n return integerStringRegExp.test(stringNum) ? {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].INT,\n value: stringNum\n } : {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].FLOAT,\n value: stringNum\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_6__[\"isEnumType\"])(type)) {\n return {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].ENUM,\n value: serialized\n };\n } // ID types can use Int literals.\n\n\n if (type === _type_scalars__WEBPACK_IMPORTED_MODULE_7__[\"GraphQLID\"] && integerStringRegExp.test(serialized)) {\n return {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].INT,\n value: serialized\n };\n }\n\n return {\n kind: _language_kinds__WEBPACK_IMPORTED_MODULE_5__[\"Kind\"].STRING,\n value: serialized\n };\n }\n\n throw new TypeError(\"Cannot convert value to AST: \".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(serialized)));\n } // Not reachable. All possible input types have been considered.\n\n /* istanbul ignore next */\n\n\n throw new Error(\"Unexpected input type: \\\"\".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(type), \"\\\".\"));\n}", "function astFromValue(value, type) {\n if ((0, _definition.isNonNullType)(type)) {\n var astValue = astFromValue(value, type.ofType);\n\n if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n\n if (value === null) {\n return {\n kind: _kinds.Kind.NULL\n };\n } // undefined\n\n\n if (value === undefined) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n\n if ((0, _definition.isListType)(type)) {\n var itemType = type.ofType;\n\n if ((0, _isCollection[\"default\"])(value)) {\n var valuesNodes = []; // Since we transpile for-of in loose mode it doesn't support iterators\n // and it's required to first convert iteratable into array\n\n for (var _i2 = 0, _arrayFrom2 = (0, _arrayFrom3[\"default\"])(value); _i2 < _arrayFrom2.length; _i2++) {\n var item = _arrayFrom2[_i2];\n var itemNode = astFromValue(item, itemType);\n\n if (itemNode != null) {\n valuesNodes.push(itemNode);\n }\n }\n\n return {\n kind: _kinds.Kind.LIST,\n values: valuesNodes\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n\n if ((0, _definition.isInputObjectType)(type)) {\n if (!(0, _isObjectLike[\"default\"])(value)) {\n return null;\n }\n\n var fieldNodes = [];\n\n for (var _i4 = 0, _objectValues2 = (0, _objectValues3[\"default\"])(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: _kinds.Kind.OBJECT_FIELD,\n name: {\n kind: _kinds.Kind.NAME,\n value: field.name\n },\n value: fieldValue\n });\n }\n }\n\n return {\n kind: _kinds.Kind.OBJECT,\n fields: fieldNodes\n };\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if ((0, _definition.isLeafType)(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(value);\n\n if (serialized == null) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n\n if (typeof serialized === 'boolean') {\n return {\n kind: _kinds.Kind.BOOLEAN,\n value: serialized\n };\n } // JavaScript numbers can be Int or Float values.\n\n\n if (typeof serialized === 'number' && (0, _isFinite[\"default\"])(serialized)) {\n var stringNum = String(serialized);\n return integerStringRegExp.test(stringNum) ? {\n kind: _kinds.Kind.INT,\n value: stringNum\n } : {\n kind: _kinds.Kind.FLOAT,\n value: stringNum\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if ((0, _definition.isEnumType)(type)) {\n return {\n kind: _kinds.Kind.ENUM,\n value: serialized\n };\n } // ID types can use Int literals.\n\n\n if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) {\n return {\n kind: _kinds.Kind.INT,\n value: serialized\n };\n }\n\n return {\n kind: _kinds.Kind.STRING,\n value: serialized\n };\n }\n\n throw new TypeError(\"Cannot convert value to AST: \".concat((0, _inspect[\"default\"])(serialized), \".\"));\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || (0, _invariant[\"default\"])(0, 'Unexpected input type: ' + (0, _inspect[\"default\"])(type));\n}", "function astFromValue(value, type) {\n if ((0, _definition.isNonNullType)(type)) {\n var astValue = astFromValue(value, type.ofType);\n\n if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n\n if (value === null) {\n return {\n kind: _kinds.Kind.NULL\n };\n } // undefined\n\n\n if (value === undefined) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n\n if ((0, _definition.isListType)(type)) {\n var itemType = type.ofType;\n var items = (0, _safeArrayFrom.default)(value);\n\n if (items != null) {\n var valuesNodes = [];\n\n for (var _i2 = 0; _i2 < items.length; _i2++) {\n var item = items[_i2];\n var itemNode = astFromValue(item, itemType);\n\n if (itemNode != null) {\n valuesNodes.push(itemNode);\n }\n }\n\n return {\n kind: _kinds.Kind.LIST,\n values: valuesNodes\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n\n if ((0, _definition.isInputObjectType)(type)) {\n if (!(0, _isObjectLike.default)(value)) {\n return null;\n }\n\n var fieldNodes = [];\n\n for (var _i4 = 0, _objectValues2 = (0, _objectValues3.default)(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: _kinds.Kind.OBJECT_FIELD,\n name: {\n kind: _kinds.Kind.NAME,\n value: field.name\n },\n value: fieldValue\n });\n }\n }\n\n return {\n kind: _kinds.Kind.OBJECT,\n fields: fieldNodes\n };\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if ((0, _definition.isLeafType)(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(value);\n\n if (serialized == null) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n\n if (typeof serialized === 'boolean') {\n return {\n kind: _kinds.Kind.BOOLEAN,\n value: serialized\n };\n } // JavaScript numbers can be Int or Float values.\n\n\n if (typeof serialized === 'number' && (0, _isFinite.default)(serialized)) {\n var stringNum = String(serialized);\n return integerStringRegExp.test(stringNum) ? {\n kind: _kinds.Kind.INT,\n value: stringNum\n } : {\n kind: _kinds.Kind.FLOAT,\n value: stringNum\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if ((0, _definition.isEnumType)(type)) {\n return {\n kind: _kinds.Kind.ENUM,\n value: serialized\n };\n } // ID types can use Int literals.\n\n\n if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) {\n return {\n kind: _kinds.Kind.INT,\n value: serialized\n };\n }\n\n return {\n kind: _kinds.Kind.STRING,\n value: serialized\n };\n }\n\n throw new TypeError(\"Cannot convert value to AST: \".concat((0, _inspect.default)(serialized), \".\"));\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || (0, _invariant.default)(0, 'Unexpected input type: ' + (0, _inspect.default)(type));\n}", "createFlow() {\n // Very simple random unique ID generator\n this.formattedFlow.flowId = `${new Date().getTime()}`;\n this.formattedFlow.flowName = this.originalFlow.flow;\n this.formattedFlow.comment = this.originalFlow.comment;\n this.formattedFlow.startAt = this.originalFlow.startAt;\n this.formattedFlow.states = Object.assign({}, this.originalFlow.states);\n this.formattedFlow.flowStartTime = new Date().getTime();\n this.formattedFlow.flowExecutionTime = '';\n\n return { isError: false, code: this.code, item: this.formattedFlow };\n }", "function astFromValue(value, type) {\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isNonNullType\"])(type)) {\n var astValue = astFromValue(value, type.ofType);\n\n if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].NULL) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n\n if (value === null) {\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].NULL\n };\n } // undefined\n\n\n if (value === undefined) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isListType\"])(type)) {\n var itemType = type.ofType;\n\n if (Object(_jsutils_isCollection_mjs__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(value)) {\n var valuesNodes = []; // Since we transpile for-of in loose mode it doesn't support iterators\n // and it's required to first convert iteratable into array\n\n for (var _i2 = 0, _arrayFrom2 = Object(_polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value); _i2 < _arrayFrom2.length; _i2++) {\n var item = _arrayFrom2[_i2];\n var itemNode = astFromValue(item, itemType);\n\n if (itemNode != null) {\n valuesNodes.push(itemNode);\n }\n }\n\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].LIST,\n values: valuesNodes\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isInputObjectType\"])(type)) {\n if (!Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(value)) {\n return null;\n }\n\n var fieldNodes = [];\n\n for (var _i4 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].OBJECT_FIELD,\n name: {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].NAME,\n value: field.name\n },\n value: fieldValue\n });\n }\n }\n\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].OBJECT,\n fields: fieldNodes\n };\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isLeafType\"])(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(value);\n\n if (serialized == null) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n\n if (typeof serialized === 'boolean') {\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].BOOLEAN,\n value: serialized\n };\n } // JavaScript numbers can be Int or Float values.\n\n\n if (typeof serialized === 'number' && Object(_polyfills_isFinite_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(serialized)) {\n var stringNum = String(serialized);\n return integerStringRegExp.test(stringNum) ? {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].INT,\n value: stringNum\n } : {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].FLOAT,\n value: stringNum\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isEnumType\"])(type)) {\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].ENUM,\n value: serialized\n };\n } // ID types can use Int literals.\n\n\n if (type === _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_8__[\"GraphQLID\"] && integerStringRegExp.test(serialized)) {\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].INT,\n value: serialized\n };\n }\n\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].STRING,\n value: serialized\n };\n }\n\n throw new TypeError(\"Cannot convert value to AST: \".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(serialized), \".\"));\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(0, 'Unexpected input type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(type));\n}", "function astFromValue(value, type) {\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isNonNullType\"])(type)) {\n var astValue = astFromValue(value, type.ofType);\n\n if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].NULL) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n\n if (value === null) {\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].NULL\n };\n } // undefined\n\n\n if (value === undefined) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isListType\"])(type)) {\n var itemType = type.ofType;\n\n if (Object(_jsutils_isCollection_mjs__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(value)) {\n var valuesNodes = []; // Since we transpile for-of in loose mode it doesn't support iterators\n // and it's required to first convert iteratable into array\n\n for (var _i2 = 0, _arrayFrom2 = Object(_polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(value); _i2 < _arrayFrom2.length; _i2++) {\n var item = _arrayFrom2[_i2];\n var itemNode = astFromValue(item, itemType);\n\n if (itemNode != null) {\n valuesNodes.push(itemNode);\n }\n }\n\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].LIST,\n values: valuesNodes\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isInputObjectType\"])(type)) {\n if (!Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(value)) {\n return null;\n }\n\n var fieldNodes = [];\n\n for (var _i4 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].OBJECT_FIELD,\n name: {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].NAME,\n value: field.name\n },\n value: fieldValue\n });\n }\n }\n\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].OBJECT,\n fields: fieldNodes\n };\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isLeafType\"])(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(value);\n\n if (serialized == null) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n\n if (typeof serialized === 'boolean') {\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].BOOLEAN,\n value: serialized\n };\n } // JavaScript numbers can be Int or Float values.\n\n\n if (typeof serialized === 'number' && Object(_polyfills_isFinite_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(serialized)) {\n var stringNum = String(serialized);\n return integerStringRegExp.test(stringNum) ? {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].INT,\n value: stringNum\n } : {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].FLOAT,\n value: stringNum\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_9__[\"isEnumType\"])(type)) {\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].ENUM,\n value: serialized\n };\n } // ID types can use Int literals.\n\n\n if (type === _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_8__[\"GraphQLID\"] && integerStringRegExp.test(serialized)) {\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].INT,\n value: serialized\n };\n }\n\n return {\n kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_7__[\"Kind\"].STRING,\n value: serialized\n };\n }\n\n throw new TypeError(\"Cannot convert value to AST: \".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(serialized), \".\"));\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(0, 'Unexpected input type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(type));\n}", "function astFromValue(value, type) {\n if ((0, _definition.isNonNullType)(type)) {\n var astValue = astFromValue(value, type.ofType);\n\n if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _kinds.Kind.NULL) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n\n if (value === null) {\n return {\n kind: _kinds.Kind.NULL\n };\n } // undefined\n\n\n if (value === undefined) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n\n if ((0, _definition.isListType)(type)) {\n var itemType = type.ofType;\n var items = (0, _safeArrayFrom.default)(value);\n\n if (items != null) {\n var valuesNodes = [];\n\n for (var _i2 = 0; _i2 < items.length; _i2++) {\n var item = items[_i2];\n var itemNode = astFromValue(item, itemType);\n\n if (itemNode != null) {\n valuesNodes.push(itemNode);\n }\n }\n\n return {\n kind: _kinds.Kind.LIST,\n values: valuesNodes\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n\n if ((0, _definition.isInputObjectType)(type)) {\n if (!(0, _isObjectLike.default)(value)) {\n return null;\n }\n\n var fieldNodes = [];\n\n for (var _i4 = 0, _objectValues2 = (0, _objectValues.default)(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: _kinds.Kind.OBJECT_FIELD,\n name: {\n kind: _kinds.Kind.NAME,\n value: field.name\n },\n value: fieldValue\n });\n }\n }\n\n return {\n kind: _kinds.Kind.OBJECT,\n fields: fieldNodes\n };\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if ((0, _definition.isLeafType)(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(value);\n\n if (serialized == null) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n\n if (typeof serialized === 'boolean') {\n return {\n kind: _kinds.Kind.BOOLEAN,\n value: serialized\n };\n } // JavaScript numbers can be Int or Float values.\n\n\n if (typeof serialized === 'number' && (0, _isFinite.default)(serialized)) {\n var stringNum = String(serialized);\n return integerStringRegExp.test(stringNum) ? {\n kind: _kinds.Kind.INT,\n value: stringNum\n } : {\n kind: _kinds.Kind.FLOAT,\n value: stringNum\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if ((0, _definition.isEnumType)(type)) {\n return {\n kind: _kinds.Kind.ENUM,\n value: serialized\n };\n } // ID types can use Int literals.\n\n\n if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) {\n return {\n kind: _kinds.Kind.INT,\n value: serialized\n };\n }\n\n return {\n kind: _kinds.Kind.STRING,\n value: serialized\n };\n }\n\n throw new TypeError(\"Cannot convert value to AST: \".concat((0, _inspect.default)(serialized), \".\"));\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || (0, _invariant.default)(0, 'Unexpected input type: ' + (0, _inspect.default)(type));\n}", "async function dataFlowsCreate() {\n const subscriptionId =\n process.env[\"DATAFACTORY_SUBSCRIPTION_ID\"] || \"12345678-1234-1234-1234-12345678abc\";\n const resourceGroupName = process.env[\"DATAFACTORY_RESOURCE_GROUP\"] || \"exampleResourceGroup\";\n const factoryName = \"exampleFactoryName\";\n const dataFlowName = \"exampleDataFlow\";\n const dataFlow = {\n properties: {\n type: \"MappingDataFlow\",\n description:\n \"Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.\",\n scriptLines: [\n \"source(output(\",\n \"PreviousConversionRate as double,\",\n \"Country as string,\",\n \"DateTime1 as string,\",\n \"CurrentConversionRate as double\",\n \"),\",\n \"allowSchemaDrift: false,\",\n \"validateSchema: false) ~> USDCurrency\",\n \"source(output(\",\n \"PreviousConversionRate as double,\",\n \"Country as string,\",\n \"DateTime1 as string,\",\n \"CurrentConversionRate as double\",\n \"),\",\n \"allowSchemaDrift: true,\",\n \"validateSchema: false) ~> CADSource\",\n \"USDCurrency, CADSource union(byName: true)~> Union\",\n \"Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\",\n \"NewCurrencyColumn split(Country == 'USD',\",\n \"Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\",\n \"ConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\",\n \"ConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink\",\n ],\n sinks: [\n {\n name: \"USDSink\",\n dataset: { type: \"DatasetReference\", referenceName: \"USDOutput\" },\n },\n {\n name: \"CADSink\",\n dataset: { type: \"DatasetReference\", referenceName: \"CADOutput\" },\n },\n ],\n sources: [\n {\n name: \"USDCurrency\",\n dataset: {\n type: \"DatasetReference\",\n referenceName: \"CurrencyDatasetUSD\",\n },\n },\n {\n name: \"CADSource\",\n dataset: {\n type: \"DatasetReference\",\n referenceName: \"CurrencyDatasetCAD\",\n },\n },\n ],\n },\n };\n const credential = new DefaultAzureCredential();\n const client = new DataFactoryManagementClient(credential, subscriptionId);\n const result = await client.dataFlows.createOrUpdate(\n resourceGroupName,\n factoryName,\n dataFlowName,\n dataFlow\n );\n console.log(result);\n}", "function create() {\n /**\n * Get a type test function for a specific data type\n * @param {string} name Name of a data type like 'number' or 'string'\n * @returns {Function(obj: *) : boolean} Returns a type testing function.\n * Throws an error for an unknown type.\n */\n function getTypeTest(name) {\n var test;\n for (var i = 0; i < typed.types.length; i++) {\n var entry = typed.types[i];\n if (entry.name === name) {\n test = entry.test;\n break;\n }\n }\n\n if (!test) {\n var hint;\n for (i = 0; i < typed.types.length; i++) {\n entry = typed.types[i];\n if (entry.name.toLowerCase() == name.toLowerCase()) {\n hint = entry.name;\n break;\n }\n }\n\n throw new Error('Unknown type \"' + name + '\"' +\n (hint ? ('. Did you mean \"' + hint + '\"?') : ''));\n }\n return test;\n }\n\n /**\n * Retrieve the function name from a set of functions, and check\n * whether the name of all functions match (if given)\n * @param {Array.<function>} fns\n */\n function getName (fns) {\n var name = '';\n\n for (var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n\n // merge function name when this is a typed function\n if (fn.signatures && fn.name != '') {\n if (name == '') {\n name = fn.name;\n }\n else if (name != fn.name) {\n var err = new Error('Function names do not match (expected: ' + name + ', actual: ' + fn.name + ')');\n err.data = {\n actual: fn.name,\n expected: name\n };\n throw err;\n }\n }\n }\n\n return name;\n }\n\n /**\n * Create an ArgumentsError. Creates messages like:\n *\n * Unexpected type of argument (expected: ..., actual: ..., index: ...)\n * Too few arguments (expected: ..., index: ...)\n * Too many arguments (expected: ..., actual: ...)\n *\n * @param {String} fn Function name\n * @param {number} argCount Number of arguments\n * @param {Number} index Current argument index\n * @param {*} actual Current argument\n * @param {string} [expected] An optional, comma separated string with\n * expected types on given index\n * @extends Error\n */\n function createError(fn, argCount, index, actual, expected) {\n var actualType = getTypeOf(actual);\n var _expected = expected ? expected.split(',') : null;\n var _fn = (fn || 'unnamed');\n var anyType = _expected && contains(_expected, 'any');\n var message;\n var data = {\n fn: fn,\n index: index,\n actual: actualType,\n expected: _expected\n };\n\n if (_expected) {\n if (argCount > index && !anyType) {\n // unexpected type\n message = 'Unexpected type of argument in function ' + _fn +\n ' (expected: ' + _expected.join(' or ') + ', actual: ' + actualType + ', index: ' + index + ')';\n }\n else {\n // too few arguments\n message = 'Too few arguments in function ' + _fn +\n ' (expected: ' + _expected.join(' or ') + ', index: ' + index + ')';\n }\n }\n else {\n // too many arguments\n message = 'Too many arguments in function ' + _fn +\n ' (expected: ' + index + ', actual: ' + argCount + ')'\n }\n\n var err = new TypeError(message);\n err.data = data;\n return err;\n }\n\n /**\n * Collection with function references (local shortcuts to functions)\n * @constructor\n * @param {string} [name='refs'] Optional name for the refs, used to generate\n * JavaScript code\n */\n function Refs(name) {\n this.name = name || 'refs';\n this.categories = {};\n }\n\n /**\n * Add a function reference.\n * @param {Function} fn\n * @param {string} [category='fn'] A function category, like 'fn' or 'signature'\n * @returns {string} Returns the function name, for example 'fn0' or 'signature2'\n */\n Refs.prototype.add = function (fn, category) {\n var cat = category || 'fn';\n if (!this.categories[cat]) this.categories[cat] = [];\n\n var index = this.categories[cat].indexOf(fn);\n if (index == -1) {\n index = this.categories[cat].length;\n this.categories[cat].push(fn);\n }\n\n return cat + index;\n };\n\n /**\n * Create code lines for all function references\n * @returns {string} Returns the code containing all function references\n */\n Refs.prototype.toCode = function () {\n var code = [];\n var path = this.name + '.categories';\n var categories = this.categories;\n\n for (var cat in categories) {\n if (categories.hasOwnProperty(cat)) {\n var category = categories[cat];\n\n for (var i = 0; i < category.length; i++) {\n code.push('var ' + cat + i + ' = ' + path + '[\\'' + cat + '\\'][' + i + '];');\n }\n }\n }\n\n return code.join('\\n');\n };\n\n /**\n * A function parameter\n * @param {string | string[] | Param} types A parameter type like 'string',\n * 'number | boolean'\n * @param {boolean} [varArgs=false] Variable arguments if true\n * @constructor\n */\n function Param(types, varArgs) {\n // parse the types, can be a string with types separated by pipe characters |\n if (typeof types === 'string') {\n // parse variable arguments operator (ellipses '...number')\n var _types = types.trim();\n var _varArgs = _types.substr(0, 3) === '...';\n if (_varArgs) {\n _types = _types.substr(3);\n }\n if (_types === '') {\n this.types = ['any'];\n }\n else {\n this.types = _types.split('|');\n for (var i = 0; i < this.types.length; i++) {\n this.types[i] = this.types[i].trim();\n }\n }\n }\n else if (Array.isArray(types)) {\n this.types = types;\n }\n else if (types instanceof Param) {\n return types.clone();\n }\n else {\n throw new Error('String or Array expected');\n }\n\n // can hold a type to which to convert when handling this parameter\n this.conversions = [];\n // TODO: implement better API for conversions, be able to add conversions via constructor (support a new type Object?)\n\n // variable arguments\n this.varArgs = _varArgs || varArgs || false;\n\n // check for any type arguments\n this.anyType = this.types.indexOf('any') !== -1;\n }\n\n /**\n * Order Params\n * any type ('any') will be ordered last, and object as second last (as other\n * types may be an object as well, like Array).\n *\n * @param {Param} a\n * @param {Param} b\n * @returns {number} Returns 1 if a > b, -1 if a < b, and else 0.\n */\n Param.compare = function (a, b) {\n // TODO: simplify parameter comparison, it's a mess\n if (a.anyType) return 1;\n if (b.anyType) return -1;\n\n if (contains(a.types, 'Object')) return 1;\n if (contains(b.types, 'Object')) return -1;\n\n if (a.hasConversions()) {\n if (b.hasConversions()) {\n var i, ac, bc;\n\n for (i = 0; i < a.conversions.length; i++) {\n if (a.conversions[i] !== undefined) {\n ac = a.conversions[i];\n break;\n }\n }\n\n for (i = 0; i < b.conversions.length; i++) {\n if (b.conversions[i] !== undefined) {\n bc = b.conversions[i];\n break;\n }\n }\n\n return typed.conversions.indexOf(ac) - typed.conversions.indexOf(bc);\n }\n else {\n return 1;\n }\n }\n else {\n if (b.hasConversions()) {\n return -1;\n }\n else {\n // both params have no conversions\n var ai, bi;\n\n for (i = 0; i < typed.types.length; i++) {\n if (typed.types[i].name === a.types[0]) {\n ai = i;\n break;\n }\n }\n\n for (i = 0; i < typed.types.length; i++) {\n if (typed.types[i].name === b.types[0]) {\n bi = i;\n break;\n }\n }\n\n return ai - bi;\n }\n }\n };\n\n /**\n * Test whether this parameters types overlap an other parameters types.\n * Will not match ['any'] with ['number']\n * @param {Param} other\n * @return {boolean} Returns true when there are overlapping types\n */\n Param.prototype.overlapping = function (other) {\n for (var i = 0; i < this.types.length; i++) {\n if (contains(other.types, this.types[i])) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * Test whether this parameters types matches an other parameters types.\n * When any of the two parameters contains `any`, true is returned\n * @param {Param} other\n * @return {boolean} Returns true when there are matching types\n */\n Param.prototype.matches = function (other) {\n return this.anyType || other.anyType || this.overlapping(other);\n };\n\n /**\n * Create a clone of this param\n * @returns {Param} Returns a cloned version of this param\n */\n Param.prototype.clone = function () {\n var param = new Param(this.types.slice(), this.varArgs);\n param.conversions = this.conversions.slice();\n return param;\n };\n\n /**\n * Test whether this parameter contains conversions\n * @returns {boolean} Returns true if the parameter contains one or\n * multiple conversions.\n */\n Param.prototype.hasConversions = function () {\n return this.conversions.length > 0;\n };\n\n /**\n * Tests whether this parameters contains any of the provided types\n * @param {Object} types A Map with types, like {'number': true}\n * @returns {boolean} Returns true when the parameter contains any\n * of the provided types\n */\n Param.prototype.contains = function (types) {\n for (var i = 0; i < this.types.length; i++) {\n if (types[this.types[i]]) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * Return a string representation of this params types, like 'string' or\n * 'number | boolean' or '...number'\n * @param {boolean} [toConversion] If true, the returned types string\n * contains the types where the parameter\n * will convert to. If false (default)\n * the \"from\" types are returned\n * @returns {string}\n */\n Param.prototype.toString = function (toConversion) {\n var types = [];\n var keys = {};\n\n for (var i = 0; i < this.types.length; i++) {\n var conversion = this.conversions[i];\n var type = toConversion && conversion ? conversion.to : this.types[i];\n if (!(type in keys)) {\n keys[type] = true;\n types.push(type);\n }\n }\n\n return (this.varArgs ? '...' : '') + types.join('|');\n };\n\n /**\n * A function signature\n * @param {string | string[] | Param[]} params\n * Array with the type(s) of each parameter,\n * or a comma separated string with types\n * @param {Function} fn The actual function\n * @constructor\n */\n function Signature(params, fn) {\n var _params;\n if (typeof params === 'string') {\n _params = (params !== '') ? params.split(',') : [];\n }\n else if (Array.isArray(params)) {\n _params = params;\n }\n else {\n throw new Error('string or Array expected');\n }\n\n this.params = new Array(_params.length);\n this.anyType = false;\n this.varArgs = false;\n for (var i = 0; i < _params.length; i++) {\n var param = new Param(_params[i]);\n this.params[i] = param;\n if (param.anyType) {\n this.anyType = true;\n }\n if (i === _params.length - 1) {\n // the last argument\n this.varArgs = param.varArgs;\n }\n else {\n // non-last argument\n if (param.varArgs) {\n throw new SyntaxError('Unexpected variable arguments operator \"...\"');\n }\n }\n }\n\n this.fn = fn;\n }\n\n /**\n * Create a clone of this signature\n * @returns {Signature} Returns a cloned version of this signature\n */\n Signature.prototype.clone = function () {\n return new Signature(this.params.slice(), this.fn);\n };\n\n /**\n * Expand a signature: split params with union types in separate signatures\n * For example split a Signature \"string | number\" into two signatures.\n * @return {Signature[]} Returns an array with signatures (at least one)\n */\n Signature.prototype.expand = function () {\n var signatures = [];\n\n function recurse(signature, path) {\n if (path.length < signature.params.length) {\n var i, newParam, conversion;\n\n var param = signature.params[path.length];\n if (param.varArgs) {\n // a variable argument. do not split the types in the parameter\n newParam = param.clone();\n\n // add conversions to the parameter\n // recurse for all conversions\n for (i = 0; i < typed.conversions.length; i++) {\n conversion = typed.conversions[i];\n if (!contains(param.types, conversion.from) && contains(param.types, conversion.to)) {\n var j = newParam.types.length;\n newParam.types[j] = conversion.from;\n newParam.conversions[j] = conversion;\n }\n }\n\n recurse(signature, path.concat(newParam));\n }\n else {\n // split each type in the parameter\n for (i = 0; i < param.types.length; i++) {\n recurse(signature, path.concat(new Param(param.types[i])));\n }\n\n // recurse for all conversions\n for (i = 0; i < typed.conversions.length; i++) {\n conversion = typed.conversions[i];\n if (!contains(param.types, conversion.from) && contains(param.types, conversion.to)) {\n newParam = new Param(conversion.from);\n newParam.conversions[0] = conversion;\n recurse(signature, path.concat(newParam));\n }\n }\n }\n }\n else {\n signatures.push(new Signature(path, signature.fn));\n }\n }\n\n recurse(this, []);\n\n return signatures;\n };\n\n /**\n * Compare two signatures.\n *\n * When two params are equal and contain conversions, they will be sorted\n * by lowest index of the first conversions.\n *\n * @param {Signature} a\n * @param {Signature} b\n * @returns {number} Returns 1 if a > b, -1 if a < b, and else 0.\n */\n Signature.compare = function (a, b) {\n if (a.params.length > b.params.length) return 1;\n if (a.params.length < b.params.length) return -1;\n\n // count the number of conversions\n var i;\n var len = a.params.length; // a and b have equal amount of params\n var ac = 0;\n var bc = 0;\n for (i = 0; i < len; i++) {\n if (a.params[i].hasConversions()) ac++;\n if (b.params[i].hasConversions()) bc++;\n }\n\n if (ac > bc) return 1;\n if (ac < bc) return -1;\n\n // compare the order per parameter\n for (i = 0; i < a.params.length; i++) {\n var cmp = Param.compare(a.params[i], b.params[i]);\n if (cmp !== 0) {\n return cmp;\n }\n }\n\n return 0;\n };\n\n /**\n * Test whether any of the signatures parameters has conversions\n * @return {boolean} Returns true when any of the parameters contains\n * conversions.\n */\n Signature.prototype.hasConversions = function () {\n for (var i = 0; i < this.params.length; i++) {\n if (this.params[i].hasConversions()) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * Test whether this signature should be ignored.\n * Checks whether any of the parameters contains a type listed in\n * typed.ignore\n * @return {boolean} Returns true when the signature should be ignored\n */\n Signature.prototype.ignore = function () {\n // create a map with ignored types\n var types = {};\n for (var i = 0; i < typed.ignore.length; i++) {\n types[typed.ignore[i]] = true;\n }\n\n // test whether any of the parameters contains this type\n for (i = 0; i < this.params.length; i++) {\n if (this.params[i].contains(types)) {\n return true;\n }\n }\n\n return false;\n };\n\n /**\n * Test whether the path of this signature matches a given path.\n * @param {Param[]} params\n */\n Signature.prototype.paramsStartWith = function (params) {\n if (params.length === 0) {\n return true;\n }\n\n var aLast = last(this.params);\n var bLast = last(params);\n\n for (var i = 0; i < params.length; i++) {\n var a = this.params[i] || (aLast.varArgs ? aLast: null);\n var b = params[i] || (bLast.varArgs ? bLast: null);\n\n if (!a || !b || !a.matches(b)) {\n return false;\n }\n }\n\n return true;\n };\n\n /**\n * Generate the code to invoke this signature\n * @param {Refs} refs\n * @param {string} prefix\n * @returns {string} Returns code\n */\n Signature.prototype.toCode = function (refs, prefix) {\n var code = [];\n\n var args = new Array(this.params.length);\n for (var i = 0; i < this.params.length; i++) {\n var param = this.params[i];\n var conversion = param.conversions[0];\n if (param.varArgs) {\n args[i] = 'varArgs';\n }\n else if (conversion) {\n args[i] = refs.add(conversion.convert, 'convert') + '(arg' + i + ')';\n }\n else {\n args[i] = 'arg' + i;\n }\n }\n\n var ref = this.fn ? refs.add(this.fn, 'signature') : undefined;\n if (ref) {\n return prefix + 'return ' + ref + '(' + args.join(', ') + '); // signature: ' + this.params.join(', ');\n }\n\n return code.join('\\n');\n };\n\n /**\n * Return a string representation of the signature\n * @returns {string}\n */\n Signature.prototype.toString = function () {\n return this.params.join(', ');\n };\n\n /**\n * A group of signatures with the same parameter on given index\n * @param {Param[]} path\n * @param {Signature} [signature]\n * @param {Node[]} childs\n * @param {boolean} [fallThrough=false]\n * @constructor\n */\n function Node(path, signature, childs, fallThrough) {\n this.path = path || [];\n this.param = path[path.length - 1] || null;\n this.signature = signature || null;\n this.childs = childs || [];\n this.fallThrough = fallThrough || false;\n }\n\n /**\n * Generate code for this group of signatures\n * @param {Refs} refs\n * @param {string} prefix\n * @returns {string} Returns the code as string\n */\n Node.prototype.toCode = function (refs, prefix) {\n // TODO: split this function in multiple functions, it's too large\n var code = [];\n\n if (this.param) {\n var index = this.path.length - 1;\n var conversion = this.param.conversions[0];\n var comment = '// type: ' + (conversion ?\n (conversion.from + ' (convert to ' + conversion.to + ')') :\n this.param);\n\n // non-root node (path is non-empty)\n if (this.param.varArgs) {\n if (this.param.anyType) {\n // variable arguments with any type\n code.push(prefix + 'if (arguments.length > ' + index + ') {');\n code.push(prefix + ' var varArgs = [];');\n code.push(prefix + ' for (var i = ' + index + '; i < arguments.length; i++) {');\n code.push(prefix + ' varArgs.push(arguments[i]);');\n code.push(prefix + ' }');\n code.push(this.signature.toCode(refs, prefix + ' '));\n code.push(prefix + '}');\n }\n else {\n // variable arguments with a fixed type\n var getTests = function (types, arg) {\n var tests = [];\n for (var i = 0; i < types.length; i++) {\n tests[i] = refs.add(getTypeTest(types[i]), 'test') + '(' + arg + ')';\n }\n return tests.join(' || ');\n }.bind(this);\n\n var allTypes = this.param.types;\n var exactTypes = [];\n for (var i = 0; i < allTypes.length; i++) {\n if (this.param.conversions[i] === undefined) {\n exactTypes.push(allTypes[i]);\n }\n }\n\n code.push(prefix + 'if (' + getTests(allTypes, 'arg' + index) + ') { ' + comment);\n code.push(prefix + ' var varArgs = [arg' + index + '];');\n code.push(prefix + ' for (var i = ' + (index + 1) + '; i < arguments.length; i++) {');\n code.push(prefix + ' if (' + getTests(exactTypes, 'arguments[i]') + ') {');\n code.push(prefix + ' varArgs.push(arguments[i]);');\n\n for (var i = 0; i < allTypes.length; i++) {\n var conversion_i = this.param.conversions[i];\n if (conversion_i) {\n var test = refs.add(getTypeTest(allTypes[i]), 'test');\n var convert = refs.add(conversion_i.convert, 'convert');\n code.push(prefix + ' }');\n code.push(prefix + ' else if (' + test + '(arguments[i])) {');\n code.push(prefix + ' varArgs.push(' + convert + '(arguments[i]));');\n }\n }\n code.push(prefix + ' } else {');\n code.push(prefix + ' throw createError(name, arguments.length, i, arguments[i], \\'' + exactTypes.join(',') + '\\');');\n code.push(prefix + ' }');\n code.push(prefix + ' }');\n code.push(this.signature.toCode(refs, prefix + ' '));\n code.push(prefix + '}');\n }\n }\n else {\n if (this.param.anyType) {\n // any type\n code.push(prefix + '// type: any');\n code.push(this._innerCode(refs, prefix));\n }\n else {\n // regular type\n var type = this.param.types[0];\n var test = type !== 'any' ? refs.add(getTypeTest(type), 'test') : null;\n\n code.push(prefix + 'if (' + test + '(arg' + index + ')) { ' + comment);\n code.push(this._innerCode(refs, prefix + ' '));\n code.push(prefix + '}');\n }\n }\n }\n else {\n // root node (path is empty)\n code.push(this._innerCode(refs, prefix));\n }\n\n return code.join('\\n');\n };\n\n /**\n * Generate inner code for this group of signatures.\n * This is a helper function of Node.prototype.toCode\n * @param {Refs} refs\n * @param {string} prefix\n * @returns {string} Returns the inner code as string\n * @private\n */\n Node.prototype._innerCode = function (refs, prefix) {\n var code = [];\n var i;\n\n if (this.signature) {\n code.push(prefix + 'if (arguments.length === ' + this.path.length + ') {');\n code.push(this.signature.toCode(refs, prefix + ' '));\n code.push(prefix + '}');\n }\n\n for (i = 0; i < this.childs.length; i++) {\n code.push(this.childs[i].toCode(refs, prefix));\n }\n\n // TODO: shouldn't the this.param.anyType check be redundant\n if (!this.fallThrough || (this.param && this.param.anyType)) {\n var exceptions = this._exceptions(refs, prefix);\n if (exceptions) {\n code.push(exceptions);\n }\n }\n\n return code.join('\\n');\n };\n\n\n /**\n * Generate code to throw exceptions\n * @param {Refs} refs\n * @param {string} prefix\n * @returns {string} Returns the inner code as string\n * @private\n */\n Node.prototype._exceptions = function (refs, prefix) {\n var index = this.path.length;\n\n if (this.childs.length === 0) {\n // TODO: can this condition be simplified? (we have a fall-through here)\n return [\n prefix + 'if (arguments.length > ' + index + ') {',\n prefix + ' throw createError(name, arguments.length, ' + index + ', arguments[' + index + ']);',\n prefix + '}'\n ].join('\\n');\n }\n else {\n var keys = {};\n var types = [];\n\n for (var i = 0; i < this.childs.length; i++) {\n var node = this.childs[i];\n if (node.param) {\n for (var j = 0; j < node.param.types.length; j++) {\n var type = node.param.types[j];\n if (!(type in keys) && !node.param.conversions[j]) {\n keys[type] = true;\n types.push(type);\n }\n }\n }\n }\n\n return prefix + 'throw createError(name, arguments.length, ' + index + ', arguments[' + index + '], \\'' + types.join(',') + '\\');';\n }\n };\n\n /**\n * Split all raw signatures into an array with expanded Signatures\n * @param {Object.<string, Function>} rawSignatures\n * @return {Signature[]} Returns an array with expanded signatures\n */\n function parseSignatures(rawSignatures) {\n // FIXME: need to have deterministic ordering of signatures, do not create via object\n var signature;\n var keys = {};\n var signatures = [];\n var i;\n\n for (var types in rawSignatures) {\n if (rawSignatures.hasOwnProperty(types)) {\n var fn = rawSignatures[types];\n signature = new Signature(types, fn);\n\n if (signature.ignore()) {\n continue;\n }\n\n var expanded = signature.expand();\n\n for (i = 0; i < expanded.length; i++) {\n var signature_i = expanded[i];\n var key = signature_i.toString();\n var existing = keys[key];\n if (!existing) {\n keys[key] = signature_i;\n }\n else {\n var cmp = Signature.compare(signature_i, existing);\n if (cmp < 0) {\n // override if sorted first\n keys[key] = signature_i;\n }\n else if (cmp === 0) {\n throw new Error('Signature \"' + key + '\" is defined twice');\n }\n // else: just ignore\n }\n }\n }\n }\n\n // convert from map to array\n for (key in keys) {\n if (keys.hasOwnProperty(key)) {\n signatures.push(keys[key]);\n }\n }\n\n // order the signatures\n signatures.sort(function (a, b) {\n return Signature.compare(a, b);\n });\n\n // filter redundant conversions from signatures with varArgs\n // TODO: simplify this loop or move it to a separate function\n for (i = 0; i < signatures.length; i++) {\n signature = signatures[i];\n\n if (signature.varArgs) {\n var index = signature.params.length - 1;\n var param = signature.params[index];\n\n var t = 0;\n while (t < param.types.length) {\n if (param.conversions[t]) {\n var type = param.types[t];\n\n for (var j = 0; j < signatures.length; j++) {\n var other = signatures[j];\n var p = other.params[index];\n\n if (other !== signature &&\n p &&\n contains(p.types, type) && !p.conversions[index]) {\n // this (conversion) type already exists, remove it\n param.types.splice(t, 1);\n param.conversions.splice(t, 1);\n t--;\n break;\n }\n }\n }\n t++;\n }\n }\n }\n\n return signatures;\n }\n\n /**\n * Filter all any type signatures\n * @param {Signature[]} signatures\n * @return {Signature[]} Returns only any type signatures\n */\n function filterAnyTypeSignatures (signatures) {\n var filtered = [];\n\n for (var i = 0; i < signatures.length; i++) {\n if (signatures[i].anyType) {\n filtered.push(signatures[i]);\n }\n }\n\n return filtered;\n }\n\n /**\n * create a map with normalized signatures as key and the function as value\n * @param {Signature[]} signatures An array with split signatures\n * @return {Object.<string, Function>} Returns a map with normalized\n * signatures as key, and the function\n * as value.\n */\n function mapSignatures(signatures) {\n var normalized = {};\n\n for (var i = 0; i < signatures.length; i++) {\n var signature = signatures[i];\n if (signature.fn && !signature.hasConversions()) {\n var params = signature.params.join(',');\n normalized[params] = signature.fn;\n }\n }\n\n return normalized;\n }\n\n /**\n * Parse signatures recursively in a node tree.\n * @param {Signature[]} signatures Array with expanded signatures\n * @param {Param[]} path Traversed path of parameter types\n * @param {Signature[]} anys\n * @return {Node} Returns a node tree\n */\n function parseTree(signatures, path, anys) {\n var i, signature;\n var index = path.length;\n var nodeSignature;\n\n var filtered = [];\n for (i = 0; i < signatures.length; i++) {\n signature = signatures[i];\n\n // filter the first signature with the correct number of params\n if (signature.params.length === index && !nodeSignature) {\n nodeSignature = signature;\n }\n\n if (signature.params[index] != undefined) {\n filtered.push(signature);\n }\n }\n\n // sort the filtered signatures by param\n filtered.sort(function (a, b) {\n return Param.compare(a.params[index], b.params[index]);\n });\n\n // recurse over the signatures\n var entries = [];\n for (i = 0; i < filtered.length; i++) {\n signature = filtered[i];\n // group signatures with the same param at current index\n var param = signature.params[index];\n\n // TODO: replace the next filter loop\n var existing = entries.filter(function (entry) {\n return entry.param.overlapping(param);\n })[0];\n\n //var existing;\n //for (var j = 0; j < entries.length; j++) {\n // if (entries[j].param.overlapping(param)) {\n // existing = entries[j];\n // break;\n // }\n //}\n\n if (existing) {\n if (existing.param.varArgs) {\n throw new Error('Conflicting types \"' + existing.param + '\" and \"' + param + '\"');\n }\n existing.signatures.push(signature);\n }\n else {\n entries.push({\n param: param,\n signatures: [signature]\n });\n }\n }\n\n // find all any type signature that can still match our current path\n var matchingAnys = [];\n for (i = 0; i < anys.length; i++) {\n if (anys[i].paramsStartWith(path)) {\n matchingAnys.push(anys[i]);\n }\n }\n\n // see if there are any type signatures that don't match any of the\n // signatures that we have in our tree, i.e. we have alternative\n // matching signature(s) outside of our current tree and we should\n // fall through to them instead of throwing an exception\n var fallThrough = false;\n for (i = 0; i < matchingAnys.length; i++) {\n if (!contains(signatures, matchingAnys[i])) {\n fallThrough = true;\n break;\n }\n }\n\n // parse the childs\n var childs = new Array(entries.length);\n for (i = 0; i < entries.length; i++) {\n var entry = entries[i];\n childs[i] = parseTree(entry.signatures, path.concat(entry.param), matchingAnys)\n }\n\n return new Node(path, nodeSignature, childs, fallThrough);\n }\n\n /**\n * Generate an array like ['arg0', 'arg1', 'arg2']\n * @param {number} count Number of arguments to generate\n * @returns {Array} Returns an array with argument names\n */\n function getArgs(count) {\n // create an array with all argument names\n var args = [];\n for (var i = 0; i < count; i++) {\n args[i] = 'arg' + i;\n }\n\n return args;\n }\n\n /**\n * Compose a function from sub-functions each handling a single type signature.\n * Signatures:\n * typed(signature: string, fn: function)\n * typed(name: string, signature: string, fn: function)\n * typed(signatures: Object.<string, function>)\n * typed(name: string, signatures: Object.<string, function>)\n *\n * @param {string | null} name\n * @param {Object.<string, Function>} signatures\n * @return {Function} Returns the typed function\n * @private\n */\n function _typed(name, signatures) {\n var refs = new Refs();\n\n // parse signatures, expand them\n var _signatures = parseSignatures(signatures);\n if (_signatures.length == 0) {\n throw new Error('No signatures provided');\n }\n\n // filter all any type signatures\n var anys = filterAnyTypeSignatures(_signatures);\n\n // parse signatures into a node tree\n var node = parseTree(_signatures, [], anys);\n\n //var util = require('util');\n //console.log('ROOT');\n //console.log(util.inspect(node, { depth: null }));\n\n // generate code for the typed function\n // safeName is a conservative replacement of characters \n // to prevend being able to inject JS code at the place of the function name \n // the name is useful for stack trackes therefore we want have it there\n var code = [];\n var safeName = (name || '').replace(/[^a-zA-Z0-9_$]/g, '_')\n var args = getArgs(maxParams(_signatures));\n code.push('function ' + safeName + '(' + args.join(', ') + ') {');\n code.push(' \"use strict\";');\n code.push(' var name = ' + JSON.stringify(name || '') + ';');\n code.push(node.toCode(refs, ' ', false));\n code.push('}');\n\n // generate body for the factory function\n var body = [\n refs.toCode(),\n 'return ' + code.join('\\n')\n ].join('\\n');\n\n // evaluate the JavaScript code and attach function references\n var factory = (new Function(refs.name, 'createError', body));\n var fn = factory(refs, createError);\n\n //console.log('FN\\n' + fn.toString()); // TODO: cleanup\n\n // attach the signatures with sub-functions to the constructed function\n fn.signatures = mapSignatures(_signatures);\n\n return fn;\n }\n\n /**\n * Calculate the maximum number of parameters in givens signatures\n * @param {Signature[]} signatures\n * @returns {number} The maximum number of parameters\n */\n function maxParams(signatures) {\n var max = 0;\n\n for (var i = 0; i < signatures.length; i++) {\n var len = signatures[i].params.length;\n if (len > max) {\n max = len;\n }\n }\n\n return max;\n }\n\n /**\n * Get the type of a value\n * @param {*} x\n * @returns {string} Returns a string with the type of value\n */\n function getTypeOf(x) {\n var obj;\n\n for (var i = 0; i < typed.types.length; i++) {\n var entry = typed.types[i];\n\n if (entry.name === 'Object') {\n // Array and Date are also Object, so test for Object afterwards\n obj = entry;\n }\n else {\n if (entry.test(x)) return entry.name;\n }\n }\n\n // at last, test whether an object\n if (obj && obj.test(x)) return obj.name;\n\n return 'unknown';\n }\n\n /**\n * Test whether an array contains some item\n * @param {Array} array\n * @param {*} item\n * @return {boolean} Returns true if array contains item, false if not.\n */\n function contains(array, item) {\n return array.indexOf(item) !== -1;\n }\n\n /**\n * Returns the last item in the array\n * @param {Array} array\n * @return {*} item\n */\n function last (array) {\n return array[array.length - 1];\n }\n\n // data type tests\n var types = [\n { name: 'number', test: function (x) { return typeof x === 'number' } },\n { name: 'string', test: function (x) { return typeof x === 'string' } },\n { name: 'boolean', test: function (x) { return typeof x === 'boolean' } },\n { name: 'Function', test: function (x) { return typeof x === 'function'} },\n { name: 'Array', test: Array.isArray },\n { name: 'Date', test: function (x) { return x instanceof Date } },\n { name: 'RegExp', test: function (x) { return x instanceof RegExp } },\n { name: 'Object', test: function (x) { return typeof x === 'object' } },\n { name: 'null', test: function (x) { return x === null } },\n { name: 'undefined', test: function (x) { return x === undefined } }\n ];\n\n // configuration\n var config = {};\n\n // type conversions. Order is important\n var conversions = [];\n\n // types to be ignored\n var ignore = [];\n\n // temporary object for holding types and conversions, for constructing\n // the `typed` function itself\n // TODO: find a more elegant solution for this\n var typed = {\n config: config,\n types: types,\n conversions: conversions,\n ignore: ignore\n };\n\n /**\n * Construct the typed function itself with various signatures\n *\n * Signatures:\n *\n * typed(signatures: Object.<string, function>)\n * typed(name: string, signatures: Object.<string, function>)\n */\n typed = _typed('typed', {\n 'Object': function (signatures) {\n var fns = [];\n for (var signature in signatures) {\n if (signatures.hasOwnProperty(signature)) {\n fns.push(signatures[signature]);\n }\n }\n var name = getName(fns);\n\n return _typed(name, signatures);\n },\n 'string, Object': _typed,\n // TODO: add a signature 'Array.<function>'\n '...Function': function (fns) {\n var err;\n var name = getName(fns);\n var signatures = {};\n\n for (var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n\n // test whether this is a typed-function\n if (!(typeof fn.signatures === 'object')) {\n err = new TypeError('Function is no typed-function (index: ' + i + ')');\n err.data = {index: i};\n throw err;\n }\n\n // merge the signatures\n for (var signature in fn.signatures) {\n if (fn.signatures.hasOwnProperty(signature)) {\n if (signatures.hasOwnProperty(signature)) {\n if (fn.signatures[signature] !== signatures[signature]) {\n err = new Error('Signature \"' + signature + '\" is defined twice');\n err.data = {signature: signature};\n throw err;\n }\n // else: both signatures point to the same function, that's fine\n }\n else {\n signatures[signature] = fn.signatures[signature];\n }\n }\n }\n }\n\n return _typed(name, signatures);\n }\n });\n\n /**\n * Find a specific signature from a (composed) typed function, for\n * example:\n *\n * typed.find(fn, ['number', 'string'])\n * typed.find(fn, 'number, string')\n *\n * Function find only only works for exact matches.\n *\n * @param {Function} fn A typed-function\n * @param {string | string[]} signature Signature to be found, can be\n * an array or a comma separated string.\n * @return {Function} Returns the matching signature, or\n * throws an errror when no signature\n * is found.\n */\n function find (fn, signature) {\n if (!fn.signatures) {\n throw new TypeError('Function is no typed-function');\n }\n\n // normalize input\n var arr;\n if (typeof signature === 'string') {\n arr = signature.split(',');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = arr[i].trim();\n }\n }\n else if (Array.isArray(signature)) {\n arr = signature;\n }\n else {\n throw new TypeError('String array or a comma separated string expected');\n }\n\n var str = arr.join(',');\n\n // find an exact match\n var match = fn.signatures[str];\n if (match) {\n return match;\n }\n\n // TODO: extend find to match non-exact signatures\n\n throw new TypeError('Signature not found (signature: ' + (fn.name || 'unnamed') + '(' + arr.join(', ') + '))');\n }\n\n /**\n * Convert a given value to another data type.\n * @param {*} value\n * @param {string} type\n */\n function convert (value, type) {\n var from = getTypeOf(value);\n\n // check conversion is needed\n if (type === from) {\n return value;\n }\n\n for (var i = 0; i < typed.conversions.length; i++) {\n var conversion = typed.conversions[i];\n if (conversion.from === from && conversion.to === type) {\n return conversion.convert(value);\n }\n }\n\n throw new Error('Cannot convert from ' + from + ' to ' + type);\n }\n\n // attach types and conversions to the final `typed` function\n typed.config = config;\n typed.types = types;\n typed.conversions = conversions;\n typed.ignore = ignore;\n typed.create = create;\n typed.find = find;\n typed.convert = convert;\n\n // add a type\n typed.addType = function (type) {\n if (!type || typeof type.name !== 'string' || typeof type.test !== 'function') {\n throw new TypeError('Object with properties {name: string, test: function} expected');\n }\n\n typed.types.push(type);\n };\n\n // add a conversion\n typed.addConversion = function (conversion) {\n if (!conversion\n || typeof conversion.from !== 'string'\n || typeof conversion.to !== 'string'\n || typeof conversion.convert !== 'function') {\n throw new TypeError('Object with properties {from: string, to: string, convert: function} expected');\n }\n\n typed.conversions.push(conversion);\n };\n\n return typed;\n }", "static createItem(typeName, ctx=null) {\n console.debug(\"Types.createItem\", typeName);\n if (typeof typeName !== 'string') {\n throw new Error(\"expected type string\");\n }\n var ret;\n const type= allTypes.get( typeName );\n if (!type ) {\n throw new Error(`unknown type '${typeName}'`);\n }\n const { uses } = type;\n switch (uses) {\n case \"flow\": {\n const data= {};\n const spec= type.with;\n const { params } = spec;\n for ( const token in params ) {\n const param= params[token];\n if (!param.optional || param.repeats) {\n const val= (!param.optional) && Types.createItem( param.type, {\n token: token,\n param: param\n });\n // if the param repeats then we'll wind up with an array (of items)\n data[token]= param.repeats? (val? [val]: []): val;\n }\n }\n ret= allTypes.newItem(type.name, data);\n }\n break;\n case \"slot\":\n case \"swap\": {\n // note: \"initially\", if any, is: object { string type; object value; }\n // FIX: \"initially\" wont work properly for opts.\n // slots dont have a $TOKEN entry, but options do.\n const pair= Types._unpack(ctx);\n if (!pair) {\n ret= allTypes.newItem(type.name, null);\n } else {\n const { type:slatType, value:slatValue } = pair;\n ret= Types.createItem(slatType, slatValue);\n }\n }\n break;\n case \"str\":\n case \"txt\": {\n // ex. Item(\"trait\", \"testing\")\n // determine default value\n let defautValue= \"\";\n const spec= type.with;\n const { tokens, params }= spec;\n if (tokens.length === 1) {\n const t= tokens[0];\n const param= params[t];\n // FIX: no .... this is in the \"flow\"... the container of the str.\n // if (param.filterVals && ('default' in param.filterVals)) {\n // defaultValue= param.filterVals['default'];\n // } else {\n // if there's only one token, and that token isn't the \"floating value\" token....\n if (param.value !== null) {\n defautValue= t; // then we can use the token as our default value.\n }\n // }\n }\n const value= Types._unpack(ctx, defautValue);\n // fix? .value for string elements *can* be null,\n // but if they are things in autoText throw.\n // apparently default String prop validation allows null.\n ret= allTypes.newItem(type.name, value);\n }\n break;\n case \"num\": {\n const value= Types._unpack(ctx, 0);\n ret= allTypes.newItem(type.name, value);\n }\n break;\n default:\n throw new Error(`unknown type ${uses}`);\n break;\n }\n return ret;\n }", "function DataTypeConverter() {\n this._fields = [];\n this._numOfRows = 0;\n}", "function astFromValue(value, type) {\n\t // Ensure flow knows that we treat function params as const.\n\t var _value = value;\n\n\t if (type instanceof _definition.GraphQLNonNull) {\n\t // Note: we're not checking that the result is non-null.\n\t // This function is not responsible for validating the input value.\n\t return astFromValue(_value, type.ofType);\n\t }\n\n\t if ((0, _isNullish2.default)(_value)) {\n\t return null;\n\t }\n\n\t // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n\t // the value is not an array, convert the value using the list's item type.\n\t if (type instanceof _definition.GraphQLList) {\n\t var _ret = function () {\n\t var itemType = type.ofType;\n\t if ((0, _iterall.isCollection)(_value)) {\n\t var _ret2 = function () {\n\t var valuesASTs = [];\n\t (0, _iterall.forEach)(_value, function (item) {\n\t var itemAST = astFromValue(item, itemType);\n\t if (itemAST) {\n\t valuesASTs.push(itemAST);\n\t }\n\t });\n\t return {\n\t v: {\n\t v: { kind: _kinds.LIST, values: valuesASTs }\n\t }\n\t };\n\t }();\n\n\t if (typeof _ret2 === \"object\") return _ret2.v;\n\t }\n\t return {\n\t v: astFromValue(_value, itemType)\n\t };\n\t }();\n\n\t if (typeof _ret === \"object\") return _ret.v;\n\t }\n\n\t // Populate the fields of the input object by creating ASTs from each value\n\t // in the JavaScript object according to the fields in the input type.\n\t if (type instanceof _definition.GraphQLInputObjectType) {\n\t var _ret3 = function () {\n\t if (_value === null || typeof _value !== 'object') {\n\t return {\n\t v: null\n\t };\n\t }\n\t var fields = type.getFields();\n\t var fieldASTs = [];\n\t Object.keys(fields).forEach(function (fieldName) {\n\t var fieldType = fields[fieldName].type;\n\t var fieldValue = astFromValue(_value[fieldName], fieldType);\n\t if (fieldValue) {\n\t fieldASTs.push({\n\t kind: _kinds.OBJECT_FIELD,\n\t name: { kind: _kinds.NAME, value: fieldName },\n\t value: fieldValue\n\t });\n\t }\n\t });\n\t return {\n\t v: { kind: _kinds.OBJECT, fields: fieldASTs }\n\t };\n\t }();\n\n\t if (typeof _ret3 === \"object\") return _ret3.v;\n\t }\n\n\t (0, _invariant2.default)(type instanceof _definition.GraphQLScalarType || type instanceof _definition.GraphQLEnumType, 'Must provide Input Type, cannot use: ' + String(type));\n\n\t // Since value is an internally represented value, it must be serialized\n\t // to an externally represented value before converting into an AST.\n\t var serialized = type.serialize(_value);\n\t if ((0, _isNullish2.default)(serialized)) {\n\t return null;\n\t }\n\n\t // Others serialize based on their corresponding JavaScript scalar types.\n\t if (typeof serialized === 'boolean') {\n\t return { kind: _kinds.BOOLEAN, value: serialized };\n\t }\n\n\t // JavaScript numbers can be Int or Float values.\n\t if (typeof serialized === 'number') {\n\t var stringNum = String(serialized);\n\t return (/^[0-9]+$/.test(stringNum) ? { kind: _kinds.INT, value: stringNum } : { kind: _kinds.FLOAT, value: stringNum }\n\t );\n\t }\n\n\t if (typeof serialized === 'string') {\n\t // Enum types use Enum literals.\n\t if (type instanceof _definition.GraphQLEnumType) {\n\t return { kind: _kinds.ENUM, value: serialized };\n\t }\n\n\t // ID types can use Int literals.\n\t if (type === _scalars.GraphQLID && /^[0-9]+$/.test(serialized)) {\n\t return { kind: _kinds.INT, value: serialized };\n\t }\n\n\t // Use JSON stringify, which uses the same string encoding as GraphQL,\n\t // then remove the quotes.\n\t return {\n\t kind: _kinds.STRING,\n\t value: JSON.stringify(serialized).slice(1, -1)\n\t };\n\t }\n\n\t throw new TypeError('Cannot convert value to AST: ' + String(serialized));\n\t}", "function propTypeToFlowTypeTransform(j, node, callback) {\n // instanceOf(), arrayOf(), etc..\n const {\n name\n } = node.callee.property;\n\n switch (name) {\n case _constants.PROPTYPES_IDENTIFIERS.INSTANCE_OF:\n return j.genericTypeAnnotation(node.arguments[0], null);\n\n case _constants.PROPTYPES_IDENTIFIERS.ARRAY_OF:\n return j.genericTypeAnnotation(j.identifier('Array'), j.typeParameterInstantiation([callback(j, null, node.arguments[0] || j.anyTypeAnnotation())]));\n\n case _constants.PROPTYPES_IDENTIFIERS.OBJECT_OF:\n return j.genericTypeAnnotation(j.identifier('Object'), j.typeParameterInstantiation([callback(j, null, node.arguments[0] || j.anyTypeAnnotation())]));\n\n case _constants.PROPTYPES_IDENTIFIERS.SHAPE:\n return j.objectTypeAnnotation(node.arguments[0].properties.map(arg => callback(j, arg.key, arg.value)));\n\n case _constants.PROPTYPES_IDENTIFIERS.ONE_OF:\n case _constants.PROPTYPES_IDENTIFIERS.ONE_OF_TYPE:\n return j.unionTypeAnnotation(node.arguments[0].elements.map(arg => callback(j, null, arg)));\n\n default:\n break;\n }\n}", "function dataflow() {\n var Flow = window.Flow;\n Flow.Dataflow = function () {\n return {\n slot: createSlot,\n slots: createSlots,\n signal: createSignal,\n signals: createSignals,\n isSignal: _isSignal,\n link: _link,\n unlink: _unlink,\n act: _act,\n react: _react,\n lift: _lift,\n merge: _merge\n };\n }();\n }", "create(_id, _data, _type) {\n if (!_type) {\n HValue.new(_id, _data);\n }\n else if (_type === 1) {\n HPushValue.new(_id, _data);\n }\n else if (_type === 2) {\n HPullValue.new(_id, _data);\n }\n else {\n console.warn(`Unknown value type: ${_type}`);\n }\n }", "_newDataSet(...params){\n const Type = this.options.DataSetType || DataSet;\n return new Type(...params); \n }", "static fromJSON(schema, json) {\n if (!json || !json.stepType)\n throw new RangeError(\"Invalid input for Step.fromJSON\");\n let type = stepsByID[json.stepType];\n if (!type)\n throw new RangeError(`No step type ${json.stepType} defined`);\n return type.fromJSON(schema, json);\n }", "function astFromValue(value, type) {\n // Ensure flow knows that we treat function params as const.\n var _value = value;\n\n if (type instanceof _definition.GraphQLNonNull) {\n var astValue = astFromValue(_value, type.ofType);\n if (astValue && astValue.kind === _kinds.NULL) {\n return null;\n }\n return astValue;\n }\n\n // only explicit null, not undefined, NaN\n if (_value === null) {\n return { kind: _kinds.NULL };\n }\n\n // undefined, NaN\n if ((0, _isInvalid2.default)(_value)) {\n return null;\n }\n\n // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n if (type instanceof _definition.GraphQLList) {\n var itemType = type.ofType;\n if ((0, _iterall.isCollection)(_value)) {\n var valuesNodes = [];\n (0, _iterall.forEach)(_value, function (item) {\n var itemNode = astFromValue(item, itemType);\n if (itemNode) {\n valuesNodes.push(itemNode);\n }\n });\n return { kind: _kinds.LIST, values: valuesNodes };\n }\n return astFromValue(_value, itemType);\n }\n\n // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n if (type instanceof _definition.GraphQLInputObjectType) {\n if (_value === null || typeof _value !== 'object') {\n return null;\n }\n var fields = type.getFields();\n var fieldNodes = [];\n Object.keys(fields).forEach(function (fieldName) {\n var fieldType = fields[fieldName].type;\n var fieldValue = astFromValue(_value[fieldName], fieldType);\n if (fieldValue) {\n fieldNodes.push({\n kind: _kinds.OBJECT_FIELD,\n name: { kind: _kinds.NAME, value: fieldName },\n value: fieldValue\n });\n }\n });\n return { kind: _kinds.OBJECT, fields: fieldNodes };\n }\n\n (0, _invariant2.default)(type instanceof _definition.GraphQLScalarType || type instanceof _definition.GraphQLEnumType, 'Must provide Input Type, cannot use: ' + String(type));\n\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(_value);\n if ((0, _isNullish2.default)(serialized)) {\n return null;\n }\n\n // Others serialize based on their corresponding JavaScript scalar types.\n if (typeof serialized === 'boolean') {\n return { kind: _kinds.BOOLEAN, value: serialized };\n }\n\n // JavaScript numbers can be Int or Float values.\n if (typeof serialized === 'number') {\n var stringNum = String(serialized);\n return (/^[0-9]+$/.test(stringNum) ? { kind: _kinds.INT, value: stringNum } : { kind: _kinds.FLOAT, value: stringNum }\n );\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if (type instanceof _definition.GraphQLEnumType) {\n return { kind: _kinds.ENUM, value: serialized };\n }\n\n // ID types can use Int literals.\n if (type === _scalars.GraphQLID && /^[0-9]+$/.test(serialized)) {\n return { kind: _kinds.INT, value: serialized };\n }\n\n // Use JSON stringify, which uses the same string encoding as GraphQL,\n // then remove the quotes.\n return {\n kind: _kinds.STRING,\n value: JSON.stringify(serialized).slice(1, -1)\n };\n }\n\n throw new TypeError('Cannot convert value to AST: ' + String(serialized));\n}", "function astFromValue(value, type) {\n // Ensure flow knows that we treat function params as const.\n var _value = value;\n\n if (type instanceof _definition.GraphQLNonNull) {\n var astValue = astFromValue(_value, type.ofType);\n if (astValue && astValue.kind === Kind.NULL) {\n return null;\n }\n return astValue;\n }\n\n // only explicit null, not undefined, NaN\n if (_value === null) {\n return { kind: Kind.NULL };\n }\n\n // undefined, NaN\n if ((0, _isInvalid2.default)(_value)) {\n return null;\n }\n\n // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n if (type instanceof _definition.GraphQLList) {\n var itemType = type.ofType;\n if ((0, _iterall.isCollection)(_value)) {\n var valuesNodes = [];\n (0, _iterall.forEach)(_value, function (item) {\n var itemNode = astFromValue(item, itemType);\n if (itemNode) {\n valuesNodes.push(itemNode);\n }\n });\n return { kind: Kind.LIST, values: valuesNodes };\n }\n return astFromValue(_value, itemType);\n }\n\n // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n if (type instanceof _definition.GraphQLInputObjectType) {\n if (_value === null || (typeof _value === 'undefined' ? 'undefined' : _typeof(_value)) !== 'object') {\n return null;\n }\n var fields = type.getFields();\n var fieldNodes = [];\n Object.keys(fields).forEach(function (fieldName) {\n var fieldType = fields[fieldName].type;\n var fieldValue = astFromValue(_value[fieldName], fieldType);\n if (fieldValue) {\n fieldNodes.push({\n kind: Kind.OBJECT_FIELD,\n name: { kind: Kind.NAME, value: fieldName },\n value: fieldValue\n });\n }\n });\n return { kind: Kind.OBJECT, fields: fieldNodes };\n }\n\n !(type instanceof _definition.GraphQLScalarType || type instanceof _definition.GraphQLEnumType) ? (0, _invariant2.default)(0, 'Must provide Input Type, cannot use: ' + String(type)) : void 0;\n\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(_value);\n if ((0, _isNullish2.default)(serialized)) {\n return null;\n }\n\n // Others serialize based on their corresponding JavaScript scalar types.\n if (typeof serialized === 'boolean') {\n return { kind: Kind.BOOLEAN, value: serialized };\n }\n\n // JavaScript numbers can be Int or Float values.\n if (typeof serialized === 'number') {\n var stringNum = String(serialized);\n return (/^[0-9]+$/.test(stringNum) ? { kind: Kind.INT, value: stringNum } : { kind: Kind.FLOAT, value: stringNum }\n );\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if (type instanceof _definition.GraphQLEnumType) {\n return { kind: Kind.ENUM, value: serialized };\n }\n\n // ID types can use Int literals.\n if (type === _scalars.GraphQLID && /^[0-9]+$/.test(serialized)) {\n return { kind: Kind.INT, value: serialized };\n }\n\n // Use JSON stringify, which uses the same string encoding as GraphQL,\n // then remove the quotes.\n return {\n kind: Kind.STRING,\n value: JSON.stringify(serialized).slice(1, -1)\n };\n }\n\n throw new TypeError('Cannot convert value to AST: ' + String(serialized));\n}", "function astFromValue(value, type) {\n // Ensure flow knows that we treat function params as const.\n var _value = value;\n\n if (type instanceof _definition.GraphQLNonNull) {\n var astValue = astFromValue(_value, type.ofType);\n if (astValue && astValue.kind === Kind.NULL) {\n return null;\n }\n return astValue;\n }\n\n // only explicit null, not undefined, NaN\n if (_value === null) {\n return { kind: Kind.NULL };\n }\n\n // undefined, NaN\n if ((0, _isInvalid2.default)(_value)) {\n return null;\n }\n\n // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n if (type instanceof _definition.GraphQLList) {\n var itemType = type.ofType;\n if ((0, _iterall.isCollection)(_value)) {\n var valuesNodes = [];\n (0, _iterall.forEach)(_value, function (item) {\n var itemNode = astFromValue(item, itemType);\n if (itemNode) {\n valuesNodes.push(itemNode);\n }\n });\n return { kind: Kind.LIST, values: valuesNodes };\n }\n return astFromValue(_value, itemType);\n }\n\n // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n if (type instanceof _definition.GraphQLInputObjectType) {\n if (_value === null || (typeof _value === 'undefined' ? 'undefined' : _typeof(_value)) !== 'object') {\n return null;\n }\n var fields = type.getFields();\n var fieldNodes = [];\n Object.keys(fields).forEach(function (fieldName) {\n var fieldType = fields[fieldName].type;\n var fieldValue = astFromValue(_value[fieldName], fieldType);\n if (fieldValue) {\n fieldNodes.push({\n kind: Kind.OBJECT_FIELD,\n name: { kind: Kind.NAME, value: fieldName },\n value: fieldValue\n });\n }\n });\n return { kind: Kind.OBJECT, fields: fieldNodes };\n }\n\n !(type instanceof _definition.GraphQLScalarType || type instanceof _definition.GraphQLEnumType) ? (0, _invariant2.default)(0, 'Must provide Input Type, cannot use: ' + String(type)) : void 0;\n\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(_value);\n if ((0, _isNullish2.default)(serialized)) {\n return null;\n }\n\n // Others serialize based on their corresponding JavaScript scalar types.\n if (typeof serialized === 'boolean') {\n return { kind: Kind.BOOLEAN, value: serialized };\n }\n\n // JavaScript numbers can be Int or Float values.\n if (typeof serialized === 'number') {\n var stringNum = String(serialized);\n return (/^[0-9]+$/.test(stringNum) ? { kind: Kind.INT, value: stringNum } : { kind: Kind.FLOAT, value: stringNum }\n );\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if (type instanceof _definition.GraphQLEnumType) {\n return { kind: Kind.ENUM, value: serialized };\n }\n\n // ID types can use Int literals.\n if (type === _scalars.GraphQLID && /^[0-9]+$/.test(serialized)) {\n return { kind: Kind.INT, value: serialized };\n }\n\n // Use JSON stringify, which uses the same string encoding as GraphQL,\n // then remove the quotes.\n return {\n kind: Kind.STRING,\n value: JSON.stringify(serialized).slice(1, -1)\n };\n }\n\n throw new TypeError('Cannot convert value to AST: ' + String(serialized));\n}", "function Dataflow() {\n this._log = Object(__WEBPACK_IMPORTED_MODULE_12_vega_util__[\"C\" /* logger */])();\n this.logLevel(__WEBPACK_IMPORTED_MODULE_12_vega_util__[\"b\" /* Error */]);\n\n this._clock = 0;\n this._rank = 0;\n this._loader = Object(__WEBPACK_IMPORTED_MODULE_11_vega_loader__[\"a\" /* loader */])();\n\n this._touched = Object(__WEBPACK_IMPORTED_MODULE_10__util_UniqueList__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_12_vega_util__[\"q\" /* id */]);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new __WEBPACK_IMPORTED_MODULE_9__util_Heap__[\"a\" /* default */](function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n}", "function Dataflow() {\n this._log = (0,vega_util__WEBPACK_IMPORTED_MODULE_12__.logger)();\n this.logLevel(vega_util__WEBPACK_IMPORTED_MODULE_12__.Error);\n\n this._clock = 0;\n this._rank = 0;\n try {\n this._loader = (0,vega_loader__WEBPACK_IMPORTED_MODULE_11__.loader)();\n } catch (e) {\n // do nothing if loader module is unavailable\n }\n\n this._touched = (0,_util_UniqueList__WEBPACK_IMPORTED_MODULE_10__.default)(vega_util__WEBPACK_IMPORTED_MODULE_12__.id);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new _util_Heap__WEBPACK_IMPORTED_MODULE_9__.default(function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n}", "constructor(fields, data = {}) {\n fields.forEach((fieldDefinition) => {\n if (typeof fieldDefinition === \"string\") {\n this[fieldDefinition] = this.convertSimpleField(\n data[fieldDefinition],\n null\n );\n } else {\n // fieldDefinition must be an object\n let fieldName = fieldDefinition.name;\n let fieldType = fieldDefinition.type;\n let fieldIsList =\n typeof fieldDefinition.list !== \"undefined\"\n ? fieldDefinition.list\n : false;\n let fieldDefault =\n typeof fieldDefinition.default !== \"undefined\"\n ? this.getDefaultValue(fieldDefinition.default)\n : null;\n let fieldValue = data[fieldName];\n if (fieldIsList) {\n this[fieldName] = fieldValue\n ? fieldValue.map((item) =>\n this.convertField(fieldType, item, fieldDefault)\n )\n : fieldDefault;\n } else {\n this[fieldName] = this.convertField(\n fieldType,\n fieldValue,\n fieldDefault\n );\n }\n }\n });\n }", "function adapter(data, name, types = {}) {\n if (data == null) return null;\n const type = types[name] || DEFTYPE;\n const ret = new type();\n if (typeof data == 'string') {\n ret._text = data;\n } else if (Array.isArray(data)) {\n throw new Error('Trying to wrap an array as a single object');\n } else {\n ret._attrs = data.$ || {};\n ret._text = data._;\n if (ret._text === undefined) ret._text = null;\n ret._source = name => wrapList(data[name], name, types);\n }\n return ret;\n}", "function Dataflow() {\n this._log = logger();\n this.logLevel(Error$1);\n\n this._clock = 0;\n this._rank = 0;\n try {\n this._loader = loader();\n } catch (e) {\n // do nothing if loader module is unavailable\n }\n\n this._touched = UniqueList(id);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new Heap(function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n }", "function Flow(id, map, identifier, loader, ioHandler, processManager) {\n\n var self = this;\n\n if (!id) {\n throw Error('xFlow requires an id');\n }\n\n if (!map) {\n throw Error('xFlow requires a map');\n }\n\n // Call the super's constructor\n Actor.apply(this, arguments);\n\n if (loader) {\n this.loader = loader;\n }\n if (ioHandler) {\n this.ioHandler = ioHandler;\n }\n\n if (processManager) {\n this.processManager = processManager;\n }\n\n // External vs Internal links\n this.linkMap = {};\n\n // indicates whether this is an action instance.\n this.actionName = undefined;\n\n // TODO: trying to solve provider issue\n this.provider = map.provider;\n\n this.providers = map.providers;\n\n this.actions = {};\n\n // initialize both input and output ports might\n // one of them be empty.\n if (!map.ports) {\n map.ports = {};\n }\n if (!map.ports.output) {\n map.ports.output = {};\n }\n if (!map.ports.input) {\n map.ports.input = {};\n }\n\n /*\n // make available always.\n node.ports.output['error'] = {\n title: 'Error',\n type: 'object'\n };\n */\n\n this.id = id;\n\n this.name = map.name;\n\n this.type = 'flow';\n\n this.title = map.title;\n\n this.description = map.description;\n\n this.ns = map.ns;\n\n this.active = false;\n\n this.metadata = map.metadata || {};\n\n this.identifier = identifier || [\n map.ns,\n ':',\n map.name\n ].join('');\n\n this.ports = JSON.parse(\n JSON.stringify(map.ports)\n );\n\n // Need to think about how to implement this for flows\n // this.ports.output[':complete'] = { type: 'any' };\n\n this.runCount = 0;\n\n this.inPorts = Object.keys(\n this.ports.input\n );\n\n this.outPorts = Object.keys(\n this.ports.output\n );\n\n //this.filled = 0;\n\n this.chi = undefined;\n\n this._interval = 100;\n\n // this.context = {};\n\n this.nodeTimeout = map.nodeTimeout || 3000;\n\n this.inputTimeout = typeof map.inputTimeout === 'undefined' ?\n 3000 :\n map.inputTimeout;\n\n this._hold = false; // whether this node is on hold.\n\n this._inputTimeout = null;\n\n this._openPorts = [];\n\n this._connections = new Connections();\n\n this._forks = [];\n\n debug('%s: addMap', this.identifier);\n this.addMap(map);\n\n this.fork = function() {\n\n var Fork = function Fork() {\n this.nodes = {};\n //this.context = {};\n\n // same ioHandler, tricky..\n // this.ioHandler = undefined;\n };\n\n // Pre-filled baseActor is our prototype\n Fork.prototype = this.baseActor;\n\n var FActor = new Fork();\n\n // Remember all forks for maintainance\n self._forks.push(FActor);\n\n // Each fork should have their own event handlers.\n self.listenForOutput(FActor);\n\n return FActor;\n\n };\n\n this.listenForOutput();\n\n this.initPortOptions = function() {\n\n // Init port options.\n for (var port in self.ports.input) {\n if (self.ports.input.hasOwnProperty(port)) {\n\n // This flow's port\n var thisPort = self.ports.input[port];\n\n // set port option\n if (thisPort.options) {\n for (var opt in thisPort.options) {\n if (thisPort.options.hasOwnProperty(opt)) {\n self.setPortOption(\n 'input',\n port,\n opt,\n thisPort.options[opt]);\n }\n }\n }\n\n }\n }\n };\n\n // Too late?\n this.setup();\n\n this.setStatus('created');\n\n}", "function constructParams(types, data) {\n return types.map(function (type, i) {\n if (data && data[i]) {\n return new type(data[i]);\n }\n return new type();\n });\n}", "function constructParams(types, data) {\n return types.map(function (type, i) {\n if (data && data[i]) {\n return new type(data[i]);\n }\n return new type();\n });\n}", "function Type(){\n\t\t\tthis.array='Array';\n\t\t\tthis.object='object';\n\t\t\tthis.string='string';\n\t\t\tthis.fn='function';\n\t\t\tthis.number='number';\n\t\t}", "constructor(){\n\t\tthis.flowTree = [];\n\t\tthis.structure = {nodes: [], connections: [], transform: [1, 0, 0, 1, 0, 0]};\n\t\tthis._registeredNodes = {};\n\t}", "constructor(type, value, line, column) {\r\n this.type = type;\r\n this.value = value;\r\n this.line = line;\r\n this.column = column;\r\n }", "function PipeType(){}", "function Dataflow() {\n this._log = vegaUtil.logger();\n\n this._clock = 0;\n this._rank = 0;\n this._loader = vegaLoader.loader();\n\n this._touched = UniqueList(vegaUtil.id);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new Heap(function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n}", "function create(...values) {\n return fromArray(values);\n}", "function generateFlowData() {\n\td3.range(numFlowData).forEach((i) => {\n\t flowData[i] = normalize([\n Math.random() * 2 - 1, // column\n Math.random() * 2 - 1, // row\n 3 * Math.random(), // magnitude\n ]);\n\t});\n}", "constructor(type) {\n\n // Properties\n this.name = \"No_Name\";\n this.id = -1;\n\n if((type.localeCompare(\"test\") === 0) || (type.localeCompare(\"requirement\") === 0)) {\n this.type = type;\n }else{\n throw \"unknown type of GraphNode\";\n }\n\n //Metrics\n this.areaMetric = -1;\n this.heightMetric = -1;\n this.colorMetric = -1;\n\n }", "function astFromValue(_x, _x2) {\n var _again = true;\n\n _function: while (_again) {\n var value = _x,\n type = _x2;\n _value = _ret = stringNum = isIntValue = fields = undefined;\n _again = false;\n\n // Ensure flow knows that we treat function params as const.\n var _value = value;\n\n if (type instanceof _typeDefinition.GraphQLNonNull) {\n // Note: we're not checking that the result is non-null.\n // This function is not responsible for validating the input value.\n _x = _value;\n _x2 = type.ofType;\n _again = true;\n continue _function;\n }\n\n if ((0, _jsutilsIsNullish2['default'])(_value)) {\n return null;\n }\n\n // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n if (Array.isArray(_value)) {\n var _ret = (function () {\n var itemType = type instanceof _typeDefinition.GraphQLList ? type.ofType : null;\n return {\n v: {\n kind: _languageKinds.LIST,\n values: _value.map(function (item) {\n var itemValue = astFromValue(item, itemType);\n (0, _jsutilsInvariant2['default'])(itemValue, 'Could not create AST item.');\n return itemValue;\n })\n }\n };\n })();\n\n if (typeof _ret === 'object') return _ret.v;\n } else if (type instanceof _typeDefinition.GraphQLList) {\n // Because GraphQL will accept single values as a \"list of one\" when\n // expecting a list, if there's a non-array value and an expected list type,\n // create an AST using the list's item type.\n _x = _value;\n _x2 = type.ofType;\n _again = true;\n continue _function;\n }\n\n if (typeof _value === 'boolean') {\n return { kind: _languageKinds.BOOLEAN, value: _value };\n }\n\n // JavaScript numbers can be Float or Int values. Use the GraphQLType to\n // differentiate if available, otherwise prefer Int if the value is a\n // valid Int.\n if (typeof _value === 'number') {\n var stringNum = String(_value);\n var isIntValue = /^[0-9]+$/.test(stringNum);\n if (isIntValue) {\n if (type === _typeScalars.GraphQLFloat) {\n return { kind: _languageKinds.FLOAT, value: stringNum + '.0' };\n }\n return { kind: _languageKinds.INT, value: stringNum };\n }\n return { kind: _languageKinds.FLOAT, value: stringNum };\n }\n\n // JavaScript strings can be Enum values or String values. Use the\n // GraphQLType to differentiate if possible.\n if (typeof _value === 'string') {\n if (type instanceof _typeDefinition.GraphQLEnumType && /^[_a-zA-Z][_a-zA-Z0-9]*$/.test(_value)) {\n return { kind: _languageKinds.ENUM, value: _value };\n }\n // Use JSON stringify, which uses the same string encoding as GraphQL,\n // then remove the quotes.\n return { kind: _languageKinds.STRING, value: JSON.stringify(_value).slice(1, -1) };\n }\n\n // last remaining possible typeof\n (0, _jsutilsInvariant2['default'])(typeof _value === 'object' && _value !== null);\n\n // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object.\n var fields = [];\n _Object$keys(_value).forEach(function (fieldName) {\n var fieldType = undefined;\n if (type instanceof _typeDefinition.GraphQLInputObjectType) {\n var fieldDef = type.getFields()[fieldName];\n fieldType = fieldDef && fieldDef.type;\n }\n var fieldValue = astFromValue(_value[fieldName], fieldType);\n if (fieldValue) {\n fields.push({\n kind: _languageKinds.OBJECT_FIELD,\n name: { kind: _languageKinds.NAME, value: fieldName },\n value: fieldValue\n });\n }\n });\n return { kind: _languageKinds.OBJECT, fields: fields };\n }\n}", "function ListToObject(a, l, f) {\n\tvar c = l.count;\n\tfor (var i = 0; i < c; i++) {\n\t\tvar t = l.getType(i);\n\t\tswitch (t) {\n\t\t\tcase DescValueType.BOOLEANTYPE:\n\t\t\t\ta.push(l.getBoolean(i));\n\t\t\t\tbreak;\n\t\t\tcase DescValueType.STRINGTYPE:\n\t\t\t\ta.push(l.getString(i));\n\t\t\t\tbreak;\n\t\t\tcase DescValueType.DOUBLETYPE:\n\t\t\t\ta.push(l.getDouble(i));\n\t\t\t\tbreak;\n\t\t\tcase DescValueType.INTEGERTYPE:\n a.push(l.getInteger(i));\n break;\n case DescValueType.LARGEINTEGERTYPE:\n \ta.push(l.getLargeInteger(i));\n \tbreak;\n\t\t\tcase DescValueType.OBJECTTYPE:\n var newT = l.getObjectType(i);\n var newV = l.getObjectValue(i);\n var newO = new Object();\n a.push(newO);\n DescriptorToObject(newO, newV, f);\n break;\n\t\t\tcase DescValueType.UNITDOUBLE:\n var newT = l.getUnitDoubleType(i);\n var newV = l.getUnitDoubleValue(i);\n var newO = new Object();\n a.push(newO);\n newO.type = typeIDToCharID(newT);\n newO.typeString = typeIDToStringID(newT);\n newO.value = newV;\n break;\n\t\t\tcase DescValueType.ENUMERATEDTYPE:\n var newT = l.getEnumerationType(i);\n var newV = l.getEnumerationValue(i);\n var newO = new Object();\n a.push(newO);\n newO.type = typeIDToCharID(newT);\n newO.typeString = typeIDToStringID(newT);\n newO.value = typeIDToCharID(newV);\n newO.valueString = typeIDToStringID(newV);\n break;\n\t\t\tcase DescValueType.CLASSTYPE:\n a.push(l.getClass(i));\n break;\n\t\t\tcase DescValueType.ALIASTYPE:\n a.push(l.getPath(i));\n break;\n\t\t\tcase DescValueType.RAWTYPE:\n var tempStr = l.getData(i);\n tempArray = new Array();\n for (var tempi = 0; tempi < tempStr.length; tempi++) { \n tempArray[tempi] = tempStr.charCodeAt(tempi); \n }\n a.push(tempArray);\n break;\n\t\t\tcase DescValueType.REFERENCETYPE:\n var ref = l.getReference(i);\n var newO = new Object();\n a.push(newO);\n ReferenceToObject(newO, ref, f);\n break;\n\t\t\tcase DescValueType.LISTTYPE:\n var list = l.getList(i);\n var newO = new Object();\n a.push(newO);\n ListToObject(newO, list, f);\n break;\n\t\t\tdefault:\n\t\t\t\tmyLogging.LogIt(\"Unsupported type in descriptorToObject \" + t);\n\t\t}\n\t}\n\tif (undefined != f) {\n\t\to = f(o);\n\t}\n}", "constructor(type, sent, received, payload) {\n this.type = type;\n this.sent = sent;\n this.received = received;\n this.payload = payload;\n }", "copyFrom(data) {\n if (data instanceof NDArray) {\n this.lib.checkCall(this.lib.exports.TVMArrayCopyFromTo(data.handle, this.handle, 0));\n return this;\n }\n else {\n const size = this.shape.reduce((a, b) => {\n return a * b;\n }, 1);\n if (data.length != size) {\n throw new Error(\"data size and shape mismatch data.length\" +\n data.length +\n \" vs \" +\n size);\n }\n let buffer;\n if (this.dtype == \"float32\") {\n buffer = Float32Array.from(data).buffer;\n }\n else if (this.dtype == \"float64\") {\n buffer = Float64Array.from(data).buffer;\n }\n else if (this.dtype == \"int32\") {\n buffer = Int32Array.from(data).buffer;\n }\n else if (this.dtype == \"int8\") {\n buffer = Int8Array.from(data).buffer;\n }\n else if (this.dtype == \"uint8\") {\n buffer = Uint8Array.from(data).buffer;\n }\n else {\n throw new Error(\"Unsupported data type \" + this.dtype);\n }\n return this.copyFromRawBytes(new Uint8Array(buffer));\n }\n }", "getFlow() {\n return new NgFlowchart.Flow(this.canvas);\n }", "function buildFlowChart(data) {\n\n raw_data = data\n setupDirectorSelector(data);\n\n // create tooltip ref\n ttip = d3.select(\"#runtime-graph\") \n .append(\"div\")\n .attr(\"class\", \"tooltip\")\n .attr(\"id\", \"network-tt\")\n .style(\"opacity\", 0); // initially invisible\n \n updateFlowChart(data)\n}", "static fromSchema(schema) {\n if (typeof schema === \"string\") {\n return AvroType.fromStringSchema(schema);\n }\n else if (Array.isArray(schema)) {\n return AvroType.fromArraySchema(schema);\n }\n else {\n return AvroType.fromObjectSchema(schema);\n }\n }", "static fromSchema(schema) {\n if (typeof schema === \"string\") {\n return AvroType.fromStringSchema(schema);\n }\n else if (Array.isArray(schema)) {\n return AvroType.fromArraySchema(schema);\n }\n else {\n return AvroType.fromObjectSchema(schema);\n }\n }", "function from(value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n\n if (isArrayBuffer(value)) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset);\n }\n\n return fromObject(value);\n }", "constructor( data ){\n this._emitter = new EventTarget();\n this._converters = new Map();\n this._dynamicProperties = false;\n this._data = data;\n }", "function createSourceFromSeriesDataOption(data) {\n\t return new SourceImpl({\n\t data: data,\n\t sourceFormat: isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL\n\t });\n\t }", "function Fay$$jsToFay(type,jsObj){\n var base = type[0];\n var args = type[1];\n var fayObj;\n switch(base){\n case \"action\": {\n // Unserialize a \"monadic\" JavaScript return value into a monadic value.\n fayObj = new Fay$$Monad(Fay$$jsToFay(args[0],jsObj));\n break;\n }\n case \"string\": {\n // Unserialize a JS string into Fay list (String).\n fayObj = Fay$$list(jsObj);\n break;\n }\n case \"list\": {\n // Unserialize a JS array into a Fay list ([a]).\n var serializedList = [];\n for (var i = 0, len = jsObj.length; i < len; i++) {\n // Unserialize each JS value into a Fay value, too.\n serializedList.push(Fay$$jsToFay(args[0],jsObj[i]));\n }\n // Pop it all in a Fay list.\n fayObj = Fay$$list(serializedList);\n break;\n }\n case \"tuple\": {\n // Unserialize a JS array into a Fay tuple ((a,b,c,...)).\n var serializedTuple = [];\n for (var i = 0, len = jsObj.length; i < len; i++) {\n // Unserialize each JS value into a Fay value, too.\n serializedTuple.push(Fay$$jsToFay(args[i],jsObj[i]));\n }\n // Pop it all in a Fay list.\n fayObj = Fay$$list(serializedTuple);\n break;\n }\n case \"defined\": {\n if (jsObj === undefined) {\n fayObj = new $_Language$Fay$FFI$Undefined();\n } else {\n fayObj = new $_Language$Fay$FFI$Defined(Fay$$jsToFay(args[0],jsObj));\n }\n break;\n }\n case \"nullable\": {\n if (jsObj === null) {\n fayObj = new $_Language$Fay$FFI$Null();\n } else {\n fayObj = new $_Language$Fay$FFI$Nullable(Fay$$jsToFay(args[0],jsObj));\n }\n break;\n }\n case \"double\": {\n // Doubles are unboxed, so there's nothing to do.\n fayObj = jsObj;\n break;\n }\n case \"int\": {\n // Int are unboxed, so there's no forcing to do.\n // But we can do validation that the int has no decimal places.\n // E.g. Math.round(x)!=x? throw \"NOT AN INTEGER, GET OUT!\"\n fayObj = Math.round(jsObj);\n if(fayObj!==jsObj) throw \"Argument \" + jsObj + \" is not an integer!\";\n break;\n }\n case \"bool\": {\n // Bools are unboxed.\n fayObj = jsObj;\n break;\n }\n case \"unknown\":\n case \"user\": {\n if (jsObj && jsObj['instance']) {\n fayObj = Fay$$jsToFayUserDefined(type,jsObj);\n }\n else\n fayObj = jsObj;\n break;\n }\n default: throw new Error(\"Unhandled JS->Fay translation type: \" + base);\n }\n return fayObj;\n}", "function fromMemory(modelArtifacts, weightSpecs, weightData, trainingConfig) {\n if (arguments.length === 1) {\n const isModelArtifacts = modelArtifacts.modelTopology != null ||\n modelArtifacts.weightSpecs != null;\n if (isModelArtifacts) {\n return new PassthroughLoader(modelArtifacts);\n }\n else {\n // Legacy support: with only modelTopology.\n // TODO(cais): Remove this deprecated API.\n console.warn('Please call tf.io.fromMemory() with only one argument. ' +\n 'The argument should be of type ModelArtifacts. ' +\n 'The multi-argument signature of tf.io.fromMemory() has been ' +\n 'deprecated and will be removed in a future release.');\n return new PassthroughLoader({ modelTopology: modelArtifacts });\n }\n }\n else {\n // Legacy support.\n // TODO(cais): Remove this deprecated API.\n console.warn('Please call tf.io.fromMemory() with only one argument. ' +\n 'The argument should be of type ModelArtifacts. ' +\n 'The multi-argument signature of tf.io.fromMemory() has been ' +\n 'deprecated and will be removed in a future release.');\n return new PassthroughLoader({\n modelTopology: modelArtifacts,\n weightSpecs,\n weightData,\n trainingConfig\n });\n }\n}", "function fromMemory(modelArtifacts, weightSpecs, weightData, trainingConfig) {\n if (arguments.length === 1) {\n const isModelArtifacts = modelArtifacts.modelTopology != null ||\n modelArtifacts.weightSpecs != null;\n if (isModelArtifacts) {\n return new PassthroughLoader(modelArtifacts);\n }\n else {\n // Legacy support: with only modelTopology.\n // TODO(cais): Remove this deprecated API.\n console.warn('Please call tf.io.fromMemory() with only one argument. ' +\n 'The argument should be of type ModelArtifacts. ' +\n 'The multi-argument signature of tf.io.fromMemory() has been ' +\n 'deprecated and will be removed in a future release.');\n return new PassthroughLoader({ modelTopology: modelArtifacts });\n }\n }\n else {\n // Legacy support.\n // TODO(cais): Remove this deprecated API.\n console.warn('Please call tf.io.fromMemory() with only one argument. ' +\n 'The argument should be of type ModelArtifacts. ' +\n 'The multi-argument signature of tf.io.fromMemory() has been ' +\n 'deprecated and will be removed in a future release.');\n return new PassthroughLoader({\n modelTopology: modelArtifacts,\n weightSpecs,\n weightData,\n trainingConfig\n });\n }\n}", "constructor(elements) {\n super();\n /**\n * The type name identifier.\n */\n this.type = \"tuple\";\n this.elements = elements;\n }", "function makeDataSampleWithJava(type) {\n if (type == NUMBER) {\n return 0;\n }\n if (type == TIMESTAMP) {\n return \"timestampBatchEnter\";\n }\n\n return \"null\";\n}", "toInput(plain = false, plainData = d => d, plainMeta = m => m) {\n let out = {};\n out.type = this.type;\n out.size = this.size;\n out.fill = this.fill;\n out.minimumSize = this.minimumSize;\n out.repeatCovers = this.repeatCovers;\n out.listTimes = this.listTimes;\n out.eventsOutside = this.eventsOutside;\n out.updateRows = this.updateRows;\n out.updateColumns = this.updateColumns;\n out.around = plain ? this.span.start.time : this.span.start;\n out.events = [];\n for (let event of this.events) {\n if (plain) {\n let plainEvent = {};\n if (fn.isDefined(event.id)) {\n plainEvent.id = event.id;\n }\n if (fn.isDefined(event.data)) {\n plainEvent.data = plainData(event.data);\n }\n if (!event.visible) {\n plainEvent.visible = event.visible;\n }\n plainEvent.schedule = event.schedule.toInput();\n let meta = plainEvent.schedule.meta;\n if (meta) {\n for (let identifier in meta) {\n meta[identifier] = plainMeta(meta[identifier]);\n }\n }\n out.events.push(plainEvent);\n }\n else {\n out.events.push(event);\n }\n }\n return out;\n }", "function sourceFactory(srcType) {\n switch (srcType) {\n case sourceTypes.rest:\n return (data) => undefined; // No data should be sent during this source anyway.\n case sourceTypes.tap:\n return (data) => 100;\n case sourceTypes.taprate:\n return (data) => (data[0] > 300 ? 300 : data[0]) / 3;\n case sourceTypes.text:\n return (data) => data[0].length === 1 ? undefined : data[0].length > 100 ? 100 : data[0].length;\n case sourceTypes.orient:\n return (data) => ((data[0] / 3.6) + ((data[1] + 180) / 3.6) + ((data[2] + 90) / 1.8)) / 3;\n case sourceTypes.orienta:\n return (data) => data[0] / 3.6;\n case sourceTypes.orientb:\n return (data) => (data[0] + 180) / 3.6;\n case sourceTypes.orientg:\n return (data) => (data[0] + 90) / 1.8;\n case sourceTypes.accel: // TODO Because this is acceleration, every time the direction changes or reaches a constant speed it goes back to 0 briefly. Come up with a way to work around this.\n return (data) => {\n let x = Math.abs(data[0]) * 10;\n x = x > 100 ? 100 : x; // TODO Abstract this kind of logic to a function, this is messy.\n let y = Math.abs(data[1]) * 10;\n y = y > 100 ? 100 : y;\n let z = Math.abs(data[2]) * 10;\n z = z > 100 ? 100 : z;\n return (x + y + z) / 3; // TODO This average isn't quite the best way of representing the vector of direction as a scalar, revisit at a later time.\n }\n case sourceTypes.accelx:\n case sourceTypes.accely:\n case sourceTypes.accelz:\n return (data) => {\n let num = Math.abs(data[0]) * 10;\n return num > 100 ? 100 : num;\n }\n case sourceTypes.xypad:\n return (data) => (data[0] + data[1]) / 2;\n case sourceTypes.swipe:\n return (data) => data[0] ? 100 : 0;\n }\n}", "function T(a,b,c,d){var e,f,g,h,i,j={},\n// Work with a copy of dataTypes in case we need to modify it for conversion\nk=a.dataTypes.slice();\n// Create converters map with lowercased keys\nif(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];\n// Convert to each sequential dataType\nfor(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),\n// Apply the dataFilter if provided\n!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())\n// There's only work to do if current dataType is non-auto\nif(\"*\"===f)f=i;else if(\"*\"!==i&&i!==f){\n// If none found, seek a pair\nif(g=j[i+\" \"+f]||j[\"* \"+f],!g)for(e in j)if(h=e.split(\" \"),h[1]===f&&(g=j[i+\" \"+h[0]]||j[\"* \"+h[0]])){\n// Condense equivalence converters\ng===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}\n// Apply converter (if not an equivalence)\nif(g!==!0)\n// Unless errors are allowed to bubble, catch and return them\nif(g&&a[\"throws\"])b=g(b);else try{b=g(b)}catch(l){return{state:\"parsererror\",error:g?l:\"No conversion from \"+i+\" to \"+f}}}return{state:\"success\",data:b}}", "constructor(type) { \n this.type = type \n this.parser = null\n }", "static _processType(typeItem) {\n switch (typeItem.kind) {\n case 'variable-type':\n return Type.newVariableReference(typeItem.name);\n case 'reference-type':\n return Type.newManifestReference(typeItem.name);\n case 'list-type':\n return Type.newSetView(Manifest._processType(typeItem.type));\n default:\n throw `Unexpected type item of kind '${typeItem.kind}'`;\n }\n }", "constructor(type, type_list, value_list=null) {\n super(type)\n this.type_list = type_list\n if(value_list==null){\n value_list = []\n for(var i=0; i<type_list.length; i++) value_list.push(null)\n }\n this.value_list = value_list\n }", "function createData(name, fluxToBurn, price, fluxBlocks, fluxPerYear, fluxApyPerYear, fluxPerYearValue) {\n return { name, fluxToBurn, price, fluxBlocks, fluxPerYear, fluxApyPerYear, fluxPerYearValue };\n}", "function createSource(...args) {\n return new Source(...args)\n}", "create_input(input_id, input_type, ...args){\n let input = new this.input_type_list[input_type](args)\n this.form_inputs[input_id] = input;\n return input;\n }", "function gen(obj) {\n function sub(m,name) {\n var p, i, typ = gettype(m), rc = {type:typ};\n switch (typ) {\n case 'number':\n case 'boolean':\n case 'string':\n case 'null':\n break;\n case 'array':\n if (m[0]===undefined) throw('array must be non-empty '+name);\n rc.items = sub(m[0], name);\n break;\n case 'object':\n rc.properties = {};\n var req = [];\n for (i in m) {\n rc.properties[i] = sub(m[i], i);\n req.push(i);\n }\n if (req.length)\n rc.required = req;\n break;\n \n default:\n console.log('ignoring unsupported type:', typ);\n }\n return rc;\n }\n return sub(obj,'');\n }", "function astFromValue(_x, _x2) {\n\t var _again = true;\n\n\t _function: while (_again) {\n\t var value = _x,\n\t type = _x2;\n\t _value = _ret = stringNum = isIntValue = fields = undefined;\n\t _again = false;\n\n\t // Ensure flow knows that we treat function params as const.\n\t var _value = value;\n\n\t if (type instanceof _typeDefinition.GraphQLNonNull) {\n\t // Note: we're not checking that the result is non-null.\n\t // This function is not responsible for validating the input value.\n\t _x = _value;\n\t _x2 = type.ofType;\n\t _again = true;\n\t continue _function;\n\t }\n\n\t if ((0, _jsutilsIsNullish2['default'])(_value)) {\n\t return null;\n\t }\n\n\t // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n\t // the value is not an array, convert the value using the list's item type.\n\t if (Array.isArray(_value)) {\n\t var _ret = (function () {\n\t var itemType = type instanceof _typeDefinition.GraphQLList ? type.ofType : null;\n\t return {\n\t v: {\n\t kind: _languageKinds.LIST,\n\t values: _value.map(function (item) {\n\t var itemValue = astFromValue(item, itemType);\n\t (0, _jsutilsInvariant2['default'])(itemValue, 'Could not create AST item.');\n\t return itemValue;\n\t })\n\t }\n\t };\n\t })();\n\n\t if (typeof _ret === 'object') return _ret.v;\n\t } else if (type instanceof _typeDefinition.GraphQLList) {\n\t // Because GraphQL will accept single values as a \"list of one\" when\n\t // expecting a list, if there's a non-array value and an expected list type,\n\t // create an AST using the list's item type.\n\t _x = _value;\n\t _x2 = type.ofType;\n\t _again = true;\n\t continue _function;\n\t }\n\n\t if (typeof _value === 'boolean') {\n\t return { kind: _languageKinds.BOOLEAN, value: _value };\n\t }\n\n\t // JavaScript numbers can be Float or Int values. Use the GraphQLType to\n\t // differentiate if available, otherwise prefer Int if the value is a\n\t // valid Int.\n\t if (typeof _value === 'number') {\n\t var stringNum = String(_value);\n\t var isIntValue = /^[0-9]+$/.test(stringNum);\n\t if (isIntValue) {\n\t if (type === _typeScalars.GraphQLFloat) {\n\t return { kind: _languageKinds.FLOAT, value: stringNum + '.0' };\n\t }\n\t return { kind: _languageKinds.INT, value: stringNum };\n\t }\n\t return { kind: _languageKinds.FLOAT, value: stringNum };\n\t }\n\n\t // JavaScript strings can be Enum values or String values. Use the\n\t // GraphQLType to differentiate if possible.\n\t if (typeof _value === 'string') {\n\t if (type instanceof _typeDefinition.GraphQLEnumType && /^[_a-zA-Z][_a-zA-Z0-9]*$/.test(_value)) {\n\t return { kind: _languageKinds.ENUM, value: _value };\n\t }\n\t // Use JSON stringify, which uses the same string encoding as GraphQL,\n\t // then remove the quotes.\n\t return { kind: _languageKinds.STRING, value: JSON.stringify(_value).slice(1, -1) };\n\t }\n\n\t // last remaining possible typeof\n\t (0, _jsutilsInvariant2['default'])(typeof _value === 'object' && _value !== null);\n\n\t // Populate the fields of the input object by creating ASTs from each value\n\t // in the JavaScript object.\n\t var fields = [];\n\t _Object$keys(_value).forEach(function (fieldName) {\n\t var fieldType = undefined;\n\t if (type instanceof _typeDefinition.GraphQLInputObjectType) {\n\t var fieldDef = type.getFields()[fieldName];\n\t fieldType = fieldDef && fieldDef.type;\n\t }\n\t var fieldValue = astFromValue(_value[fieldName], fieldType);\n\t if (fieldValue) {\n\t fields.push({\n\t kind: _languageKinds.OBJECT_FIELD,\n\t name: { kind: _languageKinds.NAME, value: fieldName },\n\t value: fieldValue\n\t });\n\t }\n\t });\n\t return { kind: _languageKinds.OBJECT, fields: fields };\n\t }\n\t}", "function initTypedJs() {\r\n new Typed(\".typed\", {\r\n strings: [\"A Coder.\",\"Frontend.\", \"Analytical.\", \"A Web Developer.\", \"A Gamer.\"],\r\n typeSpeed: 85,\r\n loop: true,\r\n });\r\n}", "function local_change_type(input_object, new_type)\n {\n if(input_object instanceof new_type)\n return input_object;\n\n var new_object = new new_type();\n new_object.id_block = input_object.id_block;\n new_object.len_block = input_object.len_block;\n new_object.warnings = input_object.warnings;\n new_object.value_before_decode = util_copybuf(input_object.value_before_decode);\n\n return new_object;\n }", "function analyze(data, scope, ops) {\n // POSSIBLE TODOs:\n // - error checking for treesource on tree operators (BUT what if tree is upstream?)\n // - this is local analysis, perhaps some tasks better for global analysis...\n\n var output = [],\n source = null,\n modify = false,\n generate = false,\n upstream, i, n, t, m;\n\n if (data.values) {\n // hard-wired input data set\n output.push(source = collect({\n $ingest: data.values,\n $format: data.format\n }));\n } else if (data.url) {\n // load data from external source\n // if either url or format has signal, use dynamic loader\n // otherwise, request load upon dataflow init\n source = (hasSignal(data.url) || hasSignal(data.format))\n ? {$load: ref(scope.add(load$1(scope, data, source)))}\n : {$request: data.url, $format: data.format};\n output.push(source = collect(source));\n } else if (data.source) {\n // derives from one or more other data sets\n source = upstream = array(data.source).map(function(d) {\n return ref(scope.getData(d).output);\n });\n output.push(null); // populate later\n }\n\n // scan data transforms, add collectors as needed\n for (i=0, n=ops.length; i<n; ++i) {\n t = ops[i];\n m = t.metadata;\n\n if (!source && !m.source) {\n output.push(source = collect());\n }\n output.push(t);\n\n if (m.generates) generate = true;\n if (m.modifies && !generate) modify = true;\n\n if (m.source) source = t;\n else if (m.changes) source = null;\n }\n\n if (upstream) {\n n = upstream.length - 1;\n output[0] = Relay$1({\n derive: modify,\n pulse: n ? upstream : upstream[0]\n });\n if (modify || n) {\n // collect derived and multi-pulse tuples\n output.splice(1, 0, collect());\n }\n }\n\n if (!source) output.push(collect());\n output.push(Sieve$1({}));\n return output;\n }", "function addFlows (newFlows) {\n\t\tvar startPoint,\n\t\t\tendPoint,\n\t\t\tflow,\n\t\t\ti, j;\n\t\t\t\n\t\tfor( i= 0, j = newFlows.length; i < j; i += 1) {\n\t\t\tflow = newFlows[i];\n\t\t\t\n\t\t\t// if the node has an id\n\t\t\t\n\t\t\tstartPoint = findPoint(flow.getStartPt());\n\t\t\tendPoint = findPoint(flow.getEndPt());\n\t\t\tflow.setStartPt(startPoint[1]);\n\t\t\tflow.setEndPt(endPoint[1]);\n\t\t\t\n\t\t\t// The point is verified to not currently exist in nodes.\n\t\t\t// You can safely push it into nodes without fear of duplication.\n\t\t\t// It might not have xy though? You should make sure it has xy elsewhere. \n\t\t\tif(startPoint[0]===false) {\n\t\t\t\tnodes.push(startPoint[1]);\n\t\t\t}\n\t\t\tif(endPoint[0]===false) {\n\t\t\t\tnodes.push(endPoint[1]);\n\t\t\t}\n\t\t\t\t\t\t\n\t flows.push(flow);\n\t \n\t\t\t// If the start and end points don't have incomingFlows and \n\t\t\t// outgoingFlows as properties, add them here. \n\t\t\t// This is needed after copying the model. \n\t\t\tif(!startPoint[1].hasOwnProperty(\"outgoingFlows\")) {\n\t\t\t\tstartPoint[1].outgoingFlows = [];\n\t\t\t}\n\t\t\tif(!startPoint[1].hasOwnProperty(\"incomingFlows\")) {\n\t\t\t\tstartPoint[1].incomingFlows = [];\n\t\t\t}\n\t\t\tif(!endPoint[1].hasOwnProperty(\"outgoingFlows\")) {\n\t\t\t\tendPoint[1].outgoingFlows = [];\n\t\t\t}\n\t\t\tif(!endPoint[1].hasOwnProperty(\"incomingFlows\")) {\n\t\t\t\tendPoint[1].incomingFlows = [];\n\t\t\t}\n\t startPoint[1].outgoingFlows.push(flow);\n\t endPoint[1].incomingFlows.push(flow);\n\t \n\t assignOppositeFlow(flow);\n\t\t}\n\t //updateCachedValues();\n }", "function from(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return fromString(value, encodingOrOffset);\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayLike(value);\n }\n\n if (value == null) {\n throw new TypeError(\n \"The first argument must be one of type string, Buffer, ArrayBuffer, Array, \" +\n \"or Array-like Object. Received type \" +\n typeof value\n );\n }\n\n if (\n isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))\n ) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n\n if (\n typeof SharedArrayBuffer !== \"undefined\" &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))\n ) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n\n if (typeof value === \"number\") {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n );\n }\n\n var valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length);\n }\n\n var b = fromObject(value);\n if (b) return b;\n\n if (\n typeof Symbol !== \"undefined\" &&\n Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === \"function\"\n ) {\n return Buffer.from(\n value[Symbol.toPrimitive](\"string\"),\n encodingOrOffset,\n length\n );\n }\n\n throw new TypeError(\n \"The first argument must be one of type string, Buffer, ArrayBuffer, Array, \" +\n \"or Array-like Object. Received type \" +\n typeof value\n );\n }", "createType (typedefinition, id) {\n var structname = typedefinition[0].struct\n id = id || this.getNextOpId(1)\n var op = Y.Struct[structname].create(id)\n op.type = typedefinition[0].name\n\n this.requestTransaction(function * () {\n if (op.id[0] === '_') {\n yield* this.setOperation(op)\n } else {\n yield* this.applyCreatedOperations([op])\n }\n })\n var t = Y[op.type].typeDefinition.createType(this, op, typedefinition[1])\n this.initializedTypes[JSON.stringify(op.id)] = t\n return t\n }", "function from(value, encodingOrOffset, length) {\n\t\tif (typeof value === 'string') {\n\t\t\treturn fromString(value, encodingOrOffset);\n\t\t}\n\n\t\tif (ArrayBuffer.isView(value)) {\n\t\t\treturn fromArrayLike(value);\n\t\t}\n\n\t\tif (value == null) {\n\t\t\tthrow TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + (typeof value === 'undefined' ? 'undefined' : _typeof(value)));\n\t\t}\n\n\t\tif (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n\t\t\treturn fromArrayBuffer(value, encodingOrOffset, length);\n\t\t}\n\n\t\tif (typeof value === 'number') {\n\t\t\tthrow new TypeError('The \"value\" argument must not be of type number. Received type number');\n\t\t}\n\n\t\tvar valueOf = value.valueOf && value.valueOf();\n\t\tif (valueOf != null && valueOf !== value) {\n\t\t\treturn Buffer.from(valueOf, encodingOrOffset, length);\n\t\t}\n\n\t\tvar b = fromObject(value);\n\t\tif (b) return b;\n\n\t\tif (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') {\n\t\t\treturn Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);\n\t\t}\n\n\t\tthrow new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + (typeof value === 'undefined' ? 'undefined' : _typeof(value)));\n\t}", "function addNode(sText, sType) {\n var oNode = null;\n try {\n if (goFlow != null) {\n //Create a new node (by default rectangle is created because the goFlow.nodeModel.shapeFamily is set to 'ploygon').\n oNode = goFlow.addNode(10, 10, giDefaultHeight, giDefaultHeight, sText);\n //LEARNING: Never try to set like this: oNode.shapeFamily = sType; -It will make the node unselectable\n //if the type os 'polygon', change the rectangle to a polygon.\n if (sType == 'polygon') {\n oNode.polygon = [[oNode.getLeft(), oNode.getTop() - (oNode.getHeight() / 2)],\n [oNode.getLeft() + (oNode.getWidth() / 2), oNode.getTop() - oNode.getHeight()],\n [oNode.getLeft() + oNode.getWidth(), oNode.getTop() - (oNode.getHeight() / 2)],\n [oNode.getLeft() + (oNode.getWidth() / 2), oNode.getTop()]];\n }\n\n goFlow.refresh();\n }\n }\n catch (err) {\n alert(err.innerHTML);\n }\n}", "function factory (type, config, load, typed) {\n const std = load(require('../../function/statistics/std'))\n\n return typed('std', {\n '...any': function (args) {\n // change last argument dim from one-based to zero-based\n if (args.length >= 2 && isCollection(args[0])) {\n const dim = args[1]\n if (type.isNumber(dim)) {\n args[1] = dim - 1\n } else if (type.isBigNumber(dim)) {\n args[1] = dim.minus(1)\n }\n }\n\n try {\n return std.apply(null, args)\n } catch (err) {\n throw errorTransform(err)\n }\n }\n })\n}", "function getSubflowDef(flow) {\n const newFlow = [];\n let sf = null;\n flow.forEach((item) => {\n if (item.hasOwnProperty(\"meta\") &&\n item.meta.hasOwnProperty(\"module\")) {\n if (sf !== null) {\n throw new Error(\"unexpected subflow definition\");\n }\n sf = item;\n }\n else {\n newFlow.push(item);\n }\n });\n if (sf == null) {\n throw new Error(\"No module properties in subflow\");\n }\n return [sf, newFlow];\n}", "startWorkflow(flow) {\n // custom id management\n let customId = null;\n if (typeof flow.id === \"function\") {\n // customId can be a value or a function\n customId = flow.id();\n // customId should be a string or a number\n if (typeof customId !== \"string\" && typeof customId !== \"number\") {\n throw new InvalidArgumentError(\n `Provided id must be a string or a number - current type: ${typeof customId}`,\n );\n }\n // at the end, it's a string\n customId = customId.toString();\n // should be not more than 256 bytes;\n if (customId.length >= MAX_ID_SIZE) {\n throw new ExternalZenatonError(\n `Provided id must not exceed ${MAX_ID_SIZE} bytes`,\n );\n }\n }\n\n const url = this.getInstanceWorkerUrl();\n\n // start workflow\n const body = {\n [ATTR_PROG]: PROG,\n [ATTR_CANONICAL]: flow._getCanonical(),\n [ATTR_NAME]: flow.name,\n [ATTR_DATA]: serializer.encode(flow.data),\n [ATTR_ID]: customId,\n };\n\n const params = this.getAppEnv();\n\n return http.post(url, body, { params });\n }", "function FlowRecognizer(settings) {\n _classCallCheck(this, FlowRecognizer);\n\n this.settings = settings || {};\n this.initializeModels();\n }", "function PipeType() {}", "create(data, params) {}", "constructor(values) {\r\n this.data = new Int32Array(FieldElement.FIELD_ELEMENT_SIZE);\r\n if (values) {\r\n this.data.set(values);\r\n }\r\n }", "function types(type) {\n // XXX: type('string').validator('lte')\n // would default to `validator('gte')` if not explicitly defined.\n type('string')\n .use(String)\n .validator('gte', function gte(a, b){\n return a.length >= b.length;\n })\n .validator('gt', function gt(a, b){\n return a.length > b.length;\n });\n\n type('id');\n\n type('integer')\n .use(parseInt);\n\n type('float')\n .use(parseFloat);\n\n type('decimal')\n .use(parseFloat);\n\n type('number')\n .use(parseFloat);\n \n type('date')\n .use(parseDate);\n\n type('boolean')\n .use(parseBoolean);\n\n type('array')\n // XXX: test? test('asdf') // true/false if is type.\n // or `validate`\n .use(function(val){\n // XXX: handle more cases.\n return isArray(val)\n ? val\n : val.split(/,\\s*/);\n })\n .validator('lte', function lte(a, b){\n return a.length <= b.length;\n });\n\n function parseDate(val) {\n return isDate(val)\n ? val\n : new Date(val);\n }\n\n function parseBoolean(val) {\n // XXX: can be made more robust\n return !!val;\n }\n}", "constructor(str, data)\n {\n this.errors = [];\n let lines = str.split('\\n');\n\n let tokenizer = new Tokenizer(lines);\n for ( var i = 0; i < tokenizer.errors.length; i++ )\n {\n this.errors.push(tokenizer.errors[i]);\n if ( i === tokenizer.errors.length - 1 )\n return;\n }\n\n let expressions = [];\n for ( var i = 0; i < tokenizer.lines.length; i++ )\n expressions.push(new Expression(tokenizer.lines[i], i+1));\n\n let leave = false;\n for ( var i = 0; i < expressions.length; i++ )\n {\n if ( expressions[i].valid === false && expressions[i].err === false )\n {\n expressions.splice(i--, 1);\n continue;\n }\n\n if ( expressions[i].err )\n {\n this.errors.push(expressions[i].err);\n leave = true;\n }\n }\n\n if ( leave )\n return;\n\n try\n {\n let parsedState = parser(expressions);\n this.program = new Program(parsedState, data);\n }\n catch(e)\n {\n this.errors.push(e);\n }\n }", "function renderAsGraph(graphViewer, data) {\n var lines = data.split(\"\\n\")\n for (var i in lines) {\n var tmp = lines[i].split(\"\\t\");\n if (tmp.length == 2) {\n graphViewer.add_node(tmp[1], tmp[1], {\n type : tmp[0]\n })\n }\n if (tmp.length == 3) {\n graphViewer.add_edge(tmp[0], tmp[1], {\n type : tmp[2]\n });\n }\n }\n graphViewer.render();\n}", "function fromBinaryType(t) {\n return BinaryType (t.name)\n (t.url)\n (t.supertypes)\n (t._test ([]))\n (t._extractors.$1)\n (t._extractors.$2);\n }", "function from(value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset);\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayLike(value);\n }\n\n if (value == null) {\n throw TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' +\n typeof value\n );\n }\n\n if (\n isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))\n ) {\n return fromArrayBuffer(value, encodingOrOffset, length);\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n );\n }\n\n var valueOf = value.valueOf && value.valueOf();\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length);\n }\n\n var b = fromObject(value);\n if (b) return b;\n\n if (\n typeof Symbol !== 'undefined' &&\n Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function'\n ) {\n return Buffer.from(\n value[Symbol.toPrimitive]('string'),\n encodingOrOffset,\n length\n );\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' +\n typeof value\n );\n }", "function fromType (entry, type) {\n let inttype = Helpers.intToType(type);\n switch (inttype) {\n case 'MapQL': case 'Map':\n return (new MapQL()).import(entry); // Convert all 'Map()' entries to MapQL.\n case 'Set':\n return new Set(entry.map((val) => {\n return fromType(val[0], val[1]);\n }));\n case 'Array':\n return entry.map((val) => {\n return fromType(val[0], val[1]);\n });\n case 'Object':\n return ((obj) => {\n for (let key of Object.keys(obj)) {\n obj[key] = fromType(obj[key][0], obj[key][1]);\n }\n return obj;\n })(entry);\n case 'Function':\n // XXX: Function() is a form of eval()!\n return new Function(`return ${entry};`)();\n case 'RegExp':\n return RegExp.apply(null, entry.match(/\\/(.*?)\\/([gimuy])?$/).slice(1));\n case 'Date':\n return new Date(entry);\n case 'Uint8Array':\n try {\n return new Uint8Array(entry);\n } catch (error) {\n try {\n return Buffer.from(entry);\n } catch (error) { return Array.from(entry); }\n }\n case 'Buffer':\n try {\n return Buffer.from(entry);\n } catch (error) {\n try {\n return new Uint8Array(entry);\n } catch (error) { return Array.from(entry); }\n }\n default:\n // Execute the function/constructor with the entry value. If type is not a\n // function or constructor, just return the value. Try without `new`, if\n // that fails try again with `new`. This attempts to import unknown types.\n let _fn = (Helpers.__GLOBAL[inttype] ? (new Function(`return ${inttype}`))() : (e) => { return e });\n try { return _fn(entry); } catch (e) { try { return new _fn(entry); } catch (error) { console.trace(error); } }\n }\n}", "function type(rule,value,source,errors,options){if(rule.required&&value===undefined){Object(__WEBPACK_IMPORTED_MODULE_2__required__[\"a\"/* default */])(rule,value,source,errors,options);return;}var custom=['integer','float','array','regexp','object','method','email','number','date','url','hex'];var ruleType=rule.type;if(custom.indexOf(ruleType)>-1){if(!types[ruleType](value)){errors.push(__WEBPACK_IMPORTED_MODULE_1__util__[\"d\"/* format */](options.messages.types[ruleType],rule.fullField,rule.type));}// straight typeof check\n}else if(ruleType&&(typeof value==='undefined'?'undefined':__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(value))!==rule.type){errors.push(__WEBPACK_IMPORTED_MODULE_1__util__[\"d\"/* format */](options.messages.types[ruleType],rule.fullField,rule.type));}}", "function constructPipeline() {\n // console.log($rootScope.CSVdelim);\n // var separator = $rootScope.CSVdelim?$rootScope.CSVdelim:'\\\\,';\n var readDatasetFunct = new jsedn.List([\n new jsedn.sym('read-dataset'),\n new jsedn.sym('data-file')\n ]);\n\n pipeline = null;\n\n pipeline = new jsedn.List([\n jsedn.sym('defpipe'),\n jsedn.sym('my-pipe'),\n 'Grafter pipeline for data clean-up and preparation.',\n new jsedn.Vector([new jsedn.sym('data-file')]),\n new jsedn.List([jsedn.sym('->'), readDatasetFunct])\n ]);\n\n pipelineFunctions.map(function (arg) {\n pipeline.val[4].val.push(arg);\n });\n\n //(read-dataset data-file :format :csv)\n pipelineFunctions = new jsedn.List([]);\n return pipeline;\n}", "function flowTypeHandler(documentation, path) {\n var flowTypesPath = (0, _utilsGetFlowTypeFromReactComponent2['default'])(path);\n\n if (!flowTypesPath) {\n return;\n }\n\n flowTypesPath.get('properties').each(function (propertyPath) {\n var propDescriptor = documentation.getPropDescriptor((0, _utilsGetPropertyName2['default'])(propertyPath));\n var valuePath = propertyPath.get('value');\n var type = (0, _utilsGetFlowType2['default'])(valuePath);\n\n if (type) {\n propDescriptor.flowType = type;\n propDescriptor.required = !propertyPath.node.optional;\n }\n });\n}", "makeTensor(values, shape, dtype, backend) {\n if (values == null) {\n throw new Error('Values passed to engine.makeTensor() are null');\n }\n dtype = dtype || 'float32';\n backend = backend || this.backend;\n let backendVals = values;\n if (dtype === 'string' && _util__WEBPACK_IMPORTED_MODULE_9__[\"isString\"](values[0])) {\n backendVals = values.map(d => _util__WEBPACK_IMPORTED_MODULE_9__[\"encodeString\"](d));\n }\n const dataId = backend.write(backendVals, shape, dtype);\n const t = new _tensor__WEBPACK_IMPORTED_MODULE_7__[\"Tensor\"](shape, dtype, dataId, this.nextTensorId());\n this.trackTensor(t, backend);\n // Count bytes for string tensors.\n if (dtype === 'string') {\n const info = this.state.tensorInfo.get(dataId);\n const newBytes = Object(_util__WEBPACK_IMPORTED_MODULE_9__[\"bytesFromStringArray\"])(backendVals);\n this.state.numBytes += newBytes - info.bytes;\n info.bytes = newBytes;\n }\n return t;\n }", "constructor (GRAMMAR_NAME) {\n Object.assign(this,\n JSON.parse(fs.readFileSync(new URL(`./types/${GRAMMAR_NAME}.json`, import.meta.url), 'utf8')\n )\n )\n }", "initFlow() {\n if (this.validateFlow() == SUCCESS.VALIDATED) {\n this.code = SUCCESS.VALIDATED;\n return this.createFlow();\n }\n return { isError: true, code: this.code, item: this.originalFlow };\n }", "function VariablesAreInputTypesRule(context) {\n return {\n VariableDefinition: function VariableDefinition(node) {\n var type = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__[\"typeFromAST\"])(context.getSchema(), node.type);\n\n if (type && !Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[\"isInputType\"])(type)) {\n var variableName = node.variable.name.value;\n var typeName = Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_1__[\"print\"])(node.type);\n context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"](\"Variable \\\"$\".concat(variableName, \"\\\" cannot be non-input type \\\"\").concat(typeName, \"\\\".\"), node.type));\n }\n }\n };\n}", "function VariablesAreInputTypesRule(context) {\n return {\n VariableDefinition: function VariableDefinition(node) {\n var type = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__[\"typeFromAST\"])(context.getSchema(), node.type);\n\n if (type && !Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[\"isInputType\"])(type)) {\n var variableName = node.variable.name.value;\n var typeName = Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_1__[\"print\"])(node.type);\n context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[\"GraphQLError\"](\"Variable \\\"$\".concat(variableName, \"\\\" cannot be non-input type \\\"\").concat(typeName, \"\\\".\"), node.type));\n }\n }\n };\n}", "function from(value,encodingOrOffset,length){if(typeof value==='string'){return fromString(value,encodingOrOffset);}if(ArrayBuffer.isView(value)){return fromArrayLike(value);}if(value==null){throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, '+'or Array-like Object. Received type '+_typeof(value));}if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer)){return fromArrayBuffer(value,encodingOrOffset,length);}if(typeof SharedArrayBuffer!=='undefined'&&(isInstance(value,SharedArrayBuffer)||value&&isInstance(value.buffer,SharedArrayBuffer))){return fromArrayBuffer(value,encodingOrOffset,length);}if(typeof value==='number'){throw new TypeError('The \"value\" argument must not be of type number. Received type number');}var valueOf=value.valueOf&&value.valueOf();if(valueOf!=null&&valueOf!==value){return Buffer.from(valueOf,encodingOrOffset,length);}var b=fromObject(value);if(b)return b;if(typeof Symbol!=='undefined'&&Symbol.toPrimitive!=null&&typeof value[Symbol.toPrimitive]==='function'){return Buffer.from(value[Symbol.toPrimitive]('string'),encodingOrOffset,length);}throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, '+'or Array-like Object. Received type '+_typeof(value));}", "function Shape (vertices, faces) {\n\t// typeof(array)='object' in JS\n\tif (typeof(vertices[0])=='object'){\n\t\tthis.V = vertices;\n\t} else {\n\t\tthis.V = [];\n\t\tfor (i=0; i<vertices.length; i+=3){\n\t\t\tthis.V.push(vertices.slice(i,i+3));\n\t\t}\n\t} if (typeof(faces[0])=='object'){\n\t\tthis.F = faces;\n\t} else {\n\t\tthis.F = [];\n\t\tfor (i=0;i<faces.length;i+=3){\n\t\t\tthis.F.push(faces.slice(i,i+3));\n\t\t}\n\t}\n}", "function u(t) {\n if (null == t) return {\n value: t\n };\n if (Array.isArray(t)) return {\n type: [t[0]],\n value: null\n };\n\n switch (typeof t) {\n case \"object\":\n return t.constructor && t.constructor.__accessorMetadata__ || t instanceof Date ? {\n type: t.constructor,\n value: t\n } : t;\n\n case \"boolean\":\n return {\n type: Boolean,\n value: t\n };\n\n case \"string\":\n return {\n type: String,\n value: t\n };\n\n case \"number\":\n return {\n type: Number,\n value: t\n };\n\n case \"function\":\n return {\n type: t,\n value: null\n };\n\n default:\n return;\n }\n }", "function from(value,encodingOrOffset,length){if(typeof value==='string'){return fromString(value,encodingOrOffset);}if(ArrayBuffer.isView(value)){return fromArrayLike(value);}if(value==null){throw TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, '+'or Array-like Object. Received type '+typeof value);}if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer)){return fromArrayBuffer(value,encodingOrOffset,length);}if(typeof value==='number'){throw new TypeError('The \"value\" argument must not be of type number. Received type number');}var valueOf=value.valueOf&&value.valueOf();if(valueOf!=null&&valueOf!==value){return Buffer.from(valueOf,encodingOrOffset,length);}var b=fromObject(value);if(b)return b;if(typeof Symbol!=='undefined'&&Symbol.toPrimitive!=null&&typeof value[Symbol.toPrimitive]==='function'){return Buffer.from(value[Symbol.toPrimitive]('string'),encodingOrOffset,length);}throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, '+'or Array-like Object. Received type '+typeof value);}", "_fromArray([name, protocol, ...subtypes]) {\n this._fromObj({\n name,\n protocol,\n subtypes: [].concat(...subtypes),\n });\n }" ]
[ "0.6014337", "0.5861445", "0.53727204", "0.5016639", "0.49903375", "0.4984653", "0.4975973", "0.49730957", "0.49730957", "0.49670136", "0.4927937", "0.4919229", "0.48817575", "0.4831915", "0.4805668", "0.47669953", "0.47496417", "0.47432217", "0.4739487", "0.4725464", "0.47015834", "0.47011447", "0.47011447", "0.46587837", "0.46509346", "0.46376687", "0.4621978", "0.45902854", "0.45755535", "0.45523772", "0.45523772", "0.45341378", "0.4520557", "0.44898927", "0.44640875", "0.44512266", "0.44113612", "0.4406436", "0.43960273", "0.43844426", "0.43535617", "0.43312857", "0.43281874", "0.4317959", "0.43162268", "0.4313216", "0.4313216", "0.4306666", "0.4295057", "0.42940617", "0.42897668", "0.42683262", "0.42683262", "0.42612568", "0.42608657", "0.4244005", "0.42321467", "0.4228835", "0.42275375", "0.42246783", "0.42236996", "0.42230234", "0.4205112", "0.41810766", "0.4179381", "0.41741988", "0.4167844", "0.4160201", "0.41446775", "0.41406333", "0.4136024", "0.41357917", "0.41350868", "0.41307238", "0.41297174", "0.4126967", "0.4126841", "0.41250807", "0.4122351", "0.4120436", "0.41162822", "0.41141033", "0.41138184", "0.41068658", "0.41028577", "0.40957958", "0.40944818", "0.40914312", "0.4091061", "0.4089671", "0.4088974", "0.40876028", "0.40838662", "0.40828454", "0.40828454", "0.40808752", "0.40786695", "0.40733543", "0.40719414", "0.40697828" ]
0.6073683
0
This method creates a Flow using different modes from supplied arguments
static of(){ if( arguments.length == 0 ) return FlowFactory.getFlow([]); if( arguments.length > 1 ) return FlowFactory.getFlow(arguments); if( arguments.length == 1 && Util.isNumber(arguments[0]) ) return new IteratorFlow(FlowFactory.createIteratorWithEmptyArraysFromNumber(arguments[0])); return FlowFactory.getFlow(arguments[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "createFlow() {\n // Very simple random unique ID generator\n this.formattedFlow.flowId = `${new Date().getTime()}`;\n this.formattedFlow.flowName = this.originalFlow.flow;\n this.formattedFlow.comment = this.originalFlow.comment;\n this.formattedFlow.startAt = this.originalFlow.startAt;\n this.formattedFlow.states = Object.assign({}, this.originalFlow.states);\n this.formattedFlow.flowStartTime = new Date().getTime();\n this.formattedFlow.flowExecutionTime = '';\n\n return { isError: false, code: this.code, item: this.formattedFlow };\n }", "function Flow(nodeList, flows, node, type) {\n this.nodeList = nodeList;\n this.flows = flows;\n this.node = node;\n this.type = type;\n}", "static from(data){\n return FlowFactory.getFlow(data);\n }", "static createEmbed(flowMode, renderInfo) {\n return new this({text: AtomicText, flowMode, renderInfo});\n }", "[actions.OPEN_CREATE_MODE] () {\n this.commit(mutations.SET_CREATE_MODE, true)\n }", "function flow(flowName, states, beginArgs) {\n var name = flowName;\n var activePhases = {};\n var flowStatus = \"created\";\n var statesRegister = {};\n var joinsRegister = {};\n var self = this;\n var currentPhase = undefined;\n var states = states;\n\n function attachStatesToFlow(states) {\n\n function registerState(state) {\n function wrapUpdates(stateName) {\n\n var dynamicMotivation = undefined;\n\n function WHYDynamicResolver() {\n function toBeExecutedWithWHY() {\n var parentPhase = currentPhase;\n currentPhase = stateName;\n registerNewFunctionCall(stateName);\n var ret = states[stateName].apply(self, mkArgs(arguments, 0));\n makePhaseUpdatesAfterCall(stateName);\n currentPhase = parentPhase;\n return ret;\n }\n\n toBeExecutedWithWHY.why = dummyWhy;\n return addErrorTreatment(toBeExecutedWithWHY.why(decideMotivation(self, state))).apply(self, mkArgs(arguments, 0))\n }\n\n function decideMotivation(flow, stateName) {\n if (dynamicMotivation === undefined) {\n if (flow.getCurrentPhase()) {\n motivation = flow.getCurrentPhase() + \" to \" + stateName;\n } else {\n motivation = stateName;\n }\n } else {\n motivation = dynamicMotivation;\n }\n dynamicMotivation = undefined;\n return motivation;\n }\n\n WHYDynamicResolver.why = function (motivation) {\n dynamicMotivation = motivation;\n return this;\n }\n return WHYDynamicResolver;\n }\n\n statesRegister[state] = {\n code: states[state],\n joins: []\n }\n\n self[state] = wrapUpdates(state);\n }\n\n function registerJoin(join) {\n joinsRegister[join] = {\n code: states[join].code,\n inputStates: {},\n tryOnNextTick: false\n }\n\n var inStates = states[state].join.split(',');\n inStates.forEach(function (input) {\n input = input.trim();\n joinsRegister[join].inputStates[input] = {\n calls: 0,\n finishedCalls: 0\n };\n })\n\n }\n\n function joinStates() {\n for (var join in joinsRegister) {\n for (var inputState in joinsRegister[join].inputStates) {\n statesRegister[inputState].joins.push(join);\n }\n }\n }\n\n self.error = function (error) {\n if (error) {\n var motivation = currentPhase + \" failed\";\n if (states['error'] !== undefined) {\n states['error'].why = dummyWhy;\n states['error'].why(motivation).apply(self, [error]);\n }\n else {\n function defaultErrorWHY(error) {\n if (error) {\n console.error(self.getCurrentPhase() + \" failed\");\n console.log(error.stack);\n }\n }\n\n defaultErrorWHY.why = dummyWhy;\n\n defaultErrorWHY.why(motivation)(error);\n }\n }\n }\n\n for (var state in states) {\n\n if (state == \"error\") {\n continue;\n }\n\n if (typeof states[state] === \"function\") {\n registerState(state);\n }\n else {\n registerJoin(state);\n }\n }\n joinStates();\n }\n\n this.next = function () {\n process.nextTick(this.continue.apply(this, mkArgs(arguments, 0)));\n }\n\n function registerNewFunctionCall(stateName) {\n\n updateStatusBeforeCall(stateName);\n notifyJoinsOfNewCall(stateName);\n\n function notifyJoinsOfNewCall(stateName) {\n statesRegister[stateName].joins.forEach(function (join) {\n joinsRegister[join].inputStates[stateName]['calls']++\n });\n }\n }\n\n this.getStatus = function () {\n return flowStatus;\n };\n this.getCurrentPhase = function () {\n return currentPhase;\n }\n this.getActivePhases = function () {\n return activePhases;\n };\n this.getName = function () {\n return name;\n }\n\n function updateStatusBeforeCall(stateName) {\n if (activePhases[stateName] == undefined) {\n activePhases[stateName] = 1;\n } else {\n activePhases[stateName]++;\n }\n }\n\n function updateStatusAfterCall(stateName) {\n activePhases[stateName]--;\n\n if (activePhases[stateName] === 0) {\n var done = true;\n for (var phase in activePhases) {\n if (activePhases[phase] > 0) {\n done = false;\n break;\n }\n }\n if (done) {\n flowStatus = \"done\";\n }\n }\n }\n\n function makePhaseUpdatesAfterCall(stateName) {\n updateJoinsAfterCall(stateName);\n updateStatusAfterCall(stateName);\n\n function updateJoinsAfterCall(stateName) {\n statesRegister[stateName].joins.forEach(function (joinName) {\n joinsRegister[joinName].inputStates[stateName]['finishedCalls']++;\n if (joinsRegister[joinName]['tryOnNextTick'] === false) {\n joinsRegister[joinName]['tryOnNextTick'] = true;\n var caller = null;\n try {\n if (global.__global__enable_RUN_WITH_WHYS) {\n caller = whys.getGlobalCurrentContext().currentRunningItem;\n }\n } catch (err) {\n }\n ; //TODO: strange, refactoring\n updateStatusBeforeCall(joinName);\n var parentPhase = self.getCurrentPhase();\n process.nextTick(function () {\n tryRunningJoin(joinName, caller, parentPhase);\n updateStatusAfterCall(joinName);\n })\n }\n });\n\n\n function tryRunningJoin(joinName, caller, parentPhase) {\n\n joinsRegister[joinName]['tryOnNextTick'] = false;\n\n function joinReady(joinName) {\n var join = joinsRegister[joinName];\n var gotAllInputs = true;\n for (var inputState in join.inputStates) {\n if (join.inputStates[inputState]['finishedCalls'] == 0) {\n gotAllInputs = false;\n break;\n }\n if (join.inputStates[inputState]['finishedCalls'] != join.inputStates[inputState]['calls']) {\n gotAllInputs = false;\n break;\n }\n }\n return gotAllInputs;\n }\n\n async function runJoin(joinName) {\n var currentPhase = joinName;\n updateStatusBeforeCall(joinName);\n reinitializeJoin(joinName);\n await joinsRegister[joinName].code.apply(self, []);\n updateStatusAfterCall(joinName);\n currentPhase = parentPhase;\n\n function reinitializeJoin(joinName) {\n for (var inputState in joinsRegister[joinName].inputStates) {\n joinsRegister[joinName].inputStates = {\n calls: 0,\n finishedCalls: 0\n }\n }\n }\n }\n\n runJoin.why = dummyWhy;\n\n if (joinReady(joinName)) {\n var toRun = runJoin.why(decideMotivation(self, joinName, joinName), caller);\n toRun = addErrorTreatment(toRun);\n toRun(joinName);\n }\n\n function decideMotivation(flow, joinName, stateName) {\n return parentPhase + \" to \" + joinName;\n }\n\n }\n }\n }\n\n\n this.continue = function () {\n var stateName = arguments[0];\n var motivation = arguments[1];\n\n if (!motivation) {\n motivation = self.getCurrentPhase() + \" to \" + stateName;\n }\n var args = mkArgs(arguments, 2);\n registerNewFunctionCall(stateName);\n\n var continueFn = async function () {\n currentPhase = stateName;\n\n if (args.length == 0) {\n args = mkArgs(arguments, 0)\n }\n await statesRegister[stateName].code.apply(self, args);\n makePhaseUpdatesAfterCall(stateName);\n };\n continueFn.why = dummyWhy;\n\n return addErrorTreatment(continueFn.why(motivation));\n };\n\n function addErrorTreatment(func) {\n async function flowErrorTreatmentWHY() {\n try {\n return await func.apply(this, mkArgs(arguments, 0));\n }\n catch (error) {\n flowStatus = \"failed\";\n return self.error(error);\n }\n }\n\n return flowErrorTreatmentWHY;\n }\n\n\n attachStatesToFlow(states);\n flowStatus = \"running\";\n\n function startFlow() {\n self.begin.apply(this, beginArgs);\n }\n\n startFlow.why = dummyWhy;\n startFlow.why(flowName)();\n return this;\n}", "function flow(from, rate, to) {\n\tto = to || universe;\n\treturn { from:from, rate:rate, to:to };\n}", "function Flow(id, map, identifier, loader, ioHandler, processManager) {\n\n var self = this;\n\n if (!id) {\n throw Error('xFlow requires an id');\n }\n\n if (!map) {\n throw Error('xFlow requires a map');\n }\n\n // Call the super's constructor\n Actor.apply(this, arguments);\n\n if (loader) {\n this.loader = loader;\n }\n if (ioHandler) {\n this.ioHandler = ioHandler;\n }\n\n if (processManager) {\n this.processManager = processManager;\n }\n\n // External vs Internal links\n this.linkMap = {};\n\n // indicates whether this is an action instance.\n this.actionName = undefined;\n\n // TODO: trying to solve provider issue\n this.provider = map.provider;\n\n this.providers = map.providers;\n\n this.actions = {};\n\n // initialize both input and output ports might\n // one of them be empty.\n if (!map.ports) {\n map.ports = {};\n }\n if (!map.ports.output) {\n map.ports.output = {};\n }\n if (!map.ports.input) {\n map.ports.input = {};\n }\n\n /*\n // make available always.\n node.ports.output['error'] = {\n title: 'Error',\n type: 'object'\n };\n */\n\n this.id = id;\n\n this.name = map.name;\n\n this.type = 'flow';\n\n this.title = map.title;\n\n this.description = map.description;\n\n this.ns = map.ns;\n\n this.active = false;\n\n this.metadata = map.metadata || {};\n\n this.identifier = identifier || [\n map.ns,\n ':',\n map.name\n ].join('');\n\n this.ports = JSON.parse(\n JSON.stringify(map.ports)\n );\n\n // Need to think about how to implement this for flows\n // this.ports.output[':complete'] = { type: 'any' };\n\n this.runCount = 0;\n\n this.inPorts = Object.keys(\n this.ports.input\n );\n\n this.outPorts = Object.keys(\n this.ports.output\n );\n\n //this.filled = 0;\n\n this.chi = undefined;\n\n this._interval = 100;\n\n // this.context = {};\n\n this.nodeTimeout = map.nodeTimeout || 3000;\n\n this.inputTimeout = typeof map.inputTimeout === 'undefined' ?\n 3000 :\n map.inputTimeout;\n\n this._hold = false; // whether this node is on hold.\n\n this._inputTimeout = null;\n\n this._openPorts = [];\n\n this._connections = new Connections();\n\n this._forks = [];\n\n debug('%s: addMap', this.identifier);\n this.addMap(map);\n\n this.fork = function() {\n\n var Fork = function Fork() {\n this.nodes = {};\n //this.context = {};\n\n // same ioHandler, tricky..\n // this.ioHandler = undefined;\n };\n\n // Pre-filled baseActor is our prototype\n Fork.prototype = this.baseActor;\n\n var FActor = new Fork();\n\n // Remember all forks for maintainance\n self._forks.push(FActor);\n\n // Each fork should have their own event handlers.\n self.listenForOutput(FActor);\n\n return FActor;\n\n };\n\n this.listenForOutput();\n\n this.initPortOptions = function() {\n\n // Init port options.\n for (var port in self.ports.input) {\n if (self.ports.input.hasOwnProperty(port)) {\n\n // This flow's port\n var thisPort = self.ports.input[port];\n\n // set port option\n if (thisPort.options) {\n for (var opt in thisPort.options) {\n if (thisPort.options.hasOwnProperty(opt)) {\n self.setPortOption(\n 'input',\n port,\n opt,\n thisPort.options[opt]);\n }\n }\n }\n\n }\n }\n };\n\n // Too late?\n this.setup();\n\n this.setStatus('created');\n\n}", "function FlowCalculator(step) {\n this.step = step || 8;\n}", "function Flow(opt) {\n\topt = typeof opt === \"undefined\" ? {} : opt;\n\tvar sopt = {};\n\tif (typeof opt.surface === \"undefined\") {\n\t\tsopt = {\n\t\t\tcolor:\"#000\",\n\t\t\ttool:\"pen\",\n\t\t\tstrokeWidth:3\n\t\t};\n\t}\n\tsopt.color = typeof opt.color === \"undefined\" ? sopt.color : opt.color;\n\tsopt.tool = typeof opt.tool === \"undefined\" ? sopt.tool : opt.tool;\n\tsopt.strokeWidth = typeof opt.strokeWidth === \"undefined\" ? sopt.strokeWidth : opt.strokeWidth;\n\t\n\tthis.p = [];\n\t//If points have been supplied\n\tif(typeof opt.points !== \"undefined\") {\n\t\tthis.s = hiddensurface;\n\t\tthis.start(opt.points[0]);\n\t\tthis.p = opt.points;\n\t\tthis.redraw();\n\t\t//If no surface has been supplied\n\t\tif (typeof opt.surface === \"undefined\") {\n\t\t\t$.extend(sopt, {\n\t\t\t\tx:this.minx - (2*sopt.strokeWidth),\n\t\t\t\ty:this.miny - (2*sopt.strokeWidth),\n\t\t\t\toffsetx:this.minx - (2*sopt.strokeWidth),\n\t\t\t\toffsety:this.miny - (2*sopt.strokeWidth),\n\t\t\t\tw:this.maxx - this.minx + (4*sopt.strokeWidth),\n\t\t\t\th:this.maxy - this.miny + (4*sopt.strokeWidth)\n\t\t\t});\n\t\t}\n\t}\n\tif (typeof opt.surface === \"undefined\") {\n\t\topt.surface = new Surface(sopt);\n\t}\n\t\n\tif(typeof opt.color != \"undefined\") {opt.surface.color(opt.color);}\n\tif(typeof opt.tool != \"undefined\") {opt.surface.tool(opt.tool);}\n\tif(typeof opt.strokeWidth != \"undefined\") {opt.surface.strokeWidth(opt.strokeWidth);}\n\t\n\tthis.s = opt.surface;\n\tthis.c = this.s.color();\n\tthis.t = this.s.tool();\n\tthis.sw = this.s.strokeWidth();\n\tthis.redraw();\n this.lasttime = new Date().getTime();\n}", "function L() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (Factory.DEBUG) _vex__WEBPACK_IMPORTED_MODULE_0__[\"Vex\"].L('Vex.Flow.Factory', args);\n}", "create(context) {\n freezeDeeply(context.options);\n freezeDeeply(context.settings);\n freezeDeeply(context.parserOptions);\n\n // freezeDeeply(context.languageOptions);\n\n return (typeof rule === \"function\" ? rule : rule.create)(context);\n }", "select(func){\n var flow = new Flow();\n if( Util.isFunction(func) )\n flow.pipeFunc = func;\n else{\n flow.pipeFunc = function(input){\n return input[func];\n };\n }\n\n setRefs(this, flow);\n\n return flow;\n }", "initFlow() {\n if (this.validateFlow() == SUCCESS.VALIDATED) {\n this.code = SUCCESS.VALIDATED;\n return this.createFlow();\n }\n return { isError: true, code: this.code, item: this.originalFlow };\n }", "startWorkflow(flow) {\n // custom id management\n let customId = null;\n if (typeof flow.id === \"function\") {\n // customId can be a value or a function\n customId = flow.id();\n // customId should be a string or a number\n if (typeof customId !== \"string\" && typeof customId !== \"number\") {\n throw new InvalidArgumentError(\n `Provided id must be a string or a number - current type: ${typeof customId}`,\n );\n }\n // at the end, it's a string\n customId = customId.toString();\n // should be not more than 256 bytes;\n if (customId.length >= MAX_ID_SIZE) {\n throw new ExternalZenatonError(\n `Provided id must not exceed ${MAX_ID_SIZE} bytes`,\n );\n }\n }\n\n const url = this.getInstanceWorkerUrl();\n\n // start workflow\n const body = {\n [ATTR_PROG]: PROG,\n [ATTR_CANONICAL]: flow._getCanonical(),\n [ATTR_NAME]: flow.name,\n [ATTR_DATA]: serializer.encode(flow.data),\n [ATTR_ID]: customId,\n };\n\n const params = this.getAppEnv();\n\n return http.post(url, body, { params });\n }", "function limitFlow(period) {\n return function limitFlow(stream) {\n var source = new RateLimitSource(stream.source, period);\n return new stream.constructor(source);\n };\n}", "function dataflow() {\n var Flow = window.Flow;\n Flow.Dataflow = function () {\n return {\n slot: createSlot,\n slots: createSlots,\n signal: createSignal,\n signals: createSignals,\n isSignal: _isSignal,\n link: _link,\n unlink: _unlink,\n act: _act,\n react: _react,\n lift: _lift,\n merge: _merge\n };\n }();\n }", "function setupFlowplayer() {\t\t\n\t\t\tflowplayer(\"a.flow-player-rtmp\", {src: \"/swf/flowplayer-3.1.0.swf\", wmode: \"transparent\"}, {\n\t\t\t\tkey: '#@0c6f31cd2fcf37df4b1',\n\t\t\t\tclip: { \n\t\t\t\t\turl: $('a .flow-player-rtmp').attr('href'),\n\t\t\t\t\tprovider: 'influxis',\n\t\t\t\t\tautoPlay: true,\n\t\t\t\t\tautoBuffering: true \n\t\t\t\t},\n\t\n\t\t\t\tplugins: {\n\t\t\t\t\tinfluxis: {\n\t\t\t\t\t\turl: \t\t\t\t'/swf/flowplayer.rtmp-3.1.0.swf', \n\t\t\t\t\t\tnetConnectionUrl:\trtmpServer\n\t\t\t\t\t},\n\t\t\t\t\tcontrols: {\n\t\t\t\t\t\turl: '/swf/flowplayer.controls-3.1.0.swf', \n\t\t\t\t\t\tfullscreen: true,\n\t\t\t\t\t\tautoHide: 'always',\n\t\t\t\t\t\thideDelay: 1000\n\t\t\t\t }\n\t\t\t\t},\n\n\t\t\t\tmenu: false,\n\t\t\t\tloop: false\n\t\t\t});\n\t\t\t\n\t\t\tflowplayer(\"a.flow-player-local\", {src: \"/swf/flowplayer-3.1.0.swf\", wmode: \"transparent\"}, {\n\t\t\t\tkey: '#@0c6f31cd2fcf37df4b1',\n\t\t\t\tclip: { \n\t\t\t\t\turl: $('a .flow-player-local').attr('href'),\n\t\t\t\t\tautoplay: false\n\t\t\t \n\t\t\t\t},\n\t\n\t\t\t\tplugins: {\n\t\t\t\t\tcontrols: {\n\t\t\t\t\t\turl: '/swf/flowplayer.controls-3.1.0.swf', \n\t\t\t\t\t\tfullscreen: true,\n\t\t\t\t\t\tautoHide: 'always',\n\t\t\t\t\t\thideDelay: 1000\n\t\t\t\t }\n\t\t\t\t},\n\n\t\t\t\tmenu: false,\n\t\t\t\tloop: false\n\t\t\t});\n\t\t}", "constructor(options,opts){\n super(options) //Passing options to native constructor (REQUIRED)\n\n this.id = opts.id;\n\n this.name = 'Environment tx access port for radio ' + this.id;\n this.pipeType = {in:{type:'IFloat',chunk:'any'},out:{type:'any',chunk:'any'}}; // out doesn't matter here\n this.on('pipe', this.pipeTypeCheck.bind(this));\n }", "getFlow() {\n return new NgFlowchart.Flow(this.canvas);\n }", "function FlowRecognizer(settings) {\n _classCallCheck(this, FlowRecognizer);\n\n this.settings = settings || {};\n this.initializeModels();\n }", "function sourceFactory(srcType) {\n switch (srcType) {\n case sourceTypes.rest:\n return (data) => undefined; // No data should be sent during this source anyway.\n case sourceTypes.tap:\n return (data) => 100;\n case sourceTypes.taprate:\n return (data) => (data[0] > 300 ? 300 : data[0]) / 3;\n case sourceTypes.text:\n return (data) => data[0].length === 1 ? undefined : data[0].length > 100 ? 100 : data[0].length;\n case sourceTypes.orient:\n return (data) => ((data[0] / 3.6) + ((data[1] + 180) / 3.6) + ((data[2] + 90) / 1.8)) / 3;\n case sourceTypes.orienta:\n return (data) => data[0] / 3.6;\n case sourceTypes.orientb:\n return (data) => (data[0] + 180) / 3.6;\n case sourceTypes.orientg:\n return (data) => (data[0] + 90) / 1.8;\n case sourceTypes.accel: // TODO Because this is acceleration, every time the direction changes or reaches a constant speed it goes back to 0 briefly. Come up with a way to work around this.\n return (data) => {\n let x = Math.abs(data[0]) * 10;\n x = x > 100 ? 100 : x; // TODO Abstract this kind of logic to a function, this is messy.\n let y = Math.abs(data[1]) * 10;\n y = y > 100 ? 100 : y;\n let z = Math.abs(data[2]) * 10;\n z = z > 100 ? 100 : z;\n return (x + y + z) / 3; // TODO This average isn't quite the best way of representing the vector of direction as a scalar, revisit at a later time.\n }\n case sourceTypes.accelx:\n case sourceTypes.accely:\n case sourceTypes.accelz:\n return (data) => {\n let num = Math.abs(data[0]) * 10;\n return num > 100 ? 100 : num;\n }\n case sourceTypes.xypad:\n return (data) => (data[0] + data[1]) / 2;\n case sourceTypes.swipe:\n return (data) => data[0] ? 100 : 0;\n }\n}", "async function dataFlowsCreate() {\n const subscriptionId =\n process.env[\"DATAFACTORY_SUBSCRIPTION_ID\"] || \"12345678-1234-1234-1234-12345678abc\";\n const resourceGroupName = process.env[\"DATAFACTORY_RESOURCE_GROUP\"] || \"exampleResourceGroup\";\n const factoryName = \"exampleFactoryName\";\n const dataFlowName = \"exampleDataFlow\";\n const dataFlow = {\n properties: {\n type: \"MappingDataFlow\",\n description:\n \"Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.\",\n scriptLines: [\n \"source(output(\",\n \"PreviousConversionRate as double,\",\n \"Country as string,\",\n \"DateTime1 as string,\",\n \"CurrentConversionRate as double\",\n \"),\",\n \"allowSchemaDrift: false,\",\n \"validateSchema: false) ~> USDCurrency\",\n \"source(output(\",\n \"PreviousConversionRate as double,\",\n \"Country as string,\",\n \"DateTime1 as string,\",\n \"CurrentConversionRate as double\",\n \"),\",\n \"allowSchemaDrift: true,\",\n \"validateSchema: false) ~> CADSource\",\n \"USDCurrency, CADSource union(byName: true)~> Union\",\n \"Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\",\n \"NewCurrencyColumn split(Country == 'USD',\",\n \"Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\",\n \"ConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\",\n \"ConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink\",\n ],\n sinks: [\n {\n name: \"USDSink\",\n dataset: { type: \"DatasetReference\", referenceName: \"USDOutput\" },\n },\n {\n name: \"CADSink\",\n dataset: { type: \"DatasetReference\", referenceName: \"CADOutput\" },\n },\n ],\n sources: [\n {\n name: \"USDCurrency\",\n dataset: {\n type: \"DatasetReference\",\n referenceName: \"CurrencyDatasetUSD\",\n },\n },\n {\n name: \"CADSource\",\n dataset: {\n type: \"DatasetReference\",\n referenceName: \"CurrencyDatasetCAD\",\n },\n },\n ],\n },\n };\n const credential = new DefaultAzureCredential();\n const client = new DataFactoryManagementClient(credential, subscriptionId);\n const result = await client.dataFlows.createOrUpdate(\n resourceGroupName,\n factoryName,\n dataFlowName,\n dataFlow\n );\n console.log(result);\n}", "setToPedCreate(){\n\t\tButtonModes.__switchMode(arguments.callee.name)\n\t}", "switchMode(newMode: Mode) {\n this.mode = newMode;\n }", "constructor({id=this.generateId(), text='', renderInfo=Empty, flowMode, isAtomic=false}) {\n this.id = id;\n this.text = text;\n this.flowMode = flowMode;\n this.isAtomic = isAtomic;\n this.renderInfo = renderInfo;\n if (isAtomic && !text) {\n this.text = AtomicText;\n }\n this.count = this.text.length;\n }", "function showFlow (flows) {\n \n var position = window.camera.getFocus().position;\n var indice = 0;\n\n window.camera.enable();\n window.camera.move(position.x, position.y, position.z + window.TILE_DIMENSION.width * 5);\n \n setTimeout(function() {\n \n actualFlow = [];\n \n for(var i = 0; i < flows.length; i++) {\n actualFlow.push(flows[i]);\n flows[i].draw(position.x, position.y, 0, indice, i);\n \n //Dummy, set distance between flows\n position.x += window.TILE_DIMENSION.width * 10;\n }\n \n }, 1500);\n }", "function startNewMode(mode) {\n var node\n\n if (mode.className) {\n node = build(mode.className, [])\n }\n\n // Enter a new mode.\n if (node) {\n currentChildren.push(node)\n stack.push(currentChildren)\n currentChildren = node.children\n }\n\n top = Object.create(mode, {parent: {value: top}})\n }", "function TransitionFactory(type, totalImages) {\n\n if(type == TRANSITIONS.fade){\n return new FadeTransition(totalImages);\n }else if (type == TRANSITIONS.slide) {\n return new SlideTransition(totalImages);\n }else{\n console.error(\"This transition is not yet supported\");\n }\n}", "setMode(mode) {\n this._mode = mode;\n }", "function createSource(...args) {\n return new Source(...args)\n}", "constructor(context) {\n // Takes in input from GeneratorModule GainNode\n this._context = context;\n this.input = new GainNode(this._context);\n this.output = new GainNode(this._context);\n \n // Nodes for delay parameter (param1)\n this._delay = new DelayNode(this._context);\n this._lfo = new OscillatorNode(this._context);\n this._feedback = new GainNode(this._context);\n this._depth = new GainNode(this._context);\n this.input.connect(this._delay).connect(this.output);\n this._lfo.connect(this._depth).connect(this._delay.delayTime);\n \n // Nodes for dry/wet parameter (param2)\n this._convolver = new ConvolverNode(this._context);\n this._wet = new GainNode(this._context);\n this._dry = new GainNode(this._context);\n \n // Nodes for panner parameter (param3)\n this._panner = new PannerNode(this._context);\n this.input.connect(this._panner).connect(this._wet).connect(this.output);\n this.input.connect(this._panner).connect(this._dry).connect(this.output);\n this._panner.panningModel = \"HRTF\";\n this._panner.positionY.value = 0.1;\n \n this._wet.gain.value = 0.5;\n this._dry.gain.value = 0.5;\n \n // Outputs to audioContext destination --> speakers\n this.input.connect(this._convolver).connect(this._wet).connect(this.output);\n this.input.connect(this._dry).connect(this.output);\n }", "function setupInputStream() {\n var type =\n arguments.length > 0 && arguments[0] !== undefined\n ? arguments[0]\n : \"LiveStream\";\n var viewport =\n arguments.length > 1 ? arguments[1] : undefined;\n var InputStream =\n arguments.length > 2 ? arguments[2] : undefined;\n\n switch (type) {\n case \"VideoStream\": {\n var video = document.createElement(\"video\");\n return {\n video: video,\n inputStream:\n InputStream.createVideoStream(video),\n };\n }\n\n case \"ImageStream\":\n return {\n inputStream: InputStream.createImageStream(),\n };\n\n case \"LiveStream\": {\n var _video = null;\n\n if (viewport) {\n _video = viewport.querySelector(\"video\");\n\n if (!_video) {\n _video = document.createElement(\"video\");\n viewport.appendChild(_video);\n }\n }\n\n return {\n video: _video,\n inputStream:\n InputStream.createLiveStream(_video),\n };\n }\n\n default:\n console.error(\n \"* setupInputStream invalid type \".concat(type)\n );\n return {\n video: null,\n inputStream: null,\n };\n }\n }", "create(params)\n {\n //console.log(\"#####> create <#####\");\n\n if (params !== null && typeof params !== 'undefined')\n {\n this.m_mode = params.mode;\n }\n\n console.log(\"Scene launched in \" + this.m_mode + \" mode\");\n console.log(tf.memory());\n\n // create reinforcement learning model if required\n if (this.m_mode == \"RL_TRAIN\" && (window.reinforcement_model === null || typeof window.reinforcement_model === 'undefined'))\n {\n window.reinforcement_model = new PolicyBasedAgent();\n window.reinforcement_info.episode = 0;\n window.reinforcement_info.allRewards = [];\n window.aiModeInitialized = false;\n this.m_visualizationRewardData = [];\n }\n else if (this.m_mode == \"AI\" && window.aiModeInitialized == false)\n {\n window.aiModeInitialized = true;\n window.reinforcement_info.episode = 0;\n window.reinforcement_info.allRewards = [];\n this.m_visualizationRewardData = [];\n }\n else if (this.m_mode == \"USER\")\n {\n window.aiModeInitialized = false;\n }\n\n // Create the environment\n\n // Create reinforcement learning environment\n this.m_reinforcementEnvironment = new CartPoleEnvironment();\n this.m_cartPoleInfo.reset();\n\n let world_width = this.m_reinforcementEnvironment.getWorldWidth();\n let scale = game.config.width / world_width;\n\n // setting Matter world bounds\n /*\n this.matter.world.setBounds(mazeBoundingBox.startX, \n mazeBoundingBox.startY, \n mazeBoundingBox.endX - mazeBoundingBox.startX, \n mazeBoundingBox.endY - mazeBoundingBox.startY);\n //*/\n\n // Graphics object used to draw rays\n this.m_lineGraphic = this.add.graphics();\n this.m_lineGraphic.lineStyle(1, 0xFF00FF, 0.25); // width, color, alpha\n\n this.m_cartGraphics = this.add.graphics();\n this.m_cartGraphics.fillStyle(0xFF0000, 1.0); // color, alpha\n this.m_poleGraphics = this.add.graphics();\n this.m_poleGraphics.lineStyle(10, 0x0000FF, 1.0); // width, color, alpha\n\n // Configure the camera\n const camera = this.cameras.main;\n // Constrain the camera so that it isn't allowed to move outside the maze bounding box\n /*\n camera.setBounds( mazeBoundingBox.startX,\n mazeBoundingBox.startY, \n mazeBoundingBox.endX - mazeBoundingBox.startX, \n mazeBoundingBox.endY - mazeBoundingBox.startY);\n // center the camera\n camera.scrollX = mazeBoundingBox.startX + (mazeBoundingBox.endX - mazeBoundingBox.startX)/2;\n \n camera.setBounds( cameraBoundingBox.startX,\n cameraBoundingBox.startY, \n cameraBoundingBox.endX - cameraBoundingBox.startX, \n cameraBoundingBox.endY - cameraBoundingBox.startY);\n \n \n //camera.setPosition( mazeBoundingBox.startX + (mazeBoundingBox.endX - mazeBoundingBox.startX)/2);\n // Start following ship\n camera.startFollow(this.m_ship.gameobject);\n //*/\n\n // Set up the arrows to control the cart\n this.m_cursors = this.input.keyboard.createCursorKeys();\n\n\n // Add button to quit training \n this.add.existing(new TextButton(this, game.config.width, 30, 'Quit...', g_settings.style.buttonStyles, () => this.endGame())\n .setOrigin(1.0)\n .setScrollFactor(0));\n \n if (window.reinforcement_info.episode <= 0)\n this.m_scoreText = this.add.text(10, 10, 'Episode: 0 - Last/Mean Reward: 0 / 0', g_settings.style.textStyle1).setOrigin(0.0);\n else\n {\n let meanReward = this.mean( window.reinforcement_info.allRewards);\n let lastReward = window.reinforcement_info.allRewards[window.reinforcement_info.allRewards.length - 1];\n\n this.m_scoreText = this.add.text(10, 10, 'Episode: ' + window.reinforcement_info.episode + ' - Last/Mean Reward: ' + lastReward + ' / ' + meanReward,\n g_settings.style.textStyle1).setOrigin(0.0);\n }\n\n }", "function defineMode(name, mode) {\n\t\t if (arguments.length > 2)\n\t\t { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n\t\t modes[name] = mode;\n\t\t }", "function showFlow(flows) {\n\n var position = window.camera.getFocus().position;\n var indice = 0;\n\n window.camera.enable();\n window.camera.move(position.x, position.y, position.z + window.TILE_DIMENSION.width * 5);\n\n setTimeout(function() {\n\n actualFlow = [];\n\n for(var i = 0; i < flows.length; i++) {\n actualFlow.push(flows[i]);\n flows[i].draw(position.x, position.y, 0, indice, i);\n\n //Dummy, set distance between flows\n position.x += window.TILE_DIMENSION.width * 10;\n }\n\n }, 1500);\n }", "function startFlowAuto() {\n let flow =\n ((window.location.search || '').split('?')[1] || '').split('&')[0] ||\n 'demo';\n\n // Check for valid Google Article Access (GAA) params.\n if (isGaa()) {\n console.log(\n 'Google Article Access (GAA) params triggered the \"metering\" flow.'\n );\n flow = 'metering';\n }\n\n if (flow == 'none') {\n return;\n }\n if (flow == 'demo') {\n startDemoController();\n return;\n }\n\n if (flow == 'demoConsentRequired') {\n startDemoController({consentRequired: true});\n return;\n }\n if (flow == 'demoUnknownSubscription') {\n startDemoController({unknownSubscription: true});\n return;\n }\n if (flow === 'swgButton') {\n whenReady(setupSwgButton);\n }\n if (flow === 'smartbutton') {\n whenReady(setupSmartButton);\n return;\n }\n if (flow === 'updateSubscription') {\n whenReady(setupUpdateSubscription);\n return;\n }\n\n if (flow == 'metering') {\n whenReady(setupMeteringDemo);\n return;\n }\n\n if (flow == 'demoAudienceActions') {\n whenReady(setupAudienceActionsDemo);\n return;\n }\n\n startFlow(flow);\n}", "function StreamStateMachine() {\n var _this = this;\n var __arguments = new Array(arguments.length);\n for (var __argumentIndex = 0; __argumentIndex < __arguments.length; ++__argumentIndex) {\n __arguments[__argumentIndex] = arguments[__argumentIndex];\n }\n if (__arguments.length == 0) {\n _this = _super.call(this, fm.liveswitch.StreamState.New) || this;\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.New, fm.liveswitch.StreamState.Initializing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.New, fm.liveswitch.StreamState.Failing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.New, fm.liveswitch.StreamState.Closing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Initializing, fm.liveswitch.StreamState.Connecting);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Initializing, fm.liveswitch.StreamState.Failing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Initializing, fm.liveswitch.StreamState.Closing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Connecting, fm.liveswitch.StreamState.Connected);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Connecting, fm.liveswitch.StreamState.Failing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Connecting, fm.liveswitch.StreamState.Closing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Connected, fm.liveswitch.StreamState.Failing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Connected, fm.liveswitch.StreamState.Closing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Closing, fm.liveswitch.StreamState.Failing);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Closing, fm.liveswitch.StreamState.Closed);\n _super.prototype.addTransition.call(_this, fm.liveswitch.StreamState.Failing, fm.liveswitch.StreamState.Failed);\n }\n else {\n throw new fm.liveswitch.Exception('Constructor overload does not exist with specified parameter count/type combination.');\n }\n return _this;\n }", "function enterMode(stream, state, mode, opt) {\n if (typeof mode === \"string\")\n mode = CodeMirror.getMode(cmCfg, mode);\n if (!mode || mode[\"name\"] === \"null\") {\n if ('endTag' in opt)\n mode = createDummyMode(opt.endTag);\n else\n mode = (typeof opt.fallbackMode === 'function') && opt.fallbackMode();\n if (!mode)\n throw new Error(\"no mode\");\n }\n state.hmdInnerExitChecker = ('endTag' in opt) ? createSimpleInnerModeExitChecker(opt.endTag) : opt.exitChecker;\n state.hmdInnerStyle = opt.style;\n state.hmdInnerMode = mode;\n state.hmdOverride = modeOverride;\n state.hmdInnerState = CodeMirror.startState(mode);\n var ans = opt.style || \"\";\n if (!opt.skipFirstToken) {\n ans += \" \" + mode.token(stream, state.hmdInnerState);\n }\n return ans.trim();\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }", "function createStopPropagationModifiers (flow) {\n Object.keys(DIRECTION)\n .forEach(direction => {\n flow.stopPropagation[direction] =\n flow.stopPropagation[direction.toLowerCase()] =\n () => flow.stopPropagation(direction)\n })\n}", "function defineMode(name, mode) {\n if (arguments.length > 2) {\n mode.dependencies = Array.prototype.slice.call(arguments, 2);\n }\n\n modes[name] = mode;\n }", "function CreateStreamProcessorCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2) }\n modes[name] = mode\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2) }\n modes[name] = mode\n}", "function MakePlane(name, source, type) {\n this.name = name;\n this.source = source;\n this.type = type;\n }", "function runFlow() {\n\tif (map.getTile(layer1.getTileX(endPipe.x * 64), layer1.getTileY(endPipe.y * 64), 'Tile Layer 1').properties.inFlow == \"down\") {\n\t\tgameWin();\n\t}\n\telse {\n\t\tflow(curPipe);\n\t}\n}", "function setMode(incoming) {\n return incoming.set(\"mode\", (function () {\n if (incoming.get(\"server\")) {\n return \"server\";\n }\n if (incoming.get(\"proxy\")) {\n return \"proxy\";\n }\n return \"snippet\";\n })());\n}", "function ActivityFlow(props){\n\tlet allActivity = props.allActivity;\n\treturn (\n <div>\n \t{\n \t\t//Show corresponding flow based on the selected activity\n \t\tprops.activityNum === 1 &&\n \t\t<FirstFlow questions={allActivity[0]['questions']} showHomeScreen={props.showHomeScreen}/>\n \t}\n \t{\n \t\tprops.activityNum === 2 &&\n \t <SecondFlow questions={allActivity[1]['questions']} showHomeScreen={props.showHomeScreen}/>\n \t}\n </div>)\n\n}", "function FrameMode (model)\n{\n BaseMode.call (this, model);\n this.id = Maschine.MODE_FRAME;\n this.isTemporary = true;\n this.bottomItems = [];\n}", "async createTeamStream () {\n\t\tlet stream = {\n\t\t\tteamId: this.attributes.id,\n\t\t\ttype: 'channel',\n\t\t\tname: 'general',\n\t\t\tisTeamStream: true\n\t\t};\n\t\tthis.transforms.createdTeamStream = await new StreamCreator({\n\t\t\trequest: this.request,\n\t\t\tnextSeqNum: this.assumeTeamStreamSeqNum || undefined\n\t\t}).createStream(stream);\n\t}", "function SMFramer() {\n\tObject.defineProperty(this, 'FLAG_FIN', { writable: false, value: 0x01 });\n\tObject.defineProperty(this, 'FLAG_UNIDIRECTIONAL', { writable: false, value: 0x02 });\n}", "function startFlow() {\n\tyCo = 8;\n \n\tfor (xCo = 0; xCo < 6; xCo++) {\n\t\tif (map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY(yCo * 64), 'Tile Layer 1') != null && map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY(yCo * 64), 'Tile Layer 1').index == 10) {\n\t\t\tmap.getTile(layer1.getTileX(xCo * 64), layer1.getTileY((yCo - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY((yCo - 1) * 64), 'Tile Layer 1');\n\t\t\tanimateFlow(curPipe);\n\t\t\tcheckIfFlowable(curPipe);\n\t\t\ttimerBar.destroy();\n\t\t\tflowTimer = game.time.events.loop(Phaser.Timer.SECOND * flowSpeed, runFlow, this);\n\t\t}\n\t}\n flowStarted = true;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n}", "function defineMode(name, mode) {\r\n if (arguments.length > 2)\r\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\r\n modes[name] = mode;\r\n}", "async create({\n orderType,\n amount,\n priceType,\n pricePerEos,\n priceVar,\n paymentMethods,\n minTrx,\n }) {\n\n let actions = [];\n amount = amount.toString();\n actions.push(\n await this._formatAction({\n account: Contracts.EOSIO_TOKEN,\n name: 'transfer',\n data: {\n from: await this.getAccountName(),\n to: Contracts.TRADA,\n quantity: amount,\n memo: 'Offer creation',\n }\n }),\n );\n\n actions.push(\n await this._formatAction({\n name: 'create',\n data: {\n account: await this.getAccountName(),\n order_type: orderType,\n amount,\n price_type: priceType,\n price_per_eos: priceType === PriceTypes.EXACT_PRICE ? pricePerEos.toString() : new FiatAsset(),\n price_var: priceType === PriceTypes.MARKET_VAR ? priceVar : 0,\n payment_methods: paymentMethods,\n allow_partial: minTrx ? 1 : 0,\n }\n }),\n );\n\n await this.transactFull(actions);\n }", "switchMode(arg) {\n let mode = arg;\n // if force mode not provided, switch to opposite of current mode\n if (!mode || mode instanceof MouseEvent)\n mode = this.currentView === 'source' ? 'preview' : 'source';\n if (arg instanceof MouseEvent) {\n if (obsidian.Keymap.isModEvent(arg)) {\n this.app.workspace.duplicateLeaf(this.leaf).then(() => {\n var _a, _b;\n const viewState = (_a = this.app.workspace.activeLeaf) === null || _a === void 0 ? void 0 : _a.getViewState();\n if (viewState) {\n viewState.state = Object.assign(Object.assign({}, viewState.state), { mode: mode });\n (_b = this.app.workspace.activeLeaf) === null || _b === void 0 ? void 0 : _b.setViewState(viewState);\n }\n });\n }\n else {\n this.setState(Object.assign(Object.assign({}, this.getState()), { mode: mode }), {});\n }\n }\n else {\n // switch to preview mode\n if (mode === 'preview') {\n this.currentView = 'preview';\n obsidian.setIcon(this.changeModeButton, 'pencil');\n this.changeModeButton.setAttribute('aria-label', 'Edit (Ctrl+Click to edit in new pane)');\n this.renderPreview(this.recipe);\n this.previewEl.style.setProperty('display', 'block');\n this.sourceEl.style.setProperty('display', 'none');\n }\n // switch to source mode\n else {\n this.currentView = 'source';\n obsidian.setIcon(this.changeModeButton, 'lines-of-text');\n this.changeModeButton.setAttribute('aria-label', 'Preview (Ctrl+Click to open in new pane)');\n this.previewEl.style.setProperty('display', 'none');\n this.sourceEl.style.setProperty('display', 'block');\n this.editor.refresh();\n }\n }\n }", "function OpticalFlowFarnebackSeq(options) {\n this.options=options;\n this.initialized=false;\n}", "constructor(){\n\t\tthis.flowTree = [];\n\t\tthis.structure = {nodes: [], connections: [], transform: [1, 0, 0, 1, 0, 0]};\n\t\tthis._registeredNodes = {};\n\t}", "function createBlock($block, options, arrElem, conns) {\n\t\tswitch (options.type) {\n\t\t\tcase rules.TRIGGER_CRON.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['value'] = arrElem['value'];\n\t\t\t\t\toptions['nextid'] = arrElem['nextid'];\n\t\t\t\t\tconns['nextid'] = arrElem['nextid'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['value'] = '';\n\t\t\t\t\toptions['nextid'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, sourceEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.TRIGGER_TOPIC.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['topic'] = arrElem['topic'];\n\t\t\t\t\toptions['nextid'] = arrElem['nextid'];\n\t\t\t\t\tconns['nextid'] = arrElem['nextid'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['topic'] = '';\n\t\t\t\t\toptions['nextid'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, sourceEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.CONDITION_TOPIC_VALUE.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['topic'] = arrElem['topic'];\n\t\t\t\t\toptions['condition'] = arrElem['condition'];\n\t\t\t\t\toptions['value'] = arrElem['value'];\n\t\t\t\t\toptions['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\toptions['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t\tconns['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\tconns['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['topic'] = '';\n\t\t\t\t\toptions['condition'] = '';\n\t\t\t\t\toptions['value'] = '';\n\t\t\t\t\toptions['nextid-true'] = 0;\n\t\t\t\t\toptions['nextid-false'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceTrueEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceFalseEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.CONDITION_TOPIC_TOPIC.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['topic'] = arrElem['topic'];\n\t\t\t\t\toptions['condition'] = arrElem['condition'];\n\t\t\t\t\toptions['value-topic'] = arrElem['value-topic'];\n\t\t\t\t\toptions['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\toptions['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t\tconns['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\tconns['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['topic'] = '';\n\t\t\t\t\toptions['condition'] = '';\n\t\t\t\t\toptions['value-topic'] = '';\n\t\t\t\t\toptions['nextid-true'] = 0;\n\t\t\t\t\toptions['nextid-false'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceTrueEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceFalseEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.CONDITION_TOPIC_VARIABLE.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['topic'] = arrElem['topic'];\n\t\t\t\t\toptions['condition'] = arrElem['condition'];\n\t\t\t\t\toptions['value-variable'] = arrElem['value-variable'];\n\t\t\t\t\toptions['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\toptions['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t\tconns['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\tconns['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['topic'] = '';\n\t\t\t\t\toptions['condition'] = '';\n\t\t\t\t\toptions['value-variable'] = '';\n\t\t\t\t\toptions['nextid-true'] = 0;\n\t\t\t\t\toptions['nextid-false'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceTrueEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceFalseEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.CONDITION_VARIABLE_VALUE.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['variable'] = arrElem['variable'];\n\t\t\t\t\toptions['condition'] = arrElem['condition'];\n\t\t\t\t\toptions['value'] = arrElem['value'];\n\t\t\t\t\toptions['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\toptions['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t\tconns['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\tconns['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['variable'] = '';\n\t\t\t\t\toptions['condition'] = '';\n\t\t\t\t\toptions['value'] = '';\n\t\t\t\t\toptions['nextid-true'] = 0;\n\t\t\t\t\toptions['nextid-false'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceTrueEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceFalseEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.CONDITION_VARIABLE_VARIABLE.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['variable'] = arrElem['variable'];\n\t\t\t\t\toptions['condition'] = arrElem['condition'];\n\t\t\t\t\toptions['value-variable'] = arrElem['value-variable'];\n\t\t\t\t\toptions['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\toptions['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t\tconns['nextid-true'] = arrElem['nextid-true'];\n\t\t\t\t\tconns['nextid-false'] = arrElem['nextid-false'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['variable'] = '';\n\t\t\t\t\toptions['condition'] = '';\n\t\t\t\t\toptions['value-variable'] = '';\n\t\t\t\t\toptions['nextid-true'] = 0;\n\t\t\t\t\toptions['nextid-false'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceTrueEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceFalseEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.ACTION_VALUE.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['topic'] = arrElem['topic'];\n\t\t\t\t\toptions['value'] = arrElem['value'];\n\t\t\t\t\toptions['retain'] = arrElem['retain'];\n\t\t\t\t\toptions['nextid'] = arrElem['nextid'];\n\t\t\t\t\tconns['nextid'] = arrElem['nextid'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['topic'] = '';\n\t\t\t\t\toptions['value'] = '';\n\t\t\t\t\toptions['retain'] = 0;\n\t\t\t\t\toptions['nextid'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.ACTION_TOPIC.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['topic'] = arrElem['topic'];\n\t\t\t\t\toptions['value-topic'] = arrElem['value-topic'];\n\t\t\t\t\toptions['retain'] = arrElem['retain'];\n\t\t\t\t\toptions['nextid'] = arrElem['nextid'];\n\t\t\t\t\tconns['nextid'] = arrElem['nextid'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['topic'] = '';\n\t\t\t\t\toptions['value-topic'] = '';\n\t\t\t\t\toptions['retain'] = 0;\n\t\t\t\t\toptions['nextid'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.ACTION_VARIABLE.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['topic'] = arrElem['topic'];\n\t\t\t\t\toptions['value-variable'] = arrElem['value-variable'];\n\t\t\t\t\toptions['retain'] = arrElem['retain'];\n\t\t\t\t\toptions['nextid'] = arrElem['nextid'];\n\t\t\t\t\tconns['nextid'] = arrElem['nextid'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['topic'] = '';\n\t\t\t\t\toptions['value-variable'] = '';\n\t\t\t\t\toptions['retain'] = 0;\n\t\t\t\t\toptions['nextid'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.VARIABLE_INIT.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['variable'] = arrElem['variable'];\n\t\t\t\t\toptions['value'] = arrElem['value'];\n\t\t\t\t\toptions['retain'] = arrElem['retain'];\n\t\t\t\t\tHomeWSN.Editor.addVariable(arrElem['variable']);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['variable'] = '';\n\t\t\t\t\toptions['value'] = '';\n\t\t\t\t\toptions['retain'] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase rules.VARIABLE_SET.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['variable'] = arrElem['variable'];\n\t\t\t\t\toptions['value'] = arrElem['value'];\n\t\t\t\t\toptions['retain'] = arrElem['retain'];\n\t\t\t\t\toptions['nextid'] = arrElem['nextid'];\n\t\t\t\t\tconns['nextid'] = arrElem['nextid'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['variable'] = '';\n\t\t\t\t\toptions['value'] = '';\n\t\t\t\t\toptions['retain'] = 0;\n\t\t\t\t\toptions['nextid'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceEndpoint);\n\t\t\t\tbreak;\n\t\t\tcase rules.VARIABLE_INCREMENT.type:\n\t\t\tcase rules.VARIABLE_DECREMENT.type:\n\t\t\t\tif (typeof arrElem !== 'undefined' && typeof conns !== 'undefined') {\n\t\t\t\t\toptions['variable'] = arrElem['variable'];\n\t\t\t\t\toptions['retain'] = arrElem['retain'];\n\t\t\t\t\toptions['nextid'] = arrElem['nextid'];\n\t\t\t\t\tconns['nextid'] = arrElem['nextid'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\toptions['variable'] = '';\n\t\t\t\t\toptions['retain'] = 0;\n\t\t\t\t\toptions['nextid'] = 0;\n\t\t\t\t}\n\t\t\t\tjsPlumb.addEndpoint($block, targetEndpoint);\n\t\t\t\tjsPlumb.addEndpoint($block, sourceEndpoint);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif (HomeWSN.Debugging === true)\n\t\t\t\t\tconsole.log('HomeWSN.Editor.Flowchart.createBlock: unrecognized block type');\n\t\t\t\tbreak;\n\t\t}\n\n\t\tvar endpoints = jsPlumb.getEndpoints($block);\n\t\tif (endpoints != undefined) {\n\t\t\tfor (var cnt = 0; cnt < endpoints.length; cnt++)\n\t\t\t\t$(endpoints[cnt].canvas).zIndex($block.zIndex());\n\t\t}\n\t}", "buildAudioGraph() {\n this.router = new FOARouter(this.config.channelMap);\n this.bypass = Gain(\"foa-renderer-bypass\");\n this.input = Gain(\"foa-renderer-input\", channelCount(4), channelCountMode(\"explicit\"), channelInterpretation(\"discrete\"), this.router, this.bypass);\n this.output = Gain(\"foa-renderer-output\");\n this.rotator = new FOARotator();\n this.convolver = new FOAConvolver();\n connect(this.router, this.rotator);\n connect(this.rotator, this.convolver);\n connect(this.convolver, this.output);\n }", "async build() {\n // on ready\n await new Promise(resolve => this.eden.once('eden.ready', resolve));\n\n // flow setup\n await this.eden.hook('flow.build', FlowHelper);\n }", "static async create(args, options = {}) {\n const textEncoder = options.textEncoder || new TextEncoder();\n const textDecoder = options.textDecoder || new TextDecoder();\n const data = {};\n const serialize = (action) => {\n return serializeAction(action, textEncoder, textDecoder, options.abiProvider);\n };\n // set the request data\n if (args.identity !== undefined) {\n data.req = ['identity', args.identity];\n }\n else if (args.action && !args.actions && !args.transaction) {\n data.req = ['action', await serialize(args.action)];\n }\n else if (args.actions && !args.action && !args.transaction) {\n if (args.actions.length === 1) {\n data.req = ['action', await serialize(args.actions[0])];\n }\n else {\n data.req = ['action[]', await Promise.all(args.actions.map(serialize))];\n }\n }\n else if (args.transaction && !args.action && !args.actions) {\n const tx = args.transaction;\n // set default values if missing\n if (tx.expiration === undefined) {\n tx.expiration = '1970-01-01T00:00:00.000';\n }\n if (tx.ref_block_num === undefined) {\n tx.ref_block_num = 0;\n }\n if (tx.ref_block_prefix === undefined) {\n tx.ref_block_prefix = 0;\n }\n if (tx.context_free_actions === undefined) {\n tx.context_free_actions = [];\n }\n if (tx.transaction_extensions === undefined) {\n tx.transaction_extensions = [];\n }\n if (tx.delay_sec === undefined) {\n tx.delay_sec = 0;\n }\n if (tx.max_cpu_usage_ms === undefined) {\n tx.max_cpu_usage_ms = 0;\n }\n if (tx.max_net_usage_words === undefined) {\n tx.max_net_usage_words = 0;\n }\n // encode actions if needed\n tx.actions = await Promise.all(tx.actions.map(serialize));\n data.req = ['transaction', tx];\n }\n else {\n throw new TypeError('Invalid arguments: Must have exactly one of action, actions or transaction');\n }\n // set the chain id\n data.chain_id = variantId(args.chainId);\n data.flags = abi.RequestFlagsNone;\n const broadcast = args.broadcast !== undefined ? args.broadcast : true;\n if (broadcast) {\n data.flags |= abi.RequestFlagsBroadcast;\n }\n if (typeof args.callback === 'string') {\n data.callback = args.callback;\n }\n else if (typeof args.callback === 'object') {\n data.callback = args.callback.url;\n if (args.callback.background) {\n data.flags |= abi.RequestFlagsBackground;\n }\n }\n else {\n data.callback = '';\n }\n data.info = [];\n if (typeof args.info === 'object') {\n for (const key in args.info) {\n if (args.info.hasOwnProperty(key)) {\n let value = args.info[key];\n if (typeof key !== 'string') {\n throw new Error('Invalid info dict, keys must be strings');\n }\n if (typeof value === 'string') {\n value = textEncoder.encode(value);\n }\n data.info.push({ key, value });\n }\n }\n }\n const req = new SigningRequest(ProtocolVersion, data, textEncoder, textDecoder, options.zlib, options.abiProvider);\n // sign the request if given a signature provider\n if (options.signatureProvider) {\n req.sign(options.signatureProvider);\n }\n return req;\n }", "function PartyRuleClass() {\n\n //Some models and controllers provided by Dash.js to gather metrics and return SwitchRequests\n let factory = dashjs.FactoryMaker;\n let SwitchRequest = factory.getClassFactoryByName('SwitchRequest');\n let DashMetrics = factory.getSingletonFactoryByName('DashMetrics');\n let MetricsModel = factory.getSingletonFactoryByName('MetricsModel');\n let StreamController = factory.getSingletonFactoryByName('StreamController');\n let DashManifestModel = factory.getSingletonFactoryByName('DashManifestModel');\n let context = this.context;\n let instance;\n\n function setup() {\n //A necessary function \n }\n\n //Where the magic happens. This is called every time to figure out what bitrate should be chosen\n function getMaxIndex(rulesContext) {\n // here you can get some informations aboit metrics for example, to implement the rule\n let metricsModel = MetricsModel(context).getInstance();\n var mediaType = rulesContext.getMediaInfo().type; //Fragment type\n let bitrates = rulesContext.getMediaInfo().bitrateList; //Fragment bitrates\n var metrics = metricsModel.getMetricsFor(mediaType, true); //General info\n let dashMetrics = DashMetrics(context).getInstance(); //More info\n let streamController = StreamController(context).getInstance();\n let dashManifest = DashManifestModel(context).getInstance();\n let abr = rulesContext.getAbrController();\n\n\n //Get max possible bitrate ~INDEX~ since SwitchRequest uses the index rather than the actual bitrate \n let top = bitrates.length;\n\n if(mediaType == 'video'){\n //Party time\n let switchRequest = SwitchRequest(context).create();\n switchRequest.quality = Math.floor(Math.random() * top);\n switchRequest.reason = 'Only way is up';\n switchRequest.priority = SwitchRequest.PRIORITY.STRONG;\n return switchRequest;\n }else{\n return SwitchRequest(context).create();\n } \n \n }\n\n instance = {\n getMaxIndex: getMaxIndex\n };\n\n setup();\n\n return instance;\n}", "function flow(inTile) {\n\tswitch (inTile.index) {\n\tcase 1:\n\t\tif (inTile.properties.inFlow == \"right\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1').properties.inFlow = \"up\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"down\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"left\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 2:\n\t\tif (inTile.properties.inFlow == \"right\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"right\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"left\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"left\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 3:\n\t\tif (inTile.properties.inFlow == \"left\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1').properties.inFlow = \"up\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"down\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"right\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 4:\n\t\tif (inTile.properties.inFlow == \"up\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1').properties.inFlow = \"up\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"down\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 5:\n\t\tif (inTile.properties.inFlow == \"up\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"left\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"right\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 6:\n\t\tif (inTile.properties.inFlow == \"up\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"right\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"left\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 7:\n\t\tif (inTile.properties.inFlow == \"left\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow += \"left\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"right\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow += \"right\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"up\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1').properties.inFlow += \"up\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"down\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1').properties.inFlow += \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\tif(map.getTile(layer5.getTileX(curPipe.x * 64), layer5.getTileY(curPipe.y * 64), 'Tile Layer 5') != null && map.getTile(layer5.getTileX(curPipe.x * 64), layer5.getTileY(curPipe.y * 64), 'Tile Layer 5').index == 313){\n\t\tbonus++;\n\t}\n\tcheckIfFlowable(curPipe);\n\tanimateFlow(curPipe);\n}", "function ScenarioStepFactory(step,ctx) {\n this.isAction = () => step.action !== undefined\n this.isConsumedMessage = () => (step.message !== undefined) && (step.consumed_by !== undefined)\n this.isProducedMessage = () => (step.message !== undefined) && (step.produced_by !== undefined)\n this.isCalledAPI = () => (step.api !== undefined) && (step.called_by !== undefined)\n this.isStartAfter = () => step.after !== undefined\n \n this.build = function() {\n if(this.isAction()) {\n return new DoesActionStep(step,ctx)\n } else if(this.isConsumedMessage()) {\n return new ConsumesMessageStep(step,ctx)\n } else if(this.isProducedMessage()) {\n return new ProducesMessageStep(step,ctx)\n } else if(this.isCalledAPI()) {\n return new CallsAPIStep(step,ctx)\n } else if(this.isStartAfter()){\n return new StartAfterStep(step,ctx)\n }\n } \n}", "static createNode( type, title, options )\r\n {\r\n options = options || {};\r\n type = type || options.type || \"defaultNode\";\r\n\r\n console.assert(FSMNode.NODE_TYPES[type], `Unable to instance a new node of type: ${type}. Type not registered`,window.DEBUG); \r\n\r\n if(title)\r\n options.name = title;\r\n let node = new FSMNode.NODE_TYPES[type](options);\r\n\r\n return node;\r\n }", "_newDataSet(...params){\n const Type = this.options.DataSetType || DataSet;\n return new Type(...params); \n }", "function factory(options) {\n options = _.extend({}, options, defaultOptions);\n\n options.transformSyntaxTree = tartan.transform([\n options.transformSyntaxTree,\n tartan.transform.flatten(),\n tartan.transform.fold({\n allowRootReorder: false,\n allowNestedBlocks: false,\n maxFoldLevels: 2,\n minBlockSize: 3,\n greedy: false,\n allowSplitStripe: false,\n processExistingBlocks: false\n })\n ]);\n\n return tartan.render.format(options);\n}", "create() {}", "create() {}", "function createMode(rulesArray) {\n\n var mode = {\n rules: rulesArray,\n rulesRe: null,\n findIndex: {},\n activeRules: [],\n\n // gets the index of the found capture from the capture array\n getgroupIndex: function (captureArray, startIndex) {\n startIndex = (startIndex || 0);\n\n for (var i = startIndex, il = captureArray.length; i < il; i++) {\n if (captureArray[i] != null) return (i - startIndex);\n }\n return -1;\n },\n\n // uses findIndex to find rule based on captures result.\n getRuleFromCaptures: function (captureArray, startIndex, useFindIndex) {\n if (useFindIndex || useFindIndex == null) {\n return this.findIndex[this.getgroupIndex(captureArray, startIndex)];\n } else {\n return getRuleFromMatch(captureArray[this.getgroupIndex(captureArray, startIndex)]);\n }\n },\n\n // gets the rule from the matched text. slower than using find index. \n getRuleFromMatch: function (text) {\n var match;\n\n if ((match = new RegExp(this.rulesRe.source, 'gm').exec(text)) != null) {\n return this.findIndex[this.getgroupIndex(match, 1)];\n }\n\n },\n // creates the re, based on options\n updateRe: function (options) {\n this.findIndex = {};\n this.activeRules = [];\n\n var regex = '';\n var rule;\n\n var captureOffset = 0;\n var arrayLength = rulesArray.length;\n\n for (var i = 0, il = rulesArray.length; i < il; i++) {\n rule = rulesArray[i];\n\n if (rule.optionsMatch == null || options == null || options.match(rule.optionsMatch)) {\n regex += '(' + rule.regEx + ')|';\n this.activeRules.push(rule);\n this.findIndex[i + captureOffset] = rule;\n captureOffset += rule.capturedCount;\n } else {\n // skip rule\n captureOffset--;\n }\n }\n\n this.rulesRe = RegExp(regex.substr(0, regex.length - 1), 'gm');\n },\n\n clone: function () {\n return createMode(this.rules);\n }\n };\n mode.updateRe('');\n return mode;\n }", "function startNewMode(mode, lexeme) {\n var node;\n\n if (mode.className) {\n node = build(mode.className, []);\n }\n\n if (mode.returnBegin) {\n modeBuffer = EMPTY;\n } else if (mode.excludeBegin) {\n addText(lexeme, currentChildren);\n\n modeBuffer = EMPTY;\n } else {\n modeBuffer = lexeme;\n }\n\n /* Enter a new mode. */\n if (node) {\n currentChildren.push(node);\n stack.push(currentChildren);\n currentChildren = node.children;\n }\n\n top = Object.create(mode, {parent: {value: top}});\n }", "constructor(source, params) {\n this.source = source;\n this.params = params;\n this.strategies = [];\n this.print = true;\n if (params.backtest) {\n types_1.Scenario.create(params.backtest);\n }\n else {\n types_1.Scenario.createWithName(utils_1.formatTimestamp(+new Date()), +new Date(), 0);\n mkdirp.sync(`./data/${source.exchange}/${types_1.Scenario.getInstance().id}`);\n }\n let apiClass = ccxt[source.exchange];\n if (!apiClass)\n throw new errors_1.InvalidExchangeNameError(source.exchange);\n let apiCreds = config_1.config[source.exchange];\n let api = new apiClass(apiCreds);\n // This is a little weird\n // Basically we use a \"real\" API no matter what to pull markets\n // Everything else gets faked when mocked\n if (params.mock)\n api = new mock_api_1.MockAPI(api);\n this.thread = new utils_1.Thread();\n this.exchange = new exchange_1.Exchange(api);\n }" ]
[ "0.5705125", "0.56897783", "0.5656588", "0.5529257", "0.5344734", "0.51809794", "0.5176161", "0.5161175", "0.5136103", "0.5111144", "0.50556713", "0.5043777", "0.5017146", "0.49989784", "0.49793434", "0.49251306", "0.48796272", "0.48600587", "0.48528117", "0.48454717", "0.48364922", "0.4795983", "0.47899118", "0.47851983", "0.47334087", "0.47237733", "0.46963555", "0.46962637", "0.46747825", "0.46612567", "0.4651677", "0.46310478", "0.46292332", "0.4606248", "0.45966575", "0.45828193", "0.45779455", "0.45731795", "0.45718256", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.4563975", "0.45638844", "0.4556618", "0.45408258", "0.45310417", "0.45310417", "0.4529637", "0.45267385", "0.45239723", "0.45205805", "0.45180932", "0.45166752", "0.45066178", "0.44961536", "0.44925144", "0.44925144", "0.44925144", "0.44925144", "0.44925144", "0.44925144", "0.44925144", "0.44925144", "0.44925144", "0.44925144", "0.44925144", "0.4484501", "0.44833004", "0.44702926", "0.44685084", "0.44656968", "0.44494796", "0.44455728", "0.44435182", "0.44243866", "0.441889", "0.43959376", "0.43957335", "0.4393403", "0.43911192", "0.43895796", "0.43816018", "0.43816018", "0.4378623", "0.4377922", "0.43603542" ]
0.5701238
1
This creates a Flow from a range of numbers. It is assumed that end > start
static fromRange(start, end){ return FlowFactory.getFlow([...new Array(end - start + 1).keys()].map((elem) => elem + start)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createRange(start, end, step) {\n return new Range(\n type.isBigNumber(start) ? start.toNumber() : start,\n type.isBigNumber(end) ? end.toNumber() : end,\n type.isBigNumber(step) ? step.toNumber() : step\n );\n }", "function createRange(start, end, step) {\n return new Range(type.isBigNumber(start) ? start.toNumber() : start, type.isBigNumber(end) ? end.toNumber() : end, type.isBigNumber(step) ? step.toNumber() : step);\n }", "function createRange(start, end, step) {\n return new Range((0, _is.isBigNumber)(start) ? start.toNumber() : start, (0, _is.isBigNumber)(end) ? end.toNumber() : end, (0, _is.isBigNumber)(step) ? step.toNumber() : step);\n }", "range(startIndex, endIndex){\n if( startIndex < 0 )\n throw new Error(\"Start Index cannot be negative\");\n if( endIndex <= 0 )\n throw new Error(\"End Index must be greater than 0\");\n if( startIndex > endIndex )\n throw new Error(\"End Index cannot be less than Start Index\");\n\n var flow = new RangeMethodFlow(startIndex, endIndex);\n setRefs(this, flow);\n\n return flow;\n }", "function genRange(start, end) {\n var range = [];\n while (start <= end) {\n range.push(start);\n start += 1;\n }\n return range;\n }", "function createRange(start, end) {\n const range = Array.from({ length: end - start + 1 }, function(item, index) {\n return index + start;\n });\n return range;\n}", "function range(start, end) {\n //Input sanitization\n if (!start && !end) return \"Please provide both start and end points\";\n if (!end) return \"Please provide an endpoint\";\n if (isNaN(start) || isNaN(end))\n return \"Both start and end points must be numbers\";\n\n let arr = [];\n while (start <= end) {\n arr.push(start);\n start++;\n }\n return arr;\n}", "function NumberRangeGenerator(lb, ub){\n\tthis.lb = lb\n\tthis.ub = ub\n}", "function generateRange(min, max, step){\n var ar = [];\n var n = min;\n while (n <= max) {\n ar.push(n);\n n = n + step;\n }\n return ar;\n \n}", "function Range(from,to) {\n this.from=from;\n this.to=to;\n}", "function createRange(end) {\n if (end === 0) {\n return [];\n }\n var results = [];\n var current = 1;\n var step = 0 <= end ? 1 : -1;\n\n results.push(current);\n\n while (current !== end) {\n current += step;\n results.push(current);\n }\n\n return results;\n}", "function range(start, end, step=1) {\n // Your code here\n var list = [];\n var counter = 0;\n if(typeof step === \"undefined\"){\n step = 1;\n }\n for(var i = start; i!=end+step; i= i+step){\n list[counter] = i;\n counter++;\n }\n return list;\n}", "function range(a) {\n let start = arguments.length > 1 ? a : 0;\n let end = arguments.length > 1 ? arguments[1] : a;\n let step = arguments.length > 2 ? arguments[2] : 1;\n let sgn = Math.sign(step);\n if (!sgn) return [];\n let list = [];\n for (let i = start; i*sgn < end*sgn; i += step) {\n list.push(i);\n }\n return list;\n}", "function generateRange(start,end,step) {\n return Array.from(Array(Math.floor((end-start)/step)+1).keys()).map((i)=>i*step+start);\n}", "function range(start, end, step) {\n const len = Math.floor((end - start) / step) + 1\n return Array(len).fill().map((_, idx) => start + (idx * step))\n}", "__range(start, end) {\n\n let value = tf.linspace(start, end, (end - start) + 1).arraySync();\n return value;\n }", "function numberRange (start, end) {\n return new Array(end - start).fill().map((d, i) => i + start);\n}", "function range(start, end) {\r\n\tif (end === undefined) {\r\n\t\tend = start;\r\n\t\tstart = 0;\r\n\t}\r\n\tlet res = []; //newArray(end-start,0);\r\n\tstart = start | 0;\r\n\tfor (let i = start; i < end; i++) res.push(i);\r\n\treturn res;\r\n}", "constructor(start: number, stop: number) {\n this.start = start;\n this.stop = stop;\n }", "function generateRange(min, max, step) {\n\t// create an array container to put elements into\n\tconst container = [];\n\t// iterate start at min and end at max incrementing step\n\tfor (let i = min; i <= max; i += step) {\n\t\t// push into container i\n\t\tcontainer.push(i);\n\t}\n\t// return container\n\treturn container;\n}", "function RangeSeq( from, to ) {\n this.value = from - 1; // .next() is called before logging & .next() will increment this.value\n this.to = to;\n}", "function makeNumberSequence(start, end) {\n var arr = [];\n\n for (var i = start; i <= end; i++) {\n arr.push(i);\n }\n\n return arr;\n}", "function createArrayFromAtoB(start, end){\n var range = [];\n while (start <= end){\n range.push(start);\n start ++;\n }\n return range;\n}", "function range(start, end) {\n return Array(end - start + 1).fill().map((_, idx) => start + idx)\n}", "function range(start, end) {\n // YOUR CODE GOES BELOW HERE //\n // declaring and assigning the variable range to an empty array\n let range = [];\n \n // conditional statement that runs if start is less than end parameter\n if(start < end) {\n \n /** for loop that initialzies i as the starting number and will iterate\n * by 1 each time i is less than or equal to end */\n for(var i = start; i <= end; i++) {\n // using push method to push i to range array each time loop runs\n range.push(i);\n }\n // conditional else that runs if start is greater than end\n } else {\n /** for loop that initialzies i as the start number and will iterate\n * by 1 each time i is greater than or equal to end */\n for(var i = start; i >= end; i--) {\n // using push method to push i to range array each time loop runs\n range.push(i)\n }\n // returning range array\n } return range\n \n // YOUR CODE GOES ABOVE HERE //\n}", "function range (start, end) {\n var step = 1;\n if (arguments.length == 3) {\n\tstep = arguments[2];\n }\n\n var result = [];\n \n if (step < 0) {\n\tfor(var i = start; i >= end; i += step) {\n\t result.push(i);\n\t}\n } else {\n\tfor(var i = start; i <= end; i += step) {\n\t result.push(i);\n\t}\n }\n\n return result;\n}", "function generateRange(min, max, step) {\n let arr = []\n for (let i = min; i <= max; i += step) {\n arr.push(i)\n }\n return arr\n}", "function range(start, count) {\n if (!utils_1.isNumber(start))\n throw new Error(\"Expect 'start' parameter to 'dataForge.range' function to be a number.\");\n if (!utils_1.isNumber(count))\n throw new Error(\"Expect 'count' parameter to 'dataForge.range' function to be a number.\");\n var values = [];\n for (var valueIndex = 0; valueIndex < count; ++valueIndex) {\n values.push(start + valueIndex);\n }\n return new _1.Series(values);\n}", "function range(end, start=1) {\n return Array(end - start + 1).fill().map((_, idx) => start + idx)\n}", "function range(start, end) {\n\t if (end === undefined) {\n\t end = start;\n\t start = 0;\n\t }\n\t let res = []; //newArray(end-start,0);\n\t start = start | 0;\n\t for (let i = start; i < end; i++) res.push(i);\n\t return res;\n\t}", "function range(start, end, step = 1) {\n const len = Math.floor((end-start) / step) + 1\n return Array(len).fill().map((_, idx) => start + (idx * step));\n}", "function listOfIntegers(start, end = 100) {\n start = start || 17;\n let range = [];\n\n while (start <= 100) {\n if (start % 11 === 0) {\n range.push(start);\n start += 11;\n } else {\n start++;\n }\n }\n\n return range;\n}", "function range (startNumber, endNumber) {\n const range2 = [];\n if (startNumber < endNumber) {\n for (let i = startNumber; i <= endNumber; i++) {\n range2.push(i);\n }\n } else {\n for (let i = startNumber; i >= endNumber; i--) {\n range2.push(i);\n }\n }\n return range2;\n}", "range(start, end, step = 1) {\n let res = [];\n\n if(step > 0) {\n for(let i=start; i <= end; i+=step) {\n res.push(i);\n }\n } else {\n for(let i=start; i >= end; i+=step) {\n res.push(i);\n }\n }\n\n return res;\n }", "start(range) {\n var [start] = Range.edges(range);\n return start;\n }", "start(range) {\n var [start] = Range.edges(range);\n return start;\n }", "function range(start, end, step) {\n if (step == undefined) {\n step = 1;\n } else if (step == 0) {\n throw new ValueError(\"step = 0\");\n }\n\n return Array(end - start)\n .join(0)\n .split(0)\n .map(function(val, i) { return (i * step) + start} )\n ;\n}", "function Range() {}", "function range(from, to, step = 1) {\n let sequence = [];\n const condition = { '1': (x, y) => x <= y, '-1': (x, y) => x >= y };\n for (let i = from; condition[Math.sign(step)](i, to); i += step) {\n sequence.push(i);\n }\n return sequence;\n}", "function range(from) {\n return function(to) {\n var result = [];\n for (var n = from; n < to; n += 1) result.push (n);\n return result;\n };\n }", "function range(start, end){\n let arr = [start];\n if(start >= end){return start};\n return arr.concat(range(start+1, end));\n }", "function range(nbr,min,max){if(nbr<min){return min;}else if(nbr>max){return max;}else{return nbr;}}", "function rangei(start,end){\n return Array(end - start + 1).fill().map((_, idx) => start + idx)\n\n // var list = [];\n // for (var i = lowEnd; i <= highEnd; i++) {\n // list.push(i);\n // return list\n}", "function range(start, end) {\n // YOUR CODE GOES BELOW HERE //\n //first i am going to make an array to hold the numbers .pushed into it for the range function\n var rangeArray = [];\n //here i am making a loop that will decide in which order the number will be returned \n \n if(start < end){\n for(var i = start; i <= end; i++){\n rangeArray.push(i);\n }\n }else{\n for(var i = start; i >= end; i--){\n rangeArray.push(i);\n }\n }\n // i am returning range array so that it will hold the new output data\n return (rangeArray); \n \n \n // YOUR CODE GOES ABOVE HERE //\n}", "function generateRange(min, max, step){\n //varible declaration named narray set empty\n let narray = [];\n //for loop let i assigned to min; i less or \n //equal to max; i plus equals step\n for(let i = min; i <= max; i += step){\n //narray push method with i as parameter\n narray.push(i)\n }\n //return narray;\n return narray;\n }", "function range(start, end) {\n let nums = [];\n for (let i = start; i < end; i++) {\n nums.unshift(i);\n }\n return nums;\n }", "function range(start, end) {\n let r = [];\n for (let i = start; i < end; i++) {\n r.push(i);\n }\n return r;\n}", "function myRange(start, end) {\n let range = [];\n for (var i = start; i < end; i++) {\n range.push(i);\n }\n range.push(end);\n console.log(range);\n}", "function range(start, stop, step, maxLength) {\n // validate input\n if (isNaN(start)) return false;\n\n if (isNaN(stop)) {\n stop = start;\n start = 0;\n }\n\n if (stop < start) {\n var _ref = [start, stop];\n stop = _ref[0];\n start = _ref[1];\n }\n\n if (isNaN(step)) step = 1; // calculate length\n\n var length = (stop - start) / step; // DEBUG: console.log(`Calculated length: ${length}`);\n\n if (!isNaN(maxLength)) length = Math.min(length, maxLength); // DEBUG: console.log({start, stop, step, maxLength, length});\n // return array\n\n return Array(0 | length).fill(0).map(function (_, index) {\n return index * step + start;\n });\n }", "function RangeSeq(from, to) {\n this.pos = from - 1;\n this.to = to;\n}", "function range(start, end, step) {\n \n\n if (start < end) {\n for (let i = start; i <= end; i += step) {\n array.push(i);\n }\n }\n else if (start > end) {\n for (let i = start; i >= end; i -= step) {\n array.push(i);\n }\n }\n return array;\n}", "function range(rule,value,source,errors,options){var len=typeof rule.len==='number';var min=typeof rule.min==='number';var max=typeof rule.max==='number';var val=value;var key=null;var num=typeof value==='number';var str=typeof value==='string';var arr=Array.isArray(value);if(num){key='number';}else if(str){key='string';}else if(arr){key='array';}// if the value is not of a supported type for range validation\n// the validation rule rule should use the\n// type property to also test for a particular type\nif(!key){return false;}if(str||arr){val=value.length;}if(len){if(val!==rule.len){errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\"/* format */](options.messages[key].len,rule.fullField,rule.len));}}else if(min&&!max&&val<rule.min){errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\"/* format */](options.messages[key].min,rule.fullField,rule.min));}else if(max&&!min&&val>rule.max){errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\"/* format */](options.messages[key].max,rule.fullField,rule.max));}else if(min&&max&&(val<rule.min||val>rule.max)){errors.push(__WEBPACK_IMPORTED_MODULE_0__util__[\"d\"/* format */](options.messages[key].range,rule.fullField,rule.min,rule.max));}}", "range(_start, _end) {\n var result = []\n for (let i=_start; i<=_end; i++){\n result.push(i)\n }\n return result\n }", "function range(start, end, step=1) {\n // Your code here\n var numRange = [];\n if(start <= end) {\n \n for(var i = start; i <= end; i+=step) {\n numRange.push(i);\n }\n }\n else {\n for(var j = start; j >= end; j+=step){\n numRange.push(j);\n }\n }\n return numRange;\n}", "function InterpolNumber(start, end){\n\t\tthis.start = start, this.end = end;\n\t}", "function InterpolNumber(start, end){\n\t\tthis.start = start, this.end = end;\n\t}", "function range(start, end, step = start <= end ? 1 : -1) {\n let result = [];\n // loop iterates up for positive step values\n // and iterates down for negative step values\n for (let i = start; step >= 0 ? i <= end : i >= end; i+=step) {\n result.push(i);\n }\n return result;\n }", "function generateSteps(min, max, count) {\n var range = (max - min) / (count - 1);\n var res = [];\n\n for (var i = 0; i < count; i++) {\n res.push(min + range * i);\n }\n\n return res;\n}", "function getRange(start, stop) {\n const nums = [];\n\n for (let num = start; num < stop; num += 1) {\n nums.push(num);\n }\n}", "function range(start, end, step=1){\n\tlet ret_array = [];\n\tif(start-end>0){\n\t\tfor(let i=start; i>end-1; i+=step){\n\t\t\tret_array.push(i);\n\t\t}\n\t}\n\tfor(let i=start; i<end+1; i+=step){\n\t\tret_array.push(i);\n\t}\n\treturn ret_array;\n}", "function range(start, end) {\n if ((start && end) || end == 0) {\n let result = [];\n for (i = start; i <= end; i++) {\n result.push(i);\n }\n return result;\n }\n\n if (arguments[1] === undefined) {\n return function rangeTill(end) {\n let result = [];\n for (i = start; i <= end; i++) {\n result.push(i);\n }\n return result;\n };\n }\n}", "function range(start, stop, step) {\n if (start != null && typeof start != 'number') {\n throw new Error('start must be a number or null');\n }\n\n if (stop != null && typeof stop != 'number') {\n throw new Error('stop must be a number or null');\n }\n\n if (step != null && typeof step != 'number') {\n throw new Error('step must be a number or null');\n }\n\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n\n if (step == null) {\n step = stop > start ? 1 : -1;\n }\n\n var toReturn = [];\n var increasing = start < stop; //← here’s the change\n\n for (; increasing ? start < stop : start > stop; start += step) {\n toReturn.push(start);\n }\n\n return toReturn;\n }", "function range(startNum, endNum)\t{ \n\tlet arr = [];\n\t for (let i = startNum +1; i < endNum; i++)\n\t arr.push(i)\n\t return arr;\n}", "function range(start, end, step=1) {\n // Your code here\n var array = [];\n var x = 0;\n \n if(step<0){\n for (var i = start; i >= end; i += step){\n array[x] = i;\n x++;\n }\n }else{\n for (var i = start; i <= end; i += step){\n array[x] = i;\n x++;\n }\n}\n \n return array;\n \n}", "function range (start,end, step = 1){\n var array =[];\n if(start < end){\n for(var i=start; i<=end; i = i + step){\n array.push(i);\n }\n return array;\n }\n else {\n for (var j = start; j>=end; j = j + step){\n array.push(j);\n }\n return array;\n }\n}", "function range3(start, end, step = start <= end ? 1 : -1) {\n let result = [];\n // loop iterates up for positive step values\n // and iterates down for negative step values\n for (let i = start; step >= 0 ? i <= end : i >= end; i += step) {\n result.push(i);\n }\n return result;\n}", "function range(start, end, step) {\n var nums = [];\n if (step == undefined) {\n for (var i=start;i<=end;i++) {\n nums.push(i);\n }\n } else {\n for (var i=start;i<=end;i+=step) {\n nums.push(i);\n }\n }\n return nums;\n}", "function range(start, end, step = 1) {\n // Your code here\n var array = [];\n\n if (step > 0) {\n for (var i = start; i <= end; i += step) array.push(i);\n } else {\n for (var i = start; i >= end; i += step) array.push(i);\n }\n return array;\n}", "function range (start, stop, step) {\n\t\tif (typeof stop == 'undefined') {\n\t\t\t// one param defined\n\t\t\tstop = start;\n\t\t\tstart = 0;\n\t\t}\n\t\tif (typeof step == 'undefined') {\n\t\t\tstep = 1;\n\t\t}\n\t\tif ((step > 0 && start >= stop) || (step < 0 && start <= stop)) {\n\t\t\treturn [];\n\t\t}\n\t\tvar result = [];\n\t\tfor (var i = start; step > 0 ? i < stop : i > stop; i += step) {\n\t\t\tresult.push(i);\n\t\t}\n\t\treturn result;\n\t}", "function range(rule,value,source,errors,options){var len=typeof rule.len==='number';var min=typeof rule.min==='number';var max=typeof rule.max==='number';var val=value;var key=null;var num=typeof value==='number';var str=typeof value==='string';var arr=Array.isArray(value);if(num){key='number';}else if(str){key='string';}else if(arr){key='array';}// if the value is not of a supported type for range validation\n// the validation rule rule should use the\n// type property to also test for a particular type\nif(!key){return false;}if(str||arr){val=value.length;}if(len){if(val!==rule.len){errors.push(util.format(options.messages[key].len,rule.fullField,rule.len));}}else if(min&&!max&&val<rule.min){errors.push(util.format(options.messages[key].min,rule.fullField,rule.min));}else if(max&&!min&&val>rule.max){errors.push(util.format(options.messages[key].max,rule.fullField,rule.max));}else if(min&&max&&(val<rule.min||val>rule.max)){errors.push(util.format(options.messages[key].range,rule.fullField,rule.min,rule.max));}}", "function range(start, stop, step){\n if (typeof stop=='undefined'){\n stop = start;\n start = 0;\n }\n if (typeof step=='undefined'){\n step = 1;\n }\n if ((step>0 && start>=stop) || (step<0 && start<=stop)){\n return [];\n };\n var result = [];\n for (var i=start; step>0 ? i<stop : i>stop; i+=step){\n result.push(i);\n };\n return result;\n}", "function RangeSeq(from, to) {\n this.currentElement = from - 1;\n this.to = to;\n}", "function range(rule,value,source,errors,options){var len=typeof rule.len==='number';var min=typeof rule.min==='number';var max=typeof rule.max==='number';var val=value;var key=null;var num=typeof value==='number';var str=typeof value==='string';var arr=Array.isArray(value);if(num){key='number';}else if(str){key='string';}else if(arr){key='array';}// if the value is not of a supported type for range validation\n\t// the validation rule rule should use the\n\t// type property to also test for a particular type\n\tif(!key){return false;}if(str||arr){val=value.length;}if(len){if(val!==rule.len){errors.push(util.format(options.messages[key].len,rule.fullField,rule.len));}}else if(min&&!max&&val<rule.min){errors.push(util.format(options.messages[key].min,rule.fullField,rule.min));}else if(max&&!min&&val>rule.max){errors.push(util.format(options.messages[key].max,rule.fullField,rule.max));}else if(min&&max&&(val<rule.min||val>rule.max)){errors.push(util.format(options.messages[key].range,rule.fullField,rule.min,rule.max));}}", "function range(start, end) {\n start = Number(start) || 0;\n if (end === undefiend) {\n return function getEnd(end) {\n return getRange(start, end);\n }\n } else {\n end = Number(end) || 0;\n return getRange(start, end);\n }\n function getRange(start, end) {\n let ret = [];\n for (let i = start; i <= end; i++) {\n ret.push(i);\n }\n return ret;\n }\n}", "getRange(start, end) {\n return Array.from(\n {\n length: (parseInt(end, 10) + 1) - parseInt(start, 10)\n },\n (v, k) => k + parseInt(start, 10)\n );\n }", "function range(start, stop, step){\n if (typeof stop=='undefined'){\n // one param defined\n stop = start;\n start = 0;\n };\n if (typeof step=='undefined'){\n step = 1;\n };\n if ((step>0 && start>=stop) || (step<0 && start<=stop)){\n return [];\n };\n var result = [];\n for (var i=start; step>0 ? i<stop : i>stop; i+=step){\n result.push(i);\n };\n return result;\n}", "function range(rule,value,source,errors,options){var len=typeof rule.len==='number';var min=typeof rule.min==='number';var max=typeof rule.max==='number';var val=value;var key=null;var num=typeof value==='number';var str=typeof value==='string';var arr=Array.isArray(value);if(num){key='number';}else if(str){key='string';}else if(arr){key='array';}// if the value is not of a supported type for range validation\r\n\t// the validation rule rule should use the\r\n\t// type property to also test for a particular type\r\n\tif(!key){return false;}if(str||arr){val=value.length;}if(len){if(val!==rule.len){errors.push(util.format(options.messages[key].len,rule.fullField,rule.len));}}else if(min&&!max&&val<rule.min){errors.push(util.format(options.messages[key].min,rule.fullField,rule.min));}else if(max&&!min&&val>rule.max){errors.push(util.format(options.messages[key].max,rule.fullField,rule.max));}else if(min&&max&&(val<rule.min||val>rule.max)){errors.push(util.format(options.messages[key].range,rule.fullField,rule.min,rule.max));}}", "function range(start, stop, step) {\n return Array.from(\n { length: (stop - start) / step + 1 },\n (_, i) => start + i * step\n );\n}", "function range(start, end) {\n let numArray = [];\n for (let i = start; i <= end; i++) {\n numArray.push(i);\n }\n return numArray;\n}", "function range(start, end = -1) {\n\n if (end == -1) {\n end = start;\n start = 0;\n }\n\n let range = [];\n\n for (let element = start; element <= end; element++) {\n range.push(element);\n }\n\n return range;\n}", "function range(start, end) {\n if (start +1 >= end) {\n return [];\n }\n return (range(start, end-1).concat([end-1]));\n}", "function range(start, end, step=1) {\n // Your code here\n var final_arr = [];\n if (step == 0) {\n return \"The range cannot have intervals of zero\";\n }\n else if (step < 0) {\n for (var i = start; i >= end; i += step) {\n final_arr.push(i);\n }\n }\n else {\n for (var i = start; i <= end; i += step) {\n final_arr.push(i);\n }\n } \n return final_arr;\n}", "function range(start, end, step) {\n var array = [];\n step = typeof step !== 'undefined' ? step : 1;\n if (start < end) {\n for (i = start; i <= end; i += step) {\n array.push(i);\n }\n }\n if (start > end) {\n for (i = start; i >= end; i += step) {\n array.push(i);\n }\n }\n console.log(array);\n}", "static range(min, max){\n \n let l = [];\n for(let i=min; i < max; i++) l.push(i);\n return l;\n \n }", "function range(start, end) {\n rangeArr = [];\n for(var i = start; i <= end; i++) {\n rangeArr.push(i);\n }\n return rangeArr;\n}", "function range(start, end){\n if(arguments.length < 2){\n end = start;\n start = 0;\n }\n \n var result = [];\n for (var i = start; i <= end; i++){\n result.push(i);\n }\n return result;\n}", "function range(start, end, step=1) {\n let values = [];\n\n if (end > start) {\n for(let i = start; i < end; i += step) {\n values.push(i);\n }\n } else {\n for(let i = start; i > end; i += step) {\n values.push(i);\n }\n }\n\n return values;\n }", "function range(start, count, scheduler) {\n if (start === void 0) {\n start = 0;\n }\n return new Observable/* Observable */.y(function (subscriber) {\n if (count === undefined) {\n count = start;\n start = 0;\n }\n var index = 0;\n var current = start;\n if (scheduler) {\n return scheduler.schedule(range_dispatch, 0, {\n index: index, count: count, start: start, subscriber: subscriber\n });\n }\n else {\n do {\n if (index++ >= count) {\n subscriber.complete();\n break;\n }\n subscriber.next(current++);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n }\n return undefined;\n });\n}", "function range(start, end)\n{\n if (arguments.length == 1) {\n var end = start;\n start = 0;\n }\n \n var r = [];\n if (start < end) {\n while (start != end)\n r.push(start++);\n }\n else {\n while (start != end)\n r.push(start--);\n }\n return r;\n}", "static range(min, max){\n\n let l = [];\n for(let i=min; i < max; i++) l.push(i);\n return l;\n\n }", "function range(start, stop, step) {\n\n if (typeof stop == \"undefined\") {\n // one param defined\n stop = start;\n start = 0;\n }\n\n if (typeof step == \"undefined\") {\n step = 1;\n }\n\n if ((step > 0 && start >= stop) || (step < 0 && start <= stop)) {\n return [];\n }\n\n var result = [];\n for (var i = start; step > 0 ? i < stop : i > stop; i += step) {\n result.push(i);\n }\n\n return result;\n\n}", "limit(num){\n if( num <= 0 )\n throw new Error(\"Limit value must be greater than 0\");\n\n var flow = new RangeMethodFlow(0, num);\n setRefs(this, flow);\n\n return flow;\n }", "function generateNumbers(start_val, end_val){\n //add 1 to start value (new value) and append to array\n // add 1 to new value and append to array\n // continue to add one to new value until new value equals end value\n //stop when new value > end value\n let numbers = []; // it's a list - zero based index - \n\n for(let i = start_val; i <= end_val; i++){\n //this will execute in a loop until i equals end val\n numbers.push(i)\n }\n return numbers\n}", "function range(start, end) {\n return Array.apply(null, Array(end-start)).map(function (_, i) {return i + start;})\n}", "function range (from, to) {\n return Array.from(Array(to), (_, i) => from + i)\n}", "function range(start, end) {\n\tvar arr = [];\n\tfor (let i = start; i <= end; i++) {\n\t\tarr.push(i);\n\t}\n\treturn arr;\n}", "function flow(from, rate, to) {\n\tto = to || universe;\n\treturn { from:from, rate:rate, to:to };\n}", "function range(start, end) {\n if (start >= end) {\n return [];\n } else {\n return [start].concat(range(start + 1, end));\n }\n}", "function range(start, end, step){\n\tvar result = [];\n\tvar a = start < end ? start : end;\n\tvar b = start < end ? end : start;\n\tif(step === undefined) step = 1;\n\tfor(var i = a; i <= b; i += step){\n\t\tresult.push(i);\n\t}\n\treturn start < end ? result : result.reverse();\n}", "function range(start, end, step=1) {\n var result = [];\n \n if (!step) {\n step = 1;\n }\n \n if (step < 0) {\n for (i = start; i >= end; i += step) {\n result.push(i);\n }\n }\n else {\n for (i = start; i <= end; i += step) {\n result.push(i);\n }\n }\n return result;\n}" ]
[ "0.6557774", "0.6553659", "0.65510285", "0.65236956", "0.65049326", "0.64819974", "0.6318393", "0.62468153", "0.6182466", "0.61631614", "0.61609024", "0.6149031", "0.6106702", "0.6085905", "0.6048761", "0.60284626", "0.6016698", "0.6012064", "0.5992934", "0.59705955", "0.59591883", "0.59485924", "0.59230596", "0.59111845", "0.590238", "0.58834267", "0.58718765", "0.58649576", "0.5861336", "0.58611774", "0.5858938", "0.58565503", "0.5851052", "0.5843206", "0.58351123", "0.58351123", "0.5812032", "0.5797716", "0.5797632", "0.57959455", "0.5786053", "0.5771895", "0.5767283", "0.5764864", "0.57562417", "0.57404006", "0.57387006", "0.5736949", "0.573257", "0.573074", "0.5727351", "0.57207376", "0.57167125", "0.571436", "0.5703133", "0.5703133", "0.570295", "0.5695074", "0.569004", "0.56894785", "0.5687598", "0.5679525", "0.5653989", "0.56504244", "0.5646318", "0.56422156", "0.56420195", "0.56387824", "0.56363726", "0.5631703", "0.5621587", "0.5620911", "0.56140167", "0.5611214", "0.56101006", "0.5609543", "0.5603051", "0.5602793", "0.5600356", "0.5597583", "0.5593479", "0.5584624", "0.5582075", "0.55730325", "0.5568475", "0.5566306", "0.5565788", "0.5564986", "0.556387", "0.5561503", "0.5557577", "0.5546269", "0.5532334", "0.5527478", "0.55266327", "0.5520317", "0.55170107", "0.5510383", "0.55038816", "0.5500662" ]
0.7746055
0
This is a direct method to create a Flow from file.
static fromFile(file){ return new IteratorFlow(FlowFactory.createIteratorFromFileSystem(file)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static from(data){\n return FlowFactory.getFlow(data);\n }", "createFlow() {\n // Very simple random unique ID generator\n this.formattedFlow.flowId = `${new Date().getTime()}`;\n this.formattedFlow.flowName = this.originalFlow.flow;\n this.formattedFlow.comment = this.originalFlow.comment;\n this.formattedFlow.startAt = this.originalFlow.startAt;\n this.formattedFlow.states = Object.assign({}, this.originalFlow.states);\n this.formattedFlow.flowStartTime = new Date().getTime();\n this.formattedFlow.flowExecutionTime = '';\n\n return { isError: false, code: this.code, item: this.formattedFlow };\n }", "open(file) {\n this.file = file;\n this.input = this.file.input;\n this.state = new State();\n this.state.init(this.options, this.file);\n }", "function FileSource(file) {\n _classCallCheck(this, FileSource);\n\n this._file = file;\n this.size = file.size;\n }", "function Flow(nodeList, flows, node, type) {\n this.nodeList = nodeList;\n this.flows = flows;\n this.node = node;\n this.type = type;\n}", "function FileSource(file) {\n _classCallCheck$3(this, FileSource);\n this._file = file;\n this.size = file.size;\n }", "constructor(file) {\n this._file = file\n this.size = file.size\n }", "constructor (filename) {\n \n // Obtém conteúdo da template.\n this.template = fs.readFileSync(filename).toString(); \n }", "async load (filePath) {\n console.log(`Deserializing from ${filePath}`)\n this.data = this.formatStrategy.deserialize(\n await fs.readFile(filePath, 'utf-8')\n )\n }", "constructor (path) {\n const f = new IO(path, 'r');\n this.is_base = true;\n\n // copy as tempfile\n this.file = IO.temp('w+');\n let d = f.read(BUFFER_SIZE);\n while (d.length > 0) {\n this.file.write(d);\n d = f.read(BUFFER_SIZE);\n }\n\n f.close();\n if (!Base.surely_formatted(this.file)) {\n throw new Error('Unsupported file passed.');\n }\n\n // TODO: close and remove the Tempfile.\n this.frames = new Frames(this.file);\n }", "static createSource(filename) {\n const data = fs__default[\"default\"].readFileSync(filename, \"utf-8\");\n return [\n {\n column: 1,\n data,\n filename,\n line: 1,\n offset: 0,\n },\n ];\n }", "load(file) {\n this._loading = file;\n\n // Read file and split into lines\n const map = {};\n\n const content = fs.readFileSync(file, 'ascii');\n const lines = content.split(/[\\r\\n]+/);\n\n lines.forEach(line => {\n // Clean up whitespace/comments, and split into fields\n const fields = line.replace(/\\s*#.*|^\\s*|\\s*$/g, '').split(/\\s+/);\n map[fields.shift()] = fields;\n });\n\n this.define(map);\n\n this._loading = null;\n }", "constructor (filename) {\n super()\n this.filename = filename\n }", "constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }", "function Flow(id, map, identifier, loader, ioHandler, processManager) {\n\n var self = this;\n\n if (!id) {\n throw Error('xFlow requires an id');\n }\n\n if (!map) {\n throw Error('xFlow requires a map');\n }\n\n // Call the super's constructor\n Actor.apply(this, arguments);\n\n if (loader) {\n this.loader = loader;\n }\n if (ioHandler) {\n this.ioHandler = ioHandler;\n }\n\n if (processManager) {\n this.processManager = processManager;\n }\n\n // External vs Internal links\n this.linkMap = {};\n\n // indicates whether this is an action instance.\n this.actionName = undefined;\n\n // TODO: trying to solve provider issue\n this.provider = map.provider;\n\n this.providers = map.providers;\n\n this.actions = {};\n\n // initialize both input and output ports might\n // one of them be empty.\n if (!map.ports) {\n map.ports = {};\n }\n if (!map.ports.output) {\n map.ports.output = {};\n }\n if (!map.ports.input) {\n map.ports.input = {};\n }\n\n /*\n // make available always.\n node.ports.output['error'] = {\n title: 'Error',\n type: 'object'\n };\n */\n\n this.id = id;\n\n this.name = map.name;\n\n this.type = 'flow';\n\n this.title = map.title;\n\n this.description = map.description;\n\n this.ns = map.ns;\n\n this.active = false;\n\n this.metadata = map.metadata || {};\n\n this.identifier = identifier || [\n map.ns,\n ':',\n map.name\n ].join('');\n\n this.ports = JSON.parse(\n JSON.stringify(map.ports)\n );\n\n // Need to think about how to implement this for flows\n // this.ports.output[':complete'] = { type: 'any' };\n\n this.runCount = 0;\n\n this.inPorts = Object.keys(\n this.ports.input\n );\n\n this.outPorts = Object.keys(\n this.ports.output\n );\n\n //this.filled = 0;\n\n this.chi = undefined;\n\n this._interval = 100;\n\n // this.context = {};\n\n this.nodeTimeout = map.nodeTimeout || 3000;\n\n this.inputTimeout = typeof map.inputTimeout === 'undefined' ?\n 3000 :\n map.inputTimeout;\n\n this._hold = false; // whether this node is on hold.\n\n this._inputTimeout = null;\n\n this._openPorts = [];\n\n this._connections = new Connections();\n\n this._forks = [];\n\n debug('%s: addMap', this.identifier);\n this.addMap(map);\n\n this.fork = function() {\n\n var Fork = function Fork() {\n this.nodes = {};\n //this.context = {};\n\n // same ioHandler, tricky..\n // this.ioHandler = undefined;\n };\n\n // Pre-filled baseActor is our prototype\n Fork.prototype = this.baseActor;\n\n var FActor = new Fork();\n\n // Remember all forks for maintainance\n self._forks.push(FActor);\n\n // Each fork should have their own event handlers.\n self.listenForOutput(FActor);\n\n return FActor;\n\n };\n\n this.listenForOutput();\n\n this.initPortOptions = function() {\n\n // Init port options.\n for (var port in self.ports.input) {\n if (self.ports.input.hasOwnProperty(port)) {\n\n // This flow's port\n var thisPort = self.ports.input[port];\n\n // set port option\n if (thisPort.options) {\n for (var opt in thisPort.options) {\n if (thisPort.options.hasOwnProperty(opt)) {\n self.setPortOption(\n 'input',\n port,\n opt,\n thisPort.options[opt]);\n }\n }\n }\n\n }\n }\n };\n\n // Too late?\n this.setup();\n\n this.setStatus('created');\n\n}", "function FlowRecognizer(settings) {\n _classCallCheck(this, FlowRecognizer);\n\n this.settings = settings || {};\n this.initializeModels();\n }", "constructor(source = {}) {\n super(source, schema_1.ServiceTypes.File);\n }", "async function recreateFileFromStream(fileId) {\n\t// This is CQRS - our model in this \"view\" is different from original data model. \n\t// Data model is b64 encoded, this won't be. \n\tvar file = {};\n\n\t// Recreate file from stream\n\tconst createEvents = await readStream(FILE_CREATE);\n\tcreateEvents.forEach((event) => {\n\t\tif (event.id == fileId) {\n\t\t\tfile.content = Buffer.from(event.b64_file, 'base64').toString();\n\t\t\tfile.project = event.project;\n\t\t\tfile.id = event.id;\n\t\t\tfile.name = event.name;\n\t\t\tfile.deleted = false;\n\t\t}\n\t});\n\n\t// Apply all the updates from the stream\n\tconst updateEvents = await readStream(FILE_UPDATE);\n\tif (updateEvents) {\n\t\tupdateEvents.forEach((update) => {\n\t\t\tif (update.id == fileId) {\n\t\t\t\tvar updated = dmp.patch_apply(update.diff, file.content)[0];\n\t\t\t\tfile.content = updated;\n\t\t\t}\n\t\t});\n\t}\n\n\t// See if file was ever deleted\n\tconst deleteEvents = await readStream(FILE_DELETE);\n\tif (deleteEvents) {\n\t\tdeleteEvents.forEach((event) => {\n\t\t\tif (event.id == fileId) {\n\t\t\t\tfile.deleted = true;\n\t\t\t}\n\t\t});\n\t}\n\t\n\treturn file;\n}", "static pFileRead(fileprops){\n\t\tvar file = fileprops.file,\n\t\t\ttask = fileprops.task,\n\t\t\ttype = fileprops.type,\n\t\t\tfed_data = fileprops.fed_data || false;\n\n\t\treturn new Promise((resolve, reject) => {\n\n\t\t\tif (fed_data){\n\t\t\t\t//console.log(\"\")\n\t\t\t\ttry {\n\t\t\t\t\ttask(fed_data)\n\t\t\t\t\tresolve();\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.log(\"error\", e);\n\t\t\t\t\treject(\"Generated data failed to process\")\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tvar fr = new FileReader();\n\n\t\t\t\tfr.onload = function(e){\n\t\t\t\t\ttry {\n\t\t\t \t\ttask(e.target.result);\n\t\t \t\t\tresolve();\n\n\t\t \t\t} catch(e){\n\t\t \t\t\treject(file.name + \" is not a \" + type + \", and \" + e);\n\t\t \t\t}\n\t\t \t}\n\t\t\t\tfr.readAsText(file);\n\t\t\t}\n\t\t});\n\t}", "function decodeFile(input) {\n let ondata = (evt, cb) => {\n if (evt.data[0] == 0) {\n cb({raw: evt.data.subarray(1), links: [], data: evt.data.subarray(1)})\n } else if (evt.data[0] == 1) {\n try {\n let node = dagPB.util.deserialize(evt.data.subarray(1))\n\n let file = Unixfs.unmarshal(node.Data)\n if (file.type != \"raw\" && file.type != \"file\") {\n throw new Error(\"got unexpected file type, wanted raw or file\")\n }\n if (file.data == null) {\n file.data = Buffer.alloc(0)\n }\n\n cb({raw: evt.data.subarray(1), links: node.Links, data: file.data})\n } catch (err) {\n cb(null, err)\n }\n } else {\n cb(null, new Error(\"failed to decode a chunk of file data\"))\n }\n }\n\n return asynchronous(input, ondata)\n}", "function gotFile(file) {\n createDiv(\"<h1>\"+file.name+\"</h1>\").class(tabNumber).parent(\"left\");\n\n // Handle image and text differently\n if (file.type === 'image') {\n createImg(file.data);\n } \n else if (file.type === 'text') {\n tabs[file.name] = new Tab(file.name, tabNumber);\n switchTab(file.name, tabNumber);\n analyzeText(file, tabNumber);\n }\n}", "static fromFile(file) {\r\n return file.getItem().then(i => {\r\n const page = new ClientSidePage(extractWebUrl(file.toUrl()), \"\", { Id: i.Id }, true);\r\n return page.configureFrom(file).load();\r\n });\r\n }", "function Stream(filename, id) {\n this.filename = filename;\n this.frames_FRN_ordered = tl.readJSON(filename).slice(0);\n this.frames_Tarr_ordered = this.frames_FRN_ordered.slice(0);\n bubbleSortArrayByProperty(this.frames_Tarr_ordered, 'T_arrival');\n this.ID = id;\n this.frame_duration = this.frames_FRN_ordered[1].T_display - this.frames_FRN_ordered[0].T_display;\n this.nextFrameIndex = 0; //holds index of next frame to arrive on frames_Tarr_ordered - reset on new simulation\n}", "constructor(filePath) {\n \n this.graphList = new Map();\n this.graphObject = JSON.parse(fs.readFileSync(filePath,{encoding : 'utf8'}));\n this.visitedArray = new Array(); \n \n }", "function File() {\n _classCallCheck(this, File);\n\n File.initialize(this);\n }", "function createFileDecoder(path, opts) {\n return fs.createReadStream(path)\n .pipe(new containers.streams.BlockDecoder(opts));\n}", "function createFileDecoder(path, opts) {\n return fs.createReadStream(path)\n .pipe(new containers.streams.BlockDecoder(opts));\n}", "startWorkflow(flow) {\n // custom id management\n let customId = null;\n if (typeof flow.id === \"function\") {\n // customId can be a value or a function\n customId = flow.id();\n // customId should be a string or a number\n if (typeof customId !== \"string\" && typeof customId !== \"number\") {\n throw new InvalidArgumentError(\n `Provided id must be a string or a number - current type: ${typeof customId}`,\n );\n }\n // at the end, it's a string\n customId = customId.toString();\n // should be not more than 256 bytes;\n if (customId.length >= MAX_ID_SIZE) {\n throw new ExternalZenatonError(\n `Provided id must not exceed ${MAX_ID_SIZE} bytes`,\n );\n }\n }\n\n const url = this.getInstanceWorkerUrl();\n\n // start workflow\n const body = {\n [ATTR_PROG]: PROG,\n [ATTR_CANONICAL]: flow._getCanonical(),\n [ATTR_NAME]: flow.name,\n [ATTR_DATA]: serializer.encode(flow.data),\n [ATTR_ID]: customId,\n };\n\n const params = this.getAppEnv();\n\n return http.post(url, body, { params });\n }", "constructor(filename) {\n this.file = loadTable(filename,'csv','header');\n this.state = [];\n this.group = [];\n }", "getFlow() {\n return new NgFlowchart.Flow(this.canvas);\n }", "static fromDataTransferFile (dtFile) {\n return new File(dtFile.name, dtFile.path, dtFile.size,\n dtFile.lastModified, dtFile.lastModifiedDate)\n }", "constructor(fileJSON) {\n this.name = fileJSON.name;\n this.instructions = fileJSON.instructions;\n }", "constructor(stream) {\n this._stream = stream;\n this._parser = null;\n }", "function openFile(filename)\n{\n return new LineReaderSync(filename);\n}", "createPlayer (file, cb) {\n fs.readFile(folder + file, (err, buffer) => {\n if(err) {\n return cb(err);\n }\n cb(null, AV.Player.fromBuffer(buffer));\n });\n }", "constructor (fh, filename) {\n //\"\"\" initalize. \"\"\"\n //if hasattr(filename, 'read'):\n // if not hasattr(filename, 'seek'):\n // raise ValueError(\n // 'File like object must have a seek method')\n \n var superblock = new SuperBlock(fh, 0);\n var offset = superblock.offset_to_dataobjects;\n var dataobjects = new DataObjects(fh, offset);\n super('/', dataobjects, null);\n this.parent = this;\n\n this._fh = fh\n this.filename = filename || '';\n\n this.file = this;\n this.mode = 'r';\n this.userblock_size = 0;\n }", "create() {\n this.proc.args.file = null;\n\n this.emit('new-file');\n\n this.updateWindowTitle();\n }", "static of(){\n if( arguments.length == 0 )\n return FlowFactory.getFlow([]);\n\n if( arguments.length > 1 )\n return FlowFactory.getFlow(arguments);\n\n if( arguments.length == 1 && Util.isNumber(arguments[0]) )\n return new IteratorFlow(FlowFactory.createIteratorWithEmptyArraysFromNumber(arguments[0]));\n\n return FlowFactory.getFlow(arguments[0]);\n }", "constructor(file, options) {\n this.ws = null;\n options = options || {};\n this.options = {\n debug: options.debug,\n baseDir: options.baseDir || \"models\",\n };\n\n console.log(this.options);\n\n this.filePath = this.options.baseDir + \"/\" + file;\n this.model = loadModel(this.filePath);\n\n this._parseFilename(this.filePath);\n\n // Connect to websocket server\n this._listen(file);\n }", "function makeLoader(theFile) {\n // Making a p5.File object\n var p5file = new p5.File(theFile);\n return function(e) {\n p5file.data = e.target.result;\n callback(p5file);\n };\n }", "function makeLoader(theFile) {\n // Making a p5.File object\n var p5file = new p5.File(theFile);\n return function(e) {\n p5file.data = e.target.result;\n callback(p5file);\n };\n }", "transformer (source, name, filename, options) {\n return (size) => {\n let readStream;\n readStream = fs.createReadStream(filename);\n this.state(name, { sync: true }) // update header\n// // Since the function is not immediately invoked,\n// // the source stream (chain file) may have already closed\n// // by the time this function is called. \n// // Therefore check if it's already closed\n// // If already closed, create a normal stream\n// // If stil open (still writing, in case of a large file), create a tailstream\n// if (!source || source.writableFinished) {\n// readStream = fs.createReadStream(filename);\n// this.state(name, { sync: true }) // update header\n// } else {\n// readStream = ts.createReadStream(filename, { waitForCreate: true })\n// source.on(\"close\", () => {\n// this.state(name, { sync: true }) // update header\n// readStream.on(\"eof\", () => { readStream.end() }) // close tail stream\n// })\n// }\n let stx = readStream.pipe(es.split()).pipe(es.map((item, cb) => {\n this.parse(item, options).then((data) => {\n cb(null, data);\n })\n }))\n if (this.filter) stx = stx.pipe(es.filterSync(this.filter))\n if (this.map) stx = stx.pipe(es.mapSync((e) => {\n let mapped = this.map(e)\n let res = Object.assign({\"$\": mapped}, {tx: e.tx})\n if (e.blk) res.blk = e.blk\n return res\n }))\n // If 'size' is specified, create a batch stream\n if (size) {\n let batch = new BatchStream({ size : size });\n stx = stx.pipe(batch)\n }\n return stx;\n }\n }", "function File(stream) {\n this.stream = stream;\n this.closed = false;\n}", "function createSource(...args) {\n return new Source(...args)\n}", "function readFlowFiles($flow, callback) {\n\n var fileQueue = $flow.files;\n var filenames;\n var startTime = new Date().getTime();\n\n if (!(fileQueue instanceof Array)) {\n fileQueue = [fileQueue];\n }\n\n if (fileQueue.length > 0) { // if we still have files left\n\n filenames = _.pluck(fileQueue, 'name');\n\n async.eachSeries(fileQueue, function(file, next) {\n\n //var file = fileQueue.shift(); // remove first from queue and store in file\n var filename = file.name;\n\n file = file.file; // get blob from flowfile\n\n reader.onloadend = function(e) {\n\n var data = e.target.result; // binary\n var headers;\n var READER = XLSX;; // XLSX/XLS keep variable generic for reuse\n var wb;\n var ws;\n var errorMsg = 'Not a readable <em>.xlsx</em> file. Please make sure your workbook is saved as an <em>Excel</em> file with a single template worksheet.';\n var processSheet = function(wb) {\n // Good to go\n ws = wb.Sheets[_.keys(wb.Sheets)[0]];\n delete wb; // free up memory\n\n // Trim the headers\n if (typeof _.getByPath(ws, 'A1.v') === 'string') {\n ws.A1.v = ws.A1.v.trim();\n }\n if (typeof _.getByPath(ws, 'A1.w') === 'string') {\n ws.A1.w = ws.A1.w.trim();\n }\n\n return READER.utils.sheet_to_json(ws);\n };\n\n try {\n wb = READER.read(data, {\n type: 'binary'\n });\n ws = processSheet(wb);\n } catch (exception) {\n // XLSX doesn't throw a very informative exception\n try {\n READER = XLS;\n wb = READER.read(data, {\n type: 'binary'\n });\n ws = processSheet(wb);\n } catch (exception) {\n\n errorMsg =\n typeof exception === 'string' ? exception : exception.message;\n\n try {\n\n data = Papa.parse(data);\n headers = data.data.shift();\n\n if (!data.errors.length) {\n\n // @TODO should we async this for large files?...\n ws = _.map(data.data, function(row) {\n return _.object(headers, row);\n });\n\n } else {\n throw new Error('Errors parsing CSV string.');\n }\n } catch (exception) {\n\n errorMsg =\n typeof exception === 'string' ? exception : exception.message;\n }\n }\n }\n\n if (!ws) {\n alertify.notify(\n errorMsg,\n ' bubble-popover bubble-danger',\n 0\n );\n return; // cancel the operation\n }\n\n if (typeof callback !== 'undefined') {\n\n // args\n callback({\n ws: ws,\n filename: filename,\n READER: READER,\n next: next\n });\n\n } else {\n next();\n }\n\n // readFlowFiles(callback); // start next file\n };\n\n reader.readAsBinaryString(file);\n\n }, function() {\n\n $flow.cancel();\n\n alertify.alert(\n '<ul><h5>Finished processing the following files:</h5><li>'\n + filenames.join('</li><li>')\n + '</li></ul>'\n );\n\n });\n }\n }", "async createReadStream() {\n return fs.createReadStream(CategoryImportSummary.getFilePath(this.summary))\n }", "constructor(file) {\r\n this.file = file;\r\n this.initPromise = null;\r\n\r\n this.init();\r\n }", "constructor( filename )\r\n { super( \"position\", \"normal\", \"texture_coord\" );\r\n // Begin downloading the mesh. Once that completes, return\r\n // control to our parse_into_mesh function.\r\n this.load_file( filename );\r\n }", "constructor(scope, id, props) {\n super(scope, id, { type: CfnContactFlow.CFN_RESOURCE_TYPE_NAME, properties: props });\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_connect_CfnContactFlowProps(props);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, CfnContactFlow);\n }\n throw error;\n }\n cdk.requireProperty(props, 'content', this);\n cdk.requireProperty(props, 'instanceArn', this);\n cdk.requireProperty(props, 'name', this);\n cdk.requireProperty(props, 'type', this);\n this.attrContactFlowArn = cdk.Token.asString(this.getAtt('ContactFlowArn', cdk.ResolutionTypeHint.STRING));\n this.content = props.content;\n this.instanceArn = props.instanceArn;\n this.name = props.name;\n this.type = props.type;\n this.description = props.description;\n this.state = props.state;\n this.tags = new cdk.TagManager(cdk.TagType.STANDARD, \"AWS::Connect::ContactFlow\", props.tags, { tagPropertyName: 'tags' });\n }", "constructor (GRAMMAR_NAME) {\n Object.assign(this,\n JSON.parse(fs.readFileSync(new URL(`./types/${GRAMMAR_NAME}.json`, import.meta.url), 'utf8')\n )\n )\n }", "function sc_withInputFromFile(s, thunk) {\n throw \"can't open \" + s;\n}", "function createJSONFromFile( file ) {\n let fileName = file.substr( file.lastIndexOf(\"/\") + 1, file.length );\n console.log(\"Started reading file \" + file );\n let rawData = fs.readFileSync( file );\n console.log(\"Completed reading file \" + file );\n\n rawData = rawData.toString();\n\n // letious parameters for createJSONFromFile() function\n let newLineCharacter = /\\r\\n|\\n/;\n let delim = \",\";\n let isDataQuoted = false;\n let lines = rawData.split( newLineCharacter );\n let noOfLines = lines.length;\n let noOfCols = ( lines[0].split( delim) ).length;\n let noOfRows = 0;\n let processedData = [];\n for( let i = 0; i < noOfLines; i++ ) {\n let line = lines[i];\n if( line != null && line != '' && line.length != 0 ) {\n noOfRows ++;\n let tokens = line.split( delim );\n processedData.push( tokens ); // pushes a line of tokens, which is an array, into the processedData[] array\n }\n }\n\n\n\n\n // Create the graph specific JSONs\n createJSONForGraph123( processedData );\n createJSONForGraph2( processedData );\n createJSONForGraph3( processedData );\n createJSONForGraph1( processedData );\n\n\n} // End createJSONFromFile", "function Javascript(file) {\n \n this.file = file;\n}", "static fromFile(i18nFormat, path, encoding, optionalMasterFilePath) {\r\n const xmlContent = xml_reader_1.XmlReader.readXmlFileContent(path, encoding);\r\n const optionalMaster = TranslationMessagesFileReader.masterFileContent(optionalMasterFilePath, encoding);\r\n return ngx_i18nsupport_lib_1.TranslationMessagesFileFactory.fromFileContent(i18nFormat, xmlContent.content, path, xmlContent.encoding, optionalMaster);\r\n }", "function fileToObject(file) {\n return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, file, { lastModified: file.lastModified, lastModifiedDate: file.lastModifiedDate, name: file.name, size: file.size, type: file.type, uid: file.uid, percent: 0, originFileObj: file });\n}", "function SourceFile(context, node) {\n var _this = \n // start hack :(\n _super.call(this, context, node, undefined) || this;\n /** @internal */\n _this._isSaved = false;\n /** @internal */\n _this._modifiedEventContainer = new utils_1.EventContainer();\n /** @internal */\n _this._referenceContainer = new utils_1.SourceFileReferenceContainer(_this);\n _this.sourceFile = _this;\n return _this;\n // end hack\n }", "constructor(){\n\t\tthis.flowTree = [];\n\t\tthis.structure = {nodes: [], connections: [], transform: [1, 0, 0, 1, 0, 0]};\n\t\tthis._registeredNodes = {};\n\t}", "initFlow() {\n if (this.validateFlow() == SUCCESS.VALIDATED) {\n this.code = SUCCESS.VALIDATED;\n return this.createFlow();\n }\n return { isError: true, code: this.code, item: this.originalFlow };\n }", "static deserialize(fileString)\n {\n // split head and data parts\n let m = fileString.match(/[^\\n]*\\n/)\n if (m === null)\n throw new Error(\"File has bad format - head not found.\")\n let head = m[0]\n let data = fileString.slice(head.length)\n\n // check file version\n if (head != \"v1.0.0\\n\")\n throw new Error(\"File version is not compatible.\")\n\n // parse data\n data = JSON.parse(data)\n\n // load the file\n let file = new File()\n\n file.meta = data.meta\n file.accounts = data.accounts.map(x => Account.deserialize(x))\n file.transactions = data.transactions.map(\n x => Transaction.deserialize(x, file.getAccount.bind(file))\n )\n\n return file\n }", "function FakeFile(path)\n{\n this.path = path;\n}", "function hamlStream(file, cb) {\n options = _.clone(_options);\n if (file.isNull()) return cb(null, file); // pass along\n if (file.isStream()) return cb(new Error(\"gulp-haml-coffee: Streaming not supported\"));\n\n // gulp-haml-coffee compiles to plain HTML per default. If the `js` option is set,\n // it will compile to a JS function.\n var output;\n\n // Define the default module name by substracting \n // the fileBase from the filePath\n var filePath = path.normalize(file.path);\n var fileBase = path.normalize(file.base);\n var defaultModuleName = filePath.replace(fileBase, '');\n\n // If there is a function in options.name use it to \n // evaluate \n var evaluatedModuleName;\n if(options.name !== undefined && typeof options.name === 'function'){\n evaluatedModuleName = options.name(file)\n }else if(options.name !== undefined && typeof options.name === 'string'){\n evaluatedModuleName = options.name;\n }\n\n options.name = evaluatedModuleName || defaultModuleName;\n\n try {\n if (options.js) {\n output = hamlc.template(file.contents.toString(\"utf8\"), options.name, options.namespace, options);\n file.path = rext(file.path, \".js\");\n } else {\n output = hamlc.render(file.contents.toString(\"utf8\"), options.locals || {}, options);\n file.path = rext(file.path, \".html\");\n }\n } catch (e) {\n throw new gutil.PluginError('gulp-haml-coffee',\n 'Error compiling ' + file.path + ': ' + e, {\n showStack: true\n });\n }\n\n file.contents = new Buffer(output);\n\n cb(null, file);\n }", "function treeForFile (file) {\n var contents = null\n try {\n contents = fs.readFileSync(file).toString()\n } catch (err) {\n if (err.code === 'ENOENT') {\n logger.error(\"File not found: \"+file)\n process.exit(1)\n }\n throw err\n }\n var name = path.basename(file),\n parser = new Parser()\n\n parser.file = name\n // Parse and type-check the file; catch and report any errors\n try {\n var tree = parser.parse(contents),\n typesystem = new TypeSystem()\n typesystem.walk(tree)\n } catch (err) {\n reportError(err)\n process.exit(1)\n }\n return tree\n}// treeForFile", "function loadFile(file){\n\tlet fs = require('fs');\n\tlet content = fs.readFileSync(file);\n\tlet obj = JSON.parse(content);\n\treturn obj;\n}", "function openFile(file) {\n\tlet input = file.target;\n\toutput = document.getElementById('output');\n\tlet preview = document.getElementById('imagepreview');\n\tlet canvas = document.getElementById('canvas');\n\tlet context = canvas.getContext('2d');\n\tlet ctx = preview.getContext('2d');\n\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\tctx.clearRect(0, 0, preview.width, preview.height);\n let reader = new FileReader();\n reader.onload = function(){\n\t\t//reset state from previously loaded image\n\t\tlet dataURL = reader.result;\n\t\toutput.src = dataURL;\n\t\tobjNormals = [];\n\t\tobjVertices = [];\n\t\tobjFaces = [];\n\t\tobjMtl = [];\n\t};\n\tlet nameArr = input.files[0].name.split(\".\");\n\tfileName = nameArr[0];\n\treader.readAsDataURL(input.files[0]);\n\toutput.onload = function(){\n\t\tcanvasPosX = 0;\n\t\tcanvasPosY = 0;\n\t\tcanvasWidth = output.width;\n\t\tcanvasHeight = output.height;\n\t\tpreview.width = canvasWidth;\n\t\tpreview.height = canvasHeight;\n\t\tctx.drawImage(output, canvasPosX, canvasPosY);\n\t\tdocument.getElementById('convert').disabled = false;\n\t\tdocument.getElementById('save').disabled = true;\n\t\tdocument.getElementById('save-label').innerHTML = \"Ready to convert\";\n\t}\n }", "function loadFile(file){\n\t\tlet fs = require('fs');\n\t\tlet content = fs.readFileSync(file);\n\t\tlet obj = JSON.parse(content);\n\t\treturn obj;\n\t}", "function File() {\n\t/**\n\t * The data of a file.\n\t */\n\tthis.data = \"\";\n\t/**\n\t * The name of the file.\n\t */\n\tthis.name = \"\";\n}", "function File() {\n\t/**\n\t * The data of a file.\n\t */\n\tthis.data = \"\";\n\t/**\n\t * The name of the file.\n\t */\n\tthis.name = \"\";\n}", "constructor(line)\n {\n this.line = line;\n this.next = null;\n }", "constructor(scope, id, props) {\n super(scope, id, { type: CfnContactFlowModule.CFN_RESOURCE_TYPE_NAME, properties: props });\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_connect_CfnContactFlowModuleProps(props);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, CfnContactFlowModule);\n }\n throw error;\n }\n cdk.requireProperty(props, 'content', this);\n cdk.requireProperty(props, 'instanceArn', this);\n cdk.requireProperty(props, 'name', this);\n this.attrContactFlowModuleArn = cdk.Token.asString(this.getAtt('ContactFlowModuleArn', cdk.ResolutionTypeHint.STRING));\n this.attrStatus = cdk.Token.asString(this.getAtt('Status', cdk.ResolutionTypeHint.STRING));\n this.content = props.content;\n this.instanceArn = props.instanceArn;\n this.name = props.name;\n this.description = props.description;\n this.state = props.state;\n this.tags = new cdk.TagManager(cdk.TagType.STANDARD, \"AWS::Connect::ContactFlowModule\", props.tags, { tagPropertyName: 'tags' });\n }", "function loadTest (filename) {\n var content = fs.readFileSync(filename) + '';\n var parts = content.split(/\\n-----*\\n/);\n\n return {\n source: parts[0],\n compiled: parts[1],\n ast: parts[2],\n transformed: parts[3]\n };\n}", "static fromString(source, filename) {\n const ast = espree.parse(source, {\n ecmaVersion: 2017,\n sourceType: \"module\",\n loc: true,\n });\n return new TemplateExtractor(ast, filename || \"inline\", source);\n }", "constructor(filePath, schema = []) {\n super();\n this.files = new _map2.default();\n this.rules = new _map2.default();\n this.options = {};\n this.defaultOptions = {};\n this.optionSchema = new _map2.default();\n this.graphProperties = {};\n this.ruleClasses = [];\n this.processes = new _set2.default();\n this.targets = new _set2.default();\n this.graph = new _graphlib.Graph();\n this.optionProxies = {};\n const resolveFilePath = _path2.default.resolve(filePath);\n const { dir, base, name, ext } = _path2.default.parse(resolveFilePath);\n this.filePath = base;\n this.rootPath = dir;\n for (const option of schema) {\n this.optionSchema.set(option.name, option);\n for (const alias of option.aliases || []) {\n this.optionSchema.set(alias, option);\n }\n if (option.defaultValue) this.defaultOptions[option.name] = option.defaultValue;\n }\n this.assignOptions(this.defaultOptions);\n\n this.env = (0, _assign2.default)({}, process.env, {\n FILEPATH: base,\n ROOTDIR: dir,\n DIR: '.',\n BASE: base,\n NAME: name,\n EXT: ext\n });\n if (process.platform === 'win32') {\n (0, _assign2.default)(this.env, {\n HOME: process.env.USERPROFILE,\n PATH: process.env.Path\n });\n }\n }", "function createMatchStream(inputFilePath=getInputFilePath()) {\n try {\n const stream = fs.createReadStream(inputFilePath);\n return readFile(stream)\n } catch {\n throw new Error(\"File not found\");\n }\n}", "loadFile(file, module, x, y) {\n var dsp_code;\n var reader = new FileReader();\n var ext = file.name.toString().split('.').pop();\n var filename = file.name.toString().split('.').shift();\n var type;\n if (ext == \"dsp\") {\n type = \"dsp\";\n reader.readAsText(file);\n }\n else if (ext == \"json\") {\n type = \"json\";\n reader.readAsText(file);\n }\n else if (ext == \"jfaust\") {\n type = \"jfaust\";\n reader.readAsText(file);\n }\n else if (ext == \".polydsp\") {\n type = \"poly\";\n reader.readAsText(file);\n }\n else {\n throw new Error(Utilitary.messageRessource.errorObjectNotFaustCompatible);\n }\n reader.onloadend = (e) => {\n dsp_code = \"process = vgroup(\\\"\" + filename + \"\\\",environment{\" + reader.result + \"}.process);\";\n if (!module) {\n if (type == \"dsp\") {\n this.compileFaust({ isMidi: false, name: filename, sourceCode: dsp_code, x: x, y: y, callback: (factory) => { this.createModule(factory); } });\n }\n else if (type == \"jfaust\") {\n Utilitary.currentScene.recallScene(reader.result);\n }\n else if (type == \"poly\") {\n this.compileFaust({ isMidi: true, name: filename, sourceCode: dsp_code, x: x, y: y, callback: (factory) => { this.createModule(factory); } });\n }\n }\n else {\n if (type == \"dsp\") {\n module.isMidi = false;\n module.update(filename, dsp_code);\n }\n else if (type == \"jfaust\") {\n Utilitary.currentScene.recallScene(reader.result);\n }\n else if (type == \"poly\") {\n module.isMidi = true;\n module.update(filename, dsp_code);\n }\n }\n };\n }", "function makeDisplayFile(file)\n{\n displayNode = createFileDisplayBase(file);\n createFileDisplayTimeElements(displayNode, file);\n createFileDisplayNotes(displayNode, file);\n\n return displayNode[0];\n}", "handleTheFile(event) {\n event.preventDefault();\n if (this.inputFile.current.files[0] === undefined) { return; }\n\n // Confirm file extension and read the data as text\n console.log('Reading the file...');\n let fileName = this.inputFile.current.files[0].name;\n if (!fileName.endsWith('.asc')) {\n console.error('Error opening the file: Invalid file extension, .asc expected.');\n return;\n }\n let file = this.inputFile.current.files[0];\n let reader = new FileReader();\n reader.onload = (event) => {\n console.log('Done.');\n this.ParseTheData(event.target.result);\n }\n reader.onerror = () => {\n console.error('Error opening the file: Cannot read file.');\n return;\n }\n reader.readAsText(file);\n }", "function fileToObject(file) {\n return _objectSpread(_objectSpread({}, file), {}, {\n lastModified: file.lastModified,\n lastModifiedDate: file.lastModifiedDate,\n name: file.name,\n size: file.size,\n type: file.type,\n uid: file.uid,\n percent: 0,\n originFileObj: file\n });\n}", "constructor(filename) {\n super(\"position\", \"normal\", \"texture_coord\");\n // Begin downloading the mesh. Once that completes, return\n // control to our parse_into_mesh function.\n this.load_file(filename);\n }", "function File(filepath, html) {\n\n // If html argument has not been set, set to true\n if(html === undefined) html = true;\n\n // File properties\n this.filePath = filepath;\n this.fileName = this.getName();\n this.fileType = this.getType();\n this.fileExtension = this.getExtension();\n this.fileContents = '';\n this.fileContentsArray;\n\n // Read file\n // this.read(this.filePath, function(err, data) {\n // if(html) this.fileContents = replaceAll(data, ['<', '>'], ['&lt;', '&gt;']);\n // this.fileContentsArray = data.split('\\n');\n // }.bind(this));\n this.readSync(this.filePath, html);\n}", "async function dataFlowsCreate() {\n const subscriptionId =\n process.env[\"DATAFACTORY_SUBSCRIPTION_ID\"] || \"12345678-1234-1234-1234-12345678abc\";\n const resourceGroupName = process.env[\"DATAFACTORY_RESOURCE_GROUP\"] || \"exampleResourceGroup\";\n const factoryName = \"exampleFactoryName\";\n const dataFlowName = \"exampleDataFlow\";\n const dataFlow = {\n properties: {\n type: \"MappingDataFlow\",\n description:\n \"Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.\",\n scriptLines: [\n \"source(output(\",\n \"PreviousConversionRate as double,\",\n \"Country as string,\",\n \"DateTime1 as string,\",\n \"CurrentConversionRate as double\",\n \"),\",\n \"allowSchemaDrift: false,\",\n \"validateSchema: false) ~> USDCurrency\",\n \"source(output(\",\n \"PreviousConversionRate as double,\",\n \"Country as string,\",\n \"DateTime1 as string,\",\n \"CurrentConversionRate as double\",\n \"),\",\n \"allowSchemaDrift: true,\",\n \"validateSchema: false) ~> CADSource\",\n \"USDCurrency, CADSource union(byName: true)~> Union\",\n \"Union derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\",\n \"NewCurrencyColumn split(Country == 'USD',\",\n \"Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\",\n \"ConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\",\n \"ConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink\",\n ],\n sinks: [\n {\n name: \"USDSink\",\n dataset: { type: \"DatasetReference\", referenceName: \"USDOutput\" },\n },\n {\n name: \"CADSink\",\n dataset: { type: \"DatasetReference\", referenceName: \"CADOutput\" },\n },\n ],\n sources: [\n {\n name: \"USDCurrency\",\n dataset: {\n type: \"DatasetReference\",\n referenceName: \"CurrencyDatasetUSD\",\n },\n },\n {\n name: \"CADSource\",\n dataset: {\n type: \"DatasetReference\",\n referenceName: \"CurrencyDatasetCAD\",\n },\n },\n ],\n },\n };\n const credential = new DefaultAzureCredential();\n const client = new DataFactoryManagementClient(credential, subscriptionId);\n const result = await client.dataFlows.createOrUpdate(\n resourceGroupName,\n factoryName,\n dataFlowName,\n dataFlow\n );\n console.log(result);\n}", "constructor(signatureFile, nodeid) {\n this.parseSignatureFileBuffer(signatureFile);\n this.nodeId = nodeid;\n }", "setFile(file) {\n this.file = file;\n }", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n }", "function openSlpFile(input) {\n const ref = getRef(input);\n const rawDataPosition = getRawDataPosition(ref);\n const rawDataLength = getRawDataLength(ref, rawDataPosition);\n const metadataPosition = rawDataPosition + rawDataLength + 10; // remove metadata string\n\n const metadataLength = getMetadataLength(ref, metadataPosition);\n const messageSizes = getMessageSizes(ref, rawDataPosition);\n return {\n ref: ref,\n rawDataPosition: rawDataPosition,\n rawDataLength: rawDataLength,\n metadataPosition: metadataPosition,\n metadataLength: metadataLength,\n messageSizes: messageSizes\n };\n}", "function parse(file) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2\n /*return*/\n , new Promise(function (resolve, reject) {\n fs.readFile(file, 'utf8', function (err, data) {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(parseString(data));\n });\n })];\n });\n });\n }", "function ZFS(file) { const I = this // new ZFS(filename)\n I.file = file; I.open() // open .zip file\n}", "constructor(filePath, fs) {\n this.filePath = filePath;\n this.fs = fs;\n // TODO: Any other initialization that you need.\n this.categories = ['Category 1', 'Category 2', 'Category 3', 'Category 4', 'Category 5'];\n this.toDoList = [];\n this.finishedTasks = [];\n }", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createLexer(source, options) {\n var startOfFileToken = new Tok(TokenKind.SOF, 0, 0, 0, 0, null);\n var lexer = {\n source: source,\n options: options,\n lastToken: startOfFileToken,\n token: startOfFileToken,\n line: 1,\n lineStart: 0,\n advance: advanceLexer,\n lookahead: lookahead\n };\n return lexer;\n}", "function createFile() {\n var e = new emitter();\n\n fs.readFile('newdocument.txt', function (err) {\n if (err) throw err;\n e.emit('theProcess');\n });\n\n return e;\n}", "function File(filename,path){\n\tvar that=this;\n\tthis.filename = filename;\n\tthis.path = path;\n\tthis.created = Date.now();\n\tthis.last_run = null;\n\tthis.run_count = 0;\n\tfs.stat(path, function(err, stat) {\n\t\tif(err) {\n\t\t\tthrow err;\n\t\t}\n\t\tthat.size = stat.size;\n\t});\n\tfs.readFile(this.path, function (err, data) {\n\t\tthis.checksum = File.checksum(data);\n\t}.bind(this));\n}", "function loadFile(state, action){\n const data = action.payload;\n data['lastHistorySaved'] = 0;\n data['$selected'] = [];\n data['$pan'] = {x: 0, y:0};\n data['zoom'] = 1;\n data['history'] = {\n past: [],\n future: [],\n present: {\n historyId: 0,\n cells: JSON.parse(data.cells),\n }\n };\n\n const usedVariables = {};\n const $occupiedPorts = Immutable.Map().asMutable();\n for (let node of data.history.present.cells) {\n if(node.dfGui && node.dfGui.variableName){\n usedVariables[node.id] = node.dfGui.variableName;\n }\n\n if(node.type == \"link\"){\n if (!$occupiedPorts.get(node.target.id)) $occupiedPorts.set(node.target.id, Immutable.Set());\n $occupiedPorts.set(node.target.id, $occupiedPorts.get(node.target.id).add(node.target.port));\n }\n }\n\n data.history.present['usedVariables'] = usedVariables;\n\n delete data.cells;\n\n const indexOfNewFile = state.get('opened').size;\n\n let serializedData = Immutable.fromJS(data);\n serializedData = serializedData.setIn(['history', 'present', '$occupiedPorts'], $occupiedPorts.asImmutable());\n\n return state\n .update('opened', opened => opened.push(serializedData))\n .set('active', indexOfNewFile)\n}", "function FileAnalysis(path, analysis) {\n this.path = path;\n\n const cyclomatic = analysis.functions.map(f => f.cyclomatic);\n\n // Scale to between 0 and 100\n this.maintainability = Math.max(0, analysis.maintainability * 100 / 171);\n this.sloc = analysis.aggregate.sloc.logical;\n this.cyclomatic = {\n avg: utils.average(cyclomatic),\n max: utils.max(cyclomatic)\n };\n this.difficulty = analysis.aggregate.halstead.difficulty\n this.bugs = analysis.aggregate.halstead.bugs;\n\n this.functions = analysis.functions.map(f => ({\n name: f.name,\n line: f.line,\n params: f.params,\n sloc: f.sloc.logical,\n cyclomatic: f.cyclomatic,\n difficulty: f.halstead.difficulty,\n bugs: f.halstead.bugs\n }));\n\n Object.freeze(this);\n}" ]
[ "0.6166627", "0.57145196", "0.56857115", "0.562967", "0.5604891", "0.5471463", "0.5301391", "0.5241441", "0.5224979", "0.51904845", "0.5137636", "0.50957966", "0.5093447", "0.50872844", "0.50281215", "0.50156933", "0.49810165", "0.4952644", "0.49317124", "0.48863092", "0.48591173", "0.48585242", "0.48485574", "0.48285538", "0.48257622", "0.48236334", "0.48236334", "0.48152694", "0.47974706", "0.47893018", "0.4785965", "0.47788882", "0.4778157", "0.4768567", "0.4766046", "0.47426558", "0.4741864", "0.47349417", "0.473203", "0.47173032", "0.47173032", "0.47064412", "0.46906173", "0.46679476", "0.46563894", "0.4634976", "0.46321896", "0.46237996", "0.4619565", "0.46156883", "0.46070245", "0.46053421", "0.4603519", "0.46020427", "0.45825735", "0.45648038", "0.4550312", "0.4544751", "0.45349646", "0.4531421", "0.4524988", "0.4523177", "0.45128673", "0.4500211", "0.449089", "0.44809452", "0.44809452", "0.4479065", "0.4473806", "0.44727588", "0.4469846", "0.44643673", "0.4462447", "0.44497153", "0.44491717", "0.44473296", "0.44466105", "0.4444536", "0.4440586", "0.4432519", "0.4431401", "0.44257933", "0.44145787", "0.4409254", "0.4404247", "0.4378505", "0.43748885", "0.43742839", "0.43742839", "0.43742839", "0.43742839", "0.43742839", "0.43742839", "0.43742839", "0.43742839", "0.43742839", "0.43738055", "0.43657333", "0.4349666", "0.43489525" ]
0.70620036
0
Dummy function to be used by collect
static toArray(){ return "toArray"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collect() {}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "function collect_(self, f) {\n return core.map_(forEach.forEach_(self, a => optional(f(a))), Chunk.compact);\n}", "function collect(f) {\n return self => collect_(self, f);\n}", "function Dummy() {}", "function Dummy() {}", "function createCollector() {\n var keepCollecting = true;\n return function (nextResult, defaultValue) {\n if (keepCollecting && nextResult !== undefined) {\n return nextResult;\n }\n keepCollecting = false;\n return defaultValue;\n };\n}", "function collect(gen, array) {\n return function () {\n var value = gen();\n if (value !== undefined) {\n array.push(value);\n };\n return value;\n };\n}", "function _noop(){}", "function collect(collector, collected)\n{\n collected.remove();\n}", "function _noop() {\n return () => {};\n}", "function collectAllWith(pf, __trace) {\n return as => collectAllWith_(as, pf, __trace);\n}", "function Nothing$prototype$reduce(f, x) {\n return x;\n }", "function _noop$1() {}", "function emptyFn() {\n return function () {};\n }", "filter() {\n\t}", "filter() {\n\t}", "function noop() { console.log(/* dummy function*/); }", "function noop () { }", "function noop () { }", "function noop () { }", "function noop () { }", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function emptyFunction() { // 306\n // dummy // 307\n } // 308", "function Nothing$prototype$map(f) {\n return this;\n }", "function collectPar_(self, f) {\n return core.map_(forEach.forEachPar_(self, a => optional(f(a))), Chunk.compact);\n}", "function ForEach() {}", "function collectPar(f) {\n return self => collectPar_(self, f);\n}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}" ]
[ "0.73877877", "0.66418546", "0.66418546", "0.66418546", "0.66349894", "0.66349894", "0.66349894", "0.64273256", "0.6314596", "0.6117025", "0.6117025", "0.59968644", "0.57376856", "0.57353544", "0.5720762", "0.5706844", "0.56929576", "0.56698734", "0.5658614", "0.5657462", "0.56565505", "0.56565505", "0.5598642", "0.5580211", "0.5580211", "0.5580211", "0.5580211", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.55457485", "0.55457485", "0.55457485", "0.55457485", "0.55457485", "0.55457485", "0.55457485", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55028486", "0.5468655", "0.5466136", "0.5458567", "0.54574656", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493" ]
0.0
-1
Dummy function to be used by collect
static toSet(){ return "toSet" }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collect() {}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "function dummy(){}", "function dummy(){}", "function dummy(){}", "function collect_(self, f) {\n return core.map_(forEach.forEach_(self, a => optional(f(a))), Chunk.compact);\n}", "function collect(f) {\n return self => collect_(self, f);\n}", "function Dummy() {}", "function Dummy() {}", "function createCollector() {\n var keepCollecting = true;\n return function (nextResult, defaultValue) {\n if (keepCollecting && nextResult !== undefined) {\n return nextResult;\n }\n keepCollecting = false;\n return defaultValue;\n };\n}", "function collect(gen, array) {\n return function () {\n var value = gen();\n if (value !== undefined) {\n array.push(value);\n };\n return value;\n };\n}", "function _noop(){}", "function collect(collector, collected)\n{\n collected.remove();\n}", "function _noop() {\n return () => {};\n}", "function collectAllWith(pf, __trace) {\n return as => collectAllWith_(as, pf, __trace);\n}", "function Nothing$prototype$reduce(f, x) {\n return x;\n }", "function _noop$1() {}", "function emptyFn() {\n return function () {};\n }", "filter() {\n\t}", "filter() {\n\t}", "function noop() { console.log(/* dummy function*/); }", "function noop () { }", "function noop () { }", "function noop () { }", "function noop () { }", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function noop () {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function _noop() {}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function noop(){}", "function emptyFunction() { // 306\n // dummy // 307\n } // 308", "function Nothing$prototype$map(f) {\n return this;\n }", "function collectPar_(self, f) {\n return core.map_(forEach.forEachPar_(self, a => optional(f(a))), Chunk.compact);\n}", "function ForEach() {}", "function collectPar(f) {\n return self => collectPar_(self, f);\n}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}", "function noop() {}" ]
[ "0.73877877", "0.66418546", "0.66418546", "0.66418546", "0.66349894", "0.66349894", "0.66349894", "0.64273256", "0.6314596", "0.6117025", "0.6117025", "0.59968644", "0.57376856", "0.57353544", "0.5720762", "0.5706844", "0.56929576", "0.56698734", "0.5658614", "0.5657462", "0.56565505", "0.56565505", "0.5598642", "0.5580211", "0.5580211", "0.5580211", "0.5580211", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.5549118", "0.55457485", "0.55457485", "0.55457485", "0.55457485", "0.55457485", "0.55457485", "0.55457485", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55056983", "0.55028486", "0.5468655", "0.5466136", "0.5458567", "0.54574656", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493", "0.5436493" ]
0.0
-1
Dummy function to be used by OrderBy
static ASC(){ return "ASC"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOrderBy() {}", "get overrideSorting() {}", "sort() {\n\t}", "sort() {\n\t}", "repeaterOnSort() {\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DESC' : 'ASC'\n\n let sort = fn && fn(key, sortOpts)\n\n if( !sort && sort !== false )\n sort = `${this.db.escapeId(key)} ${desc}`\n \n if( sort )\n orderBy.push(sort)\n })\n\n return orderBy.length > 0 ? 'ORDER BY '+orderBy.join(', ') : ''\n }", "sortProducts() {}", "function sortByFunc() {\n switch (sortBy.field) {\n case 'name':\n case 'ticker':\n if (sortBy.desc === 0) {\n return (a, b) => a[sortBy.field].localeCompare(b[sortBy.field])\n }\n return (a, b) => b[sortBy.field].localeCompare(a[sortBy.field])\n case 'price':\n case 'changes':\n case 'marketCapitalization':\n default:\n if (sortBy.desc === 0) {\n return (a, b) => (a[sortBy.field] - b[sortBy.field])\n }\n return (a, b) => (b[sortBy.field] - a[sortBy.field])\n }\n }", "function pr_asc(){\n console.log('Sort by Price Asc');\n myLibrary.sortByPriceAsc();\n}", "sortBy() {\n // YOUR CODE HERE\n }", "sorted(x) {\n super.sorted(0, x);\n }", "function defaultOrderFn (a, b) {\n return a - b; // asc order\n}", "static DEFAULT_SORT_BY_FIELD(){ return \"description\"}", "function Sort() {}", "sortBy({ value }) {\n\n }", "function dummy(){}", "function dummy(){}", "function dummy(){}", "sort(){\n\n }", "asc(field) {\r\n\t\treturn this.push('asc', [...arguments]);\r\n\t}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "Sort() {\n\n }", "genSortAscendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = -1\n if (valA > valB) order = 1\n return order\n }\n }", "get sortingOrder() {}", "get order() {}", "get order() {}", "function pr_desc(){\n console.log('Sort by Price Desc: ');\n myLibrary.sortByPriceDesc();\n}", "function orderByYear() {\n \n}", "filterAndSortDataByYear () {\n }", "function orderAlphabetically() {}", "comparator(todo) {\n return todo.get('order');\n }", "function Order() {\n}", "[Symbol.iterator]() {\n return this.inOrder();\n }", "set overrideSorting(value) {}", "sort(comparator) {\n }", "function sortFunction(val){\n return val.sort();\n}", "function sortFruitMarketTableByFruitNameAndPrice() {\n\n}", "sortedItems() {\n if (!this.sortField) return this.itemsToSort;\n return orderBy(this.itemsToSort, [this.sortField], [this.sortOrder]);\n }", "prepareSort(orderBy, allowed_cols, tableAlias, excludeOrder = false, validatedAggAliases) {\n let column_names = this.column_names.slice(0);\n const throwErr = () => {\n throw \"\\nInvalid orderBy option -> \" + JSON.stringify(orderBy) +\n \"\\nExpecting { key2: false, key1: true } | { key1: 1, key2: -1 } | [{ key1: true }, { key2: false }] | [{ key1: 1 }, { key2: -1 }]\";\n }, parseOrderObj = (orderBy, expectOne = false) => {\n if (!isPlainObject(orderBy))\n return throwErr();\n if (expectOne && Object.keys(orderBy).length > 1)\n throw \"\\nInvalid orderBy \" + JSON.stringify(orderBy) +\n \"\\nEach orderBy array element cannot have more than one key\";\n /* { key2: bool, key1: bool } */\n if (!Object.values(orderBy).find(v => ![true, false].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: Boolean(orderBy[key]) }));\n }\n else if (!Object.values(orderBy).find(v => ![-1, 1].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: orderBy[key] === 1 }));\n }\n else if (!Object.values(orderBy).find(v => ![\"asc\", \"desc\"].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: orderBy[key] === \"asc\" }));\n }\n else\n return throwErr();\n };\n if (!orderBy)\n return \"\";\n let allowedFields = [];\n if (allowed_cols) {\n allowedFields = this.parseFieldFilter(allowed_cols);\n }\n let _ob = [];\n if (isPlainObject(orderBy)) {\n _ob = parseOrderObj(orderBy);\n }\n else if (typeof orderBy === \"string\") {\n /* string */\n _ob = [{ key: orderBy, asc: true }];\n }\n else if (Array.isArray(orderBy)) {\n /* Order by is formed of a list of ascending field names */\n let _orderBy = orderBy;\n if (_orderBy && !_orderBy.find(v => typeof v !== \"string\")) {\n /* [string] */\n _ob = _orderBy.map(key => ({ key, asc: true }));\n }\n else if (_orderBy.find(v => isPlainObject(v) && Object.keys(v).length)) {\n if (!_orderBy.find(v => typeof v.key !== \"string\" || typeof v.asc !== \"boolean\")) {\n /* [{ key, asc }] */\n _ob = Object.freeze(_orderBy);\n }\n else {\n /* [{ [key]: asc }] | [{ [key]: -1 }] */\n _ob = _orderBy.map(v => parseOrderObj(v, true)[0]);\n }\n }\n else\n return throwErr();\n }\n else\n return throwErr();\n if (!_ob || !_ob.length)\n return \"\";\n let bad_param = _ob.find(({ key }) => !(validatedAggAliases || []).includes(key) &&\n (!column_names.includes(key) ||\n (allowedFields.length && !allowedFields.includes(key))));\n if (!bad_param) {\n return (excludeOrder ? \"\" : \" ORDER BY \") + (_ob.map(({ key, asc }) => `${tableAlias ? pgp.as.format(\"$1:name.\", tableAlias) : \"\"}${pgp.as.format(\"$1:name\", key)} ${asc ? \" ASC \" : \" DESC \"}`).join(\", \"));\n }\n else {\n throw \"Unrecognised orderBy fields or params: \" + bad_param.key;\n }\n }", "_dynamicSort(property) {\n let sortOrder = 1;\n\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n let result = (a['attributes'][property] < b['attributes'][property]) ? -1 :\n (a['attributes'][property] > b['attributes'][property]) ? 1 : 0;\n return result * sortOrder;\n };\n }", "genSortDescendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = 1\n if (valA > valB) order = -1\n return order\n }\n }", "function sortTableAlphabeticallyAscending(){\n sortAlphabeticallyAscending();\n}", "function orderNatural() {\n sortFunc = null;\n return groupObj;\n }", "function orderBy(a, b) {\n return (a == b) ? 0 : (a > b) ? 1 : -1;\n}", "function sortResults(){\n return sort.sortCustomerRecords(result);\n}", "sortBy(field, reverse, primer) \n {\n const key = primer\n ? function(x) {\n return primer(x[field]);\n }\n : function(x) {\n return x[field];\n };\n\n return function(a, b) {\n a = key(a);\n b = key(b);\n return reverse * ((a > b) - (b > a));\n };\n }", "sortBy(collection, functionOrKey) {\n return collection.sort((a, b) => {\n if (typeof functionOrKey === \"function\") {\n return functionOrKey(a) < functionOrKey(b) ? -1 : 1;\n }\n return a[functionOrKey] < b[functionOrKey] ? -1 : 1;\n });\n }", "clearOrderBy() {\n return new SelectQueryBuilder({\n ...this.#props,\n queryNode: SelectQueryNode.cloneWithoutOrderBy(this.#props.queryNode),\n });\n }", "comparator(todo) {\n\t\treturn todo.get('order');\n\t}", "get orderBy() {\n if (this._orderBy instanceof Function)\n return this._orderBy(this.entityMetadata.createPropertiesMap());\n return this._orderBy;\n }", "dynamicSort(property) {\n var sortOrder = 1;\n //check for \"-\" operator and sort asc/desc depending on that\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result =\n a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;\n return result * sortOrder;\n };\n }", "function sortData (data) {\n ...\n}", "function GetSortOrder(prop) { \n return function(a, b) { \n if (a[prop] > b[prop]) { \n return 1; \n } else if (a[prop] < b[prop]) { \n return -1; \n } \n return 0; \n } \n }", "getTopOrderingKey() {\n return {\n date: new Date(2200, 0),\n id: ''\n };\n }", "function Dummy() {}", "function Dummy() {}", "function _fakeSort() {\n var resultsEls = $( '.all-results .search-result-full' ).get();\n var sortOn = this.attributes[\"sort-trigger\"].value;\n\n // toggle the classes\n $( '.search-results-order .selected' ).removeClass('selected');\n $( this ).addClass('selected');\n\n // change our parent sort val\n $( '.search-step-3' ).attr('sort', sortOn);\n\n $( resultsEls.reverse() ).each(function() {\n $(this).detach().appendTo('.all-results');\n });\n }", "function sortBy(value) {\n if ($scope.sort[value] === null) {\n $scope.sort.first = null;\n $scope.sort.last = null;\n $scope.sort.company = null;\n $scope.sort.address = null;\n $scope.sort[value] = true;\n } else {\n $scope.sort[value] = !$scope.sort[value];\n }\n }", "function invalidSortFunction(a, b) {\n return 'bad'\n}", "render(table) {\n console.log('Applying 3rd partys better sort.');\n }", "defaultSortBy(a, b) {\n let me = this;\n\n a = a[me.property];\n b = b[me.property];\n\n if (me.useTransformValue) {\n a = me.transformValue(a);\n b = me.transformValue(b);\n }\n\n if (a > b) {\n return 1 * me.directionMultiplier;\n }\n\n if (a < b) {\n return -1 * me.directionMultiplier;\n }\n\n return 0;\n }", "order(by) {\n if (typeof by === 'string') {\n by = {[by]: 'desc'};\n }\n return this.spawn().applyOrder(by);\n }", "onHandleSort(event) {\n const { fieldName: sortedBy, sortDirection } = event.detail;\n const cloneData = [...this.data];\n\n cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));\n this.data = cloneData;\n this.sortDirection = sortDirection;\n this.sortedBy = sortedBy;\n }", "function qsortBy(cmp, l){\r\n return foldr(function(a, b){ return insertBy(cmp, a, b) }, emptyListOf(l), l);\r\n}", "set order(value) {}", "set order(value) {}", "sort() {\r\n\t\treturn this.data.sort((a,b) => {\r\n\t\t\tfor(var i=0; i < this.definition.length; i++) {\r\n\t\t\t\tconst [code, key] = this.definition[i];\r\n\t\t\t\tswitch(code) {\r\n\t\t\t\t\tcase 'asc':\r\n\t\t\t\t\tcase 'desc':\r\n\t\t\t\t\t\tif (a[key] > b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? 1 : -1;\r\n\t\t\t\t\t\tif (a[key] < b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? -1 : 1;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'fn':\r\n\t\t\t\t\t\tlet result = key(a, b);\r\n\t\t\t\t\t\tif (result != 0) // If it's zero the sort wasn't decided.\r\n\t\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t});\r\n\t}", "set sortingOrder(value) {}", "sortBy(field, reverse, primer) {\n\t\tconst key = primer\n\t\t\t? function (x) {\n\t\t\t\treturn primer(x[field]);\n\t\t\t}\n\t\t\t: function (x) {\n\t\t\t\treturn x[field];\n\t\t\t};\n\t\n\t\treturn function (a, b) {\n\t\t\ta = key(a);\n\t\t\tb = key(b);\n\t\t\treturn reverse * ((a > b) - (b > a));\n\t\t};\n\t}", "function updateSortFunction() {\n switch(sortBy.value) {\n case '0': // receiverId increasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent <\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n case '1': // receiverId decreasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent >\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n }\n sortReceiversAndHighlight();\n}", "function sortable(predicate) {\n return function (obj) {\n if (predicate == 'moving_time')\n return moment.duration(obj[predicate]);\n return obj[predicate];\n };\n }", "function sortArrayAscByItem(){\r\n return function(obj1, obj2){\r\n if (obj1.itemText > obj2.itemText) return 1;\r\n if (obj1.itemText < obj2.itemText) return -1;\r\n return 0;\r\n }\r\n}", "function orderByDuration (){\n return []\n}", "static finalSort(a, b){ return 0 }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function initialSort() {\n var column, direction;\n column = $j('#paginationSort').val() || '';\n column = column.match(/none/) ? '' : column;\n direction = ($j('#paginationSortOrder').val() || '').match(/desc|false/) ? desc : asc\n return { column: column, direction: direction };\n }", "function save_first_order() {\n\n var original_value = {};\n return function(chart) {\n chart.group().all().forEach(function(kv) {\n original_value[kv.key] = kv.value;\n });\n chart.ordering(function(kv) {\n return -original_value[kv.key];\n });\n };\n }", "function getDefaultSorter(colName) {\n\t\treturn function(a, b, dir){\n\n\t\t\tvar \n\t\t\t\tfirstRec = dir == 'asc' ? a : b,\n\t\t\t\tsecondRec = dir == 'asc' ? b : a,\n\n\t\t\t\tfA = firstRec[colName].toLowerCase(),\n\t\t\t\tfB = secondRec[colName].toLowerCase();\n\n\t\t\t// Handle numbers\n\t\t\tif (fA<fB) return -1\n\t\t\tif (fA>fB) return +1\n\t\t\treturn 0\n\t\t};\n\t}", "function validateNoPreviousOrderByCall(query, fnName) {\n if (query._orderByCalled === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n}", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] > b[property]) \n return 1; \n else if(a[property] < b[property]) \n return -1; \n \n return 0; \n } \n}", "static get order() { throw new Error('unimplemented - must use a concrete class'); }", "function sortByMathAsc()\n{\n let tBody = document.getElementById(\"tBody\");\n tBody.innerHTML = \"\"\n sortBySubjectAsc(dataBase, \"maths\")\n // sortBySubjectDsc(dataBase, \"maths\")\n createTable(dataBase)\n}", "_orderSort(l, r) {\n return l.order - r.order;\n }", "_resetOldSorting() {\n const rowChildren = this.shadowRoot.querySelectorAll('.th[sorted]');\n rowChildren.forEach((el) => el.removeAttribute('sorted'));\n }", "function sort(arr) {\n return null; \n}", "function sort () {\n index++;\n predicate = ng.isFunction(getter(scope)) ? getter(scope) : attr.stSort;\n if (index % 3 === 0 && attr.stSkipNatural === undefined) {\n //manual reset\n index = 0;\n ctrl.tableState().sort = {};\n ctrl.tableState().pagination.start = 0;\n ctrl.pipe();\n } else {\n ctrl.sortBy(predicate, index % 2 === 0);\n }\n }", "function diliverd(a)\n{\n a.getOrder= false;\n\n}", "function sortBy(prop){\r\n return function(a,b){\r\n if( a[prop] > b[prop]){\r\n return 1;\r\n }else if( a[prop] < b[prop] ){\r\n return -1;\r\n }\r\n return 0;\r\n }\r\n}", "constructor(order, sorted){ \n this.order = order\n this.sorted = sorted\n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "getStandardOrder() {\n return [ ['fullName', 'ASC'] ];\n }", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "applyFiltersAndSorts() {\n var list = this.props.list.filter(this.matchesFilterEnergyLevel);\n list = list.filter(this.matchesFilterFunLevel)\n var sort_type = this.getSortFunction()\n if(sort_type != null){\n list = list.sort(sort_type)\n }\n return list\n\n }" ]
[ "0.6982649", "0.62106574", "0.60469484", "0.60469484", "0.5973395", "0.5899146", "0.5852469", "0.58466953", "0.58419573", "0.5827838", "0.5808664", "0.5788289", "0.5765332", "0.5756178", "0.5754691", "0.5651835", "0.5651835", "0.5651835", "0.5647551", "0.56164104", "0.55990803", "0.55990803", "0.55990803", "0.55685854", "0.5565787", "0.55644417", "0.5547609", "0.5547609", "0.5406987", "0.5406003", "0.5401251", "0.5382759", "0.53809863", "0.53660166", "0.53620386", "0.534507", "0.53409725", "0.5317527", "0.5309201", "0.52761716", "0.52590835", "0.5254138", "0.52540195", "0.52532864", "0.5247433", "0.5241473", "0.52396697", "0.5233567", "0.52308166", "0.52175885", "0.5201558", "0.5196815", "0.5194945", "0.5194592", "0.517643", "0.5155105", "0.51516545", "0.51516545", "0.5149239", "0.51402885", "0.51251435", "0.5116745", "0.51015115", "0.5082808", "0.5076792", "0.50705266", "0.50597084", "0.50597084", "0.5057275", "0.5055152", "0.5053779", "0.5048392", "0.5046658", "0.5044709", "0.5038769", "0.503234", "0.50285155", "0.50285155", "0.5025968", "0.5025431", "0.5023474", "0.5023115", "0.5012162", "0.50052595", "0.50047773", "0.49993762", "0.49803343", "0.4975694", "0.49662519", "0.496388", "0.49559307", "0.49529982", "0.49511814", "0.49511814", "0.4944453", "0.49325326", "0.49325326", "0.49325326", "0.49325326", "0.4931373" ]
0.52609926
40
Dummy function to be used by OrderBy
static DESC(){ return "DESC"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOrderBy() {}", "get overrideSorting() {}", "sort() {\n\t}", "sort() {\n\t}", "repeaterOnSort() {\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DESC' : 'ASC'\n\n let sort = fn && fn(key, sortOpts)\n\n if( !sort && sort !== false )\n sort = `${this.db.escapeId(key)} ${desc}`\n \n if( sort )\n orderBy.push(sort)\n })\n\n return orderBy.length > 0 ? 'ORDER BY '+orderBy.join(', ') : ''\n }", "sortProducts() {}", "function sortByFunc() {\n switch (sortBy.field) {\n case 'name':\n case 'ticker':\n if (sortBy.desc === 0) {\n return (a, b) => a[sortBy.field].localeCompare(b[sortBy.field])\n }\n return (a, b) => b[sortBy.field].localeCompare(a[sortBy.field])\n case 'price':\n case 'changes':\n case 'marketCapitalization':\n default:\n if (sortBy.desc === 0) {\n return (a, b) => (a[sortBy.field] - b[sortBy.field])\n }\n return (a, b) => (b[sortBy.field] - a[sortBy.field])\n }\n }", "function pr_asc(){\n console.log('Sort by Price Asc');\n myLibrary.sortByPriceAsc();\n}", "sortBy() {\n // YOUR CODE HERE\n }", "sorted(x) {\n super.sorted(0, x);\n }", "function defaultOrderFn (a, b) {\n return a - b; // asc order\n}", "static DEFAULT_SORT_BY_FIELD(){ return \"description\"}", "function Sort() {}", "sortBy({ value }) {\n\n }", "function dummy(){}", "function dummy(){}", "function dummy(){}", "sort(){\n\n }", "asc(field) {\r\n\t\treturn this.push('asc', [...arguments]);\r\n\t}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "Sort() {\n\n }", "get sortingOrder() {}", "genSortAscendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = -1\n if (valA > valB) order = 1\n return order\n }\n }", "get order() {}", "get order() {}", "function orderByYear() {\n \n}", "function pr_desc(){\n console.log('Sort by Price Desc: ');\n myLibrary.sortByPriceDesc();\n}", "filterAndSortDataByYear () {\n }", "function orderAlphabetically() {}", "comparator(todo) {\n return todo.get('order');\n }", "function Order() {\n}", "[Symbol.iterator]() {\n return this.inOrder();\n }", "set overrideSorting(value) {}", "sort(comparator) {\n }", "function sortFunction(val){\n return val.sort();\n}", "function sortFruitMarketTableByFruitNameAndPrice() {\n\n}", "sortedItems() {\n if (!this.sortField) return this.itemsToSort;\n return orderBy(this.itemsToSort, [this.sortField], [this.sortOrder]);\n }", "static ASC(){\n return \"ASC\";\n }", "prepareSort(orderBy, allowed_cols, tableAlias, excludeOrder = false, validatedAggAliases) {\n let column_names = this.column_names.slice(0);\n const throwErr = () => {\n throw \"\\nInvalid orderBy option -> \" + JSON.stringify(orderBy) +\n \"\\nExpecting { key2: false, key1: true } | { key1: 1, key2: -1 } | [{ key1: true }, { key2: false }] | [{ key1: 1 }, { key2: -1 }]\";\n }, parseOrderObj = (orderBy, expectOne = false) => {\n if (!isPlainObject(orderBy))\n return throwErr();\n if (expectOne && Object.keys(orderBy).length > 1)\n throw \"\\nInvalid orderBy \" + JSON.stringify(orderBy) +\n \"\\nEach orderBy array element cannot have more than one key\";\n /* { key2: bool, key1: bool } */\n if (!Object.values(orderBy).find(v => ![true, false].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: Boolean(orderBy[key]) }));\n }\n else if (!Object.values(orderBy).find(v => ![-1, 1].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: orderBy[key] === 1 }));\n }\n else if (!Object.values(orderBy).find(v => ![\"asc\", \"desc\"].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: orderBy[key] === \"asc\" }));\n }\n else\n return throwErr();\n };\n if (!orderBy)\n return \"\";\n let allowedFields = [];\n if (allowed_cols) {\n allowedFields = this.parseFieldFilter(allowed_cols);\n }\n let _ob = [];\n if (isPlainObject(orderBy)) {\n _ob = parseOrderObj(orderBy);\n }\n else if (typeof orderBy === \"string\") {\n /* string */\n _ob = [{ key: orderBy, asc: true }];\n }\n else if (Array.isArray(orderBy)) {\n /* Order by is formed of a list of ascending field names */\n let _orderBy = orderBy;\n if (_orderBy && !_orderBy.find(v => typeof v !== \"string\")) {\n /* [string] */\n _ob = _orderBy.map(key => ({ key, asc: true }));\n }\n else if (_orderBy.find(v => isPlainObject(v) && Object.keys(v).length)) {\n if (!_orderBy.find(v => typeof v.key !== \"string\" || typeof v.asc !== \"boolean\")) {\n /* [{ key, asc }] */\n _ob = Object.freeze(_orderBy);\n }\n else {\n /* [{ [key]: asc }] | [{ [key]: -1 }] */\n _ob = _orderBy.map(v => parseOrderObj(v, true)[0]);\n }\n }\n else\n return throwErr();\n }\n else\n return throwErr();\n if (!_ob || !_ob.length)\n return \"\";\n let bad_param = _ob.find(({ key }) => !(validatedAggAliases || []).includes(key) &&\n (!column_names.includes(key) ||\n (allowedFields.length && !allowedFields.includes(key))));\n if (!bad_param) {\n return (excludeOrder ? \"\" : \" ORDER BY \") + (_ob.map(({ key, asc }) => `${tableAlias ? pgp.as.format(\"$1:name.\", tableAlias) : \"\"}${pgp.as.format(\"$1:name\", key)} ${asc ? \" ASC \" : \" DESC \"}`).join(\", \"));\n }\n else {\n throw \"Unrecognised orderBy fields or params: \" + bad_param.key;\n }\n }", "_dynamicSort(property) {\n let sortOrder = 1;\n\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n let result = (a['attributes'][property] < b['attributes'][property]) ? -1 :\n (a['attributes'][property] > b['attributes'][property]) ? 1 : 0;\n return result * sortOrder;\n };\n }", "genSortDescendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = 1\n if (valA > valB) order = -1\n return order\n }\n }", "function sortTableAlphabeticallyAscending(){\n sortAlphabeticallyAscending();\n}", "function orderNatural() {\n sortFunc = null;\n return groupObj;\n }", "function orderBy(a, b) {\n return (a == b) ? 0 : (a > b) ? 1 : -1;\n}", "function sortResults(){\n return sort.sortCustomerRecords(result);\n}", "sortBy(field, reverse, primer) \n {\n const key = primer\n ? function(x) {\n return primer(x[field]);\n }\n : function(x) {\n return x[field];\n };\n\n return function(a, b) {\n a = key(a);\n b = key(b);\n return reverse * ((a > b) - (b > a));\n };\n }", "sortBy(collection, functionOrKey) {\n return collection.sort((a, b) => {\n if (typeof functionOrKey === \"function\") {\n return functionOrKey(a) < functionOrKey(b) ? -1 : 1;\n }\n return a[functionOrKey] < b[functionOrKey] ? -1 : 1;\n });\n }", "clearOrderBy() {\n return new SelectQueryBuilder({\n ...this.#props,\n queryNode: SelectQueryNode.cloneWithoutOrderBy(this.#props.queryNode),\n });\n }", "comparator(todo) {\n\t\treturn todo.get('order');\n\t}", "get orderBy() {\n if (this._orderBy instanceof Function)\n return this._orderBy(this.entityMetadata.createPropertiesMap());\n return this._orderBy;\n }", "dynamicSort(property) {\n var sortOrder = 1;\n //check for \"-\" operator and sort asc/desc depending on that\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result =\n a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;\n return result * sortOrder;\n };\n }", "function sortData (data) {\n ...\n}", "function GetSortOrder(prop) { \n return function(a, b) { \n if (a[prop] > b[prop]) { \n return 1; \n } else if (a[prop] < b[prop]) { \n return -1; \n } \n return 0; \n } \n }", "getTopOrderingKey() {\n return {\n date: new Date(2200, 0),\n id: ''\n };\n }", "function Dummy() {}", "function Dummy() {}", "function _fakeSort() {\n var resultsEls = $( '.all-results .search-result-full' ).get();\n var sortOn = this.attributes[\"sort-trigger\"].value;\n\n // toggle the classes\n $( '.search-results-order .selected' ).removeClass('selected');\n $( this ).addClass('selected');\n\n // change our parent sort val\n $( '.search-step-3' ).attr('sort', sortOn);\n\n $( resultsEls.reverse() ).each(function() {\n $(this).detach().appendTo('.all-results');\n });\n }", "function sortBy(value) {\n if ($scope.sort[value] === null) {\n $scope.sort.first = null;\n $scope.sort.last = null;\n $scope.sort.company = null;\n $scope.sort.address = null;\n $scope.sort[value] = true;\n } else {\n $scope.sort[value] = !$scope.sort[value];\n }\n }", "function invalidSortFunction(a, b) {\n return 'bad'\n}", "render(table) {\n console.log('Applying 3rd partys better sort.');\n }", "defaultSortBy(a, b) {\n let me = this;\n\n a = a[me.property];\n b = b[me.property];\n\n if (me.useTransformValue) {\n a = me.transformValue(a);\n b = me.transformValue(b);\n }\n\n if (a > b) {\n return 1 * me.directionMultiplier;\n }\n\n if (a < b) {\n return -1 * me.directionMultiplier;\n }\n\n return 0;\n }", "order(by) {\n if (typeof by === 'string') {\n by = {[by]: 'desc'};\n }\n return this.spawn().applyOrder(by);\n }", "onHandleSort(event) {\n const { fieldName: sortedBy, sortDirection } = event.detail;\n const cloneData = [...this.data];\n\n cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));\n this.data = cloneData;\n this.sortDirection = sortDirection;\n this.sortedBy = sortedBy;\n }", "function qsortBy(cmp, l){\r\n return foldr(function(a, b){ return insertBy(cmp, a, b) }, emptyListOf(l), l);\r\n}", "set order(value) {}", "set order(value) {}", "sort() {\r\n\t\treturn this.data.sort((a,b) => {\r\n\t\t\tfor(var i=0; i < this.definition.length; i++) {\r\n\t\t\t\tconst [code, key] = this.definition[i];\r\n\t\t\t\tswitch(code) {\r\n\t\t\t\t\tcase 'asc':\r\n\t\t\t\t\tcase 'desc':\r\n\t\t\t\t\t\tif (a[key] > b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? 1 : -1;\r\n\t\t\t\t\t\tif (a[key] < b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? -1 : 1;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'fn':\r\n\t\t\t\t\t\tlet result = key(a, b);\r\n\t\t\t\t\t\tif (result != 0) // If it's zero the sort wasn't decided.\r\n\t\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t});\r\n\t}", "set sortingOrder(value) {}", "sortBy(field, reverse, primer) {\n\t\tconst key = primer\n\t\t\t? function (x) {\n\t\t\t\treturn primer(x[field]);\n\t\t\t}\n\t\t\t: function (x) {\n\t\t\t\treturn x[field];\n\t\t\t};\n\t\n\t\treturn function (a, b) {\n\t\t\ta = key(a);\n\t\t\tb = key(b);\n\t\t\treturn reverse * ((a > b) - (b > a));\n\t\t};\n\t}", "function updateSortFunction() {\n switch(sortBy.value) {\n case '0': // receiverId increasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent <\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n case '1': // receiverId decreasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent >\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n }\n sortReceiversAndHighlight();\n}", "function sortable(predicate) {\n return function (obj) {\n if (predicate == 'moving_time')\n return moment.duration(obj[predicate]);\n return obj[predicate];\n };\n }", "function sortArrayAscByItem(){\r\n return function(obj1, obj2){\r\n if (obj1.itemText > obj2.itemText) return 1;\r\n if (obj1.itemText < obj2.itemText) return -1;\r\n return 0;\r\n }\r\n}", "function orderByDuration (){\n return []\n}", "static finalSort(a, b){ return 0 }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function initialSort() {\n var column, direction;\n column = $j('#paginationSort').val() || '';\n column = column.match(/none/) ? '' : column;\n direction = ($j('#paginationSortOrder').val() || '').match(/desc|false/) ? desc : asc\n return { column: column, direction: direction };\n }", "function save_first_order() {\n\n var original_value = {};\n return function(chart) {\n chart.group().all().forEach(function(kv) {\n original_value[kv.key] = kv.value;\n });\n chart.ordering(function(kv) {\n return -original_value[kv.key];\n });\n };\n }", "function validateNoPreviousOrderByCall(query, fnName) {\n if (query._orderByCalled === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n}", "function getDefaultSorter(colName) {\n\t\treturn function(a, b, dir){\n\n\t\t\tvar \n\t\t\t\tfirstRec = dir == 'asc' ? a : b,\n\t\t\t\tsecondRec = dir == 'asc' ? b : a,\n\n\t\t\t\tfA = firstRec[colName].toLowerCase(),\n\t\t\t\tfB = secondRec[colName].toLowerCase();\n\n\t\t\t// Handle numbers\n\t\t\tif (fA<fB) return -1\n\t\t\tif (fA>fB) return +1\n\t\t\treturn 0\n\t\t};\n\t}", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] > b[property]) \n return 1; \n else if(a[property] < b[property]) \n return -1; \n \n return 0; \n } \n}", "static get order() { throw new Error('unimplemented - must use a concrete class'); }", "function sortByMathAsc()\n{\n let tBody = document.getElementById(\"tBody\");\n tBody.innerHTML = \"\"\n sortBySubjectAsc(dataBase, \"maths\")\n // sortBySubjectDsc(dataBase, \"maths\")\n createTable(dataBase)\n}", "_orderSort(l, r) {\n return l.order - r.order;\n }", "_resetOldSorting() {\n const rowChildren = this.shadowRoot.querySelectorAll('.th[sorted]');\n rowChildren.forEach((el) => el.removeAttribute('sorted'));\n }", "function sort(arr) {\n return null; \n}", "function sort () {\n index++;\n predicate = ng.isFunction(getter(scope)) ? getter(scope) : attr.stSort;\n if (index % 3 === 0 && attr.stSkipNatural === undefined) {\n //manual reset\n index = 0;\n ctrl.tableState().sort = {};\n ctrl.tableState().pagination.start = 0;\n ctrl.pipe();\n } else {\n ctrl.sortBy(predicate, index % 2 === 0);\n }\n }", "function diliverd(a)\n{\n a.getOrder= false;\n\n}", "function sortBy(prop){\r\n return function(a,b){\r\n if( a[prop] > b[prop]){\r\n return 1;\r\n }else if( a[prop] < b[prop] ){\r\n return -1;\r\n }\r\n return 0;\r\n }\r\n}", "constructor(order, sorted){ \n this.order = order\n this.sorted = sorted\n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "getStandardOrder() {\n return [ ['fullName', 'ASC'] ];\n }", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "applyFiltersAndSorts() {\n var list = this.props.list.filter(this.matchesFilterEnergyLevel);\n list = list.filter(this.matchesFilterFunLevel)\n var sort_type = this.getSortFunction()\n if(sort_type != null){\n list = list.sort(sort_type)\n }\n return list\n\n }" ]
[ "0.6984175", "0.6211202", "0.6047289", "0.6047289", "0.5973239", "0.5899177", "0.58527905", "0.58454394", "0.5842255", "0.58277667", "0.5808379", "0.57904786", "0.5765817", "0.57563853", "0.5754423", "0.5653292", "0.5653292", "0.5653292", "0.5648085", "0.5617021", "0.56006575", "0.56006575", "0.56006575", "0.55689704", "0.5566321", "0.55659515", "0.5549775", "0.5549775", "0.5407338", "0.5407161", "0.540153", "0.53830564", "0.53812724", "0.53687686", "0.5362567", "0.5345577", "0.5340945", "0.53175014", "0.5308736", "0.52768874", "0.5263048", "0.5258535", "0.5254488", "0.52539515", "0.525383", "0.52484596", "0.5242853", "0.5240508", "0.52322495", "0.52298015", "0.5218433", "0.5201899", "0.5198104", "0.5195287", "0.5194928", "0.5177333", "0.5156597", "0.51532435", "0.51532435", "0.5149855", "0.5140944", "0.5125469", "0.5116577", "0.51014084", "0.50820595", "0.5077007", "0.50700694", "0.50622565", "0.50622565", "0.50576514", "0.5057237", "0.5052418", "0.50482273", "0.50466007", "0.504534", "0.5040001", "0.5033205", "0.50287604", "0.50287604", "0.50272703", "0.5026524", "0.5023161", "0.502296", "0.50120074", "0.5007585", "0.5004562", "0.5001192", "0.49811104", "0.49764037", "0.4967476", "0.49661392", "0.49554217", "0.49548256", "0.49511352", "0.49511352", "0.49466386", "0.49332672", "0.49332672", "0.49332672", "0.49332672", "0.4931481" ]
0.0
-1
Dummy function to be used by OrderBy
static NUM_ASC(){ return "NUM_ASC"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOrderBy() {}", "get overrideSorting() {}", "sort() {\n\t}", "sort() {\n\t}", "repeaterOnSort() {\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DESC' : 'ASC'\n\n let sort = fn && fn(key, sortOpts)\n\n if( !sort && sort !== false )\n sort = `${this.db.escapeId(key)} ${desc}`\n \n if( sort )\n orderBy.push(sort)\n })\n\n return orderBy.length > 0 ? 'ORDER BY '+orderBy.join(', ') : ''\n }", "sortProducts() {}", "function sortByFunc() {\n switch (sortBy.field) {\n case 'name':\n case 'ticker':\n if (sortBy.desc === 0) {\n return (a, b) => a[sortBy.field].localeCompare(b[sortBy.field])\n }\n return (a, b) => b[sortBy.field].localeCompare(a[sortBy.field])\n case 'price':\n case 'changes':\n case 'marketCapitalization':\n default:\n if (sortBy.desc === 0) {\n return (a, b) => (a[sortBy.field] - b[sortBy.field])\n }\n return (a, b) => (b[sortBy.field] - a[sortBy.field])\n }\n }", "function pr_asc(){\n console.log('Sort by Price Asc');\n myLibrary.sortByPriceAsc();\n}", "sortBy() {\n // YOUR CODE HERE\n }", "sorted(x) {\n super.sorted(0, x);\n }", "function defaultOrderFn (a, b) {\n return a - b; // asc order\n}", "static DEFAULT_SORT_BY_FIELD(){ return \"description\"}", "function Sort() {}", "sortBy({ value }) {\n\n }", "function dummy(){}", "function dummy(){}", "function dummy(){}", "sort(){\n\n }", "asc(field) {\r\n\t\treturn this.push('asc', [...arguments]);\r\n\t}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "Sort() {\n\n }", "get sortingOrder() {}", "genSortAscendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = -1\n if (valA > valB) order = 1\n return order\n }\n }", "get order() {}", "get order() {}", "function orderByYear() {\n \n}", "function pr_desc(){\n console.log('Sort by Price Desc: ');\n myLibrary.sortByPriceDesc();\n}", "filterAndSortDataByYear () {\n }", "function orderAlphabetically() {}", "comparator(todo) {\n return todo.get('order');\n }", "function Order() {\n}", "[Symbol.iterator]() {\n return this.inOrder();\n }", "set overrideSorting(value) {}", "sort(comparator) {\n }", "function sortFunction(val){\n return val.sort();\n}", "function sortFruitMarketTableByFruitNameAndPrice() {\n\n}", "sortedItems() {\n if (!this.sortField) return this.itemsToSort;\n return orderBy(this.itemsToSort, [this.sortField], [this.sortOrder]);\n }", "static ASC(){\n return \"ASC\";\n }", "prepareSort(orderBy, allowed_cols, tableAlias, excludeOrder = false, validatedAggAliases) {\n let column_names = this.column_names.slice(0);\n const throwErr = () => {\n throw \"\\nInvalid orderBy option -> \" + JSON.stringify(orderBy) +\n \"\\nExpecting { key2: false, key1: true } | { key1: 1, key2: -1 } | [{ key1: true }, { key2: false }] | [{ key1: 1 }, { key2: -1 }]\";\n }, parseOrderObj = (orderBy, expectOne = false) => {\n if (!isPlainObject(orderBy))\n return throwErr();\n if (expectOne && Object.keys(orderBy).length > 1)\n throw \"\\nInvalid orderBy \" + JSON.stringify(orderBy) +\n \"\\nEach orderBy array element cannot have more than one key\";\n /* { key2: bool, key1: bool } */\n if (!Object.values(orderBy).find(v => ![true, false].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: Boolean(orderBy[key]) }));\n }\n else if (!Object.values(orderBy).find(v => ![-1, 1].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: orderBy[key] === 1 }));\n }\n else if (!Object.values(orderBy).find(v => ![\"asc\", \"desc\"].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: orderBy[key] === \"asc\" }));\n }\n else\n return throwErr();\n };\n if (!orderBy)\n return \"\";\n let allowedFields = [];\n if (allowed_cols) {\n allowedFields = this.parseFieldFilter(allowed_cols);\n }\n let _ob = [];\n if (isPlainObject(orderBy)) {\n _ob = parseOrderObj(orderBy);\n }\n else if (typeof orderBy === \"string\") {\n /* string */\n _ob = [{ key: orderBy, asc: true }];\n }\n else if (Array.isArray(orderBy)) {\n /* Order by is formed of a list of ascending field names */\n let _orderBy = orderBy;\n if (_orderBy && !_orderBy.find(v => typeof v !== \"string\")) {\n /* [string] */\n _ob = _orderBy.map(key => ({ key, asc: true }));\n }\n else if (_orderBy.find(v => isPlainObject(v) && Object.keys(v).length)) {\n if (!_orderBy.find(v => typeof v.key !== \"string\" || typeof v.asc !== \"boolean\")) {\n /* [{ key, asc }] */\n _ob = Object.freeze(_orderBy);\n }\n else {\n /* [{ [key]: asc }] | [{ [key]: -1 }] */\n _ob = _orderBy.map(v => parseOrderObj(v, true)[0]);\n }\n }\n else\n return throwErr();\n }\n else\n return throwErr();\n if (!_ob || !_ob.length)\n return \"\";\n let bad_param = _ob.find(({ key }) => !(validatedAggAliases || []).includes(key) &&\n (!column_names.includes(key) ||\n (allowedFields.length && !allowedFields.includes(key))));\n if (!bad_param) {\n return (excludeOrder ? \"\" : \" ORDER BY \") + (_ob.map(({ key, asc }) => `${tableAlias ? pgp.as.format(\"$1:name.\", tableAlias) : \"\"}${pgp.as.format(\"$1:name\", key)} ${asc ? \" ASC \" : \" DESC \"}`).join(\", \"));\n }\n else {\n throw \"Unrecognised orderBy fields or params: \" + bad_param.key;\n }\n }", "_dynamicSort(property) {\n let sortOrder = 1;\n\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n let result = (a['attributes'][property] < b['attributes'][property]) ? -1 :\n (a['attributes'][property] > b['attributes'][property]) ? 1 : 0;\n return result * sortOrder;\n };\n }", "genSortDescendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = 1\n if (valA > valB) order = -1\n return order\n }\n }", "function sortTableAlphabeticallyAscending(){\n sortAlphabeticallyAscending();\n}", "function orderNatural() {\n sortFunc = null;\n return groupObj;\n }", "function orderBy(a, b) {\n return (a == b) ? 0 : (a > b) ? 1 : -1;\n}", "function sortResults(){\n return sort.sortCustomerRecords(result);\n}", "sortBy(field, reverse, primer) \n {\n const key = primer\n ? function(x) {\n return primer(x[field]);\n }\n : function(x) {\n return x[field];\n };\n\n return function(a, b) {\n a = key(a);\n b = key(b);\n return reverse * ((a > b) - (b > a));\n };\n }", "sortBy(collection, functionOrKey) {\n return collection.sort((a, b) => {\n if (typeof functionOrKey === \"function\") {\n return functionOrKey(a) < functionOrKey(b) ? -1 : 1;\n }\n return a[functionOrKey] < b[functionOrKey] ? -1 : 1;\n });\n }", "clearOrderBy() {\n return new SelectQueryBuilder({\n ...this.#props,\n queryNode: SelectQueryNode.cloneWithoutOrderBy(this.#props.queryNode),\n });\n }", "comparator(todo) {\n\t\treturn todo.get('order');\n\t}", "get orderBy() {\n if (this._orderBy instanceof Function)\n return this._orderBy(this.entityMetadata.createPropertiesMap());\n return this._orderBy;\n }", "dynamicSort(property) {\n var sortOrder = 1;\n //check for \"-\" operator and sort asc/desc depending on that\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result =\n a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;\n return result * sortOrder;\n };\n }", "function sortData (data) {\n ...\n}", "function GetSortOrder(prop) { \n return function(a, b) { \n if (a[prop] > b[prop]) { \n return 1; \n } else if (a[prop] < b[prop]) { \n return -1; \n } \n return 0; \n } \n }", "getTopOrderingKey() {\n return {\n date: new Date(2200, 0),\n id: ''\n };\n }", "function Dummy() {}", "function Dummy() {}", "function _fakeSort() {\n var resultsEls = $( '.all-results .search-result-full' ).get();\n var sortOn = this.attributes[\"sort-trigger\"].value;\n\n // toggle the classes\n $( '.search-results-order .selected' ).removeClass('selected');\n $( this ).addClass('selected');\n\n // change our parent sort val\n $( '.search-step-3' ).attr('sort', sortOn);\n\n $( resultsEls.reverse() ).each(function() {\n $(this).detach().appendTo('.all-results');\n });\n }", "function sortBy(value) {\n if ($scope.sort[value] === null) {\n $scope.sort.first = null;\n $scope.sort.last = null;\n $scope.sort.company = null;\n $scope.sort.address = null;\n $scope.sort[value] = true;\n } else {\n $scope.sort[value] = !$scope.sort[value];\n }\n }", "function invalidSortFunction(a, b) {\n return 'bad'\n}", "render(table) {\n console.log('Applying 3rd partys better sort.');\n }", "defaultSortBy(a, b) {\n let me = this;\n\n a = a[me.property];\n b = b[me.property];\n\n if (me.useTransformValue) {\n a = me.transformValue(a);\n b = me.transformValue(b);\n }\n\n if (a > b) {\n return 1 * me.directionMultiplier;\n }\n\n if (a < b) {\n return -1 * me.directionMultiplier;\n }\n\n return 0;\n }", "order(by) {\n if (typeof by === 'string') {\n by = {[by]: 'desc'};\n }\n return this.spawn().applyOrder(by);\n }", "onHandleSort(event) {\n const { fieldName: sortedBy, sortDirection } = event.detail;\n const cloneData = [...this.data];\n\n cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));\n this.data = cloneData;\n this.sortDirection = sortDirection;\n this.sortedBy = sortedBy;\n }", "function qsortBy(cmp, l){\r\n return foldr(function(a, b){ return insertBy(cmp, a, b) }, emptyListOf(l), l);\r\n}", "set order(value) {}", "set order(value) {}", "sort() {\r\n\t\treturn this.data.sort((a,b) => {\r\n\t\t\tfor(var i=0; i < this.definition.length; i++) {\r\n\t\t\t\tconst [code, key] = this.definition[i];\r\n\t\t\t\tswitch(code) {\r\n\t\t\t\t\tcase 'asc':\r\n\t\t\t\t\tcase 'desc':\r\n\t\t\t\t\t\tif (a[key] > b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? 1 : -1;\r\n\t\t\t\t\t\tif (a[key] < b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? -1 : 1;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'fn':\r\n\t\t\t\t\t\tlet result = key(a, b);\r\n\t\t\t\t\t\tif (result != 0) // If it's zero the sort wasn't decided.\r\n\t\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t});\r\n\t}", "set sortingOrder(value) {}", "sortBy(field, reverse, primer) {\n\t\tconst key = primer\n\t\t\t? function (x) {\n\t\t\t\treturn primer(x[field]);\n\t\t\t}\n\t\t\t: function (x) {\n\t\t\t\treturn x[field];\n\t\t\t};\n\t\n\t\treturn function (a, b) {\n\t\t\ta = key(a);\n\t\t\tb = key(b);\n\t\t\treturn reverse * ((a > b) - (b > a));\n\t\t};\n\t}", "function updateSortFunction() {\n switch(sortBy.value) {\n case '0': // receiverId increasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent <\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n case '1': // receiverId decreasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent >\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n }\n sortReceiversAndHighlight();\n}", "function sortable(predicate) {\n return function (obj) {\n if (predicate == 'moving_time')\n return moment.duration(obj[predicate]);\n return obj[predicate];\n };\n }", "function sortArrayAscByItem(){\r\n return function(obj1, obj2){\r\n if (obj1.itemText > obj2.itemText) return 1;\r\n if (obj1.itemText < obj2.itemText) return -1;\r\n return 0;\r\n }\r\n}", "function orderByDuration (){\n return []\n}", "static finalSort(a, b){ return 0 }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function initialSort() {\n var column, direction;\n column = $j('#paginationSort').val() || '';\n column = column.match(/none/) ? '' : column;\n direction = ($j('#paginationSortOrder').val() || '').match(/desc|false/) ? desc : asc\n return { column: column, direction: direction };\n }", "function save_first_order() {\n\n var original_value = {};\n return function(chart) {\n chart.group().all().forEach(function(kv) {\n original_value[kv.key] = kv.value;\n });\n chart.ordering(function(kv) {\n return -original_value[kv.key];\n });\n };\n }", "function validateNoPreviousOrderByCall(query, fnName) {\n if (query._orderByCalled === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n}", "function getDefaultSorter(colName) {\n\t\treturn function(a, b, dir){\n\n\t\t\tvar \n\t\t\t\tfirstRec = dir == 'asc' ? a : b,\n\t\t\t\tsecondRec = dir == 'asc' ? b : a,\n\n\t\t\t\tfA = firstRec[colName].toLowerCase(),\n\t\t\t\tfB = secondRec[colName].toLowerCase();\n\n\t\t\t// Handle numbers\n\t\t\tif (fA<fB) return -1\n\t\t\tif (fA>fB) return +1\n\t\t\treturn 0\n\t\t};\n\t}", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] > b[property]) \n return 1; \n else if(a[property] < b[property]) \n return -1; \n \n return 0; \n } \n}", "static get order() { throw new Error('unimplemented - must use a concrete class'); }", "function sortByMathAsc()\n{\n let tBody = document.getElementById(\"tBody\");\n tBody.innerHTML = \"\"\n sortBySubjectAsc(dataBase, \"maths\")\n // sortBySubjectDsc(dataBase, \"maths\")\n createTable(dataBase)\n}", "_orderSort(l, r) {\n return l.order - r.order;\n }", "_resetOldSorting() {\n const rowChildren = this.shadowRoot.querySelectorAll('.th[sorted]');\n rowChildren.forEach((el) => el.removeAttribute('sorted'));\n }", "function sort(arr) {\n return null; \n}", "function sort () {\n index++;\n predicate = ng.isFunction(getter(scope)) ? getter(scope) : attr.stSort;\n if (index % 3 === 0 && attr.stSkipNatural === undefined) {\n //manual reset\n index = 0;\n ctrl.tableState().sort = {};\n ctrl.tableState().pagination.start = 0;\n ctrl.pipe();\n } else {\n ctrl.sortBy(predicate, index % 2 === 0);\n }\n }", "function diliverd(a)\n{\n a.getOrder= false;\n\n}", "function sortBy(prop){\r\n return function(a,b){\r\n if( a[prop] > b[prop]){\r\n return 1;\r\n }else if( a[prop] < b[prop] ){\r\n return -1;\r\n }\r\n return 0;\r\n }\r\n}", "constructor(order, sorted){ \n this.order = order\n this.sorted = sorted\n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "getStandardOrder() {\n return [ ['fullName', 'ASC'] ];\n }", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "applyFiltersAndSorts() {\n var list = this.props.list.filter(this.matchesFilterEnergyLevel);\n list = list.filter(this.matchesFilterFunLevel)\n var sort_type = this.getSortFunction()\n if(sort_type != null){\n list = list.sort(sort_type)\n }\n return list\n\n }" ]
[ "0.6984175", "0.6211202", "0.6047289", "0.6047289", "0.5973239", "0.5899177", "0.58527905", "0.58454394", "0.5842255", "0.58277667", "0.5808379", "0.57904786", "0.5765817", "0.57563853", "0.5754423", "0.5653292", "0.5653292", "0.5653292", "0.5648085", "0.5617021", "0.56006575", "0.56006575", "0.56006575", "0.55689704", "0.5566321", "0.55659515", "0.5549775", "0.5549775", "0.5407338", "0.5407161", "0.540153", "0.53830564", "0.53812724", "0.53687686", "0.5362567", "0.5345577", "0.5340945", "0.53175014", "0.5308736", "0.52768874", "0.5263048", "0.5258535", "0.5254488", "0.52539515", "0.525383", "0.52484596", "0.5242853", "0.5240508", "0.52322495", "0.52298015", "0.5218433", "0.5201899", "0.5198104", "0.5195287", "0.5194928", "0.5177333", "0.5156597", "0.51532435", "0.51532435", "0.5149855", "0.5140944", "0.5125469", "0.5116577", "0.51014084", "0.50820595", "0.5077007", "0.50700694", "0.50622565", "0.50622565", "0.50576514", "0.5057237", "0.5052418", "0.50482273", "0.50466007", "0.504534", "0.5040001", "0.5033205", "0.50287604", "0.50287604", "0.50272703", "0.5026524", "0.5023161", "0.502296", "0.50120074", "0.5007585", "0.5004562", "0.5001192", "0.49811104", "0.49764037", "0.4967476", "0.49661392", "0.49554217", "0.49548256", "0.49511352", "0.49511352", "0.49466386", "0.49332672", "0.49332672", "0.49332672", "0.49332672", "0.4931481" ]
0.0
-1
Dummy function to be used by OrderBy
static NUM_DESC(){ return "NUM_DESC"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getOrderBy() {}", "get overrideSorting() {}", "sort() {\n\t}", "sort() {\n\t}", "repeaterOnSort() {\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DESC' : 'ASC'\n\n let sort = fn && fn(key, sortOpts)\n\n if( !sort && sort !== false )\n sort = `${this.db.escapeId(key)} ${desc}`\n \n if( sort )\n orderBy.push(sort)\n })\n\n return orderBy.length > 0 ? 'ORDER BY '+orderBy.join(', ') : ''\n }", "sortProducts() {}", "function sortByFunc() {\n switch (sortBy.field) {\n case 'name':\n case 'ticker':\n if (sortBy.desc === 0) {\n return (a, b) => a[sortBy.field].localeCompare(b[sortBy.field])\n }\n return (a, b) => b[sortBy.field].localeCompare(a[sortBy.field])\n case 'price':\n case 'changes':\n case 'marketCapitalization':\n default:\n if (sortBy.desc === 0) {\n return (a, b) => (a[sortBy.field] - b[sortBy.field])\n }\n return (a, b) => (b[sortBy.field] - a[sortBy.field])\n }\n }", "function pr_asc(){\n console.log('Sort by Price Asc');\n myLibrary.sortByPriceAsc();\n}", "sortBy() {\n // YOUR CODE HERE\n }", "sorted(x) {\n super.sorted(0, x);\n }", "function defaultOrderFn (a, b) {\n return a - b; // asc order\n}", "static DEFAULT_SORT_BY_FIELD(){ return \"description\"}", "function Sort() {}", "sortBy({ value }) {\n\n }", "function dummy(){}", "function dummy(){}", "function dummy(){}", "sort(){\n\n }", "asc(field) {\r\n\t\treturn this.push('asc', [...arguments]);\r\n\t}", "function dummy() {}", "function dummy() {}", "function dummy() {}", "Sort() {\n\n }", "genSortAscendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = -1\n if (valA > valB) order = 1\n return order\n }\n }", "get sortingOrder() {}", "get order() {}", "get order() {}", "function pr_desc(){\n console.log('Sort by Price Desc: ');\n myLibrary.sortByPriceDesc();\n}", "function orderByYear() {\n \n}", "filterAndSortDataByYear () {\n }", "function orderAlphabetically() {}", "comparator(todo) {\n return todo.get('order');\n }", "function Order() {\n}", "[Symbol.iterator]() {\n return this.inOrder();\n }", "set overrideSorting(value) {}", "sort(comparator) {\n }", "function sortFunction(val){\n return val.sort();\n}", "function sortFruitMarketTableByFruitNameAndPrice() {\n\n}", "sortedItems() {\n if (!this.sortField) return this.itemsToSort;\n return orderBy(this.itemsToSort, [this.sortField], [this.sortOrder]);\n }", "static ASC(){\n return \"ASC\";\n }", "prepareSort(orderBy, allowed_cols, tableAlias, excludeOrder = false, validatedAggAliases) {\n let column_names = this.column_names.slice(0);\n const throwErr = () => {\n throw \"\\nInvalid orderBy option -> \" + JSON.stringify(orderBy) +\n \"\\nExpecting { key2: false, key1: true } | { key1: 1, key2: -1 } | [{ key1: true }, { key2: false }] | [{ key1: 1 }, { key2: -1 }]\";\n }, parseOrderObj = (orderBy, expectOne = false) => {\n if (!isPlainObject(orderBy))\n return throwErr();\n if (expectOne && Object.keys(orderBy).length > 1)\n throw \"\\nInvalid orderBy \" + JSON.stringify(orderBy) +\n \"\\nEach orderBy array element cannot have more than one key\";\n /* { key2: bool, key1: bool } */\n if (!Object.values(orderBy).find(v => ![true, false].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: Boolean(orderBy[key]) }));\n }\n else if (!Object.values(orderBy).find(v => ![-1, 1].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: orderBy[key] === 1 }));\n }\n else if (!Object.values(orderBy).find(v => ![\"asc\", \"desc\"].includes(v))) {\n return Object.keys(orderBy).map(key => ({ key, asc: orderBy[key] === \"asc\" }));\n }\n else\n return throwErr();\n };\n if (!orderBy)\n return \"\";\n let allowedFields = [];\n if (allowed_cols) {\n allowedFields = this.parseFieldFilter(allowed_cols);\n }\n let _ob = [];\n if (isPlainObject(orderBy)) {\n _ob = parseOrderObj(orderBy);\n }\n else if (typeof orderBy === \"string\") {\n /* string */\n _ob = [{ key: orderBy, asc: true }];\n }\n else if (Array.isArray(orderBy)) {\n /* Order by is formed of a list of ascending field names */\n let _orderBy = orderBy;\n if (_orderBy && !_orderBy.find(v => typeof v !== \"string\")) {\n /* [string] */\n _ob = _orderBy.map(key => ({ key, asc: true }));\n }\n else if (_orderBy.find(v => isPlainObject(v) && Object.keys(v).length)) {\n if (!_orderBy.find(v => typeof v.key !== \"string\" || typeof v.asc !== \"boolean\")) {\n /* [{ key, asc }] */\n _ob = Object.freeze(_orderBy);\n }\n else {\n /* [{ [key]: asc }] | [{ [key]: -1 }] */\n _ob = _orderBy.map(v => parseOrderObj(v, true)[0]);\n }\n }\n else\n return throwErr();\n }\n else\n return throwErr();\n if (!_ob || !_ob.length)\n return \"\";\n let bad_param = _ob.find(({ key }) => !(validatedAggAliases || []).includes(key) &&\n (!column_names.includes(key) ||\n (allowedFields.length && !allowedFields.includes(key))));\n if (!bad_param) {\n return (excludeOrder ? \"\" : \" ORDER BY \") + (_ob.map(({ key, asc }) => `${tableAlias ? pgp.as.format(\"$1:name.\", tableAlias) : \"\"}${pgp.as.format(\"$1:name\", key)} ${asc ? \" ASC \" : \" DESC \"}`).join(\", \"));\n }\n else {\n throw \"Unrecognised orderBy fields or params: \" + bad_param.key;\n }\n }", "_dynamicSort(property) {\n let sortOrder = 1;\n\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a,b) {\n let result = (a['attributes'][property] < b['attributes'][property]) ? -1 :\n (a['attributes'][property] > b['attributes'][property]) ? 1 : 0;\n return result * sortOrder;\n };\n }", "genSortDescendingByField(field) {\n return (a, b) => {\n const valA = a[field].toUpperCase()\n const valB = b[field].toUpperCase()\n let order = 0\n if (valA < valB) order = 1\n if (valA > valB) order = -1\n return order\n }\n }", "function sortTableAlphabeticallyAscending(){\n sortAlphabeticallyAscending();\n}", "function orderNatural() {\n sortFunc = null;\n return groupObj;\n }", "function orderBy(a, b) {\n return (a == b) ? 0 : (a > b) ? 1 : -1;\n}", "function sortResults(){\n return sort.sortCustomerRecords(result);\n}", "sortBy(field, reverse, primer) \n {\n const key = primer\n ? function(x) {\n return primer(x[field]);\n }\n : function(x) {\n return x[field];\n };\n\n return function(a, b) {\n a = key(a);\n b = key(b);\n return reverse * ((a > b) - (b > a));\n };\n }", "sortBy(collection, functionOrKey) {\n return collection.sort((a, b) => {\n if (typeof functionOrKey === \"function\") {\n return functionOrKey(a) < functionOrKey(b) ? -1 : 1;\n }\n return a[functionOrKey] < b[functionOrKey] ? -1 : 1;\n });\n }", "clearOrderBy() {\n return new SelectQueryBuilder({\n ...this.#props,\n queryNode: SelectQueryNode.cloneWithoutOrderBy(this.#props.queryNode),\n });\n }", "comparator(todo) {\n\t\treturn todo.get('order');\n\t}", "get orderBy() {\n if (this._orderBy instanceof Function)\n return this._orderBy(this.entityMetadata.createPropertiesMap());\n return this._orderBy;\n }", "dynamicSort(property) {\n var sortOrder = 1;\n //check for \"-\" operator and sort asc/desc depending on that\n if (property[0] === \"-\") {\n sortOrder = -1;\n property = property.substr(1);\n }\n return function (a, b) {\n var result =\n a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;\n return result * sortOrder;\n };\n }", "function sortData (data) {\n ...\n}", "function GetSortOrder(prop) { \n return function(a, b) { \n if (a[prop] > b[prop]) { \n return 1; \n } else if (a[prop] < b[prop]) { \n return -1; \n } \n return 0; \n } \n }", "getTopOrderingKey() {\n return {\n date: new Date(2200, 0),\n id: ''\n };\n }", "function Dummy() {}", "function Dummy() {}", "function _fakeSort() {\n var resultsEls = $( '.all-results .search-result-full' ).get();\n var sortOn = this.attributes[\"sort-trigger\"].value;\n\n // toggle the classes\n $( '.search-results-order .selected' ).removeClass('selected');\n $( this ).addClass('selected');\n\n // change our parent sort val\n $( '.search-step-3' ).attr('sort', sortOn);\n\n $( resultsEls.reverse() ).each(function() {\n $(this).detach().appendTo('.all-results');\n });\n }", "function sortBy(value) {\n if ($scope.sort[value] === null) {\n $scope.sort.first = null;\n $scope.sort.last = null;\n $scope.sort.company = null;\n $scope.sort.address = null;\n $scope.sort[value] = true;\n } else {\n $scope.sort[value] = !$scope.sort[value];\n }\n }", "function invalidSortFunction(a, b) {\n return 'bad'\n}", "render(table) {\n console.log('Applying 3rd partys better sort.');\n }", "defaultSortBy(a, b) {\n let me = this;\n\n a = a[me.property];\n b = b[me.property];\n\n if (me.useTransformValue) {\n a = me.transformValue(a);\n b = me.transformValue(b);\n }\n\n if (a > b) {\n return 1 * me.directionMultiplier;\n }\n\n if (a < b) {\n return -1 * me.directionMultiplier;\n }\n\n return 0;\n }", "order(by) {\n if (typeof by === 'string') {\n by = {[by]: 'desc'};\n }\n return this.spawn().applyOrder(by);\n }", "onHandleSort(event) {\n const { fieldName: sortedBy, sortDirection } = event.detail;\n const cloneData = [...this.data];\n\n cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));\n this.data = cloneData;\n this.sortDirection = sortDirection;\n this.sortedBy = sortedBy;\n }", "function qsortBy(cmp, l){\r\n return foldr(function(a, b){ return insertBy(cmp, a, b) }, emptyListOf(l), l);\r\n}", "set order(value) {}", "set order(value) {}", "sort() {\r\n\t\treturn this.data.sort((a,b) => {\r\n\t\t\tfor(var i=0; i < this.definition.length; i++) {\r\n\t\t\t\tconst [code, key] = this.definition[i];\r\n\t\t\t\tswitch(code) {\r\n\t\t\t\t\tcase 'asc':\r\n\t\t\t\t\tcase 'desc':\r\n\t\t\t\t\t\tif (a[key] > b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? 1 : -1;\r\n\t\t\t\t\t\tif (a[key] < b[key])\r\n\t\t\t\t\t\t\treturn code == 'asc' ? -1 : 1;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'fn':\r\n\t\t\t\t\t\tlet result = key(a, b);\r\n\t\t\t\t\t\tif (result != 0) // If it's zero the sort wasn't decided.\r\n\t\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t});\r\n\t}", "set sortingOrder(value) {}", "sortBy(field, reverse, primer) {\n\t\tconst key = primer\n\t\t\t? function (x) {\n\t\t\t\treturn primer(x[field]);\n\t\t\t}\n\t\t\t: function (x) {\n\t\t\t\treturn x[field];\n\t\t\t};\n\t\n\t\treturn function (a, b) {\n\t\t\ta = key(a);\n\t\t\tb = key(b);\n\t\t\treturn reverse * ((a > b) - (b > a));\n\t\t};\n\t}", "function updateSortFunction() {\n switch(sortBy.value) {\n case '0': // receiverId increasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent <\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n case '1': // receiverId decreasing\n sortFunction = function(tr1, tr2) {\n if(tr1.getElementsByTagName('td')[0].textContent >\n tr2.getElementsByTagName('td')[0].textContent) {\n return -1;\n };\n return 1;\n }\n break;\n }\n sortReceiversAndHighlight();\n}", "function sortable(predicate) {\n return function (obj) {\n if (predicate == 'moving_time')\n return moment.duration(obj[predicate]);\n return obj[predicate];\n };\n }", "function sortArrayAscByItem(){\r\n return function(obj1, obj2){\r\n if (obj1.itemText > obj2.itemText) return 1;\r\n if (obj1.itemText < obj2.itemText) return -1;\r\n return 0;\r\n }\r\n}", "function orderByDuration (){\n return []\n}", "static finalSort(a, b){ return 0 }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function initialSort() {\n var column, direction;\n column = $j('#paginationSort').val() || '';\n column = column.match(/none/) ? '' : column;\n direction = ($j('#paginationSortOrder').val() || '').match(/desc|false/) ? desc : asc\n return { column: column, direction: direction };\n }", "function save_first_order() {\n\n var original_value = {};\n return function(chart) {\n chart.group().all().forEach(function(kv) {\n original_value[kv.key] = kv.value;\n });\n chart.ordering(function(kv) {\n return -original_value[kv.key];\n });\n };\n }", "function getDefaultSorter(colName) {\n\t\treturn function(a, b, dir){\n\n\t\t\tvar \n\t\t\t\tfirstRec = dir == 'asc' ? a : b,\n\t\t\t\tsecondRec = dir == 'asc' ? b : a,\n\n\t\t\t\tfA = firstRec[colName].toLowerCase(),\n\t\t\t\tfB = secondRec[colName].toLowerCase();\n\n\t\t\t// Handle numbers\n\t\t\tif (fA<fB) return -1\n\t\t\tif (fA>fB) return +1\n\t\t\treturn 0\n\t\t};\n\t}", "function validateNoPreviousOrderByCall(query, fnName) {\n if (query._orderByCalled === true) {\n throw new Error(fnName + \": You can't combine multiple orderBy calls.\");\n }\n}", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] > b[property]) \n return 1; \n else if(a[property] < b[property]) \n return -1; \n \n return 0; \n } \n}", "static get order() { throw new Error('unimplemented - must use a concrete class'); }", "function sortByMathAsc()\n{\n let tBody = document.getElementById(\"tBody\");\n tBody.innerHTML = \"\"\n sortBySubjectAsc(dataBase, \"maths\")\n // sortBySubjectDsc(dataBase, \"maths\")\n createTable(dataBase)\n}", "_orderSort(l, r) {\n return l.order - r.order;\n }", "_resetOldSorting() {\n const rowChildren = this.shadowRoot.querySelectorAll('.th[sorted]');\n rowChildren.forEach((el) => el.removeAttribute('sorted'));\n }", "function sort(arr) {\n return null; \n}", "function sort () {\n index++;\n predicate = ng.isFunction(getter(scope)) ? getter(scope) : attr.stSort;\n if (index % 3 === 0 && attr.stSkipNatural === undefined) {\n //manual reset\n index = 0;\n ctrl.tableState().sort = {};\n ctrl.tableState().pagination.start = 0;\n ctrl.pipe();\n } else {\n ctrl.sortBy(predicate, index % 2 === 0);\n }\n }", "function diliverd(a)\n{\n a.getOrder= false;\n\n}", "function sortBy(prop){\r\n return function(a,b){\r\n if( a[prop] > b[prop]){\r\n return 1;\r\n }else if( a[prop] < b[prop] ){\r\n return -1;\r\n }\r\n return 0;\r\n }\r\n}", "constructor(order, sorted){ \n this.order = order\n this.sorted = sorted\n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "function sortByProperty(property){ \n return function(a,b){ \n if(a[property] < b[property]) \n return 1; \n else if(a[property] > b[property]) \n return -1; \n \n return 0; \n } \n }", "getStandardOrder() {\n return [ ['fullName', 'ASC'] ];\n }", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "function sortFunction( a, b ) {\n\n\t\t\treturn a - b;\n\n\t\t}", "applyFiltersAndSorts() {\n var list = this.props.list.filter(this.matchesFilterEnergyLevel);\n list = list.filter(this.matchesFilterFunLevel)\n var sort_type = this.getSortFunction()\n if(sort_type != null){\n list = list.sort(sort_type)\n }\n return list\n\n }" ]
[ "0.6982649", "0.62106574", "0.60469484", "0.60469484", "0.5973395", "0.5899146", "0.5852469", "0.58466953", "0.58419573", "0.5827838", "0.5808664", "0.5788289", "0.5765332", "0.5756178", "0.5754691", "0.5651835", "0.5651835", "0.5651835", "0.5647551", "0.56164104", "0.55990803", "0.55990803", "0.55990803", "0.55685854", "0.5565787", "0.55644417", "0.5547609", "0.5547609", "0.5406987", "0.5406003", "0.5401251", "0.5382759", "0.53809863", "0.53660166", "0.53620386", "0.534507", "0.53409725", "0.5317527", "0.5309201", "0.52761716", "0.52609926", "0.52590835", "0.5254138", "0.52540195", "0.52532864", "0.5247433", "0.5241473", "0.52396697", "0.5233567", "0.52308166", "0.52175885", "0.5201558", "0.5196815", "0.5194945", "0.5194592", "0.517643", "0.5155105", "0.51516545", "0.51516545", "0.5149239", "0.51402885", "0.51251435", "0.5116745", "0.51015115", "0.5082808", "0.5076792", "0.50705266", "0.50597084", "0.50597084", "0.5057275", "0.5055152", "0.5053779", "0.5048392", "0.5046658", "0.5044709", "0.5038769", "0.503234", "0.50285155", "0.50285155", "0.5025968", "0.5025431", "0.5023474", "0.5023115", "0.5012162", "0.50052595", "0.50047773", "0.49993762", "0.49803343", "0.4975694", "0.49662519", "0.496388", "0.49559307", "0.49529982", "0.49511814", "0.49511814", "0.4944453", "0.49325326", "0.49325326", "0.49325326", "0.49325326", "0.4931373" ]
0.0
-1
FLOW METHODS This method restricts data operation to a certain number, starting from the first item it can see.
limit(num){ if( num <= 0 ) throw new Error("Limit value must be greater than 0"); var flow = new RangeMethodFlow(0, num); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "skip(num){\n if( num <= 0 )\n throw new Error(\"Skip value must be greater than 0\");\n\n var flow = new RangeMethodFlow(num, Number.MAX_VALUE);\n setRefs(this, flow);\n\n return flow;\n }", "function EnsureLimit() {\n\t\t\t\tif (_itemId > 10 && (_itemId % 5) == 0) {\n\t\t\t\t\t_cmdDiv.find(\"div:lt(5)\").remove();\n\t\t\t\t\t_resDiv.find(\"div:lt(5)\").remove();\n\t\t\t\t}\n\t\t\t}", "_validateItemsIndex(index, method) {\n const that = this;\n\n if (isNaN(parseInt(index)) || index < 0 || index > that._items.length - 1) {\n that.log(that.localize('indexOutOfBound', { elementType: that.nodeName.toLowerCase(), method: method }));\n return;\n }\n\n return parseInt(index);\n }", "gotoCheckLimit(current_line, n_item, line_limit) {\n if (n_item > 0 && current_line < line_limit) {\n return true;\n }\n else if (n_item < 0 && current_line > line_limit) {\n return true;\n }\n else {\n return false;\n }\n }", "onTriggerAction(data, triggerCount) {\n super.onTriggerAction(data);\n\n if(triggerCount === 0) {\n this.transportControl(\"previous\");\n } else {\n if(this.roonActiveOutput && this.roonActiveOutput.isSeekAllowed) {\n\n let amount = triggerCount;\n if(triggerCount < 3) {\n amount = 5;\n } else {\n amount = Math.pow(2, triggerCount);\n }\n\n // Guardrails\n amount = Math.min(amount, 45);\n this.transportSeek(\"relative\", -amount);\n }\n }\n }", "manageShoppingIndex(){\n const firstUnsavedIndex = this.firstUnsavedIndex()\n\n if (firstUnsavedIndex == null) { //everything is saved, person should be allowed into the picking of this order\n this.loadGroupSelectionPage();\n }\n else if(this.requestedPickingStep > firstUnsavedIndex + 1){ //0 indexed vs 1 indexed\n console.log('manageShoppingIndex m0', 'this.shopList.length', this.shopList.length, 'requestedPickingStep', this.requestedPickingStep, 'firstUnsavedIndex', firstUnsavedIndex);\n this.requestedPickingStep = firstUnsavedIndex + 1; //0 indexed vs 1 indexed\n this.setShoppingIndex(firstUnsavedIndex);\n alert('Please complete step ' + this.requestedPickingStep + ' first');\n }\n else if(this.requestedPickingStep <= this.shopList.length && this.requestedPickingStep > 0){\n console.log('manageShoppingIndex m1', 'this.shopList.length', this.shopList.length, 'requestedPickingStep', this.requestedPickingStep, 'firstUnsavedIndex', firstUnsavedIndex);\n this.setShoppingIndex(this.requestedPickingStep - 1); //0 indexed vs 1 indexed\n }\n else if(this.requestedPickingStep === 'basket'){\n console.log('manageShoppingIndex m2', 'this.shopList.length', this.shopList.length, 'requestedPickingStep', this.requestedPickingStep, 'firstUnsavedIndex', firstUnsavedIndex);\n this.basketSaved = false;\n this.initializeShopper();\n }\n else if(this.groupLoaded === true){\n console.log('manageShoppingIndex m3', 'this.shopList.length', this.shopList.length, 'requestedPickingStep', this.requestedPickingStep, 'firstUnsavedIndex', firstUnsavedIndex);\n this.setShoppingIndex(0);\n }\n }", "@action getManyDataItems() { // go ask for a bunch of random numbers\n this.numberList.replace(); // empty the list\n for (var ctr = 0; ctr < this.listSize; ctr++){ // count to goal \n this.numberList.push(-1); // make the array the right size\n setTimeout( this.getRandomForIndex.bind(this,ctr) , // call a service\n 200+Math.random()*3000 ); // after a random wait\n } \n }", "function add(item) {\n if (typeof item != \"number\") {\n return false;\n }\n\n if (item < 100) {\n pipe.unshift(item);\n } else {\n pipe.push(item)\n }\n\n}", "run() {\n\n let end = this.settings.show + this.settings.offset;\n\n let start = this.settings.offset;\n\n let nextDataSetIndex = end;\n let previousDataSetIndex = start - 1;\n\n let currentEntryEnd = start + this.settings.show;\n\n if (this.data) {\n const filteredData = this\n .data\n .slice(start, end);\n\n //set default has more to true\n this.hasNext = true;\n this.hasPrevious = true;\n\n //if start is less than 0 set it to 0\n if (start < 0) {\n start = 0;\n }\n\n if (end < 2) {\n end = 1;\n }\n\n //tell if we have more data\n if (!this.data[nextDataSetIndex]) {\n this.hasNext = false;\n }\n\n //tell if we have previous data\n if (!this.data[previousDataSetIndex]) {\n this.hasPrevious = false;\n }\n\n if (currentEntryEnd > this.data.length) {\n currentEntryEnd = this.data.length\n }\n\n this.currentEntry = start + 1;\n this.currentEntryEnd = currentEntryEnd;\n this.dataCount = this.data.length;\n\n this.dataToShow = filteredData\n\n return {data: filteredData}\n } else {\n this.dataToShow = [{}]\n return {data: ''}\n }\n\n }", "next() {\n const that = this,\n availableItems = that.dataSource.length;\n \n if (that.disabled || availableItems === 0) {\n return;\n }\n\n let nextItem = that._currentIndex;\n\n if(that.loop){\n nextItem = nextItem >= availableItems-1 ? 0 : nextItem + 1;\n }\n else {\n nextItem = nextItem >= availableItems-1 ? nextItem : nextItem + 1;\n }\n\n that._goToItem(nextItem);\n }", "function checkLimit()\n\t\t\t{\n\t\t\t\tif(p.maxLimit == undefined)\n\t\t\t\t\treturn;\n\t\t\t\twhile(dataArray.length > p.maxLimit)\n\t\t\t\t{\n\t\t\t\t\tdataArray.splice(0,1);\n\t\t\t\t}\n\t\t\t}", "handleAllInputs() {\r\n this.limitInputTo(this.inputBill, 99999);\r\n this.limitInputTo(this.inputCustom, 100);\r\n this.limitInputTo(this.inputPeople, 100);\r\n }", "filterSpace(state, payload) {\n let filtered = [];\n if (payload == 0) {\n state.warehouses = state.data;\n } else if (payload > 0 && state.warehouses === null) {\n filtered = state.data.filter((item) => {\n return item.space_available <= payload;\n });\n state.warehouses = filtered;\n } else if (payload > 0 && state.warehouses !== null) {\n filtered = state.warehouses.filter((item) => {\n return item.space_available <= payload;\n });\n state.warehouses = filtered;\n } else {\n alert(\"Cannot Filter for negative values\");\n }\n }", "limit (num = false) {\n return Helpers.is(num, 'Number') ? this.slice(0, num) : this;\n }", "getNextChange() {\n const filterCriteria = [{\n attributeName: 'hasError',\n attributeValue: 0,\n attributeType: 'NUMBER',\n filterCondition: 'EQUALS'\n }];\n return this.getStore().then(s => s.filter(filterCriteria, 'id', {\n offset: 0,\n limit: 1\n })).then((changes) => {\n return changes && changes[0];\n });\n }", "set _physicalStart(val){val=val%this._physicalCount;if(0>val){val=this._physicalCount+val}if(this.grid){val=val-val%this._itemsPerRow}this._physicalStartVal=val}", "function shownoofRecord()\r\n\t{\r\n\t\t$scope.pageSize=$scope.shownoofrec;\r\n\t\tself.Filterreceipts=self.receipts.slice($scope.currentPage*$scope.pageSize);\r\n\t\tif(self.Filterreceipts.length<=$scope.pageSize)\r\n\t\t{\r\n\t\t\t$scope.previousDisabled=true;\r\n\t\t\t$scope.nextDisabled=true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$scope.nextDisabled=false;\r\n\t\t}\r\n\t}", "function handleDataForm(){\n\tvar data_table = tabsFrame.datagrpRestriction;\n\tif ((data_table != '') && data_table != undefined) {\n\t\tvar tgrpPanel = 'tgrp' + tgrp_position + 'Panel';\t\n\t\tvar grid = Ab.view.View.getControl('', tgrpPanel);\n\t\tvar action = grid.actions.get('goNext' + tgrp_position);\n\t\taction.enable(true);\t\t\t\t\n\t\thideButtons(grid); \t\n\t}\n}", "set _physicalStart(val){val=val%this._physicalCount;if(val<0){val=this._physicalCount+val;}if(this.grid){val=val-val%this._itemsPerRow;}this._physicalStartVal=val;}", "onClickBtnNext() {\n if (Number(this.state.data.item1) > (this.state.pageNo + 1) * 10) { \n this.setState({ pageNo: this.state.pageNo + 1 }, () => this.sendPageRequest())\n console.log(\"Sonraki:\" + this.state.searchText + \"-\" + this.state.pageNo)\n }\n }", "function checkLimit() {\n return global.maxItems && global.detailsEnqueued >= global.maxItems;\n}", "async select() {\n const options = this.ctx.request.body.options;\n options.page = this.ctx.bean.util.page(options.page);\n const items = await this.ctx.service.flow.select({\n options,\n user: this.ctx.state.user.op,\n });\n this.ctx.successMore(items, options.page.index, options.page.size);\n }", "updateFlow() {\n this.flow += 1;\n }", "traverse(func, idx = 0) {\n\t\tlet abort = false\n\t\tif(this.canRead) {\n\t\t\tlet payload = this._loadPayloadAt(idx)\n\t\t\tif(payload) {\n\t\t\t\tabort = this.traverse(func, 2 * idx + 1)\n\t\t\t\tif(!abort) {\n\t\t\t\t\tabort = func(payload)\n\t\t\t\t}\n\t\t\t\tif(!abort) {\n\t\t\t\t\tabort = this.traverse(func, 2 * idx + 2)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tabort = true\n\t\t}\n\t\treturn abort\n\t}", "prev() {\n const that = this,\n availableItems = that.dataSource.length;\n \n if (that.disabled || availableItems === 0) {\n return;\n }\n\n let previousItem = that._currentIndex;\n\n if(that.loop){\n previousItem = previousItem <= 0 ? availableItems - 1 : previousItem - 1;\n }\n else {\n previousItem = previousItem <= 0 ? 0 : previousItem - 1;\n }\n\n that._goToItem(previousItem);\n }", "read(existing = [], { field, args, readField, cache }) {\n console.log(\"\\n\\nREAD existing = \", existing);\n const { skip, first } = args;\n\n // Read the number of items, so we can make pagination. For some reason when deleting an item, this is null the first time adn then runs two more times with the correct data?? ??!?!? ? ?? ? ? ? ? ?!?!?\n const data = cache.readQuery({\n query: gql`\n query PAGINATION_QUERY_CACHE {\n itemsConnection {\n aggregate {\n count\n }\n }\n }\n `,\n });\n\n const count = data?.itemsConnection?.aggregate?.count;\n console.log(\"count = \", count);\n\n const page = skip / first + 1;\n const pages = Math.ceil(count / first);\n // 3. See if we have the items we want in the existing cache\n const items = existing\n .slice(skip, skip + first)\n // we filter for empty spots because its likely we have padded spots with nothing in them. IE Someone visits page 3 directly, spots 1-8 will be empty\n .filter(x => x);\n // 4. Account for the last page, where there is incomplete data but we dont have any more so we just send it\n if (items.length && items.length !== args.first && page === pages) {\n console.log(\n `We don't have ${first} items, but it's the last page so we're just gonna send it!`\n );\n return items;\n }\n // 5. If there are enough items, return them.\n // It's possible that we only have 3 of the 4 items because we deleted something on the previous page, so if that is the case we need to go to the network\n if (items.length !== args.first) {\n // TODO: This breaks the last page where we might only have a few items....\n console.log(\n `We only have ${items.length} and we want ${args.first} so we're going to the network to fetch them`\n );\n return; // return undefined so it hits the network\n }\n // 6. If there are items, return them.\n if (items.length) {\n console.log(\n `We have ${items.length} items! Gonna serve them from the cache`\n );\n return items;\n }\n // 7. Otherwise this function returns undefined and it will hit the network for the items, and call merge() for us\n console.log(\"No items! Requesting from network\");\n }", "function getNextItems(){\n getItems(model.itemOffset + model.items.length);\n }", "function changePageNum(num)\n {\n ;\n setNum(num); \n let p1=(pageNum - 1) * 6;\n let p2=pageNum * 6 - 1;\n items=items.slice(p1, p2)\n // setItems(list.slice((pageNum - 1) * 6, pageNum * 6 - 1))\n var list= items.slice((pageNum - 1) * 6, pageNum * 6 - 1)\n // setMyItems({\n // ...items,\n // list\n // });\n\n }", "NextVisible() {}", "@action lessOne() { this.myNumber--; }", "fieldRestriction (e) {\n const {STORE_NUMBER, TRANSACTION_NUMBER, REGISTER_NUMBER} = fieldNames;\n const { name, value } = e.target;\n const maxLimit = name === REGISTER_NUMBER ? 2 : 4;\n\n if ([STORE_NUMBER, TRANSACTION_NUMBER, REGISTER_NUMBER].find((field) => field === name)) {\n this.props.change(name, value.toString().substr(0, maxLimit));\n }\n }", "function handleClick3(event){\n\t \tvar indexFor=event.index;\n\t\tvar graph=event.graph;\n\t\tvar data=graph.data;\n\t\tvar dataContx=data[indexFor].dataContext;\n\t\tvar dataFor=graph.title;\n\t if(dataFor=='Re-Open'){\n\t \tdataFor='Re-opened';\n\t }\n\t getData(dataContx.deptId,dataFor,'Re','dataFor','Level1');\n\t}", "increaseComicsNumber(){\n this.limit += 6;\n }", "limitSelect(event) {\n //gets total number of public assets\n this.getTotal();\n //checks if user selected limit value is between the total number of assets and zero\n if (event.target.value >= this.state.total || event.target.value <= 0) {\n this.setState({ Invalid: true });\n } else {\n this.setState({ limit: event.target.value, Invalid: false });\n }\n }", "function getNextLimitUploaded(all) {\n\t\t\tif (self.activeTab == 'uploadeddailymail') {\n\t\t\t\tself.uploadedList.pageNum = parseInt(self.uploadedList.pageNum) + parseInt(1);\n\t\t\t\tif (all == 'all') {\n\t\t\t\t\talluploaded = true;\n\t\t\t\t}\n\t\t\t\tgetUploaded();\n\t\t\t} else if (self.activeTab == 'unindexeddailymail') {\n\t\t\t\tself.unindexedList.pageNum = parseInt(self.unindexedList.pageNum) + parseInt(1);\n\t\t\t\tif (all == 'all') {\n\t\t\t\t\tallunindexed = true;\n\t\t\t\t}\n\t\t\t\tgetUnindexed();\n\t\t\t}\n\t\t}", "addNoMore() { this.noMore.value++; this.updateHitStat(this.noMore); }", "isMoreToProcess(info, data) {\n if (!info || !data || !data[0]) {\n return false;\n }\n let perPage = bpu.ebayInt(data[0], \"paginationOutput/entriesPerPage\");\n if (!perPage) {\n return false;\n }\n // adding additional search returns\n info.processed += perPage;\n if (info.processed >= info.bp.max_results) {\n return false;\n }\n let totalPages = bpu.ebayInt(data[0], \"paginationOutput/totalPages\");\n if (!totalPages || info.ebay.pageNumber >= totalPages) {\n return false;\n }\n info.ebay.pageNumber += 1;\n return true;\n }", "function changeCurrentIndex(amount) {\n\tskips ++; //Global - I know\n\tcurrent_task += amount;\n\n\t//The loop back... The last item will bring you to the first and the first item gets you to the last.\n\tif(current_task >= tasks.length && amount == 1) current_task = 0;\n\tif(current_task < 0 && amount == -1) current_task = tasks.length - 1;\n\n\tif(skips >= 20) { //Too much recursion\n\t\tcurrent_task = -1;\n\t\talert(\"Internal Error\");\n\t\treturn;\n\t}\n\n\tif(!tasks[current_task]) changeCurrentIndex(amount);\n\telse skips = 0;\n}", "function listMove(steps = 0){\r\n\tif (filter().length > 0)\r\n\titemIndex += steps;\r\n\tif (itemIndex < 0){\r\n\t\titemIndex = filter().length - 1\r\n\t}\r\n\titemIndex %= fStorage.length - 1;\r\n\tupdate();\r\n}", "function nextEmployee(eventTarget,index){\n if(index <= 10){\n let nextIndex = index + 1;\n modalWindowMaker(eventTarget, nextIndex); \n }\n}", "additionalLimit(v) {\n return undefined\n }", "peek(){\n return this.data[this.count]\n }", "paginatePrevious(boundThis) {\n\n this.settings.offset = this.settings.offset - this.settings.show;\n \n const dataSet = this.run();\n\n boundThis.setState({dataToShow: dataSet.data})\n\n return dataSet\n }", "function multiplesThree()\n{\n for(var i = -300; i <=0 ; i = i + 3)\n {\n if(i === -3 || i === -6) // If i is -3 or -6, continue to next value.\n {\n continue;\n }\n else\n {\n console.log(i);\n }\n }\n}", "addFirst(item) {\n const id = this.add(item);\n this.moveTop(id);\n while (this.data.count() > (this.config.limit || this.limit)) {\n this.remove(this.getLastId());\n }\n }", "function GetItem()\n\t{\n\n\t\tquestionNum++;\n\n\t\tif(questionNum<ItemList.length)\n\t\t{\n\t\t\tparent.GetWorldEvent(\"Continue\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tparent.GetWorldEvent(\"Stop\");\n\t\t}\n\t}", "function flushNextChange(onSuccess, onError) {\n var filterCriteria = [{\n 'attributeName' : 'hasError',\n 'attributeValue' : 0,\n 'attributeType' : 'NUMBER',\n 'filterCondition' : 'EQUALS'\n }];\n getStore().filter(filterCriteria, 'id', {\n offset: 0,\n limit: 1\n }).then(function (changes) {\n var change = changes[0];\n if (change) {\n change.params = JSON.parse(change.params);\n flushChange(change, onSuccess.bind(undefined, change), onError.bind(undefined, change));\n } else {\n onSuccess();\n }\n });\n }", "function extendDisplayedItems() {\n var list = currentList();\n if (maxItemsDisplayed === null) {\n initMaxItemsDisplayed();\n } else {\n maxItemsDisplayed = Math.min(maxItemsDisplayed + ITEMS_IN_NEXT_BATCHES, nbItems(list));\n }\n // if (console.log) console.log(\"maxItemsDisplayed: \" + maxItemsDisplayed + \" / \" + nbItems(list));\n updateDisplay(list);\n }", "function getFlowRows() {\n var processFlows = ProcessFlowService.getAll();\n\n $scope.elementaryFlows = {};\n $scope.flowsVisible = processFlows.length > 0;\n if ($scope.flowsVisible) {\n processFlows.forEach( function (pf) {\n if (pf.flow.flowTypeID === 2) {\n $scope.elementaryFlows[pf.flow.flowID] = pf.flow;\n }\n });\n defineGrids();\n extractFragmentFlowData();\n }\n }", "get maxVisibleItems(){ return this.__maxVisibleItems; }", "checkNinjPost() {\r\n if (this.props.data.quantity > 3) {\r\n this.state.disabled = 'disabled'\r\n } else {\r\n\r\n }\r\n }", "toogleVisibilityStatItems ({ commit, dispatch, state }) {\n let nextStatus\n state.statItems === 'visible'\n ? nextStatus = 'hidden'\n : nextStatus = 'visible'\n\n commit('setVisibilityStatItems', nextStatus)\n dispatch('saveUiView')\n }", "function switchToLimitOrder () {\n var limitButtonElement = getLimitButtonElement()\n if (limitButtonElement) {\n limitButtonElement.click()\n return true\n } else {\n return false\n }\n}", "focusFirstItem() {\n const fistNonDisabledItem = getFirstNonDisabledItem(this.props.items);\n this.focusItem(fistNonDisabledItem);\n }", "calulateTotal(index) {\n var { formValues } = this.props;\n var equipments =\n this.props.editChange !== null\n ? this.props.isSiteTask\n ? this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values &&\n this.props.ViewEditScopeDoc.values.sitetask &&\n this.props.ViewEditScopeDoc.values.sitetask[\n this.props.site_index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ].equipments\n : this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values.sites &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index].equipments\n : undefined;\n var miscs =\n this.props.editChange !== null\n ? this.props.isSiteTask\n ? this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values &&\n this.props.ViewEditScopeDoc.values.sitetask &&\n this.props.ViewEditScopeDoc.values.sitetask[\n this.props.site_index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ].miscellaneous\n : this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values.sites &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index].miscellaneous\n : undefined;\n\n var adjustment =\n this.props.editChange !== null\n ? this.props.isSiteTask\n ? this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values &&\n this.props.ViewEditScopeDoc.values.sitetask &&\n this.props.ViewEditScopeDoc.values.sitetask[\n this.props.site_index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ].adjustment_value\n ? this.props.ViewEditScopeDoc.values.sitetask[\n this.props.site_index\n ][index].adjustment_value\n : 0\n : this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values.sites &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index].adjustment_value\n ? this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index].adjustment_value\n : 0\n : 0;\n\n var estimate =\n this.props.editChange !== null\n ? this.props.isSiteTask\n ? this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values &&\n this.props.ViewEditScopeDoc.values.sitetask &&\n this.props.ViewEditScopeDoc.values.sitetask[\n this.props.site_index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ].estimate\n : this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values.sites &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index].estimate\n : undefined;\n var estimate_total = estimate ? calculateEstimate(estimate) : 0;\n\n var total = 0;\n if (equipments)\n total = equipments.reduce((acc, curr) => {\n if (curr.equipment_cost) return acc + parseFloat(curr.equipment_cost);\n else return acc;\n }, total);\n if (miscs)\n total = miscs.reduce((acc, curr) => {\n if (curr.miscellaneous_cost)\n return acc + parseFloat(curr.miscellaneous_cost);\n else return acc;\n }, total);\n // this.setState({ calculated_value: (total + parseFloat(estimate_total)) });\n total = total + parseFloat(estimate_total) + parseFloat(adjustment);\n if (this.props.editChange) {\n if (this.props.isSiteTask) {\n if (\n this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values &&\n this.props.ViewEditScopeDoc.values.sitetask &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ].amount !== undefined\n ) {\n if (\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ].amount != total\n ) {\n this.props.editChange(\n `sitetask[${this.props.site_index}][${index}].amount`,\n total\n );\n this.props.editChange(\n `sitetask[${this.props.site_index}][${index}].calculated_value`,\n total - parseFloat(adjustment)\n );\n }\n } else if (\n this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values &&\n this.props.ViewEditScopeDoc.values.sitetask &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ] &&\n this.props.ViewEditScopeDoc.values.sitetask[this.props.site_index][\n index\n ].amount === undefined\n ) {\n this.props.editChange(\n `sitetask[${this.props.site_index}][${index}].amount`,\n total\n );\n this.props.editChange(\n `sitetask[${this.props.site_index}][${index}].calculated_value`,\n total - parseFloat(adjustment)\n );\n }\n } else {\n if (\n this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values.sites &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex].tasks[\n index\n ] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex].tasks[\n index\n ].amount !== undefined\n ) {\n if (\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks[index].amount != total\n ) {\n this.props.editChange(\n `sites[${this.props.siteIndex}].tasks[${index}].amount`,\n total\n );\n this.props.editChange(\n `sites[${this.props.siteIndex}].tasks[${index}].calculated_value`,\n total - parseFloat(adjustment)\n );\n }\n } else if (\n this.props.ViewEditScopeDoc &&\n this.props.ViewEditScopeDoc.values.sites &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex]\n .tasks &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex].tasks[\n index\n ] &&\n this.props.ViewEditScopeDoc.values.sites[this.props.siteIndex].tasks[\n index\n ].amount === undefined\n ) {\n this.props.editChange(\n `sites[${this.props.siteIndex}].tasks[${index}].amount`,\n total\n );\n this.props.editChange(\n `sites[${this.props.siteIndex}].tasks[${index}].calculated_value`,\n total - parseFloat(adjustment)\n );\n }\n }\n }\n\n return { total: total, calculated_value: total - parseFloat(adjustment) };\n /* Object.keys(formValues).filter(key => key.startsWith('value$')) */\n }", "function checkIndex(index, data)\n {\n if(!Number.isInteger(index))\n {\n throw `Please enter a valid index numebr.`\n }\n else if(index < 0 || index > data.length -1 )\n {\n throw `Given index is out of bound.`\n }\n else\n {\n return index;\n }\n }", "function reduceLimit() {\n limit -= 3;\n}", "function loopPremissionCheck(info_read, callback){\n \n if (info_read.length === 0) return callback(info_read)\n var filteredRows = []\n let loopStep = 0\n permissionLoopChecker()\n\n function permissionLoopChecker(){\n\n \n function checkComplete(returnedValue){\n if(returnedValue == true){\n filteredRows.push( info_read[loopStep] )\n CheckEndOrIncrement()\n }else{\n return failure(returnedValue)\n }\n }\n\n function CheckEndOrIncrement(){\n loopStep++\n if (loopStep >= info_read.length){\n return callback(filteredRows)\n }else{\n permissionLoopChecker()\n }\n }\n\n permissionCheckAbstraction(theDatabaseInfo[permissionToCheck], info_read[loopStep]).then(checkComplete)\n\n }\n\n }", "if(props.listLength > this.props.listLength) {\n this.setState({\n // list has more items now\n didEndReached: false,\n // set page number to next value\n page: this.state.page + 1,\n // BUG: endReachedThreshold only triggers once\n // so chaing this values for a small amount, endReachedThreshold\n // will always be fired when list did end reached\n endReachedThreshold: Math.random() * 1e-5,\n });\n }", "function checkValue(numItem, pageToRemove) {\r\n\t\tif(numItem != -1){\r\n\t\t\tdisplayHome(pageToRemove);\r\n\t\t}\r\n\t}", "setMaxItems(value) {\n if (value === 0) value = null; //reset to unlimited items.\n\n this.settings.maxItems = value;\n this.refreshState();\n }", "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.length - this._count - 1;\n }\n }", "onCompleteByLimitTime(setData) {\n console.log('time到达上限');\n setData({ a: 'time limit' });\n times = 0;\n }", "filterOption(e) {\n let selectedVal=parseInt(e.target.value,0);\n this.tempWorkloadData ={ labels: this.props.workloadData.labels,\n datasets: this.props.workloadData.datasets};\n\n // If selected value is less than total number then do this\n if(Math.abs(selectedVal) <= this.props.workloadData.labels.length)\n {\n let tempLabels = this.tempWorkloadData.labels;\n this.tempWorkloadData.labels= tempLabels.slice(selectedVal);\n }\n this.showChart();\n }", "loadMoreSearchResult(event){\n Session.set(\"limit\",Session.get(\"limit\")+6)\n }", "set _physicalStart(val) {\n val = val % this._physicalCount;\n\n if (val < 0) {\n val = this._physicalCount + val;\n }\n\n if (this.grid) {\n val = val - val % this._itemsPerRow;\n }\n\n this._physicalStartVal = val;\n }", "transfomationIsValid(trans, currentStep, r, begin) {\n if (trans.length === 0)\n return true;\n if (r.id <= 7)\n return true;\n /// LIST RESULT\n // console.log(\"\\n=====LIST RESULT:\");\n // console.log(\"CURRENT:\"+ExpressionToString(currentStep));\n if (r.id <= 6)\n return true;\n for (let i = begin; i < trans.length; i++) {\n let exp = trans[i].oldEXP;\n if (exp.id === currentStep.id || exp.id.includes(currentStep.id))\n return false;\n }\n // for (let i = 0; i < this.result.length; i++) {\n // if(this.result[i].detail[this.result[i].detail.length-1].exp.id === currentStep.id)return false;\n // }\n // console.log('====>END CHECK VALID TRANSFOMATION');\n return true;\n }", "canAddNumberToList () {\n let rows = this.state.rows\n return rows[rows.length - 1] !== 0\n }", "function limit_and_composite( data )\n {\n var temp_index\n \n \n $(\"#listview\").empty();\n for( i = 0; i < data.length; i++ )\n {\n\t data[i].limit_std = parseInt( data[i].limit_std*conversion_factor*100)/100\n\t data[i].limit_avg = parseInt( data[i].limit_avg*conversion_factor*100)/100\n\t data[i].composite_avg = parseInt( data[i].composite_avg*conversion_factor*100)/100\n\t data[i].composite_std = parseInt( data[i].composite_std*conversion_factor*100)/100\n\t $(\"#listview\").append('<li><h5>'+generate_description( i , schedule_name)+\"<br>Flow Limits Avg: \"+data[i].limit_avg+\" Std: \"+data[i].limit_std+\"<br>Last Value Avg: \"+data[i].composite_avg+\n\t \" Std: \"+data[i].composite_std +\"</h5> </li>\")\n \n\t }\n $(\"#listview\").listview(\"refresh\"); \n }", "throw_if_less_than(num) {\n if ((this.pos + num - 1) >= this.buffer.length) {\n throw Error(\"eof\");\n }\n }", "function next() {\n if ($scope.options.index < pageCount - 1) {\n $scope.options.index++;\n }\n }", "function viewLow() {\n var query = \"SELECT item_id, product_name, department_name, price, stock_quantity FROM products\";\n connection.query(query, function (err, res) {\n console.log(\"Item # Product Department Price # in stock\\n ----------------------------\");\n for (var i = 0; i < res.length; i++) {\n // ... that have < 5 in the stock_quantity column\n if (res[i].stock_quantity < 5) {\n console.log(res[i].item_id + \" | \", res[i].product_name + \" | \", res[i].department_name + \" | \", \"$\" + res[i].price + \" | \", res[i].stock_quantity + \"\\n ----------------------------\");\n }\n }\n setTimeout(actions, 500);\n });\n}", "rangeCheck(index) {\n if (index >= this.sizeNum || index < 0) {\n throw new Error(\"is no index--->\" + index);\n }\n }", "loadMoreData () {\n if (this.hasGetMoreItemsAction) {\n this.sendAction(GET_MORE_ITEMS_ACTION, setItemsPromise.bind(this), this.get('itemsInternal.length'));\n }\n }", "startData() { return {\r\n //part1\r\n unlocked: true,\r\n\t\tpoints: new ExpantaNum(0),\r\n total: new ExpantaNum(0)\r\n }}", "function reduceRecordsNo(numberToReduceTo) {\n //Alerts\n if (rowCount < numberToReduceTo && rowCount > 0 && zeroValues === 0) {\n triggerModal(\"There are only \" + rowCount + \" records in your selection!\", \"alert\");\n } else if (rowCount < numberToReduceTo && rowCount > 0 && zeroValues > 0) {\n let startString = \"There are only \" + (rowCount + zeroValues) + \" records in your selection!\\n\" + zeroValues + \" of them\";\n\n if (zeroValues > 1) {\n let secondString = \" are \";\n let fourthString = \" have \";\n } else {\n let secondString = \" is \";\n let fourthString = \" has \";\n }\n\n let thirdString = \"zero and\";\n let fifthString = \"been removed from the selection.\";\n\n triggerModal(startString + secondString + thirdString + fourthString + fifthString, \"alert\");\n } else if (rowCount === 0 && zeroValues > 0) {\n triggerModal(\"All the records in your selection are zero!\", \"alert\");\n } else if (rowCount > numberToReduceTo) {\n let string1 = \"There are \" + rowCount + \" records in your selection!\\n\";\n let string2 = \"Currently displaying the first \" + numberToReduceTo + \".\\nPlease see the\" +\n \" 'Record Selection' tab for a breakdown of your selection to further refine it.\"\n if (zeroValues > 0) {\n let message = string1 + \"Zero value records have been removed.\\n\" + string2;\n triggerModal(message, \"alert\");\n } else {\n let message = string1 + string2;\n triggerModal(message, \"alert\");\n }\n\n\n //The user has selected n records. n is > numberToReduceTo, therefore, show the user the dates of their selected records.\n populateRecordOverflow(journeyData);\n }\n\n //Iterate Backwards Over Data Array & Splice Necessary Records\n for (let i = rowCount - 1; i >= 0; i--) {\n if (journeyData.length > numberToReduceTo) {\n journeyData.splice(i, 1);\n }\n }\n }", "getFirstIndex() {\n // index of the top item\n return (this.maxIndex - Math.floor(this.index)) % this.maxIndex; \n }", "[TYPE.M_FILM_NOWPLAYINGLENGTH](state,data){\n state.total = data;\n }", "function question5 () {\n for (let i = 0; i < data.length; i++) {\n if (data[i].materials.length >= 8) {\n // measures the length of each item's materials and if it is 8 or more\n console.log(data[i].title, data[i].materials.length, data[i].materials);\n }\n }\n}", "_goToItem(index, fireEvent) {\n const that = this,\n itemsCount = that.dataSource.length,\n oldIndex = that._currentIndex;\n let newIndex = index;\n\n if (index < 0) {\n newIndex = 0;\n }\n else if (index > (itemsCount - 1)) {\n newIndex = itemsCount - 1\n }\n\n that._removeFadeOut();\n that._animationTrigger();\n that._handleIndicatorsState(oldIndex, newIndex);\n that._handleItemsState(oldIndex, newIndex);\n that._currentIndex = newIndex;\n fireEvent && that._changeEvent(oldIndex, newIndex);\n that._handle3dMode(newIndex);\n that._handleMultipleMode(newIndex);\n that._handleArrowsActiveState(newIndex, oldIndex);\n }", "analyzeMerchantLoyalty(safetyTally){\n\n if(this.props.route.params.product.firstTranDateRange >= 365){\n safetyTally += 2;\n } \n if(this.props.route.params.product.firstTranDateRange >= 1095){\n safetyTally += 2;\n } \n\n return safetyTally;\n }", "click(){\r\n if ( !this.isDisabled && !this.readnly ){\r\n this.getRef('input').focus();\r\n if ( this.filteredData.length ){\r\n this.isOpened = !this.isOpened;\r\n }\r\n }\r\n }", "next(){\n let next = this.currentId + 1;\n if(next >= this.list.length){\n next = this.list.length;\n }\n this.goto(next);\n }", "function IncrementTaskNonBlock()\n{\n if (data.taskNum < data.taskList.length-1)\n\tdata.taskNum++;\n data.SaveState();\n floatingDaily.Draw();\n}", "function firstOrNth() {\n\n }", "function expandWrokflowList(workflowName)\n {\n var isWfHidden = container.find(\".perc-itemname[title='\"+ workflowName+ \"']\").is('.perc-hidden');\n if($(\"#perc-wf-min-max\").is(\".perc-items-maximizer\")) {\n $(\"#perc-wf-min-max\").trigger(\"click\");\n }\n if(isWfHidden) {\n $(\"#perc-workflows-list\").find('.perc-moreLink').trigger(\"click\");\n }\n }", "function startNewRow (index, count) {\n console.log(index, count);\n return ((index) % count) === 0;\n }", "function smallestNItems(items, n) {\n // Replace this with your code\n}", "more(){\n this.offset += this.limit;\n this.start();\n }", "function goToLastQuestion(){ \r\n\tcount--\r\n\tupdateItems();\r\n}", "function filterItem (){\n let filter = valorfilter();\n estructuraFilter = \"\";\n if (filter == \"Prime\"){\n for (propiedad of carrito) {\n if (propiedad.premium) imprimirItemFilter(propiedad);\n }\n noItenCarrito();\n } else if (filter == \"Todos\") {\n estructuraPrincipalCarrito();\n } \n}", "slideTo(index) {\n const that = this;\n\n index = index ? parseInt(index) : 0;\n\n if (that.disabled || index < 0 || index> that._items.length) {\n return;\n }\n\n that._goToItem(index);\n }", "_activeChanged(newValue,oldValue){// bubble up event from state being set\nthis.state=\"active item is \"+this.active;this.items.forEach((element,index,array)=>{// if the current item is disabled, check the 1 prior to it if we can\nif(\"disabled\"==this.items[index].metadata.status){// do nothing, it's disabled unless....\nif(0!=index&&this.progressiveUnlock&&\"complete\"==this.items[index-1].metadata.status){this.items[index].metadata.status=\"loading\";this.set(\"items.\"+index+\".metadata.status\",\"loading\");this.notifyPath(\"items.\"+index+\".metadata.status\")}}// or if our value is at max AND it's the last item in the list\nelse if(this.items[index].metadata.value>=this.items[index].metadata.max&&index==this.items.length-1){this.items[index].metadata.status=\"finished\";this.set(\"items.\"+index+\".metadata.status\",\"finished\");this.notifyPath(\"items.\"+index+\".metadata.status\")}// or if we're just at max then mark us complete\nelse if(this.items[index].metadata.value>=this.items[index].metadata.max){this.items[index].metadata.status=\"complete\";this.set(\"items.\"+index+\".metadata.status\",\"complete\");this.notifyPath(\"items.\"+index+\".metadata.status\")}// or if the index is the currently active item\nelse if(index==this.active){// see if we have the data for it already otherwise trigger loading\nif(typeof this._responseList[index]===typeof void 0){this.items[index].metadata.status=\"loading\";this.set(\"items.\"+index+\".metadata.status\",\"loading\");this.notifyPath(\"items.\"+index+\".metadata.status\")}// if we already had a response, then mark available\nelse{this.activeNodeResponse=this._responseList[index];this.items[index].metadata.status=\"available\";this.set(\"items.\"+index+\".metadata.status\",\"available\");this.notifyPath(\"items.\"+index+\".metadata.status\")}}else{// we didn't match any cases, just leave it active\nthis.items[index].metadata.status=\"available\";this.set(\"items.\"+index+\".metadata.status\",\"available\");this.notifyPath(\"items.\"+index+\".metadata.status\")}})}", "function checker() {\n if (position >= size) {\n position = 0;\n }\n else if (position < 0) {\n position = size - 1;\n }\n //console.log(position);\n }", "function skip(){\r\n\tanswers[count] = 'skip';\r\n\tcount++ \r\n\tupdateItems();\r\n}", "function SplitFlowx(e,obj)\n {\n myDiagram.startTransaction(\"Split flow\");\n Link = myDiagram.selection.first();\n toNode = Link.toNode;\n fromNode = Link.fromNode;\n MoveSet = toNode.findTreeParts();\n myDiagram.model.removeLinkData(Link.data);\n\n\n offsetx =null;\n//\t\tif (LeftiNode(fromNode)!=null)\n//\t\t{\n//\t\t\toffsetx = minx-toNode.data.loc.x;\n//\t\t}\n//\t\telse\n {\n offsetx = fromNode.data.loc.x-toNode.data.loc.x;\n }\n minx = 99999999999999;\n\n\n myDiagram.moveParts(MoveSet,new go.Point(offsetx,200),true);\n myDiagram.commitTransaction(\"Split flow\");\n }", "function startFlow() {\n\tyCo = 8;\n \n\tfor (xCo = 0; xCo < 6; xCo++) {\n\t\tif (map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY(yCo * 64), 'Tile Layer 1') != null && map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY(yCo * 64), 'Tile Layer 1').index == 10) {\n\t\t\tmap.getTile(layer1.getTileX(xCo * 64), layer1.getTileY((yCo - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY((yCo - 1) * 64), 'Tile Layer 1');\n\t\t\tanimateFlow(curPipe);\n\t\t\tcheckIfFlowable(curPipe);\n\t\t\ttimerBar.destroy();\n\t\t\tflowTimer = game.time.events.loop(Phaser.Timer.SECOND * flowSpeed, runFlow, this);\n\t\t}\n\t}\n flowStarted = true;\n}", "changePercentage(percentage,mode){var newp=0;// support for adding and removing percentage as well as setting\nif(\"add\"==mode){newp=this.items[this.active].metadata.value+percentage}else if(\"subtract\"==mode){newp=this.items[this.active].metadata.value-percentage}else{newp=percentage}// after establishing the new percentage, make sure it's less then max\n// if it's at or over max then we need to trigger events and state to change\nif(newp>=this.items[this.active].metadata.max){if(this.items.length==this.active+1){// fire an event change to indicate that this happened\nthis.state=\"finished\";this.items[this.active].metadata.status=\"finished\";this.set(\"items.\"+this.active+\".metadata.status\",\"finished\");this.notifyPath(\"items.\"+this.active+\".metadata.status\");// need to make sure finished happens prior to value set to 100\n// otherwise this will kick off the circle to complete itself\nthis.items[this.active].metadata.value=this.items[this.active].metadata.max;this.set(\"items.\"+this.active+\".metadata.value\",this.items[this.active].metadata.max);this.notifyPath(\"items.\"+this.active+\".metadata.value\")}else{// set value = max which will automatically trigger complete in the circle\nthis.items[this.active].metadata.value=this.items[this.active].metadata.max;this.set(\"items.\"+this.active+\".metadata.value\",this.items[this.active].metadata.max);this.notifyPath(\"items.\"+this.active+\".metadata.value\")}// ensure we still have more items to go in the list\nif(this.items.length>this.active+1){// if we have progressive unlocking then set the next thing available\n// assuming that the next thing is currently disabled and that we're not\n// on the first item. OR, if we don't have a response for the current\n// item in local storage then let's mark loading to kick off the calls\nif(this.progressiveUnlock&&\"complete\"==this.items[this.active].metadata.status&&\"disabled\"==this.items[this.active+1].metadata.status||typeof this._responseList[this.active+1]===typeof void 0){this.items[this.active+1].metadata.status=\"loading\";this.set(\"items.\"+(this.active+1)+\".metadata.status\",\"loading\");this.notifyPath(\"items.\"+(this.active+1)+\".metadata.status\")}// set state so it gets reported upstream in events\nthis.state=\"active item is \"+(this.active+1);// bump active ahead 1 because we still have more items in the list\nthis.active=this.active+1}}else{this.items[this.active].metadata.value=newp;this.set(\"items.\"+this.active+\".metadata.value\",newp);this.notifyPath(\"items.\"+this.active+\".metadata.value\")}}", "_nextItem() {\n if (this.newItemNumber === \"review\") {\n this.set('looped.all', true);\n }\n this.set('route.path', '/' + this.newItemNumber);\n this.set('looped.last', this.itemNumber);\n }", "async opcode7() {\n this.writeData(\n Number(this.getParameter(1) < this.getParameter(2)),\n 3);\n\n this.position += 4;\n }" ]
[ "0.5690883", "0.5311678", "0.5290672", "0.5168561", "0.5142593", "0.51268005", "0.4991036", "0.49759328", "0.4947757", "0.49148992", "0.4912665", "0.4898238", "0.48551947", "0.4844317", "0.48417974", "0.48272336", "0.48217312", "0.48174116", "0.48081303", "0.4784529", "0.4756754", "0.47346625", "0.4716752", "0.47137195", "0.47073466", "0.46994162", "0.46993494", "0.46968254", "0.46956375", "0.46587905", "0.46429652", "0.4631319", "0.45996344", "0.45969576", "0.45929784", "0.45882225", "0.45862758", "0.4580901", "0.45779553", "0.457332", "0.45468873", "0.45452282", "0.4530666", "0.4529163", "0.45271638", "0.45261085", "0.4500584", "0.44985372", "0.4495641", "0.44927287", "0.44839567", "0.4483256", "0.44776326", "0.44746268", "0.44725594", "0.4469953", "0.44688776", "0.44687164", "0.4466537", "0.4460581", "0.44590527", "0.44585964", "0.4446143", "0.4444772", "0.44441676", "0.44432563", "0.44431397", "0.44422224", "0.44321972", "0.44304407", "0.44288227", "0.4427573", "0.44236833", "0.44209418", "0.44127902", "0.44106346", "0.44067818", "0.44040474", "0.4397215", "0.43969125", "0.43919608", "0.43895665", "0.43880767", "0.43874055", "0.4385805", "0.43837985", "0.4381132", "0.43795434", "0.43760648", "0.43733105", "0.43729055", "0.43634206", "0.43632972", "0.4358904", "0.4356862", "0.4355793", "0.4353543", "0.43440458", "0.43433723", "0.43353838" ]
0.5594103
1
The number of elements to skip in the data stream
skip(num){ if( num <= 0 ) throw new Error("Skip value must be greater than 0"); var flow = new RangeMethodFlow(num, Number.MAX_VALUE); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function skip() {\n\t return that._source.slice(4).then(function(chunk) {\n\t if (chunk == null) return {done: true, value: undefined};\n\t header = view(array = concat(array.slice(4), chunk));\n\t return header.getInt32(0, false) !== that._index ? skip() : read();\n\t });\n\t }", "skipBytes(numBytes) {\n if (numBytes > this.numBytesLeft())\n errors.throwErr(errors.ERR_UNEXPECTED_END_OF_DATA);\n this.pos += numBytes;\n }", "skip(count) {\n if (count < 0 || count == null) {\n return this;\n }\n return new SkipIterator(this, count);\n }", "function parse_FtSkip(blob, length) { blob.l += 2; blob.l += blob.read_shift(2); }", "function parse_FtSkip(blob, length) { blob.l += 2; blob.l += blob.read_shift(2); }", "function parse_FtSkip(blob, length) { blob.l += 2; blob.l += blob.read_shift(2); }", "function parse_FtSkip(blob, length) { blob.l += 2; blob.l += blob.read_shift(2); }", "function skip(count) {\n return function (source) { return source.lift(new SkipOperator(count)); };\n}", "skipBytes(amount = 1) {\n this.skipBits(amount * 8);\n }", "getNextSkipAmount(){\n let bitLength = 1, offset = 0;\n while( this.isNextBitSet() ) offset += Math.pow(2,bitLength++);\n return offset + this.extractBinaryNumber(bitLength);\n }", "function skipTo(end) {\n let len = end.length\n\n while (!input.eof() && input.peek(len) !== end) {\n input.next()\n }\n while (!input.eof() && len) {\n input.next()\n len--\n }\n }", "skip8 () {\n this.pos++;\n }", "function parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); }", "function parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); }", "function parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); }", "function parse_FtSkip(blob) { blob.l += 2; blob.l += blob.read_shift(2); }", "function parse_FtSkip(blob) {\n blob.l += 2;\n blob.l += blob.read_shift(2);\n }", "function skip(){\r\n\tanswers[count] = 'skip';\r\n\tcount++ \r\n\tupdateItems();\r\n}", "skipUB4() {\n return this._readInteger(4, false, true);\n }", "unused() {\r\n return this._storage.byteLength - this._readIndex;\r\n }", "skipUB8() {\n return this._readInteger(8, false, true);\n }", "function skip(){\n\t\n}", "function onSkip(count) {\n if (count == 2) {\n _this.primusServer.removeListener('heartbeat-skipped', onSkip);\n setTimeout(function () {\n _this.relay.stopLargePayload();\n }, 100);\n }\n }", "skipSB4() {\n return this._readInteger(4, true, true);\n }", "skip(amt) {\n // Push query part for `skip` and return self\n this.pts.push({ type : 'skip', skipAmount : amt });\n return this;\n }", "function skip() {\n video.currentTime += parseFloat(this.dataset.skip);\n}", "function skip() {\n video.currentTime += parseFloat(this.dataset.skip); // ex. this.dataset.skip = \"25\"\n}", "function skip() {\n video.currentTime += +this.dataset.skip;\n}", "function skip(){\n video.currentTime += parseFloat(this.dataset.skip);\n}", "size() {\r\n let runner = this.data.head;\r\n let count = 0;\r\n while(runner != null) {\r\n runner = runner.next;\r\n count++;\r\n }\r\n return count;\r\n }", "function Skip(page,limit) {\n var skip = 0;\n if (page > 1) {\n skip = (page - 1) * limit;\n }\n return skip;\n}", "get size() {\n if (this.isEmpty)\n return 0;\n let size = this.nextLayer.size;\n for (let chunk of this.chunk)\n size += chunk.value.length;\n return size;\n }", "size() {\r\n let count = 0;\r\n let runner = this.data.head;\r\n while(runner != null) {\r\n runner = runner.next;\r\n count++;\r\n }\r\n return count;\r\n }", "skipBits(amount = 1) {\n this.at += amount;\n }", "skip(num) {\r\n this.query.set(\"$skip\", num.toString());\r\n return this;\r\n }", "skipUB1() {\n this.skipBytes(1);\n }", "skipToken(length) {\n this.line = this.linetok;\n this.linepos = this.linetokpos;\n this.forward(length);\n }", "resetSkipBuffer(){\n this.skipRequest = 0;\n this.skippers = [];\n }", "function skip() {\n return null;\n }", "function TakeIterator(source, count) {\r\n this._source = source;\r\n this._count = count;\r\n }", "numBytesLeft() {\n return this.size - this.pos;\n }", "function count() {\r\n return data.length;\r\n}", "skipNum(num) {\n this.skip = num;\n return this;\n }", "function getNumberOfPages(data) {\n return new Array(Math.ceil(data.length / vm.pagesize));\n }", "function Skip() { return Skip }", "getSize () {\n let counter = 1;\n let curr = head;\n while (curr.next !== null) {\n counter++;\n }\n return counter;\n }", "function numPages()\n{\n return Math.ceil(objJson.length / records_per_page);\n}", "skipUB2() {\n return this._readInteger(2, false, true);\n }", "function countSamples() {\r\n\treturn samplesPayload.length;\r\n}", "function skip() {\n\t this.shouldSkip = true;\n\t}", "function skip() {\n\t this.shouldSkip = true;\n\t}", "function getStackDepthToSkip() {\n var depth = 0;\n if (\n typeof _currentScript !== \"undefined\" &&\n _currentScript &&\n typeof _currentScript.skipStackDepth === \"number\"\n ) {\n depth = _currentScript.skipStackDepth;\n }\n return depth;\n}", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (NumberIsNaN(n)) {\n // Only flow one buffer at a time.\n if (state.flowing && state.length) return state.buffer.first().length;\n return state.length;\n }\n if (n <= state.length) return n;\n return state.ended ? state.length : 0;\n} // You can override either this method, or the async _read(n) below.", "function SBRecordsetPHP_getPageSize()\r\n\r\n{\r\n\r\n return this.getParameter(this.EXT_DATA_RR_PAGE_SIZE) ;\r\n\r\n}", "skip(opSt) { return false; }", "function countUpFromOneTo ( times, skip ) { // declared functions hoist with their definitions to the top of their scope\n return Object.keys( [ ...Array( times ) ] ).filter( ( e, i ) => ( i + 1 ) % skip && e > 0 ).forEach( ( e ) => console.log( e ) );\n}", "function numPages() {\n console.log(Math.ceil(countryData.length / records_per_page));\n return Math.ceil(countryData.length / records_per_page);\n}", "function uniqueSkipHelper(index, length) {\n return Math.floor(index / length) + 1;\n }", "function SBRecordsetPHP_getPageSize()\r\n{\r\n return this.getParameter(this.EXT_DATA_RR_PAGE_SIZE) ;\r\n}", "function getCount(inpt)\r\n{\r\n\tvar len=inpt.length;\r\n\treturn len;\r\n\t\t\r\n\t\r\n}", "function beforeChunk() {\n chunkErrorCount = 0;\n chunkOrdersProcessed = 0;\n chunkSkippedOrders = [];\n}", "function stream_length(xs) {\n if (is_empty_list(xs)) {\n\treturn 0;\n } else {\n\treturn 1 + stream_length(stream_tail(xs));\n }\n}", "size() {\n\t\tvar runner = this.head;\n\t\tvar counter = 0;\n\n\t\twhile (runner != null) {\n\t\t\tcounter += 1;\n\t\t\trunner = runner.next;\n\t\t}\n\t\treturn counter;\n\t}", "size() {\n\t\tvar runner = this.head;\n\t\tvar counter = 0;\n\n\t\twhile (runner != null) {\n\t\t\tcounter += 1;\n\t\t\trunner = runner.next;\n\t\t}\n\t\treturn counter;\n\t}", "function skip() {\n this.shouldSkip = true;\n}", "function skipFive () {\n for (i= 0; i <= 100; i++) {\n if (i % 5 === 0) {\n console.log(i);\n }\n }\n}", "function $Fj4k$var$howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = $Fj4k$var$computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function size() {\n\t return n;\n\t }", "static getEntryCount(dummydata) {\n return dummydata.length;\n }", "function yylength() {\n return zzMarkedPos-zzStartRead;\n }", "function $SYhk$var$howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = $SYhk$var$computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "skipAheadBy(numChars) {\n const prevPos = this._pos;\n this._pos += numChars;\n if (this._pos > this._text.length) {\n this._pos = this._text.length;\n }\n // Pass the consumed text to the line counting code. The char at the new current pos\n // hasn't been consumed yet, so it is excluded from the consumed text!\n this._incLineCount(this._text.substring(prevPos, this._pos));\n return this._pos;\n }", "size() {\n let len = 0;\n let runner = this.head;\n\n while (runner) {\n len += 1;\n runner = runner.next;\n }\n return len;\n }", "skip(offset) {\r\n this.builder.skip(offset);\r\n return this;\r\n }", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){\n// Only flow one buffer at a time\nif(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}\n// If we're asking for more than the current hwm, then raise the hwm.\nif(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;\n// Don't have enough\nif(!state.ended){state.needReadable=true;return 0}return state.length}", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){// Only flow one buffer at a time\nif(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;}// If we're asking for more than the current hwm, then raise the hwm.\nif(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;// Don't have enough\nif(!state.ended){state.needReadable=true;return 0;}return state.length;}// you can override either this method, or the async _read(n) below.", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){// Only flow one buffer at a time\nif(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;}// If we're asking for more than the current hwm, then raise the hwm.\nif(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;// Don't have enough\nif(!state.ended){state.needReadable=true;return 0;}return state.length;}// you can override either this method, or the async _read(n) below.", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){// Only flow one buffer at a time\n if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;}// If we're asking for more than the current hwm, then raise the hwm.\n if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;// Don't have enough\n if(!state.ended){state.needReadable=true;return 0;}return state.length;}// you can override either this method, or the async _read(n) below.", "get stride() {}", "getPosition(){\n let peekedBytesLength = this.peekedBytes == null ? 0 : this.peekedBytes.length\n return this.reader.position - peekedBytesLength\n }", "size() {\n let current, counter;\n [current, counter] = [this.head, 0];\n while (current) {\n counter++;\n current = current.next;\n }\n return counter;\n }", "function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){// Only flow one buffer at a time\n\tif(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;}// If we're asking for more than the current hwm, then raise the hwm.\n\tif(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;// Don't have enough\n\tif(!state.ended){state.needReadable=true;return 0;}return state.length;}// you can override either this method, or the async _read(n) below.", "function size() {\n return n;\n }", "getBlockHeight() {\n let i=0;\n let self = this;\n return new Promise(function(resolve,reject) {\n self.chain.createReadStream()\n .on('data',function(data) {\n i++;\n }).on('end',function() {\n if (i > 0) {\n i--;\n }\n resolve(i);\n }).on('error',function(error) {\n console.log(error)\n reject(error);\n });\n });\n }", "function packetLength(data) {\n return 8 + data.readInt32BE(0);\n}", "function readNBytes (to_read) {\n function aux(bytes_read, buffer, chunk) {\n if (!chunk.isEOF()) {\n for (var i = 0, b = bytes_read; i < chunk.data().length && b < to_read; i++, b++) {}\n chunk.data().copy(buffer, bytes_read, 0, i);\n bytes_read += i;\n if (bytes_read == to_read) {\n var leftover = chunk.data().slice(i,chunk.data().length);\n return iter.Iteratee.Enough(buffer, leftover.length > 0 ? leftover : undefined);\n } else {\n return iter.Iteratee.Partial(aux.partial(bytes_read, buffer));\n }\n } else {\n return iter.Iteratee.Partial(aux.partial(bytes_read, buffer));;\n }\n };\n return iter.Iteratee.Partial(aux.partial(0, new Buffer(to_read)));\n}", "function howMuchToRead(n, state) {\n if (n <= 0 || (state.length === 0 && state.ended)) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;\n else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark)\n state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n }", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n }", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n }", "trimStart(count) {\n if (count > this._length) {\n count = this._length;\n }\n this._startIndex += count;\n this._length -= count;\n this.onTrimEmitter.fire(count);\n }", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.", "function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below." ]
[ "0.69645816", "0.6717245", "0.6171246", "0.6139315", "0.6139315", "0.6139315", "0.6139315", "0.60687983", "0.6066338", "0.6034649", "0.59845823", "0.59341836", "0.5928784", "0.5928784", "0.5928784", "0.5928784", "0.5812787", "0.5783848", "0.5734192", "0.5641494", "0.5611645", "0.560344", "0.5589405", "0.5581017", "0.5574505", "0.5569067", "0.5558047", "0.5509195", "0.5483275", "0.5464914", "0.54443806", "0.54171556", "0.5398958", "0.5361506", "0.5308062", "0.5287846", "0.5271648", "0.5246124", "0.52282566", "0.5215204", "0.52130926", "0.5195985", "0.5183829", "0.516713", "0.51490945", "0.5134809", "0.5126022", "0.5086376", "0.508249", "0.50736946", "0.50736946", "0.50694406", "0.50527275", "0.50244766", "0.501833", "0.50176173", "0.5017453", "0.5011264", "0.4994182", "0.49783894", "0.49766684", "0.496875", "0.49618256", "0.49618256", "0.49542502", "0.49435237", "0.49424988", "0.49421412", "0.4932484", "0.492792", "0.4905672", "0.49049553", "0.48951644", "0.48941532", "0.4890902", "0.48861876", "0.48861876", "0.48807254", "0.4858568", "0.48557317", "0.4853801", "0.48438087", "0.48298466", "0.4827314", "0.4824788", "0.48172864", "0.48150036", "0.48108622", "0.48035747", "0.47994387", "0.47931018", "0.47931018", "0.47931018", "0.47931018", "0.47931018", "0.47931018", "0.47931018", "0.47931018", "0.47931018", "0.47931018" ]
0.5469301
29
Skip until the condition in the function argument returns true
skipUntil(func){ if( !Util.isFunction(func) ) throw new Error("skipUntil requires a function"); var flow = new SkipTakeWhileUntilFlow(func, 1); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "skipWhile(func){\n if( !Util.isFunction(func) )\n throw new Error(\"skipWhile requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 2);\n setRefs(this, flow);\n\n return flow;\n }", "takeWhile(func){\n if( !Util.isFunction(func) )\n throw new Error(\"takeWhile requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 4);\n setRefs(this, flow);\n\n return flow;\n }", "skip(opSt) { return false; }", "takeUntil(func){\n if( !Util.isFunction(func) )\n throw new Error(\"takeUntil requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 3);\n setRefs(this, flow);\n\n return flow;\n }", "function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}", "function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}", "function skip(){\n\t\n}", "async resolveWhile(predicate) {\n let x = await this.next();\n let shouldContinue = predicate(x.value);\n while ((!x.done) && shouldContinue) {\n x = await this.next();\n shouldContinue = predicate(x.value);\n }\n }", "shouldSkip () {\n const {skema} = this\n\n if (!skema.hasWhen()) {\n return this._shouldSkip()\n }\n\n return skema.when(\n this.args, this.context, this.options)\n .then(hit => {\n if (!hit) {\n // Skip\n return true\n }\n\n return this._shouldSkip()\n })\n }", "function unless(test, then){\n if(!test) then();\n}", "doUnless(condition, func) {\n if(typeof condition === 'function') {\n return this.doIf((data) => !condition(data), func)\n } else {\n return this.doIf(!condition, func)\n }\n }", "function Skip() { return Skip }", "function unless(test, then){\n if(!test) then();\n}", "function takeWhile(f, a) {\n for (var i = 0; i < a.length; ++i)\n if (! f(a[i])) break;\n\n return a.slice(0, i);\n}", "function until(condiiton, block)\n{\n\tvar cond = condition()\n\twhile (!cond)\n\t{\n\t\tblock()\n\t\tcond = condition()\n\t}\n}", "function unless(test, then) {\r\n\tif(!test) then();\r\n}", "function unless(test, then) {\n if(!test) then();\n}", "function unless(test, then) {\n if (!test) then();\n}", "function unless(test, then) {\n if (!test) then();\n}", "function untilTrue(array) {\n // While first element of array returns false from args[1] -- remove first element\n while (!args[1](array[0])) {\n array.shift();\n }\n // return array with removed elements array[0] now returns true for args[1]\n return array;\n }", "function unless(test, then) {\n if (!test)\n then()\n}", "function eachContinue(array, fn) {\n var length = array.length;\n for (var i = 0; i < length; ++i) {\n if (!fn(array[i], i)) {\n break;\n }\n }\n}", "function unless(test, then) {\n if (!test) then();\n}", "function printOddNumbersLessThan( number ) {\n for( let x = 1; x < number; x++ ) {\n //Here we perform another action so we need a second function\n if ( !checkForOddNumber( x ) ) {\n continue;\n }\n \n console.log( x );\n }\n}", "function returnUntil(ctx, condition) {\n let blocks = ctx.blockStack.stack;\n let blk;\n let rm = null;\n for (let i = -2; i >= -blocks.length; i--) {\n blk = listGet(blocks, i);\n if (condition(blk)) {\n rm = i+1;\n break;\n }\n }\n if (rm === null)\n return null;\n\n\n return {\n pre: blocks.slice(0, rm),\n post: blocks.slice(rm),\n current: blk\n };\n}", "function takeWhile(arr, f) {\n let n = 0;\n for (; n < arr.length; n++) {\n if (!f(arr[n])) {\n break;\n }\n }\n return arr.slice(0, n);\n}", "function skipUntil(notifier) {\n return function (source) { return source.lift(new SkipUntilOperator(notifier)); };\n}", "function unless(b) {\n return unlessM(core.succeedWith(b));\n}", "takeWhile(predicate) {\n const self = this;\n return new Seq(function* () {\n for (const element of self) {\n if (predicate(element))\n yield element;\n else\n break;\n }\n });\n }", "function promiseWhile(condition, result, body) {\n return _promiseWhile(condition, result, body, 0);\n}", "function dropWhile(pred, foldable) {\n var take = false;\n return filter(function(x) { return take = take || !pred(x); }, foldable);\n }", "__skipStep() {\n this.skipStep();\n }", "function iterateUntil(fun, check, init) {\n var ret = [],\n result = fun(init);\n\n while (check(result)) {\n ret.push(result);\n result = fun(result);\n }\n\n return ret;\n}", "function condition() {\n const message = (previousBlockNumber == currentBlockNumber) ? 'not yet' : 'next block found';\n verbose(`waitNextBlock: condition: previous:${previousBlockNumber} current:${currentBlockNumber} - ${message}`);\n if (currentBlockNumber === undefined) return true;\n if (previousBlockNumber === undefined) return true;\n // keep going while current is same as previous\n return previousBlockNumber == currentBlockNumber ;\n }", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n if (!condition()) return done.resolve();\n Q.when(body(), loop, done.reject);\n }\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "function checkWith(predicate) {\n return suspend(() => predicate() ? P.unit : P.retry);\n}", "function takeWhile(predicate, inclusive) {\n if (inclusive === void 0) {\n inclusive = false;\n }\n return function (source) {\n return source.lift(new TakeWhileOperator(predicate, inclusive));\n };\n}", "function neverReturns(a) {\n while (true) {\n }\n}", "function takeWhile(pred, foldable) {\n var take = true;\n return filter(function(x) { return take = take && pred(x); }, foldable);\n }", "function takeWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (0, idx);\n };\n }", "function skip() {\n return null;\n }", "dropWhile(predicate) {\n const self = this;\n return new Seq(function* () {\n const iter = self[Symbol.iterator]();\n while (true) {\n const { value, done } = iter.next();\n if (done)\n break;\n if (!predicate(value)) {\n yield value;\n yield* iterableOfIterator(iter);\n }\n }\n });\n }", "function dropElements(arr, func) {\n // Creating args variable from arguments object\n var args = [...arguments];\n // Setting - array of numbers to be checked - equal to first element of args array\n var numArray = args[0];\n /* untiTrue returns passed array with values dropped from front - that return false from \n function from arguments (args[1]) - until an element returns true*/\n function untilTrue(array) {\n // While first element of array returns false from args[1] -- remove first element\n while (!args[1](array[0])) {\n array.shift();\n }\n // return array with removed elements array[0] now returns true for args[1]\n return array;\n }\n \n console.log(untilTrue(numArray));\n }", "function dropUntil(pred) {\n return self => dropUntil_(self, pred);\n}", "function doWhileLoop(Y)\n{\n do {\n Y.shift()\n return Y\n } while (Y.length > 0 && maybeTrue());\n\n}", "function check_next(args, next) {\n ret = a.t.call(args)\n if (ret.includes(\"is missing\") || ret.includes(\"unlocked\") || ret.includes(\"Denied\")) {\n return true\n }\n }", "function canSkip (strictMode, postpone, passedPercent, postponePercent) {\n return !((postpone && passedPercent <= postponePercent) || strictMode)\n}", "function keepdo(condition, callback) {\n if(condition)\n callback();\n else\n setTimeout(function() { keepdo(condition, callback)}, 100);\n }", "function when(b) {\n return unless(() => !b());\n}", "function canSkip(strictMode, postpone, passedPercent, postponePercent) {\n return !((postpone && passedPercent <= postponePercent) || strictMode)\n}", "function useless(test, then) {\n if (!test) then()\n}", "function repeatUntil_(self, f) {\n return P.chain_(self, a => f(a) ? P.succeed(a) : repeatUntil_(self, f));\n}", "function continueOrFailWith(e, pf) {\n return fa => continueOrFailWith_(fa, e, pf);\n}", "function asyncWhile(conditionFunction, workFunction) {\n\n function loop() {\n return WinJS.Promise.as(conditionFunction()).\n then(function (shouldContinue) {\n if (shouldContinue) {\n return WinJS.Promise.as(workFunction()).then(loop);\n } else {\n return WinJS.Promise.wrap();\n }\n });\n }\n\n return loop();\n}", "function unless(pred) {\n return ifElse (pred) (I);\n }", "static async doUntil(func, msec, _ntries) {\n let ix, done;\n let ntries = _ntries || Number.MAX_SAFE_INTEGER;\n\n for (ix = 0; ix < ntries; ++ix) {\n done = await func();\n if (done)\n return true;\n \n JSUtils.sleep(msec);\n }\n\n return false;\n }", "function dropWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (idx);\n };\n }", "function waitUntil(condition, callback) {\n eval(' var result = (' + condition +')' );\n //console.log('result = ' + result);\n if (result) {\n callback();\n } else {\n // Waiting\n setTimeout(function(){\n waitUntil(condition, callback);\n },100);\n }\n }", "function xEachUntilReturn(c, f, s) {\r\n var r, l = c.length;\r\n for (var i=(s || 0); i < l; i++) {\r\n r = f(c[i], i, l);\r\n if (r !== undefined)\r\n break;\r\n }\r\n return r;\r\n}", "function skip() {\n\t this.shouldSkip = true;\n\t}", "function skip() {\n\t this.shouldSkip = true;\n\t}", "function continueOrFail(e, pf) {\n return fa => continueOrFail_(fa, e, pf);\n}", "function takeWhileInclusive(predicate) {\n return source => _rxjsCompatUmdMin.Observable.create(observer => source.subscribe(x => {\n observer.next(x);\n\n if (!predicate(x)) {\n observer.complete();\n }\n }, err => {\n observer.error(err);\n }, () => {\n observer.complete();\n }));\n} // Concatenate the latest values from each input observable into one big list.", "function unless_(self, b) {\n return unless(b)(self);\n}", "function tryFuncKey(keyName, step, root, func_array) {\n\tif(PINE.keyApplies(keyName, root)){\n\t\t//check all steps before current step for holds on domNode\n\t\tfor(var i = 0; i < PINE.OrderOfOperations.length; i++){\n\t\t\tvar check_step = PINE.OrderOfOperations[i];\n\n\t\t\t// console.log(\"checking step \"+check_step+\" to \"+step+\" in \"+root.tagName);\n\t\t\tif(step == check_step) break;\n\t\t\telse if(U.get(root, \"_pine_.holds[\"+check_step+\"].length\")) \n\t\t\t{\n\t\t\t\tconsole.log(\"should wait\");\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\n\t\t}\n\n\t\tapplyFuncArray(root, PINE.get(keyName), func_array);\n\t}\n\treturn true;\n}", "function someCallback(item) {\n if (item % 2 === 0) {\n return true;\n }\n}", "function continueOrFailWithM(e, pf) {\n return fa => continueOrFailWithM_(fa, e, pf);\n}", "function dropWhen(state, x, xs) {\n var input = lift(skipIfTrue, dropRepeats(state), xs)\n return dropIf(isSkip, x, input)\n}", "function skip() {\n this.shouldSkip = true;\n}", "function repeatWhile_(self, f, __trace) {\n return repeatWhileM_(self, a => (0, _core.succeed)(f(a)), __trace);\n}", "function takeWhile (arr, pred) {\n let result = [];\n for (let i = 0; i < arr.length; i++) {\n if (pred(arr[i])) {\n result.push(arr[i]);\n } else {\n break;\n }\n }\n return result;\n}", "function repeatWhile_(self, f) {\n return P.chain_(self, a => f(a) ? repeatWhile_(self, f) : P.succeed(a));\n}", "function condition() {\n verbose(`waitQuery`, `condition: current ${currentCount} expected ${count} done: ${!(currentCount != count)}`);\n return currentCount != count;\n }", "continueIfEnabled(callback) {\r\n if (!this.continueEnabled) {\r\n return;\r\n }\r\n callback();\r\n this.continueEnabled = false;\r\n if (!this.continueTimeout) {\r\n this.continueTimeout = setTimeout(() => {\r\n this.continueEnabled = true;\r\n this.continueTimeout = null;\r\n }, 1000);\r\n }\r\n }", "function skipWaiting() {\n\n self.skipWaiting();\n }", "function skip(state, handleElse) {\n var prog = state.prog;\n var ip = state.ip;\n var nesting = 1;\n var ins;\n\n do {\n ins = prog[++ip];\n if (ins === 0x58) {\n // IF\n nesting++;\n } else if (ins === 0x59) {\n // EIF\n nesting--;\n } else if (ins === 0x40) {\n // NPUSHB\n ip += prog[ip + 1] + 1;\n } else if (ins === 0x41) {\n // NPUSHW\n ip += 2 * prog[ip + 1] + 1;\n } else if (ins >= 0xb0 && ins <= 0xb7) {\n // PUSHB\n ip += ins - 0xb0 + 1;\n } else if (ins >= 0xb8 && ins <= 0xbf) {\n // PUSHW\n ip += (ins - 0xb8 + 1) * 2;\n } else if (handleElse && nesting === 1 && ins === 0x1b) {\n // ELSE\n break;\n }\n } while (nesting > 0);\n\n state.ip = ip;\n }", "function ignore_if_disabled(obj, fun) {\n if (obj.is('.disabled')) {\n return false;\n } else {\n return fun();\n }\n}", "function until(item, selector, fn) {\n var sibling = item[fn];\n\n while (sibling && !matches(sibling, selector)) {\n sibling = sibling[fn];\n }\n\n return sibling;\n }", "function rejectCondition(el, idx, ary){\n return el % 2 === 0;\n}", "function eachContinue(object, fn) {\n for (var key in object) {\n if (hasKey(object, key)) {\n if (!fn(key, object[key])) {\n break;\n }\n }\n }\n}", "function f() {\n while (false) {\n return 1;\n }\n }", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n // When the result of calling `condition` is no longer true, we are\n // done.\n if (!condition()) return done.resolve();\n // Use `when`, in case `body` does not return a promise.\n // When it completes loop again otherwise, if it fails, reject the\n // done promise\n Q.when(body(), loop, done.reject);\n }\n\n // Start running the loop in the next tick so that this function is\n // completely async. It would be unexpected if `body` was called\n // synchronously the first time.\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n // When the result of calling `condition` is no longer true, we are\n // done.\n if (!condition()) return done.resolve();\n // Use `when`, in case `body` does not return a promise.\n // When it completes loop again otherwise, if it fails, reject the\n // done promise\n Q.when(body(), loop, done.reject);\n }\n\n // Start running the loop in the next tick so that this function is\n // completely async. It would be unexpected if `body` was called\n // synchronously the first time.\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n // When the result of calling `condition` is no longer true, we are\n // done.\n if (!condition()) return done.resolve();\n // Use `when`, in case `body` does not return a promise.\n // When it completes loop again otherwise, if it fails, reject the\n // done promise\n Q.when(body(), loop, done.reject);\n }\n\n // Start running the loop in the next tick so that this function is\n // completely async. It would be unexpected if `body` was called\n // synchronously the first time.\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "function skip(state, handleElse)\n{\n var prog = state.prog;\n var ip = state.ip;\n var nesting = 1;\n var ins;\n\n do {\n ins = prog[++ip];\n if (ins === 0x58) // IF\n nesting++;\n else if (ins === 0x59) // EIF\n nesting--;\n else if (ins === 0x40) // NPUSHB\n ip += prog[ip + 1] + 1;\n else if (ins === 0x41) // NPUSHW\n ip += 2 * prog[ip + 1] + 1;\n else if (ins >= 0xB0 && ins <= 0xB7) // PUSHB\n ip += ins - 0xB0 + 1;\n else if (ins >= 0xB8 && ins <= 0xBF) // PUSHW\n ip += (ins - 0xB8 + 1) * 2;\n else if (handleElse && nesting === 1 && ins === 0x1B) // ELSE\n break;\n } while (nesting > 0);\n\n state.ip = ip;\n}", "function dropElements(arr, func) {\n var limit = arr.length;\n\n for (i = 0; i < limit; i++) {\n var isTrue = func(arr[0]);\n\n if (isTrue) {\n return arr;\n }\n arr.shift();\n }\n\n return arr;\n}", "function skip(state, handleElse)\n{\n const prog = state.prog;\n let ip = state.ip;\n let nesting = 1;\n let ins;\n\n do {\n ins = prog[++ip];\n if (ins === 0x58) // IF\n nesting++;\n else if (ins === 0x59) // EIF\n nesting--;\n else if (ins === 0x40) // NPUSHB\n ip += prog[ip + 1] + 1;\n else if (ins === 0x41) // NPUSHW\n ip += 2 * prog[ip + 1] + 1;\n else if (ins >= 0xB0 && ins <= 0xB7) // PUSHB\n ip += ins - 0xB0 + 1;\n else if (ins >= 0xB8 && ins <= 0xBF) // PUSHW\n ip += (ins - 0xB8 + 1) * 2;\n else if (handleElse && nesting === 1 && ins === 0x1B) // ELSE\n break;\n } while (nesting > 0);\n\n state.ip = ip;\n}", "function continueOrRetry(pf) {\n return fa => continueOrRetry_(fa, pf);\n}", "shouldContinue(candidate) {\n return sum(candidate) <= this.sum;\n }", "meetsCondition(condition, opts) {\n return this._node.__eventually(() => this._node.wait.untilElement(' meets condition', () => condition(this._node), opts));\n }", "if (/*ret DOES NOT contain any hint on any of the arguments (lock is cracked)*/) {\n break; //Break loop (since further attempts are not neccessary)\n }", "function dropToLoop(condExpr)\r\n{\r\n assertRunning();\r\n if (condExpr && !evalWithVars(condExpr))\r\n return;\r\n var activeCmdStack = callStack.top().cmdStack;\r\n var loopState = activeCmdStack.unwindTo(Stack.isLoopBlock);\r\n return loopState;\r\n}", "function someValue(element) {\n return element !== args[i]\n }", "function until(item, selector, fn){\n var sibling = item[fn];\n while(sibling && !matches(sibling, selector)){\n sibling = sibling[fn];\n }\n\n return sibling;\n }", "function until(item, selector, fn){\n var sibling = item[fn];\n while(sibling && !matches(sibling, selector)){\n sibling = sibling[fn];\n }\n\n return sibling;\n }", "function until(item, selector, fn){\n var sibling = item[fn];\n while(sibling && !matches(sibling, selector)){\n sibling = sibling[fn];\n }\n\n return sibling;\n }", "function some(arrayArg,test){\n//loop through the array \n for(var i=0; i<arrayArg.length; i++){\n//if the function ever evaluates to true within the loop then return true\n if(test(arrayArg[i]))\n return true;\n \t\t}\n //if the function never evaluates as true, then return false\n return false;\n }", "function some(arr, condition) {\n\tfor (var i = 0; i < arr.length; i++) {\n if (condition(arr[i])) {\n \treturn true;\n } //end if\n }//end for\n return false;\n}", "function dropUntil_(self, pred) {\n return (0, _drop.drop_)((0, _dropWhile.dropWhile_)(self, (0, _index.not)(pred)), 1);\n}", "function getRandomElement(array, condition) {\n let index = Math.floor(Math.random() * array.length);\n while (condition && !condition(array[index])) {\n index = (index + 1) % array.length;\n }\n return array[index];\n}" ]
[ "0.7029516", "0.6718507", "0.67023265", "0.66092503", "0.65189856", "0.65189856", "0.65139866", "0.6432234", "0.6400434", "0.6175636", "0.6145253", "0.6144896", "0.61159474", "0.6108472", "0.6106238", "0.60610074", "0.6059095", "0.6037861", "0.6037861", "0.60053694", "0.59980994", "0.5982059", "0.59779215", "0.59523326", "0.5941964", "0.5908532", "0.5877866", "0.58053744", "0.5805103", "0.58006394", "0.579637", "0.57761216", "0.5765057", "0.57488185", "0.56848824", "0.5675878", "0.5674847", "0.56697214", "0.56645024", "0.5642472", "0.56330895", "0.5625306", "0.5622359", "0.5618072", "0.5614288", "0.5593787", "0.5592219", "0.55778354", "0.5577719", "0.5550699", "0.55483055", "0.552825", "0.5521482", "0.5513515", "0.5501222", "0.5487931", "0.5487368", "0.54812", "0.54522884", "0.5447716", "0.5447716", "0.5446758", "0.540645", "0.5378174", "0.5361419", "0.53340036", "0.5330636", "0.5325085", "0.5324183", "0.531324", "0.53021795", "0.5295644", "0.5292685", "0.52830476", "0.5281683", "0.5279706", "0.52788275", "0.52731806", "0.5270107", "0.5267003", "0.52583516", "0.5255525", "0.5255525", "0.5255525", "0.5253509", "0.5253344", "0.5248521", "0.5244648", "0.5243926", "0.5237634", "0.52347654", "0.52344924", "0.52200866", "0.51916623", "0.51916623", "0.51916623", "0.5191251", "0.51887864", "0.5187536", "0.5178153" ]
0.6817808
1
Skip while the condition in the function argument returns true
skipWhile(func){ if( !Util.isFunction(func) ) throw new Error("skipWhile requires a function"); var flow = new SkipTakeWhileUntilFlow(func, 2); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "skip(opSt) { return false; }", "takeWhile(func){\n if( !Util.isFunction(func) )\n throw new Error(\"takeWhile requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 4);\n setRefs(this, flow);\n\n return flow;\n }", "async resolveWhile(predicate) {\n let x = await this.next();\n let shouldContinue = predicate(x.value);\n while ((!x.done) && shouldContinue) {\n x = await this.next();\n shouldContinue = predicate(x.value);\n }\n }", "function skip(){\n\t\n}", "skipUntil(func){\n if( !Util.isFunction(func) )\n throw new Error(\"skipUntil requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 1);\n setRefs(this, flow);\n\n return flow;\n }", "function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}", "function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}", "shouldSkip () {\n const {skema} = this\n\n if (!skema.hasWhen()) {\n return this._shouldSkip()\n }\n\n return skema.when(\n this.args, this.context, this.options)\n .then(hit => {\n if (!hit) {\n // Skip\n return true\n }\n\n return this._shouldSkip()\n })\n }", "takeUntil(func){\n if( !Util.isFunction(func) )\n throw new Error(\"takeUntil requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 3);\n setRefs(this, flow);\n\n return flow;\n }", "function takeWhile(f, a) {\n for (var i = 0; i < a.length; ++i)\n if (! f(a[i])) break;\n\n return a.slice(0, i);\n}", "function Skip() { return Skip }", "function doWhileLoop(Y)\n{\n do {\n Y.shift()\n return Y\n } while (Y.length > 0 && maybeTrue());\n\n}", "function untilTrue(array) {\n // While first element of array returns false from args[1] -- remove first element\n while (!args[1](array[0])) {\n array.shift();\n }\n // return array with removed elements array[0] now returns true for args[1]\n return array;\n }", "function printOddNumbersLessThan( number ) {\n for( let x = 1; x < number; x++ ) {\n //Here we perform another action so we need a second function\n if ( !checkForOddNumber( x ) ) {\n continue;\n }\n \n console.log( x );\n }\n}", "function unless(test, then){\n if(!test) then();\n}", "function unless(test, then){\n if(!test) then();\n}", "function eachContinue(array, fn) {\n var length = array.length;\n for (var i = 0; i < length; ++i) {\n if (!fn(array[i], i)) {\n break;\n }\n }\n}", "function takeWhile(arr, f) {\n let n = 0;\n for (; n < arr.length; n++) {\n if (!f(arr[n])) {\n break;\n }\n }\n return arr.slice(0, n);\n}", "function neverReturns(a) {\n while (true) {\n }\n}", "function unless(test, then) {\r\n\tif(!test) then();\r\n}", "function unless(test, then) {\n if (!test)\n then()\n}", "function unless(test, then) {\n if(!test) then();\n}", "function dropWhile(pred, foldable) {\n var take = false;\n return filter(function(x) { return take = take || !pred(x); }, foldable);\n }", "__skipStep() {\n this.skipStep();\n }", "function unless(test, then) {\n if (!test) then();\n}", "function unless(test, then) {\n if (!test) then();\n}", "function unless(test, then) {\n if (!test) then();\n}", "doUnless(condition, func) {\n if(typeof condition === 'function') {\n return this.doIf((data) => !condition(data), func)\n } else {\n return this.doIf(!condition, func)\n }\n }", "function canSkip (strictMode, postpone, passedPercent, postponePercent) {\n return !((postpone && passedPercent <= postponePercent) || strictMode)\n}", "function dropToLoop(condExpr)\r\n{\r\n assertRunning();\r\n if (condExpr && !evalWithVars(condExpr))\r\n return;\r\n var activeCmdStack = callStack.top().cmdStack;\r\n var loopState = activeCmdStack.unwindTo(Stack.isLoopBlock);\r\n return loopState;\r\n}", "function promiseWhile(condition, result, body) {\n return _promiseWhile(condition, result, body, 0);\n}", "function doWhileLoop(x)\n{\n x--;\n do \n {\n console.log(\"I run once regardless\");\n } while(x-- > 0);\n}", "function canSkip(strictMode, postpone, passedPercent, postponePercent) {\n return !((postpone && passedPercent <= postponePercent) || strictMode)\n}", "function dropElements(arr, func) {\n // Creating args variable from arguments object\n var args = [...arguments];\n // Setting - array of numbers to be checked - equal to first element of args array\n var numArray = args[0];\n /* untiTrue returns passed array with values dropped from front - that return false from \n function from arguments (args[1]) - until an element returns true*/\n function untilTrue(array) {\n // While first element of array returns false from args[1] -- remove first element\n while (!args[1](array[0])) {\n array.shift();\n }\n // return array with removed elements array[0] now returns true for args[1]\n return array;\n }\n \n console.log(untilTrue(numArray));\n }", "function whileLoop(x)\n{\n while (x>0)\n {\n console.log(x--);\n }\n \n return \"done\";\n}", "function repeatWhile_(self, f, __trace) {\n return repeatWhileM_(self, a => (0, _core.succeed)(f(a)), __trace);\n}", "function f() {\n while (false) {\n return 1;\n }\n }", "function takeWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (0, idx);\n };\n }", "function until(condiiton, block)\n{\n\tvar cond = condition()\n\twhile (!cond)\n\t{\n\t\tblock()\n\t\tcond = condition()\n\t}\n}", "function takeWhile(pred, foldable) {\n var take = true;\n return filter(function(x) { return take = take && pred(x); }, foldable);\n }", "function dropWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (idx);\n };\n }", "function asyncWhile(conditionFunction, workFunction) {\n\n function loop() {\n return WinJS.Promise.as(conditionFunction()).\n then(function (shouldContinue) {\n if (shouldContinue) {\n return WinJS.Promise.as(workFunction()).then(loop);\n } else {\n return WinJS.Promise.wrap();\n }\n });\n }\n\n return loop();\n}", "dropWhile(predicate) {\n const self = this;\n return new Seq(function* () {\n const iter = self[Symbol.iterator]();\n while (true) {\n const { value, done } = iter.next();\n if (done)\n break;\n if (!predicate(value)) {\n yield value;\n yield* iterableOfIterator(iter);\n }\n }\n });\n }", "function skip() {\n\t this.shouldSkip = true;\n\t}", "function skip() {\n\t this.shouldSkip = true;\n\t}", "takeWhile(predicate) {\n const self = this;\n return new Seq(function* () {\n for (const element of self) {\n if (predicate(element))\n yield element;\n else\n break;\n }\n });\n }", "function keepdo(condition, callback) {\n if(condition)\n callback();\n else\n setTimeout(function() { keepdo(condition, callback)}, 100);\n }", "function skip() {\n return null;\n }", "function unless(b) {\n return unlessM(core.succeedWith(b));\n}", "function takeWhile(predicate, inclusive) {\n if (inclusive === void 0) {\n inclusive = false;\n }\n return function (source) {\n return source.lift(new TakeWhileOperator(predicate, inclusive));\n };\n}", "function skipUntil(notifier) {\n return function (source) { return source.lift(new SkipUntilOperator(notifier)); };\n}", "function repeatWhile_(self, f) {\n return P.chain_(self, a => f(a) ? repeatWhile_(self, f) : P.succeed(a));\n}", "function check_next(args, next) {\n ret = a.t.call(args)\n if (ret.includes(\"is missing\") || ret.includes(\"unlocked\") || ret.includes(\"Denied\")) {\n return true\n }\n }", "continueIfEnabled(callback) {\r\n if (!this.continueEnabled) {\r\n return;\r\n }\r\n callback();\r\n this.continueEnabled = false;\r\n if (!this.continueTimeout) {\r\n this.continueTimeout = setTimeout(() => {\r\n this.continueEnabled = true;\r\n this.continueTimeout = null;\r\n }, 1000);\r\n }\r\n }", "function skip() {\n this.shouldSkip = true;\n}", "function condition() {\n const message = (previousBlockNumber == currentBlockNumber) ? 'not yet' : 'next block found';\n verbose(`waitNextBlock: condition: previous:${previousBlockNumber} current:${currentBlockNumber} - ${message}`);\n if (currentBlockNumber === undefined) return true;\n if (previousBlockNumber === undefined) return true;\n // keep going while current is same as previous\n return previousBlockNumber == currentBlockNumber ;\n }", "function dropWhen(state, x, xs) {\n var input = lift(skipIfTrue, dropRepeats(state), xs)\n return dropIf(isSkip, x, input)\n}", "function iterateUntil(fun, check, init) {\n var ret = [],\n result = fun(init);\n\n while (check(result)) {\n ret.push(result);\n result = fun(result);\n }\n\n return ret;\n}", "function when(b) {\n return unless(() => !b());\n}", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n if (!condition()) return done.resolve();\n Q.when(body(), loop, done.reject);\n }\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "function continueOrFail(e, pf) {\n return fa => continueOrFail_(fa, e, pf);\n}", "function useless(test, then) {\n if (!test) then()\n}", "function checkSkip() {\n if(thisObj.state != YT_PLAY) return false\n if(getQueryVariable('v') != curVideoId()) return false\n if(!needSkip()) return false\n doSkip()\n }", "function takeWhile (arr, pred) {\n let result = [];\n for (let i = 0; i < arr.length; i++) {\n if (pred(arr[i])) {\n result.push(arr[i]);\n } else {\n break;\n }\n }\n return result;\n}", "function continueOrFailWith(e, pf) {\n return fa => continueOrFailWith_(fa, e, pf);\n}", "function repeatWhileM_(self, f, __trace) {\n return (0, _core.chain_)(self, a => (0, _core.chain_)(f(a), b => b ? repeatWhileM_(self, f) : (0, _core.succeed)(a)), __trace);\n}", "function whileLoop(n){\nwhile ( 0 < n ){\n console.log(--n);\n}\nif (n <= 1 ){\nreturn 'done';\n }\n}", "function loopInfinito() {\n while (true) { }\n}", "function returnUntil(ctx, condition) {\n let blocks = ctx.blockStack.stack;\n let blk;\n let rm = null;\n for (let i = -2; i >= -blocks.length; i--) {\n blk = listGet(blocks, i);\n if (condition(blk)) {\n rm = i+1;\n break;\n }\n }\n if (rm === null)\n return null;\n\n\n return {\n pre: blocks.slice(0, rm),\n post: blocks.slice(rm),\n current: blk\n };\n}", "function nonRecursiveLoop(val, test, update, body) {\n while (!!test(val)){\n body(val);\n val = update(val);\n }\n}", "function repeatWhile(f, __trace) {\n return self => repeatWhile_(self, f, __trace);\n}", "function dropElements(arr, func) {\n var limit = arr.length;\n\n for (i = 0; i < limit; i++) {\n var isTrue = func(arr[0]);\n\n if (isTrue) {\n return arr;\n }\n arr.shift();\n }\n\n return arr;\n}", "function dropUntil(pred) {\n return self => dropUntil_(self, pred);\n}", "function onlyOdds(numbers) {\n for (let i = 0; i <= numbers; i++) {\n if (i % 2 == 0) {\n continue;\n }\n console.log(i);\n }\n}", "function inspect(val) {\n if (ignoreResult || shouldContinue(val)) {\n return iterate();\n } else {\n return next.cancel(val);\n }\n }", "function unless_(self, b) {\n return unless(b)(self);\n}", "@action\n skipStep() {\n let step = this.currentStep.next;\n let skipToStep = this.currentStep.skip;\n\n while (step !== skipToStep) {\n this.skippedSteps.push(step);\n step = this.steps[step].next;\n }\n\n this.step = step;\n }", "static async doUntil(func, msec, _ntries) {\n let ix, done;\n let ntries = _ntries || Number.MAX_SAFE_INTEGER;\n\n for (ix = 0; ix < ntries; ++ix) {\n done = await func();\n if (done)\n return true;\n \n JSUtils.sleep(msec);\n }\n\n return false;\n }", "function arrayWhile(array) {\n //Write your code here\n}", "function every(arrayArg,test){\n//loop through the array \n for(var i=0; i<arrayArg.length; i++){\n//the array is accepted as an argument to the function argument (test)\n//if the function evaluates to false within the loop then return false\n if(!test(arrayArg[i]))\n return false;\n \t\t}\n//if the array is looped through and never false, then return true \n return true;\n }", "function unless(pred) {\n return ifElse (pred) (I);\n }", "function takeWhileInclusive(predicate) {\n return source => _rxjsCompatUmdMin.Observable.create(observer => source.subscribe(x => {\n observer.next(x);\n\n if (!predicate(x)) {\n observer.complete();\n }\n }, err => {\n observer.error(err);\n }, () => {\n observer.complete();\n }));\n} // Concatenate the latest values from each input observable into one big list.", "function bug1() {\n var x;\n while (true) { ++x; continue; }\n}", "dropWhile(array, predicate){\r\n //declare function to call predicate\r\n const myPred = (element, index) => {\r\n //return the index value of first false element\r\n return !(predicate(element, index, array));\r\n }\r\n \tlet dropNumber = array.findIndex(myPred);\r\n //call drop function to slice elements to new array\r\n let droppedArray = this.drop(array, dropNumber);\r\n \treturn droppedArray;\r\n }", "function ignore_if_disabled(obj, fun) {\n if (obj.is('.disabled')) {\n return false;\n } else {\n return fun();\n }\n}", "function whileFunc(row) {\n if(row != null && row.style.display == 'none') {\n return true;\n }\n return false;\n }", "function dropElements(arr, func) {\n var times = arr.length;\n for (var i = 0; i < times; i++) {\n if (func(arr[0])) {\n break;\n } else {\n arr.shift();\n }\n }\n //return arr;\n console.log(arr);\n}", "noMoreTurns() {\n if (this.turns === 9) \n return true;\n else \n return false;\n \n }", "function repeatUntil_(self, f) {\n return P.chain_(self, a => f(a) ? P.succeed(a) : repeatUntil_(self, f));\n}", "function checkWith(predicate) {\n return suspend(() => predicate() ? P.unit : P.retry);\n}", "function continueOrRetry(pf) {\n return fa => continueOrRetry_(fa, pf);\n}", "function someCallback(item) {\n if (item % 2 === 0) {\n return true;\n }\n}", "function condition() {\n verbose(`waitQuery`, `condition: current ${currentCount} expected ${count} done: ${!(currentCount != count)}`);\n return currentCount != count;\n }", "function filteritout(num)\n{\n if(num<=0)\n {\n return true;\n }\n return false\n}", "function eachContinue(object, fn) {\n for (var key in object) {\n if (hasKey(object, key)) {\n if (!fn(key, object[key])) {\n break;\n }\n }\n }\n}", "function skipSequence() {\n skip = true;\n Velocity($skipBtn, 'transition.slideDownOut');\n}", "function skip(){\r\n\tanswers[count] = 'skip';\r\n\tcount++ \r\n\tupdateItems();\r\n}", "function inspect(val) {\r\n if (ignoreResult || shouldContinue(val)) {\r\n return iterate();\r\n }\r\n return next.cancel(val);\r\n }", "hasNext() {\n return !this.done;\n }", "hasNext() {\n return !this.done;\n }" ]
[ "0.6879535", "0.6777159", "0.66293716", "0.65964663", "0.6511093", "0.6500644", "0.6500644", "0.64705396", "0.62586856", "0.62370336", "0.62226963", "0.6222539", "0.61811286", "0.61511815", "0.6101928", "0.6062624", "0.60604185", "0.6048583", "0.5979251", "0.5973103", "0.5966916", "0.59639263", "0.59426916", "0.5941719", "0.5931518", "0.5931518", "0.588823", "0.58778036", "0.58469224", "0.58232415", "0.5806399", "0.5803612", "0.5784797", "0.57665884", "0.5766485", "0.5766235", "0.5755993", "0.5736758", "0.5721985", "0.5717735", "0.5709119", "0.5705257", "0.56875676", "0.56863034", "0.56863034", "0.56758165", "0.5629407", "0.56271285", "0.5623185", "0.56158113", "0.5570661", "0.55638564", "0.5546909", "0.55436933", "0.553336", "0.5529938", "0.5518215", "0.5511875", "0.54875624", "0.5486721", "0.5480592", "0.5470242", "0.5467843", "0.5466718", "0.5444333", "0.543807", "0.54065824", "0.5400483", "0.5385805", "0.53789574", "0.537563", "0.5371349", "0.5366111", "0.53509474", "0.53494245", "0.5344673", "0.5339103", "0.53357446", "0.53314346", "0.53285474", "0.5321935", "0.53140336", "0.53074276", "0.53020877", "0.530113", "0.52957547", "0.52912724", "0.52865946", "0.52807", "0.52764463", "0.5270926", "0.52661264", "0.52655274", "0.5253026", "0.5252795", "0.5252031", "0.5251919", "0.52485096", "0.52483636", "0.52483636" ]
0.7103854
0
Keep accepting the piped data until the condition in the function argument returns true This method also takes the data that meets the condition but skips after
takeUntil(func){ if( !Util.isFunction(func) ) throw new Error("takeUntil requires a function"); var flow = new SkipTakeWhileUntilFlow(func, 3); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async resolveWhile(predicate) {\n let x = await this.next();\n let shouldContinue = predicate(x.value);\n while ((!x.done) && shouldContinue) {\n x = await this.next();\n shouldContinue = predicate(x.value);\n }\n }", "takeWhile(func){\n if( !Util.isFunction(func) )\n throw new Error(\"takeWhile requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 4);\n setRefs(this, flow);\n\n return flow;\n }", "skipWhile(func){\n if( !Util.isFunction(func) )\n throw new Error(\"skipWhile requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 2);\n setRefs(this, flow);\n\n return flow;\n }", "function bufferUntil(condition) {\n return stream => _rxjsCompatUmdMin.Observable.create(observer => {\n let buffer = null;\n\n const flush = () => {\n if (buffer != null) {\n observer.next(buffer);\n buffer = null;\n }\n };\n\n return stream.subscribe(x => {\n if (buffer == null) {\n buffer = [];\n }\n\n buffer.push(x);\n\n if (condition(x, buffer)) {\n flush();\n }\n }, err => {\n flush();\n observer.error(err);\n }, () => {\n flush();\n observer.complete();\n });\n });\n}", "function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}", "function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}", "skip(opSt) { return false; }", "function untilTrue(array) {\n // While first element of array returns false from args[1] -- remove first element\n while (!args[1](array[0])) {\n array.shift();\n }\n // return array with removed elements array[0] now returns true for args[1]\n return array;\n }", "function nextOrEnd() {\n var next = dest._buffer.shift();\n dest._pipeCount -= 1;\n\n if (typeof next === 'function') {\n next(true);\n } else if (dest._pipeCount <= 0) {\n dest.end();\n } else {\n nextOrEnd();\n }\n }", "skipUntil(func){\n if( !Util.isFunction(func) )\n throw new Error(\"skipUntil requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 1);\n setRefs(this, flow);\n\n return flow;\n }", "takeWhile(predicate) {\n const self = this;\n return new Seq(function* () {\n for (const element of self) {\n if (predicate(element))\n yield element;\n else\n break;\n }\n });\n }", "function loopPremissionCheck(info_read, callback){\n \n if (info_read.length === 0) return callback(info_read)\n var filteredRows = []\n let loopStep = 0\n permissionLoopChecker()\n\n function permissionLoopChecker(){\n\n \n function checkComplete(returnedValue){\n if(returnedValue == true){\n filteredRows.push( info_read[loopStep] )\n CheckEndOrIncrement()\n }else{\n return failure(returnedValue)\n }\n }\n\n function CheckEndOrIncrement(){\n loopStep++\n if (loopStep >= info_read.length){\n return callback(filteredRows)\n }else{\n permissionLoopChecker()\n }\n }\n\n permissionCheckAbstraction(theDatabaseInfo[permissionToCheck], info_read[loopStep]).then(checkComplete)\n\n }\n\n }", "function takeWhileInclusive(predicate) {\n return source => _rxjsCompatUmdMin.Observable.create(observer => source.subscribe(x => {\n observer.next(x);\n\n if (!predicate(x)) {\n observer.complete();\n }\n }, err => {\n observer.error(err);\n }, () => {\n observer.complete();\n }));\n} // Concatenate the latest values from each input observable into one big list.", "function doWhileLoop(Y)\n{\n do {\n Y.shift()\n return Y\n } while (Y.length > 0 && maybeTrue());\n\n}", "function returnUntil(ctx, condition) {\n let blocks = ctx.blockStack.stack;\n let blk;\n let rm = null;\n for (let i = -2; i >= -blocks.length; i--) {\n blk = listGet(blocks, i);\n if (condition(blk)) {\n rm = i+1;\n break;\n }\n }\n if (rm === null)\n return null;\n\n\n return {\n pre: blocks.slice(0, rm),\n post: blocks.slice(rm),\n current: blk\n };\n}", "function promiseWhile(condition, result, body) {\n return _promiseWhile(condition, result, body, 0);\n}", "dropWhile(predicate) {\n const self = this;\n return new Seq(function* () {\n const iter = self[Symbol.iterator]();\n while (true) {\n const { value, done } = iter.next();\n if (done)\n break;\n if (!predicate(value)) {\n yield value;\n yield* iterableOfIterator(iter);\n }\n }\n });\n }", "function takeWhile(pred, foldable) {\n var take = true;\n return filter(function(x) { return take = take && pred(x); }, foldable);\n }", "function dropWhile(pred, foldable) {\n var take = false;\n return filter(function(x) { return take = take || !pred(x); }, foldable);\n }", "function takeWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (0, idx);\n };\n }", "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "function pipeLoop() {\n return newPromise((resolveLoop, rejectLoop) => {\n function next(done) {\n if (done) {\n resolveLoop();\n }\n else {\n // Use `PerformPromiseThen` instead of `uponPromise` to avoid\n // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers\n PerformPromiseThen(pipeStep(), next, rejectLoop);\n }\n }\n next(false);\n });\n }", "function pipeLoop() {\n return newPromise((resolveLoop, rejectLoop) => {\n function next(done) {\n if (done) {\n resolveLoop();\n }\n else {\n // Use `PerformPromiseThen` instead of `uponPromise` to avoid\n // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers\n PerformPromiseThen(pipeStep(), next, rejectLoop);\n }\n }\n next(false);\n });\n }", "function takeWhile(f, a) {\n for (var i = 0; i < a.length; ++i)\n if (! f(a[i])) break;\n\n return a.slice(0, i);\n}", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n if (!condition()) return done.resolve();\n Q.when(body(), loop, done.reject);\n }\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "function takeWhile(predicate, inclusive) {\n if (inclusive === void 0) {\n inclusive = false;\n }\n return function (source) {\n return source.lift(new TakeWhileOperator(predicate, inclusive));\n };\n}", "runFilter(callback) {\n\n if (callback === '') {\n this.data = this.dataUntouched;\n } else {\n\n const untouched = cloneArrayOfObjects(this.dataUntouched);;\n\n this.data = untouched.filter((e) => callback(e));\n }\n\n this.settings.offset = 0;\n return this.run();\n\n }", "function processData1(r){\n console.log(r);\n return r.map(x=>x.data).filter(x=>x.length>0);\n}", "function takeWhile(arr, f) {\n let n = 0;\n for (; n < arr.length; n++) {\n if (!f(arr[n])) {\n break;\n }\n }\n return arr.slice(0, n);\n}", "function dropWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (idx);\n };\n }", "function $Fj4k$var$pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n $Fj4k$var$debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && $Fj4k$var$EElistenerCount(src, 'data')) {\n state.flowing = true;\n $Fj4k$var$flow(src);\n }\n };\n}", "function until(condiiton, block)\n{\n\tvar cond = condition()\n\twhile (!cond)\n\t{\n\t\tblock()\n\t\tcond = condition()\n\t}\n}", "getNext(data) {\n return __awaiter(this, void 0, void 0, function* () {\n const { children } = this;\n for (let i = 0; i < children.length; ++i) {\n const child = children[i];\n if (!child.condition || (yield child.condition(data))) {\n return child;\n }\n }\n return null;\n });\n }", "function forEachWhile(f) {\n const go = (chunk, idx, len, cont) => {\n if (idx === len) {\n return cont;\n } else {\n return CH.catchAll_(CH.chain_(CH.fromEffect(f(CK.unsafeGet_(chunk, idx))), b => {\n if (b) {\n return go(chunk, idx + 1, len, cont);\n } else {\n return CH.write(CK.drop_(chunk, idx));\n }\n }), e => CH.zipRight_(CH.write(CK.drop_(chunk, idx)), CH.fail(e)));\n }\n };\n\n const process = CH.readWithCause(_in => go(_in, 0, CK.size(_in), process), halt => CH.failCause(halt), _ => CH.end(undefined));\n return new C.Sink(process);\n}", "function $SYhk$var$pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n $SYhk$var$debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && $SYhk$var$EElistenerCount(src, 'data')) {\n state.flowing = true;\n $SYhk$var$flow(src);\n }\n };\n}", "function nextOrEnd () {\n var next = dest._buffer.shift();\n dest._pipeCount -= 1;\n\n if (typeof next === 'function') {\n next();\n } else if (dest._pipeCount <= 0) {\n dest.end();\n }\n }", "function orCond(input, data){\n var flag = false;\n if(input){\n if(data === input){\n flag = true;\n }\n }\n return flag;\n}", "_transform(data, done){\r\n this.stdio.stdin.splitPush(data)\r\n this.fork.stdin.write(data) && done() || this.fork.stdin.on('drain', done)\r\n }", "function condition() {\n const message = (previousBlockNumber == currentBlockNumber) ? 'not yet' : 'next block found';\n verbose(`waitNextBlock: condition: previous:${previousBlockNumber} current:${currentBlockNumber} - ${message}`);\n if (currentBlockNumber === undefined) return true;\n if (previousBlockNumber === undefined) return true;\n // keep going while current is same as previous\n return previousBlockNumber == currentBlockNumber ;\n }", "doUnless(condition, func) {\n if(typeof condition === 'function') {\n return this.doIf((data) => !condition(data), func)\n } else {\n return this.doIf(!condition, func)\n }\n }", "function takeWhile (arr, pred) {\n let result = [];\n for (let i = 0; i < arr.length; i++) {\n if (pred(arr[i])) {\n result.push(arr[i]);\n } else {\n break;\n }\n }\n return result;\n}", "function filterCallback(item) {\n return item % 2 === 0\n}", "function andCond(input, data){\n var flag = false;\n if(input){\n if(data === input){\n flag = true;\n }\n }else {\n flag = true;\n }\n return flag;\n}", "function keepdo(condition, callback) {\n if(condition)\n callback();\n else\n setTimeout(function() { keepdo(condition, callback)}, 100);\n }", "readWhileFunction(callback) {\n const begin = this.cursor;\n\n while (callback(this.peek())) {\n if (this.canRead()) {\n this.skip();\n } else {\n return this.string.substring(begin);\n }\n }\n\n return this.string.substring(begin, this.cursor);\n }", "function maybePipeManually() {\n var chunk\n while ((chunk = writer.read())) {\n if (!conn.write(chunk)) {\n break\n }\n }\n }", "function filterAll(item) {\n \n //Store the first 5 values of a data entry in dataTrue.\n var dataTrue = Object.values(item);\n dataTrue = dataTrue.slice(0,5);\n \n //Loop through dataInput and dataTrue, compare value at the same index.\n //Return false if there is an input but does not match the dataset.\n //Otherwise, do nothing until the for loop ends and return true.\n for (i=0; i<5; i++) {\n if (dataInput[i] === '' || dataInput[i] === dataTrue[i]) {\n }\n else {\n return false;\n }\n }\n return true;\n}", "function sc_filterBang(proc, l1) {\n var head = sc_cons(\"dummy\", l1);\n var it = head;\n var next = l1;\n while (next !== null) {\n if (proc(next.car) !== false) {\n\t it.cdr = next\n\t it = next;\n\t}\n\tnext = next.cdr;\n }\n it.cdr = null;\n return head.cdr;\n}", "function skip() {\n\t return that._source.slice(4).then(function(chunk) {\n\t if (chunk == null) return {done: true, value: undefined};\n\t header = view(array = concat(array.slice(4), chunk));\n\t return header.getInt32(0, false) !== that._index ? skip() : read();\n\t });\n\t }", "hasNext() {\n return !this.done;\n }", "hasNext() {\n return !this.done;\n }", "function asyncWhile(conditionFunction, workFunction) {\n\n function loop() {\n return WinJS.Promise.as(conditionFunction()).\n then(function (shouldContinue) {\n if (shouldContinue) {\n return WinJS.Promise.as(workFunction()).then(loop);\n } else {\n return WinJS.Promise.wrap();\n }\n });\n }\n\n return loop();\n}", "function processData(input) {\n //Enter your code here\n //1 - put on the end\n //2 - dequeue the element at front\n //3 - print the element at front\n let arr = input.split(\"\\n\");\n let q = [];\n for(let i = 1; i < arr.length; i++){\n if(arr[i].startsWith(1)){\n let num = arr[i].split(\" \");\n let result = num[1];\n q.push(result);\n }\n if(arr[i] === '3'){\n console.log(q[0]);\n }\n if(arr[i] === '2'){\n q.shift();\n }\n }\n}", "__getBypassedInput(input) {\n if (input.bypass === true) {\n // loop through inputs of chain until one is found\n // that is not being bypassed\n\n let found = false;\n\n while (input.input !== 'undefined' && found === false) {\n if (typeof input.input.bypass !== 'undefined') {\n input = input.input;\n if (input.bypass === false) found = true;\n } else {\n input = input.input;\n found = true;\n }\n }\n }\n\n return input;\n }", "run() {\n\n let end = this.settings.show + this.settings.offset;\n\n let start = this.settings.offset;\n\n let nextDataSetIndex = end;\n let previousDataSetIndex = start - 1;\n\n let currentEntryEnd = start + this.settings.show;\n\n if (this.data) {\n const filteredData = this\n .data\n .slice(start, end);\n\n //set default has more to true\n this.hasNext = true;\n this.hasPrevious = true;\n\n //if start is less than 0 set it to 0\n if (start < 0) {\n start = 0;\n }\n\n if (end < 2) {\n end = 1;\n }\n\n //tell if we have more data\n if (!this.data[nextDataSetIndex]) {\n this.hasNext = false;\n }\n\n //tell if we have previous data\n if (!this.data[previousDataSetIndex]) {\n this.hasPrevious = false;\n }\n\n if (currentEntryEnd > this.data.length) {\n currentEntryEnd = this.data.length\n }\n\n this.currentEntry = start + 1;\n this.currentEntryEnd = currentEntryEnd;\n this.dataCount = this.data.length;\n\n this.dataToShow = filteredData\n\n return {data: filteredData}\n } else {\n this.dataToShow = [{}]\n return {data: ''}\n }\n\n }", "function dataIterator(params) {\n let count = params.length - 1;\n let num = Math.floor(Math.random() * 4);\n return {\n next: function () {\n return {\n value: params[num],\n data: false\n }\n return {\n data: true\n }\n }\n }\n}", "function repeatWhile_(self, f) {\n return P.chain_(self, a => f(a) ? repeatWhile_(self, f) : P.succeed(a));\n}", "function skipUntil(notifier) {\n return function (source) { return source.lift(new SkipUntilOperator(notifier)); };\n}", "dropWhile(array, predicate){\r\n //declare function to call predicate\r\n const myPred = (element, index) => {\r\n //return the index value of first false element\r\n return !(predicate(element, index, array));\r\n }\r\n \tlet dropNumber = array.findIndex(myPred);\r\n //call drop function to slice elements to new array\r\n let droppedArray = this.drop(array, dropNumber);\r\n \treturn droppedArray;\r\n }", "function hasPipeDataListeners(stream){var listeners=stream.listeners('data');for(var i=0;i<listeners.length;i++){if(listeners[i].name==='ondata'){return true;}}return false;}", "function inspect(val) {\n if (ignoreResult || shouldContinue(val)) {\n return iterate();\n } else {\n return next.cancel(val);\n }\n }", "function iteratorShift(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}", "function iteratorShift(input) {\n const {\n done,\n value\n } = input.next();\n return done ? undefined : value;\n}", "next() {\n var _a, _b;\n let found = ITERATION_STATUS.EO_STRM;\n while (this.inputDataSource.hasNext()) {\n this._unfilteredPos++;\n let next = this.inputDataSource.next();\n //again here we cannot call the filter function twice, because its state might change, so if indexed, we have a decent snapshot, either has next or next can trigger\n //the snapshot\n if (next != ITERATION_STATUS.EO_STRM &&\n (((_b = (_a = this._filterIdx) === null || _a === void 0 ? void 0 : _a[this._unfilteredPos]) !== null && _b !== void 0 ? _b : false) || this.filterFunc(next))) {\n this._filterIdx[this._unfilteredPos] = true;\n found = next;\n break;\n }\n }\n this._current = found;\n return found;\n }", "function readWhile(tokenizer, condition) {\n var result = \"\";\n while (hasCurrentCharacter(tokenizer)) {\n var currentCharacter = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n }\n else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n return result;\n }", "shouldSkip () {\n const {skema} = this\n\n if (!skema.hasWhen()) {\n return this._shouldSkip()\n }\n\n return skema.when(\n this.args, this.context, this.options)\n .then(hit => {\n if (!hit) {\n // Skip\n return true\n }\n\n return this._shouldSkip()\n })\n }", "function loopingData2() {\n\n}", "readUntilRegexp(exp) {\n return this.readWhileFunction(s => !exp.test(s));\n }", "function readWhile(tokenizer, condition) {\n let result = \"\";\n while (hasCurrentCharacter(tokenizer)) {\n const currentCharacter = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n }\n else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n return result;\n}", "function readWhile(tokenizer, condition) {\n let result = \"\";\n while (hasCurrentCharacter(tokenizer)) {\n const currentCharacter = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n }\n else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n return result;\n}", "function _latch(event) {\n var firstCall = true;\n var cache;\n return _filter(event, function (value) {\n var shouldEmit = firstCall || value !== cache;\n firstCall = false;\n cache = value;\n return shouldEmit;\n });\n}", "function skip(){\n\t\n}", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n // When the result of calling `condition` is no longer true, we are\n // done.\n if (!condition()) return done.resolve();\n // Use `when`, in case `body` does not return a promise.\n // When it completes loop again otherwise, if it fails, reject the\n // done promise\n Q.when(body(), loop, done.reject);\n }\n\n // Start running the loop in the next tick so that this function is\n // completely async. It would be unexpected if `body` was called\n // synchronously the first time.\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n // When the result of calling `condition` is no longer true, we are\n // done.\n if (!condition()) return done.resolve();\n // Use `when`, in case `body` does not return a promise.\n // When it completes loop again otherwise, if it fails, reject the\n // done promise\n Q.when(body(), loop, done.reject);\n }\n\n // Start running the loop in the next tick so that this function is\n // completely async. It would be unexpected if `body` was called\n // synchronously the first time.\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "function promiseWhile(condition, body) {\n var done = Q.defer();\n\n function loop() {\n // When the result of calling `condition` is no longer true, we are\n // done.\n if (!condition()) return done.resolve();\n // Use `when`, in case `body` does not return a promise.\n // When it completes loop again otherwise, if it fails, reject the\n // done promise\n Q.when(body(), loop, done.reject);\n }\n\n // Start running the loop in the next tick so that this function is\n // completely async. It would be unexpected if `body` was called\n // synchronously the first time.\n Q.nextTick(loop);\n\n // The promise\n return done.promise;\n}", "next() {\n let item = this.rbIter.data();\n\n if (item) {\n let ret = {\n value: item,\n done: false\n };\n\n this.rbIter[this.nextFunc]();\n\n return ret;\n } else {\n return {\n done: true\n }\n }\n }", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}", "function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;processNextTick(maybeReadMore_,stream,state)}}", "function iterateUntil(fun, check, init) {\n var ret = [],\n result = fun(init);\n\n while (check(result)) {\n ret.push(result);\n result = fun(result);\n }\n\n return ret;\n}", "function myFilter(array, callback){\n let newArray = []\n for(let i=0; i<array.length; i++){\n let bool = callback(array[i])\n //put a condition, if true,\n if(bool){\n newArray.push(array[i])\n }\n //then push the item into the array\n\n\n }\n return newArray\n}", "function skipTo(end) {\n let len = end.length\n\n while (!input.eof() && input.peek(len) !== end) {\n input.next()\n }\n while (!input.eof() && len) {\n input.next()\n len--\n }\n }", "function dataFilter() { \n\n // Select the date from the in put\n var date = inputField.property(\"value\");\n\n // Set temporary variable to be written over with reduced data\n tempData = tableData;\n\n // Condition to check date goes here, if DNE or empty then load normally\n if (date) { // This will check if there is a value that have been passed\n tempData = tempData.filter(ufoData => ufoData.datetime === date)\n }\n\n tableTalk(tempData);\n}", "function check() {\n\n // decrement number of founded processing datasets\n counter--;\n\n // finished processing of all founded datasets? => perform callback\n if ( counter === 0 && callback) callback( results );\n\n }", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\n if( !this.isDiscretized ) {\n while(true) {\n if (!this.isListening || this.pos >= this.iterators.length)\n break;\n //get the data from the current iterator\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done)\n break;\n\n this.push(obj.value);\n }\n }\n else{//for discretized flows\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n do{\n obj = this.iterators[this.pos].next();\n while( !obj.done ){\n this.streamElements.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( this.streamElements.length > 0 ){\n while(true) {\n this.streamElements.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n break;\n }\n }\n }\n\n this.pos++;\n }while( this.pos < this.iterators.length );\n }\n else{\n var ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n var justEnded = false;\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n ended.push(false);\n }\n\n do{\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n justEnded = true;\n this.push(this.streamElements.slice());\n this.streamElements = [];\n\n //check if all items have ended\n if( Flow.from(ended).allMatch((input) => input) )\n break;\n }\n else\n justEnded = false;\n }while(true);\n }\n }\n\n this.isListening = false; //we done processing so stop listening\n this.pos = 0; //reset the pos for other operations\n }", "async function waitUserInput(vm) {\n while (next === false) await timeout(50); // pause script but avoid browser to freeze ;)\n next = false; // reset var\n console.log('user input detected');\n if(vm.stored_input_text == 'break'){\n pushWinterText(vm, \"breakingg\")\n return false;\n } else {\n return true\n }\n}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function inspect(val) {\n if (ignoreResult || shouldContinue(val)) {\n return iterate();\n }\n return next.cancel(val);\n }", "function Skip() { return Skip }", "function inspect(val) {\r\n if (ignoreResult || shouldContinue(val)) {\r\n return iterate();\r\n }\r\n return next.cancel(val);\r\n }", "function dropWhen(state, x, xs) {\n var input = lift(skipIfTrue, dropRepeats(state), xs)\n return dropIf(isSkip, x, input)\n}", "dropWhile (array, predicateFunction) {\n const dropNumber = array.findIndex(function (element, index) {\n return !predicateFunction(element, index, array);\n });\n const shortArray = this.drop(array, dropNumber);\n return shortArray;\n }", "function dropElements(arr, func) {\n // Creating args variable from arguments object\n var args = [...arguments];\n // Setting - array of numbers to be checked - equal to first element of args array\n var numArray = args[0];\n /* untiTrue returns passed array with values dropped from front - that return false from \n function from arguments (args[1]) - until an element returns true*/\n function untilTrue(array) {\n // While first element of array returns false from args[1] -- remove first element\n while (!args[1](array[0])) {\n array.shift();\n }\n // return array with removed elements array[0] now returns true for args[1]\n return array;\n }\n \n console.log(untilTrue(numArray));\n }", "next() {}", "resolveData() {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer;\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift();\n this.shiftBufferFromUnresolvedDataArray(buffer);\n }\n else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n }\n else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }", "resolveData() {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer;\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift();\n this.shiftBufferFromUnresolvedDataArray(buffer);\n }\n else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n }\n else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }", "async readWait(length)\n {\n // Create buffer\n let buf = Buffer.alloc(length);\n let received = 0;\n\n while (received < length)\n {\n if (this.receivedBuffers.length > 0)\n {\n let src = this.receivedBuffers[0]\n if (src.length > length - received)\n {\n // Use part of the buffer...\n\n // Copy out the bit we want\n src.copy(buf, received, 0, length - received);\n\n // Split the buffer to extract the part we need\n let subBuf = Buffer.alloc(src.length - (length - received));\n src.copy(subBuf, 0, length - received, length - received + subBuf.length);\n this.receivedBuffers.shift();\n this.receivedBuffers.unshift(subBuf);\n\n // Finished\n received = length;\n }\n else\n {\n // Use the entire buffer\n src.copy(buf, received);\n received += this.receivedBuffers.shift().length;\n }\n }\n else\n {\n // Wait for more data\n await new Promise((resolve, reject) => {\n this.waiter = resolve;\n });\n this.waiter = null;\n }\n }\n return buf;\n }", "function bouncer(arr) {\n let i = 0;\n let arr2 = [];\n while(true) {\n // console.log(arr.length);\n if(i>=arr.length) {\n break;\n }\n if(Boolean(arr[i])) {\n arr2.push(arr[i]);\n }\n i++;\n }\n return arr2;\n}", "filter(keepIf) {\n const self = this;\n return new Seq(function* () {\n for (const element of self)\n if (keepIf(element))\n yield element;\n });\n }", "function main() {\n /* eslint-disable-next-line no-unmodified-loop-condition */\n while (!settled) {\n state(value.charCodeAt(index))\n }\n }" ]
[ "0.6032363", "0.6009052", "0.5894059", "0.5502335", "0.549489", "0.549489", "0.5455754", "0.54302037", "0.54252577", "0.54174346", "0.53798", "0.5376534", "0.53666985", "0.53475714", "0.5334338", "0.5330845", "0.5312011", "0.5293243", "0.5265569", "0.52574325", "0.5243032", "0.5238145", "0.5238145", "0.5203392", "0.51631606", "0.5135941", "0.5125114", "0.5089568", "0.5081546", "0.5051044", "0.50498015", "0.50324833", "0.50245994", "0.5010389", "0.5007478", "0.5001388", "0.49548894", "0.4948119", "0.4944654", "0.4934702", "0.49026662", "0.48778242", "0.48753604", "0.4875337", "0.48585516", "0.48561832", "0.484763", "0.48323998", "0.48287082", "0.4791347", "0.4791347", "0.47796592", "0.4775739", "0.4769883", "0.47612575", "0.47604316", "0.47593385", "0.4746475", "0.47406143", "0.4714977", "0.47112495", "0.47107214", "0.47107214", "0.46765134", "0.46747315", "0.46697494", "0.46668008", "0.4661468", "0.46583477", "0.46583477", "0.46580735", "0.46447814", "0.46370336", "0.46370336", "0.46370336", "0.4631272", "0.4629636", "0.46283504", "0.4615993", "0.46148348", "0.4611669", "0.46109012", "0.46036968", "0.4588638", "0.45806834", "0.45782128", "0.45782128", "0.456457", "0.4564048", "0.45628107", "0.45621982", "0.4559027", "0.45534047", "0.45473823", "0.4541933", "0.4541933", "0.45334736", "0.4527382", "0.4525451", "0.4523237" ]
0.5618757
3
Keep accepting the piped data while the condition in the function argument returns true
takeWhile(func){ if( !Util.isFunction(func) ) throw new Error("takeWhile requires a function"); var flow = new SkipTakeWhileUntilFlow(func, 4); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function untilTrue(array) {\n // While first element of array returns false from args[1] -- remove first element\n while (!args[1](array[0])) {\n array.shift();\n }\n // return array with removed elements array[0] now returns true for args[1]\n return array;\n }", "_transform(data, done){\r\n this.stdio.stdin.splitPush(data)\r\n this.fork.stdin.write(data) && done() || this.fork.stdin.on('drain', done)\r\n }", "function $Fj4k$var$pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n $Fj4k$var$debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && $Fj4k$var$EElistenerCount(src, 'data')) {\n state.flowing = true;\n $Fj4k$var$flow(src);\n }\n };\n}", "function $SYhk$var$pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n $SYhk$var$debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && $SYhk$var$EElistenerCount(src, 'data')) {\n state.flowing = true;\n $SYhk$var$flow(src);\n }\n };\n}", "function nextOrEnd() {\n var next = dest._buffer.shift();\n dest._pipeCount -= 1;\n\n if (typeof next === 'function') {\n next(true);\n } else if (dest._pipeCount <= 0) {\n dest.end();\n } else {\n nextOrEnd();\n }\n }", "runFilter(callback) {\n\n if (callback === '') {\n this.data = this.dataUntouched;\n } else {\n\n const untouched = cloneArrayOfObjects(this.dataUntouched);;\n\n this.data = untouched.filter((e) => callback(e));\n }\n\n this.settings.offset = 0;\n return this.run();\n\n }", "async resolveWhile(predicate) {\n let x = await this.next();\n let shouldContinue = predicate(x.value);\n while ((!x.done) && shouldContinue) {\n x = await this.next();\n shouldContinue = predicate(x.value);\n }\n }", "function orCond(input, data){\n var flag = false;\n if(input){\n if(data === input){\n flag = true;\n }\n }\n return flag;\n}", "function pipeline (input, fun1, fun2) {\n return fun2(fun1(input))\n}", "function isPipe(){\n\treturn isMatch(pipe, getPipe());\n}", "function sc_filterBang(proc, l1) {\n var head = sc_cons(\"dummy\", l1);\n var it = head;\n var next = l1;\n while (next !== null) {\n if (proc(next.car) !== false) {\n\t it.cdr = next\n\t it = next;\n\t}\n\tnext = next.cdr;\n }\n it.cdr = null;\n return head.cdr;\n}", "function bufferUntil(condition) {\n return stream => _rxjsCompatUmdMin.Observable.create(observer => {\n let buffer = null;\n\n const flush = () => {\n if (buffer != null) {\n observer.next(buffer);\n buffer = null;\n }\n };\n\n return stream.subscribe(x => {\n if (buffer == null) {\n buffer = [];\n }\n\n buffer.push(x);\n\n if (condition(x, buffer)) {\n flush();\n }\n }, err => {\n flush();\n observer.error(err);\n }, () => {\n flush();\n observer.complete();\n });\n });\n}", "function pipeLoop() {\n return newPromise((resolveLoop, rejectLoop) => {\n function next(done) {\n if (done) {\n resolveLoop();\n }\n else {\n // Use `PerformPromiseThen` instead of `uponPromise` to avoid\n // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers\n PerformPromiseThen(pipeStep(), next, rejectLoop);\n }\n }\n next(false);\n });\n }", "function pipeLoop() {\n return newPromise((resolveLoop, rejectLoop) => {\n function next(done) {\n if (done) {\n resolveLoop();\n }\n else {\n // Use `PerformPromiseThen` instead of `uponPromise` to avoid\n // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers\n PerformPromiseThen(pipeStep(), next, rejectLoop);\n }\n }\n next(false);\n });\n }", "skipWhile(func){\n if( !Util.isFunction(func) )\n throw new Error(\"skipWhile requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 2);\n setRefs(this, flow);\n\n return flow;\n }", "function hasPipeDataListeners(stream){var listeners=stream.listeners('data');for(var i=0;i<listeners.length;i++){if(listeners[i].name==='ondata'){return true;}}return false;}", "function filter(parent$, fn) {\n let newStream = fork$(parent$, value => (fn(value) ? value : undefined));\n parent$.listeners.push(function filterValue(value) {\n if (fn(value)) {\n newStream(value);\n }\n });\n return newStream;\n}", "unpipe(func) {\n const { pipeline } = this,\n len = pipeline.length;\n let x = 0;\n for(x;x<len;x++)\n {\n if(pipeline[x] === func) { pipeline.splice(x, 1); break; }\n }\n return this;\n }", "pipe() {\n return new Promise(resolve => {\n const args = [];\n const stdin = process.openStdin();\n \n stdin.on('data', _ => args.push(..._.toString().split(this.opts.splitChar)));\n stdin.on('end', _ => resolve(args));\n stdin.on('error', _ => this.opts.stdErr(`Error: `, _));\n \n setTimeout(_ => {\n if (!args.length) {\n stdin.destroy();\n resolve(false);\n }\n }, this.opts.pipeTimeout);\n });\n }", "function maybePipeManually() {\n var chunk\n while ((chunk = writer.read())) {\n if (!conn.write(chunk)) {\n break\n }\n }\n }", "function filter(parent$, fn) {\n var newStream = fork$(parent$, function (value) {\n return fn(value) ? value : undefined;\n });\n parent$.listeners.push(function filterValue(value) {\n if (fn(value)) {\n newStream(value);\n }\n });\n return newStream;\n}", "function filter(parent$, fn) {\n var newStream = fork$(parent$, function (value) {\n return fn(value) ? value : undefined;\n });\n parent$.listeners.push(function filterValue(value) {\n if (fn(value)) {\n newStream(value);\n }\n });\n return newStream;\n}", "function andCond(input, data){\n var flag = false;\n if(input){\n if(data === input){\n flag = true;\n }\n }else {\n flag = true;\n }\n return flag;\n}", "skip(opSt) { return false; }", "function takeWhileInclusive(predicate) {\n return source => _rxjsCompatUmdMin.Observable.create(observer => source.subscribe(x => {\n observer.next(x);\n\n if (!predicate(x)) {\n observer.complete();\n }\n }, err => {\n observer.error(err);\n }, () => {\n observer.complete();\n }));\n} // Concatenate the latest values from each input observable into one big list.", "filter() {\n\t}", "filter() {\n\t}", "function pipeline(value, function1, function2){\n return function2(function1(value));\n }", "function pipe(arrOfFuncs, value) {\n\n}", "function pipeExec(fn) {\n\n\t\tlet canExec = true;\n\n\t\tfunction transform(chunk, enc, cb) {\n\t\t\tif (canExec) {\n\t\t\t\tfn();\n\t\t\t\tcanExec = false;\n\t\t\t}\n\t\t\tcb(null, chunk);\n\t\t}\n\n\t\tfunction flush(cb) {\n\t\t\tcanExec = false;\n\t\t\tcb();\n\t\t}\n\n\t\treturn lib.through.obj(null, transform, flush);\n\n\t}", "function doWhileLoop(Y)\n{\n do {\n Y.shift()\n return Y\n } while (Y.length > 0 && maybeTrue());\n\n}", "takeUntil(func){\n if( !Util.isFunction(func) )\n throw new Error(\"takeUntil requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 3);\n setRefs(this, flow);\n\n return flow;\n }", "function filter(arr, truth, callback) {\n async.reduce(arr, [], function(filtered, item, callback) {\n truth(item, function(err, isTrue) {\n callback(err, isTrue ? filtered.concat([item]) : filtered);\n });\n }, callback);\n}", "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function nextOrEnd () {\n var next = dest._buffer.shift();\n dest._pipeCount -= 1;\n\n if (typeof next === 'function') {\n next();\n } else if (dest._pipeCount <= 0) {\n dest.end();\n }\n }", "function filterCallback(item) {\n return item % 2 === 0\n}", "function pipe(...fns) {\n const fnArguments = Array(...fns)\n return function(x) {\n let result = null;\n console.log(fns)\n fnArguments.forEach(fn => {\n if(!result) {\n result = fn(x)\n } else {\n result = fn(result)\n }\n console.log(result)\n })\n\n return result\n }\n \n}", "function takeWhile(pred, foldable) {\n var take = true;\n return filter(function(x) { return take = take && pred(x); }, foldable);\n }", "function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}", "function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}", "function _latch(event) {\n var firstCall = true;\n var cache;\n return _filter(event, function (value) {\n var shouldEmit = firstCall || value !== cache;\n firstCall = false;\n cache = value;\n return shouldEmit;\n });\n}", "function processData1(r){\n console.log(r);\n return r.map(x=>x.data).filter(x=>x.length>0);\n}", "function sc_filter(proc, l1) {\n var dummy = { cdr : null };\n var tail = dummy;\n while (l1 !== null) {\n\tif (proc(l1.car) !== false) {\n\t tail.cdr = sc_cons(l1.car, null);\n\t tail = tail.cdr;\n\t}\n\tl1 = l1.cdr;\n }\n return dummy.cdr;\n}", "function filter(fn, originalStr) {\n function _stream(str) {\n const { value, next } = str();\n \n if (fn(value)) {\n return {\n value,\n next() {\n return _stream(next);\n }\n };\n }\n \n return _stream(next);\n }\n \n return () => _stream(originalStr);\n}", "function forEachWhile(f) {\n const go = (chunk, idx, len, cont) => {\n if (idx === len) {\n return cont;\n } else {\n return CH.catchAll_(CH.chain_(CH.fromEffect(f(CK.unsafeGet_(chunk, idx))), b => {\n if (b) {\n return go(chunk, idx + 1, len, cont);\n } else {\n return CH.write(CK.drop_(chunk, idx));\n }\n }), e => CH.zipRight_(CH.write(CK.drop_(chunk, idx)), CH.fail(e)));\n }\n };\n\n const process = CH.readWithCause(_in => go(_in, 0, CK.size(_in), process), halt => CH.failCause(halt), _ => CH.end(undefined));\n return new C.Sink(process);\n}", "function myFilter(array, callback){\n let newArray = []\n for(let i=0; i<array.length; i++){\n let bool = callback(array[i])\n //put a condition, if true,\n if(bool){\n newArray.push(array[i])\n }\n //then push the item into the array\n\n\n }\n return newArray\n}", "doUnless(condition, func) {\n if(typeof condition === 'function') {\n return this.doIf((data) => !condition(data), func)\n } else {\n return this.doIf(!condition, func)\n }\n }", "filterInput(input) {\n debug('Inside the from storage filter')\n return true\n }", "function truthTest(name, test) {\n return function (chunk, context, bodies, params) {\n return filter(chunk, context, bodies, params, name, test);\n };\n }", "function takeWhile(predicate, inclusive) {\n if (inclusive === void 0) {\n inclusive = false;\n }\n return function (source) {\n return source.lift(new TakeWhileOperator(predicate, inclusive));\n };\n}", "function passTesting(arr, func) {\n // let new_array = [];\n\n // Let's try this with a simple for() loop // *** THIS WORKS BUT LETS IMPROVE IT ***\n // for(let i = 0; i < arr.length; i++) {\n // let result = func(arr[i]);\n // if(result == true) {\n // new_array.push(arr[i]);\n // }\n // }\n // return the NEW_ARRAY\n\n // ** This is how we can use higher order functions and improve the above code\n let new_array = arr.filter( elem => func(elem));\n \n console.log(new_array);\n return new_array;\n}", "async serialForEach(f) {\n return this.serialMapAsync(f).resolveWhile(x => (x === true));\n }", "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "function latch(event, equals = (a, b) => a === b, disposable) {\n let firstCall = true;\n let cache;\n return filter(event, value => {\n const shouldEmit = firstCall || !equals(value, cache);\n firstCall = false;\n cache = value;\n return shouldEmit;\n }, disposable);\n }", "hasNext() {\n return !this.done;\n }", "hasNext() {\n return !this.done;\n }", "function pipe(value) {\r\n function nextPipe(transformer) {\r\n return pipe(transformer(value));\r\n }\r\n nextPipe.value = value;\r\n return nextPipe;\r\n}", "function keepdo(condition, callback) {\n if(condition)\n callback();\n else\n setTimeout(function() { keepdo(condition, callback)}, 100);\n }", "function main(...fns) {return fns.reduce(pipe)}", "function takeWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (0, idx);\n };\n }", "function dropWhile(pred, foldable) {\n var take = false;\n return filter(function(x) { return take = take || !pred(x); }, foldable);\n }", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}", "filteredCheck({ filteredItems, localFilter }) {\n // Determine if the dataset is filtered or not\n let isFiltered = false\n if (!localFilter) {\n // If filter criteria is falsey\n isFiltered = false\n } else if (looseEqual(localFilter, []) || looseEqual(localFilter, {})) {\n // If filter criteria is an empty array or object\n isFiltered = false\n } else if (localFilter) {\n // If filter criteria is truthy\n isFiltered = true\n }\n if (isFiltered) {\n this.$emit(EVENT_NAME_FILTERED, filteredItems, filteredItems.length)\n }\n this.isFiltered = isFiltered\n }", "function exhaust() {\n return function (source) { return source.lift(new SwitchFirstOperator()); };\n}", "function loopPremissionCheck(info_read, callback){\n \n if (info_read.length === 0) return callback(info_read)\n var filteredRows = []\n let loopStep = 0\n permissionLoopChecker()\n\n function permissionLoopChecker(){\n\n \n function checkComplete(returnedValue){\n if(returnedValue == true){\n filteredRows.push( info_read[loopStep] )\n CheckEndOrIncrement()\n }else{\n return failure(returnedValue)\n }\n }\n\n function CheckEndOrIncrement(){\n loopStep++\n if (loopStep >= info_read.length){\n return callback(filteredRows)\n }else{\n permissionLoopChecker()\n }\n }\n\n permissionCheckAbstraction(theDatabaseInfo[permissionToCheck], info_read[loopStep]).then(checkComplete)\n\n }\n\n }", "function filter() {\n \n}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function promiseWhile(condition, result, body) {\n return _promiseWhile(condition, result, body, 0);\n}", "function truthTest(name, test) {\n return function(chunk, context, bodies, params) {\n return filter(chunk, context, bodies, params, name, test);\n };\n}", "function createLessThanFilter(base) {\n // YOUR CODE BELOW HERE //\n return function(value){\n if(base > value){\n return true;\n } else {\n return false;\n }\n };\n \n \n \n // YOUR CODE ABOVE HERE //\n}", "__getBypassedInput(input) {\n if (input.bypass === true) {\n // loop through inputs of chain until one is found\n // that is not being bypassed\n\n let found = false;\n\n while (input.input !== 'undefined' && found === false) {\n if (typeof input.input.bypass !== 'undefined') {\n input = input.input;\n if (input.bypass === false) found = true;\n } else {\n input = input.input;\n found = true;\n }\n }\n }\n\n return input;\n }", "function pipe() {\n return {name: 'pipe', value: [].slice.call(arguments)}\n}", "function takeWhile(f, a) {\n for (var i = 0; i < a.length; ++i)\n if (! f(a[i])) break;\n\n return a.slice(0, i);\n}", "function repeatWhile_(self, f) {\n return P.chain_(self, a => f(a) ? repeatWhile_(self, f) : P.succeed(a));\n}", "_doWork(stream) {\n return this.readFromStream(stream)\n .then(result => this.computeResult(result))\n .then(() => {\n if (this.readable) return this.start(stream);\n this.doSomething = false;\n })\n }", "function filterFunction() {\n \n}", "function stream_filter(p, s) {\n if (is_empty_list(s)) {\n\treturn [];\n } else if (p(head(s))) {\n\treturn pair(head(s),\n function() {\n\t\t\treturn stream_filter(p,\n\t\t\t\t\t stream_tail(s));\n });\n } else {\n\treturn stream_filter(p,\n stream_tail(s));\n }\n\t }", "if(cond, then) {\n if (cond(this.copy())) {\n then(this);\n }\n return this;\n }", "function truthTest(name, test) {\n return function(chunk, context, bodies, params) {\n return filter(chunk, context, bodies, params, name, test);\n };\n }", "repipe(stage){\n log.silly('Session.repipe:', `Session ${this.name}:`,\n `origin: ${stage.origin}`);\n\n // was error on source?\n if(stage.id === this.source.id){\n let to = this.chain.ingress.length > 0 ?\n this.chain.ingress[0] : this.destination;\n stage.pipe(to);\n let from = this.chain.egress.length > 0 ?\n this.chain.egress[this.chain.egress.length - 1] :\n this.destination;\n from.pipe(stage);\n stage.status = 'READY';\n\n log.silly('Session.repipe:', `Session ${this.name}:`,\n `source stage \"${stage.origin}\" repiped`);\n return true;\n }\n\n // was error on destination?\n if(stage.id === this.destination.id){\n let from = this.chain.ingress.length > 0 ?\n this.chain.ingress[this.chain.ingress.length - 1] :\n this.source;\n from.pipe(stage);\n let to = this.chain.egress.length > 0 ?\n this.chain.egress[0] : this.source;\n stage.pipe(to);\n stage.status = 'READY';\n\n log.silly('Session.repipe:', `Session ${this.name}:`,\n `destination stage \"${stage.origin}\" repiped`);\n return true;\n }\n\n // was error on ingress?\n let i = this.chain.ingress.findIndex(r => r.id === stage.id);\n if(i >= 0){\n let from = i === 0 ? this.source : this.chain.ingress[i-1];\n from.pipe(stage);\n let to = i === this.chain.ingress.length - 1 ?\n this.destination : this.chain.ingress[i+1];\n stage.pipe(to);\n stage.status = 'READY';\n\n log.silly('Stage.repipe:', `Session ${this.name}:`,\n `ingress chain repiped on cluster \"${stage.origin}\"`);\n return true;\n }\n\n i = this.chain.egress.findIndex(r => r.id === stage.id);\n if(i<0)\n log.error('Session.repipe: Internal error:',\n 'Could not find disconnected stage',\n `${stage.origin}`);\n\n let from = i === 0 ? this.destination : this.chain.egress[i-1];\n from.pipe(stage);\n let to = i === this.chain.egress - 1 ?\n this.source : this.chain.egress[i+1];\n stage.pipe(to);\n stage.status = 'READY';\n\n log.silly('Session.repipe:', `Session ${this.name}:`,\n `egress chain repiped on cluster \"${stage.origin}\"`);\n\n return true;\n }", "function dirtyUiStream(output$, current$) {\n return xs.combine(output$, current$)\n .map(([output, current]) => !equals(output, current))\n .compose(debounce(10))\n .compose(dropRepeats(equals))\n .startWith(false)\n}", "function someCallback(item) {\n if (item % 2 === 0) {\n return true;\n }\n}", "takeWhile(predicate) {\n const self = this;\n return new Seq(function* () {\n for (const element of self) {\n if (predicate(element))\n yield element;\n else\n break;\n }\n });\n }", "function stream_for_each(fun,xs) {\n if (is_empty_list(xs)) {\n\treturn true;\n } else {\n fun(head(xs));\n\treturn stream_for_each(fun,stream_tail(xs));\n }\n}", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "pipe(func, options = {}) {\n \n /* sets current delay count to 0 */\n options.curr = 0;\n \n /* attach options to the method and bind it to the viewport */\n this.pipeline.push(Object.assign(func, options).bind(this));\n return func;\n }", "function or() {\n var items = arguments;\n return function(input) {\n for(var i = 0; i < items.length; i++) {\n var result = items[i](input);\n if(result != false) {\n return result;\n }\n }\n return false;\n };\n}", "skipUntil(func){\n if( !Util.isFunction(func) )\n throw new Error(\"skipUntil requires a function\");\n\n var flow = new SkipTakeWhileUntilFlow(func, 1);\n setRefs(this, flow);\n\n return flow;\n }", "function filter(parent$, fn) {\n\tvar newStream = stream(fn(parent$.value) ? parent$.value : null);\n\tparent$.listeners.push(function filterValue(value) {\n\t\tif (fn(value)) {\n\t\t\tnewStream(value);\n\t\t}\n\t});\n\treturn newStream;\n}", "function createGreaterThanFilter(base) {\n // YOUR CODE BELOW HERE //\n // return a function with value parameter\n return function(value){\n // if the value argument is greater than the base return true\n if (value > base){\n \n return true;\n// if the value argument is less than the base return false.\n } else {\n \n return false;\n \n }\n };\n \n \n \n // YOUR CODE ABOVE HERE //\n}", "pipeTypeCheck(them) {\n // console.log(this.name + \" got pipe from\");\n // console.log(them);\n }", "function pipe(value) {\n\t for (var _len = arguments.length, pipeArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t pipeArgs[_key - 1] = arguments[_key];\n\t }\n\n\t return createPipe.apply(void 0, pipeArgs)(value);\n\t}", "function createGreaterThanFilter(base) {\n // YOUR CODE BELOW HERE //\n // test whether the value is greater than the base\n // return a function\n return function(val){\n if(val > base){\n return true;\n } else{\n return false;\n }\n }\n \n \n // YOUR CODE ABOVE HERE //\n}", "function filterAll(item) {\n \n //Store the first 5 values of a data entry in dataTrue.\n var dataTrue = Object.values(item);\n dataTrue = dataTrue.slice(0,5);\n \n //Loop through dataInput and dataTrue, compare value at the same index.\n //Return false if there is an input but does not match the dataset.\n //Otherwise, do nothing until the for loop ends and return true.\n for (i=0; i<5; i++) {\n if (dataInput[i] === '' || dataInput[i] === dataTrue[i]) {\n }\n else {\n return false;\n }\n }\n return true;\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n }", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n }", "function duplicateFunction(arg) {\n if (arg) {\n console.log(true)\n }\n return true\n}" ]
[ "0.5588876", "0.55531573", "0.5489361", "0.54739535", "0.5465496", "0.5399858", "0.53974634", "0.5315248", "0.5290117", "0.5277283", "0.521335", "0.52082443", "0.52006364", "0.52006364", "0.5190021", "0.51740724", "0.51729184", "0.517272", "0.5147424", "0.5143029", "0.5111831", "0.5111831", "0.5105921", "0.5088292", "0.5086352", "0.50619024", "0.50619024", "0.5059742", "0.50590813", "0.50539446", "0.50481325", "0.50226367", "0.501465", "0.49981147", "0.4982004", "0.49745724", "0.49649304", "0.4962193", "0.49601507", "0.49601507", "0.49382067", "0.4912103", "0.48999178", "0.48960775", "0.48940554", "0.4893608", "0.4890263", "0.48860782", "0.4882218", "0.48627138", "0.4852454", "0.48486495", "0.4848191", "0.48447737", "0.4836136", "0.4836136", "0.48347425", "0.48300305", "0.48137176", "0.4808815", "0.47973832", "0.47946638", "0.478787", "0.47870725", "0.4785838", "0.47765958", "0.47633925", "0.47633925", "0.47561088", "0.47525194", "0.47442228", "0.47432622", "0.4739196", "0.47315553", "0.4731432", "0.47298452", "0.4726761", "0.4725049", "0.47247466", "0.47205916", "0.47189632", "0.4701832", "0.4700674", "0.4698775", "0.46970376", "0.46955895", "0.46955895", "0.46955895", "0.46906015", "0.46774673", "0.46671414", "0.4660951", "0.4658056", "0.46299568", "0.46219033", "0.46213895", "0.46205118", "0.46197405", "0.46197405", "0.461841" ]
0.5447432
5
This create a data window to operate on
range(startIndex, endIndex){ if( startIndex < 0 ) throw new Error("Start Index cannot be negative"); if( endIndex <= 0 ) throw new Error("End Index must be greater than 0"); if( startIndex > endIndex ) throw new Error("End Index cannot be less than Start Index"); var flow = new RangeMethodFlow(startIndex, endIndex); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createWindow() {\n\t\tpopulateData(\"employment\",1);\n\t}", "function makeChartWindow() {\n\tvar chartWindow = $(\n\t\t\"<div id='chartWindow' class='ui-widget-content resizable movable'>\" + \n\t\t \"<div id='chartTitleBar' class='movableWindowTitleBar'>\" + \n\t\t \"<div id='chartTitleText' class='movableWindowTitleText'>Average Max SWE by decade</div>\" + \n\t\t \"<div id='closeChartWindow' class='closeWindow'><span class='ui-icon ui-icon-close'></span></div>\" + \n\t\t \"</div>\" + \n\t\t \"<div id='chartWindowContent' class='resizableContent'>Hover over map features to see change in max SWE over time.\" + \n\t\t \"</div>\" + \n\t\t\"</div>\"\n\t);\n\n\tchartWindow.css(\"left\", function() {\n\t\tvar sidebar = $(\"#dataSelectUIContainer\");\n\t\t\n\t\tif(sidebar.overflown()) {\n\t\t\treturn $(window).width() - 550;\n\t\t}\n\t\treturn $(window).width() - 530;\n\t\t\n\t});\n\n\tchartWindow.appendTo(\"body\");\n\n\t$(\"#chartWindowContent\").height(function() {\n\t\tvar chartWindowHeight = $(\"#chartWindow\").height(),\n\t\t\tchartTitleBarHeight = $(\"#chartTitleBar\").height(),\n\t\t\tpadding = $(\"#chartWindowContent\").innerHeight() - $(\"#chartWindowContent\").height();\n\t\treturn chartWindowHeight - (chartTitleBarHeight + (padding));\n\t});\n\n\tchartWindow.resizable({\n\t\tminHeight: 200, \n\t\tminWidth: 250,\n\t\tmaxWidth: 500,\n\t\tmaxHeight: 460,\n\t\tresize: function(event, ui) {\n\t\t\t// Set the height of the content to match the resized window.\n\t\t\t\n\t\t\t$(\"#chartWindowContent\").height(function() {\n\t\t\t\tvar chartWindowHeight = $(\"#chartWindow\").height(),\n\t\t\t\t\tchartTitleBarHeight = $(\"#chartTitleBar\").height(),\n\t\t\t\t\tpadding = $(\"#chartWindowContent\").innerHeight() - $(\"#chartWindowContent\").height();\n\t\t\t\t\n\t\t\t\treturn chartWindowHeight - (chartTitleBarHeight + (padding));\n\t\t\t});\n\t\t\t// Resize the Chart if it exists\n\t\t\tif($(\"#SWEchart\").length) {\n\t\t\t\tcurrentSWEChart.resize();\n\t\t\t}\n\t\t}\n\t});\n\n\tchartWindow.draggable({\n\t\tcontainment: \"parent\",\n\t\thandle: \"#chartTitleBar\",\n\t\tstart: function() {\n\t\t\tchartWindow.css(\"opacity\", \"0.7\");\n\t\t},\n\t\tstop: function() {\n\t\t\tchartWindow.css(\"opacity\", \"1\");\n\t\t}\n\t});\n\n\t$(\"#closeChartWindow\").click(function() {\n\t\tchartWindow.remove();\n\t\t$(\"#showChartButton\").show();\n\t});\n}", "function createWindow2() {\n\t\tpopulateData(\"employment\",2);\n\t}", "function createGraphWindow(name, graph_type, graph_data, target_data) {\n if (windows.get(name) == undefined) {\n let window = new BrowserWindow({\n width: 700,\n height: 400,\n parent: win,\n center: true,\n title: 'Create a graph'\n });\n window.webContents.on('did-finish-load', () => {\n switch(graph_type) {\n case 'members':\n window.webContents.send('createMembersChart', graph_data);\n break;\n case 'day':\n window.webContents.send('createDayFrequencyChart', graph_data);\n break;\n case 'burndown':\n window.webContents.send('createBurndownChart', graph_data, target_data);\n default:\n break;\n }\n })\n // window.webContents.openDevTools();\n window.on('closed', () => {\n window = null;\n windows.set(name, undefined);\n })\n\n window.loadFile('./graph.html');\n window.show();\n\n windows.set(name, window);\n } else {\n console.log('window with that name is already open!');\n }\n\n\n}", "function plotCurrentWindow ( dp ){\n // append newest data point\n currWindow.add ( dp ) ;\n \n // Clear the old image\n //background ( 0 ) ;\n \n // Set up to fade older lines\n var bright = 100 ;\n var tmp = currWindow.last ( ) ;\n \n // Current line is fat\n strokeWeight ( 4 ) ;\n \n // Rest of data, newer to older\n while ( tmp != null )\n {\n strokeColor = tmp.n ;\n stroke( strokeColor, 100, bright ) ;\n line( centroidX, centroidY, tmp.x, tmp.y ) ;\n //var barY = height - 50 ;\n //var barX = width / 2 ;\n //stroke( gaugeColor, 100, 100 ) ;\n //strokeWeight( 4 ) ;\n //line( barX - (tmp.n / 2), barY, barX + ( tmp.n / 2), barY ) ;\n strokeWeight ( 1 ) ;\n stroke( strokeColor, 100, bright ) ;\n //rect( barX, barY, 5, tmp.n * 10 ) ;\n //println ( tmp.n ) ;\n tmp = currWindow.prev ( ) ;\n \n // Fade the older lines progressively\n bright -= 1 ;\n strokeWeight ( 1 ) ;\n\n }\n}", "function handle_data_model(tsnedata,isKeepUndefined) {\n windowsSize = windowsSize||1;\n // get windown surrounding\n let windowSurrounding = (windowsSize - 1)/2;\n let dataIn = [];\n // let timeScale = d3.scaleLinear().domain([0,sampleS.timespan.length-1]).range([0,timeWeight]);\n d3.values(tsnedata).forEach(axis_arr => {\n let lastcluster;\n let lastdataarr;\n let count = 0;\n let timeLength = sampleS.timespan.length;\n sampleS.timespan.forEach((t, i) => {\n let currentData = axis_arr[i].slice();\n currentData.cluster = axis_arr[i].cluster;\n currentData.name = axis_arr[i].name;\n currentData.__timestep = axis_arr[i].timestep;\n let index = currentData.cluster;\n currentData.clusterName = cluster_info[index].name;\n let appendCondition = !cluster_info[currentData.cluster].hide;\n appendCondition = appendCondition && !(lastcluster !== undefined && index === lastcluster) || runopt.suddenGroup && calculateMSE_num(lastdataarr, currentData) > cluster_info[currentData.cluster].mse * runopt.suddenGroup;\n if (appendCondition) {\n // if (!(lastcluster !== undefined && index === lastcluster)|| currentData.cluster===13 || runopt.suddenGroup && calculateMSE_num(lastdataarr, currentData) > cluster_info[currentData.cluster].mse * runopt.suddenGroup) {\n currentData.show = true;\n // // add all points\n // }\n // // timeline precalculate\n // if (true) {\n\n lastcluster = index;\n lastdataarr = currentData.slice();\n currentData.timestep = count; // TODO temperal timestep\n count++;\n // make copy of axis data\n currentData.data = currentData.slice();\n // currentData.push(timeScale(axis_arr[i].timestep))\n // adding window\n for (let w = 0; w<windowSurrounding; w++)\n {\n let currentIndex = i -w;\n let currentWData;\n if (currentIndex<0) // bounder problem\n currentIndex = 0;\n currentWData = axis_arr[currentIndex].slice();\n // currentWData.push(timeScale(axis_arr[currentIndex].timestep))\n currentWData.forEach(d=>{\n currentData.push(d);\n });\n }\n for (let w = 0; w<windowSurrounding; w++)\n {\n let currentIndex = i + w;\n let currentWData;\n if (currentIndex > timeLength-1) // bounder problem\n currentIndex = timeLength-1;\n currentWData = axis_arr[currentIndex];\n // currentWData.push(timeScale(axis_arr[currentIndex].timestep))\n currentWData.forEach(d=>{\n currentData.push(d);\n });\n }\n if (isKeepUndefined)\n {\n for (let i = 0; i< currentData.length; i++){\n if (currentData[i]===0)\n currentData[i] = -1;\n }\n }\n dataIn.push(currentData);\n }\n return index;\n // return cluster_info.findIndex(c=>distance(c.__metrics.normalize,axis_arr)<=c.radius);\n })\n });\n return dataIn;\n}", "static addWindow(window) {\n window.setPosition(32 * (this._windows.length + 1), 32 * (this._windows.length + 1));\n window.setIndex(this.startIndex + this._windows.length);\n this._windows.push(window);\n window.show();\n }", "function window_window(windowBoundaries) {\n return function windowOperatorFunction(source) {\n return source.lift(new WindowOperator(windowBoundaries));\n };\n}", "function updatewindow(strm,src,end,copy){var dist;var state=strm.state;/* if it hasn't been done already, allocate space for the window */if(state.window===null){state.wsize=1<<state.wbits;state.wnext=0;state.whave=0;state.window=new utils.Buf8(state.wsize);}/* copy state->wsize or less output bytes into the circular window */if(copy>=state.wsize){utils.arraySet(state.window,src,end-state.wsize,state.wsize,0);state.wnext=0;state.whave=state.wsize;}else {dist=state.wsize-state.wnext;if(dist>copy){dist=copy;}//zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window,src,end-copy,dist,state.wnext);copy-=dist;if(copy){//zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window,src,end-copy,copy,0);state.wnext=copy;state.whave=state.wsize;}else {state.wnext+=dist;if(state.wnext===state.wsize){state.wnext=0;}if(state.whave<state.wsize){state.whave+=dist;}}}return 0;}", "function createAddWindow() {\n\n addWindow = window('Adicionando itens a lista de compras', true, 'addWindow.html');\n\n //Garbage Colletion \n addWindow.on('close', ()=> {\n addWindow = null;\n });\n}", "function hannWindow(data, counter){\n var dataCopy = new Float32Array(data.length);\n for(var i = 0; i < dataCopy.length; i++){\n var mult = 0.5*(1.0 - Math.cos(2.0*M_PI*i/data.length));\n dataCopy[i] = data[counter]*mult;\n counter++;\n if(counter >= dataCopy.length)\n counter = 0;\n }\n return dataCopy;\n}", "computeRenderWindow(data) {\n var _data$buffer, _data$maxRenderWindow;\n\n const buffer = Math.max((_data$buffer = data.buffer) !== null && _data$buffer !== void 0 ? _data$buffer : 1, 1);\n const maxRenderWindowLowerBound = 1 + 2 * buffer;\n let offset = Math.max(Math.min(data.offset, data.currentPage - buffer), 0);\n let windowLength = Math.max(data.offset + data.windowLength, data.currentPage + buffer + 1) - offset;\n let maxRenderWindow = (_data$maxRenderWindow = data.maxRenderWindow) !== null && _data$maxRenderWindow !== void 0 ? _data$maxRenderWindow : 0;\n\n if (maxRenderWindow !== 0) {\n if (maxRenderWindow < maxRenderWindowLowerBound) {\n console.warn(`maxRenderWindow too small. Increasing to ${maxRenderWindowLowerBound}`);\n maxRenderWindow = maxRenderWindowLowerBound;\n }\n\n if (windowLength > maxRenderWindow) {\n offset = data.currentPage - Math.floor(maxRenderWindow / 2);\n windowLength = maxRenderWindow;\n }\n }\n\n return {\n offset,\n windowLength\n };\n }", "function generate_slide_hist(data, binWidth, stepSize){\n var binHalf = binWidth/2;\n\n //Find the range of the data so we can know which window to slide overlay\n var data_range = d3.extent(data)\n\n //generate an array of the bin centers we are going to use in our sliding interval.\n var bin_centers = [data_range[0] ]\n while(bin_centers.last() < data_range[1]) bin_centers.push(bin_centers.last() + stepSize)\n\n //Run through the bin centers counting how many are within the bin width of the value.\n var counts = []\n bin_centers.forEach(function(center){\n var points_in_bin = data.filter(function(val){return val > (center - binHalf) && val < (center + binHalf) })\n counts.push({\"center\": center, \"in_bin\": points_in_bin.length})\n })\n\n return counts;\n }", "function _createWindow() {\n $('#addwindow').jqxWindow({\n showCollapseButton: true, maxHeight: 200, maxWidth: 700, minHeight: 200, minWidth: 200, height: 300, width: 500,\n autoOpen: false,\n initContent: function () {\n $('#addwindow').jqxWindow('focus');\n }\n });\n $('#editwindow').jqxWindow({\n showCollapseButton: true, maxHeight: 400, maxWidth: 700, minHeight: 200, minWidth: 200, height: 300, width: 500,\n autoOpen: false,\n initContent: function () {\n $('#addwindow').jqxWindow('focus');\n }\n });\n $('#confirm').jqxWindow({\n showCollapseButton: true,\n Width: 250,\n Height: 110,\n autoOpen: false,\n initContent: function () {\n $('#addwindow').jqxWindow('focus');\n }\n });\n }", "createWindow(previousOperandElement, currentOperandElement) {\n this.previousOperandElement = previousOperandElement ;\n this.currentOperandElement = currentOperandElement ;\n }", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n \n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n \n state.window = new utils.Buf8(state.wsize);\n }\n \n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n }", "function calc_window() {\n calc_windowW();\n calc_windowH();\n}", "function windows() {\n $('.window').windows({\n snapping: true,\n snapSpeed: 500,\n snapInterval: 1100,\n onScroll: function(scrollPos){\n // scrollPos:Number\n },\n onSnapComplete: function($el){\n // after window ($el) snaps into place\n },\n onWindowEnter: function($el){\n // when new window ($el) enters viewport\n }\n })\n\n //console.log('windows initiated');\n}", "_create_window_button(ws_index, w) { \t\n \t// move to previous/next workspace buttons (will be shown on w button hover)\n \tvar move_previous = new St.Bin({visible: false, reactive: true, can_focus: true, track_hover: true});\n \tvar move_previous_icon = new St.Icon({icon_name: MOVE_TO_PREVIOUS_WORKSPACE_ICON_NAME, style_class: 'system-status-icon'});\n \tmove_previous.set_child(move_previous_icon);\n \t\n \tvar move_next = new St.Bin({visible: false, reactive: true, can_focus: true, track_hover: true});\n \tvar move_next_icon = new St.Icon({icon_name: MOVE_TO_NEXT_WORKSPACE_ICON_NAME, style_class: 'system-status-icon'});\n \tmove_next.set_child(move_next_icon);\n \t\n \tif (!w.is_on_all_workspaces()) {\n\t\t\tmove_previous.connect('button-press-event', () => this._move_to_previous_workspace(ws_index, w));\n\t\t\tmove_next.connect('button-press-event', () => this._move_to_next_workspace(ws_index, w));\n\t\t}\n \t\n // windows on all workspaces have to be displayed only once\n \tif (!w.is_on_all_workspaces() || ws_index == 0) {\n\t\t // create button\n\t\t\tvar w_box = new St.BoxLayout({visible: true, reactive: true, can_focus: true, track_hover: true, style_class: 'window-box'});\n\t\t var w_box_app = this.window_tracker.get_window_app(w);\n\t\t \n\t\t // arrows state\n\t\t w_box.arrows = false;\n\t\t \n\t\t // create w button and its icon\n\t\t var w_box_button = new St.Bin({visible: true, reactive: true, can_focus: true, track_hover: true});\n\t\t var w_box_icon;\n\t\t if (w_box_app) {\n\t\t \tw_box_icon = w_box_app.create_icon_texture(ICON_SIZE);\n\t\t }\n\t\t // sometimes no icon is defined or icon is void, at least for a short time\n\t\t if (!w_box_icon || w_box_icon.get_style_class_name() == 'fallback-app-icon') {\n\t\t \tw_box_icon = new St.Icon({icon_name: FALLBACK_ICON_NAME, icon_size: ICON_SIZE});\n\t\t\t}\n\t\t\tw_box_button.set_child(w_box_icon);\n\t\t\tw_box_button.connect('button-press-event', (widget, event) => this._on_button_press(widget, event, w_box, ws_index, w));\n\t\t\tw_box.connect('notify::hover', () => this._on_button_hover(w_box, w.title));\n\t\t\t\n\t\t\t// desaturate option\n\t\t\tif (DESATURATE_ICONS) {\n\t\t\t\tthis.desaturate = new Clutter.DesaturateEffect();\n\t\t\t\tw_box_icon.add_effect(this.desaturate);\n\t\t\t}\n\t\t \n\t\t\t// set icon style and opacity following window state\n\t\t if (w.is_hidden()) {\n\t\t\t\tw_box_button.style_class = 'window-hidden';\n\t\t\t\tw_box_icon.set_opacity(HIDDEN_OPACITY);\n\t\t } else {\n\t\t\t\tif (w.has_focus()) {\n\t\t\t\tw_box_button.style_class = 'window-focused';\n\t\t\t\tw_box_icon.set_opacity(FOCUSED_OPACITY);\n\t\t\t\t} else {\n\t\t\t\tw_box_button.style_class = 'window-unfocused';\n\t\t\t\tw_box_icon.set_opacity(UNFOCUSED_OPACITY);\n\t\t\t\t}\n\t\t }\n \n\t\t // add button in task bar\n\t\t w_box.add_child(w_box_button);\n\t\t w_box.add_child(move_previous);\n\t\t \tw_box.add_child(move_next);\n\t\t \tif (w.is_on_all_workspaces()) {\n\t\t \t\tthis.ws_bar.insert_child_at_index(w_box, 0);\t\n\t\t \t} else {\n\t\t \tthis.ws_bar.add_child(w_box);\n\t\t }\n\t\t}\n\t}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n } else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n } else {\n state.wnext += dist;\n if (state.wnext === state.wsize) {\n state.wnext = 0;\n }\n if (state.whave < state.wsize) {\n state.whave += dist;\n }\n }\n }\n return 0;\n }", "function $tTA8$var$updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n /* if it hasn't been done already, allocate space for the window */\n\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n state.window = new $tTA8$var$utils.Buf8(state.wsize);\n }\n /* copy state->wsize or less output bytes into the circular window */\n\n\n if (copy >= state.wsize) {\n $tTA8$var$utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n } else {\n dist = state.wsize - state.wnext;\n\n if (dist > copy) {\n dist = copy;\n }\n\n $tTA8$var$utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n $tTA8$var$utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n } else {\n state.wnext += dist;\n\n if (state.wnext === state.wsize) {\n state.wnext = 0;\n }\n\n if (state.whave < state.wsize) {\n state.whave += dist;\n }\n }\n }\n\n return 0;\n}", "function rotateWindow(){\n\t// Moves the windows down an index and removes the oldest one\t\n\tvar i;\n\tfor(i = 1; i < hist_length; i++){\n\t\thist_window[i - 1] = hist_window[i];\n\t}\n\t// Adds the current gathering window to the historical window\n\thist_window[hist_length - 1] = gather_window;\n\t\n\t// Clears the both temporary windows\n\tgather_window = [];\n\tcurrent_sum = [];\n\t\n\t// Sums up the emote values from the historical window\n\tvar i;\n\tfor(i = 0; i < hist_length; i++){\n\t\tcurrent_sum = addEmotes(hist_window[i], current_sum);\n\t}\n\n\t// Sorts the sum list in descending mode and then prints it to the webpage\n\tcurrent_sum.sort(compareThirdColumn);\n\tupdateChart(current_sum.slice(0, top_length));\n}", "function _createWindow() {\n\n $('#confirm').jqxWindow({\n showCollapseButton: true,\n Width: 800,\n Height: 300,\n autoOpen: false,\n theme: 'bite',\n initContent: function () {\n $('#confirm').jqxWindow('focus');\n }\n });\n\n $('#leaver').jqxWindow({\n showCollapseButton: true,\n Width: 800,\n Height: 300,\n autoOpen: false,\n theme: 'bite',\n initContent: function () {\n $('#leaver').jqxWindow('focus');\n }\n });\n }", "function updatewindow(strm, src, end, copy) {\n\t var dist;\n\t var state = strm.state;\n\n\t /* if it hasn't been done already, allocate space for the window */\n\t if (state.window === null) {\n\t state.wsize = 1 << state.wbits;\n\t state.wnext = 0;\n\t state.whave = 0;\n\n\t state.window = new utils$d.Buf8(state.wsize);\n\t }\n\n\t /* copy state->wsize or less output bytes into the circular window */\n\t if (copy >= state.wsize) {\n\t utils$d.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n\t state.wnext = 0;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t dist = state.wsize - state.wnext;\n\t if (dist > copy) {\n\t dist = copy;\n\t }\n\t //zmemcpy(state->window + state->wnext, end - copy, dist);\n\t utils$d.arraySet(state.window, src, end - copy, dist, state.wnext);\n\t copy -= dist;\n\t if (copy) {\n\t //zmemcpy(state->window, end - copy, copy);\n\t utils$d.arraySet(state.window, src, end - copy, copy, 0);\n\t state.wnext = copy;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t state.wnext += dist;\n\t if (state.wnext === state.wsize) { state.wnext = 0; }\n\t if (state.whave < state.wsize) { state.whave += dist; }\n\t }\n\t }\n\t return 0;\n\t}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n /* if it hasn't been done already, allocate space for the window */\n\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n state.window = new utils.Buf8(state.wsize);\n }\n /* copy state->wsize or less output bytes into the circular window */\n\n\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n } else {\n dist = state.wsize - state.wnext;\n\n if (dist > copy) {\n dist = copy;\n } //zmemcpy(state->window + state->wnext, end - copy, dist);\n\n\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n } else {\n state.wnext += dist;\n\n if (state.wnext === state.wsize) {\n state.wnext = 0;\n }\n\n if (state.whave < state.wsize) {\n state.whave += dist;\n }\n }\n }\n\n return 0;\n }", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n /* if it hasn't been done already, allocate space for the window */\n\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n state.window = new utils.Buf8(state.wsize);\n }\n /* copy state->wsize or less output bytes into the circular window */\n\n\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n } else {\n dist = state.wsize - state.wnext;\n\n if (dist > copy) {\n dist = copy;\n } //zmemcpy(state->window + state->wnext, end - copy, dist);\n\n\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n } else {\n state.wnext += dist;\n\n if (state.wnext === state.wsize) {\n state.wnext = 0;\n }\n\n if (state.whave < state.wsize) {\n state.whave += dist;\n }\n }\n }\n\n return 0;\n }", "makeWindow(windowLength, windowUnits) {\n windowUnits = \"days\";\n if (windowUnits === \"days\") {\n let currentDate = new Date();\n let nDaysAgo = new Date();\n nDaysAgo.setDate(currentDate.getDate() - windowLength);\n return [nDaysAgo, currentDate];\n }\n }", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n }", "function updatewindow(strm, src, end, copy) {\n\t var dist;\n\t var state = strm.state;\n\t\n\t /* if it hasn't been done already, allocate space for the window */\n\t if (state.window === null) {\n\t state.wsize = 1 << state.wbits;\n\t state.wnext = 0;\n\t state.whave = 0;\n\t\n\t state.window = Buf8(state.wsize);\n\t }\n\t\n\t /* copy state->wsize or less output bytes into the circular window */\n\t if (copy >= state.wsize) {\n\t arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n\t state.wnext = 0;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t dist = state.wsize - state.wnext;\n\t if (dist > copy) {\n\t dist = copy;\n\t }\n\t //zmemcpy(state->window + state->wnext, end - copy, dist);\n\t arraySet(state.window, src, end - copy, dist, state.wnext);\n\t copy -= dist;\n\t if (copy) {\n\t //zmemcpy(state->window, end - copy, copy);\n\t arraySet(state.window, src, end - copy, copy, 0);\n\t state.wnext = copy;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t state.wnext += dist;\n\t if (state.wnext === state.wsize) { state.wnext = 0; }\n\t if (state.whave < state.wsize) { state.whave += dist; }\n\t }\n\t }\n\t return 0;\n\t }", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n } else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n } else {\n state.wnext += dist;\n if (state.wnext === state.wsize) {\n state.wnext = 0;\n }\n if (state.whave < state.wsize) {\n state.whave += dist;\n }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new common.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n common.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n common.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n common.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new common.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n common.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n common.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n common.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "static window_set_index( wnd, index ) {\n let newmap = {};\n let window_array = [];\n let inserted = false;\n let i = 0;\n let w = null;\n let changes = [];\n\n /**\n * Add all windows into this array except the\n * one we're assigning to a new index.\n */\n for (const id in WINDOW.#window_list) {\n if (WINDOW.#window_list[id].id === wnd.id) {\n continue;\n }\n window_array.push(WINDOW.#window_list[id]);\n }\n\n /* Sort visible windows */\n window_array.sort((a, b)=>{\n return a.index - b.index;\n });\n\n if (index >= 0) {\n wnd.index = index;\n wnd.zindex = WINDOW.#base_index + index;\n }\n\n for (let i = 0; i < window_array.length; i++) {\n if (index > 0 && \n (i+1) >= index) \n {\n window_array.splice(i, 0, wnd);\n inserted = true;\n for (let j = (i+1); j < window_array.length; j++ ) {\n window_array[j].index = (j+1);\n window_array[j].zindex = WINDOW.#base_index + (j+1);\n }\n break;\n }\n window_array[i].index = (i+1);\n window_array[i].zindex = WINDOW.#base_index + (i+1);\n }\n if (index > 0 &&\n inserted === false) \n {\n window_array.push(wnd);\n }\n\n \n // for ( i = 0; \n // i < window_array.length &&\n // (window_array[i].state !== WINDOW_STATE_NORMAL &&\n // window_array[i].get_management_state() === WM_STATE_MANAGED);\n // i++)\n // {\n // newmap[window_array[i].index] = window_array[i];\n // changes.push(window_array[i]);\n // }\n\n for ( i = 0; \n i < window_array.length;\n i++)\n {\n w = window_array[i];\n if (w.state === WINDOW_STATE_NORMAL ||\n (w.state === WINDOW_STATE_MINIMIZED &&\n w.get_management_state() === WM_STATE_UNMANAGED))\n {\n continue;\n }\n\n newmap[w.index] = w;\n changes.push(window_array[i]);\n }\n\n\n WINDOW.#nmin_row_count = Math.ceil( changes.length / WINDOW.#nmin_slots_per_row);\n WINDOW.#minimize_map = newmap;\n changes.forEach((w)=>{\n w.minimize_position_set(w.index);\n });\n return;\n }", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new common$1.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n common$1.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n common$1.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n common$1.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n\t var dist;\n\t var state = strm.state;\n\n\t /* if it hasn't been done already, allocate space for the window */\n\t if (state.window === null) {\n\t state.wsize = 1 << state.wbits;\n\t state.wnext = 0;\n\t state.whave = 0;\n\n\t state.window = new common.Buf8(state.wsize);\n\t }\n\n\t /* copy state->wsize or less output bytes into the circular window */\n\t if (copy >= state.wsize) {\n\t common.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n\t state.wnext = 0;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t dist = state.wsize - state.wnext;\n\t if (dist > copy) {\n\t dist = copy;\n\t }\n\t //zmemcpy(state->window + state->wnext, end - copy, dist);\n\t common.arraySet(state.window, src, end - copy, dist, state.wnext);\n\t copy -= dist;\n\t if (copy) {\n\t //zmemcpy(state->window, end - copy, copy);\n\t common.arraySet(state.window, src, end - copy, copy, 0);\n\t state.wnext = copy;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t state.wnext += dist;\n\t if (state.wnext === state.wsize) { state.wnext = 0; }\n\t if (state.whave < state.wsize) { state.whave += dist; }\n\t }\n\t }\n\t return 0;\n\t}", "function updatewindow(strm, src, end, copy) {\n\t var dist;\n\t var state = strm.state;\n\n\t /* if it hasn't been done already, allocate space for the window */\n\t if (state.window === null) {\n\t state.wsize = 1 << state.wbits;\n\t state.wnext = 0;\n\t state.whave = 0;\n\n\t state.window = new utils.Buf8(state.wsize);\n\t }\n\n\t /* copy state->wsize or less output bytes into the circular window */\n\t if (copy >= state.wsize) {\n\t utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n\t state.wnext = 0;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t dist = state.wsize - state.wnext;\n\t if (dist > copy) {\n\t dist = copy;\n\t }\n\t //zmemcpy(state->window + state->wnext, end - copy, dist);\n\t utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n\t copy -= dist;\n\t if (copy) {\n\t //zmemcpy(state->window, end - copy, copy);\n\t utils.arraySet(state.window, src, end - copy, copy, 0);\n\t state.wnext = copy;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t state.wnext += dist;\n\t if (state.wnext === state.wsize) { state.wnext = 0; }\n\t if (state.whave < state.wsize) { state.whave += dist; }\n\t }\n\t }\n\t return 0;\n\t}", "function updatewindow(strm, src, end, copy) {\n\t var dist;\n\t var state = strm.state;\n\n\t /* if it hasn't been done already, allocate space for the window */\n\t if (state.window === null) {\n\t state.wsize = 1 << state.wbits;\n\t state.wnext = 0;\n\t state.whave = 0;\n\n\t state.window = new utils.Buf8(state.wsize);\n\t }\n\n\t /* copy state->wsize or less output bytes into the circular window */\n\t if (copy >= state.wsize) {\n\t utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n\t state.wnext = 0;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t dist = state.wsize - state.wnext;\n\t if (dist > copy) {\n\t dist = copy;\n\t }\n\t //zmemcpy(state->window + state->wnext, end - copy, dist);\n\t utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n\t copy -= dist;\n\t if (copy) {\n\t //zmemcpy(state->window, end - copy, copy);\n\t utils.arraySet(state.window, src, end - copy, copy, 0);\n\t state.wnext = copy;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t state.wnext += dist;\n\t if (state.wnext === state.wsize) { state.wnext = 0; }\n\t if (state.whave < state.wsize) { state.whave += dist; }\n\t }\n\t }\n\t return 0;\n\t}", "function updatewindow(strm, src, end, copy) {\n\t var dist;\n\t var state = strm.state;\n\n\t /* if it hasn't been done already, allocate space for the window */\n\t if (state.window === null) {\n\t state.wsize = 1 << state.wbits;\n\t state.wnext = 0;\n\t state.whave = 0;\n\n\t state.window = new utils.Buf8(state.wsize);\n\t }\n\n\t /* copy state->wsize or less output bytes into the circular window */\n\t if (copy >= state.wsize) {\n\t utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n\t state.wnext = 0;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t dist = state.wsize - state.wnext;\n\t if (dist > copy) {\n\t dist = copy;\n\t }\n\t //zmemcpy(state->window + state->wnext, end - copy, dist);\n\t utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n\t copy -= dist;\n\t if (copy) {\n\t //zmemcpy(state->window, end - copy, copy);\n\t utils.arraySet(state.window, src, end - copy, copy, 0);\n\t state.wnext = copy;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t state.wnext += dist;\n\t if (state.wnext === state.wsize) { state.wnext = 0; }\n\t if (state.whave < state.wsize) { state.whave += dist; }\n\t }\n\t }\n\t return 0;\n\t}", "function updatewindow(strm, src, end, copy) {\n\t var dist;\n\t var state = strm.state;\n\n\t /* if it hasn't been done already, allocate space for the window */\n\t if (state.window === null) {\n\t state.wsize = 1 << state.wbits;\n\t state.wnext = 0;\n\t state.whave = 0;\n\n\t state.window = new utils.Buf8(state.wsize);\n\t }\n\n\t /* copy state->wsize or less output bytes into the circular window */\n\t if (copy >= state.wsize) {\n\t utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n\t state.wnext = 0;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t dist = state.wsize - state.wnext;\n\t if (dist > copy) {\n\t dist = copy;\n\t }\n\t //zmemcpy(state->window + state->wnext, end - copy, dist);\n\t utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n\t copy -= dist;\n\t if (copy) {\n\t //zmemcpy(state->window, end - copy, copy);\n\t utils.arraySet(state.window, src, end - copy, copy, 0);\n\t state.wnext = copy;\n\t state.whave = state.wsize;\n\t }\n\t else {\n\t state.wnext += dist;\n\t if (state.wnext === state.wsize) { state.wnext = 0; }\n\t if (state.whave < state.wsize) { state.whave += dist; }\n\t }\n\t }\n\t return 0;\n\t}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window,src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window,src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}", "function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window,src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window,src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}" ]
[ "0.6333172", "0.568205", "0.55629206", "0.5411922", "0.54106224", "0.53886354", "0.5357712", "0.5325728", "0.53065014", "0.52989614", "0.5283861", "0.52700675", "0.5251572", "0.521602", "0.51900035", "0.517553", "0.51752836", "0.51701975", "0.5168563", "0.5165006", "0.51619554", "0.514764", "0.51454115", "0.513466", "0.5133183", "0.51315814", "0.5127272", "0.5124986", "0.51219815", "0.5105106", "0.50962174", "0.50962174", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5093602", "0.5092127", "0.5089402", "0.5087829", "0.50830096", "0.50830096", "0.50830096", "0.50830096", "0.5080949", "0.5080949" ]
0.0
-1
This maps one or more parts of a data...as with MapReduce
select(func){ var flow = new Flow(); if( Util.isFunction(func) ) flow.pipeFunc = func; else{ flow.pipeFunc = function(input){ return input[func]; }; } setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processData(data) {\n mapData = data[0]\n incidence = data[1];\n mortality = data[2]\n for (var i = 0; i < mapData.features.length; i++) {\n mapData.features[i].properties.incidenceRates = incidence[mapData.features[i].properties.adm0_a3];\n mapData.features[i].properties.mortalityRates = mortality[mapData.features[i].properties.adm0_a3];\n }\n drawMap()\n}", "map(id, source) {}", "function makeMap(data) {\r\n var mapData = {};\r\n // Link mobile phone dataset with countrycodes and categorize the mobile phone dataset\r\n for (i = 0; i < data.length; i++){\r\n var object = data[i];\r\n\r\n\r\n for (j = 0; j < countryCodes.length; j++){\r\n // [\"...\"] to be able to walk over strings\r\n if (object[\"Mobile cellular subscriptions (per 100 people)\"] == countryCodes[j][2]){\r\n object.countryCodes = countryCodes[j][1]\r\n }\r\n }\r\n\r\n // Within the Countrycode object, create a fillkey and add the countryname and # of cellphones\r\n // No Data (to append to Json, source: http://stackoverflow.com/questions/736590/add-new-attribute-element-to-json-object-using-javascript)\r\n if (object[\"2011\"] == null){\r\n mapData[object.countryCodes] = {fillKey: \"noData\",\r\n name: object[\"Mobile cellular subscriptions (per 100 people)\"],\r\n cellphones: object[\"2011\"]}\r\n }\r\n\r\n // 0-33 phones per 100 people ()\r\n if (0 < object[\"2011\"] && object[\"2011\"] <= 33){\r\n mapData[object.countryCodes] = {fillKey: \"phones0To33\",\r\n name: object[\"Mobile cellular subscriptions (per 100 people)\"],\r\n cellphones: object[\"2011\"]}\r\n } \r\n\r\n // 34-66 Phones per 100 people\r\n if (34 <= object[\"2011\"] && object[\"2011\"] <= 66){\r\n mapData[object.countryCodes] = {fillKey: \"phones34To66\",\r\n name: object[\"Mobile cellular subscriptions (per 100 people)\"],\r\n cellphones: object[\"2011\"]}\r\n }\r\n\r\n // 67-99 phones per 100 people\r\n if (67 <= object[\"2011\"] && object[\"2011\"] <= 100){\r\n mapData[object.countryCodes] = {fillKey: \"phones67To99\",\r\n name: object[\"Mobile cellular subscriptions (per 100 people)\"],\r\n cellphones: object[\"2011\"]}\r\n }\r\n\r\n // 100 - 133 phones per 100 people\r\n if (100 <= object[\"2011\"] && object[\"2011\"] <= 133){\r\n mapData[object.countryCodes] = {fillKey: \"phones100To133\",\r\n name: object[\"Mobile cellular subscriptions (per 100 people)\"],\r\n cellphones: object[\"2011\"]}\r\n }\r\n\r\n // 134+ phones per 100 people\r\n if (134 <= object[\"2011\"]){\r\n mapData[object.countryCodes] = {fillKey: \"phones134AndMore\",\r\n name: object[\"Mobile cellular subscriptions (per 100 people)\"],\r\n cellphones: object[\"2011\"]}\r\n }\r\n }\r\n \r\n // Creating the map\r\n var map = new Datamap ({\r\n element: document.getElementById('container'),\r\n\r\n // Fill the countries with the right colors (https://www.w3schools.com/colors/colors_hexadecimal.asp)\r\n fills: {\r\n 'noData': \"grey\",\r\n 'phones0To33': \"#33f40c\",\r\n 'phones34To66': \"#20a420\",\r\n 'phones67To99': \"#207b20\",\r\n 'phones100To133': \"#205b20\",\r\n 'phones134AndMore': \"#203020\",\r\n defaultFill: \"grey\" \r\n },\r\n // Input data\r\n data: mapData,\r\n // Styling\r\n geographyConfig: {\r\n borderColor: 'black',\r\n highlightBorderColor: 'white',\r\n highlightOnHover: true,\r\n highlightFillColor: false,\r\n popupTemplate: function(geography, mapData) {\r\n return '<div class=\"hoverinfo\">' + 'Number of cellphones: '\r\n + mapData.cellphones + '<br> Country name: ' + mapData.name \r\n }\r\n }\r\n\r\n });\r\n\r\n // Creating a legend \r\n map.legend({\r\n legendTitle: \"# Phones per 100 people\",\r\n labels: {\r\n noData: \"No data in dataset\",\r\n phones0To33: \"0-33\",\r\n phones34To66: \"34-66\",\r\n phones67To99: \"67-99\",\r\n phones100To133: \"100-133\",\r\n phones134AndMore: \"134+\"\r\n }\r\n });\r\n}", "function processData(data) {\n // data come in within an array\n // can separate out here and assign\n // to different variables\n\n var streamsData = data[0],\n districtData = data[1],\n channelImproveData = data[2];\n\n // here you could do other data clean-up/processing/binding\n // if you needed to\n\n // when done, send the datasets to the drawMap function\n drawMap(streamsData, districtData, channelImproveData);\n drawLegend();\n\n }", "function parallel_coordinates(raw_data) {\n\tvar dt=[];\n\t data = raw_data.map(function(val,key) {\n\t\t datafieldmap={};\n\t\t for (var k in val) {\n\t\t\t \n\t\t\t if (!_.isNaN(raw_data[0][k] - 0)) {\n\t\t\t\t if(hasWhiteSpace(k))\n\t\t\t\t\t{\t\n\t\t\t\t\t //console.log(\"s : \",k);\n\t\t\t\t\t datafieldmap[k.replace( /\\s/g, '_')] = parseFloat(val[k]) || 0;\n\t\t\t\t\t}\n\t\t\t\t else{\n\t\t\t\t\t //console.log(\"k1 val1 : \"+k,val[k]);\n\t\t\t\t\t datafieldmap[k] = parseFloat(val[k]) || 0;\n\t\t\t\t }\n\n\t }\n\t else\n\t \t {\n\t \t //console.log(\"k val2 : \"+k,val[k]);\n\t \t if(hasWhiteSpace(k))\n\t\t\t\t{\t\n\t \t\t\t //console.log(\"s : \",k);\n\t \t\t\t datafieldmap[k.replace( /\\s/g, '_')] = val[k];\n\t\t\t\t ordinalfields.push(k.replace( /\\s/g, '_'));\n\t\t\t\t}\n\t \t else\n\t \t\t {\n\t \t\t //console.log(\"s1 : \",k);\n\t \t\t datafieldmap[k]=val[k];\n\t \t \t ordinalfields.push(k);\n\t \t\t }\n\n\t \t }\n\t\t\t console.log(\"val121 : \",datafieldmap);\n\t\t\t \n\t }\n\t console.log(\"val : \",datafieldmap);\n\t dt.push(datafieldmap);\n\t return datafieldmap;\n\t });\n\t //console.log(\"Data :\",dt);\n\t unqordinalfields = ordinalfields.filter(function(elem, pos) {\n\t\t return ordinalfields.indexOf(elem) == pos;\t\n\t\t });\n\t keys = d3.keys(data[0]);\n\t console.log(\"Key Values : \",keys);\n\t\n\t for (var k=0;k<keys.length;k++)\n\t\t {\n\t\t \tconsole.log(\"key\",keys[k],\" > k val : \",k);\n\t\t \t\n\t\t \tif((keys[k])!=\"contains\"){\n\t\t \t\trenamekeys.push(keys[k]);\n\t\t \t\t}\n\t\t \trenamekeys.join(\",\");\n\t\t }\n\t keys=renamekeys;\n\t console.log(\"after replace of characteres \",keys);\n\t tobe_color=keys[0];\t\n\t console.log(\" unqordinalfields : \"+unqordinalfields+\" tobe_color : \"+tobe_color+\" Column to Hide: \"+hidecol);\n\t xscale.domain(dimensions = keys.filter(function(k) {\n\t\t if(k!=\"contains\"){\n\t\t if(unqordinalfields.contains(k))\n\t\t\t {\n\t\t\t console.log(unqordinalfields);\n\t\t\t if(hidecol.contains(k))\n\t\t\t\t {\n\t\t\t\t d3.scale.ordinal()\n\t\t\t .domain(data.map(function(p) {if(k==tobe_color) cid.push(p[k]);return p[k]; }));\n\t\t\t\t\t return false;\n\t\t\t\t }\n\t\t\t else\n\t\t\t\t {\n\t\t\t\t yscale[k] = d3.scale.ordinal()\n\t\t .domain(data.map(function(p) {\n\t\t \t if(k==tobe_color){ \n\t\t \t\t cid.push(p[k]);\n\t\t \t\t console.log(p[k]);\n\t\t \t \t}\n\t\t \t return p[k]; \n\t\t \t }))\n\t\t .rangePoints([h, 0]);\n\t\t\t\t //console.log(k +\" : \"+yscale[k]);\n\t\t\t\t }\n\t\t\t }\n\t else {\n\t\t \tyscale[k] = d3.scale.linear()\n\t\t .domain(d3.extent(data, function(p) {if(k==tobe_color){ console.log(\"tobe_color : \"+tobe_color); cid.push(p[k]);} return +p[k]; }))\n\t\t .range([h, 0]);\n\t\t }\n\t\t return true;\n\t\t }\n\t\t }));\n\t console.log(\"CID : \",cid);\n\t uniqueVal = cid.filter(function(elem, pos) {\n\t\t return cid.indexOf(elem) == pos;\t\n\t\t });\n\t console.log(uniqueVal);\n\t\t var l=0;\n\t\t angular.forEach(uniqueVal,function(entry) {\n\t\t console.log(entry);\n\t\t if(precolors[l]==undefined)\n\t\t\t {\n\t\t\t l=0;\n\t\t\t }\n\t\t colors[entry]=precolors[l];\n\t\t l++;\n\t\t\t});\n\t n_dimensions = dimensions.length;\n\t console.log(\"Length : \"+n_dimensions+\" dimensions : \"+dimensions);\n\t // Add a group element for each dimension.\n\t var g = svg.selectAll(\".dimension\")\n\t .data(dimensions)\n\t .enter().append(\"svg:g\")\n\t .attr(\"class\", \"dimension\")\n\t .attr(\"transform\", function(d) {console.log(\"d val : \"+d+\" xscals : \"+xscale(d)); return \"translate(\" + xscale(d) + \")\"; })\n\t .call(d3.behavior.drag()\n\t .on(\"dragstart\", function(d) {\n\t dragging[d] = this.__origin__ = xscale(d);\n\t this.__dragged__ = false;\n\t d3.select(\"#foreground\").style(\"opacity\", \"0.35\");\n\t })\n\t .on(\"drag\", function(d) {\n\t dragging[d] = Math.min(w, Math.max(0, this.__origin__ += d3.event.dx));\n\t dimensions.sort(function(a, b) { return position(a) - position(b); });\n\t xscale.domain(dimensions);\n\t g.attr(\"transform\", function(d) { return \"translate(\" + position(d) + \")\"; });\n\t brush_count++;\n\t this.__dragged__ = true;\n\t\n\t // Feedback for axis deletion if dropped\n\t if (dragging[d] == 0) {\n\t d3.select(this).select(\".background\").style(\"fill\", \"#b00\");\n\t } else {\n\t d3.select(this).select(\".background\").style(\"fill\", null);\n\t }\n\t })\n\t .on(\"dragend\", function(d) {\n\t if (!this.__dragged__) {\n\t // no movement, invert axis\n\t var extent = invert_axis(d);\n\t // TODO refactor extents and update_ticks to avoid resetting extents manually\n\t update_ticks(d, extent);\n\t } else {\n\t // reorder axes\n\t d3.select(this).transition().attr(\"transform\", \"translate(\" + xscale(d) + \")\");\n\t }\n\t\n\t // remove axis if dragged all the way left\n\t if (dragging[d] == 0) {\n\t remove_axis(d,g);\n\t }\n\t\n\t // rerender\n\t d3.select(\"#foreground\").style(\"opacity\", null);\n\t brush();\n\t delete this.__dragged__;\n\t delete this.__origin__;\n\t delete dragging[d];\n\t }))\n\t\n\t // Add and store a brush for each axis.\n\t g.append(\"svg:g\")\n\t .attr(\"class\", \"brush\")\n\t .each(function(d) {\n\t \t console.log(\"--\",d);\n\t \t d3.select(this).call(yscale[d].brush = d3.svg.brush().y(yscale[d]).on(\"brush\", brush)); \n\t \t })\n\t .selectAll(\"rect\")\n\t .style(\"visibility\", null)\n\t .attr(\"x\", -23)\n\t .attr(\"width\", 36)\n\t .attr(\"rx\", 0)\n\t .attr(\"ry\", 0)\n\t .append(\"title\")\n\t .text(\"Drag up or down to brush along this axis\");\n\t\n\t g.selectAll(\".extent\")\n\t .append(\"title\")\n\t .text(\"Drag or resize this filter\");\n\t\n\t // Add an axis and title.\n\t g.append(\"svg:g\")\n\t .attr(\"class\", \"axis\")\n\t .attr(\"transform\", \"translate(0,0)\")\n\t .each(function(d) { d3.select(this).call(axis.scale(yscale[d])); })\n\t .append(\"svg:text\")\n\t .attr(\"text-anchor\", \"middle\")\n\t .attr(\"y\", function(d,i) { return i%2 == 0 ? -14:-30 })\n\t .attr(\"x\", 0)\n\t .attr(\"class\", \"label\")\n\t .text(String)\n\t .append(\"title\")\n\t .text(\"Click to invert. Drag to reorder\");\n\t\n\t legend = create_legend(colors,brush);\n\t\n\t // Render full foreground\n\t brush();\n\t\n\t}", "appendMapData(newData, coordinates, scene) {\n const parkingSpaceCalcInfo = [];\n for (const kind in newData) {\n if (!newData[kind]) {\n continue;\n }\n\n if (!this.data[kind]) {\n this.data[kind] = [];\n }\n\n for (let i = 0; i < newData[kind].length; ++i) {\n switch (kind) {\n case 'lane':\n const lane = newData[kind][i];\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addLane(lane, coordinates, scene),\n text: this.addLaneId(lane, coordinates, scene),\n }));\n break;\n case 'clearArea':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.YELLOW, coordinates, scene,\n ),\n }));\n break;\n case 'crosswalk':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.PURE_WHITE, coordinates, scene,\n ),\n }));\n break;\n case 'junction':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addBorder(\n newData[kind][i], colorMapping.BLUE, coordinates, scene,\n ),\n }));\n break;\n case 'pncJunction':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addZone(\n newData[kind][i], colorMapping.BLUE, coordinates, scene,\n ),\n }));\n break;\n case 'signal':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.trafficSignals.add([newData[kind][i]], coordinates, scene);\n break;\n case 'stopSign':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.stopSigns.add([newData[kind][i]], coordinates, scene);\n break;\n case 'yield':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addStopLine(\n newData[kind][i].stopLine, coordinates, scene,\n ),\n }));\n this.yieldSigns.add([newData[kind][i]], coordinates, scene);\n break;\n case 'road':\n const road = newData[kind][i];\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addRoad(road, coordinates, scene),\n }));\n break;\n case 'parkingSpace':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addBorder(\n newData[kind][i], colorMapping.YELLOW, coordinates, scene,\n ),\n text: this.addParkingSpaceId(newData[kind][i], coordinates, scene),\n }));\n parkingSpaceCalcInfo.push(this.calcParkingSpaceExtraInfo(newData[kind][i],\n coordinates));\n break;\n case 'speedBump':\n this.data[kind].push(Object.assign(newData[kind][i], {\n drewObjects: this.addCurve(\n newData[kind][i].position, colorMapping.RED, coordinates, scene,\n ),\n }));\n break;\n default:\n this.data[kind].push(newData[kind][i]);\n break;\n }\n }\n }\n return [parkingSpaceCalcInfo];\n }", "function map() {\n\n}", "function mappingData(data) {\n let survData = data[0], geneValues = data[1];\n //var groupTte = data[2];\n const tempdata = survData.patient.map(row => ({\n //'SampleID': survival.patient.data.codes[row],\n 'patient': row,\n 'tte': survData.tte[survData.patient.indexOf(row)],\n 'ev': survData.ev[survData.patient.indexOf(row)],\n //'Group': findingGroup(groupTte, survData.tte[survData.patient.indexOf(row)])\n }));\n //filter null ev and tte value\n const filteredData = tempdata.filter(value => value.ev != null);\n const makeData = filteredData.map(row => ({\n 'Time to event': row.tte,\n 'Event': row.ev,\n 'Column value': geneValues[0][filteredData.indexOf(row)]\n }));\n const tsvData = objectToTsv(makeData);\n tsvdownload(tsvData);\n}", "function dataMaps(){\n\td3.queue()\n\t.defer(d3.json, \"QoLI.json\")\n\t.awaitAll(makeMap)\n}", "function joinData(b, data){\n //loop through csv to assign each set of csv attribute values to geojson region\n for (var i=0; i<data.length; i++){\n var csvRegion = data[i]; //the current region\n var csvKey = data[i].Country; //the CSV primary key\n //console.log(data[i].Country)\n //loop through geojson regions to find correct region\n for (var a=0; a<b.features.length; a++){ \n var geojsonProps = b.features[a].properties; //gj props\n var geojsonKey = geojsonProps.ADMIN; //the geojson primary key\n //where primary keys match, transfer csv data to geojson properties object\n if (geojsonKey == csvKey){\n //assign all attributes and values\n attrArray.forEach(function(attr){\n var val = parseFloat(csvRegion[attr]); //get csv attribute value\n geojsonProps[attr] = val; //assign attribute and value to geojson properties\n });\n };\n\n };\n };\n return b;\n }", "function Map2(data) {\n this.map = new Map;\n this.size = 0;\n if (data) {\n for (var i = 0; i < data.length; i++) {\n var d = data[i];\n this.set(d[0], d[1], d[2]);\n }\n }\n}", "function compute(data) {\n return data.map(d => {\n return {\n input: encode(d.input),\n output: d.output\n }\n });\n}", "function buildMapReduce(query, callback) {\n\n\tvar mapfunccode = \"\";\n\tvar reducecondcode = \"\";\n\tvar reduceinitcode = \"\";\n\tvar reduceaggcode = \"\";\n\tvar finalizecode = \"\";\n\n\t//get all string need to convert to db\n\tvar zipfield = [];\n\tvar i = 0;\n\twhile (i < query.length) {\n\t\tif (i % 2 == 0) {\n\t\t\tzipfield.push(query[i].field);\n\t\t}\n\t\ti++;\n\t}\n\tzipfield = zipfield.concat(['_isUser', '_segments', '_id', '_mtid', '_typeid']);\n\n\ti = 0;\n\tconverter.toIDs(zipfield, function (ids) {\n\t\twhile (i < query.length) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\t//ignore user type\n\t\t\t\tif (query[i].type == 'user') {\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar tmpcode = buildChunk(i / 2, query[i], ids._typeid, ids[query[i].field]);\n\t\t\t\tmapfunccode += tmpcode.mapcode;\n\t\t\t\treduceinitcode += tmpcode.reduceinitcode;\n\t\t\t\treducecondcode += tmpcode.reducecondcode;\n\t\t\t\treduceaggcode += tmpcode.reduceaggcode;\n\t\t\t\tfinalizecode += tmpcode.finalizecode;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar joinop = query[i];\n\t\t\t\tif (joinop === 'and') joinop = '&&';\n\t\t\t\telse if (joinop === 'or') joinop = '||';\n\t\t\t\telse throw \"wrong join operator: \" + joinop;\n\t\t\t\treducecondcode += joinop;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tvar mapinitcode = 'function(){var value={};var userid=-1;if(this[\"' + ids._isUser + '\"]==true){userid=this[\"' + ids._mtid + '\"];value._hasUser=true;}else{userid=this[\"' + ids._mtid + '\"];';\n\t\tmapfunccode = mapinitcode + mapfunccode + \"}emit(userid,value);}\";\n\t\tvar reducefunccode = \"function(key,values){var returnObject={};\" + reduceinitcode + \"var hasUser=false;for(var i in values){var value=values[i];if(value._hasUser!==undefined)returnObject._hasUser=value._hasUser;\" + reduceaggcode + \"};return returnObject;}\";\n\t\tfinalizecode = 'function(key, value){return' + finalizecode + '&&value._hasUser?1:0}';\n\t\tif (callback !== undefined)\n\t\t\tcallback({map: mapfunccode, reduce: reducefunccode, finalize: finalizecode});\n\t});\n}", "function step1(sources) {\n\tconst map = Object.create(null);\n\tfunction next(source, parts, map) {\n\t\tlet part = parts.shift();\n\t\tif (!parts.length) {\n\t\t\tmap[part] = source;\n\t\t} else {\n\t\t\tmap[part] = map[part] || Object.create(null);\n\t\t\tnext(source, parts, map[part]);\n\t\t}\n\t}\n\tsources.forEach(src => next(src, src.split('/'), map));\n\treturn map;\n}", "_mapAttributes(data) {\n return this._arrObjMapper(data, node => {\n node.id = node.intent;\n return node;\n });\n }", "function map (data, predicates) {\n assert.object(data);\n\n if (isFunction(predicates)) {\n return mapSimple(data, predicates);\n }\n\n assert.object(predicates);\n\n return mapComplex(data, predicates);\n }", "mapping(value) {\n this.formData = Object.assign({}, this.formData, dataApplier(value))\n this.doSortSection()\n }", "function render_map(given_object) {\n\n //console.log(map_dt);\n given_data_second_part_3rd = given_object[\"second_part_3rd\"];\n given_data_second_part_1st = given_object[\"second_part_1st\"];\n given_data_second_part_2nd = given_object[\"second_part_2nd\"];\n given_data_third_part_1st = given_object[\"third_part_1st\"];\n given_data_third_part_2nd = given_object[\"third_part_2nd\"];\n given_data_fifth_part_1st = given_object[\"fifth_part_1st\"];\n given_data_fifth_part_2nd = given_object[\"fifth_part_2nd\"];\n given_data_fifth_part_3rd = given_object[\"fifth_part_3rd\"];\n given_data_fifth_part_4th = given_object[\"fifth_part_4th\"];\n given_data_fifth_part_5th = given_object[\"fifth_part_5th\"];\n given_data_fifth_part_6th = given_object[\"fifth_part_6th\"];\n given_data_fifth_part_7th = given_object[\"fifth_part_7th\"];\n given_data_fifth_part_8th = given_object[\"fifth_part_8th\"];\n given_data_fifth_part_9th = given_object[\"fifth_part_9th\"];\n given_data_fifth_part_10th = given_object[\"fifth_part_10th\"];\n given_data_fifth_part_11th = given_object[\"fifth_part_11th\"];\n given_data_fifth_part_12th = given_object[\"fifth_part_12th\"];\n given_data_fifth_part_13th = given_object[\"fifth_part_13th\"];\n given_data_fifth_part_14th = given_object[\"fifth_part_14th\"];\n given_data_fifth_part_15th = given_object[\"fifth_part_15th\"];\n given_data_sixth_part_1st = given_object[\"sixth_part_1st\"];\n given_data_sixth_part_2nd = given_object[\"sixth_part_2nd\"];\n given_data_sixth_part_3rd = given_object[\"sixth_part_3rd\"];\n given_data_sixth_part_4th_1 = given_object[\"sixth_part_4th_1\"];\n given_data_sixth_part_4th_2 = given_object[\"sixth_part_4th_2\"];\n given_data_sixth_part_4th_3 = given_object[\"sixth_part_4th_3\"];\n given_data_sixth_part_4th_4 = given_object[\"sixth_part_4th_4\"];\n given_data_sixth_part_5th_1 = given_object[\"sixth_part_5th_1\"];\n given_data_sixth_part_5th_2 = given_object[\"sixth_part_5th_2\"];\n given_data_sixth_part_5th_3 = given_object[\"sixth_part_5th_3\"];\n given_data_sixth_part_5th_4 = given_object[\"sixth_part_5th_4\"];\n given_data_sixth_part_6th_1 = given_object[\"sixth_part_6th_1\"];\n given_data_sixth_part_6th_2 = given_object[\"sixth_part_6th_2\"];\n given_data_sixth_part_6th_3 = given_object[\"sixth_part_6th_3\"];\n given_data_sixth_part_6th_4 = given_object[\"sixth_part_6th_4\"];\n given_data_sixth_part_7th_1 = given_object[\"sixth_part_7th_1\"];\n given_data_sixth_part_7th_2 = given_object[\"sixth_part_7th_2\"];\n given_data_sixth_part_7th_3 = given_object[\"sixth_part_7th_3\"];\n given_data_sixth_part_7th_4 = given_object[\"sixth_part_7th_4\"];\n given_data_third_part_1st_1 = given_object[\"3rd_part_1st_1\"];\n given_data_third_part_1st_2 = given_object[\"3rd_part_1st_2\"];\n given_data_third_part_1st_3 = given_object[\"3rd_part_1st_3\"];\n given_data_third_part_1st_4 = given_object[\"3rd_part_1st_4\"];\n given_data_third_part_2nd_1 = given_object[\"3rd_part_2nd_1\"];\n given_data_third_part_2nd_2 = given_object[\"3rd_part_2nd_2\"];\n given_data_third_part_2nd_3 = given_object[\"3rd_part_2nd_3\"];\n given_data_third_part_2nd_4 = given_object[\"3rd_part_2nd_4\"];\n given_data_third_part_3rd_1 = given_object[\"3rd_part_3rd_1\"];\n given_data_third_part_3rd_2 = given_object[\"3rd_part_3rd_2\"];\n given_data_third_part_3rd_3 = given_object[\"3rd_part_3rd_3\"];\n given_data_third_part_3rd_4 = given_object[\"3rd_part_3rd_4\"];\n given_data_third_part_4th_1 = given_object[\"3rd_part_4th_1\"];\n given_data_third_part_4th_2 = given_object[\"3rd_part_4th_2\"];\n given_data_third_part_4th_3 = given_object[\"3rd_part_4th_3\"];\n given_data_third_part_4th_4 = given_object[\"3rd_part_4th_4\"];\n given_data_first_part_1st_1 = given_object[\"1st_part_1st_1\"];\n given_data_first_part_1st_2 = given_object[\"1st_part_1st_2\"];\n given_data_first_part_2nd_1 = given_object[\"1st_part_2nd_1\"];\n given_data_first_part_2nd_2 = given_object[\"1st_part_2nd_2\"];\n given_data_first_part_3rd_1 = given_object[\"1st_part_3rd_1\"];\n given_data_first_part_3rd_2 = given_object[\"1st_part_3rd_2\"];\n given_data_first_part_4th_1 = given_object[\"1st_part_4th_1\"];\n given_data_first_part_4th_2 = given_object[\"1st_part_4th_2\"];\n given_data_first_part_5th_1 = given_object[\"1st_part_5th_1\"];\n given_data_first_part_5th_2 = given_object[\"1st_part_5th_2\"];\n given_data_first_part_6th_1 = given_object[\"1st_part_6th_1\"];\n given_data_first_part_6th_2 = given_object[\"1st_part_6th_2\"];\n given_data_first_part_7th_1 = given_object[\"1st_part_7th_1\"];\n given_data_first_part_7th_2 = given_object[\"1st_part_7th_2\"];\n given_data_first_part_8th_1 = given_object[\"1st_part_8th_1\"];\n given_data_first_part_8th_2 = given_object[\"1st_part_8th_2\"];\n given_data_first_part_9th_1 = given_object[\"1st_part_9th_1\"];\n given_data_first_part_9th_2 = given_object[\"1st_part_9th_2\"];\n given_data_first_part_10th_1 = given_object[\"1st_part_10th_1\"];\n given_data_first_part_10th_2 = given_object[\"1st_part_10th_2\"];\n given_data_first_part_11th_1 = given_object[\"1st_part_11th_1\"];\n given_data_first_part_11th_2 = given_object[\"1st_part_11th_2\"];\n given_data_first_part_12th_1 = given_object[\"1st_part_12th_1\"];\n given_data_first_part_12th_2 = given_object[\"1st_part_12th_2\"];\n given_data_first_part_13th_1 = given_object[\"1st_part_13th_1\"];\n given_data_first_part_13th_2 = given_object[\"1st_part_13th_2\"];\n given_data_first_part_14th_1 = given_object[\"1st_part_14th_1\"];\n given_data_first_part_14th_2 = given_object[\"1st_part_14th_2\"];\n given_data_first_part_15th_1 = given_object[\"1st_part_15th_1\"];\n given_data_first_part_15th_2 = given_object[\"1st_part_15th_2\"];\n given_data_first_part_16th_1 = given_object[\"1st_part_16th_1\"];\n given_data_first_part_16th_2 = given_object[\"1st_part_16th_2\"];\n given_data_first_part_17th_1 = given_object[\"1st_part_17th_1\"];\n given_data_first_part_17th_2 = given_object[\"1st_part_17th_2\"];\n given_data_first_part_18th_1 = given_object[\"1st_part_18th_1\"];\n given_data_first_part_18th_2 = given_object[\"1st_part_18th_2\"];\n given_data_first_part_19th_1 = given_object[\"1st_part_19th_1\"];\n given_data_first_part_19th_2 = given_object[\"1st_part_19th_2\"];\n given_data_first_part_20th_1 = given_object[\"1st_part_20th_1\"];\n given_data_first_part_20th_2 = given_object[\"1st_part_20th_2\"];\n given_data_first_part_21th_1 = given_object[\"1st_part_21th_1\"];\n given_data_first_part_21th_2 = given_object[\"1st_part_21th_2\"];\n given_data_first_part_22th_1 = given_object[\"1st_part_22th_1\"];\n given_data_first_part_22th_2 = given_object[\"1st_part_22th_2\"];\n given_data_first_part_23th_1 = given_object[\"1st_part_23th_1\"];\n given_data_first_part_23th_2 = given_object[\"1st_part_23th_2\"];\n given_data_first_part_24th_1 = given_object[\"1st_part_24th_1\"];\n given_data_first_part_24th_2 = given_object[\"1st_part_24th_2\"];\n given_data_first_part_25th_1 = given_object[\"1st_part_25th_1\"];\n given_data_first_part_25th_2 = given_object[\"1st_part_25th_2\"];\n given_data_first_part_26th_1 = given_object[\"1st_part_26th_1\"];\n given_data_first_part_26th_2 = given_object[\"1st_part_26th_2\"];\n given_data_first_part_27th_1 = given_object[\"1st_part_27th_1\"];\n given_data_first_part_27th_2 = given_object[\"1st_part_27th_2\"];\n given_data_first_part_28th_1 = given_object[\"1st_part_28th_1\"];\n given_data_first_part_28th_2 = given_object[\"1st_part_28th_2\"];\n given_data_first_part_29th_1 = given_object[\"1st_part_29th_1\"];\n given_data_first_part_29th_2 = given_object[\"1st_part_29th_2\"];\n given_data_first_part_30th_1 = given_object[\"1st_part_30th_1\"];\n given_data_first_part_30th_2 = given_object[\"1st_part_30th_2\"];\n given_data_first_part_31th_1 = given_object[\"1st_part_31th_1\"];\n given_data_first_part_31th_2 = given_object[\"1st_part_31th_2\"];\n given_data_first_part_32th_1 = given_object[\"1st_part_32th_1\"];\n given_data_first_part_32th_2 = given_object[\"1st_part_32th_2\"];\n given_data_first_part_33th_1 = given_object[\"1st_part_33th_1\"];\n given_data_first_part_33th_2 = given_object[\"1st_part_33th_2\"];\n given_data_seventh_part_1st_1 = given_object[\"7th_part_1st_1\"];\n given_data_seventh_part_1st_2 = given_object[\"7th_part_1st_2\"];\n given_data_seventh_part_2nd_1 = given_object[\"7th_part_2nd_1\"];\n given_data_seventh_part_2nd_2 = given_object[\"7th_part_2nd_2\"];\n given_data_seventh_part_3rd_1 = given_object[\"7th_part_3rd_1\"];\n given_data_seventh_part_3rd_2 = given_object[\"7th_part_3rd_2\"];\n given_data_seventh_part_4th_1 = given_object[\"7th_part_4th_1\"];\n given_data_seventh_part_4th_2 = given_object[\"7th_part_4th_2\"];\n given_data_seventh_part_5th_1 = given_object[\"7th_part_5th_1\"];\n given_data_seventh_part_5th_2 = given_object[\"7th_part_5th_2\"];\n given_data_seventh_part_6th_1 = given_object[\"7th_part_6th_1\"];\n given_data_seventh_part_6th_2 = given_object[\"7th_part_6th_2\"];\n given_data_seventh_part_7th_1 = given_object[\"7th_part_7th_1\"];\n given_data_seventh_part_7th_2 = given_object[\"7th_part_7th_2\"];\n given_data_seventh_part_8th_1 = given_object[\"7th_part_8th_1\"];\n given_data_seventh_part_8th_2 = given_object[\"7th_part_8th_2\"];\n given_data_seventh_part_9th_1 = given_object[\"7th_part_9th_1\"];\n given_data_seventh_part_9th_2 = given_object[\"7th_part_9th_2\"];\n given_data_seventh_part_10th_1 = given_object[\"7th_part_10th_1\"];\n given_data_seventh_part_10th_2 = given_object[\"7th_part_10th_2\"];\n given_data_seventh_part_11th_1 = given_object[\"7th_part_11th_1\"];\n given_data_seventh_part_11th_2 = given_object[\"7th_part_11th_2\"];\n given_data_seventh_part_12th_1 = given_object[\"7th_part_12th_1\"];\n given_data_seventh_part_12th_2 = given_object[\"7th_part_12th_2\"];\n given_data_seventh_part_13th_1 = given_object[\"7th_part_13th_1\"];\n given_data_seventh_part_13th_2 = given_object[\"7th_part_13th_2\"];\n given_data_seventh_part_14th_1 = given_object[\"7th_part_14th_1\"];\n given_data_seventh_part_14th_2 = given_object[\"7th_part_14th_2\"];\n given_data_seventh_part_15th_1 = given_object[\"7th_part_15th_1\"];\n given_data_seventh_part_15th_2 = given_object[\"7th_part_15th_2\"];\n given_data_seventh_part_16th_1 = given_object[\"7th_part_16th_1\"];\n given_data_seventh_part_16th_2 = given_object[\"7th_part_16th_2\"];\n given_data_seventh_part_17th_1 = given_object[\"7th_part_17th_1\"];\n given_data_seventh_part_17th_2 = given_object[\"7th_part_17th_2\"];\n given_data_seventh_part_18th_1 = given_object[\"7th_part_18th_1\"];\n given_data_seventh_part_18th_2 = given_object[\"7th_part_18th_2\"];\n given_data_seventh_part_19th_1 = given_object[\"7th_part_19th_1\"];\n given_data_seventh_part_19th_2 = given_object[\"7th_part_19th_2\"];\n given_data_seventh_part_20th_1 = given_object[\"7th_part_20th_1\"];\n given_data_seventh_part_20th_2 = given_object[\"7th_part_20th_2\"];\n given_data_seventh_part_21th_1 = given_object[\"7th_part_21th_1\"];\n given_data_seventh_part_21th_2 = given_object[\"7th_part_21th_2\"];\n given_data_seventh_part_22th_1 = given_object[\"7th_part_22th_1\"];\n given_data_seventh_part_22th_2 = given_object[\"7th_part_22th_2\"];\n given_data_seventh_part_23th_1 = given_object[\"7th_part_23th_1\"];\n given_data_seventh_part_23th_2 = given_object[\"7th_part_23th_2\"];\n given_data_seventh_part_24th_1 = given_object[\"7th_part_24th_1\"];\n given_data_seventh_part_24th_2 = given_object[\"7th_part_24th_2\"];\n given_data_seventh_part_25th_1 = given_object[\"7th_part_25th_1\"];\n given_data_seventh_part_25th_2 = given_object[\"7th_part_25th_2\"];\n given_data_seventh_part_26th_1 = given_object[\"7th_part_26th_1\"];\n given_data_seventh_part_26th_2 = given_object[\"7th_part_26th_2\"];\n given_data_seventh_part_27th_1 = given_object[\"7th_part_27th_1\"];\n given_data_seventh_part_27th_2 = given_object[\"7th_part_27th_2\"];\n given_data_seventh_part_28th_1 = given_object[\"7th_part_28th_1\"];\n given_data_seventh_part_28th_2 = given_object[\"7th_part_28th_2\"];\n given_data_seventh_part_29th_1 = given_object[\"7th_part_29th_1\"];\n given_data_seventh_part_29th_2 = given_object[\"7th_part_29th_2\"];\n // required part 6th block\n given_loc_data_sixth_part = given_object[\"required_part_location_6th_block\"];\n given_loc_data_fourth_part = given_object[\"required_part_location_4th_block\"];\n given_loc_data_first_part = given_object[\"required_part_location_1th_block\"];\n given_loc_data_seventh_part = given_object[\"required_part_location_7th_block\"];\n\n\n\n\n\n\n\n\n\n\n //given_data_sixth_part_6th_1\n\n //given_data_sixth_part_5th_1\n\n\n\n\n var map = L.map('map', {\n crs: L.CRS.Simple,\n minZoom: -0.60,\n maxZoom: -0.60,\n zoomControl: false\n\n\n //salert(minZoom);\n });\n\n L.tileLayer('', { attribution: '' }).addTo(map);\n myFeatureGroup = L.featureGroup().addTo(map).on(\"click\", groupClick);\n var bounds = [[-200, 0], [3300, 2500]];\n //var image = L.imageOverlay(\"{{ url_for('static', filename='white_background.jpeg')}}\", bounds).addTo(map);\n var image = L.imageOverlay(\"{{ url_for('static', filename='map3.jpg')}}\", bounds).addTo(map);\n //var image = L.VideoOverlay(\"{{ url_for('static', filename='r1.svg')}}\", bounds).addTo(map);\n //console.log(myFeatureGroup);\n\n map.fitBounds(bounds);\n var yx = L.latLng;\n var xy = function (x, y) {\n if (L.Util.isArray(x)) {\n return yx(x[1], x[0]);\n }\n return yx(y, x); // When doing xy(x, y);\n };\n\n var markers_2nd_part_3rd = given_data_second_part_3rd;\n\n // filling all markers using for loop\n for (var i = 0; i < markers_2nd_part_3rd.length; i++) {\n\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = ' <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_3rd[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const urlu = URL.createObjectURL(blob);\n var greenIcon = new LeafIcon({ iconUrl: urlu });\n // test = \"Id \" + i;\n test = markers_2nd_part_3rd[i][\"SV ID\"];\n // console.log( markers_2nd_part_3rd[i][\"SV ID\"]);\n //marker_arr = markers[i]\n //var new_marker = xy(marker_arr[0], marker_arr[1]);\n x_val = markers_2nd_part_3rd[i][\"marker_position\"];\n // console.log(\"x_val\");\n //console.log(x_val);\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n //---------------------------------------------- fill 1st part of 2nd block-----------------------------\n var markers_2nd_part_1st = given_data_second_part_1st;\n for (var i = 0; i < markers_2nd_part_1st.length; i++) {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n\n }\n });\n var svg = ' <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 36\" width=\"50\" height=\"36\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">'+markers_2nd_part_3rd[i][\"Location\"]+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n //var greenIcon = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n var greenIcon = new LeafIcon({ iconUrl: svg_url });\n\n test = markers_2nd_part_1st[i][\"SV ID\"];\n x_val = markers_2nd_part_1st[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n\n\n //---------------------------------------------- fill 2nd part of 2nd block---------------------------\n\n //required_part_location_2_of_2=[\"M/MT/FL058A2\",\"M/MT/FL059A2\",\"M/MT/FL060A2\",\"M/MT/FL060A3\",\"M/MT/FL061A2\",\"M/MT/FL062A2\",\"M/MT/FL063A2\",\"M/MT/FL063A3\",\"M/MT/FL064A2\",\"M/MT/FL065A2\",\"M/MT/FL066A2\",\"M/MT/FL066A3\",\"M/MT/FL067A2\",\"M/MT/FL068A2\",\"M/MT/FL069A2\",\"M/MT/FL069A3\",\"M/MT/FL070A2\",\"M/MT/FL071A2\",\"M/MT/FL072A2\",\"M/MT/FL072A3\",\"M/MT/FL073A2\",\"M/MT/FL074A2\"]\n\n var markers_2nd_part_2nd = given_data_second_part_2nd;\n for (var k = 0; k < markers_2nd_part_2nd.length; k++) {\n var greenIcon;\n if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL060A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 10);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL060A3\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 42);\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n //var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL063A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 57);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL063A3\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 90);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL058A2\" || markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL059A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n }\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL064A2\" || markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL065A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 97);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL070A2\" || markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL071A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 202);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL073A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 250);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n }\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL067A2\" || markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL068A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 151);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL075A2\" || markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL076A2\" || markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL077A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 296);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n }\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL079A2\" || markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL080A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 345);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n }\n\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL066A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 108);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL066A3\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 138);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL069A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 160);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL069A3\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 193);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL072A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 212);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL072A3\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 242);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL074A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 255);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL074A3\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 286);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL078A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 306);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL078A3\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 335);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL081A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 356);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_2nd_part_2nd[k]['Location'] == \"M/MT/FL081A3\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 385);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_2nd_part_2nd[k][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_2nd_part_2nd[k][\"SV ID\"];\n\n x_val = markers_2nd_part_2nd[k][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 47);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n\n // ------------------------------filling 1st part of third block--------------------------\n // required_part_location_1_of_3=[\"M/MT/FL051A1\",\"M/MT/FL050A1\",\"M/MT/FL049A2\",\"M/MT/FL049A1\",\"M/MT/FL048A1\",\"M/MT/FL047A1\",\"M/MT/FL046A2\",\"M/MT/FL046A1\",\"M/MT/FL045A1\",\"M/MT/FL044A1\"]\n\n var markers_3rd_part_1st = given_data_third_part_1st;\n\n for (var i = 0; i < markers_3rd_part_1st.length; i++) {\n var greenIcon;\n //console.log(\"all location\")\n //console.log(markers_2nd_part_2nd[k]['Location']);\n if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL051A1\" || markers_3rd_part_1st[i]['Location'] == \"M/MT/FL050A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_3rd_part_1st[i][\"SV ID\"];\n\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n }\n\n else if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL049A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_1st[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 10);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL049A1\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_1st[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 35);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL048A1\" || markers_3rd_part_1st[i]['Location'] == \"M/MT/FL047A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log()\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_3rd_part_1st[i][\"SV ID\"];\n\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 45);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n }\n\n\n else if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL046A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_1st[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 52);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL046A1\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_1st[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 81);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL045A1\" || markers_3rd_part_1st[i]['Location'] == \"M/MT/FL044A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log()\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_3rd_part_1st[i][\"SV ID\"];\n\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 92);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n }\n\n else if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL044A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log()\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_3rd_part_1st[i][\"SV ID\"];\n\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var new_marker = xy(x_val[0] + 100, x_val[1] - 200);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n }\n\n else if (markers_3rd_part_1st[i]['Location'] == \"M/MT/FL044A3\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg_1\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_3rd_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log()\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_3rd_part_1st[i][\"SV ID\"];\n\n x_val = markers_3rd_part_1st[i][\"marker_position\"];\n var new_marker = xy(x_val[0] + 200, x_val[1] - 200);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n }\n\n\n\n\n }\n\n //----------------------------filling 2nd part for 3rd block----------------------------\n var markers_3rd_part_2nd = given_data_third_part_2nd;\n required_part_location_2_of_3 = [\"M/MT/FL044A2\", \"M/MT/FL044A3\", \"M/MT/FL044A4\", \"M/MT/FL044A5\"]\n\n for (var i = 0; i < markers_3rd_part_2nd.length; i++) {\n var greenIcon;\n //console.log(\"all location\")\n //console.log(markers_2nd_part_2nd[k]['Location']);\n if (markers_3rd_part_2nd[i]['Location'] == \"M/MT/FL044A2\" || markers_3rd_part_2nd[i]['Location'] == \"M/MT/FL044A3\" || markers_3rd_part_2nd[i]['Location'] == \"M/MT/FL044A4\" || markers_3rd_part_2nd[i]['Location'] == \"M/MT/FL044A5\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_3rd_part_2nd[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log(markers_3rd_part_2nd[i][\"Location\"]);\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_3rd_part_2nd[i][\"SV ID\"];\n\n x_val = markers_3rd_part_2nd[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n\n }\n\n }\n //given_data_fifth_part_1st\n\n\n\n //---------------------------------------filling 5th block---------------------------------------------\n //----------------------------filling 1st part for 5th block----------------------------\n // required_part_location_1_of_5=[\"M/MT/FL043A1\",\"M/MT/FL043A2\",\"M/MT/FL043A3\",\"M/MT/FL043A4\"]\n\n var markers_5th_part_1st = given_data_fifth_part_1st;\n //console.log(\"length here\");\n //console.log(markers_5th_part_1st);\n\n for (var i = 0; i < markers_5th_part_1st.length; i++) {\n var greenIcon;\n //console.log(\"all location\")\n //console.log(markers_2nd_part_2nd[k]['Location']);\n if (markers_5th_part_1st[i]['Location'] == \"M/MT/FL043A1\" || markers_5th_part_1st[i]['Location'] == \"M/MT/FL043A2\" || markers_5th_part_1st[i]['Location'] == \"M/MT/FL043A3\" || markers_5th_part_1st[i]['Location'] == \"M/MT/FL043A4\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_1st[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log(markers_3rd_part_2nd[i][\"Location\"]);\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_1st[i][\"SV ID\"];\n\n x_val = markers_5th_part_1st[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n\n }\n\n }\n\n\n\n //----------------------------filling 2nd part for 5th block----------------------------\n // required_part_location_1_of_5=[\"M/MT/FL043A1\",\"M/MT/FL043A2\",\"M/MT/FL043A3\",\"M/MT/FL043A4\"]\n\n var markers_5th_part_2nd = given_data_fifth_part_2nd;\n\n for (var i = 0; i < markers_5th_part_2nd.length; i++) {\n var greenIcon;\n //console.log(\"all location\")\n //console.log(markers_2nd_part_2nd[k]['Location']);\n if (markers_5th_part_2nd[i]['Location'] == \"M/MT/FL042A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_2nd[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log(markers_3rd_part_2nd[i][\"Location\"]);\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_2nd[i][\"SV ID\"];\n\n x_val = markers_5th_part_2nd[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n\n }\n\n }\n\n\n //----------------------------filling 3rd part for 5th block----------------------------\n var markers_5th_part_3rd = given_data_fifth_part_3rd;\n\n for (var i = 0; i < markers_5th_part_3rd.length; i++) {\n var greenIcon;\n //console.log(\"all location\")\n //console.log(markers_2nd_part_2nd[k]['Location']);\n if (markers_5th_part_3rd[i]['Location'] == \"M/MT/FL041A1\" || markers_5th_part_3rd[i]['Location'] == \"M/MT/FL041A2\" || markers_5th_part_3rd[i]['Location'] == \"M/MT/FL041A3\" || markers_5th_part_3rd[i]['Location'] == \"M/MT/FL041A4\" || markers_5th_part_3rd[i]['Location'] == \"M/MT/FL041A5\" || markers_5th_part_3rd[i]['Location'] == \"M/MT/FL041A6\" || markers_5th_part_3rd[i]['Location'] == \"M/MT/FL041A7\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_3rd[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log(markers_3rd_part_2nd[i][\"Location\"]);\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_3rd[i][\"SV ID\"];\n\n x_val = markers_5th_part_3rd[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n\n }\n\n }\n\n\n //----------------------------filling 4th part for 5th block----------------------------\n var markers_5th_part_4th = given_data_fifth_part_4th;\n\n for (var i = 0; i < markers_5th_part_4th.length; i++) {\n // console.log(\"hiiii\");\n //console.log(markers_5th_part_4th);\n\n var greenIcon;\n //console.log(\"all location\")\n //console.log(markers_2nd_part_2nd[k]['Location']);\n if (markers_5th_part_4th[i]['Location'] == \"M/MT/FL040A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_4th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log(markers_3rd_part_2nd[i][\"Location\"]);\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_4th[i][\"SV ID\"];\n x_val = markers_5th_part_4th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n }\n\n }\n\n\n\n //----------------------------filling 5th part for 5th block----------------------------\n var markers_5th_part_5th = given_data_fifth_part_5th;\n //console.log(markers_5th_part_5th);\n\n for (var i = 0; i < markers_5th_part_5th.length; i++) {\n //console.log(\"hiiii soma\");\n\n var greenIcon;\n //console.log(\"all location\")\n //console.log(markers_2nd_part_2nd[k]['Location']);\n if (markers_5th_part_5th[i]['Location'] == \"M/MT/FL039A1\" || markers_5th_part_5th[i]['Location'] == \"M/MT/FL039A2\" || markers_5th_part_5th[i]['Location'] == \"M/MT/FL039A3\" || markers_5th_part_5th[i]['Location'] == \"M/MT/FL039A4\" || markers_5th_part_5th[i]['Location'] == \"M/MT/FL039A5\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_5th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log(markers_3rd_part_2nd[i][\"Location\"]);\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_5th[i][\"SV ID\"];\n x_val = markers_5th_part_5th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n\n }\n\n }\n //----------------------------filling 6th part for 5th block----------------------------\n var markers_5th_part_6th = given_data_fifth_part_6th;\n //required_part_location_6_of_5=[\"M/MT/FL038A1\",\"M/MT/FL037A1\",\"M/MT/FL036A1\",\"M/MT/FL035A1\",\"M/MT/FL034A1\",\"M/MT/FL033A1\",\"M/MT/FL032A1\",\"M/MT/FL031A1\",\"M/MT/FL030A1\",\"M/MT/FL029A1\",\"M/MT/FL028A1\"]\n\n for (var i = 0; i < markers_5th_part_6th.length; i++) {\n\n\n var greenIcon;\n //console.log(\"all location\")\n //console.log(markers_2nd_part_2nd[k]['Location']);\n if (markers_5th_part_6th[i]['Location'] == \"M/MT/FL038A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL037A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL036A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL035A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL034A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL033A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL032A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL031A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL030A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL029A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL028A1\" || markers_5th_part_6th[i]['Location'] == \"M/MT/FL027A1\") {\n\n\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_6th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n\n\n\n //console.log(markers_3rd_part_2nd[i][\"Location\"]);\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_6th[i][\"SV ID\"];\n x_val = markers_5th_part_6th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n // console.log(test);\n\n\n\n\n }\n }\n\n //----------------------fill 7th part of 6th block---------------------------------\n var markers_5th_part_7th = given_data_fifth_part_7th;\n // required_part_location_7_of_5=[\"M/MT/FL026A1\",\"M/MT/FL025A1\",\"M/MT/FL024A1\",\"M/MT/FL023A1\",\"M/MT/FL022A1\",\"M/MT/FL021A1\",\"M/MT/FL020A1\",\"M/MT/FL019A1\",\"M/MT/FL018A1\",\"M/MT/FL017A1\",\"M/MT/FL016A1\",\"M/MT/FL015A1\",\"M/MT/FL014A1\"]\n\n for (var i = 0; i < markers_5th_part_7th.length; i++) {\n var greenIcon;\n if (markers_5th_part_7th[i]['Location'] == \"M/MT/FL026A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL025A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL024A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL023A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL022A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL021A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL020A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL019A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL018A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL017A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL016A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL015A1\" || markers_5th_part_7th[i]['Location'] == \"M/MT/FL014A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_7th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_7th[i][\"SV ID\"];\n x_val = markers_5th_part_7th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------fill 7th part of 6th block---------------------------------\n var markers_5th_part_8th = given_data_fifth_part_8th;\n // console.log(\"given 5th part list\" );\n // console.log(markers_5th_part_8th);\n\n\n for (var i = 0; i < markers_5th_part_8th.length; i++) {\n var greenIcon;\n if (markers_5th_part_8th[i]['Location'] == \"M/MT/FL013A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL012A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL011A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL010A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL009A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL008A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL007A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL006A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL005A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL003A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL002A1\" || markers_5th_part_8th[i]['Location'] == \"M/MT/FL001A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_8th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_8th[i][\"SV ID\"];\n\n\n\n x_val = markers_5th_part_8th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n }\n\n if (markers_5th_part_8th[i]['Location'] == \"M/MT/FL004A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_8th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n test = markers_5th_part_8th[i][\"SV ID\"];\n x_val = markers_5th_part_8th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 6);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------fill 9th part of 6th block---------------------------------\n var markers_5th_part_9th = given_data_fifth_part_9th;\n\n for (var i = 0; i < markers_5th_part_9th.length; i++) {\n var greenIcon;\n if (markers_5th_part_9th[i]['Location'] == \"M/MT/FL029A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_9th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_9th[i][\"SV ID\"];\n x_val = markers_5th_part_9th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n //----------------------fill 10th part of 6th block---------------------------------\n var markers_5th_part_10th = given_data_fifth_part_10th;\n\n for (var i = 0; i < markers_5th_part_10th.length; i++) {\n var greenIcon;\n if (markers_5th_part_10th[i]['Location'] == \"M/MT/FL026A2\" || markers_5th_part_10th[i]['Location'] == \"M/MT/FL026A3\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_10th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_10th[i][\"SV ID\"];\n x_val = markers_5th_part_10th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n //----------------------fill 11th part of 6th block---------------------------------\n var markers_5th_part_11th = given_data_fifth_part_11th;\n\n for (var i = 0; i < markers_5th_part_11th.length; i++) {\n var greenIcon;\n if (markers_5th_part_11th[i]['Location'] == \"M/MT/FL021A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_11th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_11th[i][\"SV ID\"];\n x_val = markers_5th_part_11th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n var markers_5th_part_12th = given_data_fifth_part_12th;\n\n for (var i = 0; i < markers_5th_part_12th.length; i++) {\n var greenIcon;\n if (markers_5th_part_12th[i]['Location'] == \"M/MT/FL013A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_12th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_12th[i][\"SV ID\"];\n x_val = markers_5th_part_12th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n var markers_5th_part_13th = given_data_fifth_part_13th;\n\n for (var i = 0; i < markers_5th_part_13th.length; i++) {\n var greenIcon;\n if (markers_5th_part_13th[i]['Location'] == \"M/MT/FL011A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_13th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_13th[i][\"SV ID\"];\n x_val = markers_5th_part_13th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n var markers_5th_part_14th = given_data_fifth_part_14th;\n\n for (var i = 0; i < markers_5th_part_14th.length; i++) {\n var greenIcon;\n if (markers_5th_part_14th[i]['Location'] == \"M/MT/FL006A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_14th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_14th[i][\"SV ID\"];\n x_val = markers_5th_part_14th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n var markers_5th_part_15th = given_data_fifth_part_15th;\n\n for (var i = 0; i < markers_5th_part_15th.length; i++) {\n var greenIcon;\n if (markers_5th_part_15th[i]['Location'] == \"M/MT/FL005A2\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_5th_part_15th[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_5th_part_15th[i][\"SV ID\"];\n x_val = markers_5th_part_15th[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n\n }\n\n\n\n // code for fill 6th block\n\n var markers_6th_part_1st = given_data_sixth_part_1st;\n for (var i = 0; i < markers_6th_part_1st.length; i++) {\n var greenIcon;\n if (markers_6th_part_1st[i]['Location'] == \"M/MT/FL083A3\" || markers_6th_part_1st[i]['Location'] == \"M/MT/FL083A2\" || markers_6th_part_1st[i]['Location'] == \"M/MT/FL083A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_6th_part_1st[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_6th_part_1st[i][\"SV ID\"];\n x_val = markers_6th_part_1st[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n\n }\n\n\n //---------------------------------------------------------\n var markers_6th_part_2nd = given_data_sixth_part_2nd;\n for (var i = 0; i < markers_6th_part_2nd.length; i++) {\n var greenIcon;\n if (markers_6th_part_2nd[i]['Location'] == \"M/MT/FL084A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL085A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL086A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL087A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL088A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL089A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL090A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL091A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL092A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL093A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL093A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL094A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL095A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL096A1\" || markers_6th_part_2nd[i]['Location'] == \"M/MT/FL097A1\") {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_6th_part_2nd[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_6th_part_2nd[i][\"SV ID\"];\n x_val = markers_6th_part_2nd[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n\n }\n //-------------------------------------------------------------------\n\n //given_data_sixth_part_4th_1\n var markers_6th_part_3rd = given_data_sixth_part_3rd;\n for (var i = 0; i < markers_6th_part_3rd.length; i++) {\n var greenIcon;\n if (markers_6th_part_3rd[i]['Location'] == \"M/MT/FL084A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_6th_part_3rd[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_6th_part_3rd[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_3rd[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 10);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_6th_part_3rd[i]['Location'] == \"M/MT/FL084A3\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_6th_part_3rd[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_6th_part_3rd[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_3rd[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 40);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n else if (markers_6th_part_3rd[i]['Location'] == \"M/MT/FL085A2\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_6th_part_3rd[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_6th_part_3rd[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_3rd[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 60);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n else if (markers_6th_part_3rd[i]['Location'] == \"M/MT/FL085A3\") {\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 15],\n\n }\n });\n x_val = markers_6th_part_3rd[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 15\" width=\"50\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">' + markers_6th_part_3rd[i][\"Location\"] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_3rd[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1] - 90);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n else {\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"svg' + String(i) + '\" fill=\"#0853bf\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">' + markers_6th_part_3rd[i]['Location'] + '</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url });\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = markers_6th_part_3rd[i][\"SV ID\"];\n x_val = markers_6th_part_3rd[i][\"marker_position\"];\n var new_marker = xy(x_val[0], x_val[1] - 97);\n var given_marker = L.marker(new_marker, { icon: greenIcon2 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n\n\n\n\n\n }\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_4th_1 = given_data_sixth_part_4th_1;\n for (var i = 0; i < markers_6th_part_4th_1.length; i++) {\n var greenIcon;\n if (markers_6th_part_4th_1[i]['Location'] == \"M/MT/MD101A1\" || markers_6th_part_4th_1[i]['Location'] == \"M/MT/MD101A2\" || markers_6th_part_4th_1[i]['Location'] == \"M/MT/MD101A3\" || markers_6th_part_4th_1[i]['Location'] == \"M/MT/MD101A4\") {\n var loc = markers_6th_part_4th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_4th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_4th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n\n //-------------------------------filling 6th block 4_2----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_4th_2 = given_data_sixth_part_4th_2;\n for (var i = 0; i < markers_6th_part_4th_2.length; i++) {\n var greenIcon;\n if (markers_6th_part_4th_2[i]['Location'] == \"M/MT/MD101B1\" || markers_6th_part_4th_2[i]['Location'] == \"M/MT/MD101B2\" || markers_6th_part_4th_2[i]['Location'] == \"M/MT/MD101B3\" || markers_6th_part_4th_2[i]['Location'] == \"M/MT/MD101B4\") {\n var loc = markers_6th_part_4th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_4th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_4th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n\n //-------------------------------filling 6th block 4_3----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_4th_3 = given_data_sixth_part_4th_3;\n for (var i = 0; i < markers_6th_part_4th_3.length; i++) {\n var greenIcon;\n if (markers_6th_part_4th_3[i]['Location'] == \"M/MT/MD101C1\" || markers_6th_part_4th_3[i]['Location'] == \"M/MT/MD101C2\" || markers_6th_part_4th_3[i]['Location'] == \"M/MT/MD101C3\" || markers_6th_part_4th_3[i]['Location'] == \"M/MT/MD101C4\") {\n var loc = markers_6th_part_4th_3[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_4th_3[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_4th_3[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n\n\n //--------------------------------end 6th block-------------------------------------\n\n\n\n //-------------------------------filling 6th block 4_4----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_4th_4 = given_data_sixth_part_4th_4;\n for (var i = 0; i < markers_6th_part_4th_4.length; i++) {\n var greenIcon;\n if (markers_6th_part_4th_4[i]['Location'] == \"M/MT/MD101D1\" || markers_6th_part_4th_4[i]['Location'] == \"M/MT/MD101D2\" || markers_6th_part_4th_4[i]['Location'] == \"M/MT/MD101D3\" || markers_6th_part_4th_4[i]['Location'] == \"M/MT/MD101D4\") {\n var loc = markers_6th_part_4th_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_4th_4[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_4th_4[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n\n\n //--------------------------------end 6th block-------------------------------------\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_5th_1 = given_data_sixth_part_5th_1;\n for (var i = 0; i < markers_6th_part_5th_1.length; i++) {\n var greenIcon;\n if (markers_6th_part_5th_1[i]['Location'] == \"M/MT/MD102A1\" || markers_6th_part_5th_1[i]['Location'] == \"M/MT/MD102A2\" || markers_6th_part_5th_1[i]['Location'] == \"M/MT/MD102A3\" || markers_6th_part_5th_1[i]['Location'] == \"M/MT/MD102A4\") {\n var loc = markers_6th_part_5th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_5th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_5th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_5th_2 = given_data_sixth_part_5th_2;\n for (var i = 0; i < markers_6th_part_5th_2.length; i++) {\n var greenIcon;\n if (markers_6th_part_5th_2[i]['Location'] == \"M/MT/MD102B1\" || markers_6th_part_5th_2[i]['Location'] == \"M/MT/MD102B2\" || markers_6th_part_5th_2[i]['Location'] == \"M/MT/MD102B3\" || markers_6th_part_5th_2[i]['Location'] == \"M/MT/MD102B4\") {\n var loc = markers_6th_part_5th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_5th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_5th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_5th_3 = given_data_sixth_part_5th_3;\n for (var i = 0; i < markers_6th_part_5th_3.length; i++) {\n var greenIcon;\n if (markers_6th_part_5th_3[i]['Location'] == \"M/MT/MD102C1\" || markers_6th_part_5th_3[i]['Location'] == \"M/MT/MD102C2\" || markers_6th_part_5th_3[i]['Location'] == \"M/MT/MD102C3\" || markers_6th_part_5th_3[i]['Location'] == \"M/MT/MD102C4\") {\n var loc = markers_6th_part_5th_3[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_5th_3[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_5th_3[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_5th_4 = given_data_sixth_part_5th_4;\n for (var i = 0; i < markers_6th_part_5th_4.length; i++) {\n var greenIcon;\n if (markers_6th_part_5th_4[i]['Location'] == \"M/MT/MD102D1\" || markers_6th_part_5th_4[i]['Location'] == \"M/MT/MD102D2\" || markers_6th_part_5th_4[i]['Location'] == \"M/MT/MD102D3\" || markers_6th_part_5th_4[i]['Location'] == \"M/MT/MD102D4\") {\n var loc = markers_6th_part_5th_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_5th_4[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_5th_4[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_6th_1 = given_data_sixth_part_6th_1;\n for (var i = 0; i < markers_6th_part_6th_1.length; i++) {\n var greenIcon;\n if (markers_6th_part_6th_1[i]['Location'] == \"M/MT/MD103A1\" || markers_6th_part_6th_1[i]['Location'] == \"M/MT/MD103A2\" || markers_6th_part_6th_1[i]['Location'] == \"M/MT/MD103A3\" || markers_6th_part_6th_1[i]['Location'] == \"M/MT/MD103A4\") {\n var loc = markers_6th_part_6th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_6th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_6th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_6th_2 = given_data_sixth_part_6th_2;\n for (var i = 0; i < markers_6th_part_6th_2.length; i++) {\n var greenIcon;\n if (markers_6th_part_6th_2[i]['Location'] == \"M/MT/MD103B1\" || markers_6th_part_6th_2[i]['Location'] == \"M/MT/MD103B2\" || markers_6th_part_6th_2[i]['Location'] == \"M/MT/MD103B3\" || markers_6th_part_6th_2[i]['Location'] == \"M/MT/MD103B4\") {\n var loc = markers_6th_part_6th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_6th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_6th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_6th_3 = given_data_sixth_part_6th_3;\n for (var i = 0; i < markers_6th_part_6th_3.length; i++) {\n var greenIcon;\n if (markers_6th_part_6th_3[i]['Location'] == \"M/MT/MD103C1\" || markers_6th_part_6th_3[i]['Location'] == \"M/MT/MD103C2\" || markers_6th_part_6th_3[i]['Location'] == \"M/MT/MD103C3\" || markers_6th_part_6th_3[i]['Location'] == \"M/MT/MD103C4\") {\n var loc = markers_6th_part_6th_3[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_6th_3[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_6th_3[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_6th_4 = given_data_sixth_part_6th_4;\n for (var i = 0; i < markers_6th_part_6th_4.length; i++) {\n var greenIcon;\n if (markers_6th_part_6th_4[i]['Location'] == \"M/MT/MD103D1\" || markers_6th_part_6th_4[i]['Location'] == \"M/MT/MD103D2\" || markers_6th_part_6th_4[i]['Location'] == \"M/MT/MD103D3\" || markers_6th_part_6th_4[i]['Location'] == \"M/MT/MD103D4\") {\n var loc = markers_6th_part_6th_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_6th_4[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_6th_4[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_7th_1 = given_data_sixth_part_7th_1;\n for (var i = 0; i < markers_6th_part_7th_1.length; i++) {\n var greenIcon;\n if (markers_6th_part_7th_1[i]['Location'] == \"M/MT/MD104A1\" || markers_6th_part_7th_1[i]['Location'] == \"M/MT/MD104A2\" || markers_6th_part_7th_1[i]['Location'] == \"M/MT/MD104A3\" || markers_6th_part_7th_1[i]['Location'] == \"M/MT/MD104A4\") {\n var loc = markers_6th_part_7th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_7th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_7th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_7th_2 = given_data_sixth_part_7th_2;\n for (var i = 0; i < markers_6th_part_7th_2.length; i++) {\n var greenIcon;\n if (markers_6th_part_7th_2[i]['Location'] == \"M/MT/MD104B1\" || markers_6th_part_7th_2[i]['Location'] == \"M/MT/MD104B2\" || markers_6th_part_7th_2[i]['Location'] == \"M/MT/MD104B3\" || markers_6th_part_7th_2[i]['Location'] == \"M/MT/MD104B4\") {\n var loc = markers_6th_part_7th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_7th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_7th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_7th_3 = given_data_sixth_part_7th_3;\n for (var i = 0; i < markers_6th_part_7th_3.length; i++) {\n var greenIcon;\n if (markers_6th_part_7th_3[i]['Location'] == \"M/MT/MD104C1\" || markers_6th_part_7th_3[i]['Location'] == \"M/MT/MD104C2\" || markers_6th_part_7th_3[i]['Location'] == \"M/MT/MD104C3\" || markers_6th_part_7th_3[i]['Location'] == \"M/MT/MD104C4\") {\n var loc = markers_6th_part_7th_3[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_7th_3[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_7th_3[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n\n\n }\n\n //--------------------------------end 6th block--------------------------------------\n\n\n //-------------------------------filling 6th block 4_1----------------------------------\n //given_data_sixth_part_4th_1\n //required_part_location_4_of_6_4=[\"M/MT/MD101D1\",\"M/MT/MD101D2\",\"M/MT/MD101D3\",\"M/MT/MD101D4\"]\n\n var markers_6th_part_7th_4 = given_data_sixth_part_7th_4;\n for (var i = 0; i < markers_6th_part_6th_4.length; i++) {\n var greenIcon;\n if (markers_6th_part_7th_4[i]['Location'] == \"M/MT/MD104D1\" || markers_6th_part_7th_4[i]['Location'] == \"M/MT/MD104D2\" || markers_6th_part_7th_4[i]['Location'] == \"M/MT/MD104D3\" || markers_6th_part_7th_4[i]['Location'] == \"M/MT/MD104D4\") {\n var loc = markers_6th_part_7th_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_6th_part_7th_4[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_6th_part_7th_4[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n }\n\n // ----------------------required partloc name render here of 6th block\n var markers_6th_loc_data = given_loc_data_sixth_part;\n for (var i = 0; i < markers_6th_loc_data.length; i++) {\n var greenIcon;\n if (markers_6th_loc_data[i]['part_location'] == \"M/MT/MD101\" || markers_6th_loc_data[i]['part_location'] == \"M/MT/MD102\" || markers_6th_loc_data[i]['part_location'] == \"M/MT/MD103\" || markers_6th_loc_data[i]['part_location'] == \"M/MT/MD104\") {\n //var loc = markers_6th_part_7th_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [200, 20],\n\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" height=\"20\" width=\"200\" viewBox=\"0 0 200 20\"><text x=\"3\" y=\"10\" fill=\"black\" font-size=\"8\" font-weight=\"700\">' + markers_6th_loc_data[i]['part_location'] + '</text></svg>';\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">'+loc+'</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = \"location\"\n var new_marker = xy(markers_6th_loc_data[i]['x_val'], markers_6th_loc_data[i]['y_val']);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n }\n\n\n //------------------part loc 4th block here ---------------------\n // ----------------------required partloc name render here of 6th block\n var markers_4th_loc_data = given_loc_data_fourth_part;\n for (var i = 0; i < markers_4th_loc_data.length; i++) {\n var greenIcon;\n if (markers_4th_loc_data[i]['part_location'] == \"M/MT/MD105\" || markers_4th_loc_data[i]['part_location'] == \"M/MT/MD106\" || markers_4th_loc_data[i]['part_location'] == \"M/MT/MD107\" || markers_4th_loc_data[i]['part_location'] == \"M/MT/MD108\") {\n //var loc = markers_6th_part_7th_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [200, 20],\n\n }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" height=\"20\" width=\"200\" viewBox=\"0 0 200 20\"><text x=\"3\" y=\"10\" fill=\"black\" font-size=\"8\" font-weight=\"700\">' + markers_4th_loc_data[i]['part_location'] + '</text></svg>';\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">'+loc+'</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = \"location\"\n var new_marker = xy(markers_4th_loc_data[i]['x_val'], markers_4th_loc_data[i]['y_val']);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n }\n\n // ----------------------required partloc name render here of 6th block\n var markers_1st_loc_data = given_loc_data_first_part;\n for (var i = 0; i < markers_1st_loc_data.length; i++) {\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [200, 10] }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" height=\"10\" width=\"200\" viewBox=\"0 0 200 10\"><text x=\"3\" y=\"10\" fill=\"black\" font-size=\"6\" font-weight=\"600\">' + markers_1st_loc_data[i]['part_location'] + '</text></svg>';\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">'+loc+'</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = \"location\"\n var new_marker = xy(markers_1st_loc_data[i]['x_val'], markers_1st_loc_data[i]['y_val']);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n // ---------------------------------------------required partloc name render here of 6th block------------------\n var markers_7th_loc_data = given_loc_data_seventh_part;\n for (var i = 0; i < markers_7th_loc_data.length; i++) {\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [200, 10] }\n });\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" height=\"10\" width=\"200\" viewBox=\"0 0 200 10\"><text x=\"3\" y=\"10\" fill=\"black\" font-size=\"6\" font-weight=\"600\">' + markers_7th_loc_data[i]['part_location'] + '</text></svg>';\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">'+loc+'</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = \"location\"\n var new_marker = xy(markers_7th_loc_data[i]['x_val'], markers_7th_loc_data[i]['y_val']);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n // ---------------------------------partloc render end here of 6th block\n //--------------------------------end 6th block--------------------------------------\n\n //-----------------------------------------filling 3rd block m/mt/md105-----------------------------------------\n var markers_3rd_part_1st_1 = given_data_third_part_1st_1;\n\n for (var i = 0; i < markers_3rd_part_1st_1.length; i++) {\n if (markers_3rd_part_1st_1[i]['Location'] == \"M/MT/MD105D1\" || markers_3rd_part_1st_1[i]['Location'] == \"M/MT/MD105D2\" || markers_3rd_part_1st_1[i]['Location'] == \"M/MT/MD105D3\" || markers_3rd_part_1st_1[i]['Location'] == \"M/MT/MD105D4\") {\n var loc = markers_3rd_part_1st_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_1st_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_1st_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_3rd_part_1st_2 = given_data_third_part_1st_2;\n\n for (var i = 0; i < markers_3rd_part_1st_2.length; i++) {\n if (markers_3rd_part_1st_2[i]['Location'] == \"M/MT/MD105C1\" || markers_3rd_part_1st_2[i]['Location'] == \"M/MT/MD105C2\" || markers_3rd_part_1st_2[i]['Location'] == \"M/MT/MD105C3\" || markers_3rd_part_1st_2[i]['Location'] == \"M/MT/MD105C4\") {\n var loc = markers_3rd_part_1st_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_1st_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_1st_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n\n\n var markers_3rd_part_1st_3 = given_data_third_part_1st_3;\n for (var i = 0; i < markers_3rd_part_1st_3.length; i++) {\n var greenIcon;\n if (markers_3rd_part_1st_3[i]['Location'] == \"M/MT/MD105B1\" || markers_3rd_part_1st_3[i]['Location'] == \"M/MT/MD105B2\" || markers_3rd_part_1st_3[i]['Location'] == \"M/MT/MD105B3\" || markers_3rd_part_1st_3[i]['Location'] == \"M/MT/MD105B4\") {\n var loc = markers_3rd_part_1st_3[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_1st_3[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_1st_3[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n var markers_3rd_part_1st_4 = given_data_third_part_1st_4;\n for (var i = 0; i < markers_3rd_part_1st_4.length; i++) {\n var greenIcon;\n if (markers_3rd_part_1st_4[i]['Location'] == \"M/MT/MD105A1\" || markers_3rd_part_1st_4[i]['Location'] == \"M/MT/MD105A2\" || markers_3rd_part_1st_4[i]['Location'] == \"M/MT/MD105A3\" || markers_3rd_part_1st_4[i]['Location'] == \"M/MT/MD105A4\") {\n var loc = markers_3rd_part_1st_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_1st_4[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_1st_4[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n }\n //-----------------------------------------end m/mt/md105--------------------------------------------------------------\n\n\n //-----------------------------------------filling 3rd block m/mt/md106-----------------------------------------\n var markers_3rd_part_2nd_1 = given_data_third_part_2nd_1;\n\n for (var i = 0; i < markers_3rd_part_2nd_1.length; i++) {\n if (markers_3rd_part_2nd_1[i]['Location'] == \"M/MT/MD106D1\" || markers_3rd_part_2nd_1[i]['Location'] == \"M/MT/MD106D2\" || markers_3rd_part_2nd_1[i]['Location'] == \"M/MT/MD106D3\" || markers_3rd_part_2nd_1[i]['Location'] == \"M/MT/MD106D4\") {\n var loc = markers_3rd_part_2nd_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_2nd_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_2nd_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_3rd_part_2nd_2 = given_data_third_part_2nd_2;\n\n for (var i = 0; i < markers_3rd_part_2nd_2.length; i++) {\n if (markers_3rd_part_2nd_2[i]['Location'] == \"M/MT/MD106C1\" || markers_3rd_part_2nd_2[i]['Location'] == \"M/MT/MD106C2\" || markers_3rd_part_2nd_2[i]['Location'] == \"M/MT/MD106C3\" || markers_3rd_part_2nd_2[i]['Location'] == \"M/MT/MD106C4\") {\n var loc = markers_3rd_part_2nd_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_2nd_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_2nd_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n\n\n var markers_3rd_part_2nd_3 = given_data_third_part_2nd_3;\n for (var i = 0; i < markers_3rd_part_2nd_3.length; i++) {\n var greenIcon;\n if (markers_3rd_part_2nd_3[i]['Location'] == \"M/MT/MD106B1\" || markers_3rd_part_2nd_3[i]['Location'] == \"M/MT/MD106B2\" || markers_3rd_part_2nd_3[i]['Location'] == \"M/MT/MD106B3\" || markers_3rd_part_2nd_3[i]['Location'] == \"M/MT/MD106B4\") {\n var loc = markers_3rd_part_2nd_3[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_2nd_3[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_2nd_3[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n var markers_3rd_part_2nd_4 = given_data_third_part_2nd_4;\n for (var i = 0; i < markers_3rd_part_2nd_4.length; i++) {\n var greenIcon;\n if (markers_3rd_part_2nd_4[i]['Location'] == \"M/MT/MD106A1\" || markers_3rd_part_2nd_4[i]['Location'] == \"M/MT/MD106A2\" || markers_3rd_part_2nd_4[i]['Location'] == \"M/MT/MD106A3\" || markers_3rd_part_2nd_4[i]['Location'] == \"M/MT/MD106A4\") {\n var loc = markers_3rd_part_2nd_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_2nd_4[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_2nd_4[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n }\n\n\n\n //-----------------------------------------end m/mt/md106--------------------------------------------------------------\n\n\n //-----------------------------------------filling 3rd block m/mt/md107-----------------------------------------\n var markers_3rd_part_3rd_1 = given_data_third_part_3rd_1;\n\n for (var i = 0; i < markers_3rd_part_3rd_1.length; i++) {\n if (markers_3rd_part_3rd_1[i]['Location'] == \"M/MT/MD107D1\" || markers_3rd_part_3rd_1[i]['Location'] == \"M/MT/MD107D2\" || markers_3rd_part_3rd_1[i]['Location'] == \"M/MT/MD107D3\" || markers_3rd_part_3rd_1[i]['Location'] == \"M/MT/MD107D4\") {\n var loc = markers_3rd_part_3rd_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_3rd_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_3rd_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_3rd_part_3rd_2 = given_data_third_part_3rd_2;\n\n for (var i = 0; i < markers_3rd_part_3rd_2.length; i++) {\n if (markers_3rd_part_3rd_2[i]['Location'] == \"M/MT/MD107C1\" || markers_3rd_part_3rd_2[i]['Location'] == \"M/MT/MD107C2\" || markers_3rd_part_3rd_2[i]['Location'] == \"M/MT/MD107C3\" || markers_3rd_part_3rd_2[i]['Location'] == \"M/MT/MD107C4\") {\n var loc = markers_3rd_part_3rd_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_3rd_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_3rd_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n\n\n var markers_3rd_part_3rd_3 = given_data_third_part_3rd_3;\n for (var i = 0; i < markers_3rd_part_3rd_3.length; i++) {\n if (markers_3rd_part_3rd_3[i]['Location'] == \"M/MT/MD107B1\" || markers_3rd_part_3rd_3[i]['Location'] == \"M/MT/MD107B2\" || markers_3rd_part_3rd_3[i]['Location'] == \"M/MT/MD107B3\" || markers_3rd_part_3rd_3[i]['Location'] == \"M/MT/MD107B4\") {\n var loc = markers_3rd_part_3rd_3[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_3rd_3[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_3rd_3[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n var markers_3rd_part_3rd_4 = given_data_third_part_3rd_4;\n for (var i = 0; i < markers_3rd_part_3rd_4.length; i++) {\n if (markers_3rd_part_3rd_4[i]['Location'] == \"M/MT/MD107A1\" || markers_3rd_part_3rd_4[i]['Location'] == \"M/MT/MD107A2\" || markers_3rd_part_3rd_4[i]['Location'] == \"M/MT/MD107A3\" || markers_3rd_part_3rd_4[i]['Location'] == \"M/MT/MD107A4\") {\n var loc = markers_3rd_part_3rd_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_3rd_4[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_3rd_4[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n }\n\n\n\n //-----------------------------------------end m/mt/md107--------------------------------------------------------------\n\n\n //-----------------------------------------filling 3rd block m/mt/md108-----------------------------------------\n var markers_3rd_part_4th_1 = given_data_third_part_4th_1;\n\n\n for (var i = 0; i < markers_3rd_part_4th_1.length; i++) {\n if (markers_3rd_part_4th_1[i]['Location'] == \"M/MT/MD108D1\" || markers_3rd_part_4th_1[i]['Location'] == \"M/MT/MD108D2\" || markers_3rd_part_4th_1[i]['Location'] == \"M/MT/MD108D3\" || markers_3rd_part_4th_1[i]['Location'] == \"M/MT/MD108D4\") {\n var loc = markers_3rd_part_4th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_4th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_4th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_3rd_part_4th_2 = given_data_third_part_4th_2;\n\n for (var i = 0; i < markers_3rd_part_4th_2.length; i++) {\n if (markers_3rd_part_4th_2[i]['Location'] == \"M/MT/MD108C1\" || markers_3rd_part_4th_2[i]['Location'] == \"M/MT/MD108C2\" || markers_3rd_part_4th_2[i]['Location'] == \"M/MT/MD108C3\" || markers_3rd_part_4th_2[i]['Location'] == \"M/MT/MD108C4\") {\n var loc = markers_3rd_part_4th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_4th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_4th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n\n\n var markers_3rd_part_4th_3 = given_data_third_part_4th_3;\n for (var i = 0; i < markers_3rd_part_4th_3.length; i++) {\n if (markers_3rd_part_4th_3[i]['Location'] == \"M/MT/MD108B1\" || markers_3rd_part_4th_3[i]['Location'] == \"M/MT/MD108B2\" || markers_3rd_part_4th_3[i]['Location'] == \"M/MT/MD108B3\" || markers_3rd_part_4th_3[i]['Location'] == \"M/MT/MD108B4\") {\n var loc = markers_3rd_part_4th_3[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_4th_3[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_4th_3[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n }\n\n var markers_3rd_part_4th_4 = given_data_third_part_4th_4;\n for (var i = 0; i < markers_3rd_part_4th_4.length; i++) {\n if (markers_3rd_part_4th_4[i]['Location'] == \"M/MT/MD108A1\" || markers_3rd_part_4th_4[i]['Location'] == \"M/MT/MD108A2\" || markers_3rd_part_4th_4[i]['Location'] == \"M/MT/MD108A3\" || markers_3rd_part_4th_4[i]['Location'] == \"M/MT/MD108A4\") {\n var loc = markers_3rd_part_4th_4[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 13],\n\n }\n });\n x_val = markers_3rd_part_4th_4[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"13\" style=\"fill:#0853bf\" viewBox=\"0 0 13 13\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"10\" fill=\"white\" font-size=\"7\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_3rd_part_4th_4[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n\n\n\n\n }\n\n\n\n //-----------------------------------------end m/mt/md107--------------------------------------------------------------\n\n\n //given_data_first_part_1st_1\n //-------------------------------------------filling 1st block--------------------------------------------------\n var markers_1st_part_1st_1 = given_data_first_part_1st_1;\n\n\n for (var i = 0; i < markers_1st_part_1st_1.length; i++) {\n if (markers_1st_part_1st_1[i]['Location'] == \"M/MT/FR064D2\" || markers_1st_part_1st_1[i]['Location'] == \"M/MT/FR064C2\" || markers_1st_part_1st_1[i]['Location'] == \"M/MT/FR064B2\" || markers_1st_part_1st_1[i]['Location'] == \"M/MT/FR064A2\") {\n var loc = markers_1st_part_1st_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_1st_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_1st_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_1st_2 = given_data_first_part_1st_2;\n\n\n for (var i = 0; i < markers_1st_part_1st_2.length; i++) {\n if (markers_1st_part_1st_2[i]['Location'] == \"M/MT/FR064D1\" || markers_1st_part_1st_2[i]['Location'] == \"M/MT/FR064C1\" || markers_1st_part_1st_2[i]['Location'] == \"M/MT/FR064B1\" || markers_1st_part_1st_2[i]['Location'] == \"M/MT/FR064A1\") {\n var loc = markers_1st_part_1st_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n }\n });\n x_val = markers_1st_part_1st_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_1st_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //---------------------------------------------1st part 2nd block------------------------------------------\n var markers_1st_part_2nd_1 = given_data_first_part_2nd_1;\n for (var i = 0; i < markers_1st_part_2nd_1.length; i++) {\n if (markers_1st_part_2nd_1[i]['Location'] == \"M/MT/FR063D2\" || markers_1st_part_2nd_1[i]['Location'] == \"M/MT/FR063C2\" || markers_1st_part_2nd_1[i]['Location'] == \"M/MT/FR063B2\" || markers_1st_part_2nd_1[i]['Location'] == \"M/MT/FR063A2\") {\n var loc = markers_1st_part_2nd_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_2nd_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_2nd_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_2nd_2 = given_data_first_part_2nd_2;\n\n\n for (var i = 0; i < markers_1st_part_2nd_2.length; i++) {\n if (markers_1st_part_2nd_2[i]['Location'] == \"M/MT/FR063D1\" || markers_1st_part_2nd_2[i]['Location'] == \"M/MT/FR063C1\" || markers_1st_part_2nd_2[i]['Location'] == \"M/MT/FR063B1\" || markers_1st_part_2nd_2[i]['Location'] == \"M/MT/FR063A1\") {\n var loc = markers_1st_part_2nd_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_2nd_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_2nd_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n //----------------------------------3rd part of first block----------------------------------------------\n var markers_1st_part_3rd_1 = given_data_first_part_3rd_1;\n for (var i = 0; i < markers_1st_part_3rd_1.length; i++) {\n if (markers_1st_part_3rd_1[i]['Location'] == \"M/MT/FR062D2\" || markers_1st_part_3rd_1[i]['Location'] == \"M/MT/FR062C2\" || markers_1st_part_3rd_1[i]['Location'] == \"M/MT/FR062B2\" || markers_1st_part_3rd_1[i]['Location'] == \"M/MT/FR062A2\") {\n var loc = markers_1st_part_3rd_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_3rd_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_3rd_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_3rd_2 = given_data_first_part_3rd_2;\n\n\n for (var i = 0; i < markers_1st_part_3rd_2.length; i++) {\n if (markers_1st_part_3rd_2[i]['Location'] == \"M/MT/FR062D1\" || markers_1st_part_3rd_2[i]['Location'] == \"M/MT/FR062C1\" || markers_1st_part_3rd_2[i]['Location'] == \"M/MT/FR062B1\" || markers_1st_part_3rd_2[i]['Location'] == \"M/MT/FR062A1\") {\n var loc = markers_1st_part_3rd_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_3rd_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_3rd_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n //----------------------------------4th part of first block----------------------------------------------\n var markers_1st_part_4th_1 = given_data_first_part_4th_1;\n\n //console.log(\"check sonath\");\n //console.log(markers_1st_part_4th_1);\n for (var i = 0; i < markers_1st_part_4th_1.length; i++) {\n\n\n if (markers_1st_part_4th_1[i]['Location'] == \"M/MT/FR061D2\" || markers_1st_part_4th_1[i]['Location'] == \"M/MT/FR061C2\" || markers_1st_part_4th_1[i]['Location'] == \"M/MT/FR061B2\" || markers_1st_part_4th_1[i]['Location'] == \"M/MT/FR061A2\") {\n var loc = markers_1st_part_4th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_4th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_4th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n\n }\n }\n\n\n var markers_1st_part_4th_2 = given_data_first_part_4th_2;\n\n\n for (var i = 0; i < markers_1st_part_4th_2.length; i++) {\n if (markers_1st_part_4th_2[i]['Location'] == \"M/MT/FR061D1\" || markers_1st_part_4th_2[i]['Location'] == \"M/MT/FR061C1\" || markers_1st_part_4th_2[i]['Location'] == \"M/MT/FR061B1\" || markers_1st_part_4th_2[i]['Location'] == \"M/MT/FR061A1\") {\n var loc = markers_1st_part_4th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_4th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_4th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n\n //----------------------------------5th part of first block----------------------------------------------\n var markers_1st_part_5th_1 = given_data_first_part_5th_1;\n for (var i = 0; i < markers_1st_part_5th_1.length; i++) {\n if (markers_1st_part_5th_1[i]['Location'] == \"M/MT/FR060D2\" || markers_1st_part_5th_1[i]['Location'] == \"M/MT/FR060C2\" || markers_1st_part_5th_1[i]['Location'] == \"M/MT/FR060B2\" || markers_1st_part_5th_1[i]['Location'] == \"M/MT/FR060A2\") {\n var loc = markers_1st_part_5th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_5th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_5th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_5th_2 = given_data_first_part_5th_2;\n\n\n for (var i = 0; i < markers_1st_part_5th_2.length; i++) {\n if (markers_1st_part_5th_2[i]['Location'] == \"M/MT/FR060D1\" || markers_1st_part_5th_2[i]['Location'] == \"M/MT/FR060C1\" || markers_1st_part_5th_2[i]['Location'] == \"M/MT/FR060B1\" || markers_1st_part_5th_2[i]['Location'] == \"M/MT/FR060A1\") {\n var loc = markers_1st_part_5th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_5th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_5th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------6th part of first block----------------------------------------------\n var markers_1st_part_6th_1 = given_data_first_part_6th_1;\n for (var i = 0; i < markers_1st_part_6th_1.length; i++) {\n if (markers_1st_part_6th_1[i]['Location'] == \"M/MT/FR059D2\" || markers_1st_part_6th_1[i]['Location'] == \"M/MT/FR059C2\" || markers_1st_part_6th_1[i]['Location'] == \"M/MT/FR059B2\" || markers_1st_part_6th_1[i]['Location'] == \"M/MT/FR059A2\") {\n var loc = markers_1st_part_6th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_6th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_6th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_6th_2 = given_data_first_part_6th_2;\n\n\n for (var i = 0; i < markers_1st_part_6th_2.length; i++) {\n if (markers_1st_part_6th_2[i]['Location'] == \"M/MT/FR059D1\" || markers_1st_part_6th_2[i]['Location'] == \"M/MT/FR059C1\" || markers_1st_part_6th_2[i]['Location'] == \"M/MT/FR059B1\" || markers_1st_part_6th_2[i]['Location'] == \"M/MT/FR059A1\") {\n var loc = markers_1st_part_6th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_6th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_6th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------7th part of first block----------------------------------------------\n var markers_1st_part_7th_1 = given_data_first_part_7th_1;\n for (var i = 0; i < markers_1st_part_7th_1.length; i++) {\n if (markers_1st_part_7th_1[i]['Location'] == \"M/MT/FR058D2\" || markers_1st_part_7th_1[i]['Location'] == \"M/MT/FR058C2\" || markers_1st_part_7th_1[i]['Location'] == \"M/MT/FR058B2\" || markers_1st_part_7th_1[i]['Location'] == \"M/MT/FR058A2\") {\n var loc = markers_1st_part_7th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_7th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_7th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_7th_2 = given_data_first_part_7th_2;\n\n\n for (var i = 0; i < markers_1st_part_7th_2.length; i++) {\n if (markers_1st_part_7th_2[i]['Location'] == \"M/MT/FR058D1\" || markers_1st_part_7th_2[i]['Location'] == \"M/MT/FR058C1\" || markers_1st_part_7th_2[i]['Location'] == \"M/MT/FR058B1\" || markers_1st_part_7th_2[i]['Location'] == \"M/MT/FR058A1\") {\n var loc = markers_1st_part_7th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_7th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_7th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------8th part of first block----------------------------------------------\n var markers_1st_part_8th_1 = given_data_first_part_8th_1;\n for (var i = 0; i < markers_1st_part_8th_1.length; i++) {\n if (markers_1st_part_8th_1[i]['Location'] == \"M/MT/FR057D2\" || markers_1st_part_8th_1[i]['Location'] == \"M/MT/FR057C2\" || markers_1st_part_8th_1[i]['Location'] == \"M/MT/FR057B2\" || markers_1st_part_8th_1[i]['Location'] == \"M/MT/FR057A2\") {\n var loc = markers_1st_part_8th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_8th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_8th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_8th_2 = given_data_first_part_8th_2;\n for (var i = 0; i < markers_1st_part_8th_2.length; i++) {\n if (markers_1st_part_8th_2[i]['Location'] == \"M/MT/FR057D1\" || markers_1st_part_8th_2[i]['Location'] == \"M/MT/FR057C1\" || markers_1st_part_8th_2[i]['Location'] == \"M/MT/FR057B1\" || markers_1st_part_8th_2[i]['Location'] == \"M/MT/FR057A1\") {\n var loc = markers_1st_part_8th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_8th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_8th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------9th part of first block----------------------------------------------\n var markers_1st_part_9th_1 = given_data_first_part_9th_1;\n for (var i = 0; i < markers_1st_part_9th_1.length; i++) {\n if (markers_1st_part_9th_1[i]['Location'] == \"M/MT/FR056D2\" || markers_1st_part_9th_1[i]['Location'] == \"M/MT/FR056C2\" || markers_1st_part_9th_1[i]['Location'] == \"M/MT/FR056B2\" || markers_1st_part_9th_1[i]['Location'] == \"M/MT/FR056A2\") {\n var loc = markers_1st_part_9th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_9th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_9th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_9th_2 = given_data_first_part_9th_2;\n for (var i = 0; i < markers_1st_part_9th_2.length; i++) {\n if (markers_1st_part_9th_2[i]['Location'] == \"M/MT/FR056D1\" || markers_1st_part_9th_2[i]['Location'] == \"M/MT/FR056C1\" || markers_1st_part_9th_2[i]['Location'] == \"M/MT/FR056B1\" || markers_1st_part_9th_2[i]['Location'] == \"M/MT/FR056A1\") {\n var loc = markers_1st_part_9th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_9th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_9th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------10th part of first block----------------------------------------------\n var markers_1st_part_10th_1 = given_data_first_part_10th_1;\n for (var i = 0; i < markers_1st_part_10th_1.length; i++) {\n if (markers_1st_part_10th_1[i]['Location'] == \"M/MT/FR055D2\" || markers_1st_part_10th_1[i]['Location'] == \"M/MT/FR055C2\" || markers_1st_part_10th_1[i]['Location'] == \"M/MT/FR055B2\" || markers_1st_part_10th_1[i]['Location'] == \"M/MT/FR055A2\") {\n var loc = markers_1st_part_10th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_10th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_10th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_10th_2 = given_data_first_part_10th_2;\n for (var i = 0; i < markers_1st_part_10th_2.length; i++) {\n if (markers_1st_part_10th_2[i]['Location'] == \"M/MT/FR055D1\" || markers_1st_part_10th_2[i]['Location'] == \"M/MT/FR055C1\" || markers_1st_part_10th_2[i]['Location'] == \"M/MT/FR055B1\" || markers_1st_part_10th_2[i]['Location'] == \"M/MT/FR055A1\") {\n var loc = markers_1st_part_10th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_10th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_10th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------11th part of first block----------------------------------------------\n var markers_1st_part_11th_1 = given_data_first_part_11th_1;\n for (var i = 0; i < markers_1st_part_11th_1.length; i++) {\n if (markers_1st_part_11th_1[i]['Location'] == \"M/MT/FR054D2\" || markers_1st_part_11th_1[i]['Location'] == \"M/MT/FR054C2\" || markers_1st_part_11th_1[i]['Location'] == \"M/MT/FR054B2\" || markers_1st_part_11th_1[i]['Location'] == \"M/MT/FR054A2\") {\n var loc = markers_1st_part_11th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_11th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_11th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_11th_2 = given_data_first_part_11th_2;\n for (var i = 0; i < markers_1st_part_11th_2.length; i++) {\n if (markers_1st_part_11th_2[i]['Location'] == \"M/MT/FR054D1\" || markers_1st_part_11th_2[i]['Location'] == \"M/MT/FR054C1\" || markers_1st_part_11th_2[i]['Location'] == \"M/MT/FR054B1\" || markers_1st_part_11th_2[i]['Location'] == \"M/MT/FR054A1\") {\n var loc = markers_1st_part_11th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_11th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_11th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------12th part of first block----------------------------------------------\n var markers_1st_part_12th_1 = given_data_first_part_12th_1;\n for (var i = 0; i < markers_1st_part_12th_1.length; i++) {\n if (markers_1st_part_12th_1[i]['Location'] == \"M/MT/FR053D2\" || markers_1st_part_12th_1[i]['Location'] == \"M/MT/FR053C2\" || markers_1st_part_12th_1[i]['Location'] == \"M/MT/FR053B2\" || markers_1st_part_12th_1[i]['Location'] == \"M/MT/FR053A2\") {\n var loc = markers_1st_part_12th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_12th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_12th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_12th_2 = given_data_first_part_12th_2;\n for (var i = 0; i < markers_1st_part_12th_2.length; i++) {\n if (markers_1st_part_12th_2[i]['Location'] == \"M/MT/FR053D1\" || markers_1st_part_12th_2[i]['Location'] == \"M/MT/FR053C1\" || markers_1st_part_12th_2[i]['Location'] == \"M/MT/FR053B1\" || markers_1st_part_12th_2[i]['Location'] == \"M/MT/FR053A1\") {\n var loc = markers_1st_part_12th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_12th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_12th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n\n //----------------------------------13th part of first block----------------------------------------------\n var markers_1st_part_13th_1 = given_data_first_part_13th_1;\n for (var i = 0; i < markers_1st_part_13th_1.length; i++) {\n if (markers_1st_part_13th_1[i]['Location'] == \"M/MT/FR052D2\" || markers_1st_part_13th_1[i]['Location'] == \"M/MT/FR052C2\" || markers_1st_part_13th_1[i]['Location'] == \"M/MT/FR052B2\" || markers_1st_part_13th_1[i]['Location'] == \"M/MT/FR052A2\") {\n var loc = markers_1st_part_13th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_13th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_13th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_13th_2 = given_data_first_part_13th_2;\n for (var i = 0; i < markers_1st_part_13th_2.length; i++) {\n if (markers_1st_part_13th_2[i]['Location'] == \"M/MT/FR052D1\" || markers_1st_part_13th_2[i]['Location'] == \"M/MT/FR052C1\" || markers_1st_part_13th_2[i]['Location'] == \"M/MT/FR052B1\" || markers_1st_part_13th_2[i]['Location'] == \"M/MT/FR052A1\") {\n var loc = markers_1st_part_13th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_13th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_13th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------14th part of first block----------------------------------------------\n var markers_1st_part_14th_1 = given_data_first_part_14th_1;\n for (var i = 0; i < markers_1st_part_14th_1.length; i++) {\n if (markers_1st_part_14th_1[i]['Location'] == \"M/MT/FR051D2\" || markers_1st_part_14th_1[i]['Location'] == \"M/MT/FR051C2\" || markers_1st_part_14th_1[i]['Location'] == \"M/MT/FR051B2\" || markers_1st_part_14th_1[i]['Location'] == \"M/MT/FR051A2\") {\n var loc = markers_1st_part_14th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_14th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_14th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_14th_2 = given_data_first_part_14th_2;\n for (var i = 0; i < markers_1st_part_14th_2.length; i++) {\n if (markers_1st_part_14th_2[i]['Location'] == \"M/MT/FR051D1\" || markers_1st_part_14th_2[i]['Location'] == \"M/MT/FR051C1\" || markers_1st_part_14th_2[i]['Location'] == \"M/MT/FR051B1\" || markers_1st_part_14th_2[i]['Location'] == \"M/MT/FR051A1\") {\n var loc = markers_1st_part_14th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_14th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_14th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------15th part of first block----------------------------------------------\n var markers_1st_part_15th_1 = given_data_first_part_15th_1;\n\n for (var i = 0; i < markers_1st_part_15th_1.length; i++) {\n if (markers_1st_part_15th_1[i]['Location'] == \"M/MT/FR050D2\" || markers_1st_part_15th_1[i]['Location'] == \"M/MT/FR050C2\" || markers_1st_part_15th_1[i]['Location'] == \"M/MT/FR050B2\" || markers_1st_part_15th_1[i]['Location'] == \"M/MT/FR050A2\") {\n var loc = markers_1st_part_15th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_15th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_15th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_15th_2 = given_data_first_part_15th_2;\n for (var i = 0; i < markers_1st_part_15th_2.length; i++) {\n if (markers_1st_part_15th_2[i]['Location'] == \"M/MT/FR050D1\" || markers_1st_part_15th_2[i]['Location'] == \"M/MT/FR050C1\" || markers_1st_part_15th_2[i]['Location'] == \"M/MT/FR050B1\" || markers_1st_part_15th_2[i]['Location'] == \"M/MT/FR050A1\") {\n var loc = markers_1st_part_15th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_15th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_15th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------16th part of first block----------------------------------------------\n var markers_1st_part_16th_1 = given_data_first_part_16th_1;\n\n for (var i = 0; i < markers_1st_part_16th_1.length; i++) {\n if (markers_1st_part_16th_1[i]['Location'] == \"M/MT/FR049D2\" || markers_1st_part_16th_1[i]['Location'] == \"M/MT/FR049C2\" || markers_1st_part_16th_1[i]['Location'] == \"M/MT/FR049B2\" || markers_1st_part_16th_1[i]['Location'] == \"M/MT/FR049A2\") {\n var loc = markers_1st_part_16th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_16th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_16th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_16th_2 = given_data_first_part_16th_2;\n for (var i = 0; i < markers_1st_part_16th_2.length; i++) {\n if (markers_1st_part_16th_2[i]['Location'] == \"M/MT/FR049D1\" || markers_1st_part_16th_2[i]['Location'] == \"M/MT/FR049C1\" || markers_1st_part_16th_2[i]['Location'] == \"M/MT/FR049B1\" || markers_1st_part_16th_2[i]['Location'] == \"M/MT/FR049A1\") {\n var loc = markers_1st_part_16th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_16th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_16th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------17th part of first block----------------------------------------------\n var markers_1st_part_17th_1 = given_data_first_part_17th_1;\n\n for (var i = 0; i < markers_1st_part_17th_1.length; i++) {\n if (markers_1st_part_17th_1[i]['Location'] == \"M/MT/FR048D2\" || markers_1st_part_17th_1[i]['Location'] == \"M/MT/FR048C2\" || markers_1st_part_17th_1[i]['Location'] == \"M/MT/FR048B2\" || markers_1st_part_17th_1[i]['Location'] == \"M/MT/FR048A2\") {\n var loc = markers_1st_part_17th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_17th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_17th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_17th_2 = given_data_first_part_17th_2;\n for (var i = 0; i < markers_1st_part_17th_2.length; i++) {\n if (markers_1st_part_17th_2[i]['Location'] == \"M/MT/FR048D1\" || markers_1st_part_17th_2[i]['Location'] == \"M/MT/FR048C1\" || markers_1st_part_17th_2[i]['Location'] == \"M/MT/FR048B1\" || markers_1st_part_17th_2[i]['Location'] == \"M/MT/FR048A1\") {\n var loc = markers_1st_part_17th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_17th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_17th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------18th part of first block----------------------------------------------\n var markers_1st_part_18th_1 = given_data_first_part_18th_1;\n\n for (var i = 0; i < markers_1st_part_18th_1.length; i++) {\n if (markers_1st_part_18th_1[i]['Location'] == \"M/MT/FR047D2\" || markers_1st_part_18th_1[i]['Location'] == \"M/MT/FR047C2\" || markers_1st_part_18th_1[i]['Location'] == \"M/MT/FR047B2\" || markers_1st_part_18th_1[i]['Location'] == \"M/MT/FR047A2\") {\n var loc = markers_1st_part_18th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_18th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_18th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_18th_2 = given_data_first_part_18th_2;\n for (var i = 0; i < markers_1st_part_18th_2.length; i++) {\n if (markers_1st_part_18th_2[i]['Location'] == \"M/MT/FR047D1\" || markers_1st_part_18th_2[i]['Location'] == \"M/MT/FR047C1\" || markers_1st_part_18th_2[i]['Location'] == \"M/MT/FR047B1\" || markers_1st_part_18th_2[i]['Location'] == \"M/MT/FR047A1\") {\n var loc = markers_1st_part_18th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_18th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_18th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------19th part of first block----------------------------------------------\n var markers_1st_part_19th_1 = given_data_first_part_19th_1;\n\n for (var i = 0; i < markers_1st_part_19th_1.length; i++) {\n if (markers_1st_part_19th_1[i]['Location'] == \"M/MT/FR046D2\" || markers_1st_part_19th_1[i]['Location'] == \"M/MT/FR046C2\" || markers_1st_part_19th_1[i]['Location'] == \"M/MT/FR046B2\" || markers_1st_part_19th_1[i]['Location'] == \"M/MT/FR046A2\") {\n var loc = markers_1st_part_19th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_19th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_19th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_19th_2 = given_data_first_part_19th_2;\n for (var i = 0; i < markers_1st_part_19th_2.length; i++) {\n if (markers_1st_part_19th_2[i]['Location'] == \"M/MT/FR046D1\" || markers_1st_part_19th_2[i]['Location'] == \"M/MT/FR046C1\" || markers_1st_part_19th_2[i]['Location'] == \"M/MT/FR046B1\" || markers_1st_part_19th_2[i]['Location'] == \"M/MT/FR046A1\") {\n var loc = markers_1st_part_19th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_19th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_19th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------20th part of first block----------------------------------------------\n var markers_1st_part_20th_1 = given_data_first_part_20th_1;\n\n for (var i = 0; i < markers_1st_part_20th_1.length; i++) {\n if (markers_1st_part_20th_1[i]['Location'] == \"M/MT/FR045D2\" || markers_1st_part_20th_1[i]['Location'] == \"M/MT/FR045C2\" || markers_1st_part_20th_1[i]['Location'] == \"M/MT/FR045B2\" || markers_1st_part_20th_1[i]['Location'] == \"M/MT/FR045A2\") {\n var loc = markers_1st_part_20th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_20th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_20th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_20th_2 = given_data_first_part_20th_2;\n for (var i = 0; i < markers_1st_part_20th_2.length; i++) {\n\n if (markers_1st_part_20th_2[i]['Location'] == \"M/MT/FR045D1\" || markers_1st_part_20th_2[i]['Location'] == \"M/MT/FR045C1\" || markers_1st_part_20th_2[i]['Location'] == \"M/MT/FR045B1\" || markers_1st_part_20th_2[i]['Location'] == \"M/MT/FR045A1\") {\n var loc = markers_1st_part_20th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_20th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_20th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------21th part of first block----------------------------------------------\n var markers_1st_part_21th_1 = given_data_first_part_21th_1;\n\n for (var i = 0; i < markers_1st_part_21th_1.length; i++) {\n if (markers_1st_part_21th_1[i]['Location'] == \"M/MT/FR044D2\" || markers_1st_part_21th_1[i]['Location'] == \"M/MT/FR044C2\" || markers_1st_part_21th_1[i]['Location'] == \"M/MT/FR044B2\" || markers_1st_part_21th_1[i]['Location'] == \"M/MT/FR044A2\") {\n var loc = markers_1st_part_21th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_21th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_21th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_21th_2 = given_data_first_part_21th_2;\n for (var i = 0; i < markers_1st_part_21th_2.length; i++) {\n\n if (markers_1st_part_21th_2[i]['Location'] == \"M/MT/FR044D1\" || markers_1st_part_21th_2[i]['Location'] == \"M/MT/FR044C1\" || markers_1st_part_21th_2[i]['Location'] == \"M/MT/FR044B1\" || markers_1st_part_21th_2[i]['Location'] == \"M/MT/FR044A1\") {\n var loc = markers_1st_part_21th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_21th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_21th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------22th part of first block----------------------------------------------\n var markers_1st_part_22th_1 = given_data_first_part_22th_1;\n\n for (var i = 0; i < markers_1st_part_22th_1.length; i++) {\n if (markers_1st_part_22th_1[i]['Location'] == \"M/MT/FR043D2\" || markers_1st_part_22th_1[i]['Location'] == \"M/MT/FR043C2\" || markers_1st_part_22th_1[i]['Location'] == \"M/MT/FR043B2\" || markers_1st_part_22th_1[i]['Location'] == \"M/MT/FR043A2\") {\n var loc = markers_1st_part_22th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_22th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_22th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_22th_2 = given_data_first_part_22th_2;\n for (var i = 0; i < markers_1st_part_22th_2.length; i++) {\n\n if (markers_1st_part_22th_2[i]['Location'] == \"M/MT/FR043D1\" || markers_1st_part_22th_2[i]['Location'] == \"M/MT/FR043C1\" || markers_1st_part_22th_2[i]['Location'] == \"M/MT/FR043B1\" || markers_1st_part_22th_2[i]['Location'] == \"M/MT/FR043A1\") {\n var loc = markers_1st_part_22th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_22th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_22th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------23th part of first block----------------------------------------------\n var markers_1st_part_23th_1 = given_data_first_part_23th_1;\n\n for (var i = 0; i < markers_1st_part_23th_1.length; i++) {\n if (markers_1st_part_23th_1[i]['Location'] == \"M/MT/FR042D2\" || markers_1st_part_23th_1[i]['Location'] == \"M/MT/FR042C2\" || markers_1st_part_23th_1[i]['Location'] == \"M/MT/FR042B2\" || markers_1st_part_23th_1[i]['Location'] == \"M/MT/FR042A2\") {\n var loc = markers_1st_part_23th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_23th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_23th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_23th_2 = given_data_first_part_23th_2;\n for (var i = 0; i < markers_1st_part_23th_2.length; i++) {\n\n if (markers_1st_part_23th_2[i]['Location'] == \"M/MT/FR042D1\" || markers_1st_part_23th_2[i]['Location'] == \"M/MT/FR042C1\" || markers_1st_part_23th_2[i]['Location'] == \"M/MT/FR042B1\" || markers_1st_part_23th_2[i]['Location'] == \"M/MT/FR042A1\") {\n var loc = markers_1st_part_23th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_23th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_23th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------24th part of first block----------------------------------------------\n var markers_1st_part_24th_1 = given_data_first_part_24th_1;\n\n for (var i = 0; i < markers_1st_part_24th_1.length; i++) {\n if (markers_1st_part_24th_1[i]['Location'] == \"M/MT/FR041D2\" || markers_1st_part_24th_1[i]['Location'] == \"M/MT/FR041C2\" || markers_1st_part_24th_1[i]['Location'] == \"M/MT/FR041B2\" || markers_1st_part_24th_1[i]['Location'] == \"M/MT/FR041A2\") {\n var loc = markers_1st_part_24th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_24th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_24th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_24th_2 = given_data_first_part_24th_2;\n for (var i = 0; i < markers_1st_part_24th_2.length; i++) {\n\n if (markers_1st_part_24th_2[i]['Location'] == \"M/MT/FR041D1\" || markers_1st_part_24th_2[i]['Location'] == \"M/MT/FR041C1\" || markers_1st_part_24th_2[i]['Location'] == \"M/MT/FR041B1\" || markers_1st_part_24th_2[i]['Location'] == \"M/MT/FR041A1\") {\n var loc = markers_1st_part_24th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_24th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_24th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------25th part of first block----------------------------------------------\n var markers_1st_part_25th_1 = given_data_first_part_25th_1;\n\n for (var i = 0; i < markers_1st_part_25th_1.length; i++) {\n if (markers_1st_part_25th_1[i]['Location'] == \"M/MT/FR040D2\" || markers_1st_part_25th_1[i]['Location'] == \"M/MT/FR040C2\" || markers_1st_part_25th_1[i]['Location'] == \"M/MT/FR040B2\" || markers_1st_part_25th_1[i]['Location'] == \"M/MT/FR040A2\") {\n var loc = markers_1st_part_25th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_25th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_25th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_25th_2 = given_data_first_part_25th_2;\n for (var i = 0; i < markers_1st_part_25th_2.length; i++) {\n\n if (markers_1st_part_25th_2[i]['Location'] == \"M/MT/FR040D1\" || markers_1st_part_25th_2[i]['Location'] == \"M/MT/FR040C1\" || markers_1st_part_25th_2[i]['Location'] == \"M/MT/FR040B1\" || markers_1st_part_25th_2[i]['Location'] == \"M/MT/FR040A1\") {\n var loc = markers_1st_part_25th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_25th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_25th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n //----------------------------------26th part of first block----------------------------------------------\n var markers_1st_part_26th_1 = given_data_first_part_26th_1;\n\n for (var i = 0; i < markers_1st_part_26th_1.length; i++) {\n if (markers_1st_part_26th_1[i]['Location'] == \"M/MT/FR039D2\" || markers_1st_part_26th_1[i]['Location'] == \"M/MT/FR039C2\" || markers_1st_part_26th_1[i]['Location'] == \"M/MT/FR039B2\" || markers_1st_part_26th_1[i]['Location'] == \"M/MT/FR039A2\") {\n var loc = markers_1st_part_26th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_26th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_26th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_26th_2 = given_data_first_part_26th_2;\n for (var i = 0; i < markers_1st_part_26th_2.length; i++) {\n\n if (markers_1st_part_26th_2[i]['Location'] == \"M/MT/FR039D1\" || markers_1st_part_26th_2[i]['Location'] == \"M/MT/FR039C1\" || markers_1st_part_26th_2[i]['Location'] == \"M/MT/FR039B1\" || markers_1st_part_26th_2[i]['Location'] == \"M/MT/FR039A1\") {\n var loc = markers_1st_part_26th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_26th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_26th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------27th part of first block----------------------------------------------\n var markers_1st_part_27th_1 = given_data_first_part_27th_1;\n\n for (var i = 0; i < markers_1st_part_27th_1.length; i++) {\n if (markers_1st_part_27th_1[i]['Location'] == \"M/MT/FR038D2\" || markers_1st_part_27th_1[i]['Location'] == \"M/MT/FR038C2\" || markers_1st_part_27th_1[i]['Location'] == \"M/MT/FR038B2\" || markers_1st_part_27th_1[i]['Location'] == \"M/MT/FR038A2\") {\n var loc = markers_1st_part_27th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_27th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_27th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_27th_2 = given_data_first_part_27th_2;\n for (var i = 0; i < markers_1st_part_27th_2.length; i++) {\n\n if (markers_1st_part_27th_2[i]['Location'] == \"M/MT/FR038D1\" || markers_1st_part_27th_2[i]['Location'] == \"M/MT/FR038C1\" || markers_1st_part_27th_2[i]['Location'] == \"M/MT/FR038B1\" || markers_1st_part_27th_2[i]['Location'] == \"M/MT/FR038A1\") {\n var loc = markers_1st_part_27th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_27th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_27th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------28th part of first block----------------------------------------------\n var markers_1st_part_28th_1 = given_data_first_part_28th_1;\n\n for (var i = 0; i < markers_1st_part_28th_1.length; i++) {\n if (markers_1st_part_28th_1[i]['Location'] == \"M/MT/FR037D2\" || markers_1st_part_28th_1[i]['Location'] == \"M/MT/FR037C2\" || markers_1st_part_28th_1[i]['Location'] == \"M/MT/FR037B2\" || markers_1st_part_28th_1[i]['Location'] == \"M/MT/FR037A2\") {\n var loc = markers_1st_part_28th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_28th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_28th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_28th_2 = given_data_first_part_28th_2;\n for (var i = 0; i < markers_1st_part_28th_2.length; i++) {\n\n if (markers_1st_part_28th_2[i]['Location'] == \"M/MT/FR037D1\" || markers_1st_part_28th_2[i]['Location'] == \"M/MT/FR037C1\" || markers_1st_part_28th_2[i]['Location'] == \"M/MT/FR037B1\" || markers_1st_part_28th_2[i]['Location'] == \"M/MT/FR037A1\") {\n var loc = markers_1st_part_28th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_28th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_28th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------29th part of first block----------------------------------------------\n var markers_1st_part_29th_1 = given_data_first_part_29th_1;\n\n for (var i = 0; i < markers_1st_part_29th_1.length; i++) {\n if (markers_1st_part_29th_1[i]['Location'] == \"M/MT/FR036D2\" || markers_1st_part_29th_1[i]['Location'] == \"M/MT/FR036C2\" || markers_1st_part_29th_1[i]['Location'] == \"M/MT/FR036B2\" || markers_1st_part_29th_1[i]['Location'] == \"M/MT/FR036A2\") {\n var loc = markers_1st_part_29th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_29th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_29th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_29th_2 = given_data_first_part_29th_2;\n for (var i = 0; i < markers_1st_part_29th_2.length; i++) {\n\n if (markers_1st_part_29th_2[i]['Location'] == \"M/MT/FR036D1\" || markers_1st_part_29th_2[i]['Location'] == \"M/MT/FR036C1\" || markers_1st_part_29th_2[i]['Location'] == \"M/MT/FR036B1\" || markers_1st_part_29th_2[i]['Location'] == \"M/MT/FR036A1\") {\n var loc = markers_1st_part_29th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_29th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_29th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------30th part of first block----------------------------------------------\n var markers_1st_part_30th_1 = given_data_first_part_30th_1;\n\n for (var i = 0; i < markers_1st_part_30th_1.length; i++) {\n if (markers_1st_part_30th_1[i]['Location'] == \"M/MT/FR035D2\" || markers_1st_part_30th_1[i]['Location'] == \"M/MT/FR035C2\" || markers_1st_part_30th_1[i]['Location'] == \"M/MT/FR035B2\" || markers_1st_part_30th_1[i]['Location'] == \"M/MT/FR035A2\") {\n var loc = markers_1st_part_30th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_30th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_30th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_30th_2 = given_data_first_part_30th_2;\n for (var i = 0; i < markers_1st_part_30th_2.length; i++) {\n\n if (markers_1st_part_30th_2[i]['Location'] == \"M/MT/FR035D1\" || markers_1st_part_30th_2[i]['Location'] == \"M/MT/FR035C1\" || markers_1st_part_30th_2[i]['Location'] == \"M/MT/FR035B1\" || markers_1st_part_30th_2[i]['Location'] == \"M/MT/FR035A1\") {\n var loc = markers_1st_part_30th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_30th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_30th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n //----------------------------------31th part of first block----------------------------------------------\n var markers_1st_part_31th_1 = given_data_first_part_31th_1;\n\n for (var i = 0; i < markers_1st_part_31th_1.length; i++) {\n if (markers_1st_part_31th_1[i]['Location'] == \"M/MT/FR034D2\" || markers_1st_part_31th_1[i]['Location'] == \"M/MT/FR034C2\" || markers_1st_part_31th_1[i]['Location'] == \"M/MT/FR034B2\" || markers_1st_part_31th_1[i]['Location'] == \"M/MT/FR034A2\") {\n var loc = markers_1st_part_31th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_31th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_31th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_31th_2 = given_data_first_part_31th_2;\n for (var i = 0; i < markers_1st_part_31th_2.length; i++) {\n\n if (markers_1st_part_31th_2[i]['Location'] == \"M/MT/FR034D1\" || markers_1st_part_31th_2[i]['Location'] == \"M/MT/FR034C1\" || markers_1st_part_31th_2[i]['Location'] == \"M/MT/FR034B1\" || markers_1st_part_31th_2[i]['Location'] == \"M/MT/FR034A1\") {\n var loc = markers_1st_part_31th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_31th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_31th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n //----------------------------------32th part of first block----------------------------------------------\n var markers_1st_part_32th_1 = given_data_first_part_32th_1;\n\n for (var i = 0; i < markers_1st_part_32th_1.length; i++) {\n if (markers_1st_part_32th_1[i]['Location'] == \"M/MT/FR033D2\" || markers_1st_part_32th_1[i]['Location'] == \"M/MT/FR033C2\" || markers_1st_part_32th_1[i]['Location'] == \"M/MT/FR033B2\" || markers_1st_part_32th_1[i]['Location'] == \"M/MT/FR033A2\") {\n var loc = markers_1st_part_32th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_32th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_32th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_32th_2 = given_data_first_part_32th_2;\n for (var i = 0; i < markers_1st_part_32th_2.length; i++) {\n\n if (markers_1st_part_32th_2[i]['Location'] == \"M/MT/FR033D1\" || markers_1st_part_32th_2[i]['Location'] == \"M/MT/FR033C1\" || markers_1st_part_32th_2[i]['Location'] == \"M/MT/FR033B1\" || markers_1st_part_32th_2[i]['Location'] == \"M/MT/FR033A1\") {\n var loc = markers_1st_part_32th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_32th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_32th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n\n //----------------------------------33th part of first block----------------------------------------------\n var markers_1st_part_33th_1 = given_data_first_part_33th_1;\n\n for (var i = 0; i < markers_1st_part_33th_1.length; i++) {\n if (markers_1st_part_33th_1[i]['Location'] == \"M/MT/FR032D2\" || markers_1st_part_33th_1[i]['Location'] == \"M/MT/FR032C2\" || markers_1st_part_33th_1[i]['Location'] == \"M/MT/FR032B2\" || markers_1st_part_33th_1[i]['Location'] == \"M/MT/FR032A2\") {\n var loc = markers_1st_part_33th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_33th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_33th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_1st_part_33th_2 = given_data_first_part_33th_2;\n for (var i = 0; i < markers_1st_part_33th_2.length; i++) {\n\n if (markers_1st_part_33th_2[i]['Location'] == \"M/MT/FR032D1\" || markers_1st_part_33th_2[i]['Location'] == \"M/MT/FR032C1\" || markers_1st_part_33th_2[i]['Location'] == \"M/MT/FR032B1\" || markers_1st_part_33th_2[i]['Location'] == \"M/MT/FR032A1\") {\n var loc = markers_1st_part_33th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_1st_part_33th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_1st_part_33th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n\n //----------------------------------filling 7th block small boxes-----------------------------------\n //----------------------------------1th part of 7th block----------------------------------------------\n var markers_7th_part_1st_1 = given_data_seventh_part_1st_1;\n\n for (var i = 0; i < markers_7th_part_1st_1.length; i++) {\n if (markers_7th_part_1st_1[i]['Location'] == \"M/MT/FR029D2\" || markers_7th_part_1st_1[i]['Location'] == \"M/MT/FR029C2\" || markers_7th_part_1st_1[i]['Location'] == \"M/MT/FR029B2\" || markers_7th_part_1st_1[i]['Location'] == \"M/MT/FR029A2\") {\n var loc = markers_7th_part_1st_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_1st_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_1st_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_7th_part_1st_2 = given_data_seventh_part_1st_2;\n for (var i = 0; i < markers_7th_part_1st_2.length; i++) {\n\n if (markers_7th_part_1st_2[i]['Location'] == \"M/MT/FR029D1\" || markers_7th_part_1st_2[i]['Location'] == \"M/MT/FR029C1\" || markers_7th_part_1st_2[i]['Location'] == \"M/MT/FR029B1\" || markers_7th_part_1st_2[i]['Location'] == \"M/MT/FR029A1\") {\n var loc = markers_7th_part_1st_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_1st_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_1st_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n\n //----------------------------------2nd part of 7th block----------------------------------------------\n var markers_7th_part_2nd_1 = given_data_seventh_part_2nd_1;\n\n for (var i = 0; i < markers_7th_part_2nd_1.length; i++) {\n if (markers_7th_part_2nd_1[i]['Location'] == \"M/MT/FR028D2\" || markers_7th_part_2nd_1[i]['Location'] == \"M/MT/FR028C2\" || markers_7th_part_2nd_1[i]['Location'] == \"M/MT/FR028B2\" || markers_7th_part_2nd_1[i]['Location'] == \"M/MT/FR028A2\") {\n var loc = markers_7th_part_1st_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_2nd_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_2nd_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_7th_part_2nd_2 = given_data_seventh_part_2nd_2;\n for (var i = 0; i < markers_7th_part_2nd_2.length; i++) {\n\n if (markers_7th_part_2nd_2[i]['Location'] == \"M/MT/FR028D1\" || markers_7th_part_2nd_2[i]['Location'] == \"M/MT/FR028C1\" || markers_7th_part_2nd_2[i]['Location'] == \"M/MT/FR028B1\" || markers_7th_part_2nd_2[i]['Location'] == \"M/MT/FR028A1\") {\n var loc = markers_7th_part_2nd_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_2nd_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_2nd_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n //----------------------------------3rd part of 7th block----------------------------------------------\n var markers_7th_part_3rd_1 = given_data_seventh_part_3rd_1;\n\n for (var i = 0; i < markers_7th_part_3rd_1.length; i++) {\n if (markers_7th_part_3rd_1[i]['Location'] == \"M/MT/FR027D2\" || markers_7th_part_3rd_1[i]['Location'] == \"M/MT/FR027C2\" || markers_7th_part_3rd_1[i]['Location'] == \"M/MT/FR027B2\" || markers_7th_part_3rd_1[i]['Location'] == \"M/MT/FR027A2\") {\n var loc = markers_7th_part_3rd_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_3rd_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_3rd_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_7th_part_3rd_2 = given_data_seventh_part_3rd_2;\n for (var i = 0; i < markers_7th_part_3rd_2.length; i++) {\n\n if (markers_7th_part_3rd_2[i]['Location'] == \"M/MT/FR027D1\" || markers_7th_part_3rd_2[i]['Location'] == \"M/MT/FR027C1\" || markers_7th_part_3rd_2[i]['Location'] == \"M/MT/FR027B1\" || markers_7th_part_3rd_2[i]['Location'] == \"M/MT/FR027A1\") {\n var loc = markers_7th_part_3rd_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_3rd_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_3rd_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n\n\n //----------------------------------4th part of 7th block----------------------------------------------\n var markers_7th_part_4th_1 = given_data_seventh_part_4th_1;\n\n for (var i = 0; i < markers_7th_part_4th_1.length; i++) {\n if (markers_7th_part_4th_1[i]['Location'] == \"M/MT/FR026D2\" || markers_7th_part_4th_1[i]['Location'] == \"M/MT/FR026C2\" || markers_7th_part_4th_1[i]['Location'] == \"M/MT/FR026B2\" || markers_7th_part_4th_1[i]['Location'] == \"M/MT/FR026A2\") {\n var loc = markers_7th_part_4th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_4th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_4th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_7th_part_4th_2 = given_data_seventh_part_4th_2;\n for (var i = 0; i < markers_7th_part_4th_2.length; i++) {\n\n if (markers_7th_part_4th_2[i]['Location'] == \"M/MT/FR026D1\" || markers_7th_part_4th_2[i]['Location'] == \"M/MT/FR026C1\" || markers_7th_part_4th_2[i]['Location'] == \"M/MT/FR026B1\" || markers_7th_part_4th_2[i]['Location'] == \"M/MT/FR026A1\") {\n var loc = markers_7th_part_4th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_4th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_4th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n //----------------------------------5th part of 7th block----------------------------------------------\n var markers_7th_part_5th_1 = given_data_seventh_part_5th_1;\n\n for (var i = 0; i < markers_7th_part_5th_1.length; i++) {\n if (markers_7th_part_5th_1[i]['Location'] == \"M/MT/FR025D2\" || markers_7th_part_5th_1[i]['Location'] == \"M/MT/FR025C2\" || markers_7th_part_5th_1[i]['Location'] == \"M/MT/FR025B2\" || markers_7th_part_5th_1[i]['Location'] == \"M/MT/FR025A2\") {\n var loc = markers_7th_part_5th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_5th_1[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_5th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n var markers_7th_part_5th_2 = given_data_seventh_part_5th_2;\n for (var i = 0; i < markers_7th_part_5th_2.length; i++) {\n\n if (markers_7th_part_5th_2[i]['Location'] == \"M/MT/FR025D1\" || markers_7th_part_5th_2[i]['Location'] == \"M/MT/FR025C1\" || markers_7th_part_5th_2[i]['Location'] == \"M/MT/FR025B1\" || markers_7th_part_5th_2[i]['Location'] == \"M/MT/FR025A1\") {\n var loc = markers_7th_part_5th_2[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [13, 6],\n\n }\n });\n x_val = markers_7th_part_5th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_5th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n\n\n }\n }\n\n\n\n //----------------------------------6th part of 7th block----------------------------------------------\n var markers_7th_part_6th_1 = given_data_seventh_part_6th_1;\n for (var i = 0; i < markers_7th_part_6th_1.length; i++) {\n if (markers_7th_part_6th_1[i]['Location'] == \"M/MT/FR024D2\" || markers_7th_part_6th_1[i]['Location'] == \"M/MT/FR024C2\" || markers_7th_part_6th_1[i]['Location'] == \"M/MT/FR024B2\" || markers_7th_part_6th_1[i]['Location'] == \"M/MT/FR024A2\") {\n var loc = markers_7th_part_6th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_6th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_6th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_6th_2 = given_data_seventh_part_6th_2;\n for (var i = 0; i < markers_7th_part_6th_2.length; i++) {\n if (markers_7th_part_6th_2[i]['Location'] == \"M/MT/FR024D1\" || markers_7th_part_6th_2[i]['Location'] == \"M/MT/FR024C1\" || markers_7th_part_6th_2[i]['Location'] == \"M/MT/FR024B1\" || markers_7th_part_6th_2[i]['Location'] == \"M/MT/FR024A1\") {\n var loc = markers_7th_part_5th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n x_val = markers_7th_part_6th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_6th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------7th part of 7th block----------------------------------------------\n var markers_7th_part_7th_1 = given_data_seventh_part_7th_1;\n for (var i = 0; i < markers_7th_part_7th_1.length; i++) {\n if (markers_7th_part_7th_1[i]['Location'] == \"M/MT/FR023D2\" || markers_7th_part_7th_1[i]['Location'] == \"M/MT/FR023C2\" || markers_7th_part_7th_1[i]['Location'] == \"M/MT/FR023B2\" || markers_7th_part_7th_1[i]['Location'] == \"M/MT/FR023A2\") {\n var loc = markers_7th_part_7th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_7th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_7th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_7th_2 = given_data_seventh_part_7th_2;\n for (var i = 0; i < markers_7th_part_7th_2.length; i++) {\n if (markers_7th_part_7th_2[i]['Location'] == \"M/MT/FR023D1\" || markers_7th_part_7th_2[i]['Location'] == \"M/MT/FR023C1\" || markers_7th_part_7th_2[i]['Location'] == \"M/MT/FR023B1\" || markers_7th_part_7th_2[i]['Location'] == \"M/MT/FR023A1\") {\n var loc = markers_7th_part_7th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n x_val = markers_7th_part_7th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_7th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------8th part of 7th block----------------------------------------------\n var markers_7th_part_8th_1 = given_data_seventh_part_8th_1;\n for (var i = 0; i < markers_7th_part_8th_1.length; i++) {\n if (markers_7th_part_8th_1[i]['Location'] == \"M/MT/FR022D2\" || markers_7th_part_8th_1[i]['Location'] == \"M/MT/FR022C2\" || markers_7th_part_8th_1[i]['Location'] == \"M/MT/FR022B2\" || markers_7th_part_8th_1[i]['Location'] == \"M/MT/FR022A2\") {\n var loc = markers_7th_part_8th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_8th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_8th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_8th_2 = given_data_seventh_part_8th_2;\n for (var i = 0; i < markers_7th_part_8th_2.length; i++) {\n if (markers_7th_part_8th_2[i]['Location'] == \"M/MT/FR022D1\" || markers_7th_part_8th_2[i]['Location'] == \"M/MT/FR022C1\" || markers_7th_part_8th_2[i]['Location'] == \"M/MT/FR022B1\" || markers_7th_part_8th_2[i]['Location'] == \"M/MT/FR022A1\") {\n var loc = markers_7th_part_8th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n x_val = markers_7th_part_8th_2[i][\"marker_position\"];\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_8th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------9th part of 7th block----------------------------------------------\n var markers_7th_part_9th_1 = given_data_seventh_part_9th_1;\n for (var i = 0; i < markers_7th_part_9th_1.length; i++) {\n if (markers_7th_part_9th_1[i]['Location'] == \"M/MT/FR021D2\" || markers_7th_part_9th_1[i]['Location'] == \"M/MT/FR021C2\" || markers_7th_part_9th_1[i]['Location'] == \"M/MT/FR021B2\" || markers_7th_part_9th_1[i]['Location'] == \"M/MT/FR021A2\") {\n var loc = markers_7th_part_9th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_9th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_9th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_9th_2 = given_data_seventh_part_9th_2;\n for (var i = 0; i < markers_7th_part_9th_2.length; i++) {\n if (markers_7th_part_9th_2[i]['Location'] == \"M/MT/FR021D1\" || markers_7th_part_9th_2[i]['Location'] == \"M/MT/FR021C1\" || markers_7th_part_9th_2[i]['Location'] == \"M/MT/FR021B1\" || markers_7th_part_9th_2[i]['Location'] == \"M/MT/FR021A1\") {\n var loc = markers_7th_part_9th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_9th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_9th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------10th part of 7th block----------------------------------------------\n var markers_7th_part_10th_1 = given_data_seventh_part_10th_1;\n for (var i = 0; i < markers_7th_part_10th_1.length; i++) {\n if (markers_7th_part_10th_1[i]['Location'] == \"M/MT/FR020D2\" || markers_7th_part_10th_1[i]['Location'] == \"M/MT/FR020C2\" || markers_7th_part_10th_1[i]['Location'] == \"M/MT/FR020B2\" || markers_7th_part_10th_1[i]['Location'] == \"M/MT/FR020A2\") {\n var loc = markers_7th_part_10th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_10th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_10th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_10th_2 = given_data_seventh_part_10th_2;\n for (var i = 0; i < markers_7th_part_10th_2.length; i++) {\n if (markers_7th_part_10th_2[i]['Location'] == \"M/MT/FR020D1\" || markers_7th_part_10th_2[i]['Location'] == \"M/MT/FR020C1\" || markers_7th_part_10th_2[i]['Location'] == \"M/MT/FR020B1\" || markers_7th_part_10th_2[i]['Location'] == \"M/MT/FR020A1\") {\n var loc = markers_7th_part_10th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_10th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_10th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------11th part of 7th block----------------------------------------------\n var markers_7th_part_11th_1 = given_data_seventh_part_11th_1;\n for (var i = 0; i < markers_7th_part_11th_1.length; i++) {\n if (markers_7th_part_11th_1[i]['Location'] == \"M/MT/FR019D2\" || markers_7th_part_11th_1[i]['Location'] == \"M/MT/FR019C2\" || markers_7th_part_11th_1[i]['Location'] == \"M/MT/FR019B2\" || markers_7th_part_11th_1[i]['Location'] == \"M/MT/FR019A2\") {\n var loc = markers_7th_part_11th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_11th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_11th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_11th_2 = given_data_seventh_part_11th_2;\n for (var i = 0; i < markers_7th_part_11th_2.length; i++) {\n if (markers_7th_part_11th_2[i]['Location'] == \"M/MT/FR019D1\" || markers_7th_part_11th_2[i]['Location'] == \"M/MT/FR019C1\" || markers_7th_part_11th_2[i]['Location'] == \"M/MT/FR019B1\" || markers_7th_part_11th_2[i]['Location'] == \"M/MT/FR019A1\") {\n var loc = markers_7th_part_11th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_11th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_11th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------12th part of 7th block----------------------------------------------\n var markers_7th_part_12th_1 = given_data_seventh_part_12th_1;\n for (var i = 0; i < markers_7th_part_12th_1.length; i++) {\n if (markers_7th_part_12th_1[i]['Location'] == \"M/MT/FR018D2\" || markers_7th_part_12th_1[i]['Location'] == \"M/MT/FR018C2\" || markers_7th_part_12th_1[i]['Location'] == \"M/MT/FR018B2\" || markers_7th_part_12th_1[i]['Location'] == \"M/MT/FR018A2\") {\n var loc = markers_7th_part_11th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_12th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_12th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_12th_2 = given_data_seventh_part_12th_2;\n for (var i = 0; i < markers_7th_part_12th_2.length; i++) {\n if (markers_7th_part_12th_2[i]['Location'] == \"M/MT/FR018D1\" || markers_7th_part_12th_2[i]['Location'] == \"M/MT/FR018C1\" || markers_7th_part_12th_2[i]['Location'] == \"M/MT/FR018B1\" || markers_7th_part_12th_2[i]['Location'] == \"M/MT/FR018A1\") {\n var loc = markers_7th_part_12th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_12th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_12th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------13th part of 7th block----------------------------------------------\n var markers_7th_part_13th_1 = given_data_seventh_part_13th_1;\n for (var i = 0; i < markers_7th_part_13th_1.length; i++) {\n if (markers_7th_part_13th_1[i]['Location'] == \"M/MT/FR017D2\" || markers_7th_part_13th_1[i]['Location'] == \"M/MT/FR017C2\" || markers_7th_part_13th_1[i]['Location'] == \"M/MT/FR017B2\" || markers_7th_part_13th_1[i]['Location'] == \"M/MT/FR017A2\") {\n var loc = markers_7th_part_13th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_13th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_13th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_13th_2 = given_data_seventh_part_13th_2;\n for (var i = 0; i < markers_7th_part_13th_2.length; i++) {\n if (markers_7th_part_13th_2[i]['Location'] == \"M/MT/FR017D1\" || markers_7th_part_13th_2[i]['Location'] == \"M/MT/FR017C1\" || markers_7th_part_13th_2[i]['Location'] == \"M/MT/FR017B1\" || markers_7th_part_13th_2[i]['Location'] == \"M/MT/FR017A1\") {\n var loc = markers_7th_part_13th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_13th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_13th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------14th part of 7th block----------------------------------------------\n var markers_7th_part_14th_1 = given_data_seventh_part_14th_1;\n for (var i = 0; i < markers_7th_part_14th_1.length; i++) {\n if (markers_7th_part_14th_1[i]['Location'] == \"M/MT/FR016D2\" || markers_7th_part_14th_1[i]['Location'] == \"M/MT/FR016C2\" || markers_7th_part_14th_1[i]['Location'] == \"M/MT/FR016B2\" || markers_7th_part_14th_1[i]['Location'] == \"M/MT/FR016A2\") {\n var loc = markers_7th_part_14th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_14th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_14th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_14th_2 = given_data_seventh_part_14th_2;\n for (var i = 0; i < markers_7th_part_14th_2.length; i++) {\n if (markers_7th_part_14th_2[i]['Location'] == \"M/MT/FR016D1\" || markers_7th_part_14th_2[i]['Location'] == \"M/MT/FR016C1\" || markers_7th_part_14th_2[i]['Location'] == \"M/MT/FR016B1\" || markers_7th_part_14th_2[i]['Location'] == \"M/MT/FR016A1\") {\n var loc = markers_7th_part_14th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_14th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_14th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------15th part of 7th block----------------------------------------------\n var markers_7th_part_15th_1 = given_data_seventh_part_15th_1;\n for (var i = 0; i < markers_7th_part_15th_1.length; i++) {\n if (markers_7th_part_15th_1[i]['Location'] == \"M/MT/FR015D2\" || markers_7th_part_15th_1[i]['Location'] == \"M/MT/FR015C2\" || markers_7th_part_15th_1[i]['Location'] == \"M/MT/FR015B2\" || markers_7th_part_15th_1[i]['Location'] == \"M/MT/FR015A2\") {\n var loc = markers_7th_part_15th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_15th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_15th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_15th_2 = given_data_seventh_part_15th_2;\n for (var i = 0; i < markers_7th_part_15th_2.length; i++) {\n if (markers_7th_part_15th_2[i]['Location'] == \"M/MT/FR015D1\" || markers_7th_part_15th_2[i]['Location'] == \"M/MT/FR015C1\" || markers_7th_part_15th_2[i]['Location'] == \"M/MT/FR015B1\" || markers_7th_part_15th_2[i]['Location'] == \"M/MT/FR015A1\") {\n var loc = markers_7th_part_15th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_15th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_15th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------16th part of 7th block----------------------------------------------\n var markers_7th_part_16th_1 = given_data_seventh_part_16th_1;\n for (var i = 0; i < markers_7th_part_16th_1.length; i++) {\n if (markers_7th_part_16th_1[i]['Location'] == \"M/MT/FR014D2\" || markers_7th_part_16th_1[i]['Location'] == \"M/MT/FR014C2\" || markers_7th_part_16th_1[i]['Location'] == \"M/MT/FR014B2\" || markers_7th_part_16th_1[i]['Location'] == \"M/MT/FR014A2\") {\n var loc = markers_7th_part_16th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_16th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_16th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_16th_2 = given_data_seventh_part_16th_2;\n for (var i = 0; i < markers_7th_part_16th_2.length; i++) {\n if (markers_7th_part_16th_2[i]['Location'] == \"M/MT/FR014D1\" || markers_7th_part_16th_2[i]['Location'] == \"M/MT/FR014C1\" || markers_7th_part_16th_2[i]['Location'] == \"M/MT/FR014B1\" || markers_7th_part_16th_2[i]['Location'] == \"M/MT/FR014A1\") {\n var loc = markers_7th_part_16th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_16th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_16th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------17th part of 7th block----------------------------------------------\n var markers_7th_part_17th_1 = given_data_seventh_part_17th_1;\n for (var i = 0; i < markers_7th_part_17th_1.length; i++) {\n if (markers_7th_part_17th_1[i]['Location'] == \"M/MT/FR013D2\" || markers_7th_part_17th_1[i]['Location'] == \"M/MT/FR013C2\" || markers_7th_part_17th_1[i]['Location'] == \"M/MT/FR013B2\" || markers_7th_part_17th_1[i]['Location'] == \"M/MT/FR013A2\") {\n var loc = markers_7th_part_17th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_17th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_17th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_17th_2 = given_data_seventh_part_17th_2;\n for (var i = 0; i < markers_7th_part_17th_2.length; i++) {\n if (markers_7th_part_17th_2[i]['Location'] == \"M/MT/FR013D1\" || markers_7th_part_17th_2[i]['Location'] == \"M/MT/FR013C1\" || markers_7th_part_17th_2[i]['Location'] == \"M/MT/FR013B1\" || markers_7th_part_17th_2[i]['Location'] == \"M/MT/FR013A1\") {\n var loc = markers_7th_part_17th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_17th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_17th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n //----------------------------------18th part of 7th block----------------------------------------------\n var markers_7th_part_18th_1 = given_data_seventh_part_18th_1;\n for (var i = 0; i < markers_7th_part_18th_1.length; i++) {\n if (markers_7th_part_18th_1[i]['Location'] == \"M/MT/FR012D2\" || markers_7th_part_18th_1[i]['Location'] == \"M/MT/FR012C2\" || markers_7th_part_18th_1[i]['Location'] == \"M/MT/FR012B2\" || markers_7th_part_18th_1[i]['Location'] == \"M/MT/FR012A2\") {\n var loc = markers_7th_part_18th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_18th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_18th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_18th_2 = given_data_seventh_part_18th_2;\n for (var i = 0; i < markers_7th_part_18th_2.length; i++) {\n if (markers_7th_part_18th_2[i]['Location'] == \"M/MT/FR012D1\" || markers_7th_part_18th_2[i]['Location'] == \"M/MT/FR012C1\" || markers_7th_part_18th_2[i]['Location'] == \"M/MT/FR012B1\" || markers_7th_part_18th_2[i]['Location'] == \"M/MT/FR012A1\") {\n var loc = markers_7th_part_18th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_18th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_18th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------19th part of 7th block----------------------------------------------\n var markers_7th_part_19th_1 = given_data_seventh_part_19th_1;\n for (var i = 0; i < markers_7th_part_19th_1.length; i++) {\n if (markers_7th_part_19th_1[i]['Location'] == \"M/MT/FR011D2\" || markers_7th_part_19th_1[i]['Location'] == \"M/MT/FR011C2\" || markers_7th_part_19th_1[i]['Location'] == \"M/MT/FR011B2\" || markers_7th_part_19th_1[i]['Location'] == \"M/MT/FR011A2\") {\n var loc = markers_7th_part_19th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_19th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_19th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_19th_2 = given_data_seventh_part_19th_2;\n for (var i = 0; i < markers_7th_part_19th_2.length; i++) {\n if (markers_7th_part_19th_2[i]['Location'] == \"M/MT/FR011D1\" || markers_7th_part_19th_2[i]['Location'] == \"M/MT/FR011C1\" || markers_7th_part_19th_2[i]['Location'] == \"M/MT/FR011B1\" || markers_7th_part_19th_2[i]['Location'] == \"M/MT/FR011A1\") {\n var loc = markers_7th_part_19th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_19th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_19th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------20th part of 7th block----------------------------------------------\n var markers_7th_part_20th_1 = given_data_seventh_part_20th_1;\n for (var i = 0; i < markers_7th_part_20th_1.length; i++) {\n if (markers_7th_part_20th_1[i]['Location'] == \"M/MT/FR010D2\" || markers_7th_part_20th_1[i]['Location'] == \"M/MT/FR010C2\" || markers_7th_part_20th_1[i]['Location'] == \"M/MT/FR010B2\" || markers_7th_part_20th_1[i]['Location'] == \"M/MT/FR010A2\") {\n var loc = markers_7th_part_20th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_20th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_20th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_20th_2 = given_data_seventh_part_20th_2;\n for (var i = 0; i < markers_7th_part_20th_2.length; i++) {\n if (markers_7th_part_20th_2[i]['Location'] == \"M/MT/FR010D1\" || markers_7th_part_20th_2[i]['Location'] == \"M/MT/FR010C1\" || markers_7th_part_20th_2[i]['Location'] == \"M/MT/FR010B1\" || markers_7th_part_20th_2[i]['Location'] == \"M/MT/FR010A1\") {\n var loc = markers_7th_part_20th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_20th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_20th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------21th part of 7th block----------------------------------------------\n var markers_7th_part_21th_1 = given_data_seventh_part_21th_1;\n for (var i = 0; i < markers_7th_part_21th_1.length; i++) {\n if (markers_7th_part_21th_1[i]['Location'] == \"M/MT/FR009D2\" || markers_7th_part_21th_1[i]['Location'] == \"M/MT/FR009C2\" || markers_7th_part_21th_1[i]['Location'] == \"M/MT/FR009B2\" || markers_7th_part_21th_1[i]['Location'] == \"M/MT/FR009A2\") {\n var loc = markers_7th_part_21th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_21th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_21th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_21th_2 = given_data_seventh_part_21th_2;\n for (var i = 0; i < markers_7th_part_21th_2.length; i++) {\n if (markers_7th_part_21th_2[i]['Location'] == \"M/MT/FR009D1\" || markers_7th_part_21th_2[i]['Location'] == \"M/MT/FR009C1\" || markers_7th_part_21th_2[i]['Location'] == \"M/MT/FR009B1\" || markers_7th_part_21th_2[i]['Location'] == \"M/MT/FR009A1\") {\n var loc = markers_7th_part_21th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_21th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_21th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n\n //----------------------------------22th part of 7th block----------------------------------------------\n var markers_7th_part_22th_1 = given_data_seventh_part_22th_1;\n for (var i = 0; i < markers_7th_part_22th_1.length; i++) {\n if (markers_7th_part_22th_1[i]['Location'] == \"M/MT/FR008D2\" || markers_7th_part_22th_1[i]['Location'] == \"M/MT/FR008C2\" || markers_7th_part_22th_1[i]['Location'] == \"M/MT/FR008B2\" || markers_7th_part_22th_1[i]['Location'] == \"M/MT/FR008A2\") {\n var loc = markers_7th_part_22th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_22th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_22th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_22th_2 = given_data_seventh_part_22th_2;\n for (var i = 0; i < markers_7th_part_22th_2.length; i++) {\n if (markers_7th_part_22th_2[i]['Location'] == \"M/MT/FR008D1\" || markers_7th_part_22th_2[i]['Location'] == \"M/MT/FR008C1\" || markers_7th_part_22th_2[i]['Location'] == \"M/MT/FR008B1\" || markers_7th_part_22th_2[i]['Location'] == \"M/MT/FR008A1\") {\n var loc = markers_7th_part_22th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_22th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_22th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------23th part of 7th block----------------------------------------------\n var markers_7th_part_23th_1 = given_data_seventh_part_23th_1;\n for (var i = 0; i < markers_7th_part_23th_1.length; i++) {\n if (markers_7th_part_23th_1[i]['Location'] == \"M/MT/FR007D2\" || markers_7th_part_23th_1[i]['Location'] == \"M/MT/FR007C2\" || markers_7th_part_23th_1[i]['Location'] == \"M/MT/FR007B2\" || markers_7th_part_23th_1[i]['Location'] == \"M/MT/FR007A2\") {\n var loc = markers_7th_part_23th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_23th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_23th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_23th_2 = given_data_seventh_part_23th_2;\n for (var i = 0; i < markers_7th_part_23th_2.length; i++) {\n if (markers_7th_part_23th_2[i]['Location'] == \"M/MT/FR007D1\" || markers_7th_part_23th_2[i]['Location'] == \"M/MT/FR007C1\" || markers_7th_part_23th_2[i]['Location'] == \"M/MT/FR007B1\" || markers_7th_part_23th_2[i]['Location'] == \"M/MT/FR007A1\") {\n var loc = markers_7th_part_23th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_23th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_23th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------24th part of 7th block----------------------------------------------\n var markers_7th_part_24th_1 = given_data_seventh_part_24th_1;\n for (var i = 0; i < markers_7th_part_24th_1.length; i++) {\n if (markers_7th_part_24th_1[i]['Location'] == \"M/MT/FR006D2\" || markers_7th_part_24th_1[i]['Location'] == \"M/MT/FR006C2\" || markers_7th_part_24th_1[i]['Location'] == \"M/MT/FR006B2\" || markers_7th_part_24th_1[i]['Location'] == \"M/MT/FR006A2\") {\n var loc = markers_7th_part_24th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_24th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_24th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_24th_2 = given_data_seventh_part_24th_2;\n for (var i = 0; i < markers_7th_part_24th_2.length; i++) {\n if (markers_7th_part_24th_2[i]['Location'] == \"M/MT/FR006D1\" || markers_7th_part_24th_2[i]['Location'] == \"M/MT/FR006C1\" || markers_7th_part_24th_2[i]['Location'] == \"M/MT/FR006B1\" || markers_7th_part_24th_2[i]['Location'] == \"M/MT/FR006A1\") {\n var loc = markers_7th_part_24th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_24th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_24th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------25th part of 7th block----------------------------------------------\n var markers_7th_part_25th_1 = given_data_seventh_part_25th_1;\n for (var i = 0; i < markers_7th_part_25th_1.length; i++) {\n if (markers_7th_part_25th_1[i]['Location'] == \"M/MT/FR005D2\" || markers_7th_part_25th_1[i]['Location'] == \"M/MT/FR005C2\" || markers_7th_part_25th_1[i]['Location'] == \"M/MT/FR005B2\" || markers_7th_part_25th_1[i]['Location'] == \"M/MT/FR005A2\") {\n var loc = markers_7th_part_25th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_25th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_25th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_25th_2 = given_data_seventh_part_25th_2;\n for (var i = 0; i < markers_7th_part_25th_2.length; i++) {\n if (markers_7th_part_25th_2[i]['Location'] == \"M/MT/FR005D1\" || markers_7th_part_25th_2[i]['Location'] == \"M/MT/FR005C1\" || markers_7th_part_25th_2[i]['Location'] == \"M/MT/FR005B1\" || markers_7th_part_25th_2[i]['Location'] == \"M/MT/FR005A1\") {\n var loc = markers_7th_part_25th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_25th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_25th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n //----------------------------------26th part of 7th block----------------------------------------------\n var markers_7th_part_26th_1 = given_data_seventh_part_26th_1;\n for (var i = 0; i < markers_7th_part_26th_1.length; i++) {\n if (markers_7th_part_26th_1[i]['Location'] == \"M/MT/FR004D2\" || markers_7th_part_26th_1[i]['Location'] == \"M/MT/FR004C2\" || markers_7th_part_26th_1[i]['Location'] == \"M/MT/FR004B2\" || markers_7th_part_26th_1[i]['Location'] == \"M/MT/FR004A2\") {\n var loc = markers_7th_part_26th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_26th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_26th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_26th_2 = given_data_seventh_part_26th_2;\n for (var i = 0; i < markers_7th_part_26th_2.length; i++) {\n if (markers_7th_part_26th_2[i]['Location'] == \"M/MT/FR004D1\" || markers_7th_part_26th_2[i]['Location'] == \"M/MT/FR004C1\" || markers_7th_part_26th_2[i]['Location'] == \"M/MT/FR004B1\" || markers_7th_part_26th_2[i]['Location'] == \"M/MT/FR004A1\") {\n var loc = markers_7th_part_26th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_26th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_26th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n //----------------------------------27th part of 7th block----------------------------------------------\n var markers_7th_part_27th_1 = given_data_seventh_part_27th_1;\n for (var i = 0; i < markers_7th_part_27th_1.length; i++) {\n if (markers_7th_part_27th_1[i]['Location'] == \"M/MT/FR003D2\" || markers_7th_part_27th_1[i]['Location'] == \"M/MT/FR003C2\" || markers_7th_part_27th_1[i]['Location'] == \"M/MT/FR003B2\" || markers_7th_part_27th_1[i]['Location'] == \"M/MT/FR003A2\") {\n var loc = markers_7th_part_27th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_27th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_27th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_27th_2 = given_data_seventh_part_27th_2;\n for (var i = 0; i < markers_7th_part_27th_2.length; i++) {\n if (markers_7th_part_27th_2[i]['Location'] == \"M/MT/FR003D1\" || markers_7th_part_27th_2[i]['Location'] == \"M/MT/FR003C1\" || markers_7th_part_27th_2[i]['Location'] == \"M/MT/FR003B1\" || markers_7th_part_27th_2[i]['Location'] == \"M/MT/FR003A1\") {\n var loc = markers_7th_part_27th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_27th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_27th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------28th part of 7th block----------------------------------------------\n var markers_7th_part_28th_1 = given_data_seventh_part_28th_1;\n for (var i = 0; i < markers_7th_part_28th_1.length; i++) {\n if (markers_7th_part_28th_1[i]['Location'] == \"M/MT/FR002D2\" || markers_7th_part_28th_1[i]['Location'] == \"M/MT/FR002C2\" || markers_7th_part_28th_1[i]['Location'] == \"M/MT/FR002B2\" || markers_7th_part_28th_1[i]['Location'] == \"M/MT/FR002A2\") {\n var loc = markers_7th_part_28th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_28th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_28th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_28th_2 = given_data_seventh_part_28th_2;\n for (var i = 0; i < markers_7th_part_28th_2.length; i++) {\n if (markers_7th_part_28th_2[i]['Location'] == \"M/MT/FR002D1\" || markers_7th_part_28th_2[i]['Location'] == \"M/MT/FR002C1\" || markers_7th_part_28th_2[i]['Location'] == \"M/MT/FR002B1\" || markers_7th_part_28th_2[i]['Location'] == \"M/MT/FR002A1\") {\n var loc = markers_7th_part_28th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_28th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_28th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n //----------------------------------29th part of 7th block----------------------------------------------\n var markers_7th_part_29th_1 = given_data_seventh_part_29th_1;\n for (var i = 0; i < markers_7th_part_29th_1.length; i++) {\n if (markers_7th_part_29th_1[i]['Location'] == \"M/MT/FR001D2\" || markers_7th_part_29th_1[i]['Location'] == \"M/MT/FR001C2\" || markers_7th_part_29th_1[i]['Location'] == \"M/MT/FR001B2\" || markers_7th_part_29th_1[i]['Location'] == \"M/MT/FR001A2\") {\n var loc = markers_7th_part_29th_1[i]['Location'].slice(-2);\n\n var LeafIcon = L.Icon.extend({\n options: { iconSize: [13, 6] }\n });\n x_val = markers_7th_part_29th_1[i][\"marker_position\"];\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_29th_1[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n var markers_7th_part_29th_2 = given_data_seventh_part_29th_2;\n for (var i = 0; i < markers_7th_part_29th_2.length; i++) {\n if (markers_7th_part_29th_2[i]['Location'] == \"M/MT/FR001D1\" || markers_7th_part_29th_2[i]['Location'] == \"M/MT/FR001C1\" || markers_7th_part_29th_2[i]['Location'] == \"M/MT/FR001B1\" || markers_7th_part_29th_2[i]['Location'] == \"M/MT/FR001A1\") {\n var loc = markers_7th_part_29th_2[i]['Location'].slice(-2);\n var LeafIcon = L.Icon.extend({ options: { iconSize: [13, 6] } });\n\n x_val = markers_7th_part_29th_2[i][\"marker_position\"];\n\n\n var svg = '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"13\" height=\"6\" style=\"fill:#0853bf\" viewBox=\"0 0 13 6\"><rect width=\"13\" height=\"13\" style=\"\" /><text x=\"3\" y=\"5\" fill=\"white\" font-size=\"5\" font-weight=\"700\">' + loc + '</text></svg>'\n // var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 15 15\" width=\"15\" height=\"15\"><defs><path d=\"M0 0L50 0L50 18L0 18L0 0Z\" id=\"a1au4DcYqa\"></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\">'+loc+'</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#a1au4DcYqa\" opacity=\"1\" fill=\"#0853bf\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"#edJQPl1YZ\" opacity=\"1\" fill=\"#ffffff\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], { type: 'image/svg+xml' });\n const svg_url = URL.createObjectURL(blob);\n var greenIcon1 = new LeafIcon({ iconUrl: svg_url });\n test = markers_7th_part_29th_2[i][\"SV ID\"];\n var new_marker = xy(x_val[0], x_val[1]);\n var given_marker = L.marker(new_marker, { icon: greenIcon1 })\n given_marker.addTo(myFeatureGroup)\n given_marker.test = test;\n }\n }\n\n\n\n\n\n\n\n\n\n // given_loc_data_sixth_part=given_object[\"required_part_location_6th_block\"];\n\n //------------------------------------------extra code-------------------------\n // code for render road\n //image size height 3300 and width 1800\n // intial 3 points are:-1=[80,50],2=[700,50],3=[1450,50]\n /* var LeafIcon = L.Icon.extend({\n options: {\n iconSize: [50, 30],\n }\n });\n \n var svg='<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"xMidYMid meet\" viewBox=\"0 0 50 30\" width=\"50\" height=\"30\" id=\"\" fill=\"red\"><defs><path d=\"M0 0L50 0L50 36L0 36L0 0Z\" id=\"d1HwhFdh0a\" ></path><text id=\"edJQPl1YZ\" x=\"3.19\" y=\"1.83\" font-size=\"5\" font-family=\"Open Sans\" font-weight=\"700\" font-style=\"normal\" letter-spacing=\"0\" alignment-baseline=\"before-edge\" transform=\"matrix(1 0 0 1 -1.7462686567164205 -1.335820895522378)\" style=\"line-height:100%\" xml:space=\"preserve\" dominant-baseline=\"text-before-edge\"><tspan x=\"3.19\" dy=\"0em\" alignment-baseline=\"before-edge\" dominant-baseline=\"text-before-edge\" text-anchor=\"start\" id=\"t_span\">road</tspan></text><style id=\"opensans700normal\"></style></defs><g><g><g><g></g><use xlink:href=\"#d1HwhFdh0a\" opacity=\"1\" fill-opacity=\"1\"></use></g><g id=\"bv4yYAEIG\"><use xlink:href=\"red\" opacity=\"1\" fill=\"red\" fill-opacity=\"1\"></use></g></g></g></svg>'\n const blob = new Blob([svg], {type: 'image/svg+xml'});\n const svg_url = URL.createObjectURL(blob);\n var greenIcon2 = new LeafIcon({ iconUrl: svg_url});\n //var greenIcon2 = new LeafIcon({ iconUrl: \"{{ url_for('static', filename='1.svg')}}\"});\n test = \"cover_Id=\";\n \n \n x_val_1=[50,50];\n x_val_1_end=[50,3100];\n x_val_2=[1100,50];\n x_val_2_end=[1100,3100];\n x_val_3=[1950,50];\n x_val_3_end=[1950,3100];\n \n \n \n\n\n var new_marker_1 = xy(x_val_1[0], x_val_1[1]);\n var new_marker_2= xy(x_val_2[0], x_val_2[1]);\n var new_marker_3= xy(x_val_3[0], x_val_3[1]);\n var new_marker_1_end = xy(x_val_1_end[0], x_val_1_end[1]);\n var new_marker_3_end = xy(x_val_3_end[0], x_val_3_end[1]);\n var new_marker_2_end= xy(x_val_2_end[0], x_val_2_end[1]);\n\n\n\n\n var given_marker1 = L.marker(new_marker_1, { icon: greenIcon2 })\n var given_marker2 = L.marker(new_marker_2, { icon: greenIcon2 })\n var given_marker3 = L.marker(new_marker_3, { icon: greenIcon2 })\n var given_marker1_end = L.marker(new_marker_1_end, { icon: greenIcon2 })\n var given_marker3_end = L.marker(new_marker_3_end, { icon: greenIcon2 })\n var given_marker2_end = L.marker(new_marker_2_end, { icon: greenIcon2 })\n\n\n\n\n given_marker1.addTo(myFeatureGroup)\n given_marker2.addTo(myFeatureGroup)\n given_marker3.addTo(myFeatureGroup)\n given_marker1_end.addTo(myFeatureGroup)\n given_marker3_end.addTo(myFeatureGroup)\n given_marker2_end.addTo(myFeatureGroup)*/\n\n\n\n\n //given_marker.test = test;\n\n\n\n\n\n\n\n\n\n\n\n //------------------------------------------onclick function here--------------------------------------\n\n\n}", "map(predicate) {\n const tuples = this.toArray().map(([component, value]) => {\n const newValue = predicate(value, component);\n return [component.id.toString(), [component, newValue]];\n });\n return new ComponentMap(new Map(tuples));\n }", "function mapSamples(samples, data) {\n\tvar sampleMap = _.object(samples, _.range(samples.length));\n\n\treturn _.updateIn(data,\n\t\t ['req', 'rows'], rows => _.map(rows,\n\t\t\t row => _.assoc(row, 'sample', sampleMap[row.sample])),\n\t\t ['req', 'samplesInResp'], sIR => _.map(sIR, s => sampleMap[s]));\n}", "function mapSamples(samples, data) {\n\tvar sampleMap = _.object(samples, _.range(samples.length));\n\n\treturn _.updateIn(data,\n\t\t ['req', 'rows'], rows => _.map(rows,\n\t\t\t row => _.assoc(row, 'sample', sampleMap[row.sample])),\n\t\t ['req', 'samplesInResp'], sIR => _.map(sIR, s => sampleMap[s]));\n}", "function myMap(arr, cb) {\n // enter your code here\n}", "function Mapping(){this.generatedLine=0;this.generatedColumn=0;this.source=null;this.originalLine=null;this.originalColumn=null;this.name=null;}", "function miniMap(data, ctx) {\n\tvar scale = 10;\n\tvar imageData = ctx.createImageData(data[0].length*scale,data.length*scale)\n\tfor(var i = 0; i < data.length; i++) {\n\t\tfor(var j = 0; j < data[i].length; j++) {\n\t\t\tfor(var k = 0; k < scale; k++) {\n\t\t\t\tfor(var l = 0; l < scale; l++) {\n\t\t\t\t\tif (data[i][j].walkable==1) {\n\t\t\t\t\t\tsetPixel(imageData, j*scale+k, i*scale+l, 150, 150, 255, 255);\n\t\t\t\t\t} else if (data[i][j].walkable==2) {\n\t\t\t\t\t\tsetPixel(imageData, j*scale+k, i*scale+l, 100, 225, 100, 255);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetPixel(imageData, j*scale+k, i*scale+l, 150, 100, 100, 255);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tbase: imageData,\n\t\tcurrent: imageData,\n\t\tscale: scale\n\t}\n}", "function batchMap(change) {\n var op = {\n type: change.action === \"delete\" ? \"del\" : \"put\",\n key: change.id,\n value: {}\n };\n if (change.action !== \"create\" && change.version) {\n op.links = change.version.split(/\\s*,\\s*/).filter(Boolean);\n }\n Object.keys(change).forEach(function(prop) {\n if (SKIP_PROPS.indexOf(prop) > -1) return;\n op.value[prop === \"nodes\" ? \"refs\" : prop] = change[prop];\n });\n op.value.timestamp = op.value.timestamp || new Date().toISOString();\n\n var key = idToP2pId[change.id];\n (change.nodes || []).forEach(function(id, idx) {\n op.value.refs[idx] = idToP2pId[id];\n // console.log('fixed ref mapping', id, 'to', op.value.refs[idx])\n });\n (change.members || []).forEach(function(ref, idx) {\n ref.ref = idToP2pId[ref.ref];\n op.value.members[idx] = ref;\n // console.log('fixed member mapping', ref.ref, 'to', op.value.members[idx])\n });\n\n // filter out nulls\n if (op.value.refs)\n op.value.refs = op.value.refs.filter(function(id) {\n return !!id;\n });\n if (op.value.members)\n op.value.members = op.value.members.filter(function(ref) {\n return !!ref.ref;\n });\n\n return {\n k: key,\n v: op.value\n };\n }", "massageData(data) {\n // Grab the unique list of counties from the dataset\n this.listOfCounties = [...new Set(data.map((x) => x.res_geo_short))].sort();\n\n // Group data by residential county\n const groupedData = this.groupBy(data, (item) => item.res_geo_short);\n\n // Convert necessary string to ints and add aggregate fields\n groupedData.forEach((county) => this.convertStrings(county));\n return groupedData;\n }", "function mapData(map, data) {\n var newData = {};\n $.each(data, function(p, v) {\n if ( typeof map[p]==='undefined' ) {\n newData[p] = data[p];\n } else {\n newData[map[p]] = data[p];\n }\n });\n return newData;\n}", "function makeMap(start, w, h) {\n var ix, jx, data;\n\n for (ix = 0; ix < h; ix++) {\n map[ix] = [];\n mark[ix] = [];\n\n data = input[start + ix].trim().split('');\n\n for (jx = 0; jx < w; jx++) {\n map[ix][jx] = +data[jx];\n mark[ix][jx] = 0;\n }\n }\n}", "function ready(data_festivals) {\n\n\ndata_festivals = data_festivals.filter(d=>d['Lon,Lat'])\n\n\n data_festivals.forEach(d =>{\n d.latitude = d['Lon,Lat'].split(',')[1]\n d.longitude = d['Lon,Lat'].split(',')[0]\n d.latLong = [+d.latitude, +d.longitude];\n\n })\n\nconsole.log(data_festivals)\n\n\nall_data_festivals = data_festivals\n\nconfigMap(data_festivals)\n\n\n}", "_publishData() {\n\n let data = [];\n\n this.sections.each(function(i, s) {\n\n let attrs = utils.parseAttrs($(s), {\n tl: ['data-tl', utils.parseLonLat],\n br: ['data-br', utils.parseLonLat],\n label: 'data-label',\n });\n\n // If all map attrs are defined.\n if (!_.contains(attrs, undefined)) {\n $(s).attr('data-map-id', i);\n data.push(_.assign(attrs, { id: i }));\n }\n\n });\n\n this.props.mountSections(data);\n\n }", "function areaCombineS( data1, data2, key, combine )\n{\n\tvar newData = [];\n\n\tfor( var x in data1 )\n\t\tnewData.push( [ data1[x][key], data1[x][combine], data2[x][combine] ] );\n\t\t\n\treturn newData;\n}", "function MapIterator() {}", "function areaCombine( data1, data2, key, combine )\n{\n\tvar newData = { \"data\":[], \"err\":[] };\n\t\n\tfor( var d in data1[\"data\"] )\n\t\tnewData[\"data\"].push( areaCombineS( data1[\"data\"][d], data2[\"data\"][d], key, combine ) );\n\t\t\n\tfor( var e in data1[\"err\"] )\n\t\tnewData[\"err\"].push( areaCombineS( data1[\"err\"][e], data2[\"err\"][e], key, combine ) );\n\t\t\n\treturn newData;\n}", "function mapEntities() {\n\n var entity = {\n positions:{},\n years:{} ,\n entity: this.Entity\n };\n\n // determine kind of entity\n var key = undefined;\n\n if( !(this.productId === undefined)) {\n // have product id\n key = this.productId;\n entity.kind = \"product\";\n } else if(!(this.accountId === undefined)) {\n key = this.accountId;\n entity.kind = \"account\";\n } else {\n // myst be top level\n key = this.Entity;\n entity.kind = \"top\"\n }\n\n // position is designated by title\n var position = {\n // expectation data rows keyed by source\n expectations:{},\n // actial results keyed by year\n results:{}\n };\n\n if (this.qualifier == \"Ergebnis\") {\n // this is real value\n position.results[this.year] = this.value\n } else {\n // compose expectation value\n // and described by qualifier. it also provides\n // map of years. data series will be created in finalisation step\n var source = { };\n source[this.year] = this.value;\n position.expectations[this.source] = source;\n }\n\n // store position and year in the entity\n entity.positions[this.title] = position;\n entity.years[this.year] = null;\n\n emit(key, entity);\n}", "function mapper(data) {\n\t\treturn data.map( (obj) => {\n\t\t\treturn {\n\t\t\t\tsender_id: sender.id,\n\t\t\t\tsender_name: sender.name,\n\t\t\t\tsender_logo: sender.logo,\n\t\t\t\treceiver_id: _.get(obj, 'user_id'),\n\t\t\t\ttitle: req.body.title,\n\t\t\t\tmessages: req.body.messages,\n\t\t\t\tstatus: \"unread\",\n\t\t\t}\n\t\t})\n\t}", "function mapper(data) {\n\t\treturn data.map( (obj) => {\n\t\t\treturn {\n\t\t\t\tsender_id: sender.id,\n\t\t\t\tsender_name: sender.name,\n\t\t\t\tsender_logo: sender.logo,\n\t\t\t\treceiver_id: obj,\n\t\t\t\ttitle: req.body.title,\n\t\t\t\tmessages: req.body.messages,\n\t\t\t\tstatus: \"unread\",\n\t\t\t}\n\t\t})\n\t}", "function mapData(value, a, b, c, d) {\n // first map value from (a..b) to (0..1)\n value = (value - a) / (b - a);\n // then map it from (0..1) to (c..d) and return it\n return c + value * (d - c);\n}", "function reduceToObjects(cols,data) {\n\t\tvar fieldNameMap = $.map(cols, function(col) { return col.fieldName; });\n\t\tvar dataToReturn = $.map(data, function(d) {\n\t\t\t\t\t\t\t\t\t\treturn d.reduce(function(memo, value, idx) {\n\t\t\t\t\t\t\t\t\t\t\tmemo[fieldNameMap[idx]] = value.value; return memo;\n\t\t\t\t\t\t\t\t\t\t}, {});\n });\n //console.log(fieldNameMap);\n //console.log(dataToReturn);\n\t\treturn dataToReturn;\n\t}", "function map(fn) {\n return function(rf) { // <- buildArray for example\n // Hmm, we don't have the information yet to run the functionality of map, lets return a function to provide an interface for this\n return function(result, item) { // look another reducing function\n return rf(result, fn(item))\n }\n }\n}", "function sqlRunMapJoin(db, pre, dat, map, sep) {\n for(var i=0, I=dat.length, z= []; i<I; i+=256) {\n var prt = dat.slice(i, i+256);\n z.push(db.run(pre+prt.map(map).join(sep), prt));\n }\n return Promise.all(z);\n}", "function Map (parent) {\n this.nextChunkID=0;\n this.chunks = [];\n this.fillLevel = 0;\n this.width = 1;\n this.height = 1;\n this.parent = parent;\n }", "_map(inputStart, inputEnd, outputStart, outputEnd, input) {\n return outputStart + ((outputEnd - outputStart) / (inputEnd - inputStart)) * (input - inputStart);\n }", "function map(newValue, callback) {\n\n element.page.isDirty = true;\n\n if (!newValue || '' === newValue || '{}' === newValue || {} === newValue) {\n newValue = [];\n }\n\n if ('string' === typeof newValue) {\n try {\n newValue = JSON.parse(newValue);\n } catch (parseErr) {\n Y.log('Could not parse stored table values: ' + JSON.stringify(parseErr), 'warn', NAME);\n Y.log('Table Dataset Literal: ' + newValue, 'warn', NAME);\n newValue = [];\n }\n }\n\n // applying filters, EXTMOJ-1893\n\n if ( newValue && Array.isArray( newValue ) ) {\n newValue = Y.dcforms.applyTableFilters( newValue, dcCols.filters );\n }\n\n // do not override user-edited fields (MOJ-3160)\n\n var i, j, found;\n\n if ( !element.readonly ) {\n for (i = 0; i < dataset.length; i++) {\n\n found = false;\n\n for (j = 0; j < newValue.length; j++) {\n if (dataset[i].activityId && newValue[j].activityId && dataset[i].activityId === newValue[j].activityId) {\n\n // special case for MOJ-4250\n if (\n dataset[i].hasOwnProperty('date') &&\n newValue[j].hasOwnProperty('date') &&\n (dataset[i].date !== newValue[j].date)\n ) {\n // if date from mapper has changed we need to update it regardless of user edit\n dataset[i].date = newValue[j].date;\n }\n\n newValue[j] = dataset[i];\n }\n\n if ( dataset[i].randId && newValue[j].randId && dataset[i].randId === newValue[j].randId ) {\n found = true;\n }\n }\n\n // shuffle manually added rows into newValue (MOJ-8185)\n if ( !found && dataset[i].randId ) {\n newValue.splice( i, 0, dataset[i] );\n }\n\n }\n }\n\n try {\n dataset = JSON.parse( JSON.stringify( newValue ) );\n } catch( parseErr ) {\n Y.log( 'Attempted to map invalid value into table: ' + JSON.stringify( parseErr ), 'warn', NAME );\n return callback( parseErr );\n }\n //Y.log('setting data: ' + JSON.stringify(newValue, undefined, 2), 'debug', NAME);\n\n generateSubElements();\n\n // and we're done, mapping call will re-render the page once all elements have been updated\n callback(null);\n }", "function joinData (files) {\n console.log(\"This appears to work!\");\n \n var nonSpatialData = files[0];\n var spatialData = files[1].features;\n \n console.log(\"logging non-spatial data\");\n console.log(nonSpatialData);\n console.log(\"logging spatial data\");\n console.log(spatialData);\n \n //join the spatial and non spatial data together\n for (var i=0; i < nonSpatialData.length; i++) {\n var nonSpatialRecord = nonSpatialData[i];\n var nonSpatialKey = nonSpatialRecord.AFFGEOID;\n \n for (var a=0; a < spatialData.length; a++){\n \n var spatialRecord = spatialData[a];\n var spatialKey = spatialRecord.properties.AFFGEOID;\n \n if (spatialKey == nonSpatialKey){\n console.log(\"The Keys Match!\");\n \n spatialRecord.name = nonSpatialRecord.name;\n spatialRecord.AFFGEOID = \"G\" + nonSpatialRecord.AFFGEOID;\n \n //join the two datasets together and push the object into the new master array\n attrArray.forEach(function (attr){\n var val = parseFloat(nonSpatialRecord[attr]);\n spatialRecord[attr] = val;\n });\n \n dataList.push(spatialRecord);\n }\n }\n }\n \n console.log(\"Logging joined data!\");\n console.log(dataList);\n }", "function mapWith(array, callback) {\n\n}", "function consumptionMapData() {\n /* eslint-disable no-undef */\n emit(this.id, { \n litresConsumed: this.litresConsumed, \n kilometersTravelled: this.kilometersTravellled,\n litrosTanque: this.litrosTanque, \n kilometraje: this.kilometraje,\n processed: this.processed \n });\n /* eslint-enable no-undef */\n}", "function processData(data, fromYear, toYear, fromMin, toMin) {\n return _.chain(data)\n .dataInYearRange(fromYear, toYear)\n .dataInMinuteRange(fromMin, toMin)\n .minutelyData().value();\n }", "function returnstep(data,mapdict){\n\tvar step={\n\t\t'author': '',\n\t\t'year': '',\n\t\t'title':'',\n\t\t'country': '',\n\t\t'placeposition': '',\n\t\t'img_preview': '',\n\t\t'genre':'',\n\t\t'description': ''\n\t}\n\n\tfor (let [k, v] of Object.entries(mapdict)) {\n\t\tstep[k]=returnMappedValue(data, v)\n\t}\n\n\treturn step\n}", "function map() {\n // notice: MongoDB will not call the reduce function for a key that has only a single value\n // => emit same kind of output as reduce()'s\n if (!this.err) return;\n const val = { total: 1 };\n // consider URLs (starting with http or //) as `fi` (source: file)\n const playerId =\n this.eId[0] === '/' && this.eId[1] !== '/' ? this.eId.substr(1, 2) : 'fi';\n val[playerId] = 1;\n delete this.err.track; // in order to prevent `key too large to index`\n delete this.err.pId;\n delete this.err.trackUrl;\n return emit(JSON.stringify(this.err), val); // group by error object (contains source, code and message)\n}", "function load_mapping_data( callback_on_done){\n \n loadMultipleData(MappingDataToLoad,function() { mapping_parse_loaded_data_to_json(); \n if(callback_on_done != null){\n callback_on_done();\n } });\n}", "function parseSamples2(mapping) {\n var every = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var type = (0, _util.typeString)(mapping),\n promises = [],\n baseUrl = '';\n\n if (typeof mapping.baseUrl === 'string') {\n baseUrl = mapping.baseUrl;\n delete mapping.baseUrl;\n }\n\n //console.log(mapping, baseUrl)\n\n every = typeof every === 'function' ? every : false;\n //console.log(type, mapping)\n if (type === 'object') {\n Object.keys(mapping).forEach(function (key) {\n // if(isNaN(key) === false){\n // key = parseInt(key, 10)\n // }\n var a = mapping[key];\n //console.log(key, a, typeString(a))\n if ((0, _util.typeString)(a) === 'array') {\n a.forEach(function (map) {\n //console.log(map)\n getPromises(promises, map, key, baseUrl, every);\n });\n } else {\n getPromises(promises, a, key, baseUrl, every);\n }\n });\n } else if (type === 'array') {\n var key = void 0;\n mapping.forEach(function (sample) {\n // key is deliberately undefined\n getPromises(promises, sample, key, baseUrl, every);\n });\n }\n\n return new Promise(function (resolve) {\n Promise.all(promises).then(function (values) {\n //console.log(type, values)\n if (type === 'object') {\n mapping = {};\n values.forEach(function (value) {\n // support for multi layered instruments\n var map = mapping[value.id];\n var type = (0, _util.typeString)(map);\n if (type !== 'undefined') {\n if (type === 'array') {\n map.push(value.buffer);\n } else {\n mapping[value.id] = [map, value.buffer];\n }\n } else {\n mapping[value.id] = value.buffer;\n }\n });\n //console.log(mapping)\n resolve(mapping);\n } else if (type === 'array') {\n resolve(values);\n }\n });\n });\n}", "function mapData(data) {\n\treturn data.sort((a, b) => a.order - b.order)\n\t\t\t\t.reduce((prev, cur) => {\n\t\t\t\t\treturn sortData(prev, cur);\n\t\t\t\t}, []);\n}", "applyPinIDs(data) {\n\t\tfor (let i = 0; i < this.inpinOrder.length; i++) {\n\t\t\tthis.inpins[this.inpinOrder[i]].pinid = data.ipids[i];\n\t\t}\n\t\tfor (let i = 0; i < this.outpinOrder.length; i++) {\n\t\t\tthis.outpins[this.outpinOrder[i]].pinid = data.opids[i];\n\t\t}\n\t}", "function sc_map(proc, l1) {\n if (l1 === undefined)\n\treturn null;\n // else\n var nbApplyArgs = arguments.length - 1;\n var applyArgs = new Array(nbApplyArgs);\n var revres = null;\n while (l1 !== null) {\n\tfor (var i = 0; i < nbApplyArgs; i++) {\n\t applyArgs[i] = arguments[i + 1].car;\n\t arguments[i + 1] = arguments[i + 1].cdr;\n\t}\n\trevres = sc_cons(proc.apply(null, applyArgs), revres);\n }\n return sc_reverseAppendBang(revres, null);\n}", "function processData(data) {\n var geoJsonObject = {\n \"type\": \"FeatureCollection\",\n \"features\": []\n };\n\n var i;\n for (i=0; i < data.length; i++) {\n var result = data[i];\n\n // Only process the data if the result listing is currently active\n if (result[\"active\"] == \"1\") {\n\n /**\n * Sort promotional leases into groups based on the building they are in (buildid)\n */\n\n // Get the index of a listing if there are other promotional listings already present with the same buildid\n var listingIndex = getOtherListings(result.buildid, geoJsonObject[\"features\"]);\n\n /**\n * Process object into GeoJSON\n * Subleases get their own entry in \"features.\"\n * Promos are sorted into building groups by buildid.\n *\n * GeoJSON is a format used by Google Maps and probably other mapping APIs. It has a strict format but we can put\n * whatever we want into \"properties\", which is where we put things like the listing name, price, and associated URL.\n *\n * Note: This is ONE GeoJSON object, not many, and we push each listing into its \"features\" property.\n */\n\n if (listingIndex != null && !isSublease(result[\"aid\"])) {\n geoJsonObject[\"features\"][listingIndex].properties[\"floor_plans\"].push({\n \"weight\": i + 1,\n \"name\": result[\"floor_plan\"],\n \"buildid\": result[\"buildid\"],\n \"price\": result[\"price\"],\n \"gender\": result[\"gender\"],\n \"baths\": result[\"baths\"],\n \"beds\": result[\"beds\"],\n \"sublease\": false,\n \"url\": result[\"url\"]\n });\n } else if (listingIndex == null && !isSublease(result[\"aid\"])) {\n geoJsonObject[\"features\"].push(\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [parseFloat(result[\"lng\"]), parseFloat(result[\"lat\"])]\n },\n \"properties\": {\n \"weight\": i + 1,\n // Gets the building name, assuming \"Cordelia at Brentwood\" etc\n \"name\": result[\"building_name\"],\n \"buildid\": result[\"buildid\"],\n \"image\": getThumbnail(result[\"images\"]),\n \"sublease\": false,\n \"url\": result[\"url\"],\n \"floor_plans\": [{\n \"name\": result[\"list\"].split(\" at \")[0],\n \"number\": i,\n \"buildid\": result[\"buildid\"],\n \"price\": result[\"price\"],\n \"gender\": result[\"gender\"],\n \"baths\": result[\"baths\"],\n \"beds\": result[\"beds\"],\n \"sublease\": false,\n \"url\": result[\"url\"]\n }]\n }\n }\n );\n } else {\n geoJsonObject[\"features\"].push(\n {\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [parseFloat(result[\"lng\"]), parseFloat(result[\"lat\"])]\n },\n \"properties\": {\n \"weight\": i + 1,\n \"name\": \"Sublease\",\n \"price\": result[\"price\"],\n \"gender\": result[\"gender\"],\n \"baths\": result[\"baths\"],\n \"beds\": result[\"beds\"],\n \"image\": getThumbnail(result[\"images\"]),\n \"sublease\": true,\n \"url\": result[\"url\"]\n }\n }\n );\n }\n }\n }\n\n // Before saving data: Loop through once more for promotional buildings and get the lowest price of each\n // We'll use this to display the lowest listing price on the DOM\n\n for (i=0; i<geoJsonObject.features.length; i++) {\n var listing = geoJsonObject.features[i].properties;\n var j, price, lowestPrice;\n if (listing.floor_plans) {\n for (j=0; j<listing.floor_plans.length; j++) {\n price = listing.floor_plans[j].price;\n if (!lowestPrice || price < lowestPrice) {\n lowestPrice = price;\n }\n }\n listing.price = lowestPrice;\n }\n }\n\n // Save the geoJSON object globally\n processedData = geoJsonObject;\n}", "function Map() {}", "map(mapping, doc2, options) {\n if (this == empty || mapping.maps.length == 0)\n return this;\n return this.mapInner(mapping, doc2, 0, 0, options || noSpec);\n }", "function calcMetaDataField_geoSubset(data,params,field)\n{\n var eventsField = normalizeField(field,'target','geoSubset')[0];\n var positionsField = normalizeField(field,'target','geoSubset')[1];\n var shape = normalizeField(field,'shape','geoSubset')[0];\n var x = normalizeField(field,'x','geoSubset')[0];\n var y = normalizeField(field,'y','geoSubset')[0];\n var width = normalizeField(field,'width','geoSubset')[0];\n var height = normalizeField(field,'height','geoSubset')[0];\n\n // normalizing will ensure we get an array for each, which may be empty\n var eventsArray = normalizeDataItem(data,eventsField);\n var positionsArray = normalizeDataItem(data,positionsField);\n\n return(geoSubsetOP(eventsArray,positionsArray,shape,x,y,width,height));\n}", "function joinData(usStates,csvData){\n\t\t//loop through the csv file to assign each set of csv attribute to geojson regions\n\t\tfor (var i=0; i<csvData.length; i++){\n\t\t\tvar csvRegion= csvData[i]; //access the current indexed region\n\t\t\tvar csvKey=csvRegion.code_local;//the csv primary key \n\n\t\t\t//loop through the geojson regions to find the correct regions \n\t\t\tfor (var a=0; a<usStates.length;a++){\n\t\t\t\tvar geojsonProps=usStates[a].properties;//the current indexed region geojson properties\n\t\t\t\tvar geojsonKey=geojsonProps.code_local;//the geojson primary key \n\n\t\t\t\t//when the csv primary key matches the geojson primary key, transfer the csv data to geojson objects' properties\n\t\t\t\tif (geojsonKey==csvKey){\n\t\t\t\t\t//assign all attributes and values \n\t\t\t\t\tattrArray.forEach(function(attr){\n\t\t\t\t\t\tvar val=parseFloat(csvRegion[attr]); //get all the csv attribute values\n\t\t\t\t\t\tgeojsonProps[attr]=val;//assign the attribute and values to geojson properties\n\t\t\t\t\t\t//console.log(geojsonProps[attr]);\n\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\t//returning the enumeration units with attrbite values joined\n\t\treturn usStates;\n\t}", "map(field_name, f){\n\t\treturn this.copy((new Map()).set(field_name, f(this.takeValue(field_name))));\n\t}", "updateData(result) {\n let removeIndex = [];\n let mapIndex = -1;\n\n // checks to see if the file \"result\" is a JS mapping file, this file always starts with Start::::\n if (\n Object.keys(result.data[0])[0].includes(\n \"Mapping file created by Mars Map Maker\"\n )\n ) {\n let finalStr = \"\";\n let needsCenturyPrefix = false;\n\n // JS mapping file has a section \"let map...\" which is where we want to retrieve our sesar selections and clean the data\n let jsArr = [];\n let prefix = \"\";\n let dateIdArr = [];\n let dateIdentified = false;\n // start pushing is where we find \"let map...\" and start reading\n let startPushing = false;\n let addToForceEdit = false;\n let forceEditValueTitleArr = [];\n let forceEditValueContentArr = [];\n\n if (JSON.stringify(Object.values(result.data[0])).includes(\"forceEdit\")) {\n addToForceEdit = true;\n }\n\n // parsing out a javascript file\n for (let i = 1; i < result.data.length - 1; i++) {\n if (\n JSON.stringify(Object.values(result.data[i])).includes(\"forceEdit\") &&\n JSON.stringify(Object.values(result.data[i])).includes(\"const\")\n ) {\n addToForceEdit = true;\n }\n\n if (addToForceEdit === true) {\n if (\n JSON.stringify(Object.values(result.data[i])).includes(\n \"mapMakerHeader\"\n )\n ) {\n let forceEditValue = JSON.stringify(\n Object.values(result.data[i])\n ).split(\" \");\n forceEditValueTitleArr.push(\n forceEditValue[forceEditValue.length - 1].substring(\n 2,\n forceEditValue[3].length - 4\n )\n );\n }\n if (\n JSON.stringify(Object.values(result.data[i])).includes(\"return\")\n ) {\n let forceEditValue = JSON.stringify(\n Object.values(result.data[i])\n ).split(\" \");\n let trimmedForceEditValue = forceEditValue.slice(3).join(\" \");\n forceEditValueContentArr.push(\n trimmedForceEditValue.substring(\n 2,\n trimmedForceEditValue.length - 5\n )\n );\n addToForceEdit = false;\n }\n }\n\n if (\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"let map\")\n ) {\n if (\n !(\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"}\") ||\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"return\")\n )\n )\n mapIndex = i;\n startPushing = true;\n } else if (\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"const scrippsDate\")\n ) {\n dateIdentified = true;\n } else if (\n JSON.stringify(Object.values(result.data[i - 1])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"}\")\n ) {\n startPushing = false;\n } else if (\n JSON.stringify(Object.values(result.data[i])[0])\n .replace(/(\\r\\n|\\n|\\r)/gm, \"\")\n .includes(\"return y\")\n ) {\n dateIdentified = false;\n }\n\n let arr;\n\n if (startPushing === true) {\n this.startPushingHelper(\n result,\n i,\n jsArr,\n mapIndex,\n forceEditValueContentArr\n );\n } else if (dateIdentified === true) {\n if (Object.values(result.data[i])[0].includes(\"y\")) {\n arr = Object.values(result.data[i])[0].split(\" \");\n prefix = arr[7];\n }\n // create array of the JS mapping file already selected date numbers\n if (Object.values(result.data[i])[0].includes(\"y\")) {\n arr = Object.values(result.data[i])[0].split(\" \");\n dateIdArr.push(arr[arr.length - 1].match(/[0-9]+/g)[0]);\n dateIdArr.push(\n Object.values(result.data[i])[1][0].match(/[0-9]+/g)[0]\n );\n } else {\n dateIdArr.push(\n Object.values(result.data[i])[0].match(/[0-9]+/g)[0]\n );\n dateIdArr.push(\n Object.values(result.data[i])[1][0].match(/[0-9]+/g)[0]\n );\n }\n }\n\n if (dateIdArr.length === 6) {\n // create a string of the date number array above\n // use that string to identify the finalStr to display automatically in the date dropdown\n\n let dateFormatStr = dateIdArr.join(\"\");\n switch (dateFormatStr) {\n case \"046242\":\n finalStr = \"YYYYMMDD\";\n break;\n case \"044262\":\n finalStr = \"YYYYDDMM\";\n break;\n case \"440222\":\n finalStr = \"DDMMYYYY\";\n break;\n case \"442202\":\n finalStr = \"MMDDYYYY\";\n break;\n case \"048252\":\n finalStr = \"YYYY/MM/DD\";\n break;\n case \"045282\":\n finalStr = \"YYYY/DD/MM\";\n break;\n case \"643202\":\n finalStr = \"MM/DD/YYYY\";\n break;\n case \"640232\":\n finalStr = \"DD/MM/YYYY\";\n break;\n case \"026232\":\n //prefix = this.props.centuryChosen.substr(0, 2)\n finalStr = \"YY/MM/DD or YY-MM-DD\";\n needsCenturyPrefix = true;\n break;\n case \"623202\":\n finalStr = \"MM/DD/YY or MM-DD-YY\";\n needsCenturyPrefix = true;\n //prefix = this.props.centuryChosen.substr(0, 2)\n break;\n case \"023262\":\n //prefix = this.props.centuryChosen.substr(0, 2)\n finalStr = \"MM/DD/YY or MM-DD-YY\";\n needsCenturyPrefix = true;\n break;\n case \"620232\":\n finalStr = \"DD/MM/YY or DD-MM-YY\";\n needsCenturyPrefix = true;\n //prefix = this.props.centuryChosen.substr(0, 2)\n break;\n default:\n }\n }\n\n if (needsCenturyPrefix === true) {\n const newValue = prefix + \"00\";\n const obj = {\n chosenCentury: newValue\n };\n\n this.props.century(obj);\n }\n\n let newJSArr = [];\n // any identical elements in jsArr, only append them once into newJSArr\n\n for (let i = 0; i < jsArr.length; i++) {\n if (!newJSArr.includes(jsArr[i])) {\n newJSArr.push(jsArr[i]);\n }\n }\n jsArr = newJSArr;\n }\n // call dateFormat\n const obj = {\n dateFormat: finalStr,\n hasTwoYs: needsCenturyPrefix\n };\n this.props.formatDate(obj);\n\n // more string cleaning\n // some of the cleaning in the code could be a little smoother with one regex, but some of the symbols we're a little more complicating so handled as strings\n for (let i = 0; i < jsArr.length; i++) {\n jsArr[i] = jsArr[i].replace(/(|\\r\\n|\\s|})/gm, \"\");\n jsArr[i] = jsArr[i].replace(\"}\", \"\");\n jsArr[i] = jsArr[i].replace(/\\\\/g, \"\");\n jsArr[i] = jsArr[i].replace(/\"/g, \"\");\n jsArr[i] = jsArr[i].replace(\" \", \"\");\n if (jsArr[i] !== \"\") {\n jsArr[i] = jsArr[i].split(\":\");\n jsArr[i][0] = jsArr[i][0].replace(\" \", \"\");\n if (jsArr[i][1] !== undefined)\n jsArr[i][1] = jsArr[i][1].replace(\" \", \"\");\n } else removeIndex.push(i);\n }\n // removes any empty strings as elements in the jsArr\n for (let i = 0; i < removeIndex.length; i++) {\n jsArr.splice(removeIndex[i], 1);\n }\n\n let addForceEditValues = jsArr;\n let forceEditValuesCount = 0;\n for (let i = 0; i < addForceEditValues.length; i++) {\n if (\n addForceEditValues[i][1] === \"<METADATA_ADD>\" ||\n addForceEditValues[i][1] === \"<METADATA>\"\n ) {\n addForceEditValues[i][1] =\n forceEditValueTitleArr[forceEditValuesCount];\n forceEditValuesCount++;\n }\n }\n\n this.setState({\n jsFile: addForceEditValues,\n includesJsFile: true,\n isJsFile: true,\n forceEditTitles: forceEditValueTitleArr,\n forceEditValues: forceEditValueContentArr\n });\n }\n\n // this is where we combine objects if there are multiple csv's for the purpose of being able to toggle through tuples of both files\n // we limit the number of toggles but the minimum size of the files (Ex: CSV1.length = 3 && CSV2.length = 10, then user can toggle through 3 times)\n var data = result;\n let finalToggleArray = [];\n let toggleArr = this.state.toggleValues;\n let minimum = Math.min(data.data.length, toggleArr.length);\n if (this.state.isJsFile === false) {\n if (\n toggleArr.length !== 0 &&\n (this.state.files[1] !== undefined || this.state.files[2] !== undefined)\n ) {\n if (minimum < 10) {\n for (let i = 0; i < minimum % 10; i++) {\n const finalObj = { ...toggleArr[i], ...data.data[i] };\n finalToggleArray.push(finalObj);\n }\n } else {\n for (let i = 0; i < (minimum % 10) + (10 - (minimum % 10)); i++) {\n const finalObj = { ...toggleArr[i], ...data.data[i] };\n finalToggleArray.push(finalObj);\n }\n }\n toggleArr = finalToggleArray;\n } else if (toggleArr.length === 0) {\n toggleArr = toggleArr.concat(data.data);\n }\n\n this.setState({\n toggleValues: toggleArr,\n totalFileSize:\n this.state.totalFileSize + Object.keys(data.data[0]).length,\n fieldNames: this.state.fieldNames.concat(Object.keys(data.data[0])),\n fieldValues: this.state.fieldValues.concat(Object.values(data.data[0]))\n });\n }\n\n let arr = [this.state.fieldNames, this.state.fieldValues];\n\n // we want to make sure that we have handled all CSV's and JS files before we use the callback function\n this.setState({ num: this.state.num + 1 });\n if (this.state.num === this.state.files.length - 1) {\n //change totalAddedCards to change how many entries of METADATA_ADD/missing field are in the store\n let totalAddedCards = 4;\n\n this.props.callbackFromParent(\n arr,\n this.state.totalFileSize,\n this.state.toggleValues,\n this.state.jsFile,\n totalAddedCards,\n this.state.forceEditTitles,\n this.state.forceEditValues\n );\n }\n\n // this function checks every file to see if it is a JS or CSV file, if JS certain parts of the code are ignored, if CSV the same applies\n this.setState({ isJsFile: false });\n }", "function parse_map_index(data, responseCode)\r\n{\r\n function __failed(msg) { MAP_INDEX_FAILED = true; /*alert(msg);*/ return false; }\r\n\r\n // check for valid response (code 0 is local files in gecko)\r\n if (!data || (responseCode != 200 && responseCode != 0)) {\r\n MAP_INDEX_FAILED = true;\r\n }\r\n else {\r\n available_maps = new Array();\r\n lines = data.split(\"\\n\");\r\n for(key in lines) \r\n {\r\n // if this line is a comment, ignore \r\n _map = lines[key].replace(/^\\s*|\\s*$/g,\"\");\r\n if (_map[0]==';') continue;\r\n // split into fields, format is:\r\n // map name|zoom level count|default zoom (0-max)|tile count x/y zoom 0|tile count x/y zoom 1|... \r\n _marr = _map.split('|');\r\n available_maps[_marr[0]] = new Array();\r\n available_maps[_marr[0]]['max-zoom'] = parseInt(_marr[1])-1;\r\n available_maps[_marr[0]]['default-zoom'] = parseInt(_marr[2]);\r\n available_maps[_marr[0]]['tile-counts'] = new Array();\r\n for(i=0;i<parseInt(_marr[1]);i++)\r\n {\r\n coords = _marr[i+3].split(';'); _x = coords[0]; _y = coords[1];\r\n // make sure we have valid data\r\n _x = parseInt(_x); _y = parseInt(_y);\r\n if (!_x | !_y) return __failed(\"failed to read tile count for zoom level \"+i+\" of map '\"+_marr[0]+\"'\");\r\n available_maps[_marr[0]]['tile-counts'][i] = new Array();\r\n available_maps[_marr[0]]['tile-counts'][i]['x'] = _x;\r\n available_maps[_marr[0]]['tile-counts'][i]['y'] = _y;\r\n }\r\n }\r\n // everything went fine\r\n MAP_INDEX_LOADED = true;\r\n }\r\n}", "ParseTheData(dataString) {\n\n // Try to read necessary metadata from the string\n const parseError = new Error('Error reading the data: Metadata not found.');\n let map = {\n width: null,\n height: null,\n noDataValue: null,\n elevationData: null\n }\n\n try {\n console.log('Reading metadata...');\n map.width = dataString.match(/(?<=^ncols\\s*)\\d+/);\n if (map.width === null) {\n throw parseError;\n }\n map.height = dataString.match(/(?<=nrows\\s*)\\d+/);\n if (map.height === null) {\n throw parseError;\n }\n map.noDataValue = dataString.match(/(?<=NODATA_value\\s*)-?\\d*\\.\\d+/);\n if (map.noDataValue === null) {\n throw parseError;\n }\n }\n catch (err) {\n console.error(err.message);\n return;\n }\n\n // Separate elevation data from metadata, only numbers should remain afterwards\n let findTheMatrixRegex = new RegExp('(?<=' + map.noDataValue.toString() + '\\\\s*)-?\\\\d+');\n let indexOfMatrix = dataString.search(findTheMatrixRegex);\n map.elevationData = dataString.slice(indexOfMatrix);\n console.log('Done.');\n\n // Turn into an array, check if array size matches metadata\n console.log('Converting to array...');\n map.elevationData = map.elevationData.replace(/\\r?\\n/g, \"\");\n map.elevationData = map.elevationData.split(\" \");\n console.log('Done.');\n\n if (map.elevationData.length !== map.height * map.width) {\n console.log('Error: Unexpected map size.');\n return;\n }\n\n // Convert to float, change NODATA values to NaN\n console.log('Converting to float...');\n map.elevationData = map.elevationData.map(parseFloat);\n\n map.noDataValue = parseFloat(map.noDataValue);\n map.elevationData.forEach((_item, index, arr) => {\n if (arr[index] === map.noDataValue) {\n arr[index] = NaN;\n }\n });\n\n console.log('Done.');\n\n // Pass parsed map to parent\n this.props.onMapLoad(map);\n }", "function joinData(italyRegions, wineData) {\n //loop through csv to assign each set of csv attribute values to geojson region\n for (var i=0; i<wineData.length; i++) {\n var csvRegion = wineData[i]; //current regions\n var csvKey = csvRegion.adm1_code; //the CSV primary key\n\n //loop through geojson regions to find correct region\n for (var a=0; a<italyRegions.length; a++) {\n\n var geojsonProps = italyRegions[a].properties; //the current region geojson properties\n var geojsonKey = geojsonProps.adm1_code; //the geojson primary csvKey\n\n //where primary keys match, transfer csv data to geojson properties objects\n if (geojsonKey == csvKey) {\n\n //assing all attributes and values\n attrArray.forEach(function(attr){\n var val = parseFloat(csvRegion[attr]); //get csv attribute value\n geojsonProps[attr] = val; //assign attribute and value to geojson properties\n });\n };\n };\n };\n console.log(italyRegions);\n\n return italyRegions;\n }", "function getMapData(data) {\n\n\tfor (var i = 0; i < data.length; i++) {\n loc[i] = data[i].loc;\n locX[i] = data[i].locx;\n locY[i] = data[i].locy;\n }\n\n//console.log(data[1]);\n}", "function Me(t, e, n) {\n for (var r = new Map, i = 0, o = t; i < o.length; i++) {\n var s = o[i], u = s.transform, a = n.data.field(s.field);\n r.set(s.field, fe(u, a, e));\n }\n return r;\n}", "function Mapping() {\n this.generatedLine = 0\n this.generatedColumn = 0\n this.source = null\n this.originalLine = null\n this.originalColumn = null\n this.name = null\n}", "map(mappedFields) {\n this.argv = {};\n for (let i in mappedFields) {\n let path = mappedFields[i].split('.');\n let p1 = path.shift(),\n targetObj;\n if (p1 == \"POST\")\n targetObj = this.configs.HTTPRequest.request.body;\n else if (p1 == \"PATCH\")\n targetObj = this.configs.HTTPRequest.request.body;\n else if (p1 == \"GET\")\n targetObj = this.configs.HTTPRequest.request.query;\n else if (p1 == \"PATH\")\n targetObj = this.configs.HTTPRequest.request.params;\n else if (p1 == \"DELETE\")\n targetObj = this.configs.HTTPRequest.request.body;\n else if (p1 == \"DATA\")\n targetObj = this.data;\n else if (p1 == \"ERROR\")\n targetObj = this.error;\n else if (p1 == \"MODEL\")\n targetObj = this.model;\n else if (p1 == \"USER\")\n targetObj = this.user;\n else\n continue;\n this.argv[i] = Utill.ArrayLib.resolvePath(targetObj, path);\n }\n return this;\n }", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}", "function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}" ]
[ "0.6129621", "0.59837294", "0.5661337", "0.5516505", "0.5446484", "0.5387967", "0.535542", "0.5287701", "0.52764606", "0.526623", "0.5242507", "0.5216665", "0.51901126", "0.51873523", "0.5151459", "0.5148634", "0.51045245", "0.51024413", "0.5098705", "0.5089407", "0.5089407", "0.50865364", "0.5043406", "0.503683", "0.5029958", "0.50242126", "0.5023448", "0.50153255", "0.50129855", "0.50068724", "0.50062644", "0.5004605", "0.49729934", "0.49664605", "0.49533904", "0.49533492", "0.4951756", "0.4942776", "0.4939564", "0.493723", "0.49371442", "0.49360797", "0.49346834", "0.49344558", "0.49221396", "0.491584", "0.49145162", "0.4906991", "0.49057782", "0.49022555", "0.4898924", "0.4898165", "0.48960364", "0.4886565", "0.48841473", "0.4870801", "0.48684272", "0.486651", "0.48626876", "0.48405805", "0.48328194", "0.48328185", "0.48274186", "0.4816635", "0.48161274", "0.48137957", "0.48091042", "0.47812822", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045", "0.47731045" ]
0.0
-1
This maps data from one input to many outputs using the input function to generate the collection
selectExpand(func){ var flow = new SelectExpandFlattenMethodFlow(func); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compute(data) {\n return data.map(d => {\n return {\n input: encode(d.input),\n output: d.output\n }\n });\n}", "map(getOutput) {\n const self = this;\n return new Seq(function* () {\n for (const element of self)\n yield getOutput(element);\n });\n }", "map(id, source) {}", "map(func) {\n this.data.forEach((rows, i) => rows.forEach((el, j) => this.data[i][j] = func(el, i, j)));\n return this;\n }", "function useMap(inputArr) {\n inputArr.map((obj) => {\n console.log(obj);\n });\n\n}", "function map(fn) {\n return function(rf) { // <- buildArray for example\n // Hmm, we don't have the information yet to run the functionality of map, lets return a function to provide an interface for this\n return function(result, item) { // look another reducing function\n return rf(result, fn(item))\n }\n }\n}", "function myMap(arr, fn) {\n const arrOutput = [];\n for(let i = 0; i < arr.length; i++) {\n arrOutput.push(fn(arr[i]));\n }\n return arrOutput;\n}", "map(fn) {\n return new Compose(this.$value.map(x => x.map(fn)));\n }", "function copyData(source, outFunctions) {\n var key, i, src, newData = { };\n \n for(i = 0; i < source.length; i++) {\n src = source[i];\n if( !src)\n throw GSP.createError(\"copyData() from undefined source!\");\n for(key in src) {\n copyDatum(newData, src, key, outFunctions);\n }\n }\n \n return newData; \n }", "function mapFunction () {\n\n\t//list of events that are relevant for the behaviour to be found\n\t//var eventArray = [\"mousewheel\"];//\"scroll\",mouseUpEvent,\"keydown\"];\n\n\t//we filter out the events we don't want to consider\n\t//if (eventArray.indexOf(this.event) > -1){\n\t\t/*\n\t\t * \"emit\" function takes two arguments: 1) the key on which to group the data, 2) data itself to group. Both of them can be objects ({this.id, this.userId},{this.time, this.value}) for example\n\t\t */\n\t\t//emit({sid:this.sid, sessionstartms:this.sessionstartms, url:this.url, urlSessionCounter:this.urlSessionCounter},\n\t\temit({sid:this.sid, url:this.url, urlSessionCounter:this.urlSessionCounter},\n\t\t\t\t{ \"episodeEvents\":\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tevent:this.event,\n\t\t\t\t\t\t\ttimestamp:this.timestamp,\n\t\t\t\t\t\t\ttimestampms:this.timestampms,\n\t\t\t\t\t\t\tsid:this.sid,\n\t\t\t\t\t\t\tip:this.ip,\n\t\t\t\t\t\t\turl:this.url,\n\t\t\t\t\t\t\tsessionstartms:this.sessionstartms,\n\t\t\t\t\t\t\tsessionstartparsed:this.sessionstartparsed,\n\t\t\t\t\t\t\tvisitCounter:this.visitCounter,\n\t\t\t\t\t\t\tvisitDuration:this.visitDuration,\n\n\t\t\t\t\t\t\tsdSessionCounter:this.sdSessionCounter,\n\t\t\t\t\t\t\tsdTimeSinceLastSession:this.sdTimeSinceLastSession,\n\t\t\t\t\t\t\turlSessionCounter:this.urlSessionCounter,\n\t\t\t\t\t\t\turlSinceLastSession:this.urlSinceLastSession,\n\t\t\t\t\t\t\turlEpisodeLength:this.urlEpisodeLength,\n\n\t\t\t\t\t\t\tepisodeUrlActivity: this.episodeUrlActivity,\n\t\t\t\t\t\t\tepisodeSdActivity: this.episodeSdActivity,\n\n\n\t\t\t\t\t\t\thtmlSize : this.htmlSize,\n\t\t\t\t\t\t\tresolution : this.resolution,\n\t\t\t\t\t\t\tsize : this.size,\n\t\t\t\t\t\t\tusableSize : this.usableSize,\n\n\t\t\t\t\t\t\tidleTime:this.idleTime,\n\t\t\t\t\t\t\tcalculatedActiveTime:this.calculatedActiveTime,\n\t\t\t\t\t\t\tidleTimeSoFar:this.idleTimeSoFar,\n\t\t\t\t\t\t\tsdCalculatedActiveTime:this.sdCalculatedActiveTime,\n\n\t\t\t\t\t\t\tusertimezoneoffset:this.usertimezoneoffset,\n\t\t\t\t\t\t\tmouseCoordinates:this.mouseCoordinates,\n\t\t\t\t\t\t\tnodeInfo:this.nodeInfo,\n\t\t\t\t\t\t\tcount:1\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t);\n\t//}\n}", "_map(inputStart, inputEnd, outputStart, outputEnd, input) {\n return outputStart + ((outputEnd - outputStart) / (inputEnd - inputStart)) * (input - inputStart);\n }", "function map(array, fn) {\n let mappedArray = [];\n array.forEach(element => {\n mappedArray.push(fn(element));\n });\n console.log(mappedArray);\n}", "map(f) { // Maps a function over this type (just like arrays)\n return f(this._value);\n }", "function map(value, func) {\n if (isArray(value)) {\n var result = clone(value);\n\n for (var i = 0; i < result.length; ++i) {\n result[i] = func(result[i], i, result);\n }\n\n return result;\n }\n\n return func(value);\n} //", "function mapValues(it, mapFunction) {\n\tresult = {};\n\tresult.__proto__ = it.__proto__;\n\tfor(var name in it) {\n\t\tif(it.hasOwnProperty(name)) {\n\t\t\t\tresult[name] = mapFunction(it[name]);\n\t\t}\n\t}\n\treturn result;\n}", "function map(list, fn) { // ⭐ Important function! ⭐\n let output = [];\n for (let i = 0, l = list.length; i < l; i += 1) {\n let mapped = fn(list[i]);\n output.push(mapped);\n }\n return output;\n}", "function formatDataForTableBuilding(data) {\n var collectionToAppend = data.results.map((valueSet, idx) => [formatDate(valueSet.date.local), valueSet.location, valueSet.parameter, valueSet.value, valueSet.unit ])\n\n //console.log(collectionToAppend);\n return collectionToAppend;\n}", "function my_map ( func, arg_list)\n{\n\t result = [];\n\t for(var i = 0; i < arg_list.length; i++ )\n\t {\n\n\t\t result.push( func( arg_list[i] ) )\n\t }\n\n\t return result;\n}", "function map(value, func) {\n if (isArray(value)) {\n var result = clone(value);\n for (var i = 0; i < result.length; ++i) {\n result[i] = func(result[i], i, result);\n }\n return result;\n }\n return func(value);\n}", "function map(value, func) {\n if (isArray(value)) {\n var result = clone(value);\n for (var i = 0; i < result.length; ++i) {\n result[i] = func(result[i], i, result);\n }\n return result;\n }\n return func(value);\n}", "function map(data, func){\n data = data.toString().split(\" \");\n console.log(\"in map\");\n // Promise is not necessary but I like promise\n return new Promise(function(resolve, reject) {\n\n var returnedVal = [];\n //I go through my aray of data and do a function func.\n for (var i = 0; i < data.length; i++) {\n func(data[i]).then(function(x){\n // I push the result of the function on my data to an array.\n returnedVal.push(x);\n });\n }\n // still the promise thingy.\n resolve(returnedVal);\n });\n }", "function map(list, func) {\n var result_list = new Array();\n for (var i = 0; i < list.length; i++) {\n result_list.push(func(list[i]));\n }\n return result_list;\n}", "function map(array, f){\n //create var for transformed array\n var transformed = [];\n //loop through the element\n each(array, function(element, index){\n //push the value from the parameter function (f) to transformed array\n transformed.push(f(element));\n });\n //return transformed array\n return transformed;\n}", "mutate(func) {\n this.weights_ih.map(func);\n this.weights_ho.map(func);\n this.bias_h.map(func);\n this.bias_o.map(func);\n }", "mutate(func) {\n this.weights_ih.map(func);\n this.weights_ho.map(func);\n this.bias_h.map(func);\n this.bias_o.map(func);\n }", "function myMap(value,cbf) {\n let sum =[];\n for (let i = 0; i <num.length; i++) {\n sum.push(cbf(value[i]));\n \n }\n\n return sum;\n}", "mutate(func) {\r\n this.weights_ih.map(func);\r\n this.weights_ho.map(func);\r\n this.bias_h.map(func);\r\n this.bias_o.map(func);\r\n }", "map(f) {\n\treturn f(this.value);\n }", "function mapInputsToValues(){\n return inputElements.map(element=>element.value);\n}", "outputs (_outputs) {\n for (let output in _outputs) {\n this.output(output, _outputs[output]);\n }\n }", "function gen_function_data(f,n,xmin,xmax) {\n\t let x = linspace(xmin,xmax,n) ;\n\t let y = x.map(v => f(v)) ;\n\t return make_d3_ready({x:x, y:y}) ;\n\t}", "function map(a,f){\r\n let b=[], i;\r\n for (i in a){\r\n b.push(f(a[i]));\r\n }\r\n return b;\r\n}", "getInputData() {\n var data = {};\n\n Object.keys(this.elements).forEach(key => {\n let content = this.elements[key];\n data[key] = {};\n\n // * If given section contains only one input dataset\n // * (contains only from & to keys)\n if (Object.keys(content).includes('from')) {\n \n let {from, to} = content;\n\n switch (key) {\n case 'datetime': {\n data[key].from = from.value;\n data[key].to = to.value;\n } break;\n }\n \n } else { // * Contains more datsets splited into own dicts\n Object.keys(content).forEach(section_key => {\n if (content != \"search-flights\") {\n\n data[key][section_key] = {};\n let element = content[section_key];\n\n switch (section_key) {\n\n case 'currency': {\n data[key][section_key].curr = (element.curr).value;\n } break;\n\n case 'price': {\n data[key][section_key].from = Number((element.from).value);\n data[key][section_key].to = Number((element.to).value);\n } break;\n\n case 'iata': {\n data[key][section_key].from = (element.from).value;\n data[key][section_key].to = (element.from).value;\n } break;\n\n // * Checkboxes\n case 'direct_flights': {\n data[key][section_key] = element.checked;\n } break;\n\n case 'lowest_price': {\n data[key][section_key] = element.checked;\n } break;\n\n case 'biggest_price': {\n data[key][section_key] = element.checked;\n } break;\n }\n }\n }); \n }\n });\n\n return data;\n }", "function map(words, instruction) {\n // console.log(words.forEach(instruction));\n var result = [];\n\n for (var i = 0; i < words.length; i++) {\n result.push(instruction(words[i]));\n }\n\n console.log(result);\n}", "call(inputs, kwargs) {\n return inputs;\n }", "function transformData_(data, options, transformFunc) {\r\n for (var i = 0; i < data.length; i++) {\r\n for (var j = 0; j < data[i].length; j++) {\r\n transformFunc(data, i, j, options);\r\n }\r\n }\r\n}", "function mapping(f) {\n return function () {\n var rest = toArray(arguments);\n return function (x) {\n return map(function (v) {\n return f.apply(undefined, rest.unshift(v));\n }, unit(x));\n };\n };\n}", "function myMap(arr, fn) {\n var tasksNo = arr.length;\n var resultArray = [];\n for (var i =0; i < tasksNo; i++){\n // resultArray.push(fn(arr[i]));\n resultArray[i] = fn(arr[i]);\n }\n return resultArray;\n}", "processData() {\n for (const item of this.unprocessedData) {\n this.addToData(buildOrInfer(item));\n }\n this.unprocessedData.clear();\n }", "mapFunction(functionDef) {\n const tfNodes = functionDef.nodeDef;\n const placeholders = [];\n const weights = [];\n let nodes = {};\n if (tfNodes != null) {\n nodes = tfNodes.reduce((map, node) => {\n map[node.name] = this.mapNode(node);\n if (node.op === 'Const') {\n weights.push(map[node.name]);\n }\n return map;\n }, {});\n }\n const inputs = [];\n const outputs = [];\n functionDef.signature.inputArg.forEach(arg => {\n const [nodeName,] = Object(_executors_utils__WEBPACK_IMPORTED_MODULE_3__[\"getNodeNameAndIndex\"])(arg.name);\n const node = {\n name: nodeName,\n op: 'Placeholder',\n inputs: [],\n inputNames: [],\n category: 'graph',\n inputParams: {},\n attrParams: { dtype: { value: parseDtypeParam(arg.type), type: 'dtype' } },\n children: []\n };\n node.signatureKey = arg.name;\n inputs.push(node);\n nodes[nodeName] = node;\n });\n const allNodes = Object.keys(nodes);\n allNodes.forEach(key => {\n const node = nodes[key];\n node.inputNames.forEach(name => {\n const [nodeName,] = Object(_executors_utils__WEBPACK_IMPORTED_MODULE_3__[\"getNodeNameAndIndex\"])(name);\n node.inputs.push(nodes[nodeName]);\n nodes[nodeName].children.push(node);\n });\n });\n const returnNodeMap = functionDef.ret;\n functionDef.signature.outputArg.forEach(output => {\n const [nodeName, index] = Object(_executors_utils__WEBPACK_IMPORTED_MODULE_3__[\"getNodeNameAndIndex\"])(returnNodeMap[output.name]);\n const node = nodes[nodeName];\n if (node != null) {\n node.defaultOutput = index;\n outputs.push(node);\n }\n });\n const signature = this.mapArgsToSignature(functionDef);\n return { nodes, inputs, outputs, weights, placeholders, signature };\n }", "map(predicate) {\n const tuples = this.toArray().map(([component, value]) => {\n const newValue = predicate(value, component);\n return [component.id.toString(), [component, newValue]];\n });\n return new ComponentMap(new Map(tuples));\n }", "getInputs( ugen ) {\n return ugen.inputs.map( gen.getInput ) \n }", "function map() {\n\n}", "function map(f, xs){\n var tmp = [];\n for (x in xs) tmp.push(f(xs[x]));\n return tmp;\n}", "function pipeline (input, fun1, fun2) {\n return fun2(fun1(input))\n}", "function map(collection, callback) {\n\t var result = predicates_1.isArray(collection) ? [] : {};\n\t exports.forEach(collection, function (item, i) { return result[i] = callback(item, i); });\n\t return result;\n\t}", "function map(collection, callback) {\n\t var result = predicates_1.isArray(collection) ? [] : {};\n\t exports.forEach(collection, function (item, i) { return result[i] = callback(item, i); });\n\t return result;\n\t}", "function map(func, array){\n var r = [];\n for (var i=0; i<array.length; i++){\n\t r.push(func(array[i]));\n }\n return r;\n }", "function map(arr, transformFct) {\n console.log(transformFct);\n}", "map(func) {\n // Apply a function to every element of the matrix\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.cols; j++) {\n let val = this.data[i][j];\n this.data[i][j] = func(val);\n }\n }\n }", "function map(list, func) {\n\tvar result = [];\n\tfor (var i = 0; i < list.length; ++i) {\n\t\tresult[i] = func(list[i])\n\t};\n\treturn result;\n}", "map(fn) {\n // console.log(iter.next())\n let array = [];\n for (let [key, val] of this) {\n array.push(key);\n }\n return array.map(fn);\n }", "function map(f,a) {\n var result = [] // Create a new Array\n for (let i in a){ result[i] = f(a[i]) }\n return result;\n}", "function map(list, func) {\n var result = [];\n for (var i = 0; i < list.length; i++) {\n result[i] = func(list[i]);\n }\n return result;\n}", "function map(arr, func){\n let mapped = []\n for(let i=0; i < arr.length; i++ ){\n mapped.push(func(arr[i]))\n }\n return mapped;\n}", "function map (collection, iteratee, callback) {\n\n}", "function map(arr, func)\n{\n\tvar resultSet = [];\n\tif (arr.length == 0) return resultSet;\n\tfor (var i = 0; i < arr.length; i++)\n\t{\n\t\tresultSet.push(func(arr[i], i, arr));\n\t}\n\treturn resultSet;\n}", "function mapcat(fun, coll) {\n return cat.apply(null, _.map(coll, fun));\n}", "function map(f, xs) {\n var tmp = []\n for (var i = 0; i < xs.length; i++) tmp.push(f(xs[i]))\n return tmp\n}", "function batmap(arr,mapFunc,otherArrsArray) {\n let narr = []\n otherArrsArray = transpose(otherArrsArray)\n for(var i=0;i<arr.length;i++){\n let value = arr[i]\n let func = mapFunc\n let oargs = otherArrsArray[i]\n let ele = func(value,...oargs)\n narr.push(ele)\n }\n return(narr)\n}", "static mapCollection(collection) {\n if (collection.empty) {\n return [];\n }\n\n const list = [];\n\n collection.forEach((document) => {\n const item = Object.assign({}, document.data(), {\n id: document.id,\n });\n\n this.replaceAllTimestampToDate(item);\n list.push(item);\n });\n\n return list;\n }", "function map(array, fnc){\n const myNewArray=[]; \n for (let i=0; i< array.length; i++){\n const newNumber = fnc (array[i]);\n myNewArray.push(newNumber)\n } \n return(myNewArray)\n }", "function maps(x){\n return x.map((n) => n * 2);\n}", "map(field_name, f){\n\t\treturn this.copy((new Map()).set(field_name, f(this.takeValue(field_name))));\n\t}", "function mapping() {\n connection.query(\"SELECT * FROM role\", function(error, res) {\n rolesList = res.map(role => ({name: role.title, value: role.id}));\n });\n\n connection.query(\"SELECT * FROM employee WHERE manager_id IS NULL\", function(error, res) {\n managersList = res.map(man => ({name: `${man.first_name} ${man.last_name}`, value: man.id}));\n });\n\n connection.query(\"SELECT * FROM department\", function(error, res) {\n departmentsList = res.map(dept => ({name: dept.name, value: dept.id}));\n });\n\n connection.query(\"SELECT * FROM employee\", function(error, res) {\n employeesList = res.map(emp => ({name: `${emp.first_name} ${emp.last_name}`, value: emp.id}));\n });\n\n connection.query(\"SELECT * FROM employee WHERE manager_id IS NOT NULL\", function(error, res) {\n notManagersList = res.map(notMan => ({name: `${notMan.first_name} ${notMan.last_name}`, value: notMan.id}));\n });\n}", "mapDefined(tryGetOutput) {\n const self = this;\n return new Seq(function* () {\n for (const element of self) {\n const output = tryGetOutput(element);\n if (option_1.exists(output))\n yield output;\n }\n });\n }", "massageData(data) {\n // Grab the unique list of counties from the dataset\n this.listOfCounties = [...new Set(data.map((x) => x.res_geo_short))].sort();\n\n // Group data by residential county\n const groupedData = this.groupBy(data, (item) => item.res_geo_short);\n\n // Convert necessary string to ints and add aggregate fields\n groupedData.forEach((county) => this.convertStrings(county));\n return groupedData;\n }", "function map(collection, callback) {\n\tvar arr = [];\n\teach(collection, function (x) {\n\t\tarr.push(callback(x));\n\t});\n\treturn arr;\n}", "function map (data, predicates) {\n assert.object(data);\n\n if (isFunction(predicates)) {\n return mapSimple(data, predicates);\n }\n\n assert.object(predicates);\n\n return mapComplex(data, predicates);\n }", "function map(collection, callback) {\n var result = predicates_1.isArray(collection) ? [] : {};\n exports.forEach(collection, function (item, i) { return result[i] = callback(item, i); });\n return result;\n}", "function map(collection, callback) {\n var result = predicates_1.isArray(collection) ? [] : {};\n exports.forEach(collection, function (item, i) { return result[i] = callback(item, i); });\n return result;\n}", "function mapForEach(arr, fn) {\n newArr = [];\n for (var i = 0; i < arr.length; i++) {\n newArr.push(fn(arr[i]));\n }\n return newArr;\n}", "function map(f) {\n return fa => map_(fa, f);\n}", "function mapUpon(func) {\n return function (array) {\n return array.map(bind(func, this));\n };\n }", "function dataHandling (input){\n var x = [];\n for(i = 0; i <= input.length; i++) {\n\t\tx[i] = [];\n for(j = 0; j < input.length; j++) {\n x[i][j] = input[j][i];\n }\n }\n return x;\n}", "function sc_map(proc, l1) {\n if (l1 === undefined)\n\treturn null;\n // else\n var nbApplyArgs = arguments.length - 1;\n var applyArgs = new Array(nbApplyArgs);\n var revres = null;\n while (l1 !== null) {\n\tfor (var i = 0; i < nbApplyArgs; i++) {\n\t applyArgs[i] = arguments[i + 1].car;\n\t arguments[i + 1] = arguments[i + 1].cdr;\n\t}\n\trevres = sc_cons(proc.apply(null, applyArgs), revres);\n }\n return sc_reverseAppendBang(revres, null);\n}", "function map(fn, array) {\n arr = array.slice();\n result = [];\n for (let i = 0; i < arr.length; i++) {\n const element = arr[i];\n result.push(fn(element));\n }\n return result;\n }", "function map(arr, func) {\n var newArr = [];\n for (i = 0; i < arr.length; i++) {\n newArr.push(func(arr[i]));\n }\n return newArr;\n}", "function map(arr, func) {\n let nwarr = []\n for (let ele of arr) {\n nwarr.push(func(ele))\n }\n return nwarr\n}", "function generateProductsMap(products){\n //TODO\n}", "function transform(numbers) {\n return numbers.map(function (num) {\n return function () { return num };\n });\n}", "static toMap(keyFunc){\n var groupFunc = keyFunc;\n if( !Util.isFunction(keyFunc) ) {\n groupFunc = function (input) {\n return input[keyFunc];\n };\n }\n\n return groupFunc;\n }", "function purchaseItem(...fns) => fns.reduce(compose)\n\n{} // & act over the data that we receive", "map(func) {\r\n if(typeof func != \"function\") {\r\n console.log(Matrix.wrong_type_error_message3());\r\n return null;\r\n }\r\n this.data = this.data.map(rows => rows.map(cols => func(cols)));\r\n }", "map(mapFn) {\n return map(mapFn, this);\n }", "map(mapFn) {\n return map(mapFn, this);\n }", "function map_list( list, for_func, if_func )\n {\n var mapped_list = [];\n for ( var i = 0; i < list.length; ++i )\n {\n var x = list[i];\n if( null == if_func || if_func( i, x ) ) \n mapped_list.push( for_func( i, x ) );\n }\n return mapped_list;\n }", "function visit(mapFun, resultFun, array) {\n if (Array.isArray(array))\n return resultFun(array.map(mapFun));\n else\n return resultFun(array);\n}", "function parseSamples2(mapping) {\n var every = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var type = (0, _util.typeString)(mapping),\n promises = [],\n baseUrl = '';\n\n if (typeof mapping.baseUrl === 'string') {\n baseUrl = mapping.baseUrl;\n delete mapping.baseUrl;\n }\n\n //console.log(mapping, baseUrl)\n\n every = typeof every === 'function' ? every : false;\n //console.log(type, mapping)\n if (type === 'object') {\n Object.keys(mapping).forEach(function (key) {\n // if(isNaN(key) === false){\n // key = parseInt(key, 10)\n // }\n var a = mapping[key];\n //console.log(key, a, typeString(a))\n if ((0, _util.typeString)(a) === 'array') {\n a.forEach(function (map) {\n //console.log(map)\n getPromises(promises, map, key, baseUrl, every);\n });\n } else {\n getPromises(promises, a, key, baseUrl, every);\n }\n });\n } else if (type === 'array') {\n var key = void 0;\n mapping.forEach(function (sample) {\n // key is deliberately undefined\n getPromises(promises, sample, key, baseUrl, every);\n });\n }\n\n return new Promise(function (resolve) {\n Promise.all(promises).then(function (values) {\n //console.log(type, values)\n if (type === 'object') {\n mapping = {};\n values.forEach(function (value) {\n // support for multi layered instruments\n var map = mapping[value.id];\n var type = (0, _util.typeString)(map);\n if (type !== 'undefined') {\n if (type === 'array') {\n map.push(value.buffer);\n } else {\n mapping[value.id] = [map, value.buffer];\n }\n } else {\n mapping[value.id] = value.buffer;\n }\n });\n //console.log(mapping)\n resolve(mapping);\n } else if (type === 'array') {\n resolve(values);\n }\n });\n });\n}", "function map(array,transform){\n let mapped = [];\n for(let element of array){\n mapped.push(transform(element));\n }\n return mapped;\n}", "function map(arr, func) {\n\t\tvar newArr = []; \n\t\tfor (var i in arr) {\n\t\t\tif (arr.hasOwnProperty(i)) {\n\t\t\t\tnewArr[i] = func(arr[i]);\n\t\t\t}\n\t\t}\n\t\treturn newArr;\n\t}", "function mapForEach(arr, fn) {\n\tvar newArr = [];\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tnewArr.push(\n\t\t\tfn(arr[i])\n\t\t)\n\t};\n\n\treturn newArr;\n}", "function multiple(ruleLookup, input, maxIterations) {\n let output = input;\n for (let i = 0; i < maxIterations; i++) {\n output = single(ruleLookup, output);\n }\n return output;\n}", "function _mapInToOut() {\n\t\tvar lvStatus;\n\t\t//Get the Request Body\n\t\tvar oBody = JSON.parse($.request.body.asString());\n\t\tvar oJournal;\n\t\tvar oJournalItems;\n\n\t\t//Get the Fields from Incoming Payload\n\t\tif (oBody.JOURNAL.constructor === Array) {\n\t\t\toJournal = oBody.JOURNAL[0];\n\t\t\toJournalItems = oBody.JOURNAL[0].JOURNAL_ENTRY;\n\t\t} else {\n\t\t\toJournal = oBody.JOURNAL;\n\t\t\toJournalItems = oBody.JOURNAL.JOURNAL_ENTRY;\n\t\t}\n\n\t\t//Map the Header Fields\n\t\t_mapHeader(oBody, oJournal, oJournalItems);\n\t\tif (gvExecution !== \"TEST\") {\n\t\t\t_saveHeader();\n\t\t}\n\n\t\t//Map the Item Fields\n\t\t_mapItem(oBody, oJournal, oJournalItems);\n\t\tif (gvExecution !== \"TEST\") {\n\t\t\t_saveItem();\n\t\t}\n\n\t\t//Map the Currency Fields\n\t\t_mapCurrency(oBody, oJournal, oJournalItems);\n\t\tif (gvExecution !== \"TEST\") {\n\t\t\t_saveCurrency();\n\t\t}\n\n\t\t//Build the Return Item\n\t\tvar lvItem,\n\t\t\tltItem = [];\n\n\t\tif (gtItem) {\n\t\t\t//Loop through Items\n\t\t\tfor (var i = 0; i < gtItem.length; i++) {\n\t\t\t\tlvItem = {\n\t\t\t\t\tItemNumber: \"\",\n\t\t\t\t\tGLAccount: gtItem[i].GL_ACCOUNT,\n\t\t\t\t\tItemText: gtItem[i].ITEM_TEXT,\n\t\t\t\t\tRefKey1: gtItem[i].REF_KEY_1,\n\t\t\t\t\tRefKey2: gtItem[i].REF_KEY_2,\n\t\t\t\t\tRefKey3: gtItem[i].REF_KEY_3,\n\t\t\t\t\tAccountType: gtItem[i].ACCT_TYPE,\n\t\t\t\t\tDocumentType: gtItem[i].DOC_TYPE,\n\t\t\t\t\tCompanyCode: gtItem[i].COMP_CODE,\n\t\t\t\t\tFiscalPeriod: gtItem[i].FIS_PERIOD,\n\t\t\t\t\tFiscalYear: gtItem[i].FISC_YEAR,\n\t\t\t\t\tPostingDate: gtItem[i].PSTNG_DATE,\n\t\t\t\t\tValueDate: gtItem[i].VALUE_DATE,\n\t\t\t\t\tCustomer: gtItem[i].CUSTOMER,\n\t\t\t\t\tVendorNo: gtItem[i].VENDOR_NO,\n\t\t\t\t\tAssignmentNumber: gtItem[i].ALLOC_NMBR,\n\t\t\t\t\tCostCenter: gtItem[i].COSTCENTER,\n\t\t\t\t\tActivityType: gtItem[i].ACTTYPE,\n\t\t\t\t\tProfitCenter: gtItem[i].PROFIT_CTR,\n\t\t\t\t\tProfitCenterPartner: gtItem[i].PART_PRCTR,\n\t\t\t\t\tTradingPartner: gtItem[i].TRADE_ID,\n\t\t\t\t\tTransactionType: gtItem[i].CS_TRANS_T\n\t\t\t\t};\n\n\t\t\t\tltItem.push(lvItem);\n\t\t\t}\n\t\t}\n\n\t\t//Build the Return Currency Items\n\t\tvar lvCurrency,\n\t\t\tltCurrency = [];\n\n\t\tif (gtCurrency) {\n\t\t\t//Loop through Items\n\t\t\tfor (var j = 0; j < gtCurrency.length; j++) {\n\n\t\t\t\tlvCurrency = {};\n\t\t\t\tif (gtCurrency[j].CURR_TYPE) {\n\t\t\t\t\tlvCurrency.CurrencyType = gtCurrency[j].CURR_TYPE;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].CURRENCY) {\n\t\t\t\t\tlvCurrency.CurrencyKey = gtCurrency[j].CURRENCY;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].CURRENCY_ISO) {\n\t\t\t\t\tlvCurrency.CurrencyIso = gtCurrency[j].CURRENCY_ISO;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].AMT_DOCCUR) {\n\t\t\t\t\tlvCurrency.Amount = gtCurrency[j].AMT_DOCCUR;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].EXCH_RAT) {\n\t\t\t\t\tlvCurrency.ExchangeRate = gtCurrency[j].EXCH_RATE;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].EXCH_RATE_V) {\n\t\t\t\t\tlvCurrency.IndirectExchangeRate = gtCurrency[j].EXCH_RATE_V;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].AMT_BASE) {\n\t\t\t\t\tlvCurrency.AmountBase = gtCurrency[j].AMT_BASE;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].DISC_BASE) {\n\t\t\t\t\tlvCurrency.DiscountBase = gtCurrency[j].DISC_BASE;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].DISC_AMT) {\n\t\t\t\t\tlvCurrency.DiscountAmt = gtCurrency[j].DISC_AMT;\n\t\t\t\t}\n\t\t\t\tif (gtCurrency[j].TAX_AMT) {\n\t\t\t\t\tlvCurrency.TaxAmount = gtCurrency[j].TAX_AMT;\n\t\t\t\t}\n\n\t\t\t\tltCurrency.push(lvCurrency);\n\t\t\t}\n\t\t}\n\n\t\t//Build Return Payload\n\t\tgvPayload = {\n\t\t\tHeaderText: gvHeader.HEADERTEXT,\n\t\t\tCompanyCode: gvHeader.COMP_CODE,\n\t\t\tDocumentDate: gvHeader.DOC_DATE,\n\t\t\tPostingDate: gvHeader.PSTNG_DATE,\n\t\t\tTranslationDate: gvHeader.TRANS_DATE,\n\t\t\tFiscalYear: gvHeader.FISC_YEAR,\n\t\t\tFiscalPeriod: gvHeader.FIS_PERIOD,\n\t\t\tDocumentType: gvHeader.DOC_TYPE,\n\t\t\tReferenceDocNo: gvHeader.REF_DOC_NO,\n\t\t\tReasonReversal: gvHeader.REASON_REV,\n\t\t\tReferenceDocNoLong: gvHeader.REF_DOC_NO_LONG,\n\t\t\tAccountingPrinciple: gvHeader.ACC_PRINCIPLE,\n\t\t\tBillingCategory: gvHeader.BILL_CATEGORY,\n\t\t\tPartialReversalInd: gvHeader.PARTIAL_REV,\n\t\t\tDocumentStatus: gvHeader.DOC_STATUS,\n\t\t\tToItem: ltItem,\n\t\t\tToCurrency: ltCurrency\n\t\t};\n\n\t\t$.response.status = 200;\n\t\t$.response.setBody(JSON.stringify(gvPayload));\n\t}", "function myMap(array, aFunction) {\n\tlet newArray = [];\n\tfor (let i=0; i < array.length; i++) {\n\t\tresult = anotherFn(array[i], i, array);\n\t\tnewArray.push(result);\n\t}\n\treturn newArray;\n}", "function map (arr, func) {\n var newArr = []\n for (var i = 0; i < arr.length; i++) {\n newArr.push(func(arr[i]));\n };\n console.log(newArr);\n return newArr;\n}", "map(callback) {\n const keys = this.keys.concat([]);\n const values = this.keys.map((key, i) => callback(key, this.values[i]));\n return new this.constructor(keys, values);\n }", "collectInput () {\n const abtest = {};\n\n // Collect generic attributes\n let fields = this.getFieldsForType('generic');\n fields.forEach(field => {\n abtest[field] = this.input[field].value;\n });\n\n // Collect type specific attributes\n fields = this.getFieldsForType(abtest.type);\n fields.forEach(field => {\n abtest[field] = this.input[`${abtest.type}_${field}`].value;\n });\n\n return abtest;\n }", "map(callback) {\r\n const mappedItems = new MyArray();\r\n this.forEach((item) => {\r\n mappedItems.push(callback(item))\r\n })\r\n return mappedItems;\r\n }", "function generateDataGetter(nameMap){\n return new Function('data', 'return {' +\n basis.object.iterate(nameMap, function(ownName, sourceName){\n ownName = ownName.replace(/\"/g, '\\\\\"');\n sourceName = sourceName.replace(/\"/g, '\\\\\"');\n return '\"' + ownName + '\": data[\"' + sourceName + '\"]';\n }) +\n '}');\n }", "static map(val, inputMin, inputMax, outputMin, outputMax) {\n return ((outputMax - outputMin) * ((val - inputMin) / (inputMax - inputMin))) + outputMin;\n }" ]
[ "0.5845911", "0.57997525", "0.5771829", "0.56820375", "0.559674", "0.5565334", "0.55287766", "0.5518632", "0.55140597", "0.5485255", "0.54753476", "0.5430437", "0.5368826", "0.5366108", "0.5351709", "0.53433114", "0.53322077", "0.5331424", "0.53075516", "0.53075516", "0.52963006", "0.5285546", "0.52827156", "0.5279319", "0.5252516", "0.52522844", "0.5236603", "0.52273935", "0.52265066", "0.5225058", "0.52234787", "0.5220377", "0.5201717", "0.5201642", "0.5186578", "0.5171961", "0.5164799", "0.51612926", "0.51457304", "0.51315546", "0.512945", "0.5128335", "0.511893", "0.511479", "0.5113372", "0.51005626", "0.51005626", "0.5100428", "0.50974643", "0.5094672", "0.50911105", "0.5085794", "0.5080528", "0.50770855", "0.50679225", "0.5066324", "0.5064891", "0.5053159", "0.50489074", "0.50464714", "0.5046237", "0.50159544", "0.5015864", "0.5014905", "0.5003402", "0.49987656", "0.4967893", "0.49676412", "0.49583095", "0.49573562", "0.49573562", "0.4947043", "0.4946808", "0.49468076", "0.49430576", "0.49430022", "0.49397975", "0.49271774", "0.49268907", "0.4922496", "0.4914009", "0.490765", "0.49061522", "0.49006382", "0.48983404", "0.48983404", "0.48960787", "0.4885243", "0.48818266", "0.48818007", "0.4873606", "0.48725054", "0.48667783", "0.48655418", "0.48534727", "0.48492458", "0.4842162", "0.48399308", "0.48363206", "0.48340747", "0.4827608" ]
0.0
-1
This does data filtering
where(func){ var flow = new WhereMethodFlow(func); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filteredData(ds){\n\t\treturn ds.filter(function(entry){\n\t\t\t\treturn (UniNameFilter === null || UniNameFilter === String(entry[\"VIEW_NAME\"]))\n\t\t\t\t\t&& (UOAFilter === null || UOAFilter === String(entry[\"Unit of assessment name\"])); // keep if no year filter or year filter set to year being read,\n\t\t\t})\n\t}", "function dataFilter() {\n let filteredArray = myData.slice();\n let filterWord = document.getElementById(\"filter\").value;\n\n // use a filter tool\n filteredArray = filterArray(filteredArray, filterWord);\n\n // re-using the sort by type, name rank tool\n\n let sortedNameArray = sortByName(filteredArray);\n //let sortedTypeArray = sortByType(filteredArray);\n //let sortedRankArray = sortByRank(filteredArray);\n\n // re-using the show data tool\n //showData(sortedNameArray, filteredDisplay);\n showData(sortedNameArray, document.getElementById('filteredDisplay'));\n // showData(sortedRankArray, filteredDisplay);\n}", "function filterfunction() {\n let filterdata = tableData;\n Object.entries(filters).forEach(([key, value]) => {\n filterdata = filterdata.filter(uSighting => uSighting[key] === value);\n });\n buildtable(filterdata);\n\n}", "function filterData(){\r\n // temporary variables\r\n var tempColl = [];\r\n var tempCat = [];\r\n // Fetching selected checkbox filter values for collection and categories\r\n $.each($(\"input[name='brands']:checked\"), function(){\r\n tempColl.push($(this).val());\r\n });\r\n\r\n $.each($(\"input[name='categories']:checked\"), function(){\r\n tempCat.push($(this).val());\r\n });\r\n // fetching selected filter value for color\r\n color = $(\"input[name='colors']:checked\").val();\r\n if (tempColl.length > 0) {\r\n coll = tempColl;\r\n }\r\n else{\r\n coll = \"All\";\r\n }\r\n if (tempCat.length > 0) {\r\n cat = tempCat;\r\n }\r\n else{\r\n cat = [\"All\"];\r\n }\r\n if (color == undefined) {\r\n color = [\"All\"];\r\n }\r\n // Fetch selected items only according to filter applied\r\n getItem(coll, cat, color, minprice, maxprice);\r\n }", "function filterData() {\r\n\tfilteredData = [];\r\n\t$.each(preloaded, function(index, currentObj){\r\n\t\tvar date = new Date(currentObj.startDate);\r\n\t\t// If date is within user-defined limits\r\n\t\tif (!(date >= minDate && date < maxDate)){\r\n\t\t\treturn true; // Continue\r\n\t\t};\r\n\t\t// If stopCode == -1\r\n\t\t/*console.log(currentObj.stopCode.substr(0, 2))\r\n\t\tif (currentObj.stopCode.substr(0, 2) !== '-1'){\r\n\t\t\treturn true; // Continue\r\n\t\t};*/\r\n\t\t// Check if in age\r\n\t\tvar age = getAge(currentObj.personNumber.substr(0, 8));\r\n\t\tif (!(age >= minAge && age <= maxAge)){\r\n\t\t\treturn true; // Continue\r\n\t\t}\r\n\t\t// Check if right sex\r\n\t\tif (currentSex != 'BOTH' && getSex(currentObj.personNumber) !== currentSex){\r\n\t\t\treturn true; // Continue\r\n\t\t}\r\n\t\t// Check if right KVACode\r\n\t\tif (KVACode != 'BOTH' && currentObj.startJob !== KVACode){\r\n\t\t\treturn true; // Continue\r\n\t\t}\r\n\t\t// TODO What is this?\r\n\t\tif ((outType !== 'All') && currentObj.stopCode.substr(0, 2) !== '-1'){\r\n\t\t\treturn true; // Continue\r\n\t\t}\r\n\t\tfilteredData.push(currentObj)\r\n\t});\r\n\r\n\tpersonLookup = {};\r\n\tfor (var i = 0; i < filteredData.length; i++) {\r\n\t\tpersonLookup[filteredData[i].personId] = i;\r\n\t}\r\n}", "function searchData(){\n var dd = dList\n var q = document.getElementById('filter').value;\n var data = dd.filter(function (thisData) {\n return thisData.name.toLowerCase().includes(q) ||\n thisData.rotation_period.includes(q) ||\n thisData.orbital_period.includes(q) || \n thisData.diameter.includes(q) || \n thisData.climate.includes(q) ||\n thisData.gravity.includes(q) || \n thisData.terrain.includes(q) || \n thisData.surface_water.includes (q) ||\n thisData.population.includes(q)\n });\n showData(data); // mengirim data ke function showData\n}", "function filterValues(data) \r\n{\r\n data = data.filter(isEligible);\r\n return data;\r\n}", "function filter() {\n \n}", "filtering(data, filters) { // eslint-disable-line\n /**\n * Inputs:\n * data: List of JSON objects to filter\n * example: data = [\n * {\n * name: 'Joe',\n * ...\n * },\n * ...\n * ]\n * filters: The filters to apply.\n * example: filters = [\n * {\n * name: 'SexualOrient',\n * type: FILTER_CATEGORICAL,\n * value: ['Bi', 'Het'], // Take OUT 'Bi', 'Het'\n * },\n * {\n * name: 'Alcohol',\n * type: FILTER_CONTINUOUS,\n * minVal: 1,\n * maxVal: 24,\n * },\n * {\n * name: 'Age',\n * type: FILTER_BUCKETED,\n * buckets: [\n * { minVal: null, maxVal: 20 },\n * { minVal: 20, maxVal: 30 },\n * { minVal: 30, maxVal: null },\n * ]\n * },\n * {\n * name: 'date',\n * type: FILTER_DATE,\n * startYear: 2000,\n * endYear: 2012,\n * },\n * ]\n */\n // Filter each data item\n return data.filter((elem) => {\n let show = true;\n\n filters.forEach((eachFilter) => {\n switch (eachFilter.type) {\n case FILTER_CATEGORICAL: {\n show = show && eachFilter.value.indexOf(elem[eachFilter.name]) === -1;\n break;\n }\n case FILTER_CONTINUOUS: {\n show = (show && elem[eachFilter.name] >= eachFilter.minVal &&\n elem[eachFilter.name] < eachFilter.maxVal);\n break;\n }\n case FILTER_BUCKETED: {\n show = (show && elem[eachFilter.name] >= eachFilter.minVal &&\n elem[eachFilter.name] < eachFilter.maxVal);\n break;\n }\n case FILTER_DATE: {\n const date = new Date(elem[eachFilter.name]);\n\n // Make sure it is a valid date\n show = !isNaN(date.valueOf());\n\n show = (show && date.getFullYear() >= eachFilter.startYear && date.getFullYear() < eachFilter.endYear);\n break;\n }\n default:\n }\n });\n return show;\n });\n }", "function filterData() {\n selectedData = dataByState.filter(function (d) {\n return selectedStates.indexOf(d.key) > -1\n })\n }", "function filterit(e)\n{\n var data = [];\n var sorted = [];\n var values = [];\n for (var i=0;i<e.byfieldid.length;i++) {\n if (e.byfieldid[i].length === 0) continue;\n sorted.push(i);\n values.push(e.byfieldid[i].toLowerCase());\n }\n\n if (sorted.length == 0) {\n filtered_data = null;\n sortit(last_sort);\n return;\n }\n\n var new_data = [], found;\n\n for (var row=0;row < raw_data.length;row++) {\n found = true;\n for(i=0;i<sorted.length;i++) {\n if (raw_data[row][sorted[i]] == null || raw_data[row][sorted[i]].toLowerCase().indexOf(values[i]) == -1) {\n found=false; i=sorted.length;\n }\n }\n if (found) {\n new_data.push(raw_data[row]);\n }\n }\n\n filtered_data = new_data;\n if (new_data.length == 0) {\n new_data[0] = [];\n for(i=0;i<raw_data[0].length;i++) new_data[0][i] = \"No Data Found\";\n }\n\n sortit(last_sort);\n}", "function filterData(data, startYear, endYear) {\n // Start with emptying filteredData\n var filteredData = [];\n\n // Create deep copy of data set into the function\n var deepCopy = JSON.parse(JSON.stringify(data));\n\n deepCopy.forEach(function(d) {\n // Delete unwanted key-value pairs\n delete d[\"Tsu Src\"];\n delete d[\"Vol\"];\n delete d[\"More Info\"];\n delete d[\"Period\"];\n delete d[\"First Motion\"];\n\n // Filter for criteria:\n // - Year of current record is within the range passed into this function\n // - Tsunami Event Validity = 4, meaning Definite Tsunami\n // - Doubtful Runup = \"n\", meaning runup entry was not doubtful\n if (((d[\"Year\"] >= startYear) && (d[\"Year\"] <= endYear)) &&\n (d[\"Tsunami Event Validity\"] == 4) &&\n (d[\"Doubtful Runup\"] == \"n\") &&\n (d[\"Maximum Water Height (m)\"] > 0)) {\n filteredData.push(d);\n } // end if\n }); // end forEach()\n\n return filteredData;\n} // end function filterData()", "function dataFilter() { \n\n // Select the date from the in put\n var date = inputField.property(\"value\");\n\n // Set temporary variable to be written over with reduced data\n tempData = tableData;\n\n // Condition to check date goes here, if DNE or empty then load normally\n if (date) { // This will check if there is a value that have been passed\n tempData = tempData.filter(ufoData => ufoData.datetime === date)\n }\n\n tableTalk(tempData);\n}", "function onFilter() {\r\n let filteredDataBuffer = _.cloneDeep(completeData)\r\n const selectedDatasourcesNames = _.map(selectedDatasources, (datasourceObj) => datasourceObj.value)\r\n const selectedCampaignsNames = _.map(selectedCampaigns, (campaignObj) => campaignObj.value)\r\n if (selectedDatasourcesNames && selectedDatasourcesNames.length) {\r\n filteredDataBuffer = _.filter(filteredDataBuffer, (dataObj) => {\r\n return _.includes(selectedDatasourcesNames, dataObj.Datasource)\r\n })\r\n }\r\n if (selectedCampaignsNames && selectedCampaignsNames.length) {\r\n filteredDataBuffer = _.filter(filteredDataBuffer, (dataObj) => {\r\n return _.includes(selectedCampaignsNames, dataObj.Campaign)\r\n })\r\n }\r\n setFilteredData(filteredDataBuffer)\r\n }", "function filter_data(){\n //console.log(sliderValues)\n new_data = []\n for(i =0; i < dataset_size; i++){\n filtered_out = false;\n for(let slider in sliderValues){\n min = parseFloat(sliderValues[slider][0])\n max = parseFloat(sliderValues[slider][1])\n attr = sliderIdToAttr[slider]\n val = parseFloat(data[i][attr])\n //console.log(val, min, max)\n if(val < min || val>max){\n //remove from screen if dataset doesnt meet any filter range\n filtered_out = true\n }\n }\n if (!filtered_out) {\n new_data.push(data[i])\n }\n }\n return new_data\n }", "function filterData( ) {\n let dataResult = [];\n if (currGlobal === \"Global Areas\") {\n dataResult = global_areas.filter( obj => (obj.devname === currDevel) );\n } else if (currGlobal.substr(0,20) === \"Top five countries -\") {\n const region = currGlobal.substring(21);\n dataResult = top5countries.filter( obj => (obj.areaname === region && obj.devname === currDevel) );\n } else if (currGlobal.substr(0,17) === \"Top ten countries\") {\n dataResult = top10countries.filter( obj => (obj.devname === currDevel) );\n }\n // Sort the dataset by value\n dataResult.sort( (a, b) => b.value - a.value);\n return dataResult;\n}", "function filter_data(data,gender_value,region_value,size_value,educ_value,age_value,occup_value){\n var gender_index = gender.indexOf(gender_value);\n var region_index = regions.indexOf(region_value);\n var size_index = size.indexOf(size_value);\n var educ_index = educ.indexOf(educ_value);\n var age_index = age.indexOf(age_value);\n var occup_index = occup.indexOf(occup_value);\n var filter_criteria = '{';\n\n if (gender_index > 0) {filter_criteria=filter_criteria+'\"GEN\":'+gender_index+',';}\n if (region_index > 0) {filter_criteria=filter_criteria+'\"REGION\":'+region_index+',';}\n if (size_index > 0) {filter_criteria=filter_criteria+'\"SIZE\":'+size_index+',';}\n if (educ_index > 0) {filter_criteria=filter_criteria+'\"EDUC\":'+educ_index+',';}\n if (age_index > 0) {filter_criteria=filter_criteria+'\"AGE\":'+age_index+',';}\n if (occup_index > 0) {filter_criteria=filter_criteria+'\"OCCUP\":'+occup_index+',';}\n\n filter_criteria=filter_criteria.substring(0,filter_criteria.length-1)+'}';\n if (filter_criteria.length==1){\n var filtered_data = data;\n }\n else{\n var a = JSON.parse(filter_criteria);\n var filtered_data = find_in_object(data,a);\n };\n return filtered_data;\n}", "function filterTable() {\n \n // 8. Set the filtered data to the tableData.\n var filterData = tableData\n \n // 9. Loop through all of the filters and keep any data that\n // matches the filter values\n Object.entries(dataFilter).forEach(([key, value])=>{\n filterData = filterData.filter(row => row[key] === value);\n })\n \n // 10. Finally, rebuild the table using the filtered data\n buildTable(filterData);\n }", "function filterFunction() {\n \n}", "function filterTable() {\n\n // Set the filteredData to the tableData\n filteredData = tableData\nconsole.log(filteredData, 'line 78')\n // Loop through all of the filters and keep any data that\n // matches the filter values\n Object.entries(filters).forEach(([key,value]) => {\n filteredData = filteredData.filter(row => row[key] === value);\n })\n\n // Finally, rebuild the table using the filtered Data\n buildTable(filteredData);\n}", "function getFilteredData() {\n\tvar dataSource = accidentList.aaData;\n\tvar filteringKeyword = $(\"#keywordInput\").val();\n\tvar filteredData = []; \n\tfor (var i in dataSource) {\n\t\tvar item = dataSource[i];\n\t\t// check date/hour range first\n//\t\tvar month = parseInt(item[0].split(\"-\")[1],10);\n\t\tvar month = parseInt(item[0].split(\"-\")[0],10);\n\t\tif (month < start_month || month > end_month) continue;\n\t\t\n\t\tvar hour = parseInt(item[1],10);\n\t\tif (hour < start_hour || hour > end_hour) continue;\n\t\t\n\t\t// check that accident type is toggled on\n\t\tif (toggleArray[item[3]] == false) continue;\n\n\t\t// check keyword filter\n\t\tif (filteringKeyword.trim() == \"\") { \n\t\t\tfilteredData.push(item);\n\t\t\tcontinue;\n\t\t}\n\t\tfor(var propertyIndex in item) {\n\t\t\tvar property = item[propertyIndex];\n\t\t\tif (property.toLowerCase().indexOf(filteringKeyword.toLowerCase()) != -1) {\n\t\t\t\tfilteredData.push(item);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn filteredData;\n}", "setFilterData(filters) {\n if (filters) {\n this.filterData = filters;\n }\n }", "function filterTable() {\n var filteredData = tableData\n // console.log(dateTimeEntry.property('value'))\n if (dateTimeEntry.property('value')) {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.datetime === dateTimeEntry.property('value'));\n }\n if (cityEntry.property('value')) {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.city === cityEntry.property('value').toLowerCase());\n }\n if (stateEntry.property('value')) {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.state === stateEntry.property('value').toLowerCase());\n }\n if (shapeEntry.property('value')) {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.shape === shapeEntry.property('value').toLowerCase());\n }\n // Filter on the country by determining which country has been selected by the country button. If neither 'us' nor 'ca' is selected, this filter will not run.\n if (country_button.text() === 'United States') {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.country === 'us')\n } else if (country_button.text() === 'Canada') {\n var filteredData = filteredData.filter(ufoSighting => ufoSighting.country === 'ca')\n }\n\n // Clear the DOM table from the previous state\n ufo_table.selectAll('tr').remove();\n\n // Clear the noData div \n d3.selectAll('#nodata').text('')\n\n // If the filteredData has a length of zero, print a message indicating as such\n if (filteredData.length === 0) {\n d3.selectAll('#nodata').text('Sorry, your filter returned no results. Please try again.')\n }\n // Repopulate the DOM table with the filtered data.\n filteredData.forEach((ufoSighting) => {\n\n var row = ufo_table.append('tr');\n Object.entries(ufoSighting).forEach(([key, value]) => {\n var cell = row.append('td');\n cell.text(value);\n }); \n }); \n}", "function formFilter(DATA,KEY,QUERY) {\n // check if search is empty\n if (QUERY == \"\") {\n var filteredData = DATA;\n }\n else {\n // else filter the specified value\n var filteredData = DATA.filter(doc => doc[KEY] == QUERY);\n console.log(filteredData);\n }\n console.log(\"function ran\");\n return filteredData;\n }", "function UFOFilter() {\n\t\t\n\t\t// Prevent Page from Refreshing\n\t\td3.event.preventDefault();\n\t\t\n\t\t// Select Input Element\n\t\tvar inputElement = d3.select(\"#datetime\");\n\t\t\n\t\t// Select Input Value\n\t\tvar inputValue = inputElement.property(\"value\");\n\t\t\tconsole.log(inputValue);\n\t\t\t\t\n\t\t// Filter based on Input Value\n\t\tvar filteredDates = tableData.filter(observee => observee.datetime === inputValue);\n\t\t\t\n\t\t\t// Log filtered dates in console to ensure code is working\n\t\t\tconsole.log(filteredDates);\n\t\t\n\t\t// Rebuild table using function in Task 1, but with filtered dates only\t\n\t\tUFOData(filteredDates);\n\t}", "function filterTable() {\n\n filteredData = tableData\n\n// Loop through all of the filters and keep any data that\n// matches the filter values\n Object.entries(filters).forEach(([key,value]) => {\n filteredData = filteredData.filter(x => x[key] === value)\n console.log(key,value)\n })\n\n// Finally, rebuild the table using the filtered data\n buildTable(filteredData)\n\n console.log(filteredData)\n}", "function tableFilter(tableList){\n mydicts = testFilter()\n\nconsole.log(mydicts)\n if(mydicts.date){ if ( filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.datetime==mydicts.date)}\n\n else{var filteredData = tableList.filter(ufo=> ufo.datetime==mydicts.date)\n\n }\n\n\n }\n if(mydicts.city){\n if ( filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.city==mydicts.city)}\n \n else{var filteredData = tableList.filter(ufo=> ufo.city==mydicts.city)\n \n }}\n\n if(mydicts.state){if ( filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.state==mydicts.state)}\n \n else{var filteredData = tableList.filter(ufo=> ufo.state==mydicts.state)\n \n }}\n \n if(mydicts.country){if ( filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.country==mydicts.country)}\n \n else{var filteredData = tableList.filter(ufo=> ufo.country==mydicts.country)\n \n }}\n\n if(mydicts.shape){if (filteredData){\n\n var filteredData = filteredData.filter(ufo=> ufo.shape==mydicts.shape)}\n \n else{var filteredData = tableList.filter(ufo=> ufo.shape==mydicts.shape)\n \n }}\n \n\nconsole.log(filteredData)\n\n return filteredData\n }", "function filterAll() {\n\t// filter by date\n\td3.event.preventDefault();\n\tconst dateInput = d3.select('#datetime');\n\tconst date = dateInput.property('value');\n\tlet table = tableData;\n\tif (date !== '') {\n\t\ttable = table.filter((row) => row.datetime === date);\n\t}\n\n\t// filter by state\n\tconst state = stateDropdown.node().value;\n\tif (state !== '') {\n\t\ttable = table.filter((row) => row.state === state);\n\t}\n\n\t// filter by shape\n\tconst shape = shapeDropdown.node().value;\n\tif (shape !== '') {\n\t\ttable = table.filter((row) => row.shape === shape);\n\t}\n\n\t// show filtered table\n\tshowTable(table);\n}", "_filterData(data) {\n // If there is a filter string, filter out data that does not contain it.\n // Each data object is converted to a string using the function defined by filterTermAccessor.\n // May be overridden for customization.\n this.filteredData =\n !this.filter ? data : data.filter(obj => this.filterPredicate(obj, this.filter));\n if (this.paginator) {\n this._updatePaginator(this.filteredData.length);\n }\n return this.filteredData;\n }", "function filterData() {\n \n // Prevent the page from refreshing\n d3.event.preventDefault();\n \n // Get filter input\n var dateFilter = d3.select(\"#datetime\").property(\"value\");\n\n // Filter tableData for selection\n var filteredData = tableData;\n if (dateFilter !== \"\") {\n var filteredData = filteredData.filter(sighting => sighting.datetime === dateFilter);\n };\n\n // remove existing table data\n d3.select(\"tbody\").remove();\n\n // add table body back\n table.append(\"tbody\");\n\n // reload table\n loadTable(filteredData);\n}", "function filterData (data, startdate, enddate)\r\n {\r\n\r\n _.forEach(data, function(value)\r\n {\r\n var filtered = filtering(value.database, startdate, enddate);\r\n _.forEach(filtered, function(value)\r\n {\r\n storeData.push({\r\n \"date\": parseDate.parse(value.date),\r\n \"literacy_rate\": value.val\r\n });\r\n });\r\n filterData(value.place,startdate,enddate);\r\n });\r\n }", "filter() {\n\t}", "filter() {\n\t}", "function filter(data,filtro,DataCalendar,citta) {\r\n\tvar filtered=[];\r\n\tif(citta==\"\") { \r\n\t\tfor (i=0; i<data.length; i++) {\r\n\t\t\tif(data[i].Grandezza==filtro && data[i].DataRilevazione == DataCalendar) {\r\n\t\t\t\tfiltered.push(data[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tfor (i=0; i<data.length; i++) {\r\n\t\t\tif(data[i].Grandezza==filtro && data[i].Stazione == citta) {\r\n\t\t\t\tfiltered.push(data[i]);\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\t\r\n\treturn filtered;\r\n}", "function filterTable() {\n \n // 8. Set the filtered data to the tableData.\n // Following 11.5.3 (2021), we'll do just that.\n // Similarly, we'll grab five separate values, including the datetime value, \n // in a manner similar to our code from 11.5.3 (2021).\n let date = d3.select(\"#datetime\").property(\"value\");\n let city = d3.select(\"#city\").property(\"value\");\n let state = d3.select(\"#country\").property(\"value\")\n let country = d3.select(\"#country\").property(\"value\")\n let shape = d3.select(\"#shape\").property(\"value\")\n let filteredData = tableData;\n \n // 9. Loop through all of the filters and keep any data that\n // matches the filter values\n // Continuing with our refactoring of 11.5.3 (2021) code, we'll specify if statements\n // for each distinct value\n if (date) {\n filteredData = filteredData.filter(row => row.datetime === date);\n }\n if (city) {\n filteredData = filteredData.filter(row => row.city === city)\n }\n if (state) {\n filteredData = filteredData.filter(row => row.state === state)\n }\n if (country) {\n filteredData = filteredData.filter(row => row.country === country)\n }\n if (shape) {\n filteredData = filteredData.filter(row => row.shape === shape)\n }\n\n // 10. Finally, rebuild the table using the filtered data\n buildTable(filteredData)\n }", "function getData(dataset) {\n filter_format=dataset;\n}", "function filterData() {\n\n // get date filter value\n var date = d3.select(\"#datetime\").property(\"value\");\n var country = d3.select(\"#country\").property(\"value\").toLowerCase();\n var city = d3.select(\"#city\").property(\"value\").toLowerCase();\n var state = d3.select(\"#state\").property(\"value\").toLowerCase();\n var shape = d3.select(\"#shape\").property(\"value\").toLowerCase();\n\n // initialize filteredData\n var filteredData = tableData;\n\n // check that date field is valid\n if (date) {\n // if the date is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.datetime == date);\n }\n // filter for country\n if (country) {\n // if the country is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.country == country);\n }\n // filter for state\n if (state) {\n // if the state is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.state == state);\n }\n // filter for city\n if (city) {\n // if the city is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.city == city);\n }\n // filter for shape\n if (shape) {\n // if the shape is a non-null / non-empty value, apply the filter\n filteredData = filteredData.filter(row => row.shape == shape);\n }\n\n\n // rebuild table\n buildTable(filteredData);\n}", "function filterTullkontor () {\n \t\tjq('#tullkontorList').DataTable().search(\n \t\tjq('#tullkontorList_filter').val()\n \t\t).draw();\n }", "function filteredData3(ds){\n\t\treturn ds.filter(function(entry){\n\t\t\t\treturn (UOA3Filter === null || UOA3Filter === String(entry[\"Unit of assessment name\"])); // keep if no year filter or year filter set to year being read,\n\t\t\t})\n\t}", "filterData(filter) {\r\n const scope = this,\r\n startDate = new Date(filter.dates.start),\r\n endDate = new Date(filter.dates.end),\r\n sTime = filter.time.start,\r\n eTime = filter.time.end;\r\n let filteredData = [], date, startTime, endTime;\r\n\r\n scope.tempData = [];\r\n startDate.setHours(0, 0, 0);\r\n endDate.setHours(23, 59, 59);\r\n\r\n sTime.meridian === \"AM\" ?\r\n (startTime = sTime.h * 60 + sTime.m) : (startTime = sTime.h * 60 + sTime.m + 720);\r\n eTime.meridian === \"AM\" ?\r\n (endTime = eTime.h * 60 + eTime.m) : (endTime = eTime.h * 60 + eTime.m + 720);\r\n\r\n scope.totalData.forEach(v => {\r\n date = new Date(v.interval_start);\r\n\r\n if(date.getTime() >= startDate.getTime() && endDate.getTime() >= date.getTime()){\r\n let selTime = date.getHours() * 60 + date.getMinutes();\r\n if(selTime >= startTime && endTime > selTime){\r\n filteredData.push(v)\r\n }\r\n }\r\n });\r\n\r\n for(let key = sTime.h; key <= (eTime.meridian === \"AM\" ? eTime.h : eTime.h + 12); key++){\r\n if(!(key === (eTime.meridian === \"AM\" ? eTime.h : eTime.h + 12) && eTime.m === 0))\r\n scope.tempData.push({time: key, occupancy: []})\r\n }\r\n\r\n return scope.hourlyData(filteredData)\r\n }", "function filterAll(item) {\n \n //Store the first 5 values of a data entry in dataTrue.\n var dataTrue = Object.values(item);\n dataTrue = dataTrue.slice(0,5);\n \n //Loop through dataInput and dataTrue, compare value at the same index.\n //Return false if there is an input but does not match the dataset.\n //Otherwise, do nothing until the for loop ends and return true.\n for (i=0; i<5; i++) {\n if (dataInput[i] === '' || dataInput[i] === dataTrue[i]) {\n }\n else {\n return false;\n }\n }\n return true;\n}", "function inputSearch(dataSet, filters) {\r\n const filterKeys = Object.keys(filters);\r\n //filter only elements passing all criteria\r\n return dataSet.filter((sighting) => {\r\n return filterKeys.every(key => {\r\n return filters[key].includes(sighting[key]);\r\n })\r\n })\r\n }", "function filterAllPets (){\n filterType = \"\";\n filterAgeMin = 0;\n filterAgeMax = Number.MAX_VALUE;\n loadTableWithFilters();\n}", "function filterTable() {\n \n // 8. Set the filtered data to the tableData.\n var filteredData = tableData;\n \n // 9. Loop through all of the filters and keep any data that\n // matches the filter values\n if (entryLengthDatetime > 0) {\n console.log(inputValueDatetime)\n var filteredData = data.filter(report => report.datetime === inputValueDatetime);\n }\n \n else if (entryLengthCity > 0) {\n var filteredData = data.filter(report => report.city === inputValueCity);\n }\n \n else if (entryLengthState > 0) {\n var filteredData = data.filter(report => report.state === inputValueState);\n }\n \n else if (entryLengthCountry > 0) {\n var filteredData = data.filter(report => report.country === inputValueCountry);\n }\n \n else if (entryLengthShape > 0) {\n var filteredData = data.filter(report => report.shape === inputValueShape);\n }\n\n console.log(filteredData);\n\n refresh(filteredData);\n \n // 10. Finally, rebuild the table using the filtered data\n filteredData.forEach((UFOReport) => {\n var row = tbody.append(\"tr\");\n Object.entries(UFOReport).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n }", "function filterAllData(array1, array2){\n\n $(\"#quickSearch select, #quickSideNavbar select\").each(function(){\n\n // filter for rent or for sale\n if($(this).val() === \"rent\"){\n filterData(array1, \"rent_buy\", \"rent\");\n filterData(array2, \"rent_buy\", \"rent\");\n }else if($(this).val() === \"buy\"){\n filterData(array1, \"rent_buy\", \"buy\");\n filterData(array2, \"rent_buy\", \"buy\");\n }\n \n //filter by property\n if ($(this).val() === \"apart\"){\n array1.forEach(function(item){\n $('#'+item.id).hide();\n });\n \n }else if ($(this).val() === \"house\"){\n array2.forEach(function(item){\n $('#'+item.id).hide();\n });\n }\n\n \n // Filter by structure\n for(var i = 0; i < room.length; i++){\n if($(this).val() === room[i]){\n filterData(array1, \"structure\", room[i]);\n filterData(array2, \"structure\", room[i]);\n\n }\n }\n\n // //filter by location\n for(var i = 0; i < loc.length; i++){\n if($(this).val() === loc[i]){\n filterData(array1, \"LocAtions\", loc[i]);\n filterData(array2, \"LocAtions\", loc[i]);\n }\n }\n \n // filter by equip\n if($(this).val() === \"equip_yes\"){\n filterData(array1, \"equip\", \"equip_yes\");\n filterData(array2, \"equip\", \"equip_yes\");\n }else if($(this).val() === \"equip_no\"){\n filterData(array1, \"equip\", \"equip_no\");\n filterData(array2, \"equip\", \"equip_no\");\n }\n \n }).change();\n\n }", "function handleSearchButtonClick() \n{\n var filterDateTime = $dateTimeInput.value.trim().toLowerCase(); \n var filterCity = $cityInput.value.trim().toLowerCase();\n var filterState = $stateInput.value.trim().toLowerCase();\n var filterCountry = $countryInput.value.trim().toLowerCase();\n var filterShape = $shapeInput.value.trim().toLowerCase();\n \n if (filterDateTime || filterCity || filterState || filterCountry || filterShape)\n {\n if (filterDateTime){ \n \n search_data = dataSet.filter (function(sighting) { \n var SightingDateTime = sighting.datetime.toLowerCase();\n return SightingDateTime === filterDateTime;\n });\n } else {search_data = dataSet}; \n \n if (filterCity){\n \n search_data = search_data.filter (function(sighting) {\n var SightingCity = sighting.city.toLowerCase();\n return SightingCity === filterCity;\n });\n } else {search_data = search_data}; \n\n if (filterState){\n search_data = search_data.filter (function(sighting) {\n var SightingState = sighting.state.toLowerCase();\n return SightingState === filterState;\n });\n } else {search_data = search_data}; \n\n if (filterCountry){\n search_data = search_data.filter (function(sighting) {\n var SightingCountry = sighting.country.toLowerCase();\n return SightingCountry === filterCountry;\n });\n } else {search_data = search_data}; \n\n if (filterShape){\n search_data = search_data.filter (function(sighting) {\n var SightingShape = sighting.shape.toLowerCase();\n return SightingShape === filterShape;\n });\n } else {search_data = search_data}; \n\n\n } else {\n // Show full dataset when the user does not enter any serch criteria\n search_data = dataSet; \n }\n $('#table').DataTable().destroy(); \n renderTable(search_data); \n pagination_UFO(); \n}", "handleChange(vis, element) {\n // if born in NV is checked, disable non-USA\n if (element.id === \"checkbox-NV\") {\n $(\"#checkbox-non-USA\").prop(\"checked\", false);\n }\n if (element.id === \"checkbox-non-USA\") {\n $(\"#checkbox-NV\").prop(\"checked\", false);\n }\n let tempFilteredData = vis.preProcessedData;\n vis.filters = [];\n let allCheckBoxes = $(\".v2-checkbox-input\");\n // get all the checked boxes\n allCheckBoxes.each(i => {\n if (allCheckBoxes[i].checked) {\n vis.filters.push(allCheckBoxes[i].id);\n }\n });\n // console.log(\"filtered boxes\", vis.filters);\n // filter for each box checked\n if (vis.filters.length == 0) {\n vis.filteredData = vis.preProcessedData;\n } else {\n // console.log(\"filtering on \",vis.filters );\n vis.filters.forEach(f => {\n let filter = v2CheckBoxGuide[f];\n if (filter) {\n // console.log(\"start time\", new Date(), \"filtered data length\", tempFilteredData.length);\n tempFilteredData = tempFilteredData.filter(d => {\n let result = vis.testCondition(d, filter);\n return result;\n });\n // console.log(\"end time\", new Date(), \"filtered data length\", tempFilteredData.length);\n }\n })\n }\n vis.filteredData = tempFilteredData;\n // console.log(\"filtered Data\", vis.filteredData.length, vis.filteredData);\n vis.wrangleData();\n }", "function filterData(tex) {\n const tempRests = rests.filter((itm) => itm.name.toLowerCase().includes(tex.toLowerCase()));\n setFilteredRests(tempRests);\n }", "function myFilter() {\n //created empty object\n var conditions = {};\n\n //set data to new variable\n var filterData = tableData;\n\n //got the value for the user input for date and pushed it to the empty object\n var date = d3.select('#datetime').property('value');\n if(date) {conditions.datetime = date;}\n\n //got the value for the user input for city and pushed it to the empty object\n var cityIn = d3.select('#city').property('value').toLowerCase();\n if(cityIn){conditions.city = cityIn;}\n\n //got the value for the user input for state and pushed it to the empty object\n var stateIn = d3.select('#state').property('value').toLowerCase();\n if(stateIn){conditions.state = stateIn}\n\n //got the value for the user input for country and pushed it to the empty object\n var countryIn = d3.select('#country').property('value').toLowerCase();\n if(countryIn) {conditions.country = countryIn}\n\n //got the value for the user input for shape and pushed it to the empty object\n var shapeIn = d3.select('#shape').property('value').toLowerCase();\n if(shapeIn) {conditions.shape = shapeIn}\n \n console.log(conditions); \n\n //itrated throught he conditions object to filter the dataset by each key and value\n Object.entries(conditions).forEach(([key, value]) => {\n console.log(key);\n console.log(value);\n filterData = filterData.filter(row => row[key] === value);\n console.log(filterData); \n });\n \n //called the function with the filtered data from the data.js file\n tableBuild(filterData);\n}", "function filterGlobal () {\n jq('#oppdragMainList').DataTable().search(\n \t\tjq('#oppdragMainList_filter').val()\n ).draw();\n }", "function filterData(data, animal) {\n\n\tvar animalData = data.filter(row => row.comm_name == animal);\n\tvar filteredData = animalData.map(function(d) {\n\t\treturn {\n\t\t\tcomm_name: d.comm_name,\n\t\t\tstart_date: d.start_date,\n\t\t\tlatitude: d.lat,\n\t\t\tlongitude: d.long,\n\t\t\ttotalcount: d.totalcount \n\t\t}\n\t});\n\n\treturn filteredData;\n}", "filter() {\n\n\n /** This is the representation of the fill column after the alt column filters have been applied to it. This data will be combined with the fillColFilterData when it is time to draw to the canvas.\n * @alias filteredAltColData\n * @memberof Pane\n * @instance\n */\n this.paneOb.filteredAltColData = this.paneOb.initialColData.map((e, i) => {\n let isNa = false\n for (let altfilter of this.altfilters) {\n if (altfilter.boolMask[i] == 0) {\n isNa = true\n break\n }\n }\n if (isNa) {\n return NaN\n } else {\n return e\n }\n })\n let e = new Event(\"filterChange\")\n // get the canvas element\n this.paneOb.paneDiv.querySelector(\"canvas\").dispatchEvent(e)\n\n // extract filter name information to use in the tooltip\n\n /** This is the active alternate column filter information used for the creation of tooltips. \n * @alias altFilterInfo\n * @memberof Pane\n * @instance\n */\n this.paneOb.altFilterInfo = \"\"\n for (let altfilter of this.altfilters) {\n //\n this.paneOb.altFilterInfo += JSON.stringify(altfilter.expInfo)\n }\n }", "function filter(filteredData) {\n // Remove existing table so filtered data shows at the top\n d3.selectAll(\"td\").remove();\n console.log(\"Search Results:\", filteredData);\n // Build the new table\n // Use D3 to select the table body\n var tbody = d3.select(\"tbody\");\n filteredData.forEach((filteredTable) => {\n //append one table row per sighting\n var row = tbody.append(\"tr\");\n Object.entries(filteredTable).forEach(([key, value]) => {\n var cell = tbody.append(\"td\");\n cell.text(value);\n });\n }); \n }", "function filterData(searchItem){\n //la funcion toma los items ingresados en los campos de sede y fecha para comparar\n //con el arreglo de la base de datos\n const filteredData = data.filter(student => {\n //devuelve el arreglo donde se encontro la sede y la fecha ingresadas\n return (student.branch === searchItem.branch && student.failAssist.includes(searchItem.failAssistDate));\n })\n //se guarda en el arreglo filtredData los campos filtrados para mostrarlos en la\n //tabla\n setData(filteredData);\n }", "filterDataByInputTextTag() {\n const activeTag = this.scopeObject.objModel.tag;\n const searchTerm = this.scopeObject.objModel.text;\n const endPoint = this.epProvider.getEndPointByName('searchTitle');\n\n if (activeTag === 'filtered') {\n const searchProm = this.httpObj.get(`${endPoint}?search=${searchTerm}`);\n searchProm.then(\n (response) => {\n this.scopeObject.allData = response.data;\n },\n (errorData) => {\n this.scopeObject.allData = []\n }\n );\n }\n }", "function filterTest(){\n\n var to = new Date();\n var from = new Date();\n from.setYear(2015);\n\n to = moment(to);\n from = moment(from);\n\n\n console.log(\"Date range:\");\n console.log(to.format('MMMM Do YYYY, h:mm:ss a') );\n console.log(from.format('MMMM Do YYYY, h:mm:ss a') );\n\n var humanFilter = filterDataModel(from, to, true, false, false, false, []);\n console.log(\"HUMAN FILTER \" + humanFilter.length);\n\n var trapFilter = filterDataModel(from, to, false, false, true, false, []);\n console.log(\"TRAP FILTER \" + trapFilter.length);\n\n var weaponFilter = filterDataModel(from, to, false, true, false, false, []);\n console.log(\"WEAPON FILTER: \" + weaponFilter.length);\n\n var animalFilter = filterDataModel(from, to, false, false, false, true, [\"lion\"]);\n console.log(\"ANIMAL FILTER: LION \" + animalFilter.length);\n\n var trapAnimalFilter = filterDataModel(from, to, false, false, true, true, [\"lion, rhino\"]);\n console.log(\"TRAP ANIMAL FILTER: LION, RHINO \" + trapAnimalFilter.length);\n\n}", "function ufoFiltering() {\n console.log(\"Event Fired\");\n d3.event.preventDefault();\n \n \n // Remove Table Body\n d3.select(\"tbody\").selectAll(\"tr\").remove();\n let ufoFilteredData = tableData.filter(dateFilter);\n\n\n// let ufoFilteredData = tableData.filter(function(dt){\n// console.log(dt.datetime);\n// return dt.datetime === inputSearchDateValue;});\n\n ufoFilteredData.forEach(ufoSighting => {\n var row = tableBody.append(\"tr\");\n row.append(\"td\").text(ufoSighting.datetime);\n row.append(\"td\").text(ufoSighting.city)\n row.append(\"td\").text(ufoSighting.state)\n row.append(\"td\").text(ufoSighting.country)\n row.append(\"td\").text(ufoSighting.shape)\n row.append(\"td\").text(ufoSighting.durationMinutes)\n row.append(\"td\").text(ufoSighting.comments) \n });\n}", "function joinedFilter() {\n \n let alfabeticvalue = orderlabel.innerHTML;\n let rolevalue = roleOrder.innerHTML;\n let dificultvalue = dificultlabel.innerHTML;\n\n let alfabeticlist = datos.sortAlfabeticaly(initialList, alfabeticvalue);\n\n let rolelist = datos.filterbyRole(alfabeticlist, rolevalue);\n \n let dificultList = datos.filterbyDificult(rolelist, dificultvalue);\n\n fillDashboard(dificultList);\n}", "function filterAttributes(data){\n let filtered_data = {};\n {conditionalFilter}\n return filtered_data;\n}", "function filterPublisher(Publisher) {\n publisherName = Publisher.options[Publisher.selectedIndex].value;\n if (publisherName == \"AllPublishers\") {\n // console.log(\"showing all\");\n return filteredData;\n }\n else {\n // console.log(\"filtering publishers\");\n var pubData = filteredData.filter(function(d){\n return d.publisher == publisherName;\n });\n return pubData;\n } \n}", "function handleSearchButtonClick() {\n \n filteredData = dataSet;\n // Format the user's search by removing leading and trailing whitespace, lowercase the string\n var filterDatetime = $dateInput.value.trim().toLowerCase();\n var filterCity = $cityInput.value.trim().toLowerCase();\n var filterState = $stateInput.value.trim().toLowerCase();\n var filterCountry = $countryInput.value.trim().toLowerCase();\n var filterShape = $shapeInput.value.trim().toLowerCase();\n\n // Set filteredAddresses to an array of all addresses whose \"state\" matches the filter\n filteredData = dataSet.filter(function(address) {\n var addressDatetime = address.datetime.toLowerCase();\n var addressCity = address.city.toLowerCase();\n var addressState = address.state.toLowerCase();\n var addressCountry = address.country.toLowerCase();\n var addressShape = address.shape.toLowerCase();\n\n\n\n if ((addressDatetime===filterDatetime || filterDatetime == \"\") && \n (addressCity === filterCity || filterCity == \"\") && \n (addressState === filterState || filterState == \"\") &&\n (addressCountry === filterCountry || filterCountry == \"\") && \n (addressShape === filterShape || filterShape ==\"\")){\n \n return true;\n }\n return false;\n console.log(filteredData);\n });\nloadList();\n}", "function filter() {\n var filtered = listings;\n\n var selected_cat = document.getElementById(\"filter-cats\").value;\n if (selected_cat != \"All Categories\") {\n $.post(\"count/cats/\", {\"name\": selected_cat});\n filtered = filtered.filter(function(d) {\n if (Array.isArray(d.cat)) {\n return d.cat.includes(selected_cat);\n } else {\n return d.cat == selected_cat;\n }\n });\n } \n \n var selected_genre = document.getElementById(\"filter-genres\").value;\n if (selected_genre != \"all\") {\n filtered = filtered.filter(function(d) {\n if (\"type\" in d && d.type != null) {\n if (selected_genre in d.type) {\n return d[\"type\"][selected_genre] == \"True\";\n } else {\n return false;\n }\n } else {\n return false;\n }\n });\n } \n draw(filtered);\n}", "function runFilter() {\n d3.event.preventDefault();\n var inputField = d3.select(\"#datetime\");\n var inputValue = inputField.property(\"value\");\n var filterByDate = tableData.filter(rowData => rowData.datetime === inputValue);\n tbody.html(\"\")\n filterByDate.forEach(sighting => {\n var row = tbody.append(\"tr\");\n Object.values(sighting).forEach(value => {\n row.append(\"td\").text(value);\n });\n });\n}", "function filterData() {\n // Remove all table rows from tbody (update table)\n var table = d3.select(\"tbody\").selectAll(\"tr\").remove();\n\n\n // Select the input element and get the raw HTML node\n var newText = d3.event.target.value;\n console.log(`Event value: ${newText}`)\n // Define a selector to identify which id was triggered\n var inputSelector = d3.event.target.id;\n console.log(`Event id: ${inputSelector}`)\n\n // selectFieldChange(inputSelector, 'datetime', newText)\n\n\n // Conditional tests based on the selector id to build the filter object\n if (inputSelector == 'datetime' & newText == '') {\n delete filter.datetime;\n console.log('datetime: AAA');\n } else if (inputSelector == 'datetime') {\n filter.datetime = newText;\n oldDateText = newText;\n console.log('datetime: BBB');\n } else if (inputSelector != 'datetime' & oldDateText == '') {\n filter.datetime = oldDateText;\n delete filter.datetime;\n console.log('datetime CCC');\n };\n\n if (inputSelector == 'city' & newText == '') {\n delete filter.city;\n console.log(`${inputSelector}: AAA`);\n } else if (inputSelector == 'city') {\n filter.city = newText;\n oldCityText = newText;\n console.log(`${inputSelector}: BBB`);\n } else if (inputSelector != 'city' & oldCityText == '') {\n filter.city = oldCityText;\n delete filter.city;\n console.log(`${inputSelector}: CCC`);\n };\n\n if (inputSelector == 'state' & newText == '') {\n delete filter.state;\n console.log(`${inputSelector}: AAA`);\n } else if (inputSelector == 'state') {\n filter.state = newText;\n oldStateText = newText;\n console.log(`${inputSelector}: BBB`);\n } else if (inputSelector != 'state' & oldCityText == '') {\n filter.state = oldStateText;\n delete filter.state;\n console.log(`${inputSelector}: CCC`);\n };\n\n if (inputSelector == 'country' & newText == '') {\n delete filter.country;\n console.log(`${inputSelector}: AAA`);\n } else if (inputSelector == 'country') {\n filter.country = newText;\n oldCountryText = newText;\n console.log(`${inputSelector}: BBB`);\n } else if (inputSelector != 'state' & oldCountryText == '') {\n filter.country = oldCountryText;\n delete filter.country;\n console.log(`${inputSelector}: CCC`);\n };\n\n if (inputSelector == 'shape' & newText == '') {\n // var escapeTest = + 1;\n delete filter.shape;\n console.log(`${inputSelector}: AAA`);\n } else if (inputSelector == 'shape') {\n filter.shape = newText;\n oldShapeText = newText;\n console.log(`${inputSelector}: BBB`);\n } else if (inputSelector != 'shape' & oldShapeText == '') {\n filter.shape = oldShapeText;\n delete filter.shape;\n console.log(`${inputSelector}: CCC`);\n };\n console.log(filter)\n\n // Conditional test to filter the data or load the whole table\n\n if (filter.length == 0) {\n // If the filter object is empty then load the table with origina/ulfitered data\n updateTable(ufos, tbody);\n } else {\n // Filter data based on the filter object\n var results = data.filter(item => {\n for (let key in filter) {\n if (item[key] === undefined || item[key] != filter[key])\n return false;\n }\n return true;\n });\n // Load table with filtered data\n updateTable(results, tbody);\n };\n}", "function filter(data) {\n return data\n .filter((trip) => {\n return (\n trip.tripduration < 6000 &&\n !isNaN(\n trip.startStationMetadata &&\n trip.startStationMetadata.percentResidential\n ) &&\n !isNaN(\n trip.endStationMetadata && trip.endStationMetadata.percentResidential\n ) &&\n !isNaN(trip.startStationMetadata.CanopyPercent) &&\n +trip[\"birth year\"] !== 2019 - 50\n );\n })\n .map((trip) => {\n const riderAge = 2019 - +trip[\"birth year\"];\n return [\n +trip.tripduration,\n new Date(trip.starttime).getTime(),\n +trip[\"start station id\"],\n +trip[\"end station id\"],\n trip.usertype === \"Subscriber\" ? 1 : 0,\n riderAge,\n +trip.gender,\n +trip.weather.AvgWind,\n +trip.weather.Precip,\n +trip.weather.TempAvg,\n +Math.floor(+trip.startStationMetadata.CanopyPercent * 100) / 100,\n +Math.floor(+trip.startStationMetadata.percentResidential * 100) / 100,\n +Math.floor(+trip.startStationMetadata.percentCommercial * 100) / 100,\n +Math.floor(+trip.startStationMetadata.percentIndustrial * 100) / 100,\n ];\n });\n}", "function shelf_filter(values) {\n // if filters not set, set defaults outside of range\n if (!values[\"Calories\"]) {\n values[\"Calories\"] = new Object();\n values[\"Calories\"][\"min\"] = -1;\n values[\"Calories\"][\"max\"] = 99999;\n }\n if (!values[\"Protein (g)\"]) {\n values[\"Protein (g)\"] = new Object();\n values[\"Protein (g)\"][\"min\"] = -1;\n values[\"Protein (g)\"][\"max\"] = 99999;\n }\n if (!values[\"Fat (g)\"]) {\n values[\"Fat (g)\"] = new Object();\n values[\"Fat (g)\"][\"min\"] = -1;\n values[\"Fat (g)\"][\"max\"] = 99999;\n }\n if (!values[\"Sodium (mg)\"]) {\n values[\"Sodium (mg)\"] = new Object();\n values[\"Sodium (mg)\"][\"min\"] = -1;\n values[\"Sodium (mg)\"][\"max\"] = 99999;\n }\n if (!values[\"Fiber (g)\"]) {\n values[\"Fiber (g)\"] = new Object();\n values[\"Fiber (g)\"][\"min\"] = -1;\n values[\"Fiber (g)\"][\"max\"] = 99999;\n }\n if (!values[\"Carbohydrates (g)\"]) {\n values[\"Carbohydrates (g)\"] = new Object();\n values[\"Carbohydrates (g)\"][\"min\"] = -1;\n values[\"Carbohydrates (g)\"][\"max\"] = 99999;\n }\n if (!values[\"Sugars (g)\"]) {\n values[\"Sugars (g)\"] = new Object();\n values[\"Sugars (g)\"][\"min\"] = -1;\n values[\"Sugars (g)\"][\"max\"] = 99999;\n }\n\n d3.csv(\"cereal.csv\", function(csv){\n for (var i=0; i<csv.length; i++) {\n // show cereals within filters\n if (\n ((csv[i][\"Calories\"] >= values[\"Calories\"][\"min\"]) && (csv[i][\"Calories\"] <= values[\"Calories\"][\"max\"])) &&\n ((csv[i][\"Protein (g)\"] >= values[\"Protein (g)\"][\"min\"]) && (csv[i][\"Protein (g)\"] <= values[\"Protein (g)\"][\"max\"])) &&\n ((csv[i][\"Fat (g)\"] >= values[\"Fat (g)\"][\"min\"]) && (csv[i][\"Fat (g)\"] <= values[\"Fat (g)\"][\"max\"])) &&\n ((csv[i][\"Sodium (mg)\"] >= values[\"Sodium (mg)\"][\"min\"]) && (csv[i][\"Sodium (mg)\"] <= values[\"Sodium (mg)\"][\"max\"])) &&\n ((csv[i][\"Fiber (g)\"] >= values[\"Fiber (g)\"][\"min\"]) && (csv[i][\"Fiber (g)\"] <= values[\"Fiber (g)\"][\"max\"])) &&\n ((csv[i][\"Carbohydrates (g)\"] >= values[\"Carbohydrates (g)\"][\"min\"]) && (csv[i][\"Carbohydrates (g)\"] <= values[\"Carbohydrates (g)\"][\"max\"])) &&\n ((csv[i][\"Sugars (g)\"] >= values[\"Sugars (g)\"][\"min\"]) && (csv[i][\"Sugars (g)\"] <= values[\"Sugars (g)\"][\"max\"]))\n ) {\n $('#'+csv[i].name).show();\n } else { // hide the rest\n $('#'+csv[i].name).hide();\n }\n }\n });\n}", "function filterData(startYear, endYear){\n console.log(\"inside filterData\" + startYear + endYear );\n var fDataset;\n\n // filter by years\n fDataset=dataset.filter(function(d){return d.year>=startYear && d.year<=endYear});\n //ready to draw circles\n drawVis(fDataset);\n \n}", "function categoryFilter() {\n let selected = [];\n\n $('#categoryChecks input:checked').each(function () {\n selected.push($(this).attr('value'));\n });\n\n let searchRegex = selected.join(\"|\");\n datatable.search(searchRegex, true, false).draw();\n sumTableData();\n}", "function filterRegion() {\n filteredData.forEach(function(d){\n if (document.querySelector('#jpnToggle').checked == false) {\n d.salesJPN = 0;\n }\n else {\n d.salesJPN = parseFloat(d.JP_Sales) * 1000000;\n }\n if (document.querySelector('#naToggle').checked == false) {\n d.salesNA = 0;\n }\n else {\n d.salesNA = parseFloat(d.NA_Sales) * 1000000;\n }\n if (document.querySelector('#euToggle').checked == false) {\n d.salesEU = 0;\n }\n else {\n d.salesEU = parseFloat(d.EU_Sales) * 1000000;\n }\n if (document.querySelector('#otherToggle').checked == false) {\n d.salesOther = 0;\n }\n else {\n d.salesOther = parseFloat(d.Other_Sales) * 1000000;\n }\n d.salesTotal = parseInt(d.salesJPN) + parseInt(d.salesNA) + parseInt(d.salesEU) + parseInt(d.salesOther);\n });\n}", "function filterData(filters, year) {\n\t$('.details-box').html('Select a player to view details');\n\tvar nest = d3.nest()\n\t\t.key(function(d) { return d[\"key\"]; })\n\t\t.entries(filters);\n map_filtered =[];\n line_filtered =[];\n \tfor(i=0;i<data.length;i++) {\n \t\tvar season = parseFloat(data[i][\"Season\"].split(\"-\")[2]);\n \t\tvar dob = parseFloat(data[i][\"DOB\"].split(\"-\")[2]);\n \t\tvar age = 2015 - dob;\n\t\tvar map_match = 0;\n\t\tvar line_match = 0;\n\t\tvar count = 0;\n \t\tfor(filter_array in nest) {\n \t\t\t// console.log(nest[array][\"values\"]);\n \t\t\tsubarray = nest[filter_array][\"values\"];\n \t\t\tvar map_val = false;\n \t\t\tvar line_val = false;\n \t\t\t$(subarray).each(function(index, filter) {\n \t\t\t\tif(data[i][filter[\"key\"]] == filter[\"val\"] || filter[\"key\"] == \"Age\" && age == filter[\"val\"]) {\n \t\t\t\t\t// console.log('match! - ' + filter[\"val\"] + \" = \" + data[i][filter[\"key\"]]);\n \t\t\t\t\tmap_val = true;\n \t\t\t\t\tline_val = true;\n \t\t\t\t} else if(filter[\"key\"] == \"Season\" && (season > year || year==2015)) {\n \t\t\t\t\t// console.log('match (LINE ONLY)! - ' + filter[\"val\"] + \" = \" + data[i][filter[\"key\"]]);\n \t\t\t\t\tline_val = true;\n \t\t\t\t} else {\n \t\t\t\t\t// console.log('no match :( - ' + filter[\"val\"] + \" != \" + data[i][filter[\"key\"]]);\n \t\t\t\t}\n \t\t\t});\n \t\t\tcount++;\n \t\t\tif(map_val == true) map_match++;\n \t\t\tif(line_val == true) line_match++;\n \t\t\t// console.log(map_val);\n \t\t\t// console.log(map_match);\n \t\t\t// console.log(line_val);\n \t\t\t// console.log(line_match);\n \t\t\t// console.log(count);\n\t\t}\n\t\tif(line_match == count) line_filtered.push(data[i]);\t\n\t\tif(map_match == count) map_filtered.push(data[i]);\t\n\t\t// show detail box if filter returns only one player\n\t}\n\tif(map_filtered.length == 1) populateDetailBox(map_filtered[0]);\n\n\t// final filter of data\n\tfinal_line_data = [];\n\tvar data_for_linechart = d3.nest()\n\t\t.key(function(d) {return d.Name;})\n\t\t.entries(line_filtered);\n\t\tdata_for_linechart.forEach(function(d) { \n\t\t\tfor(i=0;i<d.values.length;i++) {\n\t\t\t\tif(parseFloat(d.values[i].Season.split(\"-\")[2]) == year) {\n\t\t\t\t\tfinal_line_data.push(d);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif(final_line_data.length != 0) {\n\t\t\t// send filtered_data array to MAP\n\t\t \t__gl.tower.broardcast(\"filter_any\", map_filtered);\n\t\t \t// show div and send filtered data to LINE CHART\n\t\t \t$('.no-data').remove();\n\t\t\t$('#canvas').show();\n\t\t\tvisualizeLineChart(line_filtered, final_line_data);\n\t\t} else {\n\t\t\t$('#canvas').hide();\n\t\t \t$('.no-data').remove();\n\t\t\t$('.main-page').append(\"<div class='no-data' style='width:2000px; padding-top:300px; text-align:center'>No data here for this year and these filters.</div>\");\n\t\t}\n \t// console.log('checking filtering counts........');\n \t// console.log(map_filtered);\n \t// console.log(final_line_data);\n\n}", "function filterDataMap( ) {\n let dataResult = [];\n if (currGlobal === \"Global Areas\") {\n dataResult = global_areas.filter( obj => (obj.devname === currDevel && obj.year == currYear) );\n } else if (currGlobal.substr(0,20) === \"Top five countries -\") {\n const region = currGlobal.substring(21);\n dataResult = top5countries.filter( obj => (obj.areaname === region && obj.devname === currDevel && obj.year == currYear) );\n } else if (currGlobal.substr(0,17) === \"Top ten countries\") {\n dataResult = top10countries.filter( obj => (obj.devname === currDevel && obj.year == currYear) );\n }\n // Sort the dataset by value\n dataResult.sort( (a, b) => b.value - a.value);\n return dataResult;\n}", "function filterObject(filter, type, data) { \n filter = _.filter(filter, function(item) {\n return (item !== false) ? item : false;\n }); \n if (filter.length < 1) { return data }\n return _.filter(data, function(item) {\n var boo = false;\n for(var i in filter) { \n if(_.contains(item[type], filter[i])) {\n boo = true;\n } else {\n boo = false;\n break; \n } \n }\n return (boo === true) ? item : false; \n }); \n }", "function getFilteredData(data, inputValue) {\n // filters the metadata based on the id from the dropdown\n var filteredData = data.metadata.filter(function (individual) {\n return individual.id == parseInt(inputValue); // there is an id that is an integer and one is a string\n });\n console.log(filteredData);\n return filteredData;\n}", "function filter_by(data, parameter) {\n //Make sure parameter is not empty\n if (eval(parameter) != 0 & eval(parameter) != null) {\n var data = $.grep(data, function (e) {\n return e[parameter] === eval(parameter)\n });\n\n }\n return data;\n }", "function filterTable() {\n // Prevent the page from refreshing\n d3.event.preventDefault();\n\n var rowfilter = [];\n\n // Select the input element and get the raw HTML node\n var dateElement = d3.select(\"#datetime\");\n var dateValue = dateElement.property(\"value\").trim();\n\n var cityElement = d3.select(\"#city\");\n var cityValue = cityElement.property(\"value\").toLowerCase().trim();\n\n var stateElement = d3.select(\"#state\");\n var stateValue = stateElement.property(\"value\").toLowerCase().trim();\n\n var countryElement = d3.select(\"#country\");\n var countryValue = countryElement.property(\"value\").toLowerCase().trim();\n\n var shapeElement = d3.select(\"#shape\");\n var shapeValue = shapeElement.property(\"value\").toLowerCase().trim();\n\n if (dateValue)\n {rowFilter = tableData.filter(dtRow => (dtRow.datetime === dateValue));}\n\n if (cityValue)\n {rowFilter = rowFilter.filter(dtRow => (dtRow.city === cityValue));}\n \n if (stateValue)\n {rowFilter = rowFilter.filter(dtRow => (dtRow.state === stateValue));}\n \n if (countryValue)\n {rowFilter = rowFilter.filter(dtRow => (dtRow.country === countryValue));}\n \n if (shapeValue)\n {rowFilter = rowFilter.filter(dtRow => (dtRow.shape === shapeValue));} \n\n console.log(rowFilter)\n\n if ((dateValue === \" \") && \n (cityValue === \" \") &&\n (stateValue === \" \") &&\n (countryValue === \" \") &&\n (shapeValue === \" \")) {\n buildTable(tableData);\n }\n\n if (rowFilter === \" \") {\n tbody.html(\"\");}\n else {\n tbody.html(\"\");\n buildTable(rowFilter);\n }\n}", "function searchButtonClick() {\r\n var filterDate = $dateTimeInput.value.trim();\r\n var filterCity = $cityInput.value.trim().toLowerCase();\r\n var filterState = $stateInput.value.trim().toLowerCase();\r\n var filterCountry = $countryInput.value.trim().toLowerCase();\r\n var filterShape = $shapeInput.value.trim().toLowerCase();\r\n\r\n if (filterDate != \"\") {\r\n filteredData = filteredData.filter(function (date) {\r\n var dataDate = date.datetime;\r\n return dataDate === filterDate;\r\n });\r\n\r\n }\r\n\r\n if (filterCity != \"\") {\r\n filteredData = filteredData.filter(function (city) {\r\n var dataCity = city.city;\r\n return dataCity === filterCity;\r\n });\r\n }\r\n\r\n if (filterState != \"\") {\r\n filteredData = filteredData.filter(function (state) {\r\n var dataState = state.state;\r\n return dataState === filterState;\r\n });\r\n }\r\n\r\n if (filterCountry != \"\") {\r\n filteredData = filteredData.filter(function (country) {\r\n var dataCountry = country.country;\r\n return dataCountry === filterCountry;\r\n });\r\n }\r\n\r\n if (filterShape != \"\") {\r\n filteredData = filteredData.filter(function (shape) {\r\n var dataShape = shape.shape;\r\n return dataShape === filterShape;\r\n });\r\n }\r\n\r\n renderTable();\r\n}", "function filterData () {\n d3.select(\"tbody\").html(\"\"); \n console.log(\"You clicked the filter\")\n\n // Prevent page from refreshing \n d3.event.preventDefault(); \n\n // Select input element and raw HTML node\n var inputElement = d3.select(\"#datetime\"); \n\n // Get value of input elementc\n var inputValue = inputElement.property(\"value\")\n\n // Filter data by date\n var filteredData = data.filter(date => date.datetime === inputValue);\n\n // Check to ensure data has been filtered\n console.log(filteredData); \n\n // Return filtered data onto website\n filteredData.forEach(filteredsighting => {\n var row = tbody.append(\"tr\"); \n var kvps = Object.entries(filteredsighting).forEach(([key, value]) => {\n var td = row.append(\"td\"); \n td.html(value)\n });\n });\n\n}", "filteredCheck({ filteredItems, localFilter }) {\n // Determine if the dataset is filtered or not\n let isFiltered = false\n if (!localFilter) {\n // If filter criteria is falsey\n isFiltered = false\n } else if (looseEqual(localFilter, []) || looseEqual(localFilter, {})) {\n // If filter criteria is an empty array or object\n isFiltered = false\n } else if (localFilter) {\n // If filter criteria is truthy\n isFiltered = true\n }\n if (isFiltered) {\n this.$emit(EVENT_NAME_FILTERED, filteredItems, filteredItems.length)\n }\n this.isFiltered = isFiltered\n }", "function addDataProcess() {\r\n\r\n\t\tbrunel.dataPreProcess(function (data) {\r\n\t\t\treturn data.filter(filterHandler.makeFilterStatement(data))\r\n\t\t});\r\n\t}", "function filterGenre(Genre) {\n genreName = Genre.options[Genre.selectedIndex].value;\n if (genreName == \"AllGenres\") {\n // console.log(\"showing all\");\n return filteredData;\n }\n else {\n // console.log(\"filtering genre\");\n var genreData = filteredData.filter(function(d){\n return d.genre == genreName;\n });\n return genreData;\n }\n \n}", "static Filtering (plotData,filters) {\n let filterPlots = [];\n plotData.forEach((e,i)=>{\n if (e.data.length > 0) {\n let check = true;\n for (let m in filters) {\n let lowerLimit = filters[m][0];\n let upperLimit = filters[m][1];\n check = check && e.metrics[m] >= lowerLimit && e.metrics[m] <= upperLimit;\n }\n if (check) filterPlots.push(i);\n }\n });\n return filterPlots;\n }", "filterData(type,value){\n\t\tvar arr = [];\n\t\tthis.state.data.forEach((d,i) => {\n\t\t\tif (!this.isFiltered(d,type,value))\n\t\t\t\tarr.push(i);\n\t\t});\n\t\tif(type === 'machine'){\n\t\t\tthis.setState({\n\t\t\t\tfilteredIndexes:arr,\n\t\t\t\tmachineFilter:value,\n\t\t\t\tselected:[],\n\t\t\t});\n\t\t} else if (type === 'username'){\n\t\t\tthis.setState({\n\t\t\t\tfilteredIndexes:arr,\n\t\t\t\tusernameFilter:value,\n\t\t\t\tselected:[],\n\t\t\t});\n\t\t} else if (type === 'time'){\n\t\t\tthis.setState({\n\t\t\t\tfilteredIndexes:arr,\n\t\t\t\ttimeFilter:value,\n\t\t\t\tselected:[],\n\t\t\t});\n\t\t}else {\n\t\t\tthis.setState({\n\t\t\t\tfilteredIndexes:arr,\n\t\t\t\tselected:[],\n\t\t\t});\n\t\t}\n\t}", "function filterDuiData(d) {\n return d.Year == strSelected;\n }", "function experienceFilters() {\n const filtered = pokemon.filter((pexp) => pexp.base_experience > \"100\");\n displaydata(filtered);\n}", "function filterGlobal () {\n jq('#tblMain').dataTable().search(\n \tjq('#tblMain_filter').val()\n ).draw();\n }", "function filterData(filterValue){\n episodeArr = [];\n episodeIndices = [];\n\n d3.json(elementsURL).then(function(elementData){\n if (filterValue == 'ALL'){\n Object.values(elementData.EPISODE).forEach(function(value){\n episodeArr.push(value);\n })\n }\n else {\n Object.entries(elementData).forEach(function([columnName, columnData]){\n if (columnName == filterValue){\n Object.entries(columnData).forEach(function([episodeIndex, elementFlag]){\n if (elementFlag == 1){\n episodeIndices.push(episodeIndex);\n }\n })\n }\n })\n\n Object.entries(elementData.EPISODE).forEach(function([episodeIndex, episodeID]){\n if (episodeIndices.includes(episodeIndex)){\n episodeArr.push(episodeID);\n }\n })\n }\n\n function getFilteredData(episode){\n return episodeArr.includes(episode.episode_id)\n }\n\n var finalArray = dataArray.filter(getFilteredData);\n\n //IMAGES\n //##################################################\n var selection = d3.select('#painting-table').select('.row').selectAll('div')\n\n var thumbnails = selection.data(finalArray)\n .enter()\n .append('div')\n .classed('col-xs-6 col-md-2', true)\n .append('a')\n .classed('thumbnail', true)\n .attr('href', d=>d.video_url)\n \n thumbnails.append('img')\n .classed('image', true)\n .attr('src', d=>d.img_url)\n .attr('alt', d=>d.episode_name);\n \n thumbnails.append('div')\n .classed('caption', true)\n .append('h4')\n .classed('text', true)\n .html(d=> `${d.episode_id}:<br>${d.episode_name}`);\n })\n}", "function handleFilter(data) {\n if (data.key === \"name\") {\n return setFilterName(data.value);\n } else if (data.key === \"species\") {\n return setFilterSpecies(data.value);\n }\n }", "function dateFilter() {\n let inputText = d3.select(\"#datetime\").node().value;\n let tables = d3.select(\".ufos-table\");\n let subData = data.filter(d => d.datetime === inputText)\n console.log(subData)\n tableBody.html(\"\")\n tableValues(subData);\n}", "function filterData(table, field, input) {\n if(input) {\n return table.filter(function(sighting) {\n if (sighting[field] === input) {\n return true;\n }\n });\n }\n // console.log(table);\n return table;\n}", "function FilterChart(){}", "filter(callback) {\n let oldData = this.all();\n for (let i = 0; i < oldData.length; i++) {\n let result = callback(oldData[i].data, oldData[i].ID, i, this);\n if (result)\n delete oldData[i];\n }\n this.data = Util_1.default.fromDataset(oldData);\n }", "filteredData() {\n const sortKey = this.state.sortKey;\n const filterKey = this.filterKey && this.filterKey.toLowerCase();\n const order = this.state.sortOrders[sortKey] || 1;\n let data = this.data;\n if (filterKey) {\n data = data.filter(function(row) {\n return Object.keys(row).some(function(key) {\n return String(row[key]).toLowerCase().indexOf(filterKey) > -1;\n });\n });\n }\n if (sortKey) {\n data = data.slice().sort(function(a, b) {\n a = a[sortKey];\n b = b[sortKey];\n return (a === b ? 0 : a > b ? 1 : -1) * order;\n });\n }\n return data;\n }", "function filterProcesses(jsonData) {\n var filter = $('#filterSelect').val().toLowerCase().replace(/ /g,''),\n ret = [],\n type,\n i;\n for(i=0;i<jsonData.length;i++) {\n // debugger;\n type = jsonData[i].info.type;\n if(filter === 'all' || (type === 'tab' && filter==='tabsonly') || (type !== 'tab' && filter==='notabs')){\n ret.push(jsonData[i]);\n }\n }\n return ret;\n}", "function filter() {\n let array = GOODS;\n const category = selectInput.value;\n const name = nameInput.value;\n\n /* Filter by category */\n if (category !== \"\") {\n array = GOODS.filter(item => item.category === category);\n }\n\n /* Filter by name */\n if (name !== \"\") {\n array = array.filter(item => item.name.toLowerCase().indexOf(name.toLowerCase()) >= 0);\n }\n\n /* Sort */\n for (let sortColumn of sortList) {\n if (sortColumn.sort !== undefined) {\n\n const sortField = sortColumn.name.toLowerCase();\n array.sort((firstObject, secondObject) => {\n\n if (firstObject[sortField] > secondObject[sortField]) {\n return 1;\n }\n\n if (firstObject[sortField] < secondObject[sortField]) {\n return -1;\n }\n\n return 0;\n });\n\n if (!sortColumn.sort) {\n array.reverse();\n }\n\n break;\n }\n }\n\n addTableData(array);\n}", "function filterTable() {\n\n// 8. Set the filtered data to the tableData.\n let filteredData = tableData\n\n// 9. Loop through all of the filters and keep any data that\n// matches the filter values\nObject.entries(filters).forEach(([key, value]) => {\nfilteredData = filteredData.filter(row => row[key] === value);\n});\n\n// 10. Finally, rebuild the table using the filtered data 11.5.4\n// 11.5.4 given code After we pass filteredData in as our new argument, our full handleClick() function should look like the one below:\n buildTable(filteredData)\n}", "function filter() {\n console.log('[filter] Am intrat in filter')\n var data = '';\n var timp = document.getElementById('timp').value;\n if (timp.length === 0)\n timp = '';\n else\n timp = \"\\\"duration\\\" :\\\"\" + timp + \"\\\"\";\n var dif = [];\n var diffi = document.getElementsByClassName('diffi');\n for (var j = 0; j < diffi.length; j++) {\n if (diffi[j].checked) {\n dif.push(\"\\\"\" + diffi[j].value + \"\\\"\");\n }\n }\n\n if (dif.length === 0)\n dif = '';\n else\n dif = \"\\\"difficulty\\\" : [\" + dif + \"] \";\n\n var gastr = [];\n var gastro = document.getElementsByClassName('gastro');\n for (var i = 0; i < gastro.length; i++) {\n if (gastro[i].checked) {\n gastr.push(\"\\\"\" + gastro[i].value + \"\\\"\");\n }\n }\n if (gastr.length === 0)\n gastr = '';\n else\n gastr = \"\\\"gastronomy\\\" : [\" + gastr + \"] \";\n\n var post = [];\n var pst = document.getElementsByClassName('clasa');\n for (var i = 0; i < pst.length; i++) {\n if (pst[i].checked) {\n post.push(\"\\\"\" + pst[i].value + \"\\\"\");\n }\n }\n if (post.length === 0)\n post = '';\n else\n post = \"\\\"post\\\" : [\" + post + \"] \";\n\n var regimal = [];\n var regim = document.getElementsByClassName('ing');\n for (var i = 0; i < regim.length; i++) {\n if (regim[i].checked) {\n regimal.push(\"\\\"\" + regim[i].value + \"\\\"\");\n }\n }\n if (regimal.length === 0)\n regimal = '';\n else\n regimal = \"\\\"regim\\\" : [\" + regimal + \"] \";\n\n var style = [];\n var sdv = document.getElementsByClassName('sdv');\n for (var i = 0; i < sdv.length; i++) {\n if (sdv[i].checked) {\n style.push(\"\\\"\" + sdv[i].value + \"\\\"\");\n }\n }\n if (style.length === 0)\n style = '';\n else\n style = \"\\\"style\\\" : [\" + style + \"] \";\n\n\n var choices1 = [];\n var dotari = document.getElementsByClassName('dotari');\n for (var j = 0; j < dotari.length; j++) {\n if (dotari[j].checked) {\n choices1.push(\"\\\"\" + dotari[j].value + \"\\\"\");\n }\n }\n if (choices1.length === 0)\n choices1 = '';\n else\n choices1 = \"\\\"dotari\\\" : [\" + choices1 + \"] \";\n\n data += \"{\" + timp + \",\" + dif + \",\" + gastr + \",\" + post + \",\" + regimal + \",\" + style + \",\" + choices1 + \"}\";\n\n console.log(data);\n var url = 'http://localhost:8125/filter';\n xhr.open('POST', url);\n var elem = '';\n xhr.setRequestHeader(\"Content-type\", \"text/plain\");\n xhr.send(data);\n xhr.onreadystatechange = function () {\n if (xhr.readyState == XMLHttpRequest.DONE) {\n if (xhr.status == 200) {\n if (xhr.responseText != \"Failure\") {\n var body = JSON.parse(this.responseText);\n elem += \"<h2 text-align=center>New recipes</h2><br>\";\n for (var i = 0; i < body.length; i++) {\n elem += \"<div><figure class=\\\"box-img\\\"><img src=\\\"./img/\" + body[i].picture + \"\\\" alt=\\\"\\\"></figure></div><div> <p>\" + body[i].description +\n \"</p> <a class=\\\"btn\\\" onclick=\\\"recipe('\" + body[i].name + \"')\\\">View recipe</a> </div>\";\n }\n console.log(elem);\n }\n else {\n elem += \"<h2> Ne pare rau, nu exista reteta cautata! <\\h2>\"\n }\n document.getElementById(\"nr\").innerHTML = elem;\n }\n }\n }\n}", "function showData() {\n\n let showAll = 'Show All';\n\n let dropDownDate = d3.select(\"#selectDate\").node().value;\n let dateValue;\n if (dropDownDate === showAll) {\n dateValue = x => x.datetime;\n }\n else {\n dateValue = x => x.datetime === dropDownDate;\n }\n \n let dropDownCity = d3.select(\"#selectCity\").node().value;\n let cityValue;\n // instead of IF else use this: cityValue = (cond) ? do this: do that ;\n if (dropDownCity === showAll){\n cityValue = x => x.city;\n }\n else {\n cityValue = x => x.city === dropDownCity.toLowerCase();\n };\n\n let dropDownState = d3.select(\"#selectState\").node().value;\n let stateValue;\n if (dropDownState === showAll){\n stateValue = x => x.state;\n }\n else {\n stateValue = x => x.state === dropDownState.toLowerCase();\n };\n\n let dropDownCountry = d3.select(\"#selectCountry\").node().value;\n let countryValue;\n if (dropDownCountry === showAll){\n countryValue = x => x.country;\n }\n else {\n countryValue = x => x.country === dropDownCountry.toLowerCase();\n };\n\n let dropDownShape = d3.select(\"#selectShape\").node().value;\n let shapeValue;\n if (dropDownShape === showAll) {\n shapeValue = x => x.shape;\n }\n else {\n shapeValue = x => x.shape === dropDownShape.toLowerCase();\n };\n\n let UFOfilter = tdata.filter(dateValue).filter(cityValue).filter(stateValue).filter(countryValue).filter(shapeValue);\n\n buildTable(UFOfilter); \n}", "getFilteredItems(query){\r\n return this.source.filter((item) =>item[this.getOptionLabel].toLowerCase().startsWith(query.toLowerCase(), 0) && !item.invisible);\r\n }", "function uc1_getFilteredData(data, mutationTypes) {\n\n return data.filter( function(mutation) {\n\n return mutationTypes.map( \n function(t){ \n if(t.from==\"*\") \n return t.to==mutation[2] \n if(t.to==\"*\") \n return t.from==mutation[1] \n\n return t.from == mutation[1] && t.to==mutation[2]\n }\n ).reduce( function(t1,t2){ return t1 || t2 });\n\n });\n\n}", "function filterData(startDate, endDate, provincesFilter) {\r\n var sDate = stringToDate(startDate);\r\n var eDate = stringToDate(endDate);\r\n\r\n var filteredData = [];\r\n data.forEach(dailyData => {\r\n let filteredDailyData = dailyData.values.filter(\r\n row => provincesFilter[row.name]\r\n );\r\n\r\n var date = stringToDate(dailyData.key);\r\n\r\n if (filteredDailyData.length > 0 && date >= sDate && date <= eDate) {\r\n filteredData.push({ key: dailyData.key, values: filteredDailyData });\r\n }\r\n });\r\n\r\n return filteredData;\r\n}", "function runFilter() {\r\n // jQuery method for emptying the existing table each time\r\n // a new query is performed\r\n $(\"#tbody\").empty();\r\n // Select the input element and get the raw HTML node\r\n var inputElement = d3.select(\"#datetime\");\r\n // Get the value property of the input element\r\n var inputValue = inputElement.property(\"value\");\r\n // Only return values that match with input date\r\n var filteredData = data.filter(data => data.datetime === inputValue);\r\n // Prevent the page from refreshing after form submission\r\n d3.event.preventDefault();\r\n // Function to add filtered data to table\r\n filteredData.forEach((runFilteredData) => {\r\n // Add a row for each key/value pair found in filtered dataset\r\n var row = tbody.append(\"tr\");\r\n // Append values found in filtered data set to appropriate columns\r\n Object.entries(runFilteredData).forEach(([key, value]) => {\r\n var cell = row.append(\"td\");\r\n cell.text(value);\r\n });\r\n });\r\n // jQuery method for emptying the input field after click\r\n $(\"#datetime\").val('');\r\n}" ]
[ "0.7577056", "0.7546823", "0.7363577", "0.7307347", "0.7269179", "0.7262557", "0.7176279", "0.7156935", "0.71417934", "0.71336764", "0.71023756", "0.70818555", "0.70460916", "0.70460576", "0.70409906", "0.7000739", "0.6996826", "0.69850945", "0.6971106", "0.6941638", "0.6897229", "0.68660057", "0.6860099", "0.685874", "0.6856587", "0.6852982", "0.6829639", "0.68183666", "0.6800462", "0.67851335", "0.67735416", "0.67526186", "0.67526186", "0.674416", "0.6736358", "0.6734338", "0.6732533", "0.6725689", "0.6724131", "0.67219585", "0.6716915", "0.6701182", "0.66952384", "0.66945034", "0.6675366", "0.66703343", "0.66690016", "0.665732", "0.6654457", "0.6643074", "0.66376185", "0.66231686", "0.6616361", "0.6614696", "0.6605313", "0.6590948", "0.65754056", "0.65679634", "0.6556229", "0.6554142", "0.65511274", "0.65407264", "0.65337557", "0.6527483", "0.6526389", "0.65190274", "0.65072984", "0.65016145", "0.64917773", "0.6487414", "0.64843965", "0.64834356", "0.6472191", "0.64702606", "0.64693916", "0.64527893", "0.643713", "0.64366996", "0.64335304", "0.64320934", "0.6429785", "0.64251107", "0.6419857", "0.64159405", "0.64158994", "0.64132947", "0.6406283", "0.64043516", "0.6393279", "0.6390776", "0.63895816", "0.6388835", "0.637961", "0.6374802", "0.6372074", "0.63641965", "0.6363168", "0.6361853", "0.6358533", "0.63576835", "0.6355783" ]
0.0
-1
This method discretizes a Flow
discretize(span, length, spawnFlows){ if( spawnFlows === undefined ) //if this argument was not specified, we default to true spawnFlows = true; var flow = new DiscretizerFlow(span, getDataEndObject(length), spawnFlows); setRefs(this, flow); this.isDiscretized = true; return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateFlow() {\n this.flow += 1;\n }", "function getMaxFlow()\n {\n\n Graph.instance.edges.forEach(\n function(key, edge)\n {\n edge.state.flow = 0;\n })\n\n var no_path_found = false;\n currentFlow = 0;\n while(!no_path_found)\n {\n Graph.instance.nodes.forEach(\n function(key, node)\n {\n node.state.predecessor = null;\n });\n var search_queue = [state.sourceId];\n var source = Graph.instance.nodes.get(state.sourceId);\n source.state.predecessor = {};\n while(Graph.instance.nodes.get(state.targetId).state.predecessor == null && search_queue.length > 0 )\n {\n var node_to_expand = search_queue.shift();\n var node = Graph.instance.nodes.get(node_to_expand);\n var out_edges = node.getOutEdges();\n for (var i = 0; i < out_edges.length; i++)\n {\n var edge_out = out_edges[i];\n\n if(edge_out.end.state.predecessor == null && edge_out.resources[0] > edge_out.state.flow)\n {\n search_queue.push(edge_out.end.id);\n edge_out.end.state.predecessor =\n {\n \"node\": node_to_expand,\n \"edge\": edge_out.id,\n \"residual-capacity\":edge_out.resources[0] - edge_out.state.flow,\n \"direction\": 1\n };\n }\n }\n\n var in_edges = node.getInEdges();\n for (var i = 0; i < in_edges.length; i++)\n {\n var edge_in = in_edges[i];\n\n if(edge_in.start.state.predecessor == null && edge_in.state.flow > 0)\n {\n search_queue.push(edge_in.start.id);\n edge_in.start.state.predecessor =\n {\n \"node\": node_to_expand,\n \"edge\": edge_in.id,\n \"residual-capacity\": edge_in.state.flow,\n \"direction\": -1\n };\n }\n }\n }\n\n if(Graph.instance.nodes.get(state.targetId).state.predecessor != null)\n {\n var path = [];\n var augmentation = Number.MAX_SAFE_INTEGER;\n var next_path_node = state.targetId;\n\n //gather path\n while(next_path_node != state.sourceId)\n {\n var node = Graph.instance.nodes.get(next_path_node);\n path.push(node.state.predecessor);\n augmentation = Math.min(node.state.predecessor[\"residual-capacity\"], augmentation);\n next_path_node = node.state.predecessor[\"node\"];\n }\n\n //apply path\n for (var i = 0; i < path.length; i++)\n {\n var predecessor = path[i];\n var edge = Graph.instance.edges.get(predecessor[\"edge\"]);\n edge.state.flow += predecessor[\"direction\"] * augmentation;\n\n }\n currentFlow += augmentation;\n\n\n }\n else\n no_path_found = true;\n }\n\t\tmaxFlow = currentFlow;\n Graph.instance.nodes.forEach(\n function(key, node){\n\t\t\t\tbs[node.id] = node.b;\n if(node.id == state.sourceId){\n\t\t\t\t\tnode.b = currentFlow;\n\t\t\t\t\tbOfS = node.b;\n\t\t\t\t}else if(node.id == state.targetId){\n\t\t\t\t\tnode.b = -currentFlow;\n\t\t\t\t\tbOfT = node.b;\n\t\t\t\t}else{\n\t\t\t\t\tnode.b = 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tGraph.instance.edges.forEach(\n function(key, edge)\n {\n edge.state.flow = 0;\n })\n\n var no_path_found = false;\n currentFlow = 0;\n state.current_step = STEP_MAINLOOP;\n logger.log(\"Init of maxflow.\");\n\n }", "getFlow() {\n return new NgFlowchart.Flow(this.canvas);\n }", "resetFlow() {\n let current = this.edgesList.head;\n\n while (current != null) {\n current.data.resetFlow();\n current = current.next;\n }\n }", "discretize(span, spanLength, spawnFlows){\n if( spawnFlows === undefined )\n spawnFlows = true;\n\n this.discreteStreamLength = span;\n this.isDataEndObject = getDataEndObject(spanLength);\n this.isDiscretized = true;\n\n var flow = new DiscretizerFlow(span, this.isDataEndObject, spawnFlows);\n setRefs(this, flow);\n\n return flow;\n }", "createFlow() {\n // Very simple random unique ID generator\n this.formattedFlow.flowId = `${new Date().getTime()}`;\n this.formattedFlow.flowName = this.originalFlow.flow;\n this.formattedFlow.comment = this.originalFlow.comment;\n this.formattedFlow.startAt = this.originalFlow.startAt;\n this.formattedFlow.states = Object.assign({}, this.originalFlow.states);\n this.formattedFlow.flowStartTime = new Date().getTime();\n this.formattedFlow.flowExecutionTime = '';\n\n return { isError: false, code: this.code, item: this.formattedFlow };\n }", "function SplitFlowy(e,obj)\n {\n myDiagram.startTransaction(\"Split flow\");\n Link = myDiagram.selection.first();\n toNode = Link.toNode;\n fromNode = Link.fromNode;\n MoveSet = toNode.findTreeParts();\n myDiagram.model.removeLinkData(Link.data);\n\n\n offsety =null;\n if (UpperNode(fromNode)!=null)\n {\n offsety = RuntimeService.miny-toNode.data.loc.y;\n\n }\n else\n {\n offsety = fromNode.data.loc.y-toNode.data.loc.y;\n }\n RuntimeService.miny = 99999999999999;\n\n\n myDiagram.moveParts(MoveSet,new go.Point(200,offsety),true);\n myDiagram.commitTransaction(\"Split flow\");\n }", "function SplitFlowx(e,obj)\n {\n myDiagram.startTransaction(\"Split flow\");\n Link = myDiagram.selection.first();\n toNode = Link.toNode;\n fromNode = Link.fromNode;\n MoveSet = toNode.findTreeParts();\n myDiagram.model.removeLinkData(Link.data);\n\n\n offsetx =null;\n//\t\tif (LeftiNode(fromNode)!=null)\n//\t\t{\n//\t\t\toffsetx = minx-toNode.data.loc.x;\n//\t\t}\n//\t\telse\n {\n offsetx = fromNode.data.loc.x-toNode.data.loc.x;\n }\n minx = 99999999999999;\n\n\n myDiagram.moveParts(MoveSet,new go.Point(offsetx,200),true);\n myDiagram.commitTransaction(\"Split flow\");\n }", "function Flow(nodeList, flows, node, type) {\n this.nodeList = nodeList;\n this.flows = flows;\n this.node = node;\n this.type = type;\n}", "function startFlow() {\n\tyCo = 8;\n \n\tfor (xCo = 0; xCo < 6; xCo++) {\n\t\tif (map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY(yCo * 64), 'Tile Layer 1') != null && map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY(yCo * 64), 'Tile Layer 1').index == 10) {\n\t\t\tmap.getTile(layer1.getTileX(xCo * 64), layer1.getTileY((yCo - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY((yCo - 1) * 64), 'Tile Layer 1');\n\t\t\tanimateFlow(curPipe);\n\t\t\tcheckIfFlowable(curPipe);\n\t\t\ttimerBar.destroy();\n\t\t\tflowTimer = game.time.events.loop(Phaser.Timer.SECOND * flowSpeed, runFlow, this);\n\t\t}\n\t}\n flowStarted = true;\n}", "glitchFlowLines() {\n this.flowLines.forEach((v, i, arr) => {\n arr[i].pixels = this.flowLine(v);\n if (arr[i].pixels) ImgUtil.copyPixels(arr[i].pixels, this.img);\n });\n }", "_updateFlowReportedState() {\n if (!this._deviceStateMan.canUpdateState('reported')) {\n return\n }\n\n let reportedState = this._deviceStateMan.getState('reported', 'flow')\n if (!reportedState) {\n reportedState = {}\n }\n\n // Handle flow.enable\n if (this._flowState.enable !== reportedState.enable) {\n this.debug(\n `Updating reported flow enable ${reportedState.enable} => ${this._flowState.enable}`\n )\n this._deviceStateMan.updateState(\n 'reported',\n 'set',\n 'flow.enable',\n this._flowState.enable,\n this._flowState.enableDesiredStateRef\n ? {\n desired: this._flowState.enableDesiredStateRef\n }\n : null\n )\n }\n // Handle flow.envVariables\n if (\n !this._compareEnvVariables(\n this._flowState.envVariables,\n reportedState.envVariables\n )\n ) {\n this.debug(\n `Updating reported flow envVariables ${reportedState.envVariables} => ${this._flowState.envVariables}`\n )\n this._deviceStateMan.updateState(\n 'reported',\n 'set',\n 'flow.envVariablesA',\n this._flowState.envVariables\n )\n }\n\n // Handle flow.flow\n if (\n !this._flowState.assetId &&\n !this._flowState.pendingChange &&\n reportedState.flow\n ) {\n this.debug('Removing reported flow state...')\n this._deviceStateMan.updateState('reported', 'remove', 'flow.flow')\n } else if (this._flowState.assetId || this._flowState.pendingChange) {\n let state = {\n assetId: this._flowState.assetId,\n updateId: this._flowState.updateId,\n state: this._flowState.state,\n ts: this._flowState.changeTs\n }\n if (this._flowState.pendingChange) {\n switch (this._flowState.pendingChange) {\n case 'deploy':\n state.state = 'deployPending'\n state.assetId = this._flowState.pendingAssetId\n state.updateId = this._flowState.pendingUpdateId\n break\n case 'remove':\n state.state = 'removePending'\n break\n default:\n state.state = 'unknown'\n break\n }\n }\n if (this._flowState.changeErrMsg) {\n state.message = this._flowState.changeErrMsg\n }\n if (\n !reportedState.flow ||\n objectHash(state) !== objectHash(reportedState.flow)\n ) {\n this.debug('Updating reported flow state...')\n this.debug(\n 'Current state: ' + JSON.stringify(reportedState.flow, null, 2)\n )\n this.debug('New state: ' + JSON.stringify(state, null, 2))\n this._deviceStateMan.updateState('reported', 'set', 'flow.flow', state)\n }\n }\n }", "function limitFlow(period) {\n return function limitFlow(stream) {\n var source = new RateLimitSource(stream.source, period);\n return new stream.constructor(source);\n };\n}", "function showFlow (flows) {\n \n var position = window.camera.getFocus().position;\n var indice = 0;\n\n window.camera.enable();\n window.camera.move(position.x, position.y, position.z + window.TILE_DIMENSION.width * 5);\n \n setTimeout(function() {\n \n actualFlow = [];\n \n for(var i = 0; i < flows.length; i++) {\n actualFlow.push(flows[i]);\n flows[i].draw(position.x, position.y, 0, indice, i);\n \n //Dummy, set distance between flows\n position.x += window.TILE_DIMENSION.width * 10;\n }\n \n }, 1500);\n }", "function resizeFlowFigures() {\n jQuery.each(flow_figs, function (flowpath,flowfig) {\n flowfig.resize();\n });\n }", "function dataflow() {\n var Flow = window.Flow;\n Flow.Dataflow = function () {\n return {\n slot: createSlot,\n slots: createSlots,\n signal: createSignal,\n signals: createSignals,\n isSignal: _isSignal,\n link: _link,\n unlink: _unlink,\n act: _act,\n react: _react,\n lift: _lift,\n merge: _merge\n };\n }();\n }", "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "function showFlow() {\n\thideAll();\n\t$(\"#coverflow\")[0].setAttribute('class', 'coverflow_show');\n}", "function reflow( force ) {\n var reflow = options.reflow;\n \n if ( force || ( reflow && !( ++reflow_counter % reflow ) ) ) {\n w = that.width() / 2;\n h = that.height() / 2;\n offset = that.offset();\n }\n }", "function flow(inTile) {\n\tswitch (inTile.index) {\n\tcase 1:\n\t\tif (inTile.properties.inFlow == \"right\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1').properties.inFlow = \"up\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"down\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"left\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 2:\n\t\tif (inTile.properties.inFlow == \"right\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"right\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"left\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"left\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 3:\n\t\tif (inTile.properties.inFlow == \"left\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1').properties.inFlow = \"up\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"down\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"right\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 4:\n\t\tif (inTile.properties.inFlow == \"up\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1').properties.inFlow = \"up\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"down\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 5:\n\t\tif (inTile.properties.inFlow == \"up\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"left\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"right\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 6:\n\t\tif (inTile.properties.inFlow == \"up\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow = \"right\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"left\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tbreak;\n\tcase 7:\n\t\tif (inTile.properties.inFlow == \"left\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow += \"left\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x + 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"right\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1').properties.inFlow += \"right\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x - 1) * 64), layer1.getTileY((inTile.y) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"up\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1').properties.inFlow += \"up\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y + 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (inTile.properties.inFlow == \"down\") {\n\t\t\tif(map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1') != null){\n\t\t\t\tmap.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1').properties.inFlow += \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX((inTile.x) * 64), layer1.getTileY((inTile.y - 1) * 64), 'Tile Layer 1');\n\t\t\t}else {\n\t\t\t\tgameLose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\tif(map.getTile(layer5.getTileX(curPipe.x * 64), layer5.getTileY(curPipe.y * 64), 'Tile Layer 5') != null && map.getTile(layer5.getTileX(curPipe.x * 64), layer5.getTileY(curPipe.y * 64), 'Tile Layer 5').index == 313){\n\t\tbonus++;\n\t}\n\tcheckIfFlowable(curPipe);\n\tanimateFlow(curPipe);\n}", "function showFlow(flows) {\n\n var position = window.camera.getFocus().position;\n var indice = 0;\n\n window.camera.enable();\n window.camera.move(position.x, position.y, position.z + window.TILE_DIMENSION.width * 5);\n\n setTimeout(function() {\n\n actualFlow = [];\n\n for(var i = 0; i < flows.length; i++) {\n actualFlow.push(flows[i]);\n flows[i].draw(position.x, position.y, 0, indice, i);\n\n //Dummy, set distance between flows\n position.x += window.TILE_DIMENSION.width * 10;\n }\n\n }, 1500);\n }", "function getFlowRows() {\n var processFlows = ProcessFlowService.getAll();\n\n $scope.elementaryFlows = {};\n $scope.flowsVisible = processFlows.length > 0;\n if ($scope.flowsVisible) {\n processFlows.forEach( function (pf) {\n if (pf.flow.flowTypeID === 2) {\n $scope.elementaryFlows[pf.flow.flowID] = pf.flow;\n }\n });\n defineGrids();\n extractFragmentFlowData();\n }\n }", "function assignOppositeFlow(flow) {\n\t\tvar candidates, i, j;\n\t\t\n\t\t// Make sure this flow doesn't already have an opposingFlow.\n\t\tif(!flow.hasOwnProperty(\"oppositeFlow\")) {\n\t\t\t// Look at the outgoing flows of the endpoint.\n\t\t\tcandidates = flow.getEndPt().outgoingFlows;\n\t\t\t\n\t\t\tfor(i = 0, j = candidates.length; i < j; i += 1) {\n\t\t\t\t// Make sure candidate doesn't already have an opposing flow\n\t\t\t\tif(!candidates[i].hasOwnProperty(\"opposingFlow\")) {\n\t\t\t\t\t// If the end point of candidate is same as start point\n\t\t\t\t\t// of flow\n\t\t\t\t\tif((candidates[i].getEndPt()) === (flow.getStartPt())) {\n\t\t\t\t\t\t// this candidate is an opposing flow.\n\t\t\t\t\t\tflow.oppositeFlow = candidates[i];\n\t\t\t\t\t\tcandidates[i].oppositeFlow = flow;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "function getSubflowDef(flow) {\n const newFlow = [];\n let sf = null;\n flow.forEach((item) => {\n if (item.hasOwnProperty(\"meta\") &&\n item.meta.hasOwnProperty(\"module\")) {\n if (sf !== null) {\n throw new Error(\"unexpected subflow definition\");\n }\n sf = item;\n }\n else {\n newFlow.push(item);\n }\n });\n if (sf == null) {\n throw new Error(\"No module properties in subflow\");\n }\n return [sf, newFlow];\n}", "function changeFlowItemToFitSmallWindow(i) {\n deckTitle[i].style.left = \"40px\";\n deckTitle[i].style.maxWidth = \"50%\";\n imageFlowCard[i].style.width = \"116px\";\n imageFlowCard[i].style.height = \"140px\";\n imageFlowCard[i].style.right = \"25px\";\n imageFlowCard[i].style.top = \"40px\";\n}", "renderFlowchart() {\n return new Promise((resolve, reject) => {\n const flowcharts = this.previewElement.getElementsByClassName(\"flow\");\n const newFlowchartCache = {};\n for (let i = 0; i < flowcharts.length; i++) {\n const flow = flowcharts[i];\n const text = flow.textContent.trim();\n if (text in this.flowchartCache) {\n flow.innerHTML = this.flowchartCache[text];\n }\n else {\n try {\n const diagram = window[\"flowchart\"].parse(text);\n flow.innerHTML = \"\";\n diagram.drawSVG(flow);\n }\n catch (error) {\n flow.innerHTML =\n '<pre class=\"language-text\">' + error.toString() + \"</pre>\";\n }\n }\n newFlowchartCache[text] = flow.innerHTML;\n }\n this.flowchartCache = newFlowchartCache;\n resolve();\n });\n }", "function getFlow(name, glyphicon){\n\t\tvar uid = Date.now();\n\n\t\treturn {\n\t\t\t\"uid\": uid,\n\t\t\t\"name\": name ? name : uid,\n\t\t\t\"type\": \"flow\",\n\t\t\t\"glyphicon\": glyphicon ? glyphicon : \"\",\n\t\t\t\"description\": \"kein text\",\n\t\t\t\"flow\": []\n\t\t};\n\t}", "function flow_bfs(point) {\r\n var i,j,p1,p2,p3,x, end_p_txt;\r\n\t \r\n\t var p, maxflow=0, curflow=0, cl, txt, begin, dur1=3, el, etxt, dur2 = 1.5;\r\n\t \r\n\t var tail, used, comes, flow, edgeslen, edgetxt, els;\r\n\t tail = new Array;\r\n\t used = new Array;\r\n\t comes = new Array;\r\n\t flow = new Array;\r\n\t edgeslen = new Array;\r\n\t edgetxt = new Array;\r\n\t els = new Array;\r\n\t begin = ((new Date()).valueOf() - time0)/1000; \t\t\t// The time of the begining of Al.\r\n\t \r\n\t \r\n if ( is_flow==0 ) {\r\n\t\t for ( i=0 ; i<nodes.length&&point!=nodes[i].gi ; i++ );\r\n\t\t start_p = i;\r\n\t\t animate(nodes[start_p].gi,\"XML\",\"r\",6,12,begin,dur1,1);\r\n\t\t anm_color(nodes[start_p].gi,\"fill\",START,ACTIVE,begin,dur1,1);\r\n\t\t start_p_txt = label_node(start_p,0,\"black\",\"black\",0);\r\n\t\t begin+=dur1;\r\n\t\t is_flow++;\r\n\r\n\t\t return;\r\n\t} else {\r\n\t\t for ( i=0 ; i<nodes.length&&point!=nodes[i].gi ; i++ );\r\n\t\t end_p = i;\r\n \t\t animate(nodes[end_p].gi,\"XML\",\"r\",6,12,begin,dur1,1);\r\n\t\t anm_color(nodes[end_p].gi,\"fill\",START,ACTIVE,begin,dur1,1);\r\n\t\t end_p_txt = label_node(end_p,0,\"black\",\"black\",0);\r\n \t\t begin+=dur1;\r\n\r\n\t\t if ( start_p!=end_p ) {\r\n\t\t \t is_flow=0;\r\n\t\t } else {\r\n\t\t \t alert(\"Chouse another End Point Difrent from the Start Point\");\r\n\t\t\t\treturn;\r\n\t\t }\r\n\t\t // Start the algorithm\r\n\r\n\t\t // Adding the needed edges\r\n\t\t bul=0;\r\n\t\t if ( dir_mode==false ) {\r\n\t\t \t\talert(\"You should first change the graph to directed!!!\");\r\n\t\t\t\treturn;\r\n\t\t } else {\r\n\t\t \t for ( i=0 ; i<path_edges ; i++ ) {\r\n\t\t\t \t\tp=0;\r\n\t\t\t for ( j=path_edges ; j<edges.length ; j++ ) {\r\n\t\t\t\t\t if ( edges[i].n1==edges[j].n2 && edges[i].n2==edges[j].n1 ) {\r\n\t\t\t\t\t\t \t\tp=1; break;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( p==0 ) {\r\n\t\t\t\t\t // Adding edge with flow 0 and oposit direction to edges[i]\r\n\t\t\t\t\t\t c1 = nodes[edges[i].n2].gi;\r\n\t\t\t\t\t\t aef = 2;\r\n\t\t\t\t\t\t add_edge(nodes[edges[i].n1].gi);\r\n\t\t\t\t\t\t fake_edge.push(edges[edges.length-1].gi);\r\n\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t }\r\n\t\t bul=1;\r\n\t\t // Save the real edge lens And create the new elipses for the edge length-s\r\n\t\t for ( i=0 ; i<edges.length ; i++ ) {\r\n\t\t \t\t edges[i].weigi.setAttribute(\"opacity\",\"0\");\r\n \t\t \t\t edges[i].rectgi.setAttribute(\"opacity\",\"0\");\r\n\t\t \t\t edgeslen.push(edges[i].wei);\r\n\t\t\t\t el = make_ellipse(parseInt(edges[i].rectgi.getAttribute(\"x\"))+20,parseInt(edges[i].rectgi.getAttribute(\"y\"))+11,25,10,\"red\",\"blue\",1,0.8);\r\n\t\t\t\t objects.push(el);\r\n\t\t\t\t els.push(el);\r\n doc.getElementById(\"anim_nodes\").appendChild(el);\r\n\t\t\t\t etxt = label_node3(el,edges[i].wei,\"black\",\"black\",0);\r\n\t\t\t\t edgetxt.push(etxt);\r\n\t\t }\r\n\t\t \r\n\t\t // The real algorithm\r\n\t\t do {\r\n\t\t // Inits\r\n\t\t\t\tfor ( i=0 ; i<nodes.length ; i++ ) {\r\n\t\t\t\t used[i]=0;\r\n\t\t\t\t}\r\n\t\t\t\tfor ( i=0 ; i<edges.length ; i++ ) {\r\n\t\t\t\t\t\tset(edges[i].gi,\"stroke\",ESTART,begin);\r\n\t\t\t\t}\r\n\t\t\t\tfor ( i=tail.length-1 ; i>=0 ; i-- ) {\r\n\t\t\t\t\t\ttail.pop();\r\n\t\t\t\t\t\tcomes.pop();\r\n\t\t\t\t\t\tflow.pop();\r\n\t\t\t\t}\r\n\t\t\t\ttail.push(start_p);\r\n\t\t\t\tcomes.push(-1);\r\n\t\t\t\tflow.push(200000);\r\n\t\t\t\tused[start_p]=1;\r\n\t\t\t\tp1 = 0; p2 = p3 = 1;\r\n\t\t\t\tcurflow=0;\r\n\r\n\t\t\t\t\r\n\t\t\t\t// Finding a flow with BFS\r\n\t\t\t\tdo {\r\n\t\t\t\t for ( i=p1 ; i<p2 ; i++ ) {\r\n\t\t\t\t\t \t\t for ( j=0 ; j<nodes[tail[i]].elist.length ; j++ ) {\r\n\t\t\t\t\t\t\t if ( used[edges[nodes[tail[i]].elist[j]].n2]==0 && edgeslen[nodes[tail[i]].elist[j]]>0 ) {\r\n\t\t\t\t\t\t\t\t\t tail.push(edges[nodes[tail[i]].elist[j]].n2);\r\n\t\t\t\t\t\t\t\t\t\t comes.push(i);\r\n\t\t\t\t\t\t\t\t\t\t if ( edgeslen[nodes[tail[i]].elist[j]] < flow[i]) {\r\n\t\t\t\t\t\t\t\t\t\t flow.push(edgeslen[nodes[tail[i]].elist[j]]);\r\n\t\t\t\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t\t\t flow.push(flow[i]);\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t used[edges[nodes[tail[i]].elist[j]].n2] = 1;\r\n\t\t\t\t\t\t\t\t\t\t cl = cyrcle(0,0,9,\"grey\",\"green\",1);\r\n\t\t\t\t\t\t\t\t\t\t txt = label_node3(cl,flow[flow.length-1],\"white\",\"black\",0);\r\n\t\t\t\t\t\t\t\t\t\t anm_motion(cl,tail[i],edges[nodes[tail[i]].elist[j]].n2,begin,dur1,0);\r\n\t\t\t\t\t\t\t\t\t\t anm_motion(txt,tail[i],edges[nodes[tail[i]].elist[j]].n2,begin,dur1,0);\r\n\t\t\t\t\t\t\t\t\t\t anm_color(edges[nodes[tail[i]].elist[j]].gi,\"stroke\",ESTART,EACTIVE,begin,dur1,1);\r\n\t\t\t\t\t\t\t\t\t\t p3++;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t }\r\n\t\t\t\t\t p1 = p2;\r\n\t\t\t\t\t p2 = p3;\r\n\t\t\t\t\t begin+=dur1;\r\n\t\t\t\t}while(p1!=p2&&used[end_p]==0);\r\n\t\t\t\t\r\n\t\t\t\t// Finds the index int the tail of the end_p\r\n\t\t\t\tfor ( i=tail.length-1 ; i>=0&&tail[i]!=end_p ; i-- );\r\n\t\t x = i;\r\n\r\n\t\t\t\tif ( i>0 ) {\r\n\t\t\t\t curflow = flow[i];\r\n\t\t\t\t}\r\n\t\t\t\t \r\n\t\t\t\t// Changing the weigth of the edges\r\n\t\t\t\tif ( curflow!=0 ) {\r\n\t\t\t\t\t \t\t\t\t\t maxflow+=curflow;\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t cl = cyrcle(0,0,9,\"grey\",\"green\",1);\r\n\t\t\t\t\t txt = label_node3(cl,flow[x],\"white\",\"black\",0);\r\n\t\t\t\t\t cl1 = cyrcle(0,0,9,\"grey\",\"green\",1);\r\n\t\t\t\t\t txt1 = label_node3(cl1,flow[x],\"white\",\"black\",0);\r\n\t\t\t\t\t \r\n\t\t\t\t\t set(end_p_txt,\"opacity\",\"0\",begin);\r\n\t\t\t\t\t end_p_txt = label_node(end_p,maxflow,\"black\",\"black\",0);\r\n\t\t\t\t\t end_p_txt.setAttribute(\"opacity\",\"0\");\r\n\t\t\t\t\t set(end_p_txt,\"opacity\",\"1\",begin);\r\n\t\t\t\t while ( comes[x]!=-1 ) {\r\n\t\r\n\t\t\t\t\t \t\t\t anm_motion(cl,tail[comes[x]],tail[x],begin,dur1,1);\r\n\t\t\t\t\t\t\t\t anm_motion(txt,tail[comes[x]],tail[x],begin,dur1,1);\r\n \t\t\t\t\t \t\t\t anm_motion(cl1,tail[x],tail[comes[x]],begin,dur1,0);\r\n\t\t\t\t\t\t\t\t anm_motion(txt1,tail[x],tail[comes[x]],begin,dur1,0);\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t for ( j=0 ; j<nodes[tail[comes[x]]].elist.length&&edges[nodes[tail[comes[x]]].elist[j]].n2!=tail[x] ; j++ );\r\n\t\t\t\t\t\t\t\t anm_color(edges[nodes[tail[comes[x]]].elist[j]].gi,\"stroke\",EACTIVE,EVISITED,begin,dur1,1);\r\n\t\t\t\t\t\t\t\t anm_opacity(edgetxt[nodes[tail[comes[x]]].elist[j]],1,0,begin,dur2,1);\r\n \t \t\t\t\t\t\t edgeslen[nodes[tail[comes[x]]].elist[j]] -=curflow;\r\n\r\n\t\t\t\t\t\t\t\t etxt = label_node3(els[nodes[tail[comes[x]]].elist[j]],edgeslen[nodes[tail[comes[x]]].elist[j]],\"black\",\"black\",0);\r\n\t\t\t\t\t\t\t\t etxt.setAttribute(\"opacity\",\"0\");\r\n \t\t\t\t\t\t\t\t edgetxt[nodes[tail[comes[x]]].elist[j]] = etxt;\r\n\t\t\t\t\t\t\t\t anm_opacity(edgetxt[nodes[tail[comes[x]]].elist[j]],0,1,begin+dur2,dur2,1);\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t for ( j=0 ; j<nodes[tail[x]].elist.length&&edges[nodes[tail[x]].elist[j]].n2!=tail[comes[x]] ; j++ );\r\n\t\t\t\t\t\t\t\t anm_color(edges[nodes[tail[x]].elist[j]].gi,\"stroke\",EACTIVE,EVISITED,begin,dur1,1);\r\n\t\t\t\t\t\t\t\t anm_opacity(edgetxt[nodes[tail[x]].elist[j]],1,0,begin,dur2,1);\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t edgeslen[nodes[tail[x]].elist[j]] += curflow;\r\n\t\t\t\t\t\t\t\t etxt = label_node3(els[nodes[tail[x]].elist[j]],edgeslen[nodes[tail[x]].elist[j]],\"black\",\"black\",0);\r\n\t\t\t\t\t\t\t\t etxt.setAttribute(\"opacity\",\"0\");\r\n \t\t\t\t\t\t\t\t edgetxt[nodes[tail[x]].elist[j]] = etxt;\r\n\t\t\t\t\t\t\t\t anm_opacity(edgetxt[nodes[tail[x]].elist[j]],0,1,begin+dur2,dur2,1);\r\n\t\t\t\t\t\t\t\t begin+=dur2*2;\t\t\t\t\t\t\t\t \r\n\r\n\t\t\t\t\t\t\t\t x = comes[x];\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t set(start_p_txt,\"opacity\",\"0\",begin);\r\n\r\n\t\t\t\t\t start_p_txt = label_node(start_p,parseInt((-maxflow)),\"black\",\"black\",0);\r\n\t\t\t\t\t start_p_txt.setAttribute(\"opacity\",\"0\");\r\n\t\t\t\t\t set(start_p_txt,\"opacity\",\"1\",begin);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t }while(curflow!=0);\r\n\t\t bar(\"Max Flow is \"+maxflow.toString(10));\r\n\t\t\t\t\r\n\t}\r\n}", "function reflowContent() {\n\t\t\t}", "function fastFlow() {\n if(flowTimer != null && flowStarted){\n game.time.events.remove(flowTimer);\n\tanimateSpeed = 0.01;\n\tflowSpeed = 0.19;\n\ttry {animateTimer.delay = Phaser.Timer.SECOND * animateSpeed;}\n\t\t\n\tcatch (error) {console.log(\"Animation not started. \" + error);}\n\t\t\n\t\n game.time.events.add(Phaser.Timer.SECOND * 0.5, function () {flowTimer = game.time.events.loop(Phaser.Timer.SECOND * flowSpeed, runFlow, this);}, this);\n \n\t\n game.time.events.remove(timeIncrementer);\n}\n}", "animateFlow(flow, path, back, rate, offset, total) {\n let l = path.node().getTotalLength();\n const count = flow.size();\n const duration = (l * 10) / rate;\n flow\n .transition()\n .ease(\"easeLinear\")\n .duration(duration)\n .attrTween(\"transform\", this.translateDots(path, count, back, offset, total))\n .each(\"end\", () => {\n if (this.stopped === false) {\n setTimeout(() => {\n this.animateFlow(flow, path, back, rate, offset, total);\n }, 1);\n }\n });\n }", "function runFlow() {\n\tif (map.getTile(layer1.getTileX(endPipe.x * 64), layer1.getTileY(endPipe.y * 64), 'Tile Layer 1').properties.inFlow == \"down\") {\n\t\tgameWin();\n\t}\n\telse {\n\t\tflow(curPipe);\n\t}\n}", "_makeFlowPath(flow, renderFirstItem = true, renderLastItem = true) {\n let item_width = this._itemWidth;\n let item_height = this._itemHeight;\n \n let path = [];\n \n let start_i = renderFirstItem ? 0 : 1;\n let end_i = flow.length - (renderLastItem ? 0 : 1);\n \n if (!renderFirstItem) {\n let item = flow[0];\n // Add top right corner of the first item.\n let pos = this._itemPosition(item.x, item.y);\n path.push(new Point(pos.x + item_width, pos.y));\n }\n \n // Add points for the top edge of the flow in left to right order.\n for (let i = start_i; i < end_i; i++) {\n let item = flow[i];\n // Add a line segment for the top of the i-th item.\n let pos = this._itemPosition(item.x, item.y);\n path.push(pos, new Point(pos.x + item_width, pos.y));\n }\n \n if (!renderLastItem) {\n let item = flow[length - 1];\n // Extend the path to the leftmost edge of the last item.\n let pos = this._itemPosition(item.x, item.y);\n path.push(pos, new Point(pos.x, pos.y + item_height));\n }\n \n // Add points for the bottom edge of the flow in right to left order.\n for (let i = end_i - 1; i >= start_i; i--) {\n let item = flow[i];\n // Add a line segment for the bottom of the i-th item.\n let pos = this._itemPosition(item.x, item.y);\n pos.y += item_height;\n path.push(new Point(pos.x + item_width, pos.y), pos);\n }\n \n if (!renderFirstItem) {\n let item = flow[0];\n // Add bottom right corner of the first item.\n let pos = this._itemPosition(item.x, item.y);\n path.push(new Point(pos.x + item_width, pos.y + item_width));\n }\n return path;\n }", "function Flow(opt) {\n\topt = typeof opt === \"undefined\" ? {} : opt;\n\tvar sopt = {};\n\tif (typeof opt.surface === \"undefined\") {\n\t\tsopt = {\n\t\t\tcolor:\"#000\",\n\t\t\ttool:\"pen\",\n\t\t\tstrokeWidth:3\n\t\t};\n\t}\n\tsopt.color = typeof opt.color === \"undefined\" ? sopt.color : opt.color;\n\tsopt.tool = typeof opt.tool === \"undefined\" ? sopt.tool : opt.tool;\n\tsopt.strokeWidth = typeof opt.strokeWidth === \"undefined\" ? sopt.strokeWidth : opt.strokeWidth;\n\t\n\tthis.p = [];\n\t//If points have been supplied\n\tif(typeof opt.points !== \"undefined\") {\n\t\tthis.s = hiddensurface;\n\t\tthis.start(opt.points[0]);\n\t\tthis.p = opt.points;\n\t\tthis.redraw();\n\t\t//If no surface has been supplied\n\t\tif (typeof opt.surface === \"undefined\") {\n\t\t\t$.extend(sopt, {\n\t\t\t\tx:this.minx - (2*sopt.strokeWidth),\n\t\t\t\ty:this.miny - (2*sopt.strokeWidth),\n\t\t\t\toffsetx:this.minx - (2*sopt.strokeWidth),\n\t\t\t\toffsety:this.miny - (2*sopt.strokeWidth),\n\t\t\t\tw:this.maxx - this.minx + (4*sopt.strokeWidth),\n\t\t\t\th:this.maxy - this.miny + (4*sopt.strokeWidth)\n\t\t\t});\n\t\t}\n\t}\n\tif (typeof opt.surface === \"undefined\") {\n\t\topt.surface = new Surface(sopt);\n\t}\n\t\n\tif(typeof opt.color != \"undefined\") {opt.surface.color(opt.color);}\n\tif(typeof opt.tool != \"undefined\") {opt.surface.tool(opt.tool);}\n\tif(typeof opt.strokeWidth != \"undefined\") {opt.surface.strokeWidth(opt.strokeWidth);}\n\t\n\tthis.s = opt.surface;\n\tthis.c = this.s.color();\n\tthis.t = this.s.tool();\n\tthis.sw = this.s.strokeWidth();\n\tthis.redraw();\n this.lasttime = new Date().getTime();\n}", "getFlow(name) {\n let uriMatches = cts.uriMatch('/flows/'+name+'.flow.json', ['case-insensitive'], cts.directoryQuery(\"/flows/\"));\n // cache flow to prevent repeated calls.\n if (cachedFlows[name] === undefined) {\n if (fn.count(uriMatches) === 1) {\n cachedFlows[name] = cts.doc(fn.head(uriMatches)).toObject();\n } else if (fn.count(uriMatches) > 1) {\n for (let uri of uriMatches) {\n if (uri === '/flows/' + name + '.flow.json') {\n cachedFlows[name] = cts.doc(uriMatches).toObject();\n break;\n }\n }\n } else {\n cachedFlows[name] = null;\n }\n }\n return cachedFlows[name];\n }", "followFlowField(flowField) {\n // What is the vector at that spot in the flow field?\n let desired = flowField.lookup(this.location);\n // Scale it up by maxspeed\n desired.mult(this.maxSpeed);\n // Steering is desired minus velocity\n let steer = p5.Vector.sub(desired, this.velocity);\n steer.limit(this.maxForce); // Limit to maximum steering force\n this.applyForce(steer);\n }", "function changeFlowItemToFitLargeWindow(i) {\n deckTitle[i].style.left = \"60px\";\n imageFlowCard[i].style.width = \"144px\";\n imageFlowCard[i].style.height = \"166px\";\n imageFlowCard[i].style.right = \"60px\";\n imageFlowCard[i].style.top = \"30px\";\n deckTitle[i].style.maxWidth = \"50%\";\n\n}", "validateFlow() {\n if (this.originalFlow) {\n if (!this.originalFlow.hasOwnProperty('flow')) {\n this.code = ERROR.FLOW_NAME;\n return this.code;\n }\n if (!this.originalFlow.hasOwnProperty('comment')) {\n this.code = ERROR.FLOW_COMMENT;\n return this.code;\n }\n if (!this.originalFlow.hasOwnProperty('startAt')) {\n this.code = ERROR.FLOW_START_P;\n return this.code;\n }\n if (!this.originalFlow.hasOwnProperty('states') && !this.originalFlow.states.Object.hasOwnProprty('stop')) {\n this.code = ERROR.FLOW_STATES;\n return this.code;\n }\n }\n\n return SUCCESS.VALIDATED;\n }", "function addFlows (newFlows) {\n\t\tvar startPoint,\n\t\t\tendPoint,\n\t\t\tflow,\n\t\t\ti, j;\n\t\t\t\n\t\tfor( i= 0, j = newFlows.length; i < j; i += 1) {\n\t\t\tflow = newFlows[i];\n\t\t\t\n\t\t\t// if the node has an id\n\t\t\t\n\t\t\tstartPoint = findPoint(flow.getStartPt());\n\t\t\tendPoint = findPoint(flow.getEndPt());\n\t\t\tflow.setStartPt(startPoint[1]);\n\t\t\tflow.setEndPt(endPoint[1]);\n\t\t\t\n\t\t\t// The point is verified to not currently exist in nodes.\n\t\t\t// You can safely push it into nodes without fear of duplication.\n\t\t\t// It might not have xy though? You should make sure it has xy elsewhere. \n\t\t\tif(startPoint[0]===false) {\n\t\t\t\tnodes.push(startPoint[1]);\n\t\t\t}\n\t\t\tif(endPoint[0]===false) {\n\t\t\t\tnodes.push(endPoint[1]);\n\t\t\t}\n\t\t\t\t\t\t\n\t flows.push(flow);\n\t \n\t\t\t// If the start and end points don't have incomingFlows and \n\t\t\t// outgoingFlows as properties, add them here. \n\t\t\t// This is needed after copying the model. \n\t\t\tif(!startPoint[1].hasOwnProperty(\"outgoingFlows\")) {\n\t\t\t\tstartPoint[1].outgoingFlows = [];\n\t\t\t}\n\t\t\tif(!startPoint[1].hasOwnProperty(\"incomingFlows\")) {\n\t\t\t\tstartPoint[1].incomingFlows = [];\n\t\t\t}\n\t\t\tif(!endPoint[1].hasOwnProperty(\"outgoingFlows\")) {\n\t\t\t\tendPoint[1].outgoingFlows = [];\n\t\t\t}\n\t\t\tif(!endPoint[1].hasOwnProperty(\"incomingFlows\")) {\n\t\t\t\tendPoint[1].incomingFlows = [];\n\t\t\t}\n\t startPoint[1].outgoingFlows.push(flow);\n\t endPoint[1].incomingFlows.push(flow);\n\t \n\t assignOppositeFlow(flow);\n\t\t}\n\t //updateCachedValues();\n }", "initFlow() {\n if (this.validateFlow() == SUCCESS.VALIDATED) {\n this.code = SUCCESS.VALIDATED;\n return this.createFlow();\n }\n return { isError: true, code: this.code, item: this.originalFlow };\n }", "function makeSmall(e) {\n var ns = trjs.param.videoHeight / 1.2;\n if (ns < 120) ns = 120;\n changeToSize(ns);\n trjs.param.videoHeight = ns;\n trjs.param.saveStorage();\n }", "function _updateSlidingWindowAggregateBandwidth() {\n if (playback.state.value == Playback$STATE_NORMAL || playback.state.value == Playback$STATE_LOADING) {\n _calculateSlidingWindowAggregateBandwidth();\n }\n }", "function View() {\n\n// Flow that is currently selected by user\nthis.selectedFlow = null; \n\n// Define custom symbols\nnodeSym = {\n path: 'M0 0 m -8, 0 a 8,8 0 1,0 16,0 a 8,8, 0 1,0 -16,0',\n fillColor: 'blue',\n fillOpacity: 0.3,\n strokeColor: 'blue',\n strokeWeight: 3,\n scale: 0.5\n};\n\nlineSym = {\n path: 'M 0,-1 0,1',\n strokeOpacity: 1,\n scale: 4\n};\n\npacketSym = {\n path: 'M0,0 L2,2 M2,0 L0,2 M0,0 z', \n fillColor: '#FF0000',\n fillOpacity: 1,\n strokeColor: '#FF0000',\n scale: 1.5,\n strokeWidth: 1,\n anchor: new google.maps.Point(1,1)\n};\n\n/* Event handlers */\nthis.pathClickEvent = function (e, flow, loc){\n\n if(this.selectedFlow){\n if(flow.cid != this.selectedFlow.cid){\n tsg_clearData(); //clear graph data when switching flows\n }\n }\n\n this.selectedFlow = flow;\n\n localStorage.cid = flow.cid; // Copy flow reference to report\n\n localStorage.persist = 1; // TODO change to read from UI setting (UI element needs added)\n localStorage.interval = 0; // TODO change to read from UI setting (UI element needs added)\n\n /* pop-up to add path characteristics to filter */\n //content string for filter options table\n var contentStr = '<table border=0><tr><th>Filter</th><th>Value</th><th>Add/Remove</th></tr>';\n contentStr += '<tr><td>Exclude Port</td><td>'+flow.tuple.DestPort+'</td><td> <input id=\"chkbx-'+flow.cid+'-'+1+'\" type=\"checkbox\" onclick=\"filterlistValToggle(\\''+flow.cid+'\\','+1+')\"/> </td></tr>';\n contentStr += '<tr><td>Include Port</td><td>'+flow.tuple.DestPort+'</td><td> <input id=\"chkbx-'+flow.cid+'-'+2+'\" type=\"checkbox\" onclick=\"filterlistValToggle(\\''+flow.cid+'\\','+2+');\"/> </td></tr>';\n contentStr += '<tr><td>Include IP</td><td>'+flow.tuple.DestIP+'</td><td> <input id=\"chkbx-'+flow.cid+'-'+4+'\" type=\"checkbox\" onclick=\"filterlistValToggle(\\''+flow.cid+'\\','+4+');\"/> </td></tr>';\n contentStr += '<tr><td>Include App</td><td>'+flow.tuple.Application+'</td><td> <input id=\"chkbx-'+flow.cid+'-'+6+'\" type=\"checkbox\" onclick=\"filterlistValToggle(\\''+flow.cid+'\\','+6+');\"/> </td></tr>';\n \n //UIHandle.infoWindow.setContent('Add '+flow.tuple.DestIP+' to filter list?<br><input type=\"button\" value=\"yes\" onclick=\"filteripAppend(\\''+flow.tuple.DestIP+'\\');UIHandle.infoWindow.close()\"/>');\n UIHandle.infoWindow.setContent(contentStr);\n UIHandle.infoWindow.setPosition(loc);\n UIHandle.infoWindow.open(UIHandle.map);\n\n}.bind(this);\n\nthis.nodeClickEvent = function (e, loc, ip){\n UIHandle.infoWindow.setContent('Add '+ip+' to filter list?<br><input type=\"button\" value=\"yes\" onclick=\"filteripAppend(\\''+ip+'\\');UIHandle.infoWindow.close()\"/>');\n UIHandle.infoWindow.setPosition(loc);\n UIHandle.infoWindow.open(UIHandle.map);\n}.bind(this);\n\n/* Map initialization function */\nthis.mapInit = function () {\n if(UIHandle.host == undefined || UIHandle.host == null){ //if host is not yet set\n //request_location();\n if(UIHandle.host == undefined || UIHandle.host == null){ //if request_location failed (no browser support for navigator)\n //UIHandle.host = new google.maps.LatLng(40.4439, -79.9561); //defaut center before data is received\n UIHandle.host = new google.maps.LatLng(29.9424, -90.0634); //defaut center before data is received\n }\n }\n // Setup map\n var mapOptions = {\n center: UIHandle.host,\n zoom: 5 \n };\n UIHandle.map = new google.maps.Map(document.getElementById(\"map-canvas\"), mapOptions);\n\n // Create legend\n //var legend = document.getElementById('legend');\n //var div = document.createElement('div');\n //div.innerHTML = '<fieldset><legend>Legend</legend>value1<br>value2<br>value3<br></fieldset>';\n //legend.appendChild(div);\n //UIHandle.map.controls[google.maps.ControlPosition.RIGHT_TOP].push(document.getElementById('legend'));\n\n}// end map initialize\n\n/* UI Routines */\n\n/* Creates new UI elements for the Flow passed in. */\nthis.createUIElem = function (flow, multi){\n // Create marker at flow endpoint\n var endpoint = this.locToGLatLng(flow.latLng());\n UIHandle.markers[flow.getID()+'rem'] = new google.maps.Marker({\n position: endpoint,\n icon: nodeSym,\n map: UIHandle.map,\n zIndex: 1\n });\n\n //var host = this.locToGLatLng(flow.loc_LatLng());\n var host = UIHandle.host\n UIHandle.markers[flow.getID()+'loc'] = new google.maps.Marker({\n position: host,\n icon: nodeSym,\n map: UIHandle.map,\n zIndex: 1\n });\n\n // Create path connection host and flow endpoint\n UIHandle.paths[flow.getID()] = curved_line_generate({\n path: [host, endpoint],\n strokeOpacity: '0.9',\n //icons: [{icon: packetSym, offset: '0', repeat: this.mapSymDensity( flow )}],\n strokeColor: this.mapPathColor( flow ),\n strokeWeight: this.mapPathWidth( flow ),\n multiplier: (Math.log(multi+1)),\n map: UIHandle.map,\n zIndex: 3\n });\n\n // Add event listener to path\n google.maps.event.addListener(UIHandle.paths[flow.getID()], 'click', function(event){\n this.pathClickEvent(event, flow, endpoint);\n }.bind(this));\n\n // Add event listener to destination marker \n google.maps.event.addListener(UIHandle.markers[flow.getID()+'rem'], 'click', function(event){\n //this.nodeClickEvent(event, endpoint, flow.tuple.DestIP);\n }.bind(this));\n\n\n flow.drawn = true;\n}.bind(this);\n\n/* Removes new UI elements for the Flow passed in. */\nthis.removeUIElem = function (flow){\n\n UIHandle.markers[flow.getID()+'rem'].setMap(null); // remove from map\n UIHandle.markers[flow.getID()+'loc'].setMap(null); // remove from map\n delete UIHandle.markers[flow.getID()+'rem']; // remove remote marker\n delete UIHandle.markers[flow.getID()+'loc']; // remove local marker\n\n UIHandle.paths[flow.getID()].setMap(null); // remove from map\n delete UIHandle.paths[flow.getID()]; // remove path\n};\n\n// Data to Graphics mapping functions\nthis.mapPathColor = function (flow){\n var maxVal = 255; //max color value (black: good -> red: bad)\n var loss = null; //Percent loss. Expected range: [0.0, 1.0]\n\n //Determine which direction majority of data is flowing\n if(flow.DataOctetsOut > flow.DataOctetsIn){ //outbound flow is larger\n loss = flow.SegsRetrans / flow.SegsOut;\n }\n else{ //inbound flow is larger\n loss = flow.DupAckEpisodes / flow.DataSegsIn;\n }\n \n if(isNaN(loss)){ //if divisor was zero, set loss to zero (no data sent)\n loss = 0;\n }\n\n flow.loss = loss; //store loss estimation \n\n //Map relevent loss range [0.0001, 0.01] to color range [0, 255]\n var val = translateRange(log10(loss), -5, -2, 0, 255);\n\n hexVal = parseInt(val).toString(16); //convert from decimal to hexVal\n if(val < 16){ //if hex val only has 1 digit\n hexVal = '0'+hexVal; //pad with leading zero for #RRGGBB format\n }\n if(val > maxVal){ //prevent val from exceeding maxVal\n hexVal = 'FF';\n }\n return '#'+hexVal+'0000';\n}.bind(this);\n\nthis.mapPathWidth = function (flow){\n var maxVal = 12; // max exponent in the scale (1*10^12) -> 1 Terabit/s\n var val = null;\n var deltaIn = null;\n var deltaOut = null;\n \n if( DataContainer.getTableVal(flow.cid, 'DataOctetsOut') != undefined && flow.DataOctetsOut != undefined){ //estimate outbound throughput\n deltaOut = flow.DataOctetsOut - DataContainer.getTableVal(flow.cid, 'DataOctetsOut');\n }\n if( DataContainer.getTableVal(flow.cid, 'DataOctetsIn') != undefined ){ //estimate inbound throughput\n deltaIn = flow.DataOctetsIn - DataContainer.getTableVal(flow.cid, 'DataOctetsIn');\n }\n\n //Determine which direction majority of data is flowing\n if(flow.DataOctetsOut > flow.DataOctetsIn){ //outbound flow is larger\n val = deltaOut; \n }\n else{ //inbound flow is larger\n val = deltaIn;\n }\n val = val * 8; // # of bits\n val = log10(val); // get base 10 exponent [val: 3 -> 1x10^3 -> 1 Kbps]\n\n // check if value is valid for display (is finite and not too small)\n if( !isFinite(val) || val < 2){\n val = 2; //lines thiner than 2px are too hard to see\n }\n return val;\n}.bind(this);\n\nthis.mapSymColor = function (val){\n return '#FF0000';\n};\n\nthis.mapSymScale = function (val){\n return 1.5;\n};\n\nthis.mapSymDensity = function (flow){\n maxVal = 200; //max number of pixels between symbols\n val = (flow.SndLimTransRwin + flow.DupAcksIn)/flow.DataOctetsOut; //\"badness\" ratio: # errors to amount of data out\n val = (1-val)*maxVal; //map \"badness\" value to screen values \n return val+'px';\n};\n\n//Translates val from the old range to the new range. If val falls outside of the old range, it will be set to the closest extreme (min or max)\ntranslateRange = function(val, oldMin, oldMax, newMin, newMax){\n //Check for val out of range\n if(val<oldMin){\n val = oldMin;\n }\n else if(val>oldMax){\n val = oldMax;\n }\n\n //Calculate span of each range\n oldSpan = oldMax - oldMin;\n newSpan = newMax - newMin;\n\n //Convert old range to [0,1] range\n scaledVal = ( val-oldMin )/oldSpan;\n\n //Convert [0,1] range to new range\n return newMin + ( scaledVal*newSpan )\n};\n\nthis.report = function (){\n var command = '{\"command\":\"report\", \"options\":{\"cid\": ' +localStorage.cid + ', \"persist\": '+localStorage.persist+ ', \"interval\": '+localStorage.interval+', \"uri\":\"' +localStorage.uri+ '\", \"port\":' +localStorage.port+ ', \"db\":\"' +localStorage.db+ '\", \"dbname\":\"' +localStorage.dbname+ '\", \"dbpass\":\"' +localStorage.dbpass+ '\", \"nocemail\":\"' +localStorage.nocemail+ '\", \"fname\":\"' +localStorage.fname+ '\", \"lname\":\"' +localStorage.lname+ '\", \"email\":\"' +localStorage.email+ '\", \"institution\":\"' +localStorage.institution+ '\", \"phone\":\"' +localStorage.phone+ '\"}}';\n ctrl.model.sendMessage(MsgType.REPORT, command);\n //console.log(\"Report JSON: \"+ command);\n\n}.bind(this);\n\nthis.centerMap = function (){\n UIHandle.map.fitBounds(ctrl.view.mapBounds());\n};\n\nthis.mapBounds = function (){\n var points = DataContainer.list;\n var bounds = new google.maps.LatLngBounds();\n bounds.extend(points[0].latLng.toGLatLng()); // Add host latlng to bounds\n for (i=0; i<points.length; i++){ // Add each dest latlng to bounds\n bounds.extend(points[i].latLng.toGLatLng());\n }\n return bounds;\n};\n\nthis.writeFlowDetails = function (){\n // If a flow is selected\n if(this.selectedFlow != null){\n var contentStr = 'Application: ' + this.selectedFlow.tuple.Application;\n contentStr += '<br>Estimated Loss: ' + (this.selectedFlow.loss*100).toPrecision(5) +'%';\n\n // Iterate over each property of the Flow object.\n $.each(this.selectedFlow, function(key, val){\n if(key == 'tuple'){\n $.each(val, function(k,v){\n if( ((typeof v === 'number' || typeof v === 'string') && (k != 'Application')) ){\n contentStr += \"<br>\"+k+\": \"+v;\n }\n });\n }\n if( (typeof val === 'number' || typeof val === 'string') && (key != 'cid' && key != 'rem_lat' && key != 'rem_long' && key != 'loc_long' && key != 'loss') ){\n contentStr += \"<br>\"+key+\": \"+val;\n }\n });\n \n //update title\n $('#con-title').empty();\n $('#con-title').append('Connection Details'+' - Cid '+this.selectedFlow.cid);\n\n //update content\n $('#con-field').empty();\n $('#con-field').append(contentStr);\n }\n else{\n $('#con-field').empty();\n }\n}.bind(this);\n\nthis.setConnectionStatus = function (str){\n $('#con-stat').html(str);\n};\n\n/* Converts dataObject's Location object to Google API's LatLng object */\nthis.locToGLatLng = function (loc){\n return new google.maps.LatLng(loc.lat, loc.lng);\n};\n\n/* Returns the number of flows drawn onto the map whose DestIP matches ip */\nthis.countDestIP = function (ip){\n var cnt = 0;\n for(var i=0; i<DataContainer.list.length; i++){\n if(DataContainer.list[i] != undefined && DataContainer.list[i].drawn == true){\n if(DataContainer.list[i].tuple.DestIP == ip)\n cnt++;\n }\n }\n\n return cnt;\n};\n\n// Set the content to be displayed in the modal box\nthis.setModalContent = function(htmlStr){\n $('#modal-content').empty();\n $('#modal-content').append(htmlStr);\n}\n\n// Toggle the modal box's visiblity\nthis.showModal = function(show) {\n if(show == true){\n $('#modal').css('display', 'block');\n }else if(show == false){\n $('#modal').css('display', 'none');\n }\n};\n\n// Pulls values from each contact-info-form field into persistent storage (html5 localStorage)\nthis.getContactInfo = function() {\n localStorage.fname = $('#fname').val(); \n localStorage.lname = $('#lname').val(); \n localStorage.email = $('#email').val(); \n localStorage.institution = $('#institution').val(); \n localStorage.phone = $('#phone').val(); \n}.bind(this);\n\n// Checks if any contact-info-form fields are empty\nthis.hasContactInfo = function(){\n if( $('#fname').val() == \"\" | $('#lname').val() == \"\" |$('#email').val() == \"\" | $('#institution').val() == \"\" | $('#phone').val() == \"\" ){\n return false;\n }else{ return true; }\n}.bind(this);\n\n// Populates contact-info fields with persistent data storage (localStorage)\nthis.refreshContactInfo = function(){\n if( localStorage.hasContactInfo == 'true' ){\n $('#usr-fname').val(localStorage.fname);\n $('#usr-lname').val(localStorage.lname);\n $('#usr-email').val(localStorage.email);\n $('#usr-institution').val(localStorage.institution);\n $('#usr-phone').val(localStorage.phone);\n }\n}.bind(this);\n\n// Pop-up modal box to fill out contact-info-form\nthis.editContactInfo = function(){\n \n ctrl.view.setModalContent( $('#contact-info-form').html() );\n $('#fname').val(localStorage.fname);\n $('#lname').val(localStorage.lname);\n $('#email').val(localStorage.email);\n $('#institution').val(localStorage.institution);\n $('#phone').val(localStorage.phone);\n ctrl.view.showModal(true);\n}.bind(this);\n\n// Clears stored contact information from form and localStorage\nthis.clearContactInfo = function(){\n // clear localStorage\n delete localStorage.fname;\n delete localStorage.lname;\n delete localStorage.email;\n delete localStorage.institution;\n delete localStorage.phone;\n \n localStorage.hasContactInfo = false;\n\n // clear contact-info panel\n $('#fname').val('');\n $('#lname').val('');\n $('#email').val('');\n $('#institution').val('');\n $('#phone').val('');\n}\n\n// Submits Contact Info form and closes modal box\nthis.submitContactForm = function(){\n if( this.hasContactInfo() ){\n this.getContactInfo();\n localStorage.hasContactInfo = true;\n this.showModal(false);\n this.setModalContent('');\n }\n}.bind(this);\n\n// Displays report in modal box\nthis.showReport = function() {\n // Add exit button\n htmlStr = ' <a href=\"#\" class=\".close\" onclick=\"ctrl.view.showModal(false)\">&#10006</a> ';\n // Display report content\n htmlStr += '<h1>Report Sent</h1>'\n + '<br><h2>Contact Information</h2>'\n + '<br>First Name: '+localStorage.fname\n + '<br>Last Name: '+localStorage.lname\n + '<br>Email: '+localStorage.email\n + '<br>Institution: '+localStorage.institution\n + '<br>Phone Number: '+localStorage.phone\n + '<br><h2>Connection Information</h2>'\n + '<br>CID: '+localStorage.cid\n\n this.setModalContent(htmlStr);\n this.showModal(true);\n}.bind(this);\n\n// Displays report error Details\nthis.reportFail = function(){\n // Add exit button\n htmlStr = ' <a href=\"#\" class=\".close\" onclick=\"ctrl.view.showModal(false)\">&#10006</a> ';\n // Display report content\n htmlStr += '<h1>Failed to Send Report</h1>'\n + 'There was a problem connecting to the database.<br>'\n + '<input type=\"button\" value=\"Resend\" onclick=\"ctrl.view.report(); ctrl.view.showModal(false)\"/>'\n + '<input type=\"button\" value=\"Cancel\" onclick=\"ctrl.view.showModal(false)\"/>';\n\n this.setModalContent(htmlStr);\n this.showModal(true);\n}.bind(this);\n\n\n\n}// end View", "function minimiseBandwidth (item) {\n return {\n type: item.type,\n id: item.id,\n url: item.url,\n packageOffer: {\n hotel: {\n name: item.packageOffer.hotel.name,\n images: {\n small: [ item.packageOffer.hotel.images.small[0] ] // only one!\n },\n starRating: item.packageOffer.hotel.starRating,\n place: item.packageOffer.hotel.place,\n concept: item.packageOffer.hotel.concept\n },\n flights: {\n outbound: [ item.packageOffer.flights.outbound[0] ],\n inbound: [ item.packageOffer.flights.inbound[0] ]\n },\n price: item.packageOffer.price, // all fields\n provider: item.packageOffer.provider, // all fields\n nights: item.packageOffer.nights,\n destinationCode: item.packageOffer.destinationCode,\n destinationName: item.packageOffer.destinationName,\n departureCode: item.packageOffer.departureCode\n }\n };\n}", "function updateFigures(flow_name,json) {\n var path = json.pathname,\n type = json.type,\n valid = json.valid,\n drvr = json.driver,\n flow = json.workflow,\n asm = openmdao.Util.getPath(path),\n comp_key = flow_name+':'+path,\n comp_fig, flow_fig, flowpath, newflow_fig, count, x, y;\n\n if (flow) {\n // add driver figure\n if (comp_figs.hasOwnProperty(comp_key)) {\n comp_fig = comp_figs[comp_key];\n }\n else {\n comp_fig = new openmdao.WorkflowComponentFigure(model,path,type,valid);\n comp_figs[comp_key] = comp_fig;\n }\n\n flow_fig = flow_figs[flow_name];\n if (flow_fig) {\n flow_fig.addComponentFigure(comp_fig);\n }\n else {\n workflow.addFigure(comp_fig,50,50);\n }\n\n // add workflow compartment figure for this flow\n // (overlap bottom right of driver figure)\n flowpath = flow_name+'.'+path;\n newflow_fig = new openmdao.WorkflowFigure(model,flowpath,path,comp_fig);\n x = comp_fig.getAbsoluteX()+comp_fig.getWidth()-20;\n y = comp_fig.getAbsoluteY()+comp_fig.getHeight()-10;\n workflow.addFigure(newflow_fig,x,y);\n if (flow_fig) {\n newflow_fig.horizontal = !flow_fig.horizontal;\n flow_fig.addChild(newflow_fig);\n }\n flow_figs[flowpath] = newflow_fig;\n\n jQuery.each(flow,function(idx,comp) {\n updateFigures(flowpath,comp);\n });\n }\n else if (drvr) {\n // don't add a figure for an assembly,\n // it will be represented by it's driver\n updateFigures(flow_name,drvr);\n }\n else {\n // add component figure\n if (comp_figs.hasOwnProperty(comp_key)) {\n comp_fig = comp_figs[comp_key];\n }\n else {\n comp_fig = new openmdao.WorkflowComponentFigure(model,path,type,valid);\n comp_figs[comp_key] = comp_fig;\n }\n\n flow_fig = flow_figs[flow_name];\n if (flow_fig) {\n flow_fig.addComponentFigure(comp_fig);\n }\n else {\n workflow.addFigure(comp_fig,50,50);\n }\n }\n }", "function sheet_prune(flows, node) {\n var pruned_flow = null;\n var pruned_stat = PRUNE_OK;\n var pruned_msg = \"Prune ok\";\n var tab_id = null;\n\n var get_node_id = function() {\n return (1 + Math.random()*4294967295).toString(16);\n };\n\n // find user specified tab id\n for(var k in flows) {\n if((flows[k].type === \"tab\") && (flows[k].label === node.sheet)) {\n tab_id = flows[k].id;\n break;\n }\n }\n\n if(tab_id) {\n try {\n var sub_flows = traverse_subflows(flows, [tab_id], []);\n\n var protocol = (/^https$/i.test(node.protocol))? \"wss\" : \"ws\";\n var cfg_id = get_node_id();\n var ws_cfg = {\n \"id\": cfg_id\n , \"type\": \"websocket-client\"\n , \"path\": (protocol + \"://\" + node.local_url + \"/\" + node.id)\n , \"wholemsg\": \"false\"\n };\n\n pruned_flow = [];\n var d_in = d_out = 0;\n for(var k in flows) {\n if((flows[k].id === tab_id) || // 1: user specified tab\n (flows[k].z === tab_id) || // 2: nodes on user specified tab\n (~sub_flows.indexOf(flows[k].z)) || // 3: nodes on dispatched subflows\n ((flows[k].type === \"subflow\") && ~sub_flows.indexOf(flows[k].id))) { // 4: dispatched subflows\n\n // repace delegate nodes with websocket-client\n if((flows[k].type === \"flow-dlg-in\" || flows[k].type === \"flow-dlg-out\")) {\n // push configuration node for websocket-client\n if(!~pruned_flow.indexOf(ws_cfg)) {\n pruned_flow.push(ws_cfg);\n }\n\n // replace delegate-in node with websocket-in node\n flows[k].server = \"\";\n flows[k].client = cfg_id;\n if(flows[k].type === \"flow-dlg-in\") {\n ++d_in;\n\n // add a function node to remove msg._session from websocket input\n var func_id = get_node_id();\n func_node = {\n \"id\": func_id\n , \"type\": \"function\"\n , \"name\":\"reset-ws-sess\"\n , \"func\":\"if(msg._session) {\\n\" +\n \" msg.session_in = msg._session;\\n\" +\n \" delete msg._session;\\n\" +\n \"}\\n\" +\n \"return msg;\"\n , \"outputs\": 1\n , \"noerr\": 0\n , \"x\": flows[k].x\n , \"y\": flows[k].y + 50\n , \"z\": flows[k].z\n , \"wires\": flows[k].wires\n };\n pruned_flow.push(func_node);\n\n // connect websocket-in to above function node\n flows[k].type = \"websocket in\";\n flows[k].wires = [[func_id]];\n } else {\n ++d_out;\n flows[k].type = \"websocket out\";\n }\n }\n\n pruned_flow.push(flows[k]); // push this node\n } else if(!(flows[k].type === \"tab\" || flows[k].type === \"subflow\") && // 1: neither a tab nor a subflow\n !(flows[k].x || flows[k].y || flows[k].z)) { // 2: no x, y and z property\n // push configuration node\n pruned_flow.push(flows[k]);\n }\n }\n\n if(!(d_in || d_out)) {\n pruned_msg = \"Neither delegate-in node nor delegate-out node exists.\";\n pruned_stat = PRUNE_DELEGATE_ERR;\n } else if((d_in > 1) || (d_out > 1)) {\n pruned_msg = \"Number of delegate nodes error. \" +\n \"(#dlg-in: \" + d_in + \", #dlg-out: \" + d_out + \")\";\n pruned_stat = PRUNE_DELEGATE_ERR;\n }\n } catch(err) {\n pruned_stat = PRUNE_UNKNOWN_ERR;\n pruned_msg = \"Exception while sheet pruning.\";\n pruned_flow = null;\n\n node.status({fill: \"red\", shape: \"ring\", text: pruned_msg});\n console.log(pruned_msg);\n }\n } else {\n pruned_stat = PRUNE_NOT_FOUND_ERR;\n pruned_msg = \"Sheet not found (\" + node.sheet + \")\";\n node.status({fill: \"red\", shape: \"ring\", text: pruned_msg});\n }\n\n return {\n \"status\": pruned_stat\n , \"flow\": pruned_flow\n , \"msg\" : pruned_msg\n };\n }", "function getFlowPointGap() {\n // Get longest and shortest flow baseline lengths\n \n // FIXME this is all goofy, needs updated to worked with cashed values\n var flowLengthMinMax = getMinMaxFlowLength(),\n\t\t\tlongestFlowLength = flowLengthMinMax.max,\n\t\t\tshortestFlowLength = flowLengthMinMax.min,\n\t\t\ttol = shortestFlowLength/(settings.maxFlowPoints+1);\n\n // FIXME Not sure why this conditional statement is used. \n // When would the first condition ever be true? \n if (longestFlowLength / tol <= settings.maxFlowPoints+1) {\n return tol;\n } \n return longestFlowLength / (settings.maxFlowPoints+1);\n }", "guaranteeLimit() {\n if (this.size === this.maxSize) {\n this.removeResponse(this.tail.urlId);\n }\n }", "function flow(from, rate, to) {\n\tto = to || universe;\n\treturn { from:from, rate:rate, to:to };\n}", "function makeBig(e) {\n var ns = trjs.param.videoHeight * 1.2;\n if (ns > 480) ns = 480;\n changeToSize(ns);\n trjs.param.videoHeight = ns;\n trjs.param.saveStorage();\n }", "changeSize( preCovid ) {\n\n if ( preCovid ) {\n // larger the frequency, bigger the size\n if ( this.size < this.preCovidSize ) {\n this.size++;\n }\n else if ( this.size > this.preCovidSize ) {\n this.size--;\n }\n }\n else {\n if ( this.size < this.postCovidSize ) {\n this.size++;\n }\n else if ( this.size > this.postCovidSize ) {\n this.size--;\n }\n }\n }", "constructor(){\n\t\tthis.flowTree = [];\n\t\tthis.structure = {nodes: [], connections: [], transform: [1, 0, 0, 1, 0, 0]};\n\t\tthis._registeredNodes = {};\n\t}", "function HFlowLayout() {\n this.base = new BaseObj(this);\n this.tpos = new Rect(0, 0, 0, 0);\n\n var children = [];\n\n this.clear = function () {\n children = [];\n this.base.removeAllChildren();\n }\n\n this.add = function (ui) {\n children.push(ui);\n this.base.addChild(ui);\n }\n\n this.insert = function (index, ui) {\n children.splice(index, 0, ui);\n this.base.addChild(ui);\n }\n\n this.resize = function (rect) {\n var height = rect.h;\n var widths = [];\n var totalWidth = 0;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var width = child.optimalWidth(height);\n totalWidth += width;\n widths.push(width);\n }\n\n // Make sure we can fit.\n if (totalWidth > rect.w) {\n for (var i = 0; i < widths.length; i++) {\n widths[i] *= rect.w / totalWidth;\n widths[i] = Math.max(Math.round(widths[i]), 1);\n }\n }\n\n var curX = rect.x;\n for (var i = 0; i < children.length; i++) {\n var width = widths[i];\n var childRect = new Rect(curX, rect.y, width, height);\n children[i].resize(childRect);\n curX += width;\n }\n }\n\n this.optimalWidth = function (height) {\n var totalWidth = 0;\n for (var i = 0; i < children.length; i++) {\n totalWidth += children[i].optimalWidth(height);\n }\n return totalWidth;\n }\n}", "function Dataflow() {\n this._log = vegaUtil.logger();\n\n this._clock = 0;\n this._rank = 0;\n this._loader = vegaLoader.loader();\n\n this._touched = UniqueList(vegaUtil.id);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new Heap(function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n}", "getUpdateSelectFlow(ctx, flow) {\n ctx.commit('updateSelectFlow', flow)\n }", "function getArrowSettings(flow) {\n\t\tvar arrowSettings,\n\t\t\ti, j, lastFlowIndex,\n\t\t\tminFlowWidth,\n\t\t\tmaxFlowValue,\n\t\t\tendClipRadius, startClipRadius, endPt, startPt;\n\t\t\n\t\tendPt = flow.getEndPt();\n\t\tstartPt = flow.getStartPt();\n\t\t\n\t\tif(endPt.necklaceMapNode) {\n\t\t\tendClipRadius = endPt.r + endPt.strokeWidth;\n\t\t} else {\n\t\t\tendClipRadius = getEndClipRadius(endPt);\t\n\t\t}\n\t\t\n\t\tif(startPt.necklaceMapNode) {\n\t\t\tstartClipRadius = startPt.r + startPt.strokeWidth;\n\t\t} else {\n\t\t\tstartClipRadius = getStartClipRadius(startPt);\t\n\t\t}\n\t\t\n\t\tif(settings.useGlobalFlowWidth) {\n\t\t\tmaxFlowValue = settings.maxFlowValue;\n\t\t} else {\n\t\t\tmaxFlowValue = flows[0].getValue();\n\t\t}\n\t\t\n\t\tarrowSettings = {\n\t\t\tendClipRadius: endClipRadius,\n\t\t\tstartClipRadius: startClipRadius,\n\t\t\tminFlowWidth: settings.minFlowWidth,\n\t\t\tmaxFlowValue: maxFlowValue,\n\t\t\tmaxFlowWidth: settings.maxFlowWidth,\n\t\t\tscaleMultiplier: settings.scaleMultiplier,\n\t\t\tarrowSizeRatio: settings.arrowSizeRatio,\n\t\t\tarrowLengthRatio: settings.arrowLengthRatio,\n\t\t\tarrowLengthScaleFactor: settings.arrowLengthScaleFactor,\n\t\t\tarrowWidthScaleFactor: settings.arrowWidthScaleFactor,\n\t\t\tarrowCornerPosition: settings.arrowCornerPosition,\n\t\t\tarrowEdgeCtrlWidth: settings.arrowEdgeCtrlWidth,\n\t\t\tarrowEdgeCtrlLength: settings.arrowEdgeCtrlLength\n\t\t};\n\t\treturn arrowSettings;\t\n\t}", "function draw() {\n if (controllers.free_flow_flag) {\n draw_step();\n }\n\n}", "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "function calculateCoherentFlow() {\n // clear prior flow information\n dataFlowModel.resetCalculatedFlowInformation();\n infrastructureModel.resetCalculatedFlowInformation();\n\n // only re-calculate when all modules assigned\n if (dataFlowModel.checkAllModulesAssigned() === false) {\n console.log(\"Not all Modules are assigned yet, so not re-calculating.\");\n return;\n }\n\n console.log(\"All Modules are assigned, re-calculating coherent flow.\");\n\n const dataPaths = dataFlowModel.dataPaths.get();\n const impossiblePaths = [];\n\n for (let i = 0; i < dataPaths.length; i++) {\n const dataPath = dataPaths[i];\n const initialNodeId = dataFlowModel.nodeToModuleAssignments[dataPath_from(dataPath)];\n const finalNodeId = dataFlowModel.nodeToModuleAssignments[dataPath_to(dataPath)];\n\n if (initialNodeId === finalNodeId) {\n console.log(\"We don't need to calculate, because we stay on the same node\");\n } else {\n // let's get the dijkstra problem (-> considering the dataPath's required bandwidth)\n const problem = infrastructureModel\n .getDijkstraProblemForInfrastructure(dataPath_requiredBandwidth(dataPath));\n\n const dijkstraResult = dijkstra(problem, initialNodeId, finalNodeId);\n\n // DATA PATH IS NOT POSSIBLE\n if (dijkstraResult.dijkstraCost === \"Infinity\") {\n impossiblePaths.push(dataPath);\n }\n\n // THERE IS A PATH TO ANOTHER NODE\n console.log(\"Path involves these nodes: \" + dijkstraResult.path);\n\n // there is possibly no direct connection between lastNodeId and nextNodeId, that's why we do this\n // --> in this case we need to go via another node\n let n1 = undefined;\n let n2 = undefined;\n const idsOfInvolvedConnections = [];\n\n dijkstraResult.path.forEach(function (nodeId) {\n n2 = nodeId;\n\n if (n1 !== undefined && n2 !== undefined) {\n const connectionId = infrastructureModel.getConnectionIdBetweenNodes(n1, n2);\n // Taking a path requires bandwidth\n infrastructureModel.addUsedBandwidthToConnectionWithId(connectionId,\n dataPath_requiredBandwidth(dataPath));\n idsOfInvolvedConnections.push(connectionId);\n }\n\n n1 = n2;\n });\n\n // Let's save the path\n dataFlowModel.addFlowInformationToDataPath({\n dataPathId: dataPath_id(dataPath),\n involvedConnectionIds: idsOfInvolvedConnections\n });\n }\n }\n\n if (impossiblePaths.length === 0) {\n dataFlowModel.coherentFlowFound = true;\n console.log(\"A coherent flow was found!\");\n } else {\n // We calculated all paths and set the information. Now we have to clean up if a prior path was broken\n dataFlowModel.coherentFlowFound = false;\n console.log(\"No coherent flow exists\");\n\n impossiblePaths.forEach(function (impPath) {\n _clearSubsequentDataPathsRecursively(impPath, dataPath_id(impPath));\n });\n }\n\n // set the impossible paths\n dataFlowModel.impossiblePaths = impossiblePaths;\n\n // final step: let's calculate some more flow properties\n dataFlowModel.modules.forEach(function (module) {\n _calculateProcessingTimeForModuleWithId(module_id(module));\n _calculateProcessingCostForModuleWithId(module_id(module));\n });\n\n dataFlowModel.dataPaths.forEach(function (dataPath) {\n _calculateTransmissionTimeForDataPathWithId(dataPath_id(dataPath));\n _calculateTransmissionCostForDataPathWithId(dataPath_id(dataPath));\n });\n\n}", "static from(data){\n return FlowFactory.getFlow(data);\n }", "function generateFlowData() {\n\td3.range(numFlowData).forEach((i) => {\n\t flowData[i] = normalize([\n Math.random() * 2 - 1, // column\n Math.random() * 2 - 1, // row\n 3 * Math.random(), // magnitude\n ]);\n\t});\n}", "function ImageFlow(){this.defaults={animationSpeed:50,aspectRatio:1.964,buttons:!1,captions:!0,circular:!1,imageCursor:\"default\",ImageFlowID:\"imageflow\",imageFocusM:1,imageFocusMax:4,imagePath:\"\",imageScaling:!0,imagesHeight:.67,imagesM:1,onClick:function(){document.location=this.url},opacity:!1,opacityArray:[10,8,6,4,2],percentLandscape:118,percentOther:100,preloadImages:!0,reflections:!0,reflectionGET:\"\",reflectionP:.5,reflectionPNG:!1,reflectPath:\"\",scrollbarP:.6,slider:!0,sliderCursor:\"e-resize\",sliderWidth:14,slideshow:!1,slideshowSpeed:1500,slideshowAutoplay:!1,startID:1,glideToStartID:!0,startAnimation:!1,xStep:150};var t=this;this.init=function(e){for(var i in t.defaults)this[i]=void 0!==e&&void 0!==e[i]?e[i]:t.defaults[i];var n=document.getElementById(t.ImageFlowID);if(n&&(n.style.visibility=\"visible\",this.ImageFlowDiv=n,this.createStructure())){this.imagesDiv=document.getElementById(t.ImageFlowID+\"_images\"),this.captionDiv=document.getElementById(t.ImageFlowID+\"_caption\"),this.navigationDiv=document.getElementById(t.ImageFlowID+\"_navigation\"),this.scrollbarDiv=document.getElementById(t.ImageFlowID+\"_scrollbar\"),this.sliderDiv=document.getElementById(t.ImageFlowID+\"_slider\"),this.buttonNextDiv=document.getElementById(t.ImageFlowID+\"_next\"),this.buttonPreviousDiv=document.getElementById(t.ImageFlowID+\"_previous\"),this.buttonSlideshow=document.getElementById(t.ImageFlowID+\"_slideshow\"),this.indexArray=[],this.current=0,this.imageID=0,this.target=0,this.memTarget=0,this.firstRefresh=!0,this.firstCheck=!0,this.busy=!1;var o=this.ImageFlowDiv.offsetWidth,s=Math.round(o/t.aspectRatio);document.getElementById(t.ImageFlowID+\"_loading_txt\").style.paddingTop=.5*s-22+\"px\",n.style.height=s+\"px\",this.loadingProgress()}},this.createStructure=function(){for(var e,i,n,o,s=t.Helper.createDocumentElement(\"div\",\"images\"),r=t.ImageFlowDiv.childNodes.length,a=0;r>a;a++)e=t.ImageFlowDiv.childNodes[a],e&&1==e.nodeType&&\"IMG\"==e.nodeName&&(t.reflections===!0&&(i=t.reflectionPNG?\"3\":\"2\",n=t.imagePath+e.getAttribute(\"src\",2),n=t.reflectPath+\"reflect\"+i+\".php?img=\"+n+t.reflectionGET,e.setAttribute(\"src\",n)),o=e.cloneNode(!0),s.appendChild(o));if(t.circular){var l=t.Helper.createDocumentElement(\"div\",\"images\"),c=t.Helper.createDocumentElement(\"div\",\"images\");if(r=s.childNodes.length,r<t.imageFocusMax&&(t.imageFocusMax=r),r>1){var u;for(u=0;r>u;u++)e=s.childNodes[u],u<t.imageFocusMax&&(o=e.cloneNode(!0),l.appendChild(o)),r-u<t.imageFocusMax+1&&(o=e.cloneNode(!0),c.appendChild(o));for(u=0;r>u;u++)e=s.childNodes[u],o=e.cloneNode(!0),c.appendChild(o);for(u=0;u<t.imageFocusMax;u++)e=l.childNodes[u],o=e.cloneNode(!0),c.appendChild(o);s=c}}if(t.slideshow){var h=t.Helper.createDocumentElement(\"div\",\"slideshow\");s.appendChild(h)}var d=t.Helper.createDocumentElement(\"p\",\"loading_txt\"),p=document.createTextNode(\" \");d.appendChild(p);var f=t.Helper.createDocumentElement(\"div\",\"loading\"),m=t.Helper.createDocumentElement(\"div\",\"loading_bar\");f.appendChild(m);var g=t.Helper.createDocumentElement(\"div\",\"caption\"),v=t.Helper.createDocumentElement(\"div\",\"scrollbar\"),y=t.Helper.createDocumentElement(\"div\",\"slider\");if(v.appendChild(y),t.buttons){var b=t.Helper.createDocumentElement(\"div\",\"previous\",\"button\"),w=t.Helper.createDocumentElement(\"div\",\"next\",\"button\");v.appendChild(b),v.appendChild(w)}var x=t.Helper.createDocumentElement(\"div\",\"navigation\");x.appendChild(g),x.appendChild(v);var _=!1;if(t.ImageFlowDiv.appendChild(s)&&t.ImageFlowDiv.appendChild(d)&&t.ImageFlowDiv.appendChild(f)&&t.ImageFlowDiv.appendChild(x)){for(r=t.ImageFlowDiv.childNodes.length,a=0;r>a;a++)e=t.ImageFlowDiv.childNodes[a],e&&1==e.nodeType&&\"IMG\"==e.nodeName&&t.ImageFlowDiv.removeChild(e);_=!0}return _},this.loadingProgress=function(){var e=t.loadingStatus();(100>e||t.firstCheck)&&t.preloadImages?t.firstCheck&&100==e?(t.firstCheck=!1,window.setTimeout(t.loadingProgress,100)):window.setTimeout(t.loadingProgress,40):(document.getElementById(t.ImageFlowID+\"_loading_txt\").style.display=\"none\",document.getElementById(t.ImageFlowID+\"_loading\").style.display=\"none\",window.setTimeout(t.Helper.addResizeEvent,1e3),t.refresh(),t.max>1&&(t.MouseWheel.init(),t.MouseDrag.init(),t.Touch.init(),t.Key.init(),t.slideshow&&t.Slideshow.init(),t.slider&&(t.scrollbarDiv.style.visibility=\"visible\")))},this.loadingStatus=function(){for(var e=t.imagesDiv.childNodes.length,i=0,n=0,o=null,s=0;e>s;s++)o=t.imagesDiv.childNodes[s],o&&1==o.nodeType&&\"IMG\"==o.nodeName&&(o.complete&&n++,i++);var r=Math.round(n/i*100),a=document.getElementById(t.ImageFlowID+\"_loading_bar\");a.style.width=r+\"%\",t.circular&&(i-=2*t.imageFocusMax,n=1>r?0:Math.round(i/100*r));var l=document.getElementById(t.ImageFlowID+\"_loading_txt\"),c=document.createTextNode(\"loading images \"+n+\"/\"+i);return l.replaceChild(c,l.firstChild),r},this.refresh=function(){this.imagesDivWidth=t.imagesDiv.offsetWidth+t.imagesDiv.offsetLeft,this.maxHeight=Math.round(t.imagesDivWidth/t.aspectRatio),this.maxFocus=t.imageFocusMax*t.xStep,this.size=.5*t.imagesDivWidth,this.sliderWidth=.5*t.sliderWidth,this.scrollbarWidth=(t.imagesDivWidth-2*Math.round(t.sliderWidth))*t.scrollbarP,this.imagesDivHeight=Math.round(t.maxHeight*t.imagesHeight),t.ImageFlowDiv.style.height=t.maxHeight+\"px\",t.imagesDiv.style.height=t.imagesDivHeight+\"px\",t.navigationDiv.style.height=t.maxHeight-t.imagesDivHeight+\"px\",t.captionDiv.style.width=t.imagesDivWidth+\"px\",t.captionDiv.style.paddingTop=\"0px\",t.scrollbarDiv.style.width=t.scrollbarWidth+\"px\",t.scrollbarDiv.style.marginTop=\"0px\",t.scrollbarDiv.style.marginLeft=Math.round(t.sliderWidth+(t.imagesDivWidth-t.scrollbarWidth)/2)+\"px\",t.sliderDiv.style.cursor=t.sliderCursor,t.sliderDiv.onmousedown=function(){return t.MouseDrag.start(this),!1},t.buttons&&(t.buttonPreviousDiv.onclick=function(){t.MouseWheel.handle(1)},t.buttonNextDiv.onclick=function(){t.MouseWheel.handle(-1)});for(var e=t.reflections===!0?t.reflectionP+1:1,i=t.imagesDiv.childNodes.length,n=0,o=null,s=0;i>s;s++)o=t.imagesDiv.childNodes[s],null!==o&&1==o.nodeType&&\"IMG\"==o.nodeName&&(this.indexArray[n]=s,o.url=o.getAttribute(\"longdesc\"),o.xPosition=-n*t.xStep,o.i=n,t.firstRefresh&&(null!==o.getAttribute(\"width\")&&null!==o.getAttribute(\"height\")?(o.w=o.getAttribute(\"width\"),o.h=o.getAttribute(\"height\")*e):(o.w=o.width,o.h=o.height)),o.w>o.h/(t.reflectionP+1)?(o.pc=t.percentLandscape,o.pcMem=t.percentLandscape):(o.pc=t.percentOther,o.pcMem=t.percentOther),t.imageScaling===!1&&(o.style.position=\"relative\",o.style.display=\"inline\"),o.style.cursor=t.imageCursor,n++);this.max=t.indexArray.length,t.imageScaling===!1&&(o=t.imagesDiv.childNodes[t.indexArray[0]],this.totalImagesWidth=o.w*t.max,o.style.paddingLeft=t.imagesDivWidth/2+o.w/2+\"px\",t.imagesDiv.style.height=o.h+\"px\",t.navigationDiv.style.height=t.maxHeight-o.h+\"px\"),t.firstRefresh&&(t.firstRefresh=!1,t.imageID=t.startID-1,t.imageID<0&&(t.imageID=0),t.circular&&(t.imageID=t.imageID+t.imageFocusMax),maxId=t.circular?t.max-t.imageFocusMax-1:t.max-1,t.imageID>maxId&&(t.imageID=maxId),t.glideToStartID===!1&&t.moveTo(-t.imageID*t.xStep),t.startAnimation&&t.moveTo(5e3)),t.max>1&&t.glideTo(t.imageID),t.moveTo(t.current)},this.moveTo=function(e){this.current=e,this.zIndex=t.max;for(var i=0;i<t.max;i++){var n=t.imagesDiv.childNodes[t.indexArray[i]],o=i*-t.xStep;if(t.imageScaling)if(o+t.maxFocus<t.memTarget||o-t.maxFocus>t.memTarget)n.style.visibility=\"hidden\",n.style.display=\"none\";else{var s=(Math.sqrt(1e4+e*e)+100)*t.imagesM,r=e/s*t.size+t.size;n.style.display=\"block\";var a=n.h/n.w*n.pc/s*t.size,l=0;switch(a>t.maxHeight){case!1:l=n.pc/s*t.size;break;default:a=t.maxHeight,l=n.w*a/n.h}var c=t.imagesDivHeight-a+a/(t.reflectionP+1)*t.reflectionP;switch(n.style.left=r-n.pc/2/s*t.size+\"px\",l&&a&&(n.style.height=a+\"px\",n.style.width=l+\"px\",n.style.top=c+\"px\"),n.style.visibility=\"visible\",0>e){case!0:this.zIndex++;break;default:this.zIndex=t.zIndex-1}switch(n.i==t.imageID){case!1:n.onclick=function(){t.glideTo(this.i)};break;default:this.zIndex=t.zIndex+1,\"\"!==n.url&&(n.onclick=t.onClick)}n.style.zIndex=t.zIndex}else{if(o+t.maxFocus<t.memTarget||o-t.maxFocus>t.memTarget)n.style.visibility=\"hidden\";else switch(n.style.visibility=\"visible\",n.i==t.imageID){case!1:n.onclick=function(){t.glideTo(this.i)};break;default:\"\"!==n.url&&(n.onclick=t.onClick)}t.imagesDiv.style.marginLeft=e-t.totalImagesWidth+\"px\"}e+=t.xStep}},this.glideTo=function(e){var i,n;t.circular&&(e+1===t.imageFocusMax&&(n=t.max-t.imageFocusMax,i=-n*t.xStep,e=n-1),e===t.max-t.imageFocusMax&&(n=t.imageFocusMax-1,i=-n*t.xStep,e=n+1));var o=-e*t.xStep;this.target=o,this.memTarget=o,this.imageID=e;var s=t.imagesDiv.childNodes[e].getAttribute(\"alt\");if((\"\"===s||t.captions===!1)&&(s=\"&nbsp;\"),t.captionDiv.innerHTML=s,t.MouseDrag.busy===!1&&(this.newSliderX=t.circular?(e-t.imageFocusMax)*t.scrollbarWidth/(t.max-2*t.imageFocusMax-1)-t.MouseDrag.newX:e*t.scrollbarWidth/(t.max-1)-t.MouseDrag.newX,t.sliderDiv.style.marginLeft=t.newSliderX-t.sliderWidth+\"px\"),t.opacity===!0||t.imageFocusM!==t.defaults.imageFocusM){t.Helper.setOpacity(t.imagesDiv.childNodes[e],t.opacityArray[0]),t.imagesDiv.childNodes[e].pc=t.imagesDiv.childNodes[e].pc*t.imageFocusM;for(var r=0,a=0,l=0,c=t.opacityArray.length,u=1;u<t.imageFocusMax+1;u++)r=u+1>c?t.opacityArray[c-1]:t.opacityArray[u],a=e+u,l=e-u,a<t.max&&(t.Helper.setOpacity(t.imagesDiv.childNodes[a],r),t.imagesDiv.childNodes[a].pc=t.imagesDiv.childNodes[a].pcMem),l>=0&&(t.Helper.setOpacity(t.imagesDiv.childNodes[l],r),t.imagesDiv.childNodes[l].pc=t.imagesDiv.childNodes[l].pcMem)}i&&t.moveTo(i),t.busy===!1&&(t.busy=!0,t.animate())},this.animate=function(){switch(t.target<t.current-1||t.target>t.current+1){case!0:t.moveTo(t.current+(t.target-t.current)/3),window.setTimeout(t.animate,t.animationSpeed),t.busy=!0;break;default:t.busy=!1}},this.glideOnEvent=function(e){t.slideshow&&t.Slideshow.interrupt(),t.glideTo(e)},this.Slideshow={direction:1,init:function(){t.slideshowAutoplay?t.Slideshow.start():t.Slideshow.stop()},interrupt:function(){t.Helper.removeEvent(t.ImageFlowDiv,\"click\",t.Slideshow.interrupt),t.Slideshow.stop()},addInterruptEvent:function(){t.Helper.addEvent(t.ImageFlowDiv,\"click\",t.Slideshow.interrupt)},start:function(){t.Helper.setClassName(t.buttonSlideshow,\"slideshow pause\"),t.buttonSlideshow.onclick=function(){t.Slideshow.stop()},t.Slideshow.action=window.setInterval(t.Slideshow.slide,t.slideshowSpeed),window.setTimeout(t.Slideshow.addInterruptEvent,100)},stop:function(){t.Helper.setClassName(t.buttonSlideshow,\"slideshow play\"),t.buttonSlideshow.onclick=function(){t.Slideshow.start()},window.clearInterval(t.Slideshow.action)},slide:function(){var e=t.imageID+t.Slideshow.direction,i=!1;e===t.max&&(t.Slideshow.direction=-1,i=!0),0>e&&(t.Slideshow.direction=1,i=!0),i?t.Slideshow.slide():t.glideTo(e)}},this.MouseWheel={init:function(){window.addEventListener&&t.ImageFlowDiv.addEventListener(\"DOMMouseScroll\",t.MouseWheel.get,!1),t.Helper.addEvent(t.ImageFlowDiv,\"mousewheel\",t.MouseWheel.get)},get:function(e){var i=0;e||(e=window.event),e.wheelDelta?i=e.wheelDelta/120:e.detail&&(i=-e.detail/3),i&&t.MouseWheel.handle(i),t.Helper.suppressBrowserDefault(e)},handle:function(e){var i=!1,n=0;e>0?t.imageID>=1&&(n=t.imageID-1,i=!0):t.imageID<t.max-1&&(n=t.imageID+1,i=!0),i&&t.glideOnEvent(n)}},this.MouseDrag={object:null,objectX:0,mouseX:0,newX:0,busy:!1,init:function(){t.Helper.addEvent(t.ImageFlowDiv,\"mousemove\",t.MouseDrag.drag),t.Helper.addEvent(t.ImageFlowDiv,\"mouseup\",t.MouseDrag.stop),t.Helper.addEvent(document,\"mouseup\",t.MouseDrag.stop),t.ImageFlowDiv.onselectstart=function(){var e=!0;return t.MouseDrag.busy&&(e=!1),e}},start:function(e){t.MouseDrag.object=e,t.MouseDrag.objectX=t.MouseDrag.mouseX-e.offsetLeft+t.newSliderX},stop:function(){t.MouseDrag.object=null,t.MouseDrag.busy=!1},drag:function(e){var i=0;if(e||(e=window.event),e.pageX?i=e.pageX:e.clientX&&(i=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft),t.MouseDrag.mouseX=i,null!==t.MouseDrag.object){var n=t.MouseDrag.mouseX-t.MouseDrag.objectX+t.sliderWidth;n<-t.newSliderX&&(n=-t.newSliderX),n>t.scrollbarWidth-t.newSliderX&&(n=t.scrollbarWidth-t.newSliderX);var o,s;t.circular?(o=(n+t.newSliderX)/(t.scrollbarWidth/(t.max-2*t.imageFocusMax-1)),s=Math.round(o)+t.imageFocusMax):(o=(n+t.newSliderX)/(t.scrollbarWidth/(t.max-1)),s=Math.round(o)),t.MouseDrag.newX=n,t.MouseDrag.object.style.left=n+\"px\",t.imageID!==s&&t.glideOnEvent(s),t.MouseDrag.busy=!0}}},this.Touch={x:0,startX:0,stopX:0,busy:!1,first:!0,init:function(){t.Helper.addEvent(t.navigationDiv,\"touchstart\",t.Touch.start),t.Helper.addEvent(document,\"touchmove\",t.Touch.handle),t.Helper.addEvent(document,\"touchend\",t.Touch.stop)},isOnNavigationDiv:function(e){var i=!1;if(e.touches){var n=e.touches[0].target;(n===t.navigationDiv||n===t.sliderDiv||n===t.scrollbarDiv)&&(i=!0)}return i},getX:function(t){var e=0;return t.touches&&(e=t.touches[0].pageX),e},start:function(e){t.Touch.startX=t.Touch.getX(e),t.Touch.busy=!0,t.Helper.suppressBrowserDefault(e)},isBusy:function(){var e=!1;return t.Touch.busy&&(e=!0),e},handle:function(e){if(t.Touch.isBusy&&t.Touch.isOnNavigationDiv(e)){var i=t.circular?t.max-2*t.imageFocusMax-1:t.max-1;t.Touch.first&&(t.Touch.stopX=(i-t.imageID)*(t.imagesDivWidth/i),t.Touch.first=!1);var n=-(t.Touch.getX(e)-t.Touch.startX-t.Touch.stopX);0>n&&(n=0),n>t.imagesDivWidth&&(n=t.imagesDivWidth),t.Touch.x=n;var o=Math.round(n/(t.imagesDivWidth/i));o=i-o,t.imageID!==o&&(t.circular&&(o+=t.imageFocusMax),t.glideOnEvent(o)),t.Helper.suppressBrowserDefault(e)}},stop:function(){t.Touch.stopX=t.Touch.x,t.Touch.busy=!1}},this.Key={init:function(){document.onkeydown=function(e){t.Key.handle(e)}},handle:function(e){var i=t.Key.get(e);switch(i){case 39:t.MouseWheel.handle(-1);break;case 37:t.MouseWheel.handle(1)}},get:function(t){return t=t||window.event,t.keyCode}},this.Helper={addEvent:function(t,e,i){t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent&&(t[\"e\"+e+i]=i,t[e+i]=function(){t[\"e\"+e+i](window.event)},t.attachEvent(\"on\"+e,t[e+i]))},removeEvent:function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent&&(void 0===t[e+i]&&alert(\"Helper.removeEvent \\xbb Pointer to detach event is undefined - perhaps you are trying to detach an unattached event?\"),t.detachEvent(\"on\"+e,t[e+i]),t[e+i]=null,t[\"e\"+e+i]=null)},setOpacity:function(e,i){t.opacity===!0&&(e.style.opacity=i/10,e.style.filter=\"alpha(opacity=\"+10*i+\")\")},createDocumentElement:function(e,i,n){var o=document.createElement(e);return o.setAttribute(\"id\",t.ImageFlowID+\"_\"+i),void 0!==n&&(i+=\" \"+n),t.Helper.setClassName(o,i),o},setClassName:function(t,e){t&&(t.setAttribute(\"class\",e),t.setAttribute(\"className\",e))},suppressBrowserDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},addResizeEvent:function(){var e=window.onresize;window.onresize=\"function\"!=typeof window.onresize?function(){t.refresh()}:function(){e&&e(),t.refresh()}}}}", "function Dataflow() {\n this._log = logger();\n this.logLevel(Error$1);\n\n this._clock = 0;\n this._rank = 0;\n try {\n this._loader = loader();\n } catch (e) {\n // do nothing if loader module is unavailable\n }\n\n this._touched = UniqueList(id);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new Heap(function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n }", "function filterFlow(year, flowData) {\n function monthlyDictFilter(d) {\n return (String(d).split('-')[0] === year)\n }\n var filtered = {};\n filtered['months'] = Object.entries(flowData.monthly.active).filter(monthlyDictFilter).map(d => d[0]);\n filtered['in'] = Object.entries(flowData.monthly.in).filter(monthlyDictFilter).map(d => d[1]);\n filtered['out'] = Object.entries(flowData.monthly.out).filter(monthlyDictFilter).map(d => d[1]);\n filtered['active'] = Object.entries(flowData.monthly.active).filter(monthlyDictFilter).map(d => d[1]);\n filtered['top5'] = flowData.top_5[year]\n // limit predicted monthly values\n if (year === '2019'){\n filtered.in.length = 8;\n filtered.out.length = 8;\n filtered.active.length = 8;\n }\n \n return filtered \n}", "function Dataflow() {\n this._log = Object(__WEBPACK_IMPORTED_MODULE_12_vega_util__[\"C\" /* logger */])();\n this.logLevel(__WEBPACK_IMPORTED_MODULE_12_vega_util__[\"b\" /* Error */]);\n\n this._clock = 0;\n this._rank = 0;\n this._loader = Object(__WEBPACK_IMPORTED_MODULE_11_vega_loader__[\"a\" /* loader */])();\n\n this._touched = Object(__WEBPACK_IMPORTED_MODULE_10__util_UniqueList__[\"a\" /* default */])(__WEBPACK_IMPORTED_MODULE_12_vega_util__[\"q\" /* id */]);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new __WEBPACK_IMPORTED_MODULE_9__util_Heap__[\"a\" /* default */](function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n}", "resetPendingChangeSize() {\n this.pendingChangeSize_ = undefined;\n }", "dispatchSizeChange () {\n this.$parent.$emit(this.event, this.uniqueKey, this.getCurrentSize(), this.hasInitial)\n }", "function FlowCalculator(step) {\n this.step = step || 8;\n}", "resize() {\n var factor = 1; //multiply by one - so no resizing \n this.selected = !this.selected;\n if(this.selected) { //make the graph big\n //increase the size\n this.width = this.width*factor;\n this.height = this.height *factor;\n this.colour = this.selectedColour;\n //reposition\n // this.x = this.x - this.width/4;\n // this.y = this.y - this.height /4;\n } else { //make it small\n //reposition\n // this.x = this.x + this.width/4;\n // this.y = this.y + this.height /4;\n //double the size\n this.width = this.width/factor;\n this.height = this.height /factor;\n this.colour = this.idleColour;\n }\n }", "function measure() {\n\t\t\n\t\t// Call our validate routine and make sure all component properties have been set\n\t\tviz.validate();\n\t\t\n\t\t// Get our size based on height, width, and margin\n\t\tsize = vizuly2.util.size(scope.margin, scope.width, scope.height, scope.parent);\n\t\t\n\t\tscope.size = size;\n\t\t\n\t\t// Tell everyone we are done making our measurements\n\t\tscope.dispatch.apply('measured', viz);\n\t\t\n\t}", "function setBubbleSize (numOfArticle) { \n var size = 300 + 100*Math.round(numOfArticle / 200);\n return size>500?500:size;\n }", "function _fixBlockSizes() {\n\t\t\tvar timeBlockSize = $el.css('padding-top').replace('px', '') * 0.8;\n\t\t\t$el.find('.' + options.className + '-timeline').css('width', ''+ (children.length * timeBlockSize) +'px');\n\t\t\t$el.find('.' + options.className + '-timeliny-timeblock').css('width', '' + timeBlockSize + 'px');\n\t\t}", "function handleClicl(e,size) {\n const timeline1=gsap.timeline();\n if(size < 900) {\n setShowInput(true);\n timeline1.to(e.target, {opacity:0, display:\"none\"})\n .to(wraperInput.current, {height:\"600px\"});\n } else {\n setShowInputDes(true);\n timeline1.from(\".wraper-desktop\", {opacity:0});\n }\n\n }", "reset() {\n const [pausePoint] = this.pausePoints.slice(-1);\n if (pausePoint === undefined)\n throw new Error('Was not paused');\n this.size = pausePoint;\n return this;\n }", "infect(force) {\n this.activity += 1;\n if (force || this.activity > this.threshold) {\n this.spike_time = new Date().getTime();\n this.activity = -this.threshold;\n if (!force) {\n this.threshold += 1;\n }\n for (let edge of this.out) {\n // if we have not reached the max amount of carriers add a new one\n if (cur_infected < max_signals) {\n edge.infect();\n cur_infected += 1;\n }\n }\n\n // for (let edge of this.in) {\n // if (abs(this.spike_time - edge.from.spike_time) < window_size) {\n // if (\n // p5.Vector.dist(this.pos, edge.from.pos) >\n // node_diameter * 2\n // ) {\n // let dir = p5.Vector.sub(edge.from.pos, this.pos);\n // dir.setMag(attraction);\n // this.pos.add(dir);\n // }\n // } else {\n // let dir = p5.Vector.sub(this.pos, edge.from.pos);\n // dir.setMag(repulsion);\n // this.pos.add(dir);\n // }\n // }\n }\n }", "function FlowRecognizer(settings) {\n _classCallCheck(this, FlowRecognizer);\n\n this.settings = settings || {};\n this.initializeModels();\n }", "function track(flow, as) {\n\tflow.tracked = [].concat(as);\n\treturn flow;\n}", "@api resize(size) {\n // TBC what the sizes are\n console.log('[resize]', size);\n connection.trigger('requestInspectorResize', size);\n }", "async normalizeSlavesCount() {\n let count = await this.db.getSlavesCount();\n const size = await this.getNetworkOptimum();\n \n if(count > size) {\n await this.db.shiftSlaves(count - size);\n }\n }", "function reflowLargerCreateNewLayout(lines, toRemove) {\n const layout = [];\n // First iterate through the list and get the actual indexes to use for rows\n let nextToRemoveIndex = 0;\n let nextToRemoveStart = toRemove[nextToRemoveIndex];\n let countRemovedSoFar = 0;\n for (let i = 0; i < lines.length; i++) {\n if (nextToRemoveStart === i) {\n const countToRemove = toRemove[++nextToRemoveIndex];\n // Tell markers that there was a deletion\n lines.onDeleteEmitter.fire({\n index: i - countRemovedSoFar,\n amount: countToRemove\n });\n i += countToRemove - 1;\n countRemovedSoFar += countToRemove;\n nextToRemoveStart = toRemove[++nextToRemoveIndex];\n }\n else {\n layout.push(i);\n }\n }\n return {\n layout,\n countRemoved: countRemovedSoFar\n };\n}", "function expandWrokflowList(workflowName)\n {\n var isWfHidden = container.find(\".perc-itemname[title='\"+ workflowName+ \"']\").is('.perc-hidden');\n if($(\"#perc-wf-min-max\").is(\".perc-items-maximizer\")) {\n $(\"#perc-wf-min-max\").trigger(\"click\");\n }\n if(isWfHidden) {\n $(\"#perc-workflows-list\").find('.perc-moreLink').trigger(\"click\");\n }\n }", "function frameSize()\n {\n this.ruleID = 'frameSize';\n }", "_onChangeSize() {\n\t\t\t\tthis.collection.changeSize(this.model.get('width'), this.model.get('height'));\n\t\t\t\tthis._saveSize(this.model.get('width'), this.model.get('height'));\n\t\t\t\tthis.render();\n\t\t\t}", "function flowText(ctx, text, width) {\n const breakChars = [\"\\n\", \" \", \"-\", \".\", \",\", \"(\", \")\", \"/\", \";\", \":\"];\n let output = \"\";\n while (text) { // Loop while text remains\n let line = \"\"; // Current line fits in here\n let next = false; // true = stop trying\n let c = 0;\n while (c < breakChars.length) { // Try many breaking characters in order\n next = false;\n while (!next) {\n let measured = ctx.measureText(line+text.split(breakChars[c])[0]+(breakChars[c] == \"\\n\" ? \"\" : breakChars[c])).actualBoundingBoxRight;\n if (measured <= width) { // If next word is narrower than width,\n line += text.split(breakChars[c])[0]+breakChars[c]; // Add word to line\n //console.log(`> ${line}`);\n text = text.split(breakChars[c]).slice(1).join(breakChars[c]); // Remove word from text;\n if (breakChars[c] == \"\\n\") {\n c = breakChars.length;\n next = true;\n } else {\n c = 0;\n }\n } else { // Otherwise,\n next = true; // stop trying;\n //console.log(`Can't fit \"${text.split(breakChars[c])[0]+breakChars[c]}\" onto \"${line}\". (${measured} > ${width})`);\n }\n if (text == \"\") { // Quit once out of text\n next = true;\n c = breakChars.length;\n }\n }\n c++;\n }\n if (line == \"\") { // If nothing fit in\n next = false;\n while (!next) {\n if (ctx.measureText(line+text.charAt(0)).actualBoundingBoxRight <= width) { // If next letter is narrower than width,\n line += text.charAt(0); // Add letter to line\n text = text.slice(1); // Remove letter from text\n } else { // Otherwise,\n next = true; // stop trying\n }\n }\n }\n line = line.split(\"\\n\").filter(l => l).join(\"\\n\");\n output += line+\"\\n\"; // Add line to output\n }\n console.log(\"Finished:\\n\"+output);\n return output;\n}", "function onToggleReduction()\n\t{\n\t\tvar ui = CashShop.ui;\n\n\t\tif (_realSize) {\n\t\t\tui.find('.panel').show();\n\t\t\tui.height(_realSize);\n\t\t\t_realSize = 0;\n\t\t}\n\t\telse {\n\t\t\t_realSize = ui.height();\n\t\t\tui.height(17);\n\t\t\tui.find('.panel').hide();\n\t\t}\n\t}", "function growFlowers() {\n if (currentFlower >= flowers.length) return\n setTimeout(() => {\n growFlower(flowers[currentFlower++])\n growFlowers()\n }, 30)\n }", "function changeStepSizePEST(){\n\t\t\n\t\t//Variable to store if this step is a reversal of the previous step\n\t\tvar reversal;\n\t\t\n\t\t//For the first step, just set the reversal to false\n\t\tif (firstStep){\n\t\t\treversal = false;\n\t\t\t//Change firstStep to be false because subsequent steps will have a previousStepDirection to compare it to\n\t\t\tfirstStep = false;\n\t\t}\n\t\t//Else, set the reversal to whether the previous step direction corresponsds to the current step direction\n\t\telse{\n\t\t\treversal = (previousStepDirection == currentStepDirection) ? false : true;\n\t\t}\n\t\t\n\t\tconsole.log(\"Reversal: \" + reversal);\n\t\t\n\t\t//If current step is a reversal of the previous step\n\t\tif(reversal){\n\t\t\t\n\t\t\t//Reset the streak counter to include this step (therefore it is 1 instead of zero)\n\t\t\tstepStreakCounter = 1;\n\t\t\t\n\t\t\t//If the reversal did not follow a double in step size, then the threshold should be 3\n\t\t\tif (!stepSizeJustDoubled){\n\t\t\t\tcurrentStepThreshold = 3;\n\t\t\t}\n\t\t\t//If the step size just doubled in the previous step, increase the step threshold to 4 [Rule 4]\n\t\t\telse{\n\t\t\t\tcurrentStepThreshold = 4;\n\t\t\t}\n\t\t\t\n\t\t\t//Half the step size everytime it reverses [Rule 1]\n\t\t\thalveStepSize();\n\t\t\t\n\t\t\t//Step size did not double, so we reset it back to false (this variable is used below in the else statement)\n\t\t\tstepSizeJustDoubled = false;\n\t\t}\n\t\t//If step was not a reversal (went in the same direction) AND it is not at the limit\n\t\telse if(!limitHit){\n\t\t\t\n\t\t\t//Increment the streak counter\n\t\t\tstepStreakCounter++;\n\t\t\t\n\t\t\t//If the streak has hit the streak threshold, then increase the step size by doubling it [Rule 3]\n\t\t\tif (stepStreakCounter >= currentStepThreshold){\n\t\t\t\tdoubleStepSize();\n\t\t\t\tstepSizeJustDoubled = true;\n\t\t\t\tconsole.log(\"Step size doubled.\");\n\t\t\t}\n\t\t\t//Else step size did not double\n\t\t\telse{\n\t\t\t\tstepSizeJustDoubled = false;\n\t\t\t\tconsole.log(\"Step size remained the same because not hit threshold yet.\");\n\t\t\t}\n\t\t\t\n\t\t\t//If we go in the same direction, we stay with the same step size [Rule 2]\n\t\t\t//Unless we go 3 steps in the same direction, in which case we implement Rule 3 above\n\t\t\t\n\t\t}//End of else (not reversal)\n\t\t\n\t}//End of changeStepSizePEST", "function organicLayout() {\n var l = new yfiles.organic.SmartOrganicLayouter();\n l.preferredEdgeLength = 180;\n l.maximumDuration = 5000;\n l.nodeEdgeOverlapAvoided = true;\n app.graphControl.graph.applyLayout(l);\n app.graphControl.fitGraphBounds();\n }", "clear() {\n var _a;\n if ((_a = this.canvas.flow) === null || _a === void 0 ? void 0 : _a.rootStep) {\n this.canvas.flow.rootStep.destroy(true, false);\n this.canvas.reRender();\n }\n }", "if ((FlowDirection)target.GetValue(FlowDirectionProperty) !=\r\n (FlowDirection)child.GetValue(FlowDirectionProperty))\r\n { \r\n SwapPoints(ref interestPoints[(int)InterestPoint.TopLeft], ref interestPoints[(int)InterestPoint.TopRight]);\r\n SwapPoints(ref interestPoints[(int)InterestPoint.BottomLeft], ref interestPoints[(int)InterestPoint.BottomRight]); \r\n }", "_setProportionalDetails() {\n const that = this;\n\n that._dragDetails.secondItem = that._items.slice(that._items.indexOf(that._dragDetails.firstItem) + 1).filter(item => !item.collapsed && !item.locked);\n\n if (that._dragDetails.secondItem.length === 0) {\n delete that._dragDetails;\n return true;\n }\n\n that._dragDetails.splitAreaSize += that._dragDetails.firstItem.currentSize;\n that._dragDetails.itemProportions = [];\n\n let noMaxLimit;\n\n for (let i = 0; i < that._dragDetails.secondItem.length; i++) {\n that._dragDetails.secondItem[i].set('size', '');\n that._dragDetails.secondItem[i].currentSize = that._dragDetails.secondItem[i][that._measurements.size];\n that._dragDetails.secondItem[i].originalSize = that._dragDetails.secondItem[i].currentSize\n\n const computedStyle = getComputedStyle(that._dragDetails.secondItem[i]);\n\n that._dragDetails.secondItem[i]._paddings = (parseFloat(computedStyle.getPropertyValue('padding-' + that._measurements.position)) || 0) +\n (parseFloat(computedStyle.getPropertyValue('padding-' + that._measurements.position2)) || 0);\n\n that._dragDetails.secondItem[i].currentSize -= that._dragDetails.secondItem[i]._paddings;\n\n that._dragDetails.splitAreaSize += that._dragDetails.secondItem[i].currentSize;\n that._dragDetails.itemProportions.push({\n item: that._dragDetails.secondItem[i],\n currentSize: that._dragDetails.secondItem[i].currentSize\n });\n\n if (!that._dragDetails.secondItem[i]._sizeLimits[that._measurements.maxDimension]) {\n noMaxLimit = true;\n }\n\n that._dragDetails.secondItemTotalMinSize += that._dragDetails.secondItem[i]._sizeLimits[that._measurements.minDimension];\n that._dragDetails.secondItemTotalMaxSize += that._dragDetails.secondItem[i]._sizeLimits[that._measurements.maxDimension];\n }\n\n if (noMaxLimit) {\n that._dragDetails.secondItemTotalMaxSize = 0;\n }\n }", "function applyPath(){\n\t\tvar cap = [];\n\t\tdelta = 0;\n\t\tGraph.instance.edges.forEach(function(key,edge){\n\t\t\tstate.edgePrevCost[edge.id] = edge.resources[1];\n\t\t});\n\t\tfor (var i =0; i<state.edgesOfSP.length; i++){\n\t\t\t\n\t\t\tcap[i] = state.edgesOfSP[i].resources[0]-state.edgesOfSP[i].state.flow;\n\t\t\t\n\t\t}\n var minCap = d3.min(cap);\n\t\t\n\t\tvar excessDemandMin = Math.min(Graph.instance.nodes.get(state.sourceId).b , -Graph.instance.nodes.get(state.targetId).b);\n\t\tdelta = Math.min(minCap, excessDemandMin);\n\t\t\n\t\n\t\tfor (var i = 0; i < state.edgesOfSP.length; i++){\n \n var edge = state.edgesOfSP[i];\n\n edge.state.flow += edge.start.state.predecessor[\"direction\"] * delta;\n\t\t\tminCost += delta * edge.edges[\"cost\"];\n }\n\t\tGraph.instance.nodes.forEach(function(key,node){\n\t\t\tbs[node.id] = node.b;\n\t\t\tif(node.id == state.sourceId){\n\t\t\t\tnode.b = node.b-delta;\n\t\t\t\tbOfS = node.b;\n\t\t\t}else if(node.id == state.targetId){\n\t\t\t\tnode.b = node.b + delta;\n\t\t\t\tbOfT = node.b;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tnode.b = 0;\n\t\t\t}\n\t\t});\n\t\t\n\t\tGraph.instance.edges.forEach(function(key, edge) {\n\t\t\tedge.inSP = false;\n\t\t\tif(edge.state.flow == edge.resources[0]){\n\t\t\t\tedge.state.usedUp = true;\t\n\t\t\t}else{\n\t\t\t\tedge.state.usedUp = false;\t\n\n\t\t\t}\n });\n logger.log(\"Applied augmenting path with flow \"+state.augmentation);\n\t\tdel = 0;\n\t\tstate.distancesOfNodes = [];\n state.show_residual_graph = false;\n\t\tstate.shortestPath = [];\n state.current_step = STEP_MAINLOOP;\n\t\t\n\t}", "calculatePartSize(size) {\n if (!isNumber(size)) {\n throw new TypeError('size should be of type \"number\"')\n }\n if (size > this.maxObjectSize) {\n throw new TypeError(`size should not be more than ${this.maxObjectSize}`)\n }\n if (this.overRidePartSize) {\n return this.partSize\n }\n var partSize = this.partSize\n for (;;) {\n // while(true) {...} throws linting error.\n // If partSize is big enough to accomodate the object size, then use it.\n if (partSize * 10000 > size) {\n return partSize\n }\n // Try part sizes as 64MB, 80MB, 96MB etc.\n partSize += 16 * 1024 * 1024\n }\n }", "async function cancelFlow() {\n let cfaTx = (await cfa.methods\n .deleteFlow(\n fDAIx,\n _sender,\n tradeableCashflowAddress,\n \"0x\"\n )\n .encodeABI())\n //try using callAgreement vs callagreement w context\n let txData = (await host.methods.callAgreement(\n cfaAddress, \n cfaTx, \n //pass in empty field for userData\n \"0x\"\n ).encodeABI());\n\n let tx = {\n 'to': hostAddress,\n 'gas': 3000000,\n 'nonce': nonce,\n 'data': txData\n }\n\n let signedTx = await web3.eth.accounts.signTransaction(tx, process.env.MUMBAI_DEPLOYER_PRIV_KEY);\n\n await web3.eth.sendSignedTransaction(signedTx.rawTransaction, function(error, hash) {\n if (!error) {\n console.log(\"🎉 The hash of your transaction is: \", hash, \"\\n Check Alchemy's Mempool to view the status of your transaction!\");\n } else {\n console.log(\"❗Something went wrong while submitting your transaction:\", error)\n }\n });\n\n }", "function resetHiddenItemSize() {\n TweenLite.to(_element, 0, {scale: 1});\n }", "createTransitionKernels(width)\n {\n this._cachedKernels = [];\n // record shape (topology) -> linear interpolation... if custom\n // reduce in width until we reach identity.\n // incomplete here\n }", "function Flow(id, map, identifier, loader, ioHandler, processManager) {\n\n var self = this;\n\n if (!id) {\n throw Error('xFlow requires an id');\n }\n\n if (!map) {\n throw Error('xFlow requires a map');\n }\n\n // Call the super's constructor\n Actor.apply(this, arguments);\n\n if (loader) {\n this.loader = loader;\n }\n if (ioHandler) {\n this.ioHandler = ioHandler;\n }\n\n if (processManager) {\n this.processManager = processManager;\n }\n\n // External vs Internal links\n this.linkMap = {};\n\n // indicates whether this is an action instance.\n this.actionName = undefined;\n\n // TODO: trying to solve provider issue\n this.provider = map.provider;\n\n this.providers = map.providers;\n\n this.actions = {};\n\n // initialize both input and output ports might\n // one of them be empty.\n if (!map.ports) {\n map.ports = {};\n }\n if (!map.ports.output) {\n map.ports.output = {};\n }\n if (!map.ports.input) {\n map.ports.input = {};\n }\n\n /*\n // make available always.\n node.ports.output['error'] = {\n title: 'Error',\n type: 'object'\n };\n */\n\n this.id = id;\n\n this.name = map.name;\n\n this.type = 'flow';\n\n this.title = map.title;\n\n this.description = map.description;\n\n this.ns = map.ns;\n\n this.active = false;\n\n this.metadata = map.metadata || {};\n\n this.identifier = identifier || [\n map.ns,\n ':',\n map.name\n ].join('');\n\n this.ports = JSON.parse(\n JSON.stringify(map.ports)\n );\n\n // Need to think about how to implement this for flows\n // this.ports.output[':complete'] = { type: 'any' };\n\n this.runCount = 0;\n\n this.inPorts = Object.keys(\n this.ports.input\n );\n\n this.outPorts = Object.keys(\n this.ports.output\n );\n\n //this.filled = 0;\n\n this.chi = undefined;\n\n this._interval = 100;\n\n // this.context = {};\n\n this.nodeTimeout = map.nodeTimeout || 3000;\n\n this.inputTimeout = typeof map.inputTimeout === 'undefined' ?\n 3000 :\n map.inputTimeout;\n\n this._hold = false; // whether this node is on hold.\n\n this._inputTimeout = null;\n\n this._openPorts = [];\n\n this._connections = new Connections();\n\n this._forks = [];\n\n debug('%s: addMap', this.identifier);\n this.addMap(map);\n\n this.fork = function() {\n\n var Fork = function Fork() {\n this.nodes = {};\n //this.context = {};\n\n // same ioHandler, tricky..\n // this.ioHandler = undefined;\n };\n\n // Pre-filled baseActor is our prototype\n Fork.prototype = this.baseActor;\n\n var FActor = new Fork();\n\n // Remember all forks for maintainance\n self._forks.push(FActor);\n\n // Each fork should have their own event handlers.\n self.listenForOutput(FActor);\n\n return FActor;\n\n };\n\n this.listenForOutput();\n\n this.initPortOptions = function() {\n\n // Init port options.\n for (var port in self.ports.input) {\n if (self.ports.input.hasOwnProperty(port)) {\n\n // This flow's port\n var thisPort = self.ports.input[port];\n\n // set port option\n if (thisPort.options) {\n for (var opt in thisPort.options) {\n if (thisPort.options.hasOwnProperty(opt)) {\n self.setPortOption(\n 'input',\n port,\n opt,\n thisPort.options[opt]);\n }\n }\n }\n\n }\n }\n };\n\n // Too late?\n this.setup();\n\n this.setStatus('created');\n\n}", "function Dataflow() {\n this._log = (0,vega_util__WEBPACK_IMPORTED_MODULE_12__.logger)();\n this.logLevel(vega_util__WEBPACK_IMPORTED_MODULE_12__.Error);\n\n this._clock = 0;\n this._rank = 0;\n try {\n this._loader = (0,vega_loader__WEBPACK_IMPORTED_MODULE_11__.loader)();\n } catch (e) {\n // do nothing if loader module is unavailable\n }\n\n this._touched = (0,_util_UniqueList__WEBPACK_IMPORTED_MODULE_10__.default)(vega_util__WEBPACK_IMPORTED_MODULE_12__.id);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new _util_Heap__WEBPACK_IMPORTED_MODULE_9__.default(function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n}", "forgets (step) {\n\t\tvar new_facts = [];\n\t\tfor (var i = 0; i < this.facts.length; i++) {\n\t\t\tif (this.facts[i].step <= step)\n\t\t\t\tnew_facts.push(this.facts[i]);\n\t\t}\n\t\tthis.facts = new_facts;\n\t}", "function _computeRequiredBandwidths() {\n var requiredBandwidths = [];\n var audioStreamList = playback.getAudioStreamList(),\n videoStreamList = playback.getVideoStreamList();\n var nextAudioChunkToDownload = playback.mediaBuffer.getNextAudioChunkThatNeedsMedia(),\n audioChunkIndex = nextAudioChunkToDownload.index,\n nextVideoChunkToDownload = playback.mediaBuffer.getNextVideoChunkThatNeedsMedia(),\n videoChunkIndex = nextVideoChunkToDownload.index;\n var audioChunks = playback.mediaBuffer.audioChunks,\n videoChunks = playback.mediaBuffer.videoChunks;\n // do this for all bitrates in bitrateHeuristics\n enumerateOwnProperties(_bitrateHeuristics, function (bitrate, delay) {\n var chunksToMeasure,\n bytesInAverageChunk,\n bytesToBuffer;\n // get the stream for this bitrate\n var audioStream = audioStreamList.closestTo(bitrate, true),\n videoStream = videoStreamList.closestTo(bitrate, true);\n var bytesOfAudioChunks = 0,\n bytesOfVideoChunks = 0,\n reqBandwidth,\n i;\n\n // audio\n chunksToMeasure = Math$min(Math$ceil(config.carreraChunksToAverage) / 4.0, audioChunks.last.index - audioChunkIndex + 1);\n for (i = 0; i < chunksToMeasure; i++) {\n bytesOfAudioChunks += audioStream.header.chunkInfos[audioChunkIndex+ i].length;\n }\n\n // video\n chunksToMeasure = Math$min(config.carreraChunksToAverage, videoChunks.last.index - videoChunkIndex + 1);\n for (i = 0; i < chunksToMeasure; i++) {\n bytesOfVideoChunks += videoStream.header.chunkInfos[videoChunkIndex+ i].length;\n }\n\n bytesInAverageChunk = (bytesOfAudioChunks + bytesOfVideoChunks) / chunksToMeasure;\n // we want to be able to get two chunks before starting\n bytesToBuffer = 2 * bytesInAverageChunk;\n reqBandwidth = Math$max((bytesToBuffer/BYTES_TO_KILOBIT) / delay, bitrate);\n\n var reqBandwidthEntry = {};\n reqBandwidthEntry.bitrate = bitrate;\n reqBandwidthEntry.reqBandwidth = reqBandwidth;\n reqBandwidthEntry.delay = delay;\n requiredBandwidths.push(reqBandwidthEntry);\n });\n\n // order the requredBandwidths list by bitrate, ascending order\n requiredBandwidths = requiredBandwidths.sort(function(o1,o2){\n if (parseInt(o1.bitrate) < parseInt(o2.bitrate)) {\n return -1;\n } else if(parseInt(o1.bitrate) > parseInt(o2.bitrate)) {\n return 1;\n } else {\n return 0;\n }\n });\n return requiredBandwidths;\n }" ]
[ "0.5719512", "0.56993496", "0.53552854", "0.5220769", "0.5174941", "0.5171247", "0.51712376", "0.49766344", "0.48833254", "0.48824742", "0.4876707", "0.4875268", "0.4849155", "0.48481536", "0.4814602", "0.47855714", "0.4782492", "0.47178924", "0.47153184", "0.47084096", "0.47048813", "0.46899417", "0.46090168", "0.46031892", "0.45992073", "0.45790988", "0.45746654", "0.45701852", "0.45587155", "0.4557919", "0.45565113", "0.4513007", "0.45126846", "0.45026648", "0.44939312", "0.4484587", "0.44810808", "0.44607776", "0.44572744", "0.44327304", "0.44146407", "0.4403215", "0.43997794", "0.43880922", "0.4384686", "0.43818066", "0.43628362", "0.4350255", "0.4342441", "0.43262303", "0.4326144", "0.43205926", "0.43147627", "0.4309578", "0.43085247", "0.43018782", "0.4301274", "0.4284224", "0.4273301", "0.4268374", "0.42555338", "0.42436752", "0.42294058", "0.42165473", "0.42009476", "0.41912803", "0.41890594", "0.4181338", "0.4180341", "0.41730973", "0.41722354", "0.41688448", "0.4152567", "0.4150452", "0.4140472", "0.4128168", "0.41147327", "0.411244", "0.41092616", "0.41042626", "0.4100723", "0.40999794", "0.4099494", "0.40993246", "0.40970084", "0.40940118", "0.40867797", "0.40851417", "0.40793467", "0.40774104", "0.40713122", "0.40710193", "0.40708795", "0.406643", "0.4062543", "0.40544426", "0.40530625", "0.405084", "0.40391615", "0.40299287" ]
0.50022054
7
Function to be used by collect
static toMap(keyFunc){ var groupFunc = keyFunc; if( !Util.isFunction(keyFunc) ) { groupFunc = function (input) { return input[keyFunc]; }; } return groupFunc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collect() {}", "function collect_(self, f) {\n return core.map_(forEach.forEach_(self, a => optional(f(a))), Chunk.compact);\n}", "function collect(f) {\n return self => collect_(self, f);\n}", "function collect(collector, collected)\n{\n collected.remove();\n}", "function collectAllWith(pf, __trace) {\n return as => collectAllWith_(as, pf, __trace);\n}", "function collectPar_(self, f) {\n return core.map_(forEach.forEachPar_(self, a => optional(f(a))), Chunk.compact);\n}", "function collect(acc, more) {\n return more ? (acc || []).concat(more) : acc\n}", "function collect(node) {\n var index = -1\n\n if ('length' in node) {\n while (++index < node.length) {\n collectOne(node[index])\n }\n } else {\n collectOne(node)\n }\n }", "function collectAllWith_(as, pf, __trace) {\n return core.map_(collectAll(as, __trace), Chunk.collect(pf));\n}", "function collectPar(f) {\n return self => collectPar_(self, f);\n}", "function Aggregate() {}", "function collectAll(as, __trace) {\n return forEach.forEach_(as, _index12.identity, __trace);\n}", "function collect(iterator, context) {\n iterator = iterator || Prototype.K;\n var results = [];\n this.each(function(value, index) {\n results.push(iterator.call(context, value, index));\n });\n return results;\n }", "collect (rootAstNode) {\n return new Set(rootAstNode.nodes.flatMap(n => this.#results.get(n)))\n }", "function collect(value, previous) {\n\treturn previous.concat([value]);\n}", "function collect(gen, array) {\n return function () {\n var value = gen();\n if (value !== undefined) {\n array.push(value);\n };\n return value;\n };\n}", "collectFirst() {\n\t return this.collect(1).then((items) => items.length>0 ? items[0] : null);\n }", "prepareCollectablesData(foundedGlyphs, selectedGlyphs) {\n let collectablesArray = collectables.glyphs.map(element => {\n if (foundedGlyphs) {\n var founded = foundedGlyphs.some(\n elementFounded => elementFounded === element.id\n );\n\n if (selectedGlyphs) {\n var selected = selectedGlyphs.some(\n elementSelected => elementSelected === element.id\n );\n }\n\n var icon = benediction.find(bene => {\n if (bene.id === element.id) {\n return bene.img\n }\n })\n }\n return {\n name: element.name,\n icon: icon,\n id: element.id,\n found: founded ? founded : false,\n selected: selected ? selected : false \n };\n });\n return collectablesArray;\n }", "function collectAllWithPar(pf, __trace) {\n return as => collectAllWithPar_(as, pf, __trace);\n}", "\n ()\n {\n const aggregated_a = new Map() //:- [[linked_a],...]\n const linked_a = new Set() //:- Node.Facet.id_n \n this.node_a.forEach\n (\n node_c =>\n {\n const id_n = node_c.id__n()\n if ( !linked_a.has( id_n ) ) aggregated_a.set\n (\n id_n,\n this.linked__a( id_n, at_n => linked_a.add( at_n ) )\n )\n }\n )\n return aggregated_a\n }", "async collect(aCount) {\n let response = await this.kojac.performRequest(this);\n\t\tlet result = response.result();\n\t\tif (!_.isArray(result) || result.length===0)\n\t\t\treturn result;\n\t\tvar resource = response.request.ops[0].key;\n\t\treturn this.kojac.collectIds(resource,result,null,aCount);\n\t}", "map(fn) {\n // console.log(iter.next())\n let array = [];\n for (let [key, val] of this) {\n array.push(key);\n }\n return array.map(fn);\n }", "function createCollector() {\n var keepCollecting = true;\n return function (nextResult, defaultValue) {\n if (keepCollecting && nextResult !== undefined) {\n return nextResult;\n }\n keepCollecting = false;\n return defaultValue;\n };\n}", "function ForEach() {}", "function collect(q, a, b, x, s, t) {\n a = add32(add32(a, q), add32(x, t));\n /// The right shift is to make it a circular shift\n return add32((a << s) | (a >>> (32 - s)), b);\n}", "function collect(val, memo) {\n val.split(',').forEach(function (val) {\n memo.push(val);\n });\n\n return memo;\n}", "function getEachForSource(source) {\n if (source.length < 40) {\n return UniqueArrayWrapper.prototype.eachNoCache;\n } else if (source.length < 100) {\n return UniqueArrayWrapper.prototype.eachArrayCache;\n } else {\n return UniqueArrayWrapper.prototype.eachSetCache;\n }\n }", "function collectAnimals(...animals) { \n return animals \n}", "function g(e,t){return e.filter(t).add(e.find(t))}", "function collectAnimals(...animals) {\n return animals;\n}", "filter() {\n\t}", "filter() {\n\t}", "function collect(from, pickChild) {\n var nodes = [];\n var rec = function(node) {\n nodes.push(node);\n var child = pickChild(node);\n if (child) rec(child);\n };\n rec(from);\n return nodes;\n}", "function collect(arr, callback, thisObj){\n\t callback = makeIterator(callback, thisObj);\n\t var results = [];\n\t if (arr == null) {\n\t return results;\n\t }\n\n\t var i = -1, len = arr.length;\n\t while (++i < len) {\n\t var value = callback(arr[i], i, arr);\n\t if (value != null) {\n\t append(results, value);\n\t }\n\t }\n\n\t return results;\n\t }", "function gp(){return function(l){return l}}", "function n(t, n, e) {\n return Object(_promiseUtils_js__WEBPACK_IMPORTED_MODULE_0__[\"eachAlways\"])(t.map(function (r, t) {\n return n.apply(e, [r, t]);\n }));\n }", "mapVal(fn) {\n let val = this.values();\n return Array.from({\n length: this.size\n }, () => {\n let values = val.next();\n return fn(values.value);\n }).filter(item => item);\n }", "function collectParN_(self, n, f) {\n return core.map_(forEach.forEachParN_(self, n, a => optional(f(a))), Chunk.compact);\n}", "function filter(coll, f){\n //create true accu\n var acc = [];\n each(coll, function(element, index ){\n if(f(element)){\n acc.push(element);\n }\n });\n return acc;\n}", "function mapImproved(item, f) {\n\tif(!Array.isArray(item) && Array.isArray(Object.keys(item))){\n\t\t\t var acc = {};\n\t\t\t each(item, function(element, i) {\n\n\t\t\t acc[i]=f(element, i);\n\t\t\t });\n\t\t\t return acc;\n\t}else if(Array.isArray(item)){\n\t\t\t var acc = {};\n\t\t\t each(item, function(element, i) {\n\n\t\t\t acc[i]=f(element, i);\n\t\t\t });\n\t\t\t return acc;\n\t}\n\telse \"is not applicable\"\n}", "function partition(collection,fn){var result={lhs:[],rhs:[]};_.forEach(collection,function(value){if(fn(value)){result.lhs.push(value)}else{result.rhs.push(value)}});return result}", "function collectAllWithPar_(as, pf, __trace) {\n return core.map_(collectAllPar(as, __trace), Chunk.collect(pf));\n}", "map(id, source) {}", "function collect(cells) {\n var key$$1, i, t, v;\n for (key$$1 in cells) {\n t = cells[key$$1].tuple;\n for (i=0; i<n; ++i) {\n vals[i][(v = t[dims[i]])] = v;\n }\n }\n }", "function collect(d,types,skip) {\n\tvar out = {};\n\tfor (t in types) {\n\t\tif (d[types[t]] == undefined)\n\t\t\tcontinue;\n\n\t\tfor (s in d[types[t]]) {\n\t\t\tif (s == skip)\n\t\t\t\tcontinue;\n\t\t\tfor (v in d[types[t]][s]) {\n\t\t\t\tif (out[v] == undefined)\n\t\t\t\t\tout[v] = 0;\n\t\t\t\tout[v] += d[types[t]][s][v];\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\treturn out;\n}", "get asFold() {\n return fold(this.reduce, this.toArray)\n }", "function collectAllUnit(as, __trace) {\n return forEach.forEachUnit_(as, _index12.identity, __trace);\n}", "function task4() {\n return _.chain(data.animals)\n .groupBy('species')\n .sortBy('legs')\n .value();\n }", "function collect(cells) {\n var key, i, t, v;\n for (key in cells) {\n t = cells[key].tuple;\n for (i=0; i<n; ++i) {\n vals[i][(v = t[dims[i]])] = v;\n }\n }\n }", "function collect(cells) {\n var key, i, t, v;\n for (key in cells) {\n t = cells[key].tuple;\n for (i=0; i<n; ++i) {\n vals[i][(v = t[dims[i]])] = v;\n }\n }\n }", "forEach(f) {\n for (var i=0,l=this.count; i<l; i++) {\n f(this.get(i));\n }\n }", "function each(collection,fn){var i=0,length=collection.length,cont;for(i;i<length;i++){cont=fn(collection[i],i);if(cont===false){break;//allow early exit\r\n\t}}}", "selectedUniqueItemResources() {\n let resArray = this.props.resources.transformed.filter(elt => elt.category === 'Patient');\n for (let catName of Object.keys(this.state.selectedUniqueItems)) {\n\t for (let displayStr of Object.keys(this.state.selectedUniqueItems[catName])) {\n\t if (!this.state.onlyMultisource ||\n\t\t(this.state.onlyMultisource &&\t\t// more than one provider?\n\t\t this.state.selectedUniqueItems[catName][displayStr].reduce((provs, res) => provs.add(res.provider), new Set()).size > 1)) {\n\t resArray = resArray.concat(this.state.selectedUniqueItems[catName][displayStr]);\n\t }\n\t }\n }\n\n return new FhirTransform(resArray, (data) => data);\n }", "function reduceFilter(fn) {\n return function (mapped, x) {\n if (fn(x)) {\n mapped.push(x);\n }\n return mapped;\n };\n}", "depthFirstForEach(cb) {\n\n }", "function sr(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}", "function collectAllPar(as, __trace) {\n return forEach.forEachPar_(as, _index12.identity, __trace);\n}", "function collectParN(n, f) {\n return self => collectParN_(self, n, f);\n}", "function collectortoarray(q,c){\n \n var inpt=[];\n let counter = 0;\n \n c.forEach((value) => {\n inpt[counter]=[q[counter][0],value.content];\n counter++;\n });\n\n console.log(inpt);\n return inpt;\n}", "function collectAllWithParN(n, pf, __trace) {\n return as => collectAllWithParN_(as, n, pf, __trace);\n}", "extractDocumentExistenceInfo(arr) {\n return this.chooseDocumentsDuplicate(arr.map(item => item.existenceInfo));\n }", "function map (collection, iteratee, callback) {\n\n}", "function collector(collection) {\n return function(file, enc, cb) {\n if (!file.path) {\n return;\n }\n collection.push(file);\n cb();\n };\n}", "summarize() {\n return null;\n }", "summarize() {\n return null;\n }", "function Nothing$prototype$reduce(f, x) {\n return x;\n }", "function f(a){var b={};return fa.each(a.match(va)||[],function(a,c){b[c]=!0}),b}", "function c(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}", "static mapCollection(collection) {\n if (collection.empty) {\n return [];\n }\n\n const list = [];\n\n collection.forEach((document) => {\n const item = Object.assign({}, document.data(), {\n id: document.id,\n });\n\n this.replaceAllTimestampToDate(item);\n list.push(item);\n });\n\n return list;\n }", "function filter() {\n \n}", "function PathSearchResultCollector() {\n\n}", "function partition(collection, fn) {\n\t var result = {\n\t lhs: [],\n\t rhs: []\n\t };\n\n\t _.forEach(collection, function (value) {\n\t if (fn(value)) {\n\t result.lhs.push(value);\n\t } else {\n\t result.rhs.push(value);\n\t }\n\t });\n\n\t return result;\n\t }", "function doCollectKeys(data, key, val) {\n data.push(key);\n if (Array.isArray(val)) return;\n if ('object' === typeof val) {\n data.push(...collectKeys(val));\n }\n}", "* [Symbol.iterator]() {\r\n let collections = this.collectionMapping.keys();\r\n for( let name of collections ) {\r\n yield name;\r\n }\r\n }", "function n$1(r){return r&&g.fromJSON(r).features.map((r=>r))}", "filterCollection(collection, filterByOptions, filterResultBy = FilterMultiplePassType.chain) {\n let filteredCollection = [];\n // when it's array, we will use the new filtered collection after every pass\n // basically if input collection has 10 items on 1st pass and 1 item is filtered out, then on 2nd pass the input collection will be 9 items\n if (Array.isArray(filterByOptions)) {\n filteredCollection = (filterResultBy === FilterMultiplePassType.merge) ? [] : collection;\n for (const filter of filterByOptions) {\n if (filterResultBy === FilterMultiplePassType.merge) {\n const filteredPass = this.singleFilterCollection(collection, filter);\n filteredCollection = uniqueArray([...filteredCollection, ...filteredPass]);\n }\n else {\n filteredCollection = this.singleFilterCollection(filteredCollection, filter);\n }\n }\n }\n else {\n filteredCollection = this.singleFilterCollection(collection, filterByOptions);\n }\n return filteredCollection;\n }", "forEach(visit){\n if (visit instanceof Function){\n\n if (this.end == null || this.start == null){\n return\n }else if(this.end == this.start){\n visit(this.end);\n }else{\n let cur = this.start;\n let i = 0;\n visit(cur, i);\n while ( cur != this.end && cur != null){\n cur = cur.next;\n i++;\n visit(cur, i);\n }\n }\n }else{\n throw `Error calling forEach:\\n${visit} is not a Function`\n }\n }", "getUsedTags (base) {\n let tagsArr = base.reduce ((acc, record) => (acc.concat (record.tags)), []);\n\n return this.removeDuplicates (tagsArr);\n }", "function FILTRO_colas_involucradas(cdr_filtrado){\n\n let resultado = '';\n\n// inicio\n\nlet dataColas;\nlet result;\n\ndataColas = cdr_filtrado\n .map(function(x) {\n result=[];\n\n result.push({\n queue_call_entry: x.queue_call_entry,\n numero_colas: x.numero_colas,\n nombre_colas: x.nombre_colas,\n titulo: 'Colas: '\n });\n result = result[0];\n return result;\n })\n .filter(function(x){\n return x.nombre_colas !== '' ? true: false;\n });\n\n resultado = _.uniqBy(dataColas, 'queue_call_entry');\n\n// fin\n\n\treturn resultado;\n}", "collect () {\n const buf = []\n if (!this[OBJECTMODE])\n buf.dataLength = 0\n // set the promise first, in case an error is raised\n // by triggering the flow here.\n const p = this.promise()\n this.on('data', c => {\n buf.push(c)\n if (!this[OBJECTMODE])\n buf.dataLength += c.length\n })\n return p.then(() => buf)\n }", "collect () {\n const buf = []\n if (!this[OBJECTMODE])\n buf.dataLength = 0\n // set the promise first, in case an error is raised\n // by triggering the flow here.\n const p = this.promise()\n this.on('data', c => {\n buf.push(c)\n if (!this[OBJECTMODE])\n buf.dataLength += c.length\n })\n return p.then(() => buf)\n }", "collect () {\n const buf = []\n if (!this[OBJECTMODE])\n buf.dataLength = 0\n // set the promise first, in case an error is raised\n // by triggering the flow here.\n const p = this.promise()\n this.on('data', c => {\n buf.push(c)\n if (!this[OBJECTMODE])\n buf.dataLength += c.length\n })\n return p.then(() => buf)\n }", "collect () {\n const buf = []\n if (!this[OBJECTMODE])\n buf.dataLength = 0\n // set the promise first, in case an error is raised\n // by triggering the flow here.\n const p = this.promise()\n this.on('data', c => {\n buf.push(c)\n if (!this[OBJECTMODE])\n buf.dataLength += c.length\n })\n return p.then(() => buf)\n }", "function sc_forEach(proc, l1) {\n if (l1 === undefined)\n\treturn undefined;\n // else\n var nbApplyArgs = arguments.length - 1;\n var applyArgs = new Array(nbApplyArgs);\n while (l1 !== null) {\n\tfor (var i = 0; i < nbApplyArgs; i++) {\n\t applyArgs[i] = arguments[i + 1].car;\n\t arguments[i + 1] = arguments[i + 1].cdr;\n\t}\n\tproc.apply(null, applyArgs);\n }\n // add return so FF does not complain.\n return undefined;\n}", "breadthFirstForEach(cb) {\n\n }", "function walkFolderCollect()\n\t\t{\n\t\t\tfunction collect(element)\n\t\t\t{\n\t\t\t\tpaths.push(element.path);\n\t\t\t}\n\n\t\t\tvar paths = [];\n\t\t\tUtils.walkFolder('{user}', collect);\n\t\t\tlist(paths)\n\t\t}", "filter(func) {\n let reArr = [];\n this.each((item) => {\n func(item) ? reArr.push(item) : null;\n });\n return new DomQuery(...reArr);\n }", "filter(func) {\n let reArr = [];\n this.each((item) => {\n func(item) ? reArr.push(item) : null;\n });\n return new DomQuery(...reArr);\n }", "sort() {\n\t}", "sort() {\n\t}", "map(fn) {\n return new Compose(this.$value.map(x => x.map(fn)));\n }", "function myFunc(){\n const allDirectors = getAllDirectors(data)\n return [...new Set(allDirectors)]\n}", "function each(collection, func, context) {\n\t var result;\n\t context = context || null;\n\t if (isArray(collection)) {\n\t var length = collection.length;\n\t for (var i = 0; i < length; i++) {\n\t result = func.call(context, collection[i], i);\n\t if (result !== undefined) return result;\n\t }\n\t } else {\n\t for (var key in collection) {\n\t result = func.call(context, collection[key], key);\n\t if (result !== undefined) return result;\n\t }\n\t }\n\t return null;\n\t}", "collate(targetData, itemProp, targetProp) {\n let results = [];\n this.items.forEach(item => {\n let match = targetData.find(d => d[targetProp] === item[itemProp]);\n if (match !== undefined) {\n results.push({ ...match, ...item });\n }\n });\n return results;\n }", "function groupBy(f) {\n return function(xs) {\n if (xs.length === 0) return [];\n var x0 = xs[0]; // :: a\n var active = [x0]; // :: Array a\n var result = [active]; // :: Array (Array a)\n for (var idx = 1; idx < xs.length; idx += 1) {\n var x = xs[idx];\n if (f (x0) (x)) active.push (x); else result.push (active = [x0 = x]);\n }\n return result;\n };\n }", "[Symbol.iterator]() {\n return this.items.values();\n }", "static from(collection){\n let group = new Group;\n for(let value of collection){\n group.add(value);\n }\n return group;\n }", "function flattenAndConvert(docs, fn) {\n var k = [];\n for (var i in docs) {\n k.push(fn(docs[i]));\n }\n return k;\n}", "distinct() {\n return this.reduce(\n (seen, element) => {\n if (!seen.includes(element)) {\n seen.push(element);\n }\n return seen;\n },\n []\n );\n }", "getFields(objCollector, field) {\n if (objCollector[field]) {\n return objCollector[field];\n }\n return undefined;\n }", "function f(a,b,c){b=b||[],c=c||[];var d=/*istanbul ignore start*/void 0;for(d=0;d<b.length;d+=1)if(b[d]===a)return c[d];var e=/*istanbul ignore start*/void 0;if(\"[object Array]\"===k.call(a)){for(b.push(a),e=new Array(a.length),c.push(e),d=0;d<a.length;d+=1)e[d]=f(a[d],b,c);return b.pop(),c.pop(),e}if(a&&a.toJSON&&(a=a.toJSON()),/*istanbul ignore start*/\"object\"===(\"undefined\"==typeof/*istanbul ignore end*/a?\"undefined\":g(a))&&null!==a){b.push(a),e={},c.push(e);var h=[],i=/*istanbul ignore start*/void 0;for(i in a)/* istanbul ignore else */\na.hasOwnProperty(i)&&h.push(i);for(h.sort(),d=0;d<h.length;d+=1)i=h[d],e[i]=f(a[i],b,c);b.pop(),c.pop()}else e=a;return e}" ]
[ "0.73632026", "0.64950097", "0.6187338", "0.5952919", "0.58741635", "0.57947814", "0.57544214", "0.5729692", "0.5697806", "0.55472684", "0.55420387", "0.5536479", "0.5477412", "0.54462093", "0.54036117", "0.53454214", "0.529837", "0.52953535", "0.52857536", "0.5241673", "0.52103335", "0.5194937", "0.5194921", "0.51729", "0.5166678", "0.51578003", "0.51479477", "0.5133713", "0.5131659", "0.51307946", "0.5113322", "0.5113322", "0.50675046", "0.5064861", "0.50568676", "0.5041593", "0.502147", "0.50197965", "0.4995389", "0.4988997", "0.49829438", "0.49648663", "0.4961662", "0.49611464", "0.4958407", "0.49582416", "0.49299407", "0.48955637", "0.48491865", "0.48491865", "0.48442066", "0.48434588", "0.4834062", "0.4833326", "0.4824219", "0.4814935", "0.4814733", "0.480859", "0.4793738", "0.47917145", "0.4789477", "0.4783759", "0.47828522", "0.477241", "0.477241", "0.47580862", "0.47494188", "0.4746726", "0.4737143", "0.4731944", "0.4727048", "0.471479", "0.47123152", "0.47060978", "0.47003424", "0.46914953", "0.46856162", "0.46797794", "0.4679567", "0.46745983", "0.46745983", "0.46745983", "0.46745983", "0.46731672", "0.46711886", "0.4670203", "0.4662355", "0.4662355", "0.46619126", "0.46619126", "0.46610308", "0.46532384", "0.46502438", "0.46440732", "0.46428028", "0.4639025", "0.46334866", "0.4633151", "0.46252453", "0.46250278", "0.462181" ]
0.0
-1
This allows a custom operation on the data elements seen at the last Flow
foreach(func){ var data, _next; _next = this.next; this.next = null; while( (data = this.process()) != null ) func(data); this.next = _next; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "peek(){\n return this.data[this.data.lenght - 1]\n }", "addLast(e) {\n // let { data, size } = this;\n // // last time, size become data.length\n // if ( size >= data.length ) {\n // \tthrow new Error('addLast failed. Array is stuffed');\n // }\n // data[size] = i;\n // size ++; 归并到add方法\n\n // if (this.data.length === this.size) {\n // \tthis.resize(2 * this.size);\n // } 不应该只放在这里\n this.add(this.size, e);\n }", "peek() {\n return this.data[this.data.length -1];\n }", "getLastOpertation() {\n return this._operation[this._operation.length - 1];\n }", "getLastOperation(){\n return this._operation[this._operation.length-1];\n }", "getLastOperation(){\n return this._operation[this._operation.length-1];\n }", "getLast() {\n let runner = this.head;\n\n while (runner.next) {\n runner = runner.next;\n }\n return runner.data;\n }", "function generalCallback(data) {\n lastValue = data;\n }", "popDataLine() {\n this.linesData.pop();\n }", "popDataLine() {\n this.linesData.pop();\n }", "showLastData() {\n let result = []\n if (!this.head) {\n return result\n }\n let current = this.head\n while (current.next) {\n current = current.next\n }\n\n result.push(current.data)\n\n return result\n }", "getLatestBlock() \n{ \n return this.chain[this.chain.length - 1]; \n}", "processData() {\n for (const item of this.unprocessedData) {\n this.addToData(buildOrInfer(item));\n }\n this.unprocessedData.clear();\n }", "get lastOperation() {\n\t\treturn this.operations[this.operations.length-1]\n\t}", "pop () {\n const last = this.length - 1\n const x = this.data[last]\n this._collapseTo(last)\n return x\n }", "peek() {\n return this.arr[this.items.length - 1]\n }", "peek(){\n return this.data[this.count]\n }", "peek(){\n return this.items[this.items.length - 1];\n }", "getLatestBlock(){\r\n return this.chain[this.chain.length-1];\r\n }", "setLastOperator(value) {\n this.operation[this.operation.length - 1] = value;\n }", "peek(){\n return this.items[this.items.length-1];\n }", "pop() {\n if (this.isEmpty()) {\n return null;\n }\n return this.data.shift();\n }", "getLastOperation() {\n return this._operation[this._operation.length - 1];\n }", "getLastOperation() {\n return this._operation[this._operation.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "peek(){\n return this.items[this.items.length-1];\n }", "peekLast(){\n if(this.isEmpty()){ return null}\n return this.tail.data;\n }", "peek(){\n return this.items[this.count - 1];\n }", "getLatestBlock(){\n return this.chain[this.chain.length-1];\n }", "getLatestBlock(){\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock(){\n return this.chain[this.chain.length - 1];\n }", "handleTrailingData() {\n const endIndex = this.buffer.length + this.offset;\n if (this.state === Tokenizer_State.InCommentLike) {\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(this.sectionStart, endIndex, 0);\n }\n else {\n this.cbs.oncomment(this.sectionStart, endIndex, 0);\n }\n }\n else if (this.state === Tokenizer_State.InNumericEntity &&\n this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n // All trailing data will have been consumed\n }\n else if (this.state === Tokenizer_State.InHexEntity &&\n this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n // All trailing data will have been consumed\n }\n else if (this.state === Tokenizer_State.InTagName ||\n this.state === Tokenizer_State.BeforeAttributeName ||\n this.state === Tokenizer_State.BeforeAttributeValue ||\n this.state === Tokenizer_State.AfterAttributeName ||\n this.state === Tokenizer_State.InAttributeName ||\n this.state === Tokenizer_State.InAttributeValueSq ||\n this.state === Tokenizer_State.InAttributeValueDq ||\n this.state === Tokenizer_State.InAttributeValueNq ||\n this.state === Tokenizer_State.InClosingTagName) {\n /*\n * If we are currently in an opening or closing tag, us not calling the\n * respective callback signals that the tag should be ignored.\n */\n }\n else {\n this.cbs.ontext(this.sectionStart, endIndex);\n }\n }", "peek() {\n return this.items[this.items.length - 1];\n }", "peek() {\n return this.items[this.items.length - 1];\n }", "last(returnNode) {\n let node = this[this._end][this._prev];\n return returnNode ? node : node.data;\n }", "peek() {\n return this.items[this.items.length-1];\n }", "pushBack(tensor) {\n if (tensor.dtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${tensor.dtype}, but list elements ${this.elementDtype}`);\n }\n Object(_tensor_utils__WEBPACK_IMPORTED_MODULE_1__[\"assertShapesMatchAllowUndefinedSize\"])(tensor.shape, this.elementShape, 'TensorList shape mismatch: ');\n if (this.maxNumElements === this.size()) {\n throw new Error(`Trying to push element into a full list.`);\n }\n Object(_tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"keep\"])(tensor);\n this.tensors.push(tensor);\n }", "lastBlock() {\n return this.chain.slice(-1)[0];\n }", "destroyLastOperator() {\n return this.operation.pop();\n }", "getLastOperator() {\n return this.operation[this.operation.length - 1];\n }", "addBlock(data){\n\n //we need last block that will take the value from the last index\n //last value of this chain array\n const lastBlock=this.chain[this.chain.length-1];\n\n //Generate new block\n const block= Block.mineBlock(lastBlock, data);\n \n //adding the new produced block to the chain array\n this.chain.push(block)\n\n //result of the function\n return block;\n }", "addDataToFront(data) {}", "peek(){\n console.log('Element on top of Stack: ',this.data[this.size - 1])\n return this.data[this.size-1]\n }", "getLastItem(isOperation = true){\n let lastItem;\n for(let x = this._operation.length-1; x >= 0; x--){\n\n if(this.isOperation(this._operation[x]) == isOperation){\n //console.log(this._operation[x]);\n lastItem = this._operation[x];\n break;\n }\n\n }\n if(!lastItem){\n //(condição) ?(então) :(senao)\n lastItem = (isOperation)? this._lastOperator : this._lastNumber;\n }\n\n return lastItem;\n }", "popBack(elementShape, elementDtype) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n if (this.size() === 0) {\n throw new Error('Trying to pop from an empty list.');\n }\n const outputElementShape = Object(_tensor_utils__WEBPACK_IMPORTED_MODULE_1__[\"inferElementShape\"])(this.elementShape, this.tensors, elementShape);\n const tensor = this.tensors.pop();\n Object(_tensor_utils__WEBPACK_IMPORTED_MODULE_1__[\"assertShapesMatchAllowUndefinedSize\"])(tensor.shape, elementShape, 'TensorList shape mismatch: ');\n return Object(_tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"reshape\"])(tensor, outputElementShape);\n }", "peek() {\n return this.item[this.item.length-1]\n }", "pushBack(tensor) {\n if (tensor.dtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${tensor.dtype}, but list elements ${this.elementDtype}`);\n }\n assertShapesMatchAllowUndefinedSize(tensor.shape, this.elementShape, 'TensorList shape mismatch: ');\n if (this.maxNumElements === this.size()) {\n throw new Error(`Trying to push element into a full list.`);\n }\n keep(tensor);\n this.tensors.push(tensor);\n }", "[types.LOAD_MORE] (state, { data }) {\n state.listData.push.apply(state.listData,data);\n }", "getLastestBlock(){\r\n return this.chain[this.chain.length - 1];\r\n }", "getLatestBlock(){\n return this.chain[this.chain.length];\n }", "pop() {\n if (this.isEmpty()) {\n throw new Error('Blockchain is null');\n }\n // const { data } = this.elements.head;\n return this.elements.removeAtIndex(0);\n }", "peek() {\n return this.items[this.items.length - 1];\n }", "updateFlow() {\n this.flow += 1;\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1];\n }", "tail() {\n return this._tail.data;\n }", "getLast() {\n return this.array[this.length - 1];\n }", "getLast() {\n return this.array[this.length - 1];\n }", "getLast() {\n return this.array[this.length - 1];\n }", "last() { \n \n return this.recall(-1); \n\n }", "goToLast() {\n this.stream.goToLast();\n this.updateScrubberValues({ animate: true, forceHeightChange: true });\n }", "last () { return this[ this.length - 1 ] }", "pop () {\n return this.dataStore[--this.top]\n }", "getLatestBlock() {\n return this.chain[this.chain.length - 1]\n }", "function ingest(datum, prev) {\n datum = dl.isObject(datum) ? datum : {data: datum};\n datum._id = tuple_id++;\n datum._prev = (prev !== undefined) ? (prev || C.SENTINEL) : undefined;\n return datum;\n}", "streamDataModify(rawData, data) {\n\t\tif (data) {\n\t\t\tdata.stream = true;\n\t\t\tdata.streamStart = new Date();\n\t\t\tif (data._deleted) {\n\t\t\t\tconst hits = rawData.filter(hit => hit._id !== data._id);\n\t\t\t\trawData = hits;\n\t\t\t} else {\n\t\t\t\tconst hits = rawData.filter(hit => hit._id !== data._id);\n\t\t\t\trawData = hits;\n\t\t\t\trawData.unshift(data);\n\t\t\t}\n\t\t}\n\t\treturn rawData;\n\t}", "function update_data()\n {\n data = walk_list(container, 0);\n }", "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "getLatestBlock () {\n return this.chain[this.chain.length -1];\n }", "peek(){\n if(this.isEmpty()){\n return undefined;\n }\n\n return this.items[this.count - 1];\n }", "function moreData(series, data) {\n if (data.length) { // TODO try trackMaxDomain here\n var lastKey = data[data.length-1][0];\n var newEnd = Math.max(lastKey, chartData.displayDomain[1]);\n series.data = series.data.concat(data); // TODO overwrite existing keys not just append\n chartData.displayDomain[1] = newEnd;\n transitionRedraw();\n }\n }", "['>']() {\n\t\tthis.d++;\n\t\tif (this.d == this.data.length) {\n\t\t\tthis.data.push(0);\n\t\t}\n\t}", "pop(){\n if(this.items.length == 0){\n return \"Underflow\";\n }\n else{\n return this.items.pop();\n }\n }", "pop(){\n let out = null;\n if(this.head != null){\n out = this.head.getData();\n this.head = this.head.getNext();\n this.length--;\n }\n return out;\n }", "getLatestBlock(){\n\t\treturn this.chain[this.chain.length - 1];\n\t}", "calc() {\n let last = '';\n\n this._lastOperator = this.getLastItem();\n\n\n if (this._operation.length < 3) {\n let firstItem = this._operation[0];\n this._operation = [firstItem, this._lastOperator, this._lastNumber];\n }\n\n if (this._operation.length > 3) {\n\n last = this._operation.pop();\n this._lastNumber = this.getResult();\n\n } else if (this._operation.length == 3) {\n this._lastNumber = this.getLastItem(false);\n }\n\n console.log(\"operador\", this._lastOperator);\n console.log(\"numero\", this._lastNumber);\n\n let result = this.getResult();\n\n if (last == \"%\") {\n result /= 100;\n this._operation = [result];\n } else {\n this._operation = [result];\n\n if (last) this._operation.push(last);\n }\n\n this.lastNumberToDisplay();\n\n }", "peek() {\n return this.storage[this.length - 1];\n }", "_applydata(data, daplet) {\n let i = 0;\n for (let child in daplet) {\n if (!daplet[child].type) continue;\n daplet[child].data = data[i++];\n if (daplet[child].type == \"Structure\") {\n this._applydata(daplet[child].data, daplet[child]);\n }\n }\n }", "function addOp(prev, maxOps) {\n if (maxOps < 1) {\n finalResults.push(prev);\n } else {\n for (let op of ops) {\n for (let i = 0; i < MAX_VAL; i++) {\n addOp([...prev, op, i + 1], maxOps - 1);\n }\n }\n }\n}", "pop() {\n const lastItem = this.data[this.lenght - 1];\n delete this.data[this.lenght - 1];\n this.lenght--;\n return lastItem;\n }", "addBack(val) {\n this.size++;\n this.items.push(val);\n this.peekBack();\n }", "peek() {\n return this.array[this.array.length - 1];\n }", "function postAdd(newData, n0, n1) {\n indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n newValues = newIndex = null;\n }", "get lastItem() {\n return stack[stack.length - 1];\n }", "pop() {\n const value = this.elements.shift()\n this.top--\n return value\n }", "getPrevBlock(){\n return this.chain[this.chain.length-1]; // return previous block obj\n }", "function postAdd(newData, n0, n1) {\n\t indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n\t newValues = newIndex = null;\n\t }", "last() {\n let arr = []\n for(let value of this) {\n arr.push(value)\n }\n return arr[arr.length - 1]\n }", "popBack(elementShape, elementDtype) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n if (this.size() === 0) {\n throw new Error('Trying to pop from an empty list.');\n }\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n const tensor = this.tensors.pop();\n assertShapesMatchAllowUndefinedSize(tensor.shape, elementShape, 'TensorList shape mismatch: ');\n return reshape(tensor, outputElementShape);\n }", "get lastBlock() {\n\t\treturn this.chain.slice(-1)[0];\n\t}", "queuePrev(customData) {\n return Native.queuePrev(customData);\n }", "peek() {\n return this.head ? this.head.data : null;\n }", "appendData(newType, newID, X, Y) {\n\t\tvar functionList = this.state.functionList;\n\t\tvar Op = \"\", vT = \"\";\n\t\tif(newType === funcOp) { Op = \"+\"; vT = \"int\"; }\n const newData = {type: newType, id: newID, x: X, y: Y, needInteract: true, input: {}, input2: {}, output: {}, op: Op, full: false, hasParent: false, name: \"\", valueType: vT};\n\t\t\n\t\tthis.setState({\n\t\t\tfunctionList: functionList.concat([newData]),\n\t\t});\n\t}", "handleLocalData(data) {\n const count = data[data.length - 3];\n const blockId = this.executeCheckList[count];\n if (blockId) {\n const socketData = this.handler.encode();\n socketData.blockId = blockId;\n this.setSocketData({\n data,\n socketData,\n });\n this.socket.send(socketData);\n }\n }", "addOperation(classId, operationId, data) {\n console.log(\"NEW DATA\", data)\n this.operations[operationId] = new OperationData(data);\n console.log(\"NEW DATA2\", this.operations[operationId])\n console.log(\"NEW DATA3\" ,new OperationData(data))\n this.classes[classId].addOperation(operationId);\n }", "_clearDataElements() {}", "function processData(list, type, desc) {\n\n // Convert to data points\n for (var i = 0; i < list.length; i++) {\n list[i] = {\n value: Number(list[i][0]),\n volume: Number(list[i][1]),\n }\n }\n\n // Sort list just in case\n list.sort(function (a, b) {\n if (a.value > b.value) {\n return 1;\n }\n else if (a.value < b.value) {\n return -1;\n }\n else {\n return 0;\n }\n });\n\n // Calculate cummulative volume\n if (desc) {\n for (var i = list.length - 1; i >= 0; i--) {\n if (i < (list.length - 1)) {\n list[i].totalvolume = list[i + 1].totalvolume + list[i].volume;\n }\n else {\n list[i].totalvolume = list[i].volume;\n }\n var dp = {};\n dp[\"value\"] = list[i].value;\n dp[type + \"volume\"] = list[i].volume;\n dp[type + \"totalvolume\"] = list[i].totalvolume;\n res.unshift(dp);\n }\n }\n else {\n for (var i = 0; i < list.length; i++) {\n if (i > 0) {\n list[i].totalvolume = list[i - 1].totalvolume + list[i].volume;\n }\n else {\n list[i].totalvolume = list[i].volume;\n }\n var dp = {};\n dp[\"value\"] = list[i].value;\n dp[type + \"volume\"] = list[i].volume;\n dp[type + \"totalvolume\"] = list[i].totalvolume;\n res.push(dp);\n }\n }\n\n }", "function loopData() {\n\n}", "function handleCurrent(elem) {\n\n if (_esCargaShape == 2 && _current == -1)//significa que todavia no hay ninguno creado\n return;\n\n if (elem.data(\"type\") == \"forward\")\n setCurrent(_current + 1);\n else\n setCurrent(_current - 1);\n\n}" ]
[ "0.5935606", "0.5754769", "0.5748815", "0.5699038", "0.5559181", "0.5559181", "0.5534117", "0.55078715", "0.5498485", "0.5498485", "0.54982674", "0.5490613", "0.5438254", "0.54037255", "0.5354391", "0.5342514", "0.5340543", "0.5320211", "0.52920663", "0.52794516", "0.52734596", "0.5267836", "0.52478784", "0.52478784", "0.5229281", "0.5229281", "0.52221", "0.5219854", "0.5200927", "0.5200208", "0.51800776", "0.51800776", "0.51787406", "0.5176873", "0.5176873", "0.51624775", "0.5154069", "0.515034", "0.51392335", "0.512681", "0.5122113", "0.5110143", "0.5101837", "0.50998354", "0.5093152", "0.5090794", "0.5086129", "0.5082145", "0.50779366", "0.5074544", "0.507292", "0.507127", "0.5065027", "0.50597185", "0.50483966", "0.50483966", "0.50483966", "0.50360394", "0.502589", "0.502589", "0.502589", "0.50164646", "0.5015141", "0.5007608", "0.5007482", "0.500047", "0.49972066", "0.49967217", "0.4996715", "0.49954608", "0.49893308", "0.49866983", "0.49598888", "0.4958874", "0.49553266", "0.49418858", "0.49391267", "0.49242142", "0.4922686", "0.49225318", "0.49221197", "0.49205458", "0.4917401", "0.4910347", "0.49090153", "0.49074596", "0.49014458", "0.4894257", "0.4892342", "0.488989", "0.48853233", "0.48764977", "0.48751166", "0.48742396", "0.4868851", "0.48672384", "0.4866788", "0.48632976", "0.48564592", "0.48533806", "0.48517528" ]
0.0
-1
Alias of foreach for those familiar with the JS forEach
forEach(func){ this.foreach(func); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ForEach() {}", "function forEach(arr, fun) { return HTMLCollection.prototype.each.call(arr, fun); }", "function foreach(a, f) {\n for (var i = 0; i < a.length; i++) {\n f(a[i]);\n }\n}", "forEach(callback, thisArg = undefined) {\n let i = 0;\n for (let p in this)\n callback.call(thisArg, this[p], i++, this);\n }", "function for_each(x, f) {\n Array.prototype.forEach.call(x, f);\n}", "function _forEach(collection, iteratee) {\n const func = Array.isArray(collection) ? _arrayEach : baseEach\n return func(collection, iteratee)\n}", "forEach(f) {\n for (var i=0,l=this.count; i<l; i++) {\n f(this.get(i));\n }\n }", "function testForEach(arr) {\n return arr.forEach( element => { console.log(element)});\n}", "function foreach(what, cb) {\r\n\tfunction isArray(what) {\r\n\t\treturn Object.prototype.toString.call(what) === '[object Array]';\r\n\t}\r\n\r\n\tif (isArray(what)) {\r\n\t\tfor (var i = 0, arr = what; i < what.length; i++) {\r\n\t\t\tcb(arr[i]);\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tcb(what);\r\n\t}\r\n}", "function myForEach(array, callback) {\n\n}", "function forEach(seq,fn) { for (var i=0,n=seq&&seq.length;i<n;i++) fn(seq[i]); }", "function forEach(obj, iterator, context) {\n if (obj === null) {\n return;\n }\n if (nativeForEach && obj.forEach === nativeForEach) {\n obj.forEach(iterator, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, l = obj.length; i < l; i += 1) {\n iterator.call(context, obj[i], i, obj);\n }\n } else {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n }\n}", "function forEach(array, callback) {\n\n}", "function $each(iterable, fn, bind){\n\treturn Array.prototype.forEach.call(iterable, fn, bind);\n}", "function forEach(arr, fn, ctx) {\n var k;\n\n if ('length' in arr) {\n for (k = 0; k < arr.length; k++) fn.call(ctx || this, arr[k], k);\n } else {\n for (k in arr) fn.call(ctx || this, arr[k], k);\n }\n }", "function each(iterator) {\n for (var i = 0, length = this.length; i < length; i++)\n iterator(this[i]);\n }", "function foreach(iterable, fn) {\n const iter = iterable[Symbol.iterator]();\n let result;\n while (!(result = iter.next()).done) {\n const elem = result.value;\n fn(elem);\n }\n}", "function ForEach(nodeList, callback, scope) {\r\n for (var i = 0; i < nodeList.length; i++) {\r\n\t callback(nodeList[i]); // passes back stuff we need\r\n }\r\n}", "function each(iterator) {\n for (var i = 0, length = this.length; i < length; i++)\n iterator(this[i]);\n }", "function each(iterator) {\r\n for (var i = 0, length = this.length; i < length; i++)\r\n iterator(this[i]);\r\n }", "forEach(fn) {\n let node = this.head;\n while (node) {\n fn(node.value);\n node = node.next;\n }\n }", "function forEach(cb, obj) {\r\n if (obj) {\r\n for (var i = 0; i < this.length; i++) {\r\n cb.call(obj, this[i], i);\r\n }\r\n } else {\r\n for (var i = 0; i < this.length; i++) {\r\n cb(this[i], i);\r\n }\r\n }\r\n}", "function ForEach() {\n }", "function myForEach(arr, cb){\n for (var i = 0; i < arr.length; i++) {\n var el = arr[i];\n cb(el, i, arr);\n }\n}", "function forEach(array, callback){\r\n array.forEach(callback);\r\n}", "function forEach(values, callback, thisArg) {\r\n if (values.forEach) {\r\n values.forEach(callback, thisArg);\r\n } else {\r\n for (var i = 0; i < values.length; i++) {\r\n callback.call(thisArg, values[i], i, values);\r\n }\r\n }\r\n }", "function _forEach(obj, cb, _this) {\n\t if (predicates_1.isArray(obj))\n\t return obj.forEach(cb, _this);\n\t Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n\t}", "function _forEach(obj, cb, _this) {\n\t if (predicates_1.isArray(obj))\n\t return obj.forEach(cb, _this);\n\t Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n\t}", "function __for_each(arr, Fn) {\n\t\tArray.prototype.slice.call((typeof arr === 'string' ? document.querySelectorAll(arr) : arr), 0).forEach(Fn);\n\t}", "function forEachNodeList(els, fn) {\n Array.prototype.forEach.call(els, fn);\n}", "_forEach(array, callback, scope) {\n\t \tfor (var i = 0; i < array.length; i++) {\n\t \tcallback.call(scope, i, array[i]); // passes back stuff we need\n\t \t}\n\t}", "function each(arr, inputFunction){\n arr.forEach(function(item){\n inputFunction(item);\n });\n}", "each(callback) {\n this.el.forEach(el => callback(el));\n }", "function forEach(f) {\n return self => forEach_(self, f);\n}", "function _Array_forEach(array, block, context) {\r\n if (array == null) array = global;\r\n var length = array.length || 0, i; // preserve length\r\n if (typeof array == \"string\") {\r\n for (i = 0; i < length; i++) {\r\n block.call(context, array.charAt(i), i, array);\r\n }\r\n } else { // Cater for sparse arrays.\r\n for (i = 0; i < length; i++) { \r\n /*@cc_on @*/\r\n /*@if (@_jscript_version < 5.2)\r\n if ($Legacy.has(array, i))\r\n @else @*/\r\n if (i in array)\r\n /*@end @*/\r\n block.call(context, array[i], i, array);\r\n }\r\n }\r\n}", "function each(coll, f) { \r\n\tif (Array.isArray(coll)) { \r\n\t\t for (var i = 0; i < coll.length; i++) { \r\n\t\t\t\tf(coll[i], i); \r\n\t\t } \r\n\t} else { \r\n\t\t for (var key in coll) { \r\n\t\t\t\tf(coll[key], key); \r\n\t\t } \r\n\t} \r\n}", "forEach(callback) {\n for (const ele of this.arr) {\n callback(ele);\n }\n }", "function _forEach(event, each) {\n return snapshot(function (listener) {\n var thisArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var disposables = arguments.length > 2 ? arguments[2] : undefined;\n return event(function (i) {\n each(i);\n listener.call(thisArgs, i);\n }, null, disposables);\n });\n}", "function each(e,t){if(e){var i;for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}}", "function loopThrough (inventory, foo){\n for (item of inventory){\n foo(item) \n }\n}", "function forEach() {\n\tvar self = this;\n\n\targy(arguments)\n\t\t.ifForm('', function() {})\n\t\t.ifForm('array function', function(tasks, callback) {\n\t\t\tself._struct.push({ type: 'forEachArray', payload: tasks, callback: callback });\n\t\t})\n\t\t.ifForm('object function', function(tasks, callback) {\n\t\t\tself._struct.push({ type: 'forEachObject', payload: tasks, callback: callback });\n\t\t})\n\t\t.ifForm('string function', function(tasks, callback) {\n\t\t\tself._struct.push({ type: 'forEachLateBound', payload: tasks, callback: callback });\n\t\t})\n\t\t.ifForm('number function', function(max, callback) {\n\t\t\tself._struct.push({ type: 'forEachRange', min: 1, max: max, callback: callback });\n\t\t})\n\t\t.ifForm('number number function', function(min, max, callback) {\n\t\t\tself._struct.push({ type: 'forEachRange', min: min, max: max, callback: callback });\n\t\t})\n\t\t.ifForm('string array function', function(output, tasks, callback) {\n\t\t\tself._struct.push({ type: 'mapArray', output: output, payload: tasks, callback: callback });\n\t\t})\n\t\t.ifForm('string object function', function(output, tasks, callback) {\n\t\t\tself._struct.push({ type: 'mapObject', output: output, payload: tasks, callback: callback });\n\t\t})\n\t\t.ifForm('string string function', function(output, tasks, callback) {\n\t\t\tself._struct.push({ type: 'mapLateBound', output: output, payload: tasks, callback: callback });\n\t\t})\n\t\t.ifFormElse(function(form) {\n\t\t\tthrow new Error('Unknown call style for .forEach(): ' + form);\n\t\t});\n\n\treturn self;\n}", "function forEach(items, callback) {\n for (let i = 0; i < items.length; i++) {\n callback(items[i]);\n }\n}", "function _forEach(obj, cb, _this) {\n if (predicates_1.isArray(obj))\n return obj.forEach(cb, _this);\n Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n}", "function _forEach(obj, cb, _this) {\n if (predicates_1.isArray(obj))\n return obj.forEach(cb, _this);\n Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n}", "function forEach(array, callback) {\n for (item of array) {\n callback(item);\n }\n}", "function forEach(array, cb){\n\tfor (let item of arrayGenerator(array)){\n\t\tcb(item)\n\t}\n}", "function printArrayByForEach(val){\n val.forEach(function(val){\n })\n return val;\n}", "forEach(callback) {\n let i = this._cursor;\n let node = this._front;\n let elements = node._elements;\n while (i !== elements.length || node._next !== undefined) {\n if (i === elements.length) {\n node = node._next;\n elements = node._elements;\n i = 0;\n if (elements.length === 0) {\n break;\n }\n }\n callback(elements[i]);\n ++i;\n }\n }", "forEach(callback) {\n let i = this._cursor;\n let node = this._front;\n let elements = node._elements;\n while (i !== elements.length || node._next !== undefined) {\n if (i === elements.length) {\n node = node._next;\n elements = node._elements;\n i = 0;\n if (elements.length === 0) {\n break;\n }\n }\n callback(elements[i]);\n ++i;\n }\n }", "function _forEach(obj, cb, _this) {\n if (isArray(obj))\n return obj.forEach(cb, _this);\n Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n }", "function _forEach(obj, cb, _this) {\n if (isArray(obj))\n return obj.forEach(cb, _this);\n Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n}", "function _forEach(obj, cb, _this) {\n if (isArray(obj))\n return obj.forEach(cb, _this);\n Object.keys(obj).forEach(function (key) { return cb(obj[key], key); });\n}", "function forEach(array, functionToEachItem) {\n for (let i = 0; i < array.length; i++) {\n functionToEachItem(array[i]);\n }\n}", "function forEach(arr, func, ctx) {\n if (!isArrayLike(arr)) {\n throw new Error(\"#forEach() takes an array-like argument. \" + arr);\n }\n for (var i=0, n=arr.length; i < n; i++) {\n func.call(ctx, arr[i], i);\n }\n }", "function each(obj, iterator, context) {\n if (obj == null) return;\n if (nativeForEach && obj.forEach === nativeForEach) {\n obj.forEach(iterator, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, l = obj.length; i < l; i++) {\n if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;\n }\n } else {\n for (var key in obj) {\n if (has(obj, key)) {\n if (iterator.call(context, obj[key], key, obj) === breaker) return;\n }\n }\n }\n }", "function each(coll, f) {\n if (Array.isArray(coll)) {\n for (var i = 0; i < coll.length; i++) {\n f(coll[i], i);\n }\n } else {\n for (var key in coll) {\n f(coll[key], key);\n }\n }\n }", "function myforEach (array, myFunction){\n for(let i=0; i<array.length;i++){\n myFunction(array[i]);\n }\n}", "function myForEach(arr, func) {\n\t//loop through array\n\tfor(var i = 0; i < arr.length; i++) {\n\t\t//call func for each item in array\n\t\t// func() -->\n\t\tfunc(arr[i]);\n\t}\n}", "function forEach(arr, func) {\n for (var i = 0; i < arr.length; i++)\n func(arr[i]);\n}", "function forEach(array, action){\n\t for (var i = 0; i < array.length; i++)\n\t action(array[i]);\n\t}", "function myForEach(arr, func) {\n \n for (var index = 0; index < arr.length; index++) {\n func(arr[index], index, arr);\n \n }\n}", "function forEach(iterable, callbackFn) {\n\tfor(var key in iterable) {\n\t\tif (iterable.hasOwnProperty(key)) {\n\t\t\tcallbackFn(iterable[key])\n\t\t}\n\t}\n}", "function nodeListForEach (nodes, callback) {\n if (window.NodeList.prototype.forEach) {\n return nodes.forEach(callback)\n }\n for (var i = 0; i < nodes.length; i++) {\n callback.call(window, nodes[i], i, nodes);\n }\n}", "forEach(callback) {\n let index = 0;\n for (let current = this.#head.next;\n current != this.#tail;\n current = current.next) {\n callback(current.value, index++);\n }\n }", "function forEach(arr, func)\n{\n\tif (arr.length == 0) return;\n\tfor (var i = 0; i < arr.length; i++)\n\t{\n\t\tfunc(arr[i], i, arr);\n\t}\n}", "function each(coll, f){\n if(Array.isArray(coll)){\n for(var i = 0; i < coll.length; i++){\n f(coll[i], i)\n }\n }\n else{\n for(var key in coll){\n f(coll[key], key)\n }\n }\n}", "forEach(callbackfn, thisArg) {\n this.points.forEach(callbackfn, thisArg);\n }", "function each(item, cb) {\n if(isObject(item)) {\n for (let key of keys(item)) {\n cb(item[key], key);\n }\n } else if(isArrayLike(item)) {\n [...item].forEach(cb);\n } else {\n throw new Error('Argument is not iterable');\n }\n}", "function each(coll, f) {\n if (Array.isArray(coll)) {\n for (var i = 0; i < coll.length; i++) {\n f(coll[i], i);\n }\n } else {\n for (var key in coll) {\n f(coll[key], key);\n }\n }\n}", "function each(collection, callback) {\n\tif (Array.isArray(collection)) {\n\t\tfor (var i=0; i<collection.length; i++) {\n\t\tcallback(collection[i]);\n\t\t}\n\t} else {\n\t\tfor (var prop in collection) {\n\t\t\tcallback(collection[prop]);\n\t\t}\n\t}\n\n}", "function forEachArrayMethod(fn) {\n function call(name, mustConvertThisToArray) {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, name);\n fn(name, desc, !! mustConvertThisToArray);\n }\n\n call(\"every\");\n call(\"filter\");\n call(\"find\");\n call(\"findIndex\");\n call(\"forEach\");\n call(\"includes\");\n call(\"indexOf\");\n call(\"join\");\n call(\"lastIndexOf\");\n call(\"map\");\n call(\"reduce\");\n call(\"reduceRight\");\n call(\"slice\");\n call(\"some\");\n call(\"toLocaleString\");\n call(\"toString\");\n\n // The `reverse` and `sort` methods are usually destructive, but for\n // `tuple` objects they return a new `tuple` object that has been\n // appropriately reversed/sorted.\n call(\"reverse\", true);\n call(\"sort\", true);\n\n // Make `[...someTuple]` work.\n call(useSymbol && Symbol.iterator || \"@@iterator\");\n}", "function forEach(event, each, disposable) {\n return snapshot((listener, thisArgs = null, disposables) => event(i => { each(i); listener.call(thisArgs, i); }, null, disposables), disposable);\n }", "function myForEach(arreglo, callback) { // se declara la función con los parámetros \"arreglo\" y \"callback\"\n // completa aqui\n for (let index = 0; index < arreglo.length; index++) {\n const element = arreglo[index];\n callback(element);\n }\n}", "function each(collection, callback) {\n\tif (Array.isArray(collection)) {\n\t\tfor (var i = 0; i<collection.length; i++) {\n\t\t\tcallback(collection[i]);\n\t\t}\n\t} else {\n\t\tfor (var j in collection) {\n\t\t\tcallback(collection[j]);\n\t\t}\n\t}\n}", "function each(collection,fn){var i=0,length=collection.length,cont;for(i;i<length;i++){cont=fn(collection[i],i);if(cont===false){break;//allow early exit\r\n\t}}}", "function forEach(callback, scope) {\n /*jshint newcap:false*/\n var elements, length, index;\n\n // convert elements to object\n elements = Object(this);\n\n // make sure callback is a function\n requireFunction(callback);\n\n // convert length to unsigned 32 bit integer\n length = elements.length >>> 0;\n\n // iterate over elements\n for (index = 0; index < length; ++index) {\n\n // current index exists\n if (index in elements) {\n\n // execute callback\n callback.call(scope, elements[index], index, elements);\n }\n }\n }", "function each(collection, callback) {\n if (Array.isArray(collection)) {\n for (var i = 0; i < collection.length; i++) {\n callback(collection[i]);\n }\n } else {\n for(var key in collection){\n callback(collection[key]);\n }\n }\n}", "forEach(array, callback, scope) {\n for (let i = 0; i < array.length; i++) {\n callback.call(scope, i, array[i])\n }\n }", "function forEach(fn) {\n for (let v of objects.values()) {\n fn(v);\n }\n }", "function sc_forEach(proc, l1) {\n if (l1 === undefined)\n\treturn undefined;\n // else\n var nbApplyArgs = arguments.length - 1;\n var applyArgs = new Array(nbApplyArgs);\n while (l1 !== null) {\n\tfor (var i = 0; i < nbApplyArgs; i++) {\n\t applyArgs[i] = arguments[i + 1].car;\n\t arguments[i + 1] = arguments[i + 1].cdr;\n\t}\n\tproc.apply(null, applyArgs);\n }\n // add return so FF does not complain.\n return undefined;\n}", "each(action) {\n for (const element of this)\n action(element);\n }", "function each(objOrArr, callBack) {\n\n\n}", "function forEach(array, action) {\n\tfor (var i = 0; i < array.length; i++) {\n\t\taction(array[i])\n\t}\n}", "function polyfill_forEach_if_missing_on(x) {\n\tif (x.forEach) return\n\n\tx.forEach = function(callback, thisArg) {\n\n\t\tvar T, k;\n\n\t\tif (this === null) {\n\t\t\tthrow new TypeError(' this is null or not defined');\n\t\t}\n\n\t\t// 1. Let O be the result of calling toObject() passing the\n\t\t// |this| value as the argument.\n\t\tvar O = Object(this);\n\n\t\t// 2. Let lenValue be the result of calling the Get() internal\n\t\t// method of O with the argument \"length\".\n\t\t// 3. Let len be toUint32(lenValue).\n\t\tvar len = O.length >>> 0;\n\n\t\t// 4. If isCallable(callback) is false, throw a TypeError exception.\n\t\t// See: http://es5.github.com/#x9.11\n\t\tif (typeof callback !== \"function\") {\n\t\t\tthrow new TypeError(callback + ' is not a function');\n\t\t}\n\n\t\t// 5. If thisArg was supplied, let T be thisArg; else let\n\t\t// T be undefined.\n\t\tif (arguments.length > 1) {\n\t\t\tT = thisArg;\n\t\t}\n\n\t\t// 6. Let k be 0\n\t\tk = 0;\n\n\t\t// 7. Repeat, while k < len\n\t\twhile (k < len) {\n\n\t\t\tvar kValue;\n\n\t\t\t// a. Let Pk be ToString(k).\n\t\t\t// This is implicit for LHS operands of the in operator\n\t\t\t// b. Let kPresent be the result of calling the HasProperty\n\t\t\t// internal method of O with argument Pk.\n\t\t\t// This step can be combined with c\n\t\t\t// c. If kPresent is true, then\n\t\t\tif (k in O) {\n\n\t\t\t\t// i. Let kValue be the result of calling the Get internal\n\t\t\t\t// method of O with argument Pk.\n\t\t\t\tkValue = O[k];\n\n\t\t\t\t// ii. Call the Call internal method of callback with T as\n\t\t\t\t// the this value and argument list containing kValue, k, and O.\n\t\t\t\tcallback.call(T, kValue, k, O);\n\t\t\t}\n\t\t\t// d. Increase k by 1.\n\t\t\tk++;\n\t\t}\n\t\t// 8. return undefined\n\t};\n}", "function forEach (arr, func) {\n\tconst len = arr.length\n\tlet i\n\n\tfor (i = 0; i < len; i++) {\n\t\tfunc(arr[i], i, arr)\n\t}\n}", "forEach(callback) {\n callback(this);\n for (const child of this.children) {\n child.forEach(callback);\n }\n }", "function forEach(array, action) {\n for (var i=0; i<array.length; i++) {\n action(array[i]);\n }\n}", "function myForEach(array, callback) {\n for (let i = 0; i < array.length; i++) {\n callback(array[i]);\n }\n}", "function forEach(collection, fn) {\n if (!collection) {\n return false;\n }\n var i = 0,\n limit = collection.length;\n for (; i < limit; i++) {\n fn(collection[i], i);\n }\n }", "function forEach$3(object, callback) {\n if (isArray$5(object)) {\n // array\n var len = object.length;\n\n for (var i = 0; i < len; i++) {\n callback(object[i], i, object);\n }\n } else {\n // object\n for (var key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n callback(object[key], key, object);\n }\n }\n }\n}", "forEach(callback) {\n if ( this.length ) {\n for (let i = 0; i <= this.length - 1; i++) {\n callback(this[i], i);\n }\n }\n }", "function forEach(array, action){\n\tfor (var i = 0; i < array.length; i++){\n\t\taction(array[i]);\n\t}\n}", "function forEach(arr, cb) {\nfor (let i=0; i < arr.length; i++){\n cb(arr[i]); // cb is a function that outputs each element of array!\n}\n}", "function every(arr, boo) {\n return arr.forEach(function(el) {console.log(boo(el)); return boo(el)})\n}", "function forEach(arr=[], callback) {\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tcallback(arr[i])\n\t}\n}", "traverse(){\r\n this.Array.forEach(function (sa) {\r\n \r\n console.log(sa);\r\n\r\n })\r\n}", "forEach(callback) {\n let runner = this.head;\n\n while (runner) {\n callback(runner, this);\n runner = runner.next;\n }\n }", "forEach(fn) {\n let node = this.head;\n let counter = 0;\n while (node) {\n fn(node, counter);\n node = node.next;\n counter++;\n }\n }", "function forEach(arr, func){\n for(let i =0; i< arr.length; i++){\n func(arr[i]);\n }\n}", "function each(coll,f){\n\t\tif(Array.isArray(coll)){\n\t\t\tfor (var i = 0; i <coll.length; i++) {\n\t\t\t\tf(coll[i],i)\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tfor(var key in coll){\n\t\t\t\tf(coll[key],key)\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7932546", "0.7412556", "0.73404443", "0.7309132", "0.7269947", "0.7161315", "0.7154374", "0.7056756", "0.7028455", "0.69966483", "0.6978964", "0.69717395", "0.6971216", "0.69622266", "0.69577485", "0.6856901", "0.6834711", "0.6832951", "0.6823172", "0.6802958", "0.67939556", "0.67927885", "0.67869544", "0.67740643", "0.6772761", "0.67540497", "0.6750619", "0.6750619", "0.674977", "0.6746005", "0.67399186", "0.6729301", "0.67199475", "0.66579354", "0.6640091", "0.66220355", "0.6618782", "0.6602183", "0.6585514", "0.6573011", "0.6551497", "0.655072", "0.65361714", "0.65361714", "0.65350556", "0.65348303", "0.6533779", "0.65285075", "0.65285075", "0.65174943", "0.65124816", "0.65124816", "0.65080166", "0.6490176", "0.64848226", "0.6482686", "0.6471967", "0.6468106", "0.64651763", "0.64613694", "0.64487374", "0.64377713", "0.6433499", "0.6428097", "0.6418856", "0.6412008", "0.6405404", "0.6389776", "0.63862205", "0.63846284", "0.63843334", "0.637989", "0.6375495", "0.63739914", "0.6370741", "0.63652706", "0.636222", "0.6358324", "0.63502717", "0.6347703", "0.6347284", "0.6344417", "0.6331596", "0.6322468", "0.631273", "0.6311959", "0.63105595", "0.6302047", "0.62995785", "0.6299007", "0.6274237", "0.6259661", "0.62580484", "0.62579536", "0.62558055", "0.62469304", "0.62414557", "0.623563", "0.6229062", "0.62225187" ]
0.7717121
1
This function is used to set the linked references for Flows (like LinkedLists)
function setRefs(primary, secondary){ secondary.prev = primary; primary.next = secondary; secondary.rootFlow = primary.rootFlow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setReferences(currentId) {\n if (!(this.referencedVariables[currentId].originalIds.length === 1\n && this.referencedVariables[currentId].originalIds[0] === currentId)) {\n this.referencedVariables[currentId].originalIds.forEach((d) => {\n this.setReferences(d);\n });\n }\n this.referencedVariables[currentId].referenced += 1;\n }", "function setNode(next) {\n var _node = node,\n __anchor = _node.__anchor,\n __focus = _node.__focus;\n\n if (__anchor != null) next.__anchor = __anchor;\n if (__focus != null) next.__focus = __focus;\n node = next;\n }", "function computeNodeLinks() {\n nodes.forEach(function (node) {\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n links.forEach(function (link) {\n var source = link.source, target = link.target;\n link.source_index = source;\n link.target_index = target;\n if (typeof source === \"number\") source = link.source = nodes[link.source];\n if (typeof target === \"number\") target = link.target = nodes[link.target];\n source.sourceLinks.push(link);/////the link in which node as souce/link\n target.targetLinks.push(link);\n });\n }", "function set_links(link_set) {\n\n\tfor(var id in link_set) {\n\n\t\tvar a = document.getElementById(id);\n\t\tif(a)\n\t\t\ta.setAttribute('href', link_set[id]);\n\t}\n}", "function computeNodeLinks() {\n nodes.forEach(function(node) {\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n links.forEach(function(link) {\n var source = link.source,\n target = link.target;\n if (typeof source === \"number\") source = link.source = nodes[link.source];\n if (typeof target === \"number\") target = link.target = nodes[link.target];\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function computeNodeLinks() {\n nodes.forEach(function(node) {\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n links.forEach(function(link) {\n var source = link.source,\n target = link.target;\n if (typeof source === \"number\") source = link.source = nodes[link.source];\n if (typeof target === \"number\") target = link.target = nodes[link.target];\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function LinkedLists(){\n\tthis.head=null;\n}", "_setupLinks() {\n\t\tthis.$links = this.$control.find( '.link' );\n\n\t\tthis._bindLinked();\n\t}", "function computeNodeLinks() {\n\t nodes.forEach(function (node) {\n\t node.sourceLinks = [];\n\t node.targetLinks = [];\n\t });\n\t links.forEach(function (link) {\n\t var source = link.source,\n\t target = link.target;\n\t if (typeof source === \"number\") source = link.source = nodes[link.source];\n\t if (typeof target === \"number\") target = link.target = nodes[link.target];\n\t source.sourceLinks.push(link);\n\t target.targetLinks.push(link);\n\t });\n\t }", "function computeNodeLinks() {\n nodes.forEach(function(node) {\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n links.forEach(function(link, i) {\n var source = link.source,\n target = link.target;\n if (typeof source === \"number\") source = link.source = nodes[link.source];\n if (typeof target === \"number\") target = link.target = nodes[link.target];\n link.originalIndex = i;\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "setReferences(references) {\n this._logger.setReferences(references);\n this._connectionResolver.setReferences(references);\n let contextInfo = references.getOneOptional(new pip_services3_commons_node_1.Descriptor(\"pip-services\", \"context-info\", \"default\", \"*\", \"1.0\"));\n if (contextInfo != null && this._source == null)\n this._source = contextInfo.name;\n if (contextInfo != null && this._instance == null)\n this._instance = contextInfo.contextId;\n }", "function computeNodeLinks() {\n nodes.forEach(function(node) {\n node.sourceLinks = []\n node.targetLinks = []\n })\n links.forEach(function(link) {\n let source = link.source\n let target = link.target\n if (typeof source === 'number') source = link.source = nodes[link.source]\n if (typeof target === 'number') target = link.target = nodes[link.target]\n source.sourceLinks.push(link)\n target.targetLinks.push(link)\n })\n }", "set referenceObject(obj) {\n this._referenceObject = obj;\n }", "function setLinkIndexAndNum()\n { \n for (var i = 0; i < data.links.length; i++) \n {\n if (i != 0 &&\n data.links[i].source == data.links[i-1].source &&\n data.links[i].target == data.links[i-1].target) \n {\n data.links[i].linkindex = data.links[i-1].linkindex + 1;\n }\n else \n {\n data.links[i].linkindex = 1;\n }\n // save the total number of links between two nodes\n if(mLinkNum[data.links[i].target + \",\" + data.links[i].source] !== undefined)\n {\n mLinkNum[data.links[i].target + \",\" + data.links[i].source] = data.links[i].linkindex;\n }\n else\n {\n mLinkNum[data.links[i].source + \",\" + data.links[i].target] = data.links[i].linkindex;\n }\n }\n }", "function setLinkIndexAndNum(){\n for (var i = 0; i < g.links.length; i++){\n if (i != 0 &&\n g.links[i].source == g.links[i-1].source &&\n g.links[i].target == g.links[i-1].target)\n {\n g.links[i].linkindex = g.links[i-1].linkindex + 1;\n }else{\n g.links[i].linkindex = 1;\n }\n // save the total number of links between two nodes\n\t\t\t//console.log(g.links[i])\n if(mLinkNum[g.links[i].target + \",\" + g.links[i].source] !== undefined){\n mLinkNum[g.links[i].target + \",\" + g.links[i].source] = g.links[i].linkindex;\n }else{\n mLinkNum[g.links[i].source + \",\" + g.links[i].target] = g.links[i].linkindex;\n }\n }\n }", "function linkNodes(node1, node2) {\n\tnode1.next = node2;\n\tnode2.prev = node1; \n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n }", "function addLinks(links) {\r\n\t\tgraph.edges =graph.edges || [];\r\n\t\tif (links!==undefined && links.length) {\r\n\t\t\tlinks.forEach(function(link, index) {\r\n\t\t\t\tvar indexOfSourceAndTarget= getIndexOfSourceAndTarget(link);\r\n\t\t\t\tif (indexOfSourceAndTarget!==undefined && indexOfSourceAndTarget.sourceIndex!==undefined && indexOfSourceAndTarget.targetIndex!==undefined) {\r\n\t\t\t\t\tlink.source =indexOfSourceAndTarget.sourceIndex;\r\n\t\t\t\t\tlink.target = indexOfSourceAndTarget.targetIndex;\r\n\t\t\t\t\tgraph.edges.push(link);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}", "function computeNodeLinks() {\n _(nodes).each(function(node) {\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n _(links).each(function(link) {\n var source = link.source,\n target = link.target;\n if (typeof source === \"number\") source = link.source = nodes[link.source];\n if (typeof target === \"number\") target = link.target = nodes[link.target];\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "setReferences(references) {\n let contextInfo = references.getOneOptional(new pip_services3_commons_node_1.Descriptor(\"pip-services\", \"context-info\", \"*\", \"*\", \"1.0\"));\n if (contextInfo != null && this._source == null) {\n this._source = contextInfo.name;\n }\n }", "resetFlow() {\n let current = this.edgesList.head;\n\n while (current != null) {\n current.data.resetFlow();\n current = current.next;\n }\n }", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}", "function computeNodeLinks() {\n\t nodes.forEach(function(node) {\n\t // Links that have this node as source.\n\t node.sourceLinks = [];\n\t // Links that have this node as target.\n\t node.targetLinks = [];\n\t });\n\t links.forEach(function(link) {\n\t var source = link.source,\n\t target = link.target;\n\t if (typeof source === 'number') source = link.source = nodes[link.source];\n\t if (typeof target === 'number') target = link.target = nodes[link.target];\n\t source.sourceLinks.push(link);\n\t target.targetLinks.push(link);\n\t });\n\t }", "function setupLinkedNode (linkedElements, contextObj, targetRecordset, ix, keyingValue) {\n let currentWidgetNodes, currentLinkedNodes, nInfo, currentContextDef, j, keyField, k, nodeId,\n curVal, replacedNode, typeAttr, children, wInfo, nameTable\n let idValuesForFieldName = {}\n let linkInfoArray, nameTableKey, nameNumber, nameAttr, curTarget\n\n currentContextDef = contextObj.getContextDef()\n try {\n currentWidgetNodes = linkedElements.widgetNode\n currentLinkedNodes = linkedElements.linkedNode\n keyField = contextObj.getKeyField()\n if (targetRecordset[ix] && (targetRecordset[ix][keyField] || targetRecordset[ix][keyField] === 0)) {\n for (k = 0; k < currentLinkedNodes.length; k++) {\n // for each linked element\n nodeId = currentLinkedNodes[k].getAttribute('id')\n replacedNode = INTERMediator.setIdValue(currentLinkedNodes[k])\n typeAttr = replacedNode.getAttribute('type')\n if (typeAttr === 'checkbox' || typeAttr === 'radio') {\n children = replacedNode.parentNode.childNodes\n for (i = 0; i < children.length; i++) {\n if (children[i].nodeType === 1 && children[i].tagName === 'LABEL' &&\n nodeId === children[i].getAttribute('for')) {\n children[i].setAttribute('for', replacedNode.getAttribute('id'))\n break\n }\n }\n }\n }\n for (k = 0; k < currentWidgetNodes.length; k++) {\n wInfo = INTERMediatorLib.getWidgetInfo(currentWidgetNodes[k])\n if (wInfo[0]) {\n IMParts_Catalog[wInfo[0]].instanciate(currentWidgetNodes[k])\n if (imPartsShouldFinished.indexOf(IMParts_Catalog[wInfo[0]]) < 0) {\n imPartsShouldFinished.push(IMParts_Catalog[wInfo[0]])\n }\n }\n }\n }\n } catch (ex) {\n if (ex.message === '_im_auth_required_') {\n throw ex\n } else {\n INTERMediatorLog.setErrorMessage(ex, 'EXCEPTION-101')\n }\n }\n\n nameTable = {}\n for (k = 0; k < currentLinkedNodes.length; k++) {\n try {\n nodeId = currentLinkedNodes[k].getAttribute('id')\n if (INTERMediatorLib.isWidgetElement(currentLinkedNodes[k])) {\n nodeId = currentLinkedNodes[k]._im_getComponentId()\n // INTERMediator.widgetElementIds.push(nodeId)\n }\n // get the tag name of the element\n typeAttr = currentLinkedNodes[k].getAttribute('type')\n // type attribute\n linkInfoArray = INTERMediatorLib.getLinkedElementInfo(currentLinkedNodes[k])\n // info array for it set the name attribute of radio button\n // should be different for each group\n if (typeAttr === 'radio') { // set the value to radio button\n nameTableKey = linkInfoArray.join('|')\n if (!nameTable[nameTableKey]) {\n nameTable[nameTableKey] = nameAttrCounter\n nameAttrCounter++\n }\n nameNumber = nameTable[nameTableKey]\n nameAttr = currentLinkedNodes[k].getAttribute('name')\n if (nameAttr) {\n currentLinkedNodes[k].setAttribute('name', nameAttr + '-' + nameNumber)\n } else {\n currentLinkedNodes[k].setAttribute('name', 'IM-R-' + nameNumber)\n }\n }\n for (j = 0; j < linkInfoArray.length; j++) {\n nInfo = INTERMediatorLib.getNodeInfoArray(linkInfoArray[j])\n curVal = targetRecordset[ix][nInfo.field]\n if (!INTERMediator.isDBDataPreferable || curVal) {\n IMLibCalc.updateCalculationInfo(contextObj, keyingValue, nodeId, nInfo, targetRecordset[ix])\n }\n if (nInfo.table === currentContextDef.name) {\n curTarget = nInfo.target\n if (IMLibElement.setValueToIMNode(currentLinkedNodes[k], curTarget, curVal)) {\n postSetFields.push({'id': nodeId, 'value': curVal})\n }\n contextObj.setValue(keyingValue, nInfo.field, curVal, nodeId, curTarget)\n if (idValuesForFieldName[nInfo.field] === undefined) {\n idValuesForFieldName[nInfo.field] = []\n }\n idValuesForFieldName[nInfo.field].push(nodeId)\n }\n }\n } catch (ex) {\n if (ex.message === '_im_auth_required_') {\n throw ex\n } else {\n INTERMediatorLog.setErrorMessage(ex, 'EXCEPTION-27')\n }\n }\n }\n return idValuesForFieldName\n }", "function computeNodeLinks() {\n nodes.forEach(function(node) {\n // Links that have this node as source.\n node.sourceLinks = [];\n // Links that have this node as target.\n node.targetLinks = [];\n });\n links.forEach(function(link) {\n var source = link.source,\n target = link.target;\n if (typeof source === 'number') source = link.source = nodes[link.source];\n if (typeof target === 'number') target = link.target = nodes[link.target];\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function computeNodeLinks() {\n nodes.forEach(function(node) {\n // Links that have this node as source.\n node.sourceLinks = [];\n // Links that have this node as target.\n node.targetLinks = [];\n });\n links.forEach(function(link) {\n var source = link.source,\n target = link.target;\n if (typeof source === 'number') source = link.source = nodes[link.source];\n if (typeof target === 'number') target = link.target = nodes[link.target];\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function reLink(ref) {\n factoryRef = ref;\n factoryRef.onmessage = mHandle;\n }", "setWrapperRef( node ) {\n\t\tthis.wrapperRef = node;\n\t}", "setWrapperRef( node ) {\n\t\tthis.wrapperRef = node;\n\t}", "function LinkList(){\nthis.head = null;\nthis.tail = null;\n}", "invalidateReferences() {\n this._references = undefined;\n }", "invalidateReferences() {\n this._references = undefined;\n }", "function Links() {\n this.list = [];\n this.count = 0;\n this.ambiguousIndex = 0;\n this.ambiguousCount = 0;\n this.internalCount = 0;\n this.externalCount = 0;\n }", "set incomingReferral(incomingReferral) {\n\t\tif (Array.isArray(incomingReferral)) {\n\t\t\tthis._incomingReferral = incomingReferral.map((i) => new Reference(i));\n\t\t} else {\n\t\t\tthis._incomingReferral = [new Reference(incomingReferral)];\n\t\t}\n\t}", "function setOutputLinks (node, color) {\n node.findLinksOutOf().each(function (link) { link.findObject('SHAPE').stroke = color })\n }", "setReferences(references) {\n this._connectionResolver.setReferences(references);\n }", "function setLinks(ev) {\n const name = ev.currentTarget.name;\n const inputValue = ev.currentTarget.value;\n formData[name] = inputValue;\n updateCard();\n}", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "setReferences(references) {\n let tracers = references.getOptional(new pip_services3_commons_node_1.Descriptor(null, \"tracer\", null, null, null));\n for (let i = 0; i < tracers.length; i++) {\n let tracer = tracers[i];\n if (tracer != this)\n this._tracers.push(tracer);\n }\n }", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "setWrapperRef(node) {\n this.wrapperRef = node;\n }", "function setReference(val, value)\r\n{\r\n val[0] = value;\r\n}", "function computeNodeLinks(graph) {\n graph.nodes.forEach(function(node, i) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n var nodeById = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_d3_collection__[\"a\" /* map */])(graph.nodes, id);\n graph.links.forEach(function(link, i) {\n link.index = i;\n var source = link.source, target = link.target;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function computeNodeLinks(graph) {\n graph.nodes.forEach(function(node, i) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n var nodeById = Object(__WEBPACK_IMPORTED_MODULE_1_d3_collection__[\"a\" /* map */])(graph.nodes, id);\n graph.links.forEach(function(link, i) {\n link.index = i;\n var source = link.source, target = link.target;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function computeNodeLinks(graph) {\n graph.nodes.forEach(function(node, i) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n var nodeById = Object(__WEBPACK_IMPORTED_MODULE_1_d3_collection__[\"c\" /* map */])(graph.nodes, id);\n graph.links.forEach(function(link, i) {\n link.index = i;\n var source = link.source, target = link.target;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function computeNodeLinks(graph) {\n graph.nodes.forEach(function(node, i) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n var nodeById = Object(__WEBPACK_IMPORTED_MODULE_1_d3_collection__[\"c\" /* map */])(graph.nodes, id);\n graph.links.forEach(function(link, i) {\n link.index = i;\n var source = link.source, target = link.target;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function LinkedList($, set) {\n\t this.$ = $;\n\t this.$set = $(set);\n\t this.setCursor(0);\n\n\t return this;\n\t}", "function computeNodeLinks(graph) {\n graph.nodes.forEach(function(node, i) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n var nodeById = Object(d3_collection__WEBPACK_IMPORTED_MODULE_1__[\"map\"])(graph.nodes, id);\n graph.links.forEach(function(link, i) {\n link.index = i;\n var source = link.source, target = link.target;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "set objectReferenceValue(value) {}", "storeRefs(ref) {\n this.el = ref;\n this.props.setRef(ref);\n }", "function computeNodeLinks() {\r\n var count = 0;\r\n\r\n nodes.forEach(function(node) {\r\n \r\n node.sourceLinks = [];\r\n node.targetLinks = [];\r\n console.log(node.targetLinks);\r\n // console.log(\"success\" + count + node.name);\r\n // count++;\r\n });\r\n links.forEach(function(link) {\r\n var source = link.source,\r\n target = link.target;\r\n if (typeof source === \"number\") source = link.source = nodes[link.source];\r\n if (typeof target === \"number\") target = link.target = nodes[link.target];\r\n console.log(\"Count: \" + count + \" Source: \" + link.source);\r\n source.sourceLinks.push(link);\r\n target.targetLinks.push(link);\r\n });\r\n }", "function setLinkIndexAndNum()\n {\n for (var i = 0; i < finalResult[1].length; i++)\n {\n if (i != 0 &&\n finalResult[1][i].source == finalResult[1][i - 1].source &&\n finalResult[1][i].target == finalResult[1][i - 1].target)\n {\n finalResult[1][i].linkindex = finalResult[1][i - 1].linkindex + 1;\n }\n else\n {\n finalResult[1][i].linkindex = 1;\n }\n // save the total PhoneNumberber of links between two nodes\n if (mLinkNum[finalResult[1][i].target + \",\" + finalResult[1][i].source] !== undefined)\n {\n mLinkNum[finalResult[1][i].target + \",\" + finalResult[1][i].source] = finalResult[1][i].linkindex;\n }\n else\n {\n mLinkNum[finalResult[1][i].source + \",\" + finalResult[1][i].target] = finalResult[1][i].linkindex;\n }\n }\n }", "function computeNodeLinks(graph) {\n graph.nodes.forEach(function (node, i) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n var nodeById = Object(__WEBPACK_IMPORTED_MODULE_1_d3_collection__[\"a\" /* map */])(graph.nodes, id);\n graph.links.forEach(function (link, i) {\n link.index = i;\n var source = link.source,\n target = link.target;\n if ((typeof source === \"undefined\" ? \"undefined\" : _typeof(source)) !== \"object\") source = link.source = find(nodeById, source);\n if ((typeof target === \"undefined\" ? \"undefined\" : _typeof(target)) !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "function computeNodeLinks(graph) {\n graph.nodes.forEach(function (node, i) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n var nodeById = d3Collection.map(graph.nodes, id);\n graph.links.forEach(function (link, i) {\n link.index = i;\n var source = link.source, target = link.target;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n });\n }", "setDefaulltPointer() {\n this.tempPos = this.head;\n }", "setLinkDirection(valueRegisterer) {\n let link = this.links.find(link => link === valueRegisterer.element);\n let targetedValue = (link.source == valueRegisterer.newValue[0]) ? valueRegisterer.oldValue : valueRegisterer.newValue;\n link.source = targetedValue[0];\n link.target = targetedValue[1];\n this.svgsManager.edgeManager.update();\n }", "_set(idx, val) {\n let count = 0; \n let currNode = this.head;\n while (count != idx && currNode !== null) {\n ++count;\n currNode = currNode.next;\n }\n currNode.val = val;\n }", "setupFramesAndLinks() {\n this.baseFrame = this.vLabItemModel.getObjectByName('baseFrame');\n this.bodyFrame = this.vLabItemModel.getObjectByName('bodyFrame');\n this.torsoFrame = this.vLabItemModel.getObjectByName('torsoFrame');\n this.headFrame = this.vLabItemModel.getObjectByName('headFrame');\n\n this.headYawLink = this.vLabItemModel.getObjectByName('headYawLink');\n this.headTiltLink = this.vLabItemModel.getObjectByName('headTiltLink');\n\n this.shoulderRightLink = this.vLabItemModel.getObjectByName('shoulderFrameR');\n this.limbRightLink = this.vLabItemModel.getObjectByName('limbLinkR');\n this.armRightLink = this.vLabItemModel.getObjectByName('armR');\n this.forearmRollRightLink = this.vLabItemModel.getObjectByName('forearmRollLinkR');\n this.forearmRightFrame = this.vLabItemModel.getObjectByName('forearmFrameR');\n this.rightPalm = this.vLabItemModel.getObjectByName('palmPadR');\n\n this.shoulderLeftLink = this.vLabItemModel.getObjectByName('shoulderFrameL');\n this.limbLeftLink = this.vLabItemModel.getObjectByName('limbLinkL');\n this.armLeftLink = this.vLabItemModel.getObjectByName('armL');\n this.forearmRollLeftLink = this.vLabItemModel.getObjectByName('forearmRollLinkL');\n this.forearmLeftFrame = this.vLabItemModel.getObjectByName('forearmFrameL');\n this.leftPalm = this.vLabItemModel.getObjectByName('palmPadL');\n\n this.headGlass = this.vLabItemModel.getObjectByName('headGlass');\n this.kinectHead = this.vLabItemModel.getObjectByName('kinectHead');\n\n /**\n * Wheels\n */\n this.rightWheel = this.vLabItemModel.getObjectByName('rightWheel');\n this.leftWheel = this.vLabItemModel.getObjectByName('leftWheel');\n this.smallWheelRF = this.vLabItemModel.getObjectByName('smallWheelRF');\n this.smallWheelLF = this.vLabItemModel.getObjectByName('smallWheelLF');\n this.smallWheelRR = this.vLabItemModel.getObjectByName('smallWheelRR');\n this.smallWheelLR = this.vLabItemModel.getObjectByName('smallWheelLR');\n this.smallWheelArmatureRF = this.vLabItemModel.getObjectByName('smallWheelArmatureRF');\n this.smallWheelArmatureLF = this.vLabItemModel.getObjectByName('smallWheelArmatureLF');\n this.smallWheelArmatureRR = this.vLabItemModel.getObjectByName('smallWheelArmatureRR');\n this.smallWheelArmatureLR = this.vLabItemModel.getObjectByName('smallWheelArmatureLR');\n\n this.vLabItemModel.updateMatrixWorld();\n\n /**\n * THREE.Vector3(0.0, -0.117, 0.500) is from blender Head Kinect frontal panel normal direction\n */\n this.kinectHeadDirection = new THREE.Vector3(0.0, -0.117, 0.500).normalize();\n\n this.ValterLinks = {\n bodyFrameYaw: {\n value: this.bodyFrame.rotation.y,\n min: -1.35,\n max: 1.35,\n step: 0.01,\n default: this.bodyFrame.rotation.y\n },\n torsoFrameTilt: {\n value: this.torsoFrame.rotation.x,\n min: 0.0,\n max: 0.85,\n step: 0.01,\n default: this.torsoFrame.rotation.x\n },\n headYawLink: {\n value: this.headYawLink.rotation.y,\n min: -1.35,\n max: 1.35,\n step: 0.02,\n default: this.headYawLink.rotation.y\n },\n headTiltLink: {\n value: this.headTiltLink.rotation.x,\n min: -1.0,\n max: 0.0,\n step: 0.01,\n default: this.headTiltLink.rotation.x\n },\n /**\n * Right side\n */\n shoulderRightLink: {\n value: this.shoulderRightLink.rotation.y,\n min: 0.0,\n max: 1.05,\n step: 0.02,\n default: this.shoulderRightLink.rotation.y\n },\n limbRightLink: {\n value: this.limbRightLink.rotation.x,\n min: -1.48,\n max: 1.045,\n step: 0.04,\n default: this.limbRightLink.rotation.x\n },\n armRightLink: {\n value: this.armRightLink.rotation.z,\n min: -1.38,\n max: 0.0,\n step: 0.02,\n default: this.armRightLink.rotation.z\n },\n forearmRollRightLink: {\n value: this.forearmRollRightLink.rotation.x,\n min: -0.65,\n max: 1.2,\n step: 0.02,\n default: this.forearmRollRightLink.rotation.x\n },\n forearmRightFrame: {\n value: this.forearmRightFrame.rotation.z,\n min: -1.57,\n max: 1.57,\n step: 0.02,\n default: this.forearmRightFrame.rotation.z\n },\n /**\n * Left side\n */\n shoulderLeftLink: {\n value: this.shoulderLeftLink.rotation.y,\n min: -1.05,\n max: 0.0,\n step: 0.02,\n default: this.shoulderLeftLink.rotation.y\n },\n limbLeftLink: {\n value: this.limbLeftLink.rotation.x,\n min: -1.48,\n max: 1.045,\n step: 0.04,\n default: this.limbLeftLink.rotation.x\n },\n armLeftLink: {\n value: this.armLeftLink.rotation.z,\n min: 0.0,\n max: 1.38,\n step: 0.02,\n default: this.armLeftLink.rotation.z\n },\n forearmRollLeftLink: {\n value: this.forearmRollLeftLink.rotation.x,\n min: -0.65,\n max: 1.2,\n step: 0.02,\n default: this.forearmRollLeftLink.rotation.x\n },\n forearmLeftFrame: {\n value: this.forearmLeftFrame.rotation.z,\n min: -1.57,\n max: 1.57,\n step: 0.02,\n default: this.forearmLeftFrame.rotation.z\n }\n };\n this.initializeCableSleeves();\n }", "function computeNodeLinks(nodes, links) {\n nodes.forEach(function(node) {\n node.sourceLinks = [];\n node.targetLinks = [];\n });\n links.forEach(function(link) {\n var source = link.source,\n target = link.target;\n nodes[source].sourceLinks.push(link);\n nodes[target].targetLinks.push(link);\n });\n }", "set referencedClips(value) {}", "\n (\n from_n, //:- Node.Facet.id_n\n to_n, //:- Node.Facet.id_n\n facet_c=null //:- Facet\n )\n {\n const link_c = new Link( from_n, to_n, facet_c )\n this.node_a[from_n].link__v( link_c )\n //?? this.link_a.push( link_c )\n }", "setRefs() {\n this.setState({ refsReady: {} });\n }", "updateReferences() {\n Object.keys(this.referencedVariables).forEach((variable) => {\n this.referencedVariables[variable].referenced = 0;\n });\n this.currentVariables.forEach(d => this.setReferences(d.id));\n this.savedReferences.forEach(d => this.setReferences(d));\n Object.keys(this.referencedVariables).forEach((variable) => {\n if (this.referencedVariables[variable].referenced === 0) {\n delete this.referencedVariables[variable];\n }\n });\n }", "updateReferences() {\n Object.keys(this.referencedVariables).forEach((id) => {\n this.referencedVariables[id].referenced = 0;\n });\n this.currentVariables.forEach(d => this.setReferences(d));\n this.savedReferences.forEach(d => this.setReferences(d));\n Object.keys(this.referencedVariables).forEach((id) => {\n if (this.referencedVariables[id].referenced === 0) {\n delete this.referencedVariables[id];\n }\n });\n }", "function fixLinkTargets() {\n tables['links'].forEach(function(row) {\n row.toCollectionId = row._to.slice(0,4)\n row.fromCollectionId = row._from.slice(0,4)\n delete row.toTableId\n delete row.fromTableId\n })\n}", "setFormRef(name, ref) {\n this.setThisData(\"formRef\", name, ref)\n }", "function resetData() {\n var nodeIds = nodes.map(function (node) {\n return node.id\n })\n baseNodes.forEach(function (node) {\n if (nodeIds.indexOf(node.id) === -1) {\n nodes.push(node)\n }\n })\n links = baseLinks\n}", "function insertingLinksToCollection (item, linked) {\n let linksNumbering=0;\n for( let i=0; i<linked.length; i++ ) {\n item.links[linksNumbering++] = {\n 'rel': linked[i][0],\n 'href': linked[i][1],\n 'prompt': linked[i][0]\n }\n }\n }", "_bindLinked() {\n\t\tif ( this.slidersLinked ) {\n\t\t\tthis.$links.addClass( 'linked' );\n\t\t}\n\n\t\tthis.$links.on( 'click', event => {\n\t\t\tevent.preventDefault();\n\t\t\tthis.slidersLinked = ! this.slidersLinked;\n\t\t\tthis.$links.toggleClass( 'linked', this.slidersLinked );\n\t\t\tthis.$control.trigger( 'linked', { isLinked: this.slidersLinked } );\n\t\t\tthis._triggerChangeEvent();\n\t\t} );\n\t}", "function renameLinks(graph)\n{\n var links = [];\n var i = 0;\n if(graph.hasOwnProperty('links'))\n {\n graph.links.forEach(function(l)\n {\n var sourceNode = graph.nodes.filter(function(n) { return n.group === l.source; })[0];\n var targetNode = graph.nodes.filter(function(n) { return n.group === l.target; })[0];\n\n links.push({source: sourceNode.group, target: targetNode.group, value: l.value, label : l.label});\n });\n }\n graph.links = links;\n return graph;\n}", "function setGraphNodes(graph, nodesToSet) {\n nodesToSet.forEach((n) => {\n if (\n n.type === \"target\" &&\n errorPath !== undefined &&\n !errorPath.includes(n.index)\n ) {\n errorPath.push(n.index);\n }\n graph.setNode(n.index, {\n label: n.label,\n class: `arg-node ${n.type}`,\n id: nodeIdDecider(n),\n });\n });\n }", "updateReferences() {\n for (let variable in this.referencedVariables) {\n this.referencedVariables[variable].referenced = 0;\n }\n this.currentVariables.forEach(d => this.setReferences(d.id));\n this.savedReferences.forEach(d => this.setReferences(d));\n for (let variable in this.referencedVariables) {\n if (this.referencedVariables[variable].referenced === 0) {\n delete this.referencedVariables[variable]\n }\n }\n }", "link(l2){\n if (l2 instanceof LinkItem){\n this.next = l2;\n l2.last = this\n }\n }", "constructor(linkedList) {\n this.ln = linkedList;\n this.curr = null;\n this.first = true;\n }", "_setupLinkedChange() {\n\t\tthis.deviceSelection.events.on( 'linkedToggle', ( isLinked ) => {\n\t\t\tconst selectedDevice = this.deviceSelection.getSelectedValue();\n\n\t\t\tif ( isLinked ) {\n\t\t\t\tthis.tempSavedSettings[ selectedDevice ] = this.settings.media[ selectedDevice ];\n\n\t\t\t\tlet baseSettings;\n\n\t\t\t\t// Determine the correct base styles to use.\n\t\t\t\tif ( this.configDefaults.media.base ) {\n\t\t\t\t\tbaseSettings = this.configDefaults.media.base;\n\t\t\t\t} else {\n\t\t\t\t\tbaseSettings = this.configDefaults.media.large;\n\t\t\t\t}\n\n\t\t\t\tif ( this.settings.media && this.settings.media.base ) {\n\t\t\t\t\tbaseSettings = this.settings.media.base;\n\t\t\t\t} else {\n\t\t\t\t\tbaseSettings = this.settings.media.large;\n\t\t\t\t}\n\n\t\t\t\t// Update inputs.\n\t\t\t\tthis.applySettings( baseSettings );\n\n\t\t\t\t// Trigger an event where the device is unset.\n\t\t\t\tdelete this.settings.media[ selectedDevice ];\n\t\t\t\tthis.settings.css = this._consolidateMediaCss( this.settings );\n\t\t\t\tthis._updateRelationshipStatus( this.settings );\n\t\t\t\tthis.events.emit( 'change', this.settings );\n\t\t\t} else {\n\t\t\t\tlet unlinkSettings;\n\t\t\t\tif ( this.configDefaults.media.base ) {\n\t\t\t\t\tunlinkSettings = this.configDefaults.media.base;\n\t\t\t\t} else {\n\t\t\t\t\tunlinkSettings = this.configDefaults.media.large;\n\t\t\t\t}\n\n\t\t\t\tif ( this.settings.media && this.settings.media.base ) {\n\t\t\t\t\tunlinkSettings = this.settings.media.base;\n\t\t\t\t}\n\n\t\t\t\tif ( this.tempSavedSettings[ selectedDevice ] ) {\n\t\t\t\t\tunlinkSettings = this.tempSavedSettings[ selectedDevice ];\n\t\t\t\t}\n\n\t\t\t\tthis.applySettings( unlinkSettings );\n\t\t\t}\n\t\t} );\n\t}", "function tempLink(source, target, type, relationGroup) {\r\n this.source = source;\r\n this.target = target;\r\n this.type = type;\r\n this.relationGroup = relationGroup;\r\n this.active = false;\r\n this.conflict = false;\r\n // setter for conflict\r\n this.changeConflict = function(conflict) {\r\n this.conflict = conflict;\r\n };\r\n }", "constructor() {\n this._head = null\n this._tail = this._head \n }" ]
[ "0.6091946", "0.6017897", "0.59291023", "0.5927652", "0.5911776", "0.59032995", "0.58989304", "0.58872604", "0.58802027", "0.5861781", "0.58299994", "0.5828967", "0.57657737", "0.5746016", "0.5735655", "0.5723207", "0.57144654", "0.56937146", "0.56832844", "0.56626827", "0.5659648", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5638631", "0.5626555", "0.56236905", "0.5622738", "0.5622738", "0.5589736", "0.557739", "0.557739", "0.55575156", "0.5535161", "0.5535161", "0.553392", "0.553188", "0.5529752", "0.551812", "0.55179214", "0.5516321", "0.5516321", "0.5516321", "0.55036676", "0.54960674", "0.54960674", "0.54960674", "0.54960674", "0.54960674", "0.54960674", "0.5488929", "0.54711384", "0.54381776", "0.5425562", "0.5425562", "0.5373451", "0.5363533", "0.5358487", "0.5348723", "0.5346725", "0.5346138", "0.53437793", "0.5339236", "0.53390753", "0.5309757", "0.52945423", "0.52846736", "0.5279059", "0.527774", "0.52684724", "0.5262319", "0.5250415", "0.52462524", "0.5233439", "0.5232691", "0.52283484", "0.5225404", "0.5223024", "0.522211", "0.5220149", "0.52060366", "0.5203732", "0.51739496", "0.51709414", "0.5163772", "0.515868" ]
0.6770335
0
This method is used to determine if data is pushed on this IteratorFlow as a stream
isStream(){ return this.iterators.length > 0 && this.iterators[0].streamer && Util.isStreamer(this.iterators[0].streamer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasPipeDataListeners(stream){var listeners=stream.listeners('data');for(var i=0;i<listeners.length;i++){if(listeners[i].name==='ondata'){return true;}}return false;}", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\n if( !this.isDiscretized ) {\n while(true) {\n if (!this.isListening || this.pos >= this.iterators.length)\n break;\n //get the data from the current iterator\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done)\n break;\n\n this.push(obj.value);\n }\n }\n else{//for discretized flows\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n do{\n obj = this.iterators[this.pos].next();\n while( !obj.done ){\n this.streamElements.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( this.streamElements.length > 0 ){\n while(true) {\n this.streamElements.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n break;\n }\n }\n }\n\n this.pos++;\n }while( this.pos < this.iterators.length );\n }\n else{\n var ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n var justEnded = false;\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n ended.push(false);\n }\n\n do{\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n justEnded = true;\n this.push(this.streamElements.slice());\n this.streamElements = [];\n\n //check if all items have ended\n if( Flow.from(ended).allMatch((input) => input) )\n break;\n }\n else\n justEnded = false;\n }while(true);\n }\n }\n\n this.isListening = false; //we done processing so stop listening\n this.pos = 0; //reset the pos for other operations\n }", "get hasStream() {\n return this._outStream !== null && this._outStream !== undefined;\n }", "isStream() {\n return this.streamRoute != null;\n }", "hasNext() {\n return this.state.offset > 0 && this.state.history.length > 1;\n }", "function $oLVR$var$hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data');\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true;\n }\n }\n\n return false;\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data');\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true;\n }\n }\n\n return false;\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "function hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}", "_is_readable_stream(obj) {\n if (!obj || typeof obj !== 'object') return false;\n return typeof obj.pipe === 'function' && typeof obj._readableState === 'object';\n }", "function is_stream(xs) {\n return (array_test(xs) && xs.length === 0)\n\t|| (is_pair(xs) && typeof tail(xs) === \"function\" &&\n is_stream(stream_tail(xs)));\n}", "function isStreamOperation(operationSpec) {\n var result = false;\n for (var statusCode in operationSpec.responses) {\n var operationResponse = operationSpec.responses[statusCode];\n if (operationResponse.bodyMapper &&\n operationResponse.bodyMapper.type.name === MapperType.Stream) {\n result = true;\n break;\n }\n }\n return result;\n }", "function isStream (val) {\n return val && typeof val.pipe === 'function' && val.readable\n}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}", "function needMoreData(state) {\n return (\n !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0)\n );\n }", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n }", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n }", "get streamType() {\n return this._data.type;\n }", "function isStream(stream) {\n \n /*\n * Function isStream\n * Returns whether variable is stream\n */\n\n return (\n stream !== null &&\n typeof stream === \"object\" &&\n typeof stream.pipe === \"function\"\n );\n \n }", "function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }", "isFIFO() {\n return (this.#type & IFMT) === IFIFO;\n }", "resolveData() {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer;\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift();\n this.shiftBufferFromUnresolvedDataArray(buffer);\n }\n else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n }\n else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }", "resolveData() {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer;\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift();\n this.shiftBufferFromUnresolvedDataArray(buffer);\n }\n else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n }\n else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n\t}", "function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0);}// backwards compatibility.", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\n\t return !state.ended &&\n\t (state.needReadable ||\n\t state.length < state.highWaterMark ||\n\t state.length === 0);\n\t}", "function needMoreData(state) {\r\n return !state.ended &&\r\n (state.needReadable ||\r\n state.length < state.highWaterMark ||\r\n state.length === 0);\r\n}", "eof() {\n return this.at === this.buffer.byteLength;\n }", "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "hasNext() {\n return !this.done;\n }", "hasNext() {\n return !this.done;\n }", "eof() {\n return this.length === this.buffer.byteLength;\n }", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}", "function needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}" ]
[ "0.65608674", "0.6411723", "0.6329973", "0.6166335", "0.61634654", "0.6122687", "0.6122133", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.6107537", "0.59534353", "0.5935901", "0.57682997", "0.57508093", "0.5728113", "0.57259804", "0.57227457", "0.57158315", "0.57158315", "0.57038707", "0.57036334", "0.57036334", "0.56705666", "0.56702316", "0.5661749", "0.566092", "0.5651945", "0.5651945", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.5626191", "0.56238115", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.5619763", "0.56124324", "0.55892056", "0.55861074", "0.5577724", "0.5577724", "0.554951", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046", "0.55472046" ]
0.7266703
0
The process method will act like the pipe method in the default Flow class (but without an input)
process(){ if (this.pos >= this.iterators.length) { this.pos = 0; return null; } if( !this.isDiscretized ) { //##go through the iterators one after the other## //get the data from the current iterator var obj = this.iterators[this.pos].next(); //check for the next iterator that has data while (obj.done && this.pos < this.iterators.length) { this.pos++; if (this.pos >= this.iterators.length) break; obj = this.iterators[this.pos].next(); } if (obj.done) { this.pos = 0; return null; } if (this.next !== null) return this.next.pipe(obj.value); return obj.value; } else{//for discretized flows //we use this instead of the streamElements cause we don't need to save state. //Also, clearing streamElements could affect implementations storing the output var streamData = []; //ensure that our discrete stream length is not more than the number of iterators we have this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length); if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next obj = this.iterators[this.pos].next(); //check for the next iterator that has data while (obj.done && this.pos < this.iterators.length) { this.pos++; if (this.pos >= this.iterators.length) break; obj = this.iterators[this.pos].next(); } if (obj.done) { this.pos = 0; return null; } while( !obj.done ){ streamData.push(obj.value); if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){ if (this.next !== null) return this.next.pipe(streamData); return streamData; } obj = this.iterators[this.pos].next(); } //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to //discretize with one iterator if( streamData.length > 0 ){ while(true) { streamData.push(null); if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){ if (this.next !== null) return this.next.pipe(streamData); return streamData; } } } } else{ if( !this.recall.ended ) { this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to //waste one round of iteration to discover that they have all ended which will create null data. this.recall.justEnded = false; for (let i = 0; i < this.discreteStreamLength; i++) { this.recall.ended.push(false); } } do{ //check if all items have ended if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) ) break; var pack = []; for(let i = 0; i < this.discreteStreamLength; i++){ if( this.recall.ended[i] ) pack[i] = null; else { obj = this.iterators[i].next(); if( obj.done ) { this.recall.ended[i] = true; pack[i] = null; } else pack[i] = obj.value; } } //check if we just ended on the last iteration and this current sets of data are just nulls if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) ) break; this.streamElements.push(pack); if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){ this.recall.justEnded = true; try { if (this.next !== null) return this.next.pipe(this.streamElements.slice()); return this.streamElements.slice(); } finally{ this.streamElements = []; } } else this.recall.justEnded = false; }while(true); this.pos = 0; //reset the pos variable to allow for reuse //clear temp fields delete this.recall.ended; delete this.recall.justEnded; //reset temp stream storage variable this.streamElements = []; return null; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "process() {}", "process() {}", "function Process(){}", "_transform(data, done){\r\n this.stdio.stdin.splitPush(data)\r\n this.fork.stdin.write(data) && done() || this.fork.stdin.on('drain', done)\r\n }", "function pipe() {\n return {name: 'pipe', value: [].slice.call(arguments)}\n}", "function pipe(stream) {\n var cache, scope = this;\n if(stream) {\n // add to the pipeline\n this.fuse(stream);\n // ensure return values are also added to the pipeline\n cache = stream.pipe;\n stream.pipe = function(/* dest */) {\n // restore cached method when called\n this.pipe = cache;\n // proxy to the outer pipe function (recurses)\n return scope.pipe.apply(scope, arguments);\n }\n stream.pipe.cache = cache;\n }\n return stream;\n}", "function Process (state) {\n this.state = state;\n}", "function pipe(fs) {\n return function(x) {\n return reduce (T) (x) (fs);\n };\n }", "pipe(to){\n let from = this;\n if(!from) log.warn('Stage.pipe: \"from stage\" mssing');\n if(!to) log.warn('Stage.pipe: \"from to\" mssing');\n\n // default: source remains alive is destination closes/errs\n return from.stream.pipe(to.stream);\n // this will kill the source if the destination fails\n // miss.pipe(from, to, (error) => {\n // error = error || '';\n // log.silly(\"Session.pipe.Error event: \", `${error}`);\n // this.emit('error', error, from, to);\n // });\n }", "run() {\n const self = this;\n return new Promise((resolve, reject) => {\n const pipelineArgs = [\n self.feedInStream,\n new LoggerStream({\n message: \"feedReader.run feedInStream>\"\n }),\n parallel.transform(\n (feed, encoding, callback) => {\n self\n .process(feed.url)\n .then(() => {\n callback(null, feed);\n return feed;\n })\n .catch(error => {\n callback(error);\n });\n }, {\n objectMode: true,\n concurrency: self.concurrency\n }),\n new LoggerStream({\n message: \"feedReader.run parallel.transform>\"\n }),\n ];\n if (self.feedOutStream) {\n pipelineArgs.push(\n new LoggerStream({\n message: \"feedReader.run >feedOutStream\"\n }),\n self.feedOutStream\n );\n }\n // Pipeline final argument is a callback\n pipelineArgs.push((error) => {\n if (error) {\n return reject(error);\n }\n resolve();\n });\n pipeline.apply(null, pipelineArgs);\n });\n }", "function pipe(context) {\n if (context.pipes.length < 1) {\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Request pipeline contains no methods!\", 3 /* Error */);\n throw Error(\"Request pipeline contains no methods!\");\n }\n var promise = next(context).then(function (ctx) { return returnResult(ctx); }).catch(function (e) {\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].error(e);\n throw e;\n });\n if (context.isBatched) {\n // this will block the batch's execute method from returning until the child requests have been resolved\n context.batch.addResolveBatchDependency(promise);\n }\n return promise;\n}", "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function pipeline (input, fun1, fun2) {\n return fun2(fun1(input))\n}", "function startPipeline() {\n // In this way we read one block while we decode and play another.\n if (state.state == STATE.PLAYING) {\n processState();\n }\n processState();\n }", "function handleInput() {\n process(input.value());\n}", "function handleInput() {\n process(input.value());\n}", "function process(data){\n //do something with data\n}", "function pipe(context) {\r\n if (context.pipeline.length < 1) {\r\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Request pipeline contains no methods!\", 2 /* Warning */);\r\n }\r\n var promise = next(context).then(function (ctx) { return returnResult(ctx); }).catch(function (e) {\r\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].error(e);\r\n throw e;\r\n });\r\n if (context.isBatched) {\r\n // this will block the batch's execute method from returning until the child requets have been resolved\r\n context.batch.addResolveBatchDependency(promise);\r\n }\r\n return promise;\r\n}", "function pipeExec(fn) {\n\n\t\tlet canExec = true;\n\n\t\tfunction transform(chunk, enc, cb) {\n\t\t\tif (canExec) {\n\t\t\t\tfn();\n\t\t\t\tcanExec = false;\n\t\t\t}\n\t\t\tcb(null, chunk);\n\t\t}\n\n\t\tfunction flush(cb) {\n\t\t\tcanExec = false;\n\t\t\tcb();\n\t\t}\n\n\t\treturn lib.through.obj(null, transform, flush);\n\n\t}", "function pipe(value) {\r\n function nextPipe(transformer) {\r\n return pipe(transformer(value));\r\n }\r\n nextPipe.value = value;\r\n return nextPipe;\r\n}", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function Pipe(sink) {\n\t\tthis.sink = sink;\n\t}", "pipeTypeCheck(them) {\n // console.log(this.name + \" got pipe from\");\n // console.log(them);\n }", "function HashPipeStream() {\n\tvar self = this;\n\tself.readable = true;\n\tself.writable = true;\n\tstream.Stream.call(this);\n}", "process () {\n const task = this.shift()\n\n if (task) {\n this.process()\n task.promise.finally(this.process.bind(this))\n }\n }", "function BinaryPipe(buffer, initialObject = {}) {\n const generator = bufferGenerator_1.bufferGenerator(buffer);\n return {\n /**\n * Pipes buffer through given parsers.\n * It's up to parser how many bytes it takes from buffer.\n * Each parser should return new literal object, that will be merged to previous object (or initialObject) by pipe.\n *\n * @param parsers - parsers for pipeline\n */\n pipe(...parsers) {\n // Call each parser and merge returned value into one object\n return parsers.reduce((previousValue, parser) => {\n const result = parser[1](generator);\n return Object.assign({}, previousValue, { [parser[0]]: result });\n }, initialObject);\n },\n /**\n * Returns special pipe function, which iterates `count` times over buffer,\n * returning array of results.\n *\n * @param count - number of times to iterate.\n */\n loop(count) {\n // save basePipe reference to avoid returned pipe calling itself\n const basePipe = this.pipe;\n return {\n pipe(...parsers) {\n const entries = [];\n // Call basePipe `count` times\n for (let i = 0; i < count; i += 1) {\n entries.push(basePipe(...parsers));\n }\n return entries;\n },\n };\n },\n /**\n * Returns buffer not parsed by pipe yet.\n * Closes generator, so no piping will be available after calling `finish`.\n */\n finish() {\n const buf = [];\n // Take all bytes and close generator\n let lastResult;\n do {\n lastResult = generator.next();\n buf.push(lastResult.value);\n } while (!lastResult.done);\n return Buffer.from(buf);\n },\n };\n}", "function main(...fns) {return fns.reduce(pipe)}", "function pipeMessage(client, inputName, msg) {\n client.complete(msg, printResultFor('Receiving message'));\n\n if (inputName === 'input1') {\n var message = msg.getBytes().toString('utf8');\n if (message) {\n var outputMsg = new Message(message);\n client.sendOutputEvent('output1', outputMsg, printResultFor('Sending received message'));\n }\n }\n}", "function pipeMessage(client, inputName, msg) {\n client.complete(msg, printResultFor('Receiving message'));\n\n if (inputName === 'input1') {\n var message = msg.getBytes().toString('utf8');\n if (message) {\n var outputMsg = new Message(message);\n client.sendOutputEvent('output1', outputMsg, printResultFor('Sending received message'));\n }\n }\n}", "execute(state, next){\n const pipeline = state.pipelineHandler;\n if(state.lastCode !== 0){\n const process = pipeline.clone({process: state.config.lastFailed});\n return process.execute(state, next);\n }\n const process = pipeline.clone({process: state.config.lastSucceeded});\n return process.execute(state, next);\n }", "function pipe(value) {\n\t for (var _len = arguments.length, pipeArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t pipeArgs[_key - 1] = arguments[_key];\n\t }\n\n\t return createPipe.apply(void 0, pipeArgs)(value);\n\t}", "onProcess(prop, value, progress) {\n }", "async interpret() {\n const byteCode = await this.emitRawStream();\n await new Promise((resolve, reject) => {\n let lli = spawn('lli', [], {\n stdio: ['pipe', 'inherit', 'inherit']\n });\n\n byteCode.pipe(lli.stdin);\n\n lli.on('error', reject);\n lli.on('exit', resolve);\n });\n }", "function pipe(context) {\n return next(context)\n .then(function (ctx) { return returnResult(ctx); })\n .catch(function (e) {\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: \"Error in request pipeline: \" + e.message,\n });\n throw e;\n });\n}", "function SimplePipeStream() {\n\tvar self = this;\n\tself.readable = true;\n\tself.writable = true;\n\tstream.Stream.call(this);\n}", "function CollectStream() {\n stream.Transform.call(this);\n this._chunks = [];\n this._transform = (chunk, enc, cb) => { this._chunks.push(chunk); cb(); }\n this.collect = () => { return Buffer.concat(this._chunks); this._chunks = []; }\n}", "function processInput(buffer, cb) {\n if (buffer.length == 0) return buffer;\n var split_char = '\\n';\n var lines = buffer.split(split_char);\n // If there are any line splits, the below logic always works, but if there are none we need to detect this and skip\n // any processing.\n if (lines[0].length == buffer.length) return buffer;\n // Note last item is ignored since it is the remainder (or empty)\n for(var i = 0; i < lines.length-1; i++) {\n var line = lines[i];\n if (format == \"binary\") {\n target.produce(line, handleProduceResponse.bind(undefined, cb));\n } else if (format == \"avro\") {\n // Avro data should be passed in its JSON-serialized form\n try {\n var avro = JSON.parse(line);\n } catch (e) {\n console.log(\"Couldn't parse '\" + line + \"' as JSON\");\n continue;\n }\n target.produce(valueSchema, avro, handleProduceResponse.bind(undefined, cb));\n }\n // OR with key or partition:\n //target.produce({'partition': 0, 'value': line}, handleProduceResponse.bind(undefined, cb));\n //target.produce({'key': 'console', 'value': line}, handleProduceResponse.bind(undefined, cb));\n num_messages += 1;\n num_bytes += line.length;\n }\n return lines[lines.length-1];\n}", "[PIPE] (job) {\n job.piped = true\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n const source = job.entry\n const zip = this.zip\n\n if (zip) {\n source.on('data', chunk => {\n if (!zip.write(chunk))\n source.pause()\n })\n } else {\n source.on('data', chunk => {\n if (!super.write(chunk))\n source.pause()\n })\n }\n }", "pipe() {\n return new Promise(resolve => {\n const args = [];\n const stdin = process.openStdin();\n \n stdin.on('data', _ => args.push(..._.toString().split(this.opts.splitChar)));\n stdin.on('end', _ => resolve(args));\n stdin.on('error', _ => this.opts.stdErr(`Error: `, _));\n \n setTimeout(_ => {\n if (!args.length) {\n stdin.destroy();\n resolve(false);\n }\n }, this.opts.pipeTimeout);\n });\n }", "onProcess(audioProcessingEvent) {\n\n this.blocked = true;\n this.nCall++;\n\n let inputBuffer = audioProcessingEvent.inputBuffer;\n let outputBuffer = audioProcessingEvent.outputBuffer;\n\n for (let chIdx = 0; chIdx < outputBuffer.numberOfChannels; chIdx++) {\n let inputData = inputBuffer.getChannelData(chIdx);\n let outputData = outputBuffer.getChannelData(chIdx);\n\n if (!this.bypass) {\n this.PreStageFilter[chIdx].process(inputData, outputData);\n } else {\n // just copy\n for (let sample = 0; sample < inputBuffer.length; sample++) {\n outputData[sample] = inputData[sample];\n }\n }\n } // next channel\n\n let time = this.nCall * inputBuffer.length / this.sampleRate;\n let gl = this.calculateLoudness(outputBuffer);\n this.callback(time, gl);\n\n this.blocked = false;\n }", "function pipeStream() {\n var args = _.toArray(arguments);\n var src = args.shift();\n\n return new Promise(function(resolve, reject) {\n var stream = src;\n var target;\n\n while ((target = args.shift()) != null) {\n stream = stream.pipe(target).on('error', reject);\n }\n\n stream.on('finish', resolve);\n stream.on('end', resolve);\n stream.on('close', resolve);\n });\n}", "function pipe(context) {\r\n return next(context)\r\n .then(function (ctx) { return returnResult(ctx); })\r\n .catch(function (e) {\r\n __WEBPACK_IMPORTED_MODULE_2__pnp_logging__[\"a\" /* Logger */].log({\r\n data: e,\r\n level: 3 /* Error */,\r\n message: \"Error in request pipeline: \" + e.message,\r\n });\r\n throw e;\r\n });\r\n}", "function pipe(value) {\n for (var _len = arguments.length, pipeArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n pipeArgs[_key - 1] = arguments[_key];\n }\n\n return createPipe.apply(void 0, pipeArgs)(value);\n}", "[PIPE] (job) {\n job.piped = true\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = this.prefix ?\n job.path.slice(this.prefix.length + 1) || './'\n : job.path\n\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n const source = job.entry\n const zip = this.zip\n\n if (zip) {\n source.on('data', chunk => {\n if (!zip.write(chunk))\n source.pause()\n })\n } else {\n source.on('data', chunk => {\n if (!super.write(chunk))\n source.pause()\n })\n }\n }", "[PIPE] (job) {\n job.piped = true\n\n if (job.readdir)\n job.readdir.forEach(entry => {\n const p = this.prefix ?\n job.path.slice(this.prefix.length + 1) || './'\n : job.path\n\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n\n const source = job.entry\n const zip = this.zip\n\n if (zip)\n source.on('data', chunk => {\n if (!zip.write(chunk))\n source.pause()\n })\n else\n source.on('data', chunk => {\n if (!super.write(chunk))\n source.pause()\n })\n }", "run() {\n this.io = readline.createInterface(process.stdin, process.stdout);\n this.io.on('line', this.handleLine.bind(this));\n this.io.on('close', this.handleIOClose.bind(this));\n }", "function pipeNext() {\n _this.streaming = true;\n closeCurrent();\n if (_this.index + 1 < _this.sources.length) {\n // Send new stream.\n _this.index += 1;\n const stream = _this.sources[_this.index];\n stream.on(\"end\", pipeNext);\n stream.pipe(_this.target, {\"end\": false});\n _this.currentClosed = false;\n } else {\n // Nothing more to stream.\n if (_this.closeOnEnd) {\n _this.target.end();\n } else {\n }\n // Wait for next stream.\n _this.streaming = false;\n }\n }", "function pipeMessage(client, msg) {\n client.sendOutputEvent('output1', msg, printResultFor('Sending received message'));\n}", "function _readFromPipe() {\n return state.pipedValue;\n}", "function _readFromPipe() {\n return state.pipedValue;\n}", "function _readFromPipe() {\n return state.pipedValue;\n}", "function _readFromPipe() {\n return state.pipedValue;\n}", "function PipeType(){}", "function CreateStreamProcessorCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "function onReadableListener() {\n // Mark our flag as \"flowing\" so we know we're processing\n stdinFlowing = true;\n let chunk;\n // Use a loop to make sure we read all available data.\n while ((chunk = process.stdin.read()) !== null) {\n stdin += chunk.toString();\n }\n }", "consume() {}", "function PipeType() {}", "startProcessing(req, busboy) {\n req.rawBody ? busboy.end(req.rawBody) : req.pipe(busboy);\n }", "process(){\n return null;\n }", "[globalTypes.mutations.startProcessing] (state) {\n state.processing = true;\n }", "_process(promise) {\n\t this._numProcessing += 1;\n\t void promise.then(\n\t value => {\n\t this._numProcessing -= 1;\n\t return value;\n\t },\n\t reason => {\n\t this._numProcessing -= 1;\n\t return reason;\n\t },\n\t );\n\t }", "async execPipeline(operation, scope) {\n scope = await fetch(scope, operation, this.fetcher, this) // eslint-disable-line no-param-reassign\n const ops = operation.operations.slice()\n const firstOp = ops.shift()\n debug('first op', firstOp)\n let current = await this.exec(firstOp, scope)\n debug('first op result:', current)\n while (ops.length > 0) {\n debug('current:', current)\n const nextOp = ops.shift()\n debug('nextOp:', nextOp)\n current = await this.pipe(nextOp, current) // eslint-disable-line no-await-in-loop\n }\n debug('current:', current)\n return current\n }", "function process2(data){\n //do somthing with data\n}", "function PipeDecorator() { }", "function PipeDecorator() { }", "passthrough() {\n const me = this;\n // A chunk counter for debugging\n let _scan_complete = false;\n let _av_waiting = null;\n let _av_scan_time = false;\n\n // DRY method for clearing the interval and counter related to scan times\n const clear_scan_benchmark = () => {\n if (_av_waiting) clearInterval(_av_waiting);\n _av_waiting = null;\n _av_scan_time = 0;\n };\n\n // Return a Transform stream so this can act as a \"man-in-the-middle\"\n // for the streaming pipeline.\n // Ex. upload_stream.pipe(<this_transform_stream>).pipe(destination_stream)\n return new Transform({\n // This should be fired on each chunk received\n async transform(chunk, encoding, cb) {\n\n // DRY method for handling each chunk as it comes in\n const do_transform = () => {\n // Write data to our fork stream. If it fails,\n // emit a 'drain' event\n if (!this._fork_stream.write(chunk)) {\n this._fork_stream.once('drain', () => {\n cb(null, chunk);\n });\n } else {\n // Push data back out to whatever is listening (if anything)\n // and let Node know we're ready for more data\n cb(null, chunk);\n }\n };\n\n // DRY method for handling errors when the arise from the\n // ClamAV Socket connection\n const handle_error = (err, is_infected=null, result=null) => {\n this._fork_stream.unpipe();\n this._fork_stream.destroy();\n this._clamav_transform.destroy();\n clear_scan_benchmark();\n\n // Finding an infected file isn't really an error...\n if (is_infected === true) {\n if (_scan_complete === false) {\n _scan_complete = true;\n this.emit('scan-complete', result);\n }\n this.emit('stream-infected', result); // just another way to catch an infected stream\n } else {\n this.emit('error', err);\n }\n };\n\n // If we haven't initialized a socket connection to ClamAV yet,\n // now is the time...\n if (!this._clamav_socket) {\n // We're using a PassThrough stream as a middle man to fork the input\n // into two paths... (1) ClamAV and (2) The final destination.\n this._fork_stream = new PassThrough();\n // Instantiate our custom Transform stream that coddles\n // chunks into the correct format for the ClamAV socket.\n this._clamav_transform = new NodeClamTransform({}, me.settings.debug_mode);\n // Setup an array to collect the responses from ClamAV\n this._clamav_response_chunks = [];\n\n try {\n // Get a connection to the ClamAV Socket\n this._clamav_socket = await me._init_socket('passthrough');\n if (me.settings.debug_mode) console.log(`${me.debug_label}: ClamAV Socket Initialized...`);\n\n // Setup a pipeline that will pass chunks through our custom Tranform and on to ClamAV\n this._fork_stream.pipe(this._clamav_transform).pipe(this._clamav_socket);\n\n // When the CLamAV socket connection is closed (could be after 'end' or because of an error)...\n this._clamav_socket.on('close', hadError => {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: ClamAV socket has been closed! Because of Error:`, hadError);\n })\n // When the ClamAV socket connection ends (receives chunk)\n .on('end', () => {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: ClamAV socket has received the last chunk!`);\n // Process the collected chunks\n const response = Buffer.concat(this._clamav_response_chunks);\n const result = me._process_result(response.toString('utf8'), null);\n this._clamav_response_chunks = [];\n if (me.settings.debug_mode) {\n console.log(`${me.debug_label}: Result of scan:`, result);\n console.log(`${me.debug_label}: It took ${_av_scan_time} seconds to scan the file(s).`);\n clear_scan_benchmark();\n }\n\n // NOTE: \"scan-complete\" could be called by the `handle_error` method.\n // We don't want to to double-emit this message.\n if (_scan_complete === false) {\n _scan_complete = true;\n this.emit('scan-complete', result);\n }\n })\n // If connection timesout.\n .on('timeout', () => {\n this.emit('timeout', new Error('Connection to host/socket has timed out'));\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Connection to host/socket has timed out`);\n })\n // When the ClamAV socket is ready to receive packets (this will probably never fire here)\n .on('ready', () => {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: ClamAV socket ready to receive`);\n })\n // When we are officially connected to the ClamAV socket (probably will never fire here)\n .on('connect', () => {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Connected to ClamAV socket`);\n })\n // If an error is emitted from the ClamAV socket\n .on('error', err => {\n console.error(`${me.debug_label}: Error emitted from ClamAV socket: `, err);\n handle_error(err);\n })\n // If ClamAV is sending stuff to us (ie, an \"OK\", \"Virus FOUND\", or \"ERROR\")\n .on('data', cv_chunk => {\n // Push this chunk to our results collection array\n this._clamav_response_chunks.push(cv_chunk);\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Got result!`, cv_chunk.toString());\n\n // Parse what we've gotten back from ClamAV so far...\n const response = Buffer.concat(this._clamav_response_chunks);\n const result = me._process_result(response.toString(), null);\n\n // If there's an error supplied or if we detect a virus, stop stream immediately.\n if (result instanceof NodeClamError || (typeof result === 'object' && 'is_infected' in result && result.is_infected === true)) {\n // If a virus is detected...\n if (typeof result === 'object' && 'is_infected' in result && result.is_infected === true) {\n // handle_error(new NodeClamError(result, `Virus(es) found! ${'viruses' in result && Array.isArray(result.viruses) ? `Suspects: ${result.viruses.join(', ')}` : ''}`));\n handle_error(null, true, result);\n }\n // If any other kind of error is detected...\n else {\n handle_error(result);\n }\n }\n // For debugging purposes, spit out what was processed (if anything).\n else {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Processed Result: `, result, response.toString());\n }\n });\n\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Doing initial transform!`);\n // Handle the chunk\n do_transform();\n } catch (err) {\n // If there's an issue connecting to the ClamAV socket, this is where that's handled\n if (me.settings.debug_mode) console.error(`${me.debug_label}: Error initiating socket to ClamAV: `, err);\n handle_error(err);\n }\n } else {\n //if (me.settings.debug_mode) console.log(`${me.debug_label}: Doing transform: ${++counter}`);\n // Handle the chunk\n do_transform();\n }\n },\n\n // This is what is called when the input stream has dried up\n flush(cb) {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Done with the full pipeline.`);\n\n // Keep track of how long it's taking to scan a file..\n _av_waiting = null;\n _av_scan_time = 0;\n if (me.settings.debug_mode) {\n _av_waiting = setInterval(() => {\n _av_scan_time += 1;\n if (_av_scan_time % 5 === 0) console.log(`${me.debug_label}: ClamAV has been scanning for ${_av_scan_time} seconds...`);\n }, 1000);\n }\n\n // TODO: Investigate why this needs to be done in order\n // for the ClamAV socket to be closed (why NodeClamTransform's\n // `_flush` method isn't getting called)\n // If the incoming stream is empty, transform() won't have been called, so we won't\n // have a socket here.\n if (this._clamav_socket && this._clamav_socket.writable === true) {\n const size = Buffer.alloc(4);\n size.writeInt32BE(0, 0);\n this._clamav_socket.write(size, cb);\n }\n }\n });\n }", "function PipeValve(options) {\n if (!(this instanceof PipeValve))\n return new PipeValve(options);\n \n options = options || {};\n Transform.call(this, options);\n \n var valve = this;\n \n //State vars:\n valve._flowing = false;\n /*valve._remaining = false;*/\n valve._delayed = null;\n \n //Monitor vars:\n valve._passedCount = 0;\n \n //Time vars:\n valve._creationTime = new Date();\n valve._firstChunkTime = null;\n valve._lastChunkTime = null;\n \n //Limit vars:\n valve._maxThroughput = options.maxThroughput;\n valve._maxPassedCount = options.maxPassedCount;\n \n //Pre-bind 'turnOn()' function and 'this' to re-use it multiple times later without using closure or re-binding.\n valve._bindedTurnOn = turnOnThisValve.bind(valve);\n \n/**\n * TODO: setup cleaning up process.\n*/\n}", "constructor(readable) {\n super();\n this.buffers = [];\n this.finished = false;\n this.error = null;\n\n // Pipe the input of the readable stream into this\n readable.pipe(this);\n\n this.on('error', this.handleError.bind(this));\n }", "[PIPE] (job) {\n const source = job.entry\n const zip = this.zip\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n if (zip) {\n source.on('data', chunk => {\n zip.write(chunk)\n })\n } else {\n source.on('data', chunk => {\n super[WRITE](chunk)\n })\n }\n }", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i - 0] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i - 0] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i - 0] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i - 0] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "process (msg) {\n\t\tthrow 'Undefined process function';\n\t}", "process(req, res){}", "function pipe(source, ...ops) {\n return ops.reduce((res, op) => op(res), source);\n}", "static of(){\n if( arguments.length == 0 )\n return FlowFactory.getFlow([]);\n\n if( arguments.length > 1 )\n return FlowFactory.getFlow(arguments);\n\n if( arguments.length == 1 && Util.isNumber(arguments[0]) )\n return new IteratorFlow(FlowFactory.createIteratorWithEmptyArraysFromNumber(arguments[0]));\n\n return FlowFactory.getFlow(arguments[0]);\n }", "function PipeType() { }", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "process(raw_item) {\n return raw_item;\n }", "function StartStreamProcessorCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "handleInput(input) {\n\t\t\n\t}", "function fakeProcess() {\n var FakeWritableStream = function (_WriteStream) {\n (0, _inherits3.default)(FakeWritableStream, _WriteStream);\n\n function FakeWritableStream() {\n (0, _classCallCheck3.default)(this, FakeWritableStream);\n return (0, _possibleConstructorReturn3.default)(this, (FakeWritableStream.__proto__ || Object.getPrototypeOf(FakeWritableStream)).apply(this, arguments));\n }\n\n (0, _createClass3.default)(FakeWritableStream, [{\n key: 'write',\n value: function write() {\n return true;\n }\n }]);\n return FakeWritableStream;\n }(_tty.WriteStream);\n\n var fakeWritableStream = new FakeWritableStream();\n _sinon2.default.spy(fakeWritableStream, 'write');\n\n return {\n stdout: fakeWritableStream\n };\n }", "async process (entries) {\n assert(!this.destroyed)\n for (;;) {\n // TODO Here we could wrap in a try/catch and on we could revert to\n // a fallback. The the triage and processor would be rebuilt, maybe\n // we hash the source so we don't use it again, we'd have to apply\n // triage in the monitor as if it where startup, so we might be\n // filtering incorrectly, the fallback might crash because it is\n // missing messages (but it shouldn't do that because messages do go\n // missing for many reasons) but better than crashing and it will\n // even out when the child gets the new triage shorty, or...\n //\n // We just drop messages until the reverted triage is in place.\n //\n // Which keeps the program running when it would have crashed.\n //\n // But, then, if you really want to fuss, maybe the previous\n // processor depended on a message emitted at program start, so if\n // the user is not designing for processing a possibly inconsistent\n // stream of messages, we're not going to be able to fix that for\n // them here.\n //\n // Stretch goal, though.\n //\n // Could we get more performance if processors handled messages in a\n // chunked fashion, send an entire array of entries?\n //\n // We could set it up so that we flag our version somewhere earlier\n // and this method is called only with sync message processing.\n //\n // TODO Okay, we're already batching things into arrays, so we can\n // have a special function in the shuttle that forces a batch of any\n // existing messages, then creates a single entry array with the\n // control message. Those messages can be detected at\n // deserialization and a sync process function can be called, we\n // have an ansyc control function for version bumps, now processors\n // handle entries in batches, which means that they don't have to\n // worry about chunking posts to 3rd parties, they're already kind\n // of chunked.\n while (entries.length && !Array.isArray(entries[0])) {\n this._processor.process(entries.shift())\n }\n if (entries.length == 0) {\n break\n } else {\n const control = entries.shift()[0]\n switch (control.method) {\n case 'version':\n const configuration = this._versions.shift()\n assert(this._nextVersion == configuration.version)\n this._nextVersion++\n const process = configuration.process\n await this._processor.previous.call(null, null)\n this._processor = {\n previous: configuration.previous,\n process: entry => {\n process(Object.assign({\n when: entry.when,\n level: entry.level,\n qualified: entry.qualifier + '#' + entry.label,\n qualifier: entry.qualifier,\n label: entry.label\n }, entry.system, entry.body))\n }\n }\n this._setMonitorSink(process)\n break\n case 'exit':\n await this._processor.previous.call(null, null)\n for (const version of this._versions) {\n await version.process.call(null, null)\n }\n this._destructible.destroy()\n await this._destructible.promise\n break\n }\n }\n }\n }", "handleInput() {}", "loop(count) {\n // save basePipe reference to avoid returned pipe calling itself\n const basePipe = this.pipe;\n return {\n pipe(...parsers) {\n const entries = [];\n // Call basePipe `count` times\n for (let i = 0; i < count; i += 1) {\n entries.push(basePipe(...parsers));\n }\n return entries;\n },\n };\n }", "handleInput() {\n // hello from the other side\n }", "async run() { \n\t//loop read from the input channel \n\twhile(true ) {\n\n\t this.feedback(\"continue\")\n\n\t let text = await this.get_input() \n\t if (text == undefined || text == \"finished\") { break }\n\t this.chunks.push(text) \n\t}\n\t//input channel has been closed \n\tthis.finish({payload : { result : this.chunks.join(this.args.joiner || \"\\n\")} }) \n }", "pushFromBuffer() {\n let stream = this.stream;\n let chunk = this.buffer.shift();\n // Stream the data\n try {\n this.shouldRead = stream.push(chunk.data);\n }\n catch (err) {\n this.emit(\"error\", err);\n }\n if (this.options.emit) {\n // Also emit specific events, based on the type of chunk\n chunk.file && this.emit(\"file\", chunk.data);\n chunk.symlink && this.emit(\"symlink\", chunk.data);\n chunk.directory && this.emit(\"directory\", chunk.data);\n }\n }", "[PIPE] (job) {\n const source = job.entry\n const zip = this.zip\n\n if (job.readdir)\n job.readdir.forEach(entry => {\n const p = this.prefix ?\n job.path.slice(this.prefix.length + 1) || './'\n : job.path\n\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n\n if (zip)\n source.on('data', chunk => {\n zip.write(chunk)\n })\n else\n source.on('data', chunk => {\n super[WRITE](chunk)\n })\n }", "[PIPE] (job) {\n const source = job.entry\n const zip = this.zip\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = this.prefix ?\n job.path.slice(this.prefix.length + 1) || './'\n : job.path\n\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n if (zip) {\n source.on('data', chunk => {\n zip.write(chunk)\n })\n } else {\n source.on('data', chunk => {\n super[WRITE](chunk)\n })\n }\n }", "_handleSubPipe (item, key) {\n this._handleParentNode(item)\n this.handleSubObserversQueue(item, key)\n this.handleSubDispatchersQueue(item, key)\n this.handleSubReceiversQueue(item, key)\n this.handleSubMiddlewareQueue(item, key)\n }", "handle() {}", "function $SYhk$var$pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n $SYhk$var$debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && $SYhk$var$EElistenerCount(src, 'data')) {\n state.flowing = true;\n $SYhk$var$flow(src);\n }\n };\n}", "function chunk(pipe) {\n return run\n\n // Run the bound bound pipe and handles any errors.\n function run(context, file, fileSet, next) {\n pipe.run(context, file, fileSet, one);\n\n function one(error) {\n var messages = file.messages;\n var index;\n\n if (error) {\n index = messages.indexOf(error);\n\n if (index === -1) {\n error = file.message(error);\n index = messages.length - 1;\n }\n\n messages[index].fatal = true;\n }\n\n next();\n }\n }\n}", "processBuffer () {\n this.ready = true\n this._triggerBuffer()\n this.queue.waterfall(() => this.buffer.guardian)\n }" ]
[ "0.6748917", "0.6748917", "0.6656468", "0.60588413", "0.602799", "0.59697235", "0.58565086", "0.57908386", "0.5767287", "0.5764625", "0.57430077", "0.57076347", "0.56861466", "0.5676333", "0.56135297", "0.56135297", "0.56107163", "0.559984", "0.5544666", "0.5532164", "0.5525504", "0.5525504", "0.5525504", "0.5514166", "0.54830956", "0.5481006", "0.54507184", "0.5444774", "0.54288626", "0.54224235", "0.54224235", "0.54173374", "0.54042876", "0.539461", "0.5392642", "0.53837746", "0.53774774", "0.5373518", "0.5368721", "0.53664374", "0.5361393", "0.53599334", "0.53386194", "0.5334764", "0.53297853", "0.53129613", "0.53095704", "0.5308176", "0.5301851", "0.52986056", "0.52601016", "0.52601016", "0.52601016", "0.52601016", "0.5258333", "0.5252832", "0.52517474", "0.5248847", "0.5245544", "0.5240905", "0.523371", "0.522682", "0.5216181", "0.5199237", "0.5194788", "0.5176566", "0.5176566", "0.51661384", "0.5160878", "0.5156997", "0.5119561", "0.51072866", "0.51072866", "0.51072866", "0.51072866", "0.5106632", "0.51057976", "0.5070889", "0.5070539", "0.5067216", "0.50556403", "0.50556403", "0.50556403", "0.5054871", "0.5054707", "0.50529724", "0.50484717", "0.5042163", "0.5033988", "0.50288105", "0.5025322", "0.5024994", "0.5024196", "0.50233585", "0.50141984", "0.5012813", "0.50115865", "0.5005442", "0.50012314", "0.50010324" ]
0.5405385
32
This methods merges another data input on the current stream. It is only available to IteratorFlow We can not merge Streamers with other data types
merge(data){ var isStream = this.isStream(); var iterator = FlowFactory.getIterator(data); //ensure that we cannot mix streams and static data structures if( (!isStream && iterator.streamer) || (isStream && !iterator.streamer) ) throw new Error("Streamer cannot be merged with other data types"); this.iterators.push(iterator); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function merge$() {\n\tfor (var _len = arguments.length, streams = Array(_len), _key = 0; _key < _len; _key++) {\n\t\tstreams[_key] = arguments[_key];\n\t}\n\n\tvar values = streams.map(function (parent$) {\n\t\treturn parent$.value;\n\t});\n\tvar newStream = stream(values);\n\tstreams.forEach(function triggerMergedStreamUpdate(parent$, index) {\n\t\tparent$.listeners.push(function updateMergedStream(value) {\n\t\t\tnewStream(streams.map(function (parent$) {\n\t\t\t\treturn parent$.value;\n\t\t\t}));\n\t\t});\n\t});\n\treturn newStream;\n}", "function mergeData(currentData) {\n for (var _len = arguments.length, inputs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n inputs[_key - 1] = arguments[_key];\n }\n\n if ('merge' in currentData) {\n return currentData.merge(inputs);\n }\n return _assign2.default.apply(undefined, [{}, currentData].concat(inputs));\n}", "merge(params) {\n let streams = utils.flatten(this, [].slice.call(arguments));\n\n return new MergeSequence(null, streams.reverse(), params);\n }", "function stream$merge(that) {\n return Stream(observer => {\n let completeThis = false\n let completeThat = false;\n const completeBoth = () => completeThis && completeThat && observer.complete()\n const unsuscribeThis = this.subscribe({\n next: x => observer.next(x),\n complete: ()=> {\n completeThis = true\n completeBoth()\n },\n error: observer.error,\n })\n const unsubscribeThat = that.subscribe({\n next: x => observer.next(x),\n complete: ()=> {\n completeThat = true\n completeBoth()\n },\n error: observer.error\n })\n return ()=> {\n unsubscribeThat()\n unsuscribeThis()\n }\n })\n}", "function merge$(potentialStreamsArr) {\n var values = potentialStreamsArr.map(function (parent$) {\n return parent$ && parent$.IS_STREAM ? parent$.value : parent$;\n });\n var newStream = stream(values.indexOf(undefined) === -1 ? values : undefined);\n potentialStreamsArr.forEach(function (potentialStream, index) {\n if (potentialStream.IS_STREAM) {\n potentialStream.listeners.push(function updateMergedStream(value) {\n values[index] = value;\n newStream(values.indexOf(undefined) === -1 ? values : undefined);\n });\n }\n });\n return newStream;\n}", "function merge$(potentialStreamsArr) {\n var values = potentialStreamsArr.map(function (parent$) {\n return parent$ && parent$.IS_STREAM ? parent$.value : parent$;\n });\n var newStream = stream(values.indexOf(undefined) === -1 ? values : undefined);\n\n potentialStreamsArr.forEach(function (potentialStream, index) {\n if (potentialStream.IS_STREAM) {\n potentialStream.listeners.push(function updateMergedStream(value) {\n values[index] = value;\n newStream(values.indexOf(undefined) === -1 ? values : undefined);\n });\n }\n });\n return newStream;\n}", "function testMergeDataStreams(stream1, stream2) {\n var expected = stream1.map(function(item) {\n return _.assign(\n _.clone(item), stream2.find(function(item2) {return item.id === item2.id;}));\n });\n\n var actual = mergeDataStreams(stream1, stream2);\n\n var passing = actual && expected.map(function(item) {\n return _.isEqual(\n item,\n actual.find(function(_item) {return _item.id === item.id; })\n );\n }).every(function(result) {return result;} );\n\n if (passing) {\n console.log('SUCCESS! mergeDataStreams works');\n }\n\n else {\n console.log('FAILURE! mergeDataStreams not working');\n }\n}", "function merge(streams) {\r\n var mergedStream = merge2(streams);\r\n streams.forEach(function (stream) {\r\n stream.on('error', function (err) { return mergedStream.emit('error', err); });\r\n });\r\n return mergedStream;\r\n}", "merge(other) {\n return null;\n }", "merge() {\r\n }", "function mergeData() {\n const mergeTarget = {};\n let i = arguments.length;\n let prop;\n let event; // Allow for variadic argument length.\n\n while (i--) {\n // Iterate through the data properties and execute merge strategies\n // Object.keys eliminates need for hasOwnProperty call\n for (prop of Object.keys(arguments[i])) {\n switch (prop) {\n // Array merge strategy (array concatenation)\n case 'class':\n case 'style':\n case 'directives':\n if (!Array.isArray(mergeTarget[prop])) {\n mergeTarget[prop] = [];\n } // Repackaging in an array allows Vue runtime\n // to merge class/style bindings regardless of type.\n\n\n mergeTarget[prop] = mergeTarget[prop].concat(arguments[i][prop]);\n break;\n // Space delimited string concatenation strategy\n\n case 'staticClass':\n if (!arguments[i][prop]) {\n break;\n }\n\n if (mergeTarget[prop] === undefined) {\n mergeTarget[prop] = '';\n }\n\n if (mergeTarget[prop]) {\n // Not an empty string, so concatenate\n mergeTarget[prop] += ' ';\n }\n\n mergeTarget[prop] += arguments[i][prop].trim();\n break;\n // Object, the properties of which to merge via array merge strategy (array concatenation).\n // Callback merge strategy merges callbacks to the beginning of the array,\n // so that the last defined callback will be invoked first.\n // This is done since to mimic how Object.assign merging\n // uses the last given value to assign.\n\n case 'on':\n case 'nativeOn':\n if (!mergeTarget[prop]) {\n mergeTarget[prop] = {};\n }\n\n const listeners = mergeTarget[prop];\n\n for (event of Object.keys(arguments[i][prop] || {})) {\n // Concat function to array of functions if callback present.\n if (listeners[event]) {\n // Insert current iteration data in beginning of merged array.\n listeners[event] = Array().concat( // eslint-disable-line\n listeners[event], arguments[i][prop][event]);\n } else {\n // Straight assign.\n listeners[event] = arguments[i][prop][event];\n }\n }\n\n break;\n // Object merge strategy\n\n case 'attrs':\n case 'props':\n case 'domProps':\n case 'scopedSlots':\n case 'staticStyle':\n case 'hook':\n case 'transition':\n if (!mergeTarget[prop]) {\n mergeTarget[prop] = {};\n }\n\n mergeTarget[prop] = { ...arguments[i][prop],\n ...mergeTarget[prop]\n };\n break;\n // Reassignment strategy (no merge)\n\n case 'slot':\n case 'key':\n case 'ref':\n case 'tag':\n case 'show':\n case 'keepAlive':\n default:\n if (!mergeTarget[prop]) {\n mergeTarget[prop] = arguments[i][prop];\n }\n\n }\n }\n }\n\n return mergeTarget;\n}", "merge(existing, incoming) {\n const edges = [\n ...(existing ? existing.edges : []),\n ...incoming.edges\n ];\n\n return {...incoming, ...{edges}};\n }", "function mergeData(to, from) {\r\n if (!from)\r\n return to;\r\n var key;\r\n var toVal;\r\n var fromVal;\r\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\r\n for (var i = 0; i < keys.length; i++) {\r\n key = keys[i];\r\n // in case the object is already observed...\r\n if (key === '__ob__')\r\n continue;\r\n toVal = to[key];\r\n fromVal = from[key];\r\n if (!hasOwn(to, key)) {\r\n to[key] = fromVal;\r\n }\r\n else if (toVal !== fromVal &&\r\n (isPlainObject(toVal) && !isWrapper(toVal)) &&\r\n (isPlainObject(fromVal) && !isWrapper(toVal))) {\r\n mergeData(toVal, fromVal);\r\n }\r\n }\r\n return to;\r\n }", "merge(existing, incoming, { args: { offset = 0 } }) {\n // Slicing is necessary because the existing data is\n // immutable, and frozen in development.\n const merged = existing ? existing.slice(0) : [];\n for (let i = 0; i < incoming.length; ++i) {\n merged[offset + i] = incoming[i];\n }\n return merged;\n }", "merge(data) {\n this.data = { text: this.data.text + data.text }\n }", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n\n var key, toVal, fromVal;\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i]; // in case the object is already observed...\n\n if (key === '__ob__') {\n continue;\n }\n\n toVal = to[key];\n fromVal = from[key];\n\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n\n return to;\n }", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n \n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n \n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "function mergeData(to, from) {\n if (!from) return to;\n var key, toVal, fromVal;\n\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === \"__ob__\") continue;\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "function mergeData (to, from) {\n\t\t var key, toVal, fromVal\n\t\t for (key in from) {\n\t\t toVal = to[key]\n\t\t fromVal = from[key]\n\t\t if (!to.hasOwnProperty(key)) {\n\t\t _.set(to, key, fromVal)\n\t\t } else if (_.isObject(toVal) && _.isObject(fromVal)) {\n\t\t mergeData(toVal, fromVal)\n\t\t }\n\t\t }\n\t\t return to\n\t\t}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n\n var key, toVal, fromVal;\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i]; // in case the object is already observed...\n\n if (key === '__ob__') {\n continue;\n }\n\n toVal = to[key];\n fromVal = from[key];\n\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n\n var key, toVal, fromVal;\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i]; // in case the object is already observed...\n\n if (key === '__ob__') {\n continue;\n }\n\n toVal = to[key];\n fromVal = from[key];\n\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n\n var key, toVal, fromVal;\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i]; // in case the object is already observed...\n\n if (key === '__ob__') {\n continue;\n }\n\n toVal = to[key];\n fromVal = from[key];\n\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n\n return to;\n}", "function mergeData(to, from) {\n if (!from) {\n return to;\n }\n\n var key, toVal, fromVal;\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i]; // in case the object is already observed...\n\n if (key === '__ob__') {\n continue;\n }\n\n toVal = to[key];\n fromVal = from[key];\n\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n\n return to;\n}", "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "function mergeData(to, from) {\n if (!from) {\n return to\n }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') {\n continue\n }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n }", "function mergeData(to, from) {\n if (!from) return to;\n var key, toVal, fromVal;\n var keys = hasSymbol ? Reflect.ownKeys(from) : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i]; // in case the object is already observed...\n\n if (key === '__ob__') continue;\n toVal = to[key];\n fromVal = from[key];\n\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (toVal !== fromVal && isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n\n return to;\n}", "function mergeData (to, from) {\n\t var key, toVal, fromVal\n\t for (key in from) {\n\t toVal = to[key]\n\t fromVal = from[key]\n\t if (!hasOwn(to, key)) {\n\t set(to, key, fromVal)\n\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t mergeData(toVal, fromVal)\n\t }\n\t }\n\t return to\n\t}", "function StreamCombiner(stream) {\n\n // Wrapped stream.\n this.target = stream;\n\n // Input streams to combine.\n this.sources = [];\n\n // Index of currently streaming stream.\n this.index = -1;\n\n // If true then close once there are no streams.\n this.closeOnEnd = false;\n\n this.streaming = false;\n\n // If true stream on this.index ended and was closed.\n this.currentClosed = false;\n\n const _this = this;\n\n // Append given stream to the wrapped stream.\n this.append = function (stream) {\n _this.sources.push(stream);\n if (!_this.streaming) {\n pipeNext();\n }\n };\n\n this.end = function () {\n // Close after the last stream is processed.\n _this.closeOnEnd = true;\n if (!_this.streaming) {\n pipeNext();\n }\n };\n\n // Look for next stream and pipe it.\n function pipeNext() {\n _this.streaming = true;\n closeCurrent();\n if (_this.index + 1 < _this.sources.length) {\n // Send new stream.\n _this.index += 1;\n const stream = _this.sources[_this.index];\n stream.on(\"end\", pipeNext);\n stream.pipe(_this.target, {\"end\": false});\n _this.currentClosed = false;\n } else {\n // Nothing more to stream.\n if (_this.closeOnEnd) {\n _this.target.end();\n } else {\n }\n // Wait for next stream.\n _this.streaming = false;\n }\n }\n\n function closeCurrent() {\n if (_this.index > -1 && !_this.currentClosed) {\n // Close stream under this.index.\n const oldStream = _this.sources[_this.index];\n oldStream.unpipe(_this.target);\n _this.currentClosed = true;\n }\n }\n\n}", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "function mergeData(to, from) {\n var key, toVal, fromVal;\n for (key in from) {\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isObject(toVal) && isObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to;\n }", "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "function mergeData(to,from){if(!from){return to;}var key,toVal,fromVal;var keys=Object.keys(from);for(var i=0;i<keys.length;i++){key=keys[i];toVal=to[key];fromVal=from[key];if(!hasOwn(to,key)){set$1(to,key,fromVal);}else if(isPlainObject(toVal)&&isPlainObject(fromVal)){mergeData(toVal,fromVal);}}return to;}", "function mergeData(to, from) {\n\t\t var key = void 0,\n\t\t toVal = void 0,\n\t\t fromVal = void 0;\n\t\t for (key in from) {\n\t\t toVal = to[key];\n\t\t fromVal = from[key];\n\t\t if (!hasOwn(to, key)) {\n\t\t set(to, key, fromVal);\n\t\t } else if (isObject(toVal) && isObject(fromVal)) {\n\t\t mergeData(toVal, fromVal);\n\t\t }\n\t\t }\n\t\t return to;\n\t\t}", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\n if( !this.isDiscretized ) {\n while(true) {\n if (!this.isListening || this.pos >= this.iterators.length)\n break;\n //get the data from the current iterator\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done)\n break;\n\n this.push(obj.value);\n }\n }\n else{//for discretized flows\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n do{\n obj = this.iterators[this.pos].next();\n while( !obj.done ){\n this.streamElements.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( this.streamElements.length > 0 ){\n while(true) {\n this.streamElements.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n break;\n }\n }\n }\n\n this.pos++;\n }while( this.pos < this.iterators.length );\n }\n else{\n var ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n var justEnded = false;\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n ended.push(false);\n }\n\n do{\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n justEnded = true;\n this.push(this.streamElements.slice());\n this.streamElements = [];\n\n //check if all items have ended\n if( Flow.from(ended).allMatch((input) => input) )\n break;\n }\n else\n justEnded = false;\n }while(true);\n }\n }\n\n this.isListening = false; //we done processing so stop listening\n this.pos = 0; //reset the pos for other operations\n }", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}", "function mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n\n var keys = hasSymbol\n ? Reflect.ownKeys(from)\n : Object.keys(from);\n\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n // in case the object is already observed...\n if (key === '__ob__') { continue }\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (\n toVal !== fromVal &&\n isPlainObject(toVal) &&\n isPlainObject(fromVal)\n ) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}" ]
[ "0.6134648", "0.6035722", "0.58465743", "0.5826035", "0.5820796", "0.5814241", "0.56638765", "0.56244284", "0.5609664", "0.55938804", "0.5549562", "0.5514483", "0.5475858", "0.5460846", "0.5442579", "0.5441733", "0.54165757", "0.5394357", "0.5347644", "0.53381926", "0.53381926", "0.53381926", "0.53381926", "0.53297454", "0.53297454", "0.5320037", "0.5320037", "0.5320037", "0.5316501", "0.53025645", "0.53016233", "0.5290294", "0.5289078", "0.5289078", "0.5289078", "0.52861285", "0.5282475", "0.52751905", "0.52670616", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167", "0.5234167" ]
0.7981541
0
This method is used by OutFlow to trigger the start of a push flow for finite data and for JS generators
_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too... var obj; if( !this.isDiscretized ) { while(true) { if (!this.isListening || this.pos >= this.iterators.length) break; //get the data from the current iterator obj = this.iterators[this.pos].next(); //check for the next iterator that has data while (obj.done && this.pos < this.iterators.length) { this.pos++; if (this.pos >= this.iterators.length) break; obj = this.iterators[this.pos].next(); } if (obj.done) break; this.push(obj.value); } } else{//for discretized flows //ensure that our discrete stream length is not more than the number of iterators we have this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length); if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next do{ obj = this.iterators[this.pos].next(); while( !obj.done ){ this.streamElements.push(obj.value); if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){ this.push(this.streamElements.slice()); this.streamElements = []; } obj = this.iterators[this.pos].next(); } //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to //discretize with one iterator if( this.streamElements.length > 0 ){ while(true) { this.streamElements.push(null); if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){ this.push(this.streamElements.slice()); this.streamElements = []; break; } } } this.pos++; }while( this.pos < this.iterators.length ); } else{ var ended = []; //we need this since the iterators reset...we need to know the ones that have ended //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to //waste one round of iteration to discover that they have all ended which will create null data. var justEnded = false; for(let i = 0; i < this.discreteStreamLength; i++){ ended.push(false); } do{ var pack = []; for(let i = 0; i < this.discreteStreamLength; i++){ if( ended[i] ) pack[i] = null; else { obj = this.iterators[i].next(); if( obj.done ) { ended[i] = true; pack[i] = null; } else pack[i] = obj.value; } } //check if we just ended on the last iteration and this current sets of data are just nulls if( justEnded && Flow.from(pack).allMatch((input) => input == null) ) break; this.streamElements.push(pack); if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){ justEnded = true; this.push(this.streamElements.slice()); this.streamElements = []; //check if all items have ended if( Flow.from(ended).allMatch((input) => input) ) break; } else justEnded = false; }while(true); } } this.isListening = false; //we done processing so stop listening this.pos = 0; //reset the pos for other operations }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "begin() {\n //for (let [, arr] of this.arrangements.filter(a => a.at === this.iterations && a.when === \"start\")) arr.exe();\n this.engine.phases.current = this;\n this.engine.events.emit(this.name, this);\n }", "_definitelyPush() {\n\t\t// create copy of collected chunks to be pushed as single output chunk\n\t\tconst chunks = this.chunks.slice();\n\n\t\tthis.push( {\n\t\t\tfinished: this.finished,\n\t\t\tchunks\n\t\t} );\n\n\t\t// reset internal list of collected chunks\n\t\tthis.chunks.splice( 0, chunks.length );\n\t}", "onStreamStart() {\n if (this.onStartTrigger.length > 0) {\n this.onStartTrigger.forEach(trigger => {\n controller.handleData(trigger);\n })\n }\n }", "step() { }", "enqueue(value) {\r\n this.inStack.push(value);\r\n }", "signal(executionId, inputData) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log('Action:signal ' + executionId + ' startedAt ');\n let token = null;\n this.appDelegate.executionStarted(this.executionContext);\n this.doExecutionEvent(__1.EXECUTION_EVENT.execution_invoke);\n this.tokens.forEach(t => {\n if (t.currentItem && t.currentItem.id == executionId)\n token = t;\n });\n if (!token) {\n this.tokens.forEach(t => {\n if (t.currentNode && t.currentNode.id == executionId)\n token = t;\n });\n }\n if (token) {\n this.log('..launching a token signal');\n let result = yield token.signal(inputData);\n this.log('..signal token is done');\n }\n else { // check for startEvent of a secondary process\n let node = null;\n const startedNodeId = this.tokens.get(0).path[0].elementId;\n this.definition.processes.forEach(proc => {\n let startNodeId = proc.getStartNode().id;\n if (startNodeId !== startedNodeId) {\n this.log(`checking for valid other start node: ${startNodeId} is possible`);\n if (startNodeId == executionId) {\n // ok we will start new token for this\n node = this.getNodeById(executionId);\n this.log('..starting at :' + executionId);\n }\n }\n });\n if (node) {\n let token = yield Token_1.Token.startNewToken(Token_1.TOKEN_TYPE.Primary, this, node, null, null, null, inputData);\n }\n else {\n this.getItems().forEach(i => {\n this.logger.log(`Item: ${i.id} - ${i.elementId} - ${i.status} - ${i.timeDue}`);\n });\n this.logger.error(\"*** ERROR *** task id not valid\");\n }\n }\n this.log('.signal returning .. waiting for promises status:' + this.status + \" id: \" + executionId);\n yield Promise.all(this.promises);\n this.doExecutionEvent(__1.EXECUTION_EVENT.execution_invoked);\n this.log('.signal returned process status:' + this.status + \" id: \" + executionId);\n this.report();\n });\n }", "step() {\n }", "function genStart() {\n if (!generate) {\n setGenerate(true)\n } else {\n setGenerate(false)\n }\n }", "request(howManyArg) {\n if (howManyArg === 0) {\n return;\n }\n else {\n for (let i = 0; i !== howManyArg; i++) {\n if (this.payloadBuffer.length > 0) {\n this.internalPush(this.payloadBuffer.shift());\n }\n else {\n const nextPayload = this.generator();\n this.internalPush(nextPayload);\n }\n }\n }\n }", "emitPush(data) {\n switch (typeof data) {\n case \"boolean\":\n return this.emit(data ? OpCode.PUSHT : OpCode.PUSHF);\n case \"string\":\n return this._emitString(data);\n case \"number\":\n return this._emitNum(data);\n case \"undefined\":\n return this.emitPush(false);\n case \"object\":\n if (Array.isArray(data)) {\n return this._emitArray(data);\n }\n else if (likeContractParam(data)) {\n return this._emitParam(new ContractParam(data));\n }\n else if (data === null) {\n return this.emitPush(false);\n }\n throw new Error(`Unidentified object: ${data}`);\n default:\n throw new Error();\n }\n }", "async start() {\n const { config, emitter, states } = this;\n\n let curr;\n\n if(config.initial) {\n curr = config.initial;\n } else {\n curr = Object.keys(config.states)[0];\n }\n\n const details = {\n curr : states.get(curr),\n };\n\n await emitter.emit(`enter`, details);\n await emitter.emitSerial(`enter:${curr}`, details);\n\n this.state = curr;\n }", "function startPipeline() {\n // In this way we read one block while we decode and play another.\n if (state.state == STATE.PLAYING) {\n processState();\n }\n processState();\n }", "function start(){\n if( !PFlow.isReady() ) {\n setTimeout(start, 500);\n }\n else{\n PFlow.from([1,2,3,4,5]).count(value => console.log(\"Count is: \" + value))\n }\n}", "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "function push(){if(pushes>PUSHCOUNT)return;if(pushes++===PUSHCOUNT){console.error(\" push(EOF)\");return r.push(null)}console.error(\" push #%d\",pushes);r.push(new Buffer(PUSHSIZE))&&setTimeout(push)}", "function backendLiveValueStart( aTriggerObject ) {\n console.log(\"backendLiveValueStart:\"); \n console.log(aTriggerObject);\n\n liveValue.source = new Object();\n liveValue.source.type = aTriggerObject.source.type;\n liveValue.startTime = new Date();\n\n backendLiveValueStop();\n backendLiveValue();\n }", "async start() {\n\t\tawait this.#preprocessor.execQueue();\n\t\tawait this.#pageGen.generatePages();\n\n\t\tthis.#emitter.emit('end');\n\t}", "function start (payload) {\n for (var id in this.callbacks) {\n this.isPending[id] = false\n this.isHandled[id] = false\n }\n this.isDispatching = true\n this.pendingPayload = payload\n}", "function startFlow() {\n\tyCo = 8;\n \n\tfor (xCo = 0; xCo < 6; xCo++) {\n\t\tif (map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY(yCo * 64), 'Tile Layer 1') != null && map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY(yCo * 64), 'Tile Layer 1').index == 10) {\n\t\t\tmap.getTile(layer1.getTileX(xCo * 64), layer1.getTileY((yCo - 1) * 64), 'Tile Layer 1').properties.inFlow = \"down\";\n\t\t\tcurPipe = map.getTile(layer1.getTileX(xCo * 64), layer1.getTileY((yCo - 1) * 64), 'Tile Layer 1');\n\t\t\tanimateFlow(curPipe);\n\t\t\tcheckIfFlowable(curPipe);\n\t\t\ttimerBar.destroy();\n\t\t\tflowTimer = game.time.events.loop(Phaser.Timer.SECOND * flowSpeed, runFlow, this);\n\t\t}\n\t}\n flowStarted = true;\n}", "preIngestData() {}", "function push() {\n // \"done\" is a Boolean and value a \"Uint8Array\"\n reader.read().then(({ done, value }) => {\n // Is there no more data to read?\n if (done) {\n // Tell the browser that we have finished sending data\n controller.close();\n return;\n }\n \n // Get the data and send it to the browser via the controller\n controller.enqueue(value);\n push();\n });\n }", "__nextStep() {\n this.openNextStep();\n }", "async build() {\n // on ready\n await new Promise(resolve => this.eden.once('eden.ready', resolve));\n\n // flow setup\n await this.eden.hook('flow.build', FlowHelper);\n }", "updateFlow() {\n this.flow += 1;\n }", "onHookStart(payload) {\n // There is always a scenario, take the last one\n const currentSteps = this.getCurrentScenario().steps;\n payload.state = _constants.PENDING;\n payload.keyword = _utils.default.containsSteps(currentSteps) ? _constants.AFTER : _constants.BEFORE;\n return this.addStepData(payload);\n }", "produce() {}", "function bubbleStart(){\n bubbleLimit = numNodes; \n bubbleIndex = 0;\n bubbleStarted = true;\n bubbleIsSorted = true;\n addStep(\"Set node 1 as current and node 2 as \\\"next\\\"\");\n}", "function newGeneration(){\n firstTime = 1;\n newGen === true ? step() : null\n}", "function start(state) { \n service.goNext(state);\n }", "routine(generator) {\n\t\tthis._stack.add(generator())\n\t}", "get start() {}", "function SRP1(state) {\n state.rp1 = state.stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'SRP1[]', state.rp1);\n }\n }", "start () {\n this.stateLoop();\n }", "makeStart() {\n this.type = Node.START;\n this.state = null;\n }", "[globalTypes.mutations.startProcessing] (state) {\n state.processing = true;\n }", "tryPush() {\n\t\t// Get the total length of what would be pushed.\n\t\tconst amountToPush = Math.min(this.buffer.length, this.requestedSize);\n\n\t\t// Check if it's possible to push right now.\n\t\tif (this.canPush &&\n\t\t\tamountToPush > 0 &&\n\t\t\t(this.initialPass || this.finished || this.buffer.length >= this.initial)) {\n\t\t\tthis.initialPass = true;\n\n\t\t\t// Push the data.\n\t\t\tthis.requestedSize = -1;\n\t\t\tthis.canPush = this.push(Buffer.from(this.buffer.shift(amountToPush)));\n\t\t}\n\n\t\t// Append part of the waiting chunk if possible.\n\t\tif (this.waiting) {\n\t\t\tconst chunk = this.waiting.chunk;\n\t\t\tconst callback = this.waiting.callback;\n\n\t\t\t// Append the data to the buffer.\n\t\t\tconst toPush = Math.min(this.buffer.remaining, chunk.length);\n\t\t\tthis.buffer.push(chunk.slice(0, toPush));\n\n\t\t\t// Adjust the waiting chunk.\n\t\t\tthis.waiting.chunk = chunk.slice(toPush);\n\n\t\t\t// If the waiting chunk is gone, callback and reset.\n\t\t\tif (this.waiting.chunk.length == 0) {\n\t\t\t\tthis.waiting = null;\n\t\t\t\tcallback();\n\t\t\t}\n\n\t\t\t// Try pushing.\n\t\t\tif (toPush > 0) this.tryPush();\n\t\t}\n\t}", "start() {\n const { creator, conf } = this;\n const upStreaming = conf.getVal('upStreaming');\n\n if (upStreaming) {\n this.liveOutput();\n } else if (ScenesUtil.isSingle(creator)) {\n this.mvOutput();\n } else {\n if (ScenesUtil.hasTransition(creator)) {\n ScenesUtil.fillTransition(creator);\n this.addXfadeInput();\n } else {\n this.addConcatInput();\n }\n\n this.addAudio();\n this.addOutputOptions();\n this.addCommandEvents();\n this.addOutput();\n this.command.run();\n }\n }", "function begin() {\n src = [];\n }", "function SRP0(state) {\n state.rp0 = state.stack.pop();\n\n if (exports.DEBUG) {\n console.log(state.step, 'SRP0[]', state.rp0);\n }\n }", "handleInboundMessage(syncData) {\n\n let syncEvents = this.networkTransmitter.deserializePayload(syncData).events;\n let syncHeader = syncEvents.find((e) => e.eventName === 'syncHeader');\n\n // emit that a snapshot has been received\n if (!this.gameEngine.highestServerStep || syncHeader.stepCount > this.gameEngine.highestServerStep)\n this.gameEngine.highestServerStep = syncHeader.stepCount;\n this.gameEngine.emit('client__syncReceived', {\n syncEvents: syncEvents,\n stepCount: syncHeader.stepCount,\n fullUpdate: syncHeader.fullUpdate\n });\n\n this.gameEngine.trace.info(() => `========== inbound world update ${syncHeader.stepCount} ==========`);\n\n // finally update the stepCount\n if (syncHeader.stepCount > this.gameEngine.world.stepCount + this.synchronizer.syncStrategy.STEP_DRIFT_THRESHOLDS.clientReset) {\n this.gameEngine.trace.info(() => `========== world step count updated from ${this.gameEngine.world.stepCount} to ${syncHeader.stepCount} ==========`);\n this.gameEngine.emit('client__stepReset', { oldStep: this.gameEngine.world.stepCount, newStep: syncHeader.stepCount });\n this.gameEngine.world.stepCount = syncHeader.stepCount;\n }\n }", "handleNext(event) {\n const nextNavigationEvent = new FlowNavigationNextEvent();\n this.dispatchEvent(nextNavigationEvent);\n }", "inp(register) {\n\t\tthis.steps.push({ ...this.registers });\n\t\tthis.registers[register] = this.input.shift();\n\t}", "function intGoNext(){\n goNext(0);\n }", "function startFlowAuto() {\n let flow =\n ((window.location.search || '').split('?')[1] || '').split('&')[0] ||\n 'demo';\n\n // Check for valid Google Article Access (GAA) params.\n if (isGaa()) {\n console.log(\n 'Google Article Access (GAA) params triggered the \"metering\" flow.'\n );\n flow = 'metering';\n }\n\n if (flow == 'none') {\n return;\n }\n if (flow == 'demo') {\n startDemoController();\n return;\n }\n\n if (flow == 'demoConsentRequired') {\n startDemoController({consentRequired: true});\n return;\n }\n if (flow == 'demoUnknownSubscription') {\n startDemoController({unknownSubscription: true});\n return;\n }\n if (flow === 'swgButton') {\n whenReady(setupSwgButton);\n }\n if (flow === 'smartbutton') {\n whenReady(setupSmartButton);\n return;\n }\n if (flow === 'updateSubscription') {\n whenReady(setupUpdateSubscription);\n return;\n }\n\n if (flow == 'metering') {\n whenReady(setupMeteringDemo);\n return;\n }\n\n if (flow == 'demoAudienceActions') {\n whenReady(setupAudienceActionsDemo);\n return;\n }\n\n startFlow(flow);\n}", "function Push() {\n console.debug(\"Push()\");\n}", "constructor (emitStep, finishStep, emit)\n {\n this.emitStep = emitStep;\n this.finishStep = finishStep;\n this.emit = emit;\n this.requestId = -1;\n }", "_flush() {\n\t\tthis.finished = true;\n\t\tthis._definitelyPush();\n\t}", "runOneStepForwards() {\n this.stateHistory.nextState();\n }", "function push() {\n\t\t\t// \"done\" is a Boolean and value a \"Uint8Array\"\n\t\t\treturn reader.read().then(({ done, value }) => {\n\t\t\t\t// Is there no more data to read?\n\t\t\t\tif (done) {\n\t\t\t\t\t// Tell the browser that we have finished sending data\n\t\t\t\t\tcontroller.close();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the data and send it to the browser via the controller\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}).then(push);\n\t\t}", "_read(size) {\n if (this.inputs.length != 0) {\n // remove the first input, and push that on the next event loop\n let input = this.inputs[0];\n this.inputs = this.inputs.slice(1);\n // have to send with a newline\n setImmediate(() => this.push(`${input}\\n`));\n }\n }", "Push() {\n\n }", "jumpPush(){\n\t\tthis.async_jump_pos.push(0);\n\t}", "function sink() {}", "function sink() {}", "function SRP1(state) {\n state.rp1 = state.stack.pop();\n\n if (exports.DEBUG) console.log(state.step, 'SRP1[]', state.rp1);\n}", "function renderStart() {\n generateStart();\n }", "static from(data){\n return FlowFactory.getFlow(data);\n }", "goToFirst() {\n this.stream.goToFirst();\n this.updateScrubberValues({ animate: true, forceHeightChange: true });\n }", "start() {\n const context = this.context;\n \n this.lockedUntil = Infinity;\n \n this.buffer.reset();\n this.buffer.onnewbufferready = (buffer) => {\n if (buffer.halfFull) {\n buffer.onnewbufferready = (buffer) => {\n if (!this.healthy || buffer.halfFull)\n this.transfer(buffer, context);\n };\n \n context.resume();\n \n this.next = context.currentTime;\n while (!this.healthy)\n this.transfer(buffer, context);\n this.lockedUntil = this.next;\n }\n };\n }", "function SRP0(state) {\n state.rp0 = state.stack.pop();\n\n if (exports.DEBUG) console.log(state.step, 'SRP0[]', state.rp0);\n}", "simulatorStarted() {\n this.emit('simulator-started');\n }", "push(input){\n this.next !== null ? this.next.push(input) : this.terminalFunc(input);\n }", "started () {}", "function pump (\n gen: Generator<any, any, any>,\n controller: ReadableStreamController,\n resolve: ?anyFn ): ?mixed {\n\n // Clear queue\n events.off( readyEvt );\n\n // Check stream state\n let backpressure: boolean = controller.desiredSize <= 0;\n\n // Wait for backpressure to ease\n if ( backpressure ) {\n return events.on( readyEvt, () => {\n pump( gen, controller, resolve );\n });\n }\n\n // Ready? proceed\n let\n // Check readable status\n step = controller[closedProp] ? gen.return(true) : gen.next(false),\n { done, value } = step;\n\n // Check for EOS and enqueue\n if ( value === EOS ) {\n controller.close();\n done = true;\n\n } else {\n // Enqueue\n controller.enqueue( value );\n }\n\n // Generator exhausted? resolve promise\n if ( done ) {\n return resolve && resolve();\n }\n\n // Else rinse, repeat\n return pump( gen, controller, resolve );\n}", "get next() { return this.nextStep; }", "beginProcess() {\n this.index.start = this.history.length;\n }", "start() {\n if (!this.stopped && !this.stopping) {\n this.channel.on('close', () => {\n if (this.forcelyStop || (!this.pausing && !this.paused)) {\n if (!this.trapped)\n this.emit('done');\n this.emit('close');\n }\n this.stopped = false;\n });\n this.channel.on('stream', (packet) => {\n if (this.debounceSendingEmptyData)\n this.debounceSendingEmptyData.run();\n this.onStream(packet);\n });\n this.channel.once('trap', this.onTrap.bind(this));\n this.channel.once('done', this.onDone.bind(this));\n this.channel.write(this.params.slice(), true, false);\n this.emit('started');\n if (this.shouldDebounceEmptyData)\n this.prepareDebounceEmptyData();\n }\n }", "function start(spec) {\n var graph = new Graph(spec)\n\n // create nodes for the input\n for (var i = 0; i < spec.input.length; i++) {\n graph.add(spec.input[i], {\n fn: identity,\n input: [i]\n })\n }\n // create nodes\n var names = Object.keys(spec.nodes)\n for (var i = 0; i < names.length; i++) {\n var n = names[i]\n graph.add(n, spec.nodes[n])\n }\n\n // connect the `cb` argument to the `spec.output` node\n var cb = arguments[arguments.length - 1]\n var argLength = arguments.length - 1\n if (typeof cb === 'function') {\n argLength--\n graph.cb = cb\n var outputNode = graph.node(spec.output)\n if (outputNode) {\n outputNode.once('data', graph.onData)\n }\n }\n\n if (spec.pre) {\n spec.pre.call(graph, Array.prototype.slice.call(arguments, 1, argLength + 1))\n }\n // wire up the events\n graph.connect()\n\n // send arguments to the input nodes to kick off execution\n for (var i = 0; i < argLength; i++) {\n graph.node(spec.input[i])\n .execute(i, arguments[i + 1])\n }\n }", "function SRP1(state) {\n state.rp1 = state.stack.pop();\n\n if (DEBUG) console.log(state.step, 'SRP1[]', state.rp1);\n}", "handleStart(inputData) {\n return this.startHandler(inputData);\n }", "*pressButtonStart() {\n yield this.sendEvent({ type: 0x01, code: 0x13b, value: 1 });\n }", "function reqSink() { console.log( 'reqSink', arguments ); }", "async function test() {\n let a = new Sink(\"TestA\");\n a.interfaceIn(\"okookok\");\n\n let b = new Literal(\"TestB: kjojoj\")\n console.log(await b.interfaceOut());\n\n let c = new Affectation(new Sink(\"TestC\") ,new Literal(5));\n await c.interfaceIn(active);\n await c.interfaceIn(active);\n await c.interfaceIn(inactive);\n await c.interfaceIn(active);\n\n let d = new Application(new Sink(\"TestD\"), new Literal(Math.cos) ,new Literal(5));\n await d.interfaceIn(active);\n await d.interfaceIn(active);\n await d.interfaceIn(inactive);\n await d.interfaceIn(active);\n\n let e = new State(new Sink(\"TestE\") ,new Instant());\n await e.interfaceIn(active);\n await e.interfaceIn(active);\n await e.interfaceIn(inactive);\n await e.interfaceIn(inactive);\n await e.interfaceIn(active);\n await e.interfaceIn(inactive);\n await e.interfaceIn(active);\n await e.interfaceIn(active);\n\n let f = new Application(new Sink(\"TestF\"), new Literal(Math.floor) ,new Now());\n await f.interfaceIn(active);\n await f.interfaceIn(active);\n await f.interfaceIn(inactive);\n await f.interfaceIn(active);\n\n console.log(\"All tests ok\");\n return ;\n}", "push(value) {\n if (value === null) //end of stream\n {\n //Cleanup to prevent memory leakage\n this.push = () => { if (this.throwextra)\n throw \"Stream has ended! Illegal attempt to push\"; };\n }\n if (this.#pendingRequest) {\n /**\n * Copy pending request function and makeit null before calling it,\n * this is to prevent a case of infinite recursion, if this function happened to push by itself\n */\n var copy = this.#pendingRequest;\n this.#pendingRequest = undefined;\n copy(value);\n }\n else\n this.#buffer.push(value);\n }", "function battleMapTowerBuildStarted() {\n let tempTowerSlotToBuild = store.getState().towerSlotToBuild.split('_')[2];\n let tempTowerToBuild = store.getState().towerToBuild;\n let tempActualTower = ('tower_slot_' + tempTowerSlotToBuild);\n let tempData = 0;\n mainSfxController(towerBuildingSfxSource);\n\n if(tempTowerSlotToBuild == 7) {\n battleMap1BuildHereTextid.classList.add('nodisplay');\n }\n\n let tempParameters = [tempTowerSlotToBuild, tempTowerToBuild];\n\n for (let i = 0; i < store.getState().animationendListened.length; i++) {\n if (store.getState().animationendListened[i][0] == tempActualTower && store.getState().animationendListened[i][1] == 'animationend') {\n tempData = 1;\n }\n }\n\n if (tempData !== 1){\n towerSlotEventListenerWatcherStateChangeStarter(tempActualTower, 'animationend');\n addEvent(battleMap1TowerPlaceList[tempTowerSlotToBuild - 1], 'animationend', battleMapTowerBuildFinished, tempParameters);\n }\n }", "start() {// [3]\n }", "step(arr) {\n // unreachable\n throw new Error(\"0xdeadbeef\");\n }", "function startSendingData () {\n // Send data to server once in a while, exponential\n UST.sendDataDelay = 300;\n recurseSend();\n }", "step(action){\r\n\r\n }", "start(noLogs) {\n\n\t\tlet serialDataCallback = (dataBuffer) => {\n\t\t\tlet self = this;\n\t\t\tlet data = dataBuffer.toString();\n\t\t\tthis.data += data;\n\t\t\tlet substring = this.data;\n\t\t\tlet matchPrompt = '';\n\n\t\t\twhile (!matchPrompt && substring) {\n\t\t\t\t(function matchSubstring(substring) {\n\t\t\t\t\t_.forOwn(self.triggers, (fn, prompt) => {\n\t\t\t\t\t\tif (substring.length > prompt.length) {\n\t\t\t\t\t\t\tif (substring.startsWith(prompt)) {\n\t\t\t\t\t\t\t\tmatchPrompt = prompt;\n\t\t\t\t\t\t\t\treturn false; // quit iteration\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (prompt.startsWith(substring)) {\n\t\t\t\t\t\t\t\tmatchPrompt = prompt;\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t})(substring);\n\n\t\t\t\tif (!matchPrompt) {\n\t\t\t\t\tsubstring = substring.substring(1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.data = substring;\n\n\t\t\tif (matchPrompt && substring.length >= matchPrompt.length) {\n\t\t\t\tthis.data = substring.substring(matchPrompt.length);\n\n\t\t\t\tlet triggerFn = this.triggers[matchPrompt];\n\t\t\t\tif (triggerFn) {\n\t\t\t\t\ttriggerFn((response, cb) => {\n\t\t\t\t\t\tif (response) {\n\t\t\t\t\t\t\tself.port.write(response);\n\t\t\t\t\t\t\tself.port.drain(() => {\n\t\t\t\t\t\t\t\tif (!noLogs) {\n\t\t\t\t\t\t\t\t\tlog.serialInput(response);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (cb) {\n\t\t\t\t\t\t\t\t\tcb();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tthis.dataCallback = serialDataCallback.bind(this);\n\t\tthis.stream.on('data', this.dataCallback);\n\t}", "function start() {\n hentData();\n}", "function SRP0(state) {\n state.rp0 = state.stack.pop();\n\n if (DEBUG) console.log(state.step, 'SRP0[]', state.rp0);\n}", "nextstep(step) {}", "emit(name, data) {\n this.params$.onNext(data);\n\n let handler = this.handlers[name];\n\n if (handler !== null && handler !== undefined) {\n this.handlers$.onNext(handler);\n } else {\n this.handlers$.onNext(undefined);\n }\n }", "function expStartDataSave() {\n var d = new Date();\n var startTime = d.getTime();\n data.push(revealOrderCondition, dissonanceCondition, valueCondition, targetSource, startTime);\n}", "function runFlow() {\n\tif (map.getTile(layer1.getTileX(endPipe.x * 64), layer1.getTileY(endPipe.y * 64), 'Tile Layer 1').properties.inFlow == \"down\") {\n\t\tgameWin();\n\t}\n\telse {\n\t\tflow(curPipe);\n\t}\n}", "started() {\r\n\r\n\t}", "function step() {\n paused = true;\n executeNext(true);\n }", "async generateData({ state, dispatch, getters, commit }) {\n state.data = await this._vm.$calc.nextStep.promise(state.data, [new ArrayBuffer()]);\n\n /// run is auto playing\n const canDoNext = state.isAuto && getters.isSizeMatches;\n commit(\"createTimeout\", () => {\n if(canDoNext) dispatch(\"generateData\")\n })\n }", "function startFlow(item) {\n interface_debug(\"startflow\", {\n item: item\n });\n\n var _matchUrlAndPaymentTo2 = matchUrlAndPaymentToken(item),\n paymentToken = _matchUrlAndPaymentTo2.paymentToken,\n url = _matchUrlAndPaymentTo2.url;\n\n checkUrlAgainstEnv(url);\n\n if (!isLegacyEligible()) {\n interface_debug(\"ineligible_startflow_global\", {\n url: url\n });\n redirect(url);\n return;\n }\n\n interface_info(\"init_paypal_checkout_startflow\");\n renderPayPalCheckout({\n url: url,\n payment: function payment() {\n return src[\"a\" /* ZalgoPromise */].resolve(paymentToken);\n }\n });\n}", "function start() { \n initiate_graph_builder();\n initiate_job_info(); \n initiate_aggregate_info();\n initiate_node_info();\n}", "function Dataflow() {\n this._log = logger();\n this.logLevel(Error$1);\n\n this._clock = 0;\n this._rank = 0;\n try {\n this._loader = loader();\n } catch (e) {\n // do nothing if loader module is unavailable\n }\n\n this._touched = UniqueList(id);\n this._pulses = {};\n this._pulse = null;\n\n this._heap = new Heap(function(a, b) { return a.qrank - b.qrank; });\n this._postrun = [];\n }", "function myDoublerPusher() {\n\n}", "push(param) {\n this.stack.push(param)\n //document.dispatchEvent(new Event(\"stack-change\"))\n }", "start() {\r\n Utils.log('ttt-pusher start() starting pusher');\r\n this.data.pusherContext && this.data.pusherContext.stop();\r\n if (this.data.detached) {\r\n Utils.log('ttt-pusher start() try to start pusher while component already detached');\r\n return;\r\n }\r\n this.data.pusherContext && this.data.pusherContext.start();\r\n }", "function flow(flowName, states, beginArgs) {\n var name = flowName;\n var activePhases = {};\n var flowStatus = \"created\";\n var statesRegister = {};\n var joinsRegister = {};\n var self = this;\n var currentPhase = undefined;\n var states = states;\n\n function attachStatesToFlow(states) {\n\n function registerState(state) {\n function wrapUpdates(stateName) {\n\n var dynamicMotivation = undefined;\n\n function WHYDynamicResolver() {\n function toBeExecutedWithWHY() {\n var parentPhase = currentPhase;\n currentPhase = stateName;\n registerNewFunctionCall(stateName);\n var ret = states[stateName].apply(self, mkArgs(arguments, 0));\n makePhaseUpdatesAfterCall(stateName);\n currentPhase = parentPhase;\n return ret;\n }\n\n toBeExecutedWithWHY.why = dummyWhy;\n return addErrorTreatment(toBeExecutedWithWHY.why(decideMotivation(self, state))).apply(self, mkArgs(arguments, 0))\n }\n\n function decideMotivation(flow, stateName) {\n if (dynamicMotivation === undefined) {\n if (flow.getCurrentPhase()) {\n motivation = flow.getCurrentPhase() + \" to \" + stateName;\n } else {\n motivation = stateName;\n }\n } else {\n motivation = dynamicMotivation;\n }\n dynamicMotivation = undefined;\n return motivation;\n }\n\n WHYDynamicResolver.why = function (motivation) {\n dynamicMotivation = motivation;\n return this;\n }\n return WHYDynamicResolver;\n }\n\n statesRegister[state] = {\n code: states[state],\n joins: []\n }\n\n self[state] = wrapUpdates(state);\n }\n\n function registerJoin(join) {\n joinsRegister[join] = {\n code: states[join].code,\n inputStates: {},\n tryOnNextTick: false\n }\n\n var inStates = states[state].join.split(',');\n inStates.forEach(function (input) {\n input = input.trim();\n joinsRegister[join].inputStates[input] = {\n calls: 0,\n finishedCalls: 0\n };\n })\n\n }\n\n function joinStates() {\n for (var join in joinsRegister) {\n for (var inputState in joinsRegister[join].inputStates) {\n statesRegister[inputState].joins.push(join);\n }\n }\n }\n\n self.error = function (error) {\n if (error) {\n var motivation = currentPhase + \" failed\";\n if (states['error'] !== undefined) {\n states['error'].why = dummyWhy;\n states['error'].why(motivation).apply(self, [error]);\n }\n else {\n function defaultErrorWHY(error) {\n if (error) {\n console.error(self.getCurrentPhase() + \" failed\");\n console.log(error.stack);\n }\n }\n\n defaultErrorWHY.why = dummyWhy;\n\n defaultErrorWHY.why(motivation)(error);\n }\n }\n }\n\n for (var state in states) {\n\n if (state == \"error\") {\n continue;\n }\n\n if (typeof states[state] === \"function\") {\n registerState(state);\n }\n else {\n registerJoin(state);\n }\n }\n joinStates();\n }\n\n this.next = function () {\n process.nextTick(this.continue.apply(this, mkArgs(arguments, 0)));\n }\n\n function registerNewFunctionCall(stateName) {\n\n updateStatusBeforeCall(stateName);\n notifyJoinsOfNewCall(stateName);\n\n function notifyJoinsOfNewCall(stateName) {\n statesRegister[stateName].joins.forEach(function (join) {\n joinsRegister[join].inputStates[stateName]['calls']++\n });\n }\n }\n\n this.getStatus = function () {\n return flowStatus;\n };\n this.getCurrentPhase = function () {\n return currentPhase;\n }\n this.getActivePhases = function () {\n return activePhases;\n };\n this.getName = function () {\n return name;\n }\n\n function updateStatusBeforeCall(stateName) {\n if (activePhases[stateName] == undefined) {\n activePhases[stateName] = 1;\n } else {\n activePhases[stateName]++;\n }\n }\n\n function updateStatusAfterCall(stateName) {\n activePhases[stateName]--;\n\n if (activePhases[stateName] === 0) {\n var done = true;\n for (var phase in activePhases) {\n if (activePhases[phase] > 0) {\n done = false;\n break;\n }\n }\n if (done) {\n flowStatus = \"done\";\n }\n }\n }\n\n function makePhaseUpdatesAfterCall(stateName) {\n updateJoinsAfterCall(stateName);\n updateStatusAfterCall(stateName);\n\n function updateJoinsAfterCall(stateName) {\n statesRegister[stateName].joins.forEach(function (joinName) {\n joinsRegister[joinName].inputStates[stateName]['finishedCalls']++;\n if (joinsRegister[joinName]['tryOnNextTick'] === false) {\n joinsRegister[joinName]['tryOnNextTick'] = true;\n var caller = null;\n try {\n if (global.__global__enable_RUN_WITH_WHYS) {\n caller = whys.getGlobalCurrentContext().currentRunningItem;\n }\n } catch (err) {\n }\n ; //TODO: strange, refactoring\n updateStatusBeforeCall(joinName);\n var parentPhase = self.getCurrentPhase();\n process.nextTick(function () {\n tryRunningJoin(joinName, caller, parentPhase);\n updateStatusAfterCall(joinName);\n })\n }\n });\n\n\n function tryRunningJoin(joinName, caller, parentPhase) {\n\n joinsRegister[joinName]['tryOnNextTick'] = false;\n\n function joinReady(joinName) {\n var join = joinsRegister[joinName];\n var gotAllInputs = true;\n for (var inputState in join.inputStates) {\n if (join.inputStates[inputState]['finishedCalls'] == 0) {\n gotAllInputs = false;\n break;\n }\n if (join.inputStates[inputState]['finishedCalls'] != join.inputStates[inputState]['calls']) {\n gotAllInputs = false;\n break;\n }\n }\n return gotAllInputs;\n }\n\n async function runJoin(joinName) {\n var currentPhase = joinName;\n updateStatusBeforeCall(joinName);\n reinitializeJoin(joinName);\n await joinsRegister[joinName].code.apply(self, []);\n updateStatusAfterCall(joinName);\n currentPhase = parentPhase;\n\n function reinitializeJoin(joinName) {\n for (var inputState in joinsRegister[joinName].inputStates) {\n joinsRegister[joinName].inputStates = {\n calls: 0,\n finishedCalls: 0\n }\n }\n }\n }\n\n runJoin.why = dummyWhy;\n\n if (joinReady(joinName)) {\n var toRun = runJoin.why(decideMotivation(self, joinName, joinName), caller);\n toRun = addErrorTreatment(toRun);\n toRun(joinName);\n }\n\n function decideMotivation(flow, joinName, stateName) {\n return parentPhase + \" to \" + joinName;\n }\n\n }\n }\n }\n\n\n this.continue = function () {\n var stateName = arguments[0];\n var motivation = arguments[1];\n\n if (!motivation) {\n motivation = self.getCurrentPhase() + \" to \" + stateName;\n }\n var args = mkArgs(arguments, 2);\n registerNewFunctionCall(stateName);\n\n var continueFn = async function () {\n currentPhase = stateName;\n\n if (args.length == 0) {\n args = mkArgs(arguments, 0)\n }\n await statesRegister[stateName].code.apply(self, args);\n makePhaseUpdatesAfterCall(stateName);\n };\n continueFn.why = dummyWhy;\n\n return addErrorTreatment(continueFn.why(motivation));\n };\n\n function addErrorTreatment(func) {\n async function flowErrorTreatmentWHY() {\n try {\n return await func.apply(this, mkArgs(arguments, 0));\n }\n catch (error) {\n flowStatus = \"failed\";\n return self.error(error);\n }\n }\n\n return flowErrorTreatmentWHY;\n }\n\n\n attachStatesToFlow(states);\n flowStatus = \"running\";\n\n function startFlow() {\n self.begin.apply(this, beginArgs);\n }\n\n startFlow.why = dummyWhy;\n startFlow.why(flowName)();\n return this;\n}", "start() {\n const that = this;\n this.transport.socket.on('data', (data) => {\n that.bufferQueue = Buffer.concat([that.bufferQueue, Buffer.from(data)]);\n if (that.bufferQueue.length > RTConst.PROTOCOL_HEADER_LEN) { // parse head length\n const packetLen = that.bufferQueue.readUInt32BE(0);\n const totalLen = packetLen + RTConst.PROTOCOL_HEADER_LEN;\n if (that.bufferQueue.length >= totalLen) {\n // it is a full packet, this packet can be parsed as message\n const messageBuffer = Buffer.alloc(packetLen);\n that.bufferQueue.copy(messageBuffer, 0, RTConst.PROTOCOL_HEADER_LEN, totalLen);\n that.incomeMessage(RTRemoteSerializer.fromBuffer(messageBuffer));\n that.bufferQueue = that.bufferQueue.slice(totalLen); // remove parsed message\n }\n }\n });\n }", "startExecutionQueueZero() {\n const next = this.getNext();\n if (next) {\n runtime.plan\n .startChain(\n next.chainId,\n next.uId,\n next.input_values,\n next.custom_values_overwrite,\n undefined,\n next.initialProcess\n )\n .then(() => {\n this.removeRunningQueue(next.queue, next.chainId);\n })\n .catch(err => {\n logger.log(\n 'error',\n `queueSubscription startExecutionQueueZero: startChain ${next.chainId} / ${next.uId} - ${next.id}. ${err}`\n );\n });\n this.setRunningQueue(next);\n this.startExecutionQueueZero();\n } else {\n setTimeout(() => {\n this.startExecutionQueueZero();\n }, refreshInterval);\n }\n }", "sendInitial () {\n const initialModel = this.controller.model.get()\n\n this.isConnected = true\n const initEvent = new window.CustomEvent('cerebral2.client.message', {\n detail: JSON.stringify({\n type: 'init',\n version: this.VERSION,\n data: {\n initialModel: this.initialModelString ? PLACEHOLDER_INITIAL_MODEL : initialModel\n }\n }).replace(`\"${PLACEHOLDER_INITIAL_MODEL}\"`, this.initialModelString)\n })\n window.dispatchEvent(initEvent)\n\n this.backlog.forEach((detail) => {\n const event = new window.CustomEvent('cerebral2.client.message', {\n detail\n })\n window.dispatchEvent(event)\n })\n this.backlog = []\n\n const event = new CustomEvent('cerebral2.client.message', {\n detail: JSON.stringify({\n type: 'components',\n data: {\n map: this.debuggerComponentsMap,\n render: {\n components: []\n }\n }\n })\n })\n window.dispatchEvent(event)\n }", "start() {\n this.count = 0;\n this.pattern = [];\n this.userPattern = [];\n this.state = \"present\";\n var randomColor = Math.floor(Math.random() * 4);\n this.addStep(this.colors[randomColor]);\n this.present();\n }" ]
[ "0.57655185", "0.5632301", "0.5508445", "0.54772514", "0.5462174", "0.5454371", "0.53902304", "0.538924", "0.5375783", "0.53715616", "0.5368803", "0.53670794", "0.5361112", "0.532122", "0.52992535", "0.528071", "0.5265861", "0.525854", "0.5254401", "0.52314043", "0.52100694", "0.52017915", "0.5181998", "0.51715916", "0.51430976", "0.5139304", "0.5119512", "0.5118244", "0.51036674", "0.5083495", "0.50797296", "0.50775206", "0.5065354", "0.5061091", "0.5057881", "0.5049101", "0.50471306", "0.50452214", "0.50396746", "0.503728", "0.503511", "0.50255364", "0.5023444", "0.5018413", "0.5015749", "0.5014036", "0.50048506", "0.49891263", "0.49845618", "0.49822348", "0.49777782", "0.49741673", "0.4972667", "0.4972667", "0.4971618", "0.4971592", "0.49622563", "0.49619526", "0.49521932", "0.49460673", "0.49392253", "0.4934704", "0.49332407", "0.49319416", "0.49231076", "0.49179724", "0.491569", "0.4906388", "0.49062258", "0.49010983", "0.49007684", "0.48905486", "0.48891038", "0.4887006", "0.4883834", "0.48822844", "0.48806977", "0.48771283", "0.4874568", "0.48742107", "0.48716345", "0.4869116", "0.4863816", "0.48535046", "0.48433575", "0.48414633", "0.48406726", "0.48372906", "0.48338175", "0.4831003", "0.4830282", "0.48291308", "0.48290765", "0.4822092", "0.4817646", "0.48154938", "0.48132846", "0.48112965", "0.48096314", "0.48091415" ]
0.6006543
0
Register to listen for data changes in streamers and push elements through the Flow chain This method is called by startPush when the push operation is required to start listening for data changes in the streamers
_listen(){ if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency var streamers = []; //the order with which we should arrange data in discretized flows for (let iterator of this.iterators) { if (iterator.streamer) { streamers.push(iterator.streamer); subscribeToStream(iterator.streamer, this); } } //set up the basics for a discretized push //this.recall.streamers = streamers; //save the order in recall this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray); this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray); this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue this.recall.called = false; //if we have called the setTimeout function at least once this.streamElements = []; } else{//subscribe to Streamers for (let iterator of this.iterators) { if( iterator.streamer ) subscribeToStream(iterator.streamer, this); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindPusherEvents() {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.channel);\n\n channel.bind('subtaskWasModified', subtaskWasModified);\n channel.bind('subtaskWasDeleted', subtaskWasDeleted);\n channel.bind('subtaskWasCompleted', subtaskWasCompleted);\n channel.bind('subtaskWasIncomplete', subtaskWasIncomplete);\n }", "function bindPusherEvents() {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.channel);\n\n channel.bind('projectWasRemoved', projectWasRemoved);\n channel.bind('projectWasModified', projectWasModified);\n }", "function subscribeToStream(streamer, flow){\n var func = function(data){\n setTimeout(() => flow._prePush(data, streamer), 0);\n };\n\n streamer.subscribe(func);\n flow.subscribers[streamer.key] = func;\n }", "_emitChange() {\n // Must create array copy so React may detect changes\n const payload = this.queue.map(info => {\n const { stream, ...metaInfo } = info;\n return { ...metaInfo }\n });\n this.onQueueChange(payload);\n }", "register(watcher) {\n this.registeredWatchers.push(watcher);\n }", "function bindPusherEvents() {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.channel);\n\n channel.bind('taskWasIncomplete', taskWasIncomplete);\n channel.bind('projectCompletionChanged', projectProgressChanged);\n channel.bind('updateActivityLog', updateActivityLog);\n channel.bind('taskWasCompleted', taskWasCompleted);\n channel.bind('taskModified', taskModified);\n channel.bind('memberJoinedProject', memberJoinedProject);\n channel.bind('memberRemovedFromProject', memberRemovedFromProject);\n channel.bind('taskWasDeleted', taskWasDeleted);\n channel.bind('taskAddedToProject', taskAddedToProject);\n channel.bind('projectWasRemoved', projectWasRemoved);\n channel.bind('projectWasModified', projectWasModified);\n }", "function bindPusherEvents() {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.channel);\n\n channel.bind('commentWasDeleted', commentWasDeleted);\n channel.bind('commentWasLeft', commentWasLeft);\n channel.bind('commentWasModified', commentWasModified);\n }", "function notifySubscribers() {\n var eventPayload = {\n routeObj: getCurrentRoute(), // { route:, data: }\n fragment: getURLFragment()\n };\n\n _subject.onNext(eventPayload);\n }", "function bindPusherEvents() {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.channel);\n\n channel.bind('discussionWasModified', discussionWasModified);\n channel.bind('discussionWasDeleted', discussionWasDeleted);\n }", "function bindPusherEvents() {\n if (typeof window.divvy != 'undefined') {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.userChannel);\n\n channel.bind('notifyUsers', notifyUsers);\n }\n }", "publish (data) {\n this.subscribers.forEach(subscriber => {\n subscriber(data);\n });\n }", "relay(stream, streamName) {\n var that = this;\n stream.forEach((value) =>\n that.push(streamName, value)\n );\n }", "function bindPusherEvents() {\n var pusher = new Pusher('bf3b73f9a228dfef0913');\n var channel = pusher.subscribe(divvy.channel);\n\n channel.bind('taskCompletionChanged', taskProgressChanged);\n channel.bind('updateActivityLog', updateActivityLog);\n channel.bind('subtaskAddedToTask', subtaskAddedToTask);\n channel.bind('subtaskWasDeleted', subtaskWasDeleted);\n channel.bind('subtaskWasModified', subtaskWasModified);\n channel.bind('subtaskWasCompleted', subtaskWasCompleted);\n channel.bind('subtaskWasIncomplete', subtaskWasIncomplete)\n channel.bind('discussionStartedInTask', discussionStartedInTask);\n channel.bind('discussionWasDeleted', discussionWasDeleted);\n channel.bind('discussionWasModified', discussionWasModified);\n channel.bind('taskModified', taskModified);\n channel.bind('taskWasDeleted', taskWasDeleted);\n channel.bind('taskWasCompleted', taskWasCompleted);\n channel.bind('commentWasLeftOnSubtask', commentWasLeftOnSubtask);\n channel.bind('commentWasLeftOnDiscussion', commentWasLeftOnDiscussion);\n channel.bind('commentWasDeletedOnSubtask', commentWasDeletedOnSubtask);\n channel.bind('commentWasDeletedOnDiscussion', commentWasDeletedOnDiscussion);\n }", "setListeners(){\n let self = this;\n\n self.socketHub.on('connection', (socket) => {\n console.log(`SOCKET HUB CONNECTION: socket id: ${socket.id}`)\n self.emit(\"client_connected\", socket.id);\n socket.on(\"disconnect\", (reason)=>{\n console.log(\"Client disconnected: \" + socket.id)\n self.emit(\"client_disconnected\", socket.id)\n });\n\n socket.on('reconnect', (attemptNumber) => {\n self.emit(\"client_reconnected\", socket.id)\n });\n\n socket.on(\"ping\", ()=>{\n console.log(\"RECEIVED PING FROM CLIENT\")\n socket.emit(\"pong\");\n })\n\n socket.on(\"error\", (err)=>{\n Logger.error(`Client socket error: ${err.message}`, {stack: err.stack});\n })\n\n });\n\n self.dataSocketHub.on('connection', (socket)=>{\n console.log(\"File socket connected\");\n self.emit(\"data_channel_opened\", socket);\n console.log(\"After data_channel_opened emit\")\n socket.on(\"disconnect\", (reason)=>{\n self.emit(\"data_channel_closed\", socket.id);\n });\n\n socket.on(\"reconnect\", (attemptNumber) => {\n self.emit(\"data_channel_reconnection\", socket.id);\n })\n\n socket.on(\"error\", (err)=>{\n Logger.error(\"Data socket error: \" + err)\n })\n\n })\n }", "_watch() {\n\t\tconst watchHandler = this._createBootstrapper.bind(this);\n\t\tthis._componentFinder.watch();\n\t\tthis._componentFinder\n\t\t\t.on('add', watchHandler)\n\t\t\t.on('unlink', watchHandler)\n\t\t\t.on('changeTemplates', watchHandler);\n\n\t\tthis._storeFinder.watch();\n\t\tthis._storeFinder\n\t\t\t.on('add', watchHandler)\n\t\t\t.on('unlink', watchHandler);\n\t}", "registerListeners() {}", "function setupSubscribers(mediator, $scope) {\n // Workflow CRUDL subscribers\n mediator.subscribe(CONSTANTS.WORKFLOWS.CREATE, function(data) {\n data.workflowToCreate = JSON.parse(angular.toJson(data.workflowToCreate));\n data.workflowToCreate.id = data.topicUid;\n sampleWorkflows.push(data.workflowToCreate);\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.CREATE + ':' + data.topicUid, data.workflowToCreate);\n });\n\n mediator.subscribeForScope(CONSTANTS.WORKFLOWS.READ, $scope,function(data) {\n var obj = _.find(sampleWorkflows, function(obj) {\n return obj.id == data.topicUid;\n });\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.READ + ':' + data.topicUid, obj)\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.UPDATE, function(data) {\n sampleWorkflows.forEach(function(obj) {\n if(obj.id === data.topicUid) {\n obj = data.workflowToUpdate;\n }\n });\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.UPDATE + ':' + data.topicUid, data.workflowToUpdate);\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.DELETE, function(data) {\n sampleWorkflows = sampleWorkflows.filter(function(obj) {\n return obj.id !== data.topicUid;\n });\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.DELETE + ':'+ data.topicUid, data.topicUid);\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.LIST, function() {\n console.log('>>>>>>>DATA', sampleWorkflows);\n console.log('>>>>>>>RESULTS', sampleResults);\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.LIST, sampleWorkflows)\n });\n\n\n //Subscribers for results, workorders and appforms\n mediator.subscribe(CONSTANTS.RESULTS.LIST, function() {\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.RESULTS.LIST, sampleResults);\n });\n\n mediator.subscribe(CONSTANTS.WORKORDERS.LIST, function() {\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKORDERS.LIST, sampleWorkorders);\n });\n\n mediator.subscribe(CONSTANTS.APPFORMS.LIST, function() {\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.APPFORMS.LIST, []);\n });\n\n //Subscribers for Workflow process\n mediator.subscribe(CONSTANTS.WORKFLOWS.STEP.SUMMARY, function(data) {\n var result = _.find(sampleResults, function(obj) {\n return obj.workorderId === data.workorderId;\n });\n\n if(!result) {\n result = {};\n result.id = shortid.generate();\n result.workorderId = data.workorderId;\n result.nextStepIndex = 0;\n result.stepResults = {};\n result.status = 'New';\n }\n\n var workorder = _.find(sampleWorkorders, function(obj) {\n return obj.id === data.workorderId;\n });\n\n var workflow = _.find(sampleWorkflows, function(obj) {\n return obj.id === workorder.workflowId;\n });\n\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.STEP.SUMMARY + ':' + data.topicUid, {\n workorder: workorder,\n workflow: workflow,\n status: result.status,\n nextStepIndex: result.nextStepIndex,\n result: result\n })\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.STEP.BEGIN, function(data) {\n //TODO\n var result = _.find(sampleResults, function(obj) {\n return obj.workorderId === data.workorderId;\n });\n\n if(!result) {\n result = {};\n result.workorderId = data.workorderId;\n result.nextStepIndex = 0;\n result.stepResults = {};\n result.status = 'In Progress';\n\n sampleResults.push(result);\n }\n\n\n var workorder = _.find(sampleWorkorders, function(obj) {\n return obj.id === data.workorderId;\n });\n\n var workflow = _.find(sampleWorkflows, function(obj) {\n return obj.id === workorder.workflowId;\n });\n\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.STEP.BEGIN + ':' + data.topicUid, {\n workorder: workorder,\n workflow: workflow,\n result: result,\n nextStepIndex: result.nextStepIndex,\n step: result.nextStepIndex > -1 ? workflow.steps[result.nextStepIndex] : workflow.steps[0]\n });\n });\n\n mediator.subscribe(CONSTANTS.WORKFLOWS.STEP.COMPLETE, function(data) {\n var result = _.find(sampleResults, function(obj) {\n return obj.workorderId === data.workorderId;\n });\n\n var workorder = _.find(sampleWorkorders, function(obj) {\n return obj.id === data.workorderId;\n });\n\n var workflow = _.find(sampleWorkflows, function(obj) {\n return obj.id === workorder.workflowId;\n });\n\n result.nextStepIndex = _.findIndex(workflow.steps, function(obj) { return obj.code === data.stepCode}) + 1;\n result.stepResults[data.stepCode] = data.submission;\n\n if(result.nextStepIndex >= workflow.steps.length) {\n result.status = 'Complete';\n }\n\n mediator.publish(CONSTANTS.DONE_PREFIX + CONSTANTS.WORKFLOWS.STEP.COMPLETE + ':' + data.topicUid, {\n workorder: workorder,\n workflow: workflow,\n result: result,\n nextStepIndex: result.nextStepIndex,\n step: result.nextStepIndex > -1 ? workflow.steps[result.nextStepIndex] : workflow.steps[0]\n })\n\n });\n}", "notifySubscribers() {\n subscribers.forEach(function(onChange) {\n onChange();\n });\n }", "onListening() {\n this.emit('ready');\n }", "onListening() {\n this.emit('ready');\n }", "onStreamStart() {\n if (this.onStartTrigger.length > 0) {\n this.onStartTrigger.forEach(trigger => {\n controller.handleData(trigger);\n })\n }\n }", "function registerListeners() {\n subscribe('name-changed', saveName)\n subscribe('name-changed', displayName)\n\n subscribe('config-changed', saveConfig)\n subscribe('config-changed', displayConfig)\n\n subscribe('language-changed', updateLanguageStrings)\n subscribe('language-changed', calculateGreeting)\n\n subscribe('greeting-changed', displayGreeting)\n}", "start() {\r\n Utils.log('ttt-pusher start() starting pusher');\r\n this.data.pusherContext && this.data.pusherContext.stop();\r\n if (this.data.detached) {\r\n Utils.log('ttt-pusher start() try to start pusher while component already detached');\r\n return;\r\n }\r\n this.data.pusherContext && this.data.pusherContext.start();\r\n }", "setup () {\n console.log(\"Stream Engine setup for \" + this.mediaType);\n this.indexHandler.setup();\n this.abrManager.setup();\n\n MetricsManager.setCurrentRepresentation(this.mediaType, null);\n\n EventBus.subscribe(Events.FRAGMENT_LOADED, this.onFragmentLoaded, this);\n EventBus.subscribe(Events.PLAYBACK_PAUSED, this.onPlaybackPaused, this);\n EventBus.subscribe(Events.PLAYBACK_PLAY, this.onPlaybackPlay, this);\n EventBus.subscribe(Events.PLAYBACK_SEEKING, this.onPlaybackSeeking, this);\n EventBus.subscribe(Events.PLAYBACK_SEEKED, this.onPlaybackSeeked, this);\n EventBus.subscribe(Events.PLAYBACK_STALLED, this.onPlaybackStalled, this);\n EventBus.subscribe(Events.PLAYBACK_ENDED, this.onPlaybackEnded, this);\n EventBus.subscribe(Events.PLAYBACK_CANPLAYTHROUGH, this.onPlaybackCanPlayThrough, this);\n EventBus.subscribe(Events.INIT_REQUESTED, this.onInitRequested, this);\n EventBus.subscribe(Events.PLAYBACK_PROGRESS, this.onPlaybackProgress, this);\n EventBus.subscribe(Events.SOURCE_BUFFER_UPDATED, this.onSourceBufferUpdated, this);\n }", "function myDoublerPusher() {\n\n}", "registerHandlers() {\n this.fieldSlaveChannel.subscribe(PUT_FIELD_REQUEST, putFieldHandler.bind(this));\n this.fieldSlaveChannel.subscribe(PATCH_FIELD_STATUS_REQUEST, patchStatusHandler.bind(this));\n this.fieldSlaveChannel.subscribe(PATCH_FIELD_SETTINGS_REQUEST, patchSettingsHandler.bind(this));\n }", "function Publisher() {\r\n this.subscribers = [];\r\n }", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\n if( !this.isDiscretized ) {\n while(true) {\n if (!this.isListening || this.pos >= this.iterators.length)\n break;\n //get the data from the current iterator\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done)\n break;\n\n this.push(obj.value);\n }\n }\n else{//for discretized flows\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n do{\n obj = this.iterators[this.pos].next();\n while( !obj.done ){\n this.streamElements.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( this.streamElements.length > 0 ){\n while(true) {\n this.streamElements.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n break;\n }\n }\n }\n\n this.pos++;\n }while( this.pos < this.iterators.length );\n }\n else{\n var ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n var justEnded = false;\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n ended.push(false);\n }\n\n do{\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n justEnded = true;\n this.push(this.streamElements.slice());\n this.streamElements = [];\n\n //check if all items have ended\n if( Flow.from(ended).allMatch((input) => input) )\n break;\n }\n else\n justEnded = false;\n }while(true);\n }\n }\n\n this.isListening = false; //we done processing so stop listening\n this.pos = 0; //reset the pos for other operations\n }", "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n }", "sync() {\n this._subscribers.forEach(item => item.call(this, this.object));\n }", "registerListeners() {\n\t\tconst business = this.application.business;\n\t\tconst callback = () => { this.writeBusiness(); };\n\n\t\tbusiness.on('newOrder', callback);\n\t\tbusiness.on('orderChange', callback);\n\t\tbusiness.on('update', callback);\n\t}", "function emitData() {\n // While there are `data` listeners and items, emit them\n var item;\n while (this._hasListeners('data') && (item = this.read()) !== null)\n this.emit('data', item);\n // Stop draining the source if there are no more `data` listeners\n if (!this._hasListeners('data') && !this.done) {\n this.removeListener('readable', emitData);\n this._addSingleListener('newListener', waitForDataListener);\n }\n}", "makeStreamData (callback) {\n\t\t// find one of the other users in the team, and add them to the stream\n\t\tsuper.makeStreamData(() => {\n\t\t\tthis.addedUsers = this.getAddedUsers();\n\t\t\tthis.expectedData.stream.$addToSet = this.expectedData.stream.$addToSet || {};\n\t\t\tif (this.addedUsers.length === 1) {\n\t\t\t\t// this tests conversion of single element to an array\n\t\t\t\tconst addedUser = this.addedUsers[0];\n\t\t\t\tthis.data.$addToSet = { memberIds: addedUser.id };\n\t\t\t\tthis.expectedData.stream.$addToSet.memberIds = [addedUser.id];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst addedUserIds = this.addedUsers.map(user => user.id);\n\t\t\t\tthis.data.$addToSet = { memberIds: addedUserIds };\n\t\t\t\tthis.expectedData.stream.$addToSet.memberIds = [...addedUserIds];\n\t\t\t}\n\t\t\tthis.expectedData.stream.$addToSet.memberIds.sort();\n\t\t\tcallback();\n\t\t});\n\t}", "subscribe(subscriber, propertyToWatch) {\n var _a;\n\n if (propertyToWatch) {\n let subscribers = this.subscribers[propertyToWatch];\n\n if (subscribers === void 0) {\n this.subscribers[propertyToWatch] = subscribers = new SubscriberSet(this.source);\n }\n\n subscribers.subscribe(subscriber);\n } else {\n this.sourceSubscribers = (_a = this.sourceSubscribers) !== null && _a !== void 0 ? _a : new SubscriberSet(this.source);\n this.sourceSubscribers.subscribe(subscriber);\n }\n }", "broadcastCameraRegistrations()\n {\n this.eventBus.emit( \"broadcastRegistration\" );\n }", "attachLocalEvents() {\n this.emitter.on(`peer.${this.id}.filetransfer.initiate`, this.initialiseFileTransfer);\n this.emitter.on(`peer.${this.id}.filetransfer.accept`, this.acceptFileTransfer);\n this.emitter.on(`peer.${this.id}.file.transfer.next`, this.acceptFileTransfer);\n }", "static publish() {\r\n ViewportService.subscribers.forEach(el => {el.callback();});\r\n }", "emitAddToList(payload) {\n this.$emit('addToList', payload);\n }", "subscribe(subscriber, propertyToWatch) {\n let subscribers = this.subscribers[propertyToWatch];\n if (subscribers === void 0) {\n this.subscribers[propertyToWatch] = subscribers = new SubscriberSet(this.source);\n }\n subscribers.subscribe(subscriber);\n }", "function Emitter() {\n this._subscriptions = [];\n}", "subscribe(mainWindow: BrowserWindow) {\n mainLog.info('Subscribing to Lightning gRPC streams')\n this.mainWindow = mainWindow\n\n this.subscriptions.channelGraph = subscribeToChannelGraph.call(this)\n this.subscriptions.invoices = subscribeToInvoices.call(this)\n this.subscriptions.transactions = subscribeToTransactions.call(this)\n }", "* startListeners({ path, events, ...action }) {\n if ( ! Array.isArray(events) ) {\n console.error('Invalid Listeners Requested: ', path, events, action)\n }\n let paths\n if ( Array.isArray(path) ) {\n paths = path\n } else { paths = [ path ] }\n for ( let path of paths ) {\n\n let category\n if ( ! action.category ) {\n category = path\n } else { category = action.category }\n\n yield* this.createListenerCategory(category)\n\n if ( events.includes('once') ) {\n this.state.listeners[category].once = true\n yield fork([ this, this.startListener ], {\n path, category, event: 'value', method: 'once'\n })\n yield take('FIREBASE_DATA')\n }\n\n for ( let event of events ) {\n if ( event === 'once' ) { continue }\n yield fork([ this, this.startListener ], {\n path, category, event\n })\n }\n }\n }", "_addToPayload(source) {\r\n if (isFluidValue(source)) {\r\n if (Animated.context) {\r\n Animated.context.dependencies.add(source);\r\n }\r\n\r\n if (isAnimationValue(source)) {\r\n source = source.node;\r\n }\r\n }\r\n\r\n if (isAnimated(source)) {\r\n each(source.getPayload(), node => this.add(node));\r\n }\r\n }", "registerListeners() {\n const client = MatrixClientPeg.get();\n\n client.on('sync', this.onSync);\n client.on('Room.timeline', this.onRoomTimeline);\n client.on('Event.decrypted', this.onEventDecrypted);\n client.on('Room.timelineReset', this.onTimelineReset);\n client.on('Room.redaction', this.onRedaction);\n }", "on_connecter() {\n this.enregistrerChannel()\n }", "_registerToCommunicationEvents() {\n algoRunnerCommunication.on(messages.incomming.initialized, () => {\n stateManager.start();\n });\n algoRunnerCommunication.on(messages.incomming.done, (message) => {\n stateManager.done(message);\n });\n algoRunnerCommunication.on(messages.incomming.stopped, (message) => {\n if (this._stopTimeout) {\n clearTimeout(this._stopTimeout);\n }\n stateManager.done(message);\n });\n algoRunnerCommunication.on(messages.incomming.progress, (message) => {\n if (message.data) {\n log.debug(`progress: ${message.data.progress}`, { component });\n }\n });\n algoRunnerCommunication.on(messages.incomming.error, async (message) => {\n const errText = message.error && message.error.message;\n log.info(`got error from algorithm: ${errText}`, { component });\n const { jobId } = jobConsumer.jobData;\n const reason = `parent algorithm failed: ${errText}`;\n await this._stopAllPipelinesAndExecutions({ jobId, reason });\n stateManager.done(message);\n });\n algoRunnerCommunication.on(messages.incomming.startSpan, (message) => {\n this._startAlgorithmSpan(message);\n });\n algoRunnerCommunication.on(messages.incomming.finishSpan, (message) => {\n this._finishAlgorithmSpan(message);\n });\n }", "async registerEvents() {\n xtsMarketDataWS.onConnect((connectData) => {\n console.log(connectData, \"connectData\");\n });\n\n xtsMarketDataWS.onJoined((joinedData) => {\n console.log(joinedData, \"joinedData\");\n });\n\n xtsMarketDataWS.onMarketDepthEvent((marketDepthData) => {\n console.log(marketDepthData, \"marketDepthData\");\n });\n\n xtsMarketDataWS.onError((errorData) => {\n console.log(errorData, \"errorData\");\n });\n\n xtsMarketDataWS.onDisconnect((disconnectData) => {\n console.log(disconnectData, \"disconnectData\");\n });\n\n xtsMarketDataWS.onLogout((logoutData) => {\n console.log(logoutData, \"logoutData\");\n });\n }", "subscribe(newInfo, request, callback) {\n this.subscribers.push({\n newInfo,\n request,\n callback\n });\n }", "start() {\n\t\tthis.registerListeners();\n\t}", "notifySubscribers() {\n const { subscribers } = this;\n\n for (const subscriber of subscribers) {\n subscriber(this.state, this);\n }\n }", "broadcastSensorHistory() {\n debugSensorBroadcast('Broadcasting sensorData', {'payload': this});\n sendMessage('sensorData', {'payload': this});\n }", "function updateWatchers() {\n for (var watcher in watchers) {\n watcher = watchers[watcher];\n if (watcher.success) {\n watcher.success(position);\n }\n }\n }", "install() {\n this.listen(this.update.bind(this))\n }", "_watch() {\n\t\tconst watchHandler = this._createAppDefinitions.bind(this);\n\t\tthis._componentFinder.watch();\n\t\tthis._componentFinder\n\t\t\t.on('add', watchHandler)\n\t\t\t.on('unlink', watchHandler)\n\t\t\t.on('changeTemplates', watchHandler);\n\n\t\tthis._storeFinder.watch();\n\t\tthis._storeFinder\n\t\t\t.on('add', watchHandler)\n\t\t\t.on('unlink', watchHandler);\n\t}", "_registerMessageListener() {\n this._mav.on('message', (message) => {\n let type = this._mav.getMessageName(message.id);\n\n // Wait for specific message event to get the all the fields.\n this._mav.once(type, (_, fields) => {\n // Emit both events.\n this.emit('message', type, fields);\n let listened = this.emit(type, fields);\n\n // Emit another event if the message was not listened for.\n if (!listened) {\n this.emit('ignored', type, fields);\n }\n });\n });\n }", "RegisterEventSource() {\n\n }", "send(data){\n Flow.from(this.listeners).where(listener => listener.notify && Util.isFunction(listener.notify)).foreach(listener => listener.notify(data));\n Flow.from(this.listeners).where(listener => !(listener.notify && Util.isFunction(listener.notify)) && Util.isFunction(listener)).foreach(listener => listener(data));\n }", "attachListeners() {\n }", "function Publisher() {\n\t\tthis.subscribers = []\n\t}", "static listenSocketEvents() {\n Socket.shared.on(\"wallet:updated\", (data) => {\n let logger = Logger.create(\"wallet:updated\");\n logger.info(\"enter\", data);\n\n Redux.dispatch(Wallet.actions.walletUpdatedEvent(data));\n });\n }", "subscribe() {\n // We default to unsubscribing the events. This handles when a grammar\n // changes from one we handle to one we don't.\n this.unsubscribe();\n // Figure out the current grammar of the editor. We also determine if\n // it is the list of grammars we are listening to.\n const grammar = this.editor.getGrammar().scopeName;\n const pluginGrammars = atom.config.get(\"autocorrect.grammars\");\n const isAttachable = _.contains(pluginGrammars, grammar);\n // If we aren't attaching, then we don't care about the events.\n if (!isAttachable) {\n return;\n }\n // We are going to attach to the editor and listen to additional events.\n this.bufferSubscriptions.add(this.editor.onDidStopChanging((args) => {\n this.onBufferChange(args);\n }));\n }", "_pushMonitors () {\n this.monitorBlocks.runAllMonitored(this);\n }", "push(streamType, value) {\n if (this._streams[streamType]) {\n this._streams[streamType].forEach((stream) =>\n stream.push(value)\n )\n }\n }", "function DataEmitter() {\n}", "function registerMutableSourceForHydration(root4, mutableSource) {\n var getVersion = mutableSource._getVersion;\n var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n // Retaining it forever may interfere with GC.\n if (root4.mutableSourceEagerHydrationData == null) root4.mutableSourceEagerHydrationData = [\n mutableSource,\n version\n ];\n else root4.mutableSourceEagerHydrationData.push(mutableSource, version);\n }", "attachHooks (triggerBroadcast: ?boolean) {\n if (!this._listeners.size) return;\n let prestate, state;\n try {\n prestate = this._liveOptions.state;\n if (this._attachedHooks) throw new Error(\"Hooks are already attached\");\n this._attachedHooks = new Map();\n if (triggerBroadcast !== false) this._refreshState();\n state = this._liveOptions.state;\n if (this._fieldFilter !== undefined) {\n this.attachFilterHook(this._emitter, this._fieldFilter, false);\n } else if (this._liveKuery !== undefined) {\n this.attachLiveKueryHooks(triggerBroadcast !== false);\n return; // skip _triggerPostUpdate below\n } else if (this._fieldName === undefined) {\n throw new Error(\"Subscription is uninitialized, cannot determine listeners\");\n }\n if (triggerBroadcast !== false) this._triggerPostUpdate();\n } catch (error) {\n if (this._attachedHooks) this.detachHooks();\n const name = new Error(`attachHooks(${triggerBroadcast})`);\n const wrappedError = this._emitter.wrapErrorEvent(error, 1, () => [\n name,\n \"\\n\\temitter:\", this._emitter,\n ...(this._liveKuery === undefined ? [\n \"\\n\\tfilter:\", this._fieldFilter || this._fieldName,\n \"\\n\\tstate:\", ...dumpObject(this._liveOptions.state),\n \"\\n\\tstate was:\", ...dumpObject(state),\n \"\\n\\tstate prestate:\", ...dumpObject(prestate),\n ] : [\n \"\\n\\thead:\", ...dumpObject(this._liveHead),\n \"\\n\\tkuery:\", ...dumpKuery(this._liveKuery),\n \"\\n\\toptions:\", ...dumpObject(this._liveOptions),\n ]),\n \"\\n\\tsubscription:\", ...dumpObject(this),\n ]);\n if (this._liveOptions.sourceInfo) {\n addStackFrameToError(wrappedError, this._liveKuery,\n this._liveOptions.sourceInfo, name, this._liveOptions.discourse);\n }\n throw wrappedError;\n }\n }", "async publishToUsers () {\n\t\tconst stream = await this.data.streams.getById(this.updater.stream.id);\n\t\t// only applies to private streams, and only if there are users added\n\t\tif (\n\t\t\tstream.get('privacy') !== 'private' ||\n\t\t\t!this.transforms.addedUsers ||\n\t\t\tthis.transforms.addedUsers.length === 0\n\t\t) {\n\t\t\treturn;\t\n\t\t}\n\t\tconst userIds = this.transforms.addedUsers.map(user => user.id);\n\t\tawait new StreamPublisher({\n\t\t\tdata: { stream: stream.getSanitizedObject({ request: this }) },\n\t\t\trequest: this,\n\t\t\tbroadcaster: this.api.services.broadcaster,\n\t\t\tstream: this.updater.stream.attributes\n\t\t}).publishStreamToUsers(userIds);\n\t}", "function onNewNotifications(data) {\n\t_.map(Object.keys(data), function(ch) {\n\t\t_.map(data[ch], emitData(ch).bind(this));\n\t}.bind(this));\n}", "notifyIncomingNotificationListeners(notification) {\n this.incomingNotificationListener.forEach((listener) => {\n listener(notification);\n });\n }", "function registerEvents() {\n}", "subscribe(callback) {\n this._subscribers.add(callback);\n }", "constructor (initialState = {}) {\n this.emitter = new EventEmitter()\n this.updates = new Map()\n this.observers = new Map()\n this.applicators = new Map()\n this.current = initialState\n\n /**\n * Creates a held source stream that holds application state.\n * Held streams output the last value on subscription.\n */\n this.source = hold(\n fromEvent(eventKey, this.emitter)\n .scan((state, event) => {\n /**\n * Actions that request state changes are passed in to the stream with\n * side effects happening within the execution of update functions\n */\n return fold(this.updates.values(), (state, update) => {\n // Apply applicators to each update\n let up = update\n if (this.applicators.size > 0) {\n for (const apply of this.applicators.values()) {\n up = apply(update)\n }\n }\n\n // Execute the update and return the result to the fold\n return up(state, event)\n }, state)\n }, initialState)\n .tap(state => {\n this.current = state\n })\n )\n\n // @TODO investigate why unsubscribing this sole subscriber\n // causes double events when the next observer comes in.\n // @TODO how to utilise these internally\n this.source.subscribe({\n next: function debug () {},\n error: function debug () {}\n })\n // subscription.unsubscribe()\n }", "function addNewStreamListener(pipeline) {\n $(\"#pipeline-visual-editor\").on('click', \".open-add-stream\", function(){\n var stageId = $( this ).attr('data-stage-id');\n var newStreamP = $('#add-stream-popover-' + stageId);\n var newStreamBlock = require('./templates/stream-block.hbs')({stageId: stageId});\n newStreamP.popover({'content' : newStreamBlock, 'html' : true});\n newStreamP.popover('show'); \n $('#addStreamBtn-' + stageId).off('click').click(function() {\n handleAddStream(newStreamP, stageId, pipeline);\n }); \n $(\"#newStreamName-\" + stageId).off('keydown').keydown(function (e) {\n if (e.which === 13) {\n handleAddStream(newStreamP, stageId, pipeline);\n }\n });\n $(\"#newStreamName-\" + stageId).focus();\n }); \n \n}", "subscriberNewPlayer(EventName, data){\n this.setState((prevState)=> ({\n players: prevState.players.concat(data),\n currentPlayer : data\n }))\n }", "init(){\n for(let record of map){\n for(let subscriber of record.subscribers){\n this.eventPool.on(record.event,subscriber(this.logService));\n console.log('subscriber is listenning for '+record.event)\n }\n }\n }", "setupListeners(name) {\n logger_1.default.system.debug(\"FinsembleWindow parent change notification setup\", name);\n this.TITLE_CHANGED_SUBSCRIPTION = routerClientInstance_1.default.subscribe(this.TITLE_CHANGED_CHANNEL, this.onTitleChanged);\n }", "_subscribeToChipEvents() {\n this._listenToChipsRemove();\n this._listenToChipsDestroyed();\n this._listenToChipsInteraction();\n }", "setupParsedEvents() {\n this.emitter.on('ws:update:parsed', ({ language, platform, data }) => {\n const packet = { platform, worldstate: data, language };\n this.parseEvents(packet, this.emitter);\n });\n }", "function push() {\n\t\t\t// \"done\" is a Boolean and value a \"Uint8Array\"\n\t\t\treturn reader.read().then(({ done, value }) => {\n\t\t\t\t// Is there no more data to read?\n\t\t\t\tif (done) {\n\t\t\t\t\t// Tell the browser that we have finished sending data\n\t\t\t\t\tcontroller.close();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the data and send it to the browser via the controller\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}).then(push);\n\t\t}", "attachChannelEvents() {\n this.channel.onmessage = this.handleChannelMessage;\n\n this.channel.onopen = e => {\n this.channel.send('ping');\n }\n\n this.channel.onerror = e => {\n console.log('channel error', e);\n }\n\n this.channel.onclose = e => {\n console.log('channel closed');\n }\n\n this.channel.onbufferedamountlow = e => {\n this.resumeTransfers();\n }\n }", "function init() {\n setupListeners();\n }", "initPublisherListener() {\n // Enable keyevents in redis and subsribe for EXPIRED event\n redisPSub.config('SET', 'notify-keyspace-events', 'Ex');\n redisPSub.psubscribe('__keyevent@0__:*');\n redisPSub.on('pmessage', (pattern, channel, message) => {\n if (message === 'publisherHere') {\n this.check().then(mode => {\n if (mode === 'IamPublisher') {\n this.emit('mode:change', 'publisher');\n }\n });\n }\n });\n }", "_setData(d) {\n if (!(d instanceof SplitStreamInputData || d instanceof SplitStreamFilter))\n console.error(\n 'Added data is not an instance of SplitStreamData or SplitStreamFilter'\n );\n\n this._datasetsLoaded++;\n this._data = d.data;\n this._update();\n }", "notify() {\n\t\tthis.subscribers.forEach( handler => { handler(this.testruns)})\n\t}", "merge(data){\n var isStream = this.isStream();\n\n var iterator = FlowFactory.getIterator(data);\n //ensure that we cannot mix streams and static data structures\n if( (!isStream && iterator.streamer)\n || (isStream && !iterator.streamer) )\n throw new Error(\"Streamer cannot be merged with other data types\");\n\n this.iterators.push(iterator);\n\n return this;\n }", "function ChangeTracker(data) {\n Object.defineProperties(this, {\n _pendingListeners: { value: {} },\n _data: { value: data || {}, writable: true }\n });\n EventEmitter.call(this);\n\n ['keyAdded', 'keyRemoved', 'keyUpdated'].forEach((eventName) => {\n this._pendingListeners[eventName] = { };\n this.on(eventName, (path, value) => {\n var handlers = this._pendingListeners[eventName][path] || [];\n handlers.forEach(handler => handler(value) );\n this._pendingListeners[eventName][path] = [];\n });\n });\n}", "constructor(source) {\n this.subscribers = {};\n this.source = source;\n }", "function addWatchers() {\n\t\t\t\tif (addWatchers.hasRun) { return; }\n\t\t\t\taddWatchers.hasRun = true;\n\n\t\t\t\tKEYS.forEach(function(key) {\n\t\t\t\t\tenquire.register(CONFIG[key].query, {\n\t\t\t\t\t\tmatch: _.throttle(function() {\n\t\t\t\t\t\t\tpublishChange(new BreakpointChangeEvent(key, previousBP));\n\t\t\t\t\t\t\tpreviousBP = key;\n\t\t\t\t\t\t}, 20)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}", "subscribe() {}", "addSourceHotHooks() {\n this.sourceHooks = {\n afterLoadData: () => this.onAfterSourceLoadData(),\n afterChange: changes => this.onAfterSourceChange(changes),\n afterColumnSort: () => this.onAfterColumnSort()\n };\n\n this.hotSource.instance.addHook('afterLoadData', this.sourceHooks.afterLoadData);\n this.hotSource.instance.addHook('afterChange', this.sourceHooks.afterChange);\n this.hotSource.instance.addHook('afterColumnSort', this.sourceHooks.afterColumnSort);\n }", "function push() {\n // \"done\" is a Boolean and value a \"Uint8Array\"\n reader.read().then(({ done, value }) => {\n // Is there no more data to read?\n if (done) {\n // Tell the browser that we have finished sending data\n controller.close();\n return;\n }\n \n // Get the data and send it to the browser via the controller\n controller.enqueue(value);\n push();\n });\n }", "fireListeners() {\n this.listeners.forEach((listener) => listener());\n }", "pushFromBuffer() {\n let stream = this.stream;\n let chunk = this.buffer.shift();\n // Stream the data\n try {\n this.shouldRead = stream.push(chunk.data);\n }\n catch (err) {\n this.emit(\"error\", err);\n }\n if (this.options.emit) {\n // Also emit specific events, based on the type of chunk\n chunk.file && this.emit(\"file\", chunk.data);\n chunk.symlink && this.emit(\"symlink\", chunk.data);\n chunk.directory && this.emit(\"directory\", chunk.data);\n }\n }", "function addListeners (stream, on, listeners) {\n for (var i = 0; i < listeners.length; i++) {\n on.apply(stream, listeners[i])\n }\n}", "function addListeners (stream, on, listeners) {\n for (var i = 0; i < listeners.length; i++) {\n on.apply(stream, listeners[i])\n }\n}", "function addListeners (stream, on, listeners) {\n for (var i = 0; i < listeners.length; i++) {\n on.apply(stream, listeners[i])\n }\n}", "function addListeners (stream, on, listeners) {\n for (var i = 0; i < listeners.length; i++) {\n on.apply(stream, listeners[i])\n }\n}", "function registerMutableSourceForHydration(root,mutableSource){var getVersion=mutableSource._getVersion;var version=getVersion(mutableSource._source);// TODO Clear this data once all pending hydration work is finished.\n// Retaining it forever may interfere with GC.\nif(root.mutableSourceEagerHydrationData==null){root.mutableSourceEagerHydrationData=[mutableSource,version];}else{root.mutableSourceEagerHydrationData.push(mutableSource,version);}}", "function addListeners (stream, on, listeners) {\n for (var i = 0; i < listeners.length; i++) {\n on.apply(stream, listeners[i]);\n }\n}", "function addListeners (stream, on, listeners) {\n for (var i = 0; i < listeners.length; i++) {\n on.apply(stream, listeners[i]);\n }\n}" ]
[ "0.5843148", "0.58224446", "0.5739786", "0.5671986", "0.5607331", "0.554507", "0.5531636", "0.55246484", "0.54794145", "0.54533654", "0.5435203", "0.5428958", "0.54111075", "0.54063994", "0.53553325", "0.53542805", "0.5327822", "0.52222365", "0.52170205", "0.52170205", "0.5214106", "0.5140583", "0.51170695", "0.51137763", "0.5095103", "0.50933874", "0.50813115", "0.50347155", "0.50319886", "0.5003297", "0.49942324", "0.49742907", "0.49671906", "0.49563083", "0.49398738", "0.49261293", "0.4917016", "0.49163762", "0.49108228", "0.49030393", "0.48854542", "0.48772994", "0.48749533", "0.48744395", "0.48739052", "0.48640838", "0.48587108", "0.48586363", "0.4858118", "0.48550728", "0.4835596", "0.48340988", "0.48241076", "0.48191756", "0.4819007", "0.48180807", "0.4815305", "0.48127332", "0.4808361", "0.47962454", "0.47945106", "0.47926742", "0.47903547", "0.47808826", "0.47805876", "0.47804537", "0.47749785", "0.47747904", "0.47722852", "0.47708714", "0.47701398", "0.47644234", "0.4763741", "0.4758602", "0.47542864", "0.47495455", "0.47467038", "0.474541", "0.47451815", "0.47430226", "0.47308436", "0.47250894", "0.4717701", "0.4710646", "0.47104448", "0.47099826", "0.4704027", "0.4690231", "0.46895573", "0.4688784", "0.46832514", "0.4682637", "0.46772873", "0.46742", "0.46742", "0.46742", "0.46742", "0.4673447", "0.46711686", "0.46711686" ]
0.5460947
9
This method makes the IteratorFlow discretizable.
discretize(span, spanLength, spawnFlows){ if( spawnFlows === undefined ) spawnFlows = true; this.discreteStreamLength = span; this.isDataEndObject = getDataEndObject(spanLength); this.isDiscretized = true; var flow = new DiscretizerFlow(span, this.isDataEndObject, spawnFlows); setRefs(this, flow); return flow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "static createIteratorFromIterable(iterable){\n //TODO save state for restarting when Flow is being reused\n return iterable;\n }", "function SetIterator() {}", "* iteratorDFS() {\n let currentItem = yield* this.iteratorStartSearch();\n yield `Starting tree from vertex ${currentItem.value}`;\n if (currentItem == null) return;\n const tree = [];\n const pq = [];\n let countItems = 0;\n while(true) {\n tree.push(currentItem);\n this.setStats(tree, pq);\n currentItem.mark = true;\n currentItem.isInTree = true;\n countItems++;\n yield `Placed vertex ${currentItem.value} in tree`;\n\n if (countItems === this.items.length) break;\n\n //insertion in PQ vertices, adjacent current\n this.items.forEach(item => {\n const weight = this.connections[currentItem.index][item.index];\n if (item !== currentItem && !item.isInTree && typeof weight === 'number') {\n this.putInPQ(pq, currentItem, item, weight);\n }\n });\n\n this.setStats(tree, pq);\n yield `Placed vertices adjacent to ${currentItem.value} in priority queue`;\n\n if (pq.length === 0) {\n yield 'Graph not connected';\n this.reset();\n return;\n }\n\n //removing min edge from pq\n const edge = pq.pop();\n currentItem = edge.dest;\n yield `Removed minimum-distance edge ${edge.title} from priority queue`;\n this.markedConnections[edge.src.index][edge.dest.index] = edge.weight;\n }\n this.items.forEach(item => delete item.isInTree);\n }", "function metropolisNextIteration(){\n \tmetropolisJump();\n \tredraw();\n }", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\n if( !this.isDiscretized ) {\n while(true) {\n if (!this.isListening || this.pos >= this.iterators.length)\n break;\n //get the data from the current iterator\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done)\n break;\n\n this.push(obj.value);\n }\n }\n else{//for discretized flows\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n do{\n obj = this.iterators[this.pos].next();\n while( !obj.done ){\n this.streamElements.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( this.streamElements.length > 0 ){\n while(true) {\n this.streamElements.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n break;\n }\n }\n }\n\n this.pos++;\n }while( this.pos < this.iterators.length );\n }\n else{\n var ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n var justEnded = false;\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n ended.push(false);\n }\n\n do{\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n justEnded = true;\n this.push(this.streamElements.slice());\n this.streamElements = [];\n\n //check if all items have ended\n if( Flow.from(ended).allMatch((input) => input) )\n break;\n }\n else\n justEnded = false;\n }while(true);\n }\n }\n\n this.isListening = false; //we done processing so stop listening\n this.pos = 0; //reset the pos for other operations\n }", "function _iterator(){\n (function loopsidasy( _current ){\n _timeout = setTimeout(function(){\n var $group = _group(_current),\n _nextIndex = ($group._currentIndex + 1) % $group._childLength,\n $nextItem = $group._childItems.eq(_nextIndex);\n $group.height( $('img', $nextItem)[0].clientHeight + config.itemPadding*2 );\n $group._childItems.removeClass('current');\n $nextItem.addClass('current');\n $group._currentIndex = _nextIndex;\n loopsidasy( ((_current+1)%_groupCount) );\n }, config.rotateTime);\n })( 0 );\n }", "[Symbol.iterator]()\n {\n return this._iterate({ wrapPoint:false, includeEmpty:false });\n }", "constructor(iterable) {\n this.iterator = null;\n let artifacts = new IterationArtifacts(iterable);\n this.artifacts = artifacts;\n }", "constructor(iterable) {\n this.iterator = null;\n let artifacts = new IterationArtifacts(iterable);\n this.artifacts = artifacts;\n }", "NextVisible() {}", "* iteratorMST() {\n this.markedConnections = this.connections.map(() => new Array(this.connections.length).fill(this.graph.getNoConnectionValue()));\n yield* this.iteratorDFS(true);\n yield 'Press again to hide unmarked edges';\n const connections = this.connections;\n this.connections = this.markedConnections;\n this.markedConnections = [];\n yield 'Minimum spanning tree; Press again to reset tree';\n this.connections = connections;\n this.reset();\n }", "constructor(iterable) {\n this.iterator = null;\n let artifacts = new IterationArtifacts(iterable);\n this.artifacts = artifacts;\n }", "nextIteration() {\n if (this.contexts && this.contexts.length > 0) {\n this.contexts = this.contexts.slice();\n this.lastId++;\n const context = Object.assign({}, this.contexts[this.contexts.length - 1]);\n context.iterationId += 1;\n context.id = this.lastId;\n this.contexts.splice(-1, 1, context);\n this._currentContextIds.splice(0, 1, this.contextIdforContexts(this.contexts));\n }\n else {\n throw new Error('Cannot increase frame iteration, the context is empty');\n }\n }", "nextIteration() {\n if (this.contexts && this.contexts.length > 0) {\n this.contexts = this.contexts.slice();\n this.lastId++;\n const context = Object.assign({}, this.contexts[this.contexts.length - 1]);\n context.iterationId += 1;\n context.id = this.lastId;\n this.contexts.splice(-1, 1, context);\n this._currentContextIds.splice(0, 1, this.contextIdforContexts(this.contexts));\n }\n else {\n throw new Error('Cannot increase frame iteration, the context is empty');\n }\n }", "iterate(when) {\n console.log(\"iterate\");\n let lapse = Math.min((when - this.then)/1000, 0.02);\n this.then = when;\n console.log(\"iterate: update\");\n this.update(when);\n console.log(\"iterate: clear\");\n this.clear();\n console.log(\"iterate: draw\");\n this.draw();\n this.swap_matrix();\n if (this.running) {\n window.requestAnimationFrame(thingIterator);\n }\n }", "* [Symbol.iterator]() {\n\t\tfor (const item of this.cache) {\n\t\t\tyield item;\n\t\t}\n\n\t\tfor (const item of this.oldCache) {\n\t\t\tconst [key] = item;\n\t\t\tif (!this.cache.has(key)) {\n\t\t\t\tyield item;\n\t\t\t}\n\t\t}\n\t}", "[Symbol.iterator]() {\n let size = this.size();\n return {\n next: () => {\n size -= 1;\n return {\n value: this.pop(),\n done: size === -1\n };\n }\n };\n }", "getIterator()\r\n {\r\n return new NullIterator();\r\n }", "enterComp_iter(ctx) {\n\t}", "_makeIterator() {\n return this.fn.apply(this.context, this.args);\n }", "function iterator ()\n {\n for (var i=0; i<obj.data.length; ++i) {\n \n // This produces a very slight easing effect\n obj.data[i] = data[i] * RG.Effects.getEasingMultiplier(frames, numFrame);\n }\n \n RGraph.clear(obj.canvas);\n RGraph.redrawCanvas(obj.canvas);\n \n if (++numFrame < frames) {\n RGraph.Effects.updateCanvas(iterator);\n } else {\n callback(obj);\n }\n }", "function StrideIterator(source, step) {\r\n this._source = source;\r\n this._step = step;\r\n }", "function Iterator() {\n this.arr = [];\n this.index = 0;\n this.current = function() {\n return this.arr[this.index]\n }\n }", "resetFlow() {\n let current = this.edgesList.head;\n\n while (current != null) {\n current.data.resetFlow();\n current = current.next;\n }\n }", "_computeItems() {\n if (isEmpty(this.actions)) {\n this.items = [];\n return;\n }\n\n let aActions = clone(this.actions);\n const allVisibleActions = this._removeHiddenActions(aActions);\n this._primaryActions = filter(allVisibleActions, (o) => {\n return this.primaryActions.includes(o.name);\n });\n this._secondaryActions = filter(allVisibleActions, (o) => {\n return !this.primaryActions.includes(o.name);\n });\n }", "function EmptyIterator() {\r\n }", "function AsyncPreOrderIterator (onVisit, onEnd) {\n this.onVisit = onVisit;\n this.onEnd = onEnd;\n}", "function iterator(item, cb){\n cb();\n }", "function iterator(item, cb){\n cb();\n }", "[Symbol.iterator]() {\n return {\n next: () => {\n let done = !this.hasNext();\n let val = this.next();\n return {\n done: done,\n value: val\n };\n }\n };\n }", "[Symbol.iterator]() {\n return {\n next: () => {\n let done = !this.hasNext();\n let val = this.next();\n return {\n done: done,\n value: val\n };\n }\n };\n }", "_reflow() {\n const {_first, _last, _scrollSize} = this;\n\n this._updateScrollSize();\n this._getActiveItems();\n\n if (this._scrollSize !== _scrollSize) {\n this._emitScrollSize();\n }\n\n if (this._first === -1 && this._last === -1) {\n this._emitRange();\n } else if (\n this._first !== _first || this._last !== _last ||\n this._spacingChanged) {\n this._emitRange();\n this._emitChildPositions();\n }\n this._pendingReflow = null;\n }", "*[Symbol.iterator]() {\n\t\tlet node = this.head;\n\t\twhile(node.next !== null){\n\t\t\tyield node;\n\t\t\tnode = node.next;\n\t\t}\n\t}", "[Symbol.iterator]() {\n let pre = 0, cur = 1;\n // The resulting iterator object has to have a next method:\n return {\n next() {\n // The result of next has to be an object with the property `done` that states whether or not the iterator is done.\n [pre, cur] = [cur, pre + cur];\n if (pre < 1000) return { done: false, value: pre };\n return { done: true };\n }\n }\n }", "function LoaderIterator(iterator) {\n $SetLoaderIteratorPrivate(this, iterator);\n}", "function iterator() {\n let iterator = []\n for (i = 0; i < 80; i++) {\n iterator.push(i);\n }\n return iterator;\n }", "function recursivelyCallNextOnIterator(data) {\n var yielded = iterator.next.apply(iterator, arguments);\n // yielded = { value: Any, done: Boolean }\n\n if (yielded.done) {\n taskInstance.isIdle = true;\n taskInstance.isRunning = false;\n // call setState with the same state to trigger another render\n // so that you can use task properties like isIdle directly\n // in your render function\n component.setState(component.state);\n return;\n }\n\n if (isPromise(yielded.value)) {\n yielded.value.then(function (data) {\n if (component._isMounted) {\n recursivelyCallNextOnIterator(data);\n }\n }, function (e) {\n if (component._isMounted) {\n iterator.throw(e);\n }\n });\n }\n }", "[Symbol.iterator](){\n let index = 0;\n return {//iterable object\n next(){\n index++;\n return {\n value: index * 5,\n done: index > 5 \n };\n } \n };\n }", "forward() {\n this.currentIdx = Math.min(this.currentIdx + 1, this.visited.length - 1);\n }", "function thingIterator(when) {\n thing.iterate(when);\n}", "static advanceAll() {\n tailBlocks.forEach(tailBlock => tailBlock.advance())\n }", "next() {\n this._next();\n }", "updateFlow() {\n this.flow += 1;\n }", "begin() {\n for (let i = 0; i < this.operationCount; i++) {\n this.read();\n this.write();\n this.move();\n this.changeState();\n }\n }", "function IterableChanges() { }", "function IterableChanges() { }", "[Symbol.iterator]() {\n return new LinksCollectionIterator(this._links)\n }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "function IterableChanges() {}", "function IterableChanges() {}", "function IterableChanges() {}", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "[ITERATOR] () {\n const next = () => {\n const value = this.read()\n const done = value === null\n return { value, done }\n }\n return { next }\n }", "__skipStep() {\n this.skipStep();\n }", "*[Symbol.iterator]() {\n let i = 0\n while (i < this.size()) {\n yield this.get(i)\n i++\n }\n }", "cacheInitialItems() {\n this.initialItemElements = this.containerDirectChildren.map(child => child.cloneNode(true));\n if (!this.initialItemElements.length) {\n throw new Error('Could not find any items');\n }\n\n this.initialItemsWidth = this.containerDirectChildren.reduce(\n (sum, item) => sum + getWidth(item),\n 0,\n );\n }", "* [Symbol.iterator] () {\n yield* this.items;\n }", "*[Symbol.iterator]() {\n let node = this.head;\n while (node) {\n yield node;\n node = node.next;\n }\n }", "[ Symbol.iterator]( ...args){\n\t\t// look at retained state\n\t\tconst iteration= this.state&& this.state[ Symbol.iterator]\n\t\tif( iteration){\n\t\t\t// & iterate through it all\n\t\t\treturn iteration.call( this.state, ...args)\n\t\t}\n\t}", "function reflowContent() {\n\t\t\t}", "GetEnumerator() {}", "[Symbol.iterator]() {\n this._update();\n return this._list[Symbol.iterator]();\n }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "preprocess () {\n let items = []\n if (this.lokiQuery) {\n items = this.overpass.db.find(this.lokiQuery)\n }\n\n for (let i = 0; i < items.length; i++) {\n if (this.options.limit && this.count >= this.options.limit) {\n this.loadFinish = true\n return\n }\n\n const id = items[i].id\n\n if (!(id in this.overpass.cacheElements)) {\n continue\n }\n const ob = this.overpass.cacheElements[id]\n\n if (id in this.doneFeatures) {\n continue\n }\n\n // maybe we need an additional check\n if (this.lokiQueryNeedMatch && !this.filterQuery.match(ob)) {\n continue\n }\n\n // also check the object directly if it intersects the bbox - if possible\n if (ob.intersects(this.bounds) < 2) {\n continue\n }\n\n if ((this.options.properties & ob.properties) === this.options.properties) {\n this.receiveObject(ob)\n this.featureCallback(null, ob)\n }\n }\n\n if (this.options.limit && this.count >= this.options.limit) {\n this.loadFinish = true\n }\n }", "GetEnumerator() {\n\n }", "set _physicalStart(val){val=val%this._physicalCount;if(val<0){val=this._physicalCount+val;}if(this.grid){val=val-val%this._itemsPerRow;}this._physicalStartVal=val;}", "set _physicalStart(val){val=val%this._physicalCount;if(0>val){val=this._physicalCount+val}if(this.grid){val=val-val%this._itemsPerRow}this._physicalStartVal=val}", "async function forEach(iterator, visitor) {\n // eslint-disable-next-line\n while (true) {\n const {done, value} = await iterator.next();\n if (done) {\n iterator.return();\n return;\n }\n const cancel = visitor(value);\n if (cancel) {\n return;\n }\n }\n}", "async function forEach(iterator, visitor) {\n // eslint-disable-next-line\n while (true) {\n const {done, value} = await iterator.next();\n if (done) {\n iterator.return();\n return;\n }\n const cancel = visitor(value);\n if (cancel) {\n return;\n }\n }\n}", "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "_reset() {\n if (this.isDirty) {\n let record;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n record.previousIndex = record.currentIndex;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n }", "*[Symbol.iterator]() {\n let node = this.head;\n\n while(node) {\n yield node;\n node = node.next;\n }\n }", "iterate () {\n for (let i = 0; i < this.axiom.length; i++) {\n this.step();\n }\n }", "getIterator() {\n MxI.$raiseNotImplementedError(ICollection, this);\n }", "function Iterable() {}", "function StaggeredIterator(interval, batch, kontinue, step_actions, batch_actions, flag_obj) {\n // The amount of time to wait before proceeding after a\n // step or batch.\n this.interval = (interval != null && interval > 0) ? interval : 1;\n \n // The number of continuations to process before waiting\n // for an interval (specified above).\n this.batch = (batch != null && batch > 0) ? batch : 1;\n \n // Counter to keep track of progress through the current\n // batch.\n this.counter = 0;\n \n // The first continuation to evaluate.\n this.first = kontinue;\n \n // Procedure to execute every time a step is made\n // (including the last step in a batch).\n this.step_actions = step_actions;\n \n // Procedure to execute only every time a batch is finished.\n this.batch_actions = batch_actions;\n \n // Reference to a flag; processing will only continue\n // as long as the value of \"this.flag_obj.status\" is \"true\"\n // (or the reference \"flag_obj\" is \"null\").\n this.flag_obj = flag_obj;\n}", "preorder() {\n throw new Error(\"This method hasn't been implemented yet!\");\n }", "function smart_iterator(scope, props) {\n var // Scope for the iterator to run through.\n _scope = scope,\n // The properties that are enumerable of the scope.\n _props = props,\n // The instance being created.\n me = this,\n // The current property the iterator is on.\n _i = 0,\n // The amount of properties there are.\n _l = props.length,\n // A multiplier to make the iterator go in reverse.\n _r = 1,\n // Variable used to determine how much a shift should be.\n _delta = 1;\n // Used to convert the iterator into its indexed value.\n _defineProperty(me, 'valueOf', {value:function(){return _i}});\n // Used to allow access to the current scope of the iterator.\n _defineProperty(me, 'scope', {get: function(){return _scope}});\n // Returns the current property the iterator is pointing or returns nullptr.\n _defineProperty(me, 'prop', {get:function(){return 0 <= _i && _i < _l ? _props[_i] : iter.nullptr}});\n // Property that returns itself. Will return nullptr if out of bounds.\n // Also can be used to set the current index if the new value is a number.\n _defineProperty(me, 'me', {\n get: function(){ return 0 <= _i && _i < _l ? me : iter.nullptr },\n set: function(v){if(!isNaN(v = +v)) _i = v }\n });\n // Dereferences the iterator to get what it is pointing to.\n _defineProperty(me, '$', {\n get: function(){return _scope[_props[_i]]},\n set: function(v){_scope[_props[_i]] = v}\n });\n // Moves the iterator to the first property and returns itself.\n _defineProperty(me, 'first', {\n get: function() {\n _i = 0;\n return me;\n }\n });\n // Moves the iterator to the last property and returns itself.\n _defineProperty(me, 'last', {\n get: function() {\n _i = _l - 1;\n return me;\n }\n });\n // Moves the iterator up one then returns itself.\n _defineProperty(me, 'next', {\n get: function() {\n _i += _r * _delta;\n return me;\n }\n });\n // Moves the iterator down one then returns itself.\n _defineProperty(me, 'prev', {\n get: function() {\n _i -= _r * _delta;\n return me;\n }\n });\n // Checks to see if can loop.\n _defineProperty(me, 'canloop', {\n get: function() { return _i*_i <= _i*(_l - 1) }\n });\n // Goes to the next property and returns whether or not is still in range.\n _defineProperty(me, 'loopnext', {\n get: function() {\n return (_i += _r * _delta) < _l;\n }\n });\n // Goes to the next property and returns whether or not is still in range.\n _defineProperty(me, 'loopprev', {\n get: function() {\n return (_i -= _r * _delta) >= 0;\n }\n });\n // Reverses the iterator.\n _defineProperty(me, 'rev', {\n get: function() {\n // Flips the multiplier.\n _r *= -1;\n // Returns self for method chaining.\n return me;\n }\n });\n // Reverses the iterator by setting the value or checking to see if in reverse.\n _defineProperty(me, 'reverse', {\n get: function() { return function reverse(v) {\n // If no value is provided check to see if going in reverse.\n if(v === undefined) return _r == -1;\n // Else take the sign of the value.\n _r = (!!v * -2) + 1;\n // Then return self for method chaining.\n return me;\n }},\n set: function(v) { me.reverse(v) }\n });\n // Sets the _delta then returns itself or returns the _delta value.\n _defineProperty(me, 'delta', {\n get: function() { return function delta(v) {\n // If no value is provided return the _delta.\n if(isNaN(v = +v)) return _delta;\n // Make the multiplier the correct value.\n me.reverse = v;\n // Else make the delta the value.\n // Then make _delta positive.\n // Can multiply by _r because _r is the sign of v.\n _delta = _r * v;\n // Then return self for method chaining.\n return me;\n }},\n set: function(v) { me.delta(v) }\n });\n // Sets the iterators current position to the value given then returns itself.\n _defineProperty(me, 'shiftTo', {\n get: function() { return function shiftTo(v) {\n // If a number shift to that number.\n if(!isNaN(v = +v)) _i = v;\n // Returns self for method chaining.\n return me;\n }},\n set: function (v) { me.shiftTo(v) }\n })\n // Updates the _props.\n _defineProperty(me, 'update', {\n get: function() {\n // Updates the _props and _l.\n _l = (_props = _keys(_scope)).length;\n // Returns self for method chaining.\n return me;\n }\n });\n // Removes the current property from the scope.\n _defineProperty(me, 'remove', {\n get: function() {\n // Attempts to remove the memory.\n delete _scope[_props[_i]];\n // Removes the property from the _props.\n _props.splice(_i, 1);\n // Returns self for method chaining.\n return me;\n }\n });\n // Removes the last property from the scope.\n _defineProperty(me, 'pop', {\n get: function() {\n // Attempts to remove the memory.\n delete _scope[_props[_l - 1]];\n // Removes the property from the _props.\n _props.splice(_l - 1, 1);\n // Returns self for method chaining.\n return me;\n }\n });\n // Since inserting into the scope as a property would involve\n // rebuilding the object, the only way to add attributes is to\n // push onto the end.\n _defineProperty(me, 'push', {\n get: function() { return function push(prop, v) {\n // Make sure it is not an update.\n if(prop !== undefined) \n // Make prop a string then create the property.\n _scope[(prop += '')] = v;\n // Always have to do an update to prevent from adding on the same prop.\n me.update;\n // Returns self for method chaining.\n return me;\n }}\n });\n}", "next() {}", "iterate() {\n if ( this.isDone() ) return;\n\n // Mark the beginning of the current log.\n this.log.beginProcess();\n\n // Get a male who still has a female to propose to.\n // Get a female who is on the top of the list of the male\n // and has not rejected the male as well.\n let male = this.single[0];\n let female = this.female[male.getNonRejectedPreferenceIndex()];\n\n // In case a male has proposed to all possible females\n // and have been rejected by all (somehow), then add him\n // to the nosolution array.\n if (male.rejects.length == this.female.length) {\n this.nosolution.push( this.single.shift() );\n return;\n }\n\n this.log.addProcess('prepare', { male, female });\n\n // If the male and female are both free,\n if (female.partner == null) {\n // engage them. This will remove the male from\n // the single list.\n this.engage(male, female);\n this.single.shift();\n this.log.addProcess('engage', { male, female });\n // Otherwise if the female has a partner,\n } else if (female.partner) {\n let currentPartner = female.partner;\n // check if the female prefers the new male over her\n // current partner.\n if (female.changePartnerFor(male)) {\n // If this male is preferred,\n // then the current partner will \n // be dumped \n currentPartner.addRejection(currentPartner.partner);\n currentPartner.partner = null;\n this.single.push(this.male[this.getIndexByName(currentPartner.name)]);\n\n // and the new male will become\n // the new partner.\n this.engage(male, female);\n this.single.shift();\n // Male in break refers to the new partner of this female.\n this.log.addProcess('break', { male, female, dumped: currentPartner });\n } else {\n // Otherwise the new male is rejected completely by the female.\n male.addRejection(female);\n // male in reject refers to the rejected male of the female.\n this.log.addProcess('reject', { male, female });\n }\n }\n\n this.log.addProcess('done', { male, female });\n\n // Mark the end of the log\n this.log.endProcess();\n\n }", "static of(){\n if( arguments.length == 0 )\n return FlowFactory.getFlow([]);\n\n if( arguments.length > 1 )\n return FlowFactory.getFlow(arguments);\n\n if( arguments.length == 1 && Util.isNumber(arguments[0]) )\n return new IteratorFlow(FlowFactory.createIteratorWithEmptyArraysFromNumber(arguments[0]));\n\n return FlowFactory.getFlow(arguments[0]);\n }", "function FilteredMenuIterator(filteredMenu) {\n this.index = 0;\n this.next = function () {\n const item = filteredMenu.index(this.index);\n if (typeof item === \"undefined\") {\n return {done: true};\n } else {\n this.index++;\n return {done: false, value: item};\n }\n };\n}", "*[Symbol.iterator]() {\n let pointer = this.head\n while (pointer) {\n yield pointer\n pointer = pointer.next\n }\n }", "traverseNextQuestion() {\r\n this.curr = this.curr.next;\r\n }", "Next() {}", "function cautiousNext() {\n depth++;\n if (depth > 100) {\n depth = 0;\n setImmediate(next);\n } else {\n next();\n }\n }", "next () {\n if (this._items.length < 2 || this._isMoving || document.hidden || !this._isOnScreen()) {\n return\n }\n\n var currentIndex = this._items.indexOf(this._current);\n var nextIndex = this._items[currentIndex + 1] !== undefined \n ? currentIndex + 1 : 0;\n var remaining = this._items.length - currentIndex;\n\n if (remaining === this._visible) {\n nextIndex = 0;\n }\n\n this._to(nextIndex);\n }", "[Symbol.iterator]() {\n let index = -1;\n let keys = Object.keys(this.forecasts);\n return {\n next: () => ({\n value: this.forecasts[keys[++index]], done: !(index in keys)\n })\n };\n }", "runBurnAlgorithm(){\n let MAXIMUM = Math.ceil(this.vertices.getLength()/2.0); //conjectured this is the maximum amt of rounds.\n //we want to build up to maximum, so maybe we can find smaller solutions!\n let currMin = Math.ceil(MAXIMUM/2); //minimum rounds desired, use integers, start at half the maximum and work up.\n let INCREMENT_ROUNDS = 1; //increment for currMin.\n let done = false;\n\n\n let shapes;\n\n while(!done){ //to run multiple iterations of the alg\n let vertQueue = new LinkedList();\n let visited = new Array(); //keep track of visited vertices\n let randomVertCount = Math.floor(random() * (this.vertices.getLength())) + 1; //grab a random starting point, account for +1 when using random.\n let numCenters = 0;\n let currRound = 0; //0 is round 1, this represents depth\n let maxDepth = 2*currMin-2; //defined in the paper\n let numNeighbors = 0; //vertices left at current depth\n let numNeighborsNext = 0; //vertices at next depth\n shapes = this.vertices.iterator();\n\n console.log(\"trying with min \" + currMin +\".\\n\"); //for viewing purposes\n\n while(!shapes.isEmpty()){ //reset everything\n shapes.currItem().resetBurnedHistory(this.vertices.getLength());\n shapes.next();\n }\n\n for(let i = 0; i < this.vertices.getLength(); i++){ //reset visited\n visited.push(false);\n }\n\n shapes = this.vertices.iterator();\n\n //find a random vert\n let count = 0;\n let randomVert;\n while(count < randomVertCount){ //linear search pretty much\n randomVert = shapes.currItem();\n shapes.next();\n count++;\n }\n\n vertQueue.addEnd(new VertexItem(randomVert)); //add to queue\n numNeighbors++; //one neighbor to go through\n numCenters++;\n\n //now follow the algorithm\n while(!vertQueue.isEmpty() && numCenters < currMin && !done){\n let currVert = vertQueue.pop();\n console.log(\"Visiting Vertex \" + currVert.getNumber() + \".\\n\");\n\n if(!visited[currVert.getNumber()-1]){\n numNeighbors--; //we checked one vert of the current depth\n currVert.setBurned(currRound);\n }\n\n let neighbors = currVert.getNeighbors(); //this is an iterator\n\n while(!neighbors.isEmpty() && currRound < maxDepth && !visited[currVert.getNumber()-1]){\n let neighborVert = neighbors.currItem();\n \n\n if(!visited[neighborVert.getNumber()-1]){ //not already visited\n vertQueue.addEnd(new VertexItem(neighborVert));\n numNeighborsNext++;\n }\n\n neighbors.next();\n }\n\n visited[currVert.getNumber()-1] = true;\n\n //check if going to the next depth\n if(!vertQueue.isEmpty() && numNeighbors <= 0){\n numNeighbors = numNeighborsNext;\n numNeighborsNext = 0; //reset\n currRound++;\n }\n\n //check if done\n done = this.verticesBurned(visited);\n\n //do we need to find a random vert?\n if(vertQueue.isEmpty() & !done){ //this is fast, no worries\n\n do{\n shapes = this.vertices.iterator();\n randomVertCount = Math.floor(random() * (this.vertices.getLength())) + 1; //grab a random starting point\n //find a random vert\n count = 0;\n while(count < randomVertCount){\n randomVert = shapes.currItem();\n shapes.next();\n count++;\n }\n } while(visited[randomVert.getNumber()-1] && !this.verticesBurned(visited)); //redo if already visited\n\n\n //adjust to the proper round, which is based off of numCenters\n currRound = numCenters; //no +1 since the next center hasn't been added yet! This should be the correct round\n\n vertQueue.addEnd(new VertexItem(randomVert)); //add to queue\n numCenters++; //adding a center\n }\n\n }\n\n //once we've reached here, we are done the BFS, but have we found a sequence?\n\n if(numCenters >= currMin){ //this is a Bad-Guess, retry with higher minumum\n currMin += INCREMENT_ROUNDS;\n done = false; //re do all of it\n }\n else{\n done = true;\n }\n }\n }", "* [Symbol.iterator]() {\n for (let node = this.first, position = 0;\n node;\n position += 1, node = node.next) {\n yield { node, position };\n }\n }" ]
[ "0.6228786", "0.57286453", "0.57180357", "0.5533352", "0.54622626", "0.54398274", "0.53323853", "0.5311075", "0.52953213", "0.52953213", "0.5273414", "0.5252151", "0.5244799", "0.5223933", "0.5223933", "0.5207388", "0.5204728", "0.5200674", "0.51508933", "0.514868", "0.51450104", "0.51428014", "0.5139231", "0.5132182", "0.51214164", "0.51151043", "0.5102543", "0.50946856", "0.50881284", "0.50881284", "0.5050485", "0.5050485", "0.5007028", "0.5004068", "0.50024575", "0.49951157", "0.49933094", "0.49929222", "0.49856943", "0.49756095", "0.4968469", "0.4964664", "0.4960892", "0.4959526", "0.4951526", "0.4941685", "0.4941685", "0.494127", "0.49393117", "0.49393117", "0.49342957", "0.49342957", "0.49342957", "0.49236733", "0.49236733", "0.49236733", "0.49236733", "0.49236733", "0.4921442", "0.4905448", "0.4904294", "0.4899419", "0.48976105", "0.48956424", "0.48950738", "0.4885517", "0.48777378", "0.4876004", "0.4876004", "0.48747554", "0.4867383", "0.48660108", "0.48513374", "0.48442814", "0.48442814", "0.4840679", "0.48403284", "0.48403284", "0.48403284", "0.48403284", "0.48403284", "0.48403284", "0.4836365", "0.4830397", "0.4827633", "0.48240042", "0.48229164", "0.48178473", "0.48166496", "0.48146158", "0.48134756", "0.4806651", "0.4800422", "0.4797975", "0.47948968", "0.47842672", "0.47779056", "0.47774258", "0.47753298", "0.47693825", "0.4754807" ]
0.0
-1
This method subscribes a Flow (IteratorFlow) to a Streamer to listen for data changes This method is placed outside the class to prevent external access
function subscribeToStream(streamer, flow){ var func = function(data){ setTimeout(() => flow._prePush(data, streamer), 0); }; streamer.subscribe(func); flow.subscribers[streamer.key] = func; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "_emitChange() {\n // Must create array copy so React may detect changes\n const payload = this.queue.map(info => {\n const { stream, ...metaInfo } = info;\n return { ...metaInfo }\n });\n this.onQueueChange(payload);\n }", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\n if( !this.isDiscretized ) {\n while(true) {\n if (!this.isListening || this.pos >= this.iterators.length)\n break;\n //get the data from the current iterator\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done)\n break;\n\n this.push(obj.value);\n }\n }\n else{//for discretized flows\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n do{\n obj = this.iterators[this.pos].next();\n while( !obj.done ){\n this.streamElements.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( this.streamElements.length > 0 ){\n while(true) {\n this.streamElements.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n break;\n }\n }\n }\n\n this.pos++;\n }while( this.pos < this.iterators.length );\n }\n else{\n var ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n var justEnded = false;\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n ended.push(false);\n }\n\n do{\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n justEnded = true;\n this.push(this.streamElements.slice());\n this.streamElements = [];\n\n //check if all items have ended\n if( Flow.from(ended).allMatch((input) => input) )\n break;\n }\n else\n justEnded = false;\n }while(true);\n }\n }\n\n this.isListening = false; //we done processing so stop listening\n this.pos = 0; //reset the pos for other operations\n }", "_setData(d) {\n if (!(d instanceof SplitStreamInputData || d instanceof SplitStreamFilter))\n console.error(\n 'Added data is not an instance of SplitStreamData or SplitStreamFilter'\n );\n\n this._datasetsLoaded++;\n this._data = d.data;\n this._update();\n }", "_updateChangeSubscription() {\n // Sorting and/or pagination should be watched if MatSort and/or MatPaginator are provided.\n // The events should emit whenever the component emits a change or initializes, or if no\n // component is provided, a stream with just a null event should be provided.\n // The `sortChange` and `pageChange` acts as a signal to the combineLatests below so that the\n // pipeline can progress to the next step. Note that the value from these streams are not used,\n // they purely act as a signal to progress in the pipeline.\n const sortChange = this._sort ?\n Object(rxjs__WEBPACK_IMPORTED_MODULE_5__[\"merge\"])(this._sort.sortChange, this._sort.initialized) :\n Object(rxjs__WEBPACK_IMPORTED_MODULE_5__[\"of\"])(null);\n const pageChange = this._paginator ?\n Object(rxjs__WEBPACK_IMPORTED_MODULE_5__[\"merge\"])(this._paginator.page, this._internalPageChanges, this._paginator.initialized) :\n Object(rxjs__WEBPACK_IMPORTED_MODULE_5__[\"of\"])(null);\n const dataStream = this._data;\n // Watch for base data or filter changes to provide a filtered set of data.\n const filteredData = Object(rxjs__WEBPACK_IMPORTED_MODULE_5__[\"combineLatest\"])([dataStream, this._filter])\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(([data]) => this._filterData(data)));\n // Watch for filtered data or sort changes to provide an ordered set of data.\n const orderedData = Object(rxjs__WEBPACK_IMPORTED_MODULE_5__[\"combineLatest\"])([filteredData, sortChange])\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(([data]) => this._orderData(data)));\n // Watch for ordered data or page changes to provide a paged set of data.\n const paginatedData = Object(rxjs__WEBPACK_IMPORTED_MODULE_5__[\"combineLatest\"])([orderedData, pageChange])\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(([data]) => this._pageData(data)));\n // Watched for paged data changes and send the result to the table to render.\n this._renderChangesSubscription.unsubscribe();\n this._renderChangesSubscription = paginatedData.subscribe(data => this._renderData.next(data));\n }", "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "_observeRenderChanges() {\n // If no data source has been set, there is nothing to observe for changes.\n if (!this.dataSource) {\n return;\n }\n let dataStream;\n if (Object(_angular_cdk_collections__WEBPACK_IMPORTED_MODULE_2__[\"isDataSource\"])(this.dataSource)) {\n dataStream = this.dataSource.connect(this);\n }\n else if (Object(rxjs__WEBPACK_IMPORTED_MODULE_6__[\"isObservable\"])(this.dataSource)) {\n dataStream = this.dataSource;\n }\n else if (Array.isArray(this.dataSource)) {\n dataStream = Object(rxjs__WEBPACK_IMPORTED_MODULE_6__[\"of\"])(this.dataSource);\n }\n if (dataStream === undefined && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownDataSourceError();\n }\n this._renderChangeSubscription = dataStream.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_7__[\"takeUntil\"])(this._onDestroy))\n .subscribe(data => {\n this._data = data || [];\n this.renderRows();\n });\n }", "observeRenderChanges() {\n let dataStream;\n // Cannot use `instanceof DataSource` since the data source could be a literal with\n // `connect` function and may not extends DataSource.\n // tslint:disable-next-line:no-unbound-method\n if (typeof this._dataSource.connect === 'function') {\n dataStream = this._dataSource.connect(this);\n }\n else if (this._dataSource instanceof Observable) {\n dataStream = this._dataSource;\n }\n else if (Array.isArray(this._dataSource)) {\n dataStream = of(this._dataSource);\n }\n if (dataStream) {\n this.dataSubscription = dataStream\n .pipe(takeUntil(this.onDestroy))\n .subscribe((data) => this.renderNodeChanges(data));\n }\n else {\n throw getTreeNoValidDataSourceError();\n }\n }", "function emitData() {\n // While there are `data` listeners and items, emit them\n var item;\n while (this._hasListeners('data') && (item = this.read()) !== null)\n this.emit('data', item);\n // Stop draining the source if there are no more `data` listeners\n if (!this._hasListeners('data') && !this.done) {\n this.removeListener('readable', emitData);\n this._addSingleListener('newListener', waitForDataListener);\n }\n}", "function DataEmitter() {\n}", "updatedRecipeEmitter() {\n this.recipesChanged.next([...this.recipes]);\n this.recipeCount.next(this.recipes.length);\n }", "async _listenToUpdates() {\n this._dbUpdatesIterator = this._changes({\n feed: 'continuous',\n heartbeat: true,\n since: this._lastSeq ? this._lastSeq : undefined\n\n // Note: we no longer use the sieve view as views on the _global_changes database appear to be\n // flaky when there is a significant amount of activity. Specifically, changes will never be\n // reported by the _changes feed and this will result in replicators and change-listeners\n // never being dirted. This becomes clear when running the stress tests with 1,000\n // replicators.\n //\n // TODO: remove the sieve view?\n //\n // filter: '_view',\n // view: this._spiegel._namespace + 'sieve/sieve'\n })\n\n this._listenToIteratorErrors(this._dbUpdatesIterator)\n\n await this._dbUpdatesIteratorEach()\n }", "function Stream() {\n EventEmitter.call(this);\n }", "function streaming(src) {\n\t var view = this,\n\t ds = this._model.data(src);\n\t if (!ds) return log.error('Data source \"'+src+'\" is not defined.');\n\n\t var listener = ds.pipeline()[0],\n\t streamer = this._streamer,\n\t api = {};\n\n\t // If we have it stashed, don't create a new closure.\n\t if (this._api[src]) return this._api[src];\n\n\t api.insert = function(vals) {\n\t ds.insert(dl.duplicate(vals)); // Don't pollute the environment\n\t streamer.addListener(listener);\n\t view._changeset.data[src] = 1;\n\t return api;\n\t };\n\n\t api.update = function() {\n\t streamer.addListener(listener);\n\t view._changeset.data[src] = 1;\n\t return (ds.update.apply(ds, arguments), api);\n\t };\n\n\t api.remove = function() {\n\t streamer.addListener(listener);\n\t view._changeset.data[src] = 1;\n\t return (ds.remove.apply(ds, arguments), api);\n\t };\n\n\t api.values = function() { return ds.values(); };\n\n\t return (this._api[src] = api);\n\t}", "constructor (initialState = {}) {\n this.emitter = new EventEmitter()\n this.updates = new Map()\n this.observers = new Map()\n this.applicators = new Map()\n this.current = initialState\n\n /**\n * Creates a held source stream that holds application state.\n * Held streams output the last value on subscription.\n */\n this.source = hold(\n fromEvent(eventKey, this.emitter)\n .scan((state, event) => {\n /**\n * Actions that request state changes are passed in to the stream with\n * side effects happening within the execution of update functions\n */\n return fold(this.updates.values(), (state, update) => {\n // Apply applicators to each update\n let up = update\n if (this.applicators.size > 0) {\n for (const apply of this.applicators.values()) {\n up = apply(update)\n }\n }\n\n // Execute the update and return the result to the fold\n return up(state, event)\n }, state)\n }, initialState)\n .tap(state => {\n this.current = state\n })\n )\n\n // @TODO investigate why unsubscribing this sole subscriber\n // causes double events when the next observer comes in.\n // @TODO how to utilise these internally\n this.source.subscribe({\n next: function debug () {},\n error: function debug () {}\n })\n // subscription.unsubscribe()\n }", "subscribe(_parent, _args, _context, _info) {\n const monitor = this.getMonitor({\n liveAbort: e => {\n if (iterator) iterator.throw(e);\n }\n });\n const iterator = makeAsyncIteratorFromMonitor(monitor);\n return iterator;\n }", "function DataStream() {\n\tvar _this = this;\n\t\n\t_this._data = [];\n}", "function DataStream() {\n\tvar _this = this;\n\t\n\t_this._data = [];\n}", "function Stream(){EE.call(this);}", "function Stream(){EE.call(this);}", "function Stream(){EE.call(this);}", "function Stream(){EE.call(this);}", "function Stream() {\n EventEmitter.call(this);\n}", "function Stream() {\n EventEmitter.call(this);\n}", "function SimpleStream(){\n EventHandler.call(this);\n }", "function Stream() {\n EventEmitter.call(this);\n }", "makeStreamData (callback) {\n\t\t// find one of the other users in the team, and add them to the stream\n\t\tsuper.makeStreamData(() => {\n\t\t\tthis.addedUsers = this.getAddedUsers();\n\t\t\tthis.expectedData.stream.$addToSet = this.expectedData.stream.$addToSet || {};\n\t\t\tif (this.addedUsers.length === 1) {\n\t\t\t\t// this tests conversion of single element to an array\n\t\t\t\tconst addedUser = this.addedUsers[0];\n\t\t\t\tthis.data.$addToSet = { memberIds: addedUser.id };\n\t\t\t\tthis.expectedData.stream.$addToSet.memberIds = [addedUser.id];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst addedUserIds = this.addedUsers.map(user => user.id);\n\t\t\t\tthis.data.$addToSet = { memberIds: addedUserIds };\n\t\t\t\tthis.expectedData.stream.$addToSet.memberIds = [...addedUserIds];\n\t\t\t}\n\t\t\tthis.expectedData.stream.$addToSet.memberIds.sort();\n\t\t\tcallback();\n\t\t});\n\t}", "static get observers() {\n return [\n 'handle_input_data_changed(inputData)'\n ]\n }", "function IterableChanges() {}", "function IterableChanges() {}", "function IterableChanges() {}", "function liveStreamCallback(historyData) {\n setHistoryTips();\n updateStats(historyData);\n}", "function streaming(src) {\n var view = this,\n ds = this._model.data(src),\n name = ds.name(),\n listener = ds.pipeline()[0],\n streamer = this._streamer,\n api = {};\n\n // If we have it stashed, don't create a new closure. \n if (this._api[src]) return this._api[src];\n\n api.insert = function(vals) {\n ds.insert(dl.duplicate(vals)); // Don't pollute the environment\n streamer.addListener(listener);\n view._changeset.data[name] = 1;\n return api;\n };\n\n api.update = function() {\n streamer.addListener(listener);\n view._changeset.data[name] = 1;\n return (ds.update.apply(ds, arguments), api);\n };\n\n api.remove = function() {\n streamer.addListener(listener);\n view._changeset.data[name] = 1;\n return (ds.remove.apply(ds, arguments), api);\n };\n\n api.values = function() { return ds.values(); }; \n\n return (this._api[src] = api);\n}", "function IterableChanges(){}", "subscribe() {}", "function streaming(src) {\n var view = this,\n ds = this._model.data(src),\n name = ds.name(),\n listener = ds.pipeline()[0],\n streamer = this._streamer,\n api = {};\n\n // If we have it stashed, don't create a new closure.\n if (this._api[src]) return this._api[src];\n\n api.insert = function(vals) {\n ds.insert(dl.duplicate(vals)); // Don't pollute the environment\n streamer.addListener(listener);\n view._changeset.data[name] = 1;\n return api;\n };\n\n api.update = function() {\n streamer.addListener(listener);\n view._changeset.data[name] = 1;\n return (ds.update.apply(ds, arguments), api);\n };\n\n api.remove = function() {\n streamer.addListener(listener);\n view._changeset.data[name] = 1;\n return (ds.remove.apply(ds, arguments), api);\n };\n\n api.values = function() { return ds.values(); };\n\n return (this._api[src] = api);\n}", "function IterableChanges() { }", "function IterableChanges() { }", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "async function main() {\n const client = await connectToMongodb(uri);\n\n console.log(\"Connected correctly to server\");\n\n const db = client.db();\n\n const collection = db.collection(\"items\");\n\n // await collection.insert({ name: \"apple\", stock: 10 });\n\n // Head\n const changeStream = collection.watch();\n\n // Resume After - Specific ID\n // LIMIT: https://docs.mongodb.com/manual/changeStreams/#resumeafter-for-change-streams\n\n // const lastId = {\n // _data:\n // \"825E359043000000012B022C0100296E5A100427D92284CAC5429CB753A4CA3C7A239946645F696400645E3590437F63FC1F520E0BD50004\"\n // };\n // const changeStream = collection.watch({\n // resumeAfter: lastId\n // });\n\n changeStream.on(\"change\", next => {\n console.log(\"next\", next);\n });\n\n // Iterator\n //const next = await changeStream.next();\n}", "onStreamStart() {\n if (this.onStartTrigger.length > 0) {\n this.onStartTrigger.forEach(trigger => {\n controller.handleData(trigger);\n })\n }\n }", "static createIteratorFromStreamer(streamer){\n return (function(){\n let length = streamer.size();\n let nul = {};\n let pos = 0;\n let item;\n\n return {\n next: function(){\n try {\n if( pos >= length )\n return {done: true};\n item = streamer.get(pos);\n return {value: item == null ? nul : item, done: false};\n }\n finally{\n pos++;\n if( pos > length ){\n pos = 0; //reset for reuse\n //if the underlying data size changed\n length = streamer.size();\n }\n }\n },\n streamer: streamer\n };\n })();\n }", "function IterableChangeRecord() {}", "function IterableChangeRecord() {}", "function IterableChangeRecord() {}", "setNewStream(newStream) {\n this.stream = newStream;\n this.emit(CallFeedEvent.NewStream, this.stream);\n }", "function inputChanged() {\n parseInput(this);\n getDataFromTable();\n }", "function IterableChangeRecord() { }", "function IterableChangeRecord() { }", "function ArrayStream() {\n this.run = function(data) {\n var self = this;\n data.forEach(function(line) {\n self.emit('data', line + '\\n');\n });\n }\n}", "subscribe () {}", "constructor() {\n this.streams = [];\n }", "isStream(){\n return this.iterators.length > 0 && this.iterators[0].streamer && Util.isStreamer(this.iterators[0].streamer);\n }", "setupDataListener(){\n PubSub.subscribe('Items:item-data-loaded',(evt)=>{this.initiliaze(evt.detail)});\n }", "activeStreamsChanged()\n {\n this._updateCompressorSettings();\n }", "function hasPipeDataListeners(stream){var listeners=stream.listeners('data');for(var i=0;i<listeners.length;i++){if(listeners[i].name==='ondata'){return true;}}return false;}", "watchStreamStatus() {\n const tracks = this.stream.getTracks();\n for (let track of tracks) {\n track.onended = this.handleStreamEnd;\n }\n }", "constructor(source, getter, offset, count, options = {}) {\n super({ highWaterMark: options.highWaterMark });\n this.retries = 0;\n this.sourceDataHandler = (data) => {\n if (this.options.doInjectErrorOnce) {\n this.options.doInjectErrorOnce = undefined;\n this.source.pause();\n this.source.removeAllListeners(\"data\");\n this.source.emit(\"end\");\n return;\n }\n // console.log(\n // `Offset: ${this.offset}, Received ${data.length} from internal stream`\n // );\n this.offset += data.length;\n if (this.onProgress) {\n this.onProgress({ loadedBytes: this.offset - this.start });\n }\n if (!this.push(data)) {\n this.source.pause();\n }\n };\n this.sourceErrorOrEndHandler = (err) => {\n if (err && err.name === \"AbortError\") {\n this.destroy(err);\n return;\n }\n // console.log(\n // `Source stream emits end or error, offset: ${\n // this.offset\n // }, dest end : ${this.end}`\n // );\n this.removeSourceEventHandlers();\n if (this.offset - 1 === this.end) {\n this.push(null);\n }\n else if (this.offset <= this.end) {\n // console.log(\n // `retries: ${this.retries}, max retries: ${this.maxRetries}`\n // );\n if (this.retries < this.maxRetryRequests) {\n this.retries += 1;\n this.getter(this.offset)\n .then((newSource) => {\n this.source = newSource;\n this.setSourceEventHandlers();\n return;\n })\n .catch((error) => {\n this.destroy(error);\n });\n }\n else {\n this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));\n }\n }\n else {\n this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`));\n }\n };\n this.getter = getter;\n this.source = source;\n this.start = offset;\n this.offset = offset;\n this.end = offset + count - 1;\n this.maxRetryRequests =\n options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;\n this.onProgress = options.onProgress;\n this.options = options;\n this.setSourceEventHandlers();\n }", "constructor(source, getter, offset, count, options = {}) {\n super({ highWaterMark: options.highWaterMark });\n this.retries = 0;\n this.sourceDataHandler = (data) => {\n if (this.options.doInjectErrorOnce) {\n this.options.doInjectErrorOnce = undefined;\n this.source.pause();\n this.source.removeAllListeners(\"data\");\n this.source.emit(\"end\");\n return;\n }\n // console.log(\n // `Offset: ${this.offset}, Received ${data.length} from internal stream`\n // );\n this.offset += data.length;\n if (this.onProgress) {\n this.onProgress({ loadedBytes: this.offset - this.start });\n }\n if (!this.push(data)) {\n this.source.pause();\n }\n };\n this.sourceErrorOrEndHandler = (err) => {\n if (err && err.name === \"AbortError\") {\n this.destroy(err);\n return;\n }\n // console.log(\n // `Source stream emits end or error, offset: ${\n // this.offset\n // }, dest end : ${this.end}`\n // );\n this.removeSourceEventHandlers();\n if (this.offset - 1 === this.end) {\n this.push(null);\n }\n else if (this.offset <= this.end) {\n // console.log(\n // `retries: ${this.retries}, max retries: ${this.maxRetries}`\n // );\n if (this.retries < this.maxRetryRequests) {\n this.retries += 1;\n this.getter(this.offset)\n .then((newSource) => {\n this.source = newSource;\n this.setSourceEventHandlers();\n return;\n })\n .catch((error) => {\n this.destroy(error);\n });\n }\n else {\n this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));\n }\n }\n else {\n this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`));\n }\n };\n this.getter = getter;\n this.source = source;\n this.start = offset;\n this.offset = offset;\n this.end = offset + count - 1;\n this.maxRetryRequests =\n options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;\n this.onProgress = options.onProgress;\n this.options = options;\n this.setSourceEventHandlers();\n }", "notifyDataChanged() {\n this.hasDataChangesProperty = true;\n this.dataChanged.raiseEvent();\n }", "function onReadableListener() {\n // Mark our flag as \"flowing\" so we know we're processing\n stdinFlowing = true;\n let chunk;\n // Use a loop to make sure we read all available data.\n while ((chunk = process.stdin.read()) !== null) {\n stdin += chunk.toString();\n }\n }", "function dataChanged(uiWidget) {\n getPipeline(uiWidget).trigger('dataChanged');\n }", "function IterableChangeRecord(){}", "function Stream() {\n this.head = new Chunk(this);\n }", "function SetIterator() {}", "newStringStreamListener(onStopCallback) {\n let listener = {\n data: \"\",\n inStream: Cc[\"@mozilla.org/binaryinputstream;1\"].createInstance(\n Ci.nsIBinaryInputStream\n ),\n QueryInterface: ChromeUtils.generateQI([\n \"nsIStreamListener\",\n \"nsIRequestObserver\",\n ]),\n\n onStartRequest(channel) {},\n\n onStopRequest(channel, status) {\n this.inStream = null;\n onStopCallback(this.data);\n },\n };\n\n listener.onDataAvailable = function(req, stream, offset, count) {\n this.inStream.setInputStream(stream);\n this.data += this.inStream.readBytes(count);\n };\n\n return listener;\n }", "subscribe() {\n this.subscriptionID = this.client.subscribe(this.channel, this.onNewData)\n this.currencyCollection.subscribe(this.render)\n this.currencyCollection.subscribe(this.drawInitialSparkLine)\n this.currencyCollection.subscribeToSparkLineEvent(this.drawSparkLine)\n }", "function getData() {\n let beers = [\n {name: \"Sam Adams\", country: \"USA\", price: 8.50},\n {name: \"Bud Light\", country: \"USA\", price: 6.50},\n {name: \"Brooklyn Lager\", country: \"USA\", price: 8.00},\n {name: \"Sapporo\", country: \"Japan\", price: 7.50}\n ];\n\n return Observable.create(observer =>\n {\n let counter = 0;\n beers.forEach(b =>\n {\n observer.next(b);\n counter++;\n\n if (counter > Math.random()*5) {\n observer.error({\n status: 500,\n description: \"Beer stream error\"\n });\n }\n });\n\n // We never got here in case of the error.\n // GOTCHA: In this demo forEach() method in line 17 actually calls next() for every item in \"beers\".\n // Try to comment the line #50 to see this in action.\n observer.complete();\n });\n}", "function Stream() {\n EE.call(this);\n }", "_restartStream(type, resource) {\n const { stream, jsonStream } = resource.restartStream();\n stream.on('close', this._closeHandler(type, resource));\n stream.on('error', this._errorHandler(type, resource));\n\n this.mergedStream = this.mergedStream.merge(Kefir.fromEvents(jsonStream, 'data'));\n this.mergedStream.onValue(this.sender);\n logger.info(`Stream ${type} was recreated`);\n }", "function emitReadable(stream){var state=stream._readableState;debug('emitReadable',state.needReadable,state.emittedReadable);state.needReadable=false;if(!state.emittedReadable){debug('emitReadable',state.flowing);state.emittedReadable=true;process.nextTick(emitReadable_,stream);}}", "feed() {\n log('[watch:feed] feed changed');\n\n // emit a select time index to get video to change if on zero\n if (this.selectedTimeIndex === 0) {\n log('[watch:feed] feed changed - selectedTime is zero, skip 3rd watcher and invoke selectVideo');\n this.selectVideo();\n\n } else {\n log('[watch:feed] selectedTime needs to return to start, invoke 3rd watcher');\n this.selectedTimeIndex = 0; // reset time index when the feed reloads, back to beginning -> 3rd watcher will pick it up\n }\n\n if (this.firstRun && this.feedType == 'replay') this.setURL(); // has to be firstRun - first link is unsharable by design, too complex otherwise\n }", "function Stream() {\n EE.call(this);\n }", "function changeListener(device) {\n // refreshData()\n }", "constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {\n /**\n * An internal event emitter.\n */\n this.emitter = new events.EventEmitter();\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n this.offset = 0;\n /**\n * An internal marker to track whether stream is end.\n */\n this.isStreamEnd = false;\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n this.isError = false;\n /**\n * How many handlers are executing.\n */\n this.executingOutgoingHandlers = 0;\n /**\n * How many buffers have been allocated.\n */\n this.numBuffers = 0;\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n this.unresolvedDataArray = [];\n /**\n * How much data consisted in unresolvedDataArray.\n */\n this.unresolvedLength = 0;\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n this.incoming = [];\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n this.outgoing = [];\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }", "constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {\n /**\n * An internal event emitter.\n */\n this.emitter = new events.EventEmitter();\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n this.offset = 0;\n /**\n * An internal marker to track whether stream is end.\n */\n this.isStreamEnd = false;\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n this.isError = false;\n /**\n * How many handlers are executing.\n */\n this.executingOutgoingHandlers = 0;\n /**\n * How many buffers have been allocated.\n */\n this.numBuffers = 0;\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n this.unresolvedDataArray = [];\n /**\n * How much data consisted in unresolvedDataArray.\n */\n this.unresolvedLength = 0;\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n this.incoming = [];\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n this.outgoing = [];\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }", "relay(stream, streamName) {\n var that = this;\n stream.forEach((value) =>\n that.push(streamName, value)\n );\n }", "emitFilterChanged(caller) {\n if (caller === EmitterType.remote && this._gridOptions && this._gridOptions.backendServiceApi) {\n let currentFilters = [];\n const backendService = this._gridOptions.backendServiceApi.service;\n if (backendService && backendService.getCurrentFilters) {\n currentFilters = backendService.getCurrentFilters();\n }\n this.onFilterChanged.next(currentFilters);\n }\n else if (caller === EmitterType.local) {\n this.onFilterChanged.next(this.getCurrentLocalFilters());\n }\n }", "function _updateStreamList() {\n var streams = playback.createFilteredVideoStreamList(),\n streamsLength = streams.length;\n CadmiumMediaStreams$addMethodsToArray(streams);\n for (var i = 0; i < streamsLength; i++) {\n streams[i].lower = streams[i - 1];\n streams[i].higher = streams[i + 1];\n }\n _videoStreamList = streams;\n }", "connect() {\n // Combine everything that affects the rendered data into one update\n // stream for the data-table to consume.\n const dataMutations = [\n Object(rxjs__WEBPACK_IMPORTED_MODULE_2__[\"of\"])(this.data),\n this.paginator.page,\n this.sort.sortChange\n ];\n return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__[\"merge\"])(...dataMutations).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__[\"map\"])(() => {\n return this.getPagedData(this.getSortedData([...this.data]));\n }));\n }", "notifyDataChanged() {\r\n this.i.i$i();\r\n }", "_read(size) {\n /*\n console.log(`read called with size ${size}`);\n for (let i = 0; i < this.streams.length; i++) {\n const currentStream = this.streams[i];\n let chunk = currentStream.read();\n if (Buffer.isBuffer(chunk)) {\n chunk = chunk.toString();\n console.log(`chunk for stream ${i}: ${chunk}`);\n }\n }\n */\n /*\n //this[kSource].fetchSomeData(size, (data, encoding) => {\n this.push(Buffer.from(data, encoding));\n console.log(`reading buffer: ${Buffer.from(data, encoding)}`);\n });\n */\n }", "function notifySubscribers() {\n var eventPayload = {\n routeObj: getCurrentRoute(), // { route:, data: }\n fragment: getURLFragment()\n };\n\n _subject.onNext(eventPayload);\n }", "function emitOnDiff(oldData) {\n if (oldData !== data) {\n changeEmitter.emit('change', data);\n }\n }", "merge(data){\n var isStream = this.isStream();\n\n var iterator = FlowFactory.getIterator(data);\n //ensure that we cannot mix streams and static data structures\n if( (!isStream && iterator.streamer)\n || (isStream && !iterator.streamer) )\n throw new Error(\"Streamer cannot be merged with other data types\");\n\n this.iterators.push(iterator);\n\n return this;\n }", "function ChangeTracker(data) {\n Object.defineProperties(this, {\n _pendingListeners: { value: {} },\n _data: { value: data || {}, writable: true }\n });\n EventEmitter.call(this);\n\n ['keyAdded', 'keyRemoved', 'keyUpdated'].forEach((eventName) => {\n this._pendingListeners[eventName] = { };\n this.on(eventName, (path, value) => {\n var handlers = this._pendingListeners[eventName][path] || [];\n handlers.forEach(handler => handler(value) );\n this._pendingListeners[eventName][path] = [];\n });\n });\n}", "function Stream$4() {\n EventEmitter.call(this);\n}", "function publishChange(e) {\n\t\t\t\tsubscriberCallbacks.forEach(function(thisCallback) {\n\t\t\t\t\tthisCallback(e);\n\t\t\t\t});\n\t\t\t}", "function SourceIterator(lines) {\r\n this.input = lines;\r\n this.i = 0;\r\n}", "function Stream(/*optional*/xs, /*optional*/secondArg, /*optional*/mappingHint) {\n /*eslint-enable no-multi-spaces */\n if (xs && _.isStream(xs)) {\n // already a Stream\n return xs;\n }\n\n EventEmitter.call(this);\n var self = this;\n\n // used to detect Highland Streams using isStream(x), this\n // will work even in cases where npm has installed multiple\n // versions, unlike an instanceof check\n self.__HighlandStream__ = true;\n\n self.id = ('' + Math.random()).substr(2, 6);\n this.paused = true;\n this._incoming = [];\n this._outgoing = [];\n this._consumers = [];\n this._observers = [];\n this._destructors = [];\n this._send_events = false;\n this._nil_pushed = false;\n this._delegate = null;\n this._is_observer = false;\n this._in_consume_cb = false;\n this._repeat_resume = false;\n\n // Used by consume() to signal that next() hasn't been called, so resume()\n // shouldn't ask for more data. Backpressure handling is getting fairly\n // complicated, and this is very much a hack to get consume() backpressure\n // to work correctly.\n this._consume_waiting_for_next = false;\n this.source = null;\n\n // Old-style node Stream.pipe() checks for this\n this.writable = true;\n\n self.on('newListener', function (ev) {\n if (ev === 'data') {\n self._send_events = true;\n _.setImmediate(bindContext(self.resume, self));\n }\n else if (ev === 'end') {\n // this property avoids us checking the length of the\n // listners subscribed to each event on each _send() call\n self._send_events = true;\n }\n });\n\n // TODO: write test to cover this removeListener code\n self.on('removeListener', function (ev) {\n if (ev === 'end' || ev === 'data') {\n var end_listeners = self.listeners('end').length;\n var data_listeners = self.listeners('data').length;\n if (end_listeners + data_listeners === 0) {\n // stop emitting events\n self._send_events = false;\n }\n }\n });\n\n if (_.isUndefined(xs)) {\n // nothing else to do\n return this;\n }\n else if (_.isArray(xs)) {\n self._incoming = xs.concat([nil]);\n return this;\n }\n else if (_.isFunction(xs)) {\n this._generator = xs;\n this._generator_push = generatorPush(this);\n this._generator_next = function (s) {\n if (self._nil_pushed) {\n throw new Error('Cannot call next after nil');\n }\n\n if (s) {\n // we MUST pause to get the redirect object into the _incoming\n // buffer otherwise it would be passed directly to _send(),\n // which does not handle StreamRedirect objects!\n var _paused = self.paused;\n if (!_paused) {\n self.pause();\n }\n self.write(new StreamRedirect(s));\n if (!_paused) {\n self._resume(false);\n }\n }\n else {\n self._generator_running = false;\n }\n if (!self.paused) {\n self._resume(false);\n }\n };\n\n return this;\n }\n else if (_.isObject(xs)) {\n // check to see if we have a readable stream\n if (_.isFunction(xs.on) && _.isFunction(xs.pipe)) {\n var onFinish = _.isFunction(secondArg) ? secondArg : defaultReadableOnFinish;\n pipeReadable(xs, onFinish, self);\n return this;\n }\n else if (_.isFunction(xs.then)) {\n //probably a promise\n return promiseStream(xs);\n }\n // must check iterators and iterables in this order\n // because generators are both iterators and iterables:\n // their Symbol.iterator method returns the `this` object\n // and an infinite loop would result otherwise\n else if (_.isFunction(xs.next)) {\n //probably an iterator\n return iteratorStream(xs);\n }\n else if (!_.isUndefined(_global.Symbol) && xs[_global.Symbol.iterator]) {\n //probably an iterable\n return iteratorStream(xs[_global.Symbol.iterator]());\n }\n else {\n throw new Error(\n 'Object was not a stream, promise, iterator or iterable: ' + (typeof xs)\n );\n }\n }\n else if (_.isString(xs)) {\n var mapper = hintMapper(mappingHint);\n\n var callback_func = function () {\n var ctx = mapper.apply(this, arguments);\n self.write(ctx);\n };\n\n secondArg.on(xs, callback_func);\n var removeMethod = secondArg.removeListener // EventEmitter\n || secondArg.unbind; // jQuery\n\n if (removeMethod) {\n this._destructors.push(function() {\n removeMethod.call(secondArg, xs, callback_func);\n });\n }\n\n return this;\n }\n else {\n throw new Error(\n 'Unexpected argument type to Stream(): ' + (typeof xs)\n );\n }\n}", "send(data){\n Flow.from(this.listeners).where(listener => listener.notify && Util.isFunction(listener.notify)).foreach(listener => listener.notify(data));\n Flow.from(this.listeners).where(listener => !(listener.notify && Util.isFunction(listener.notify)) && Util.isFunction(listener)).foreach(listener => listener(data));\n }", "function startStream() {\n streamInterval = setInterval(working, msFrequency);\n}", "function ArrayStream() {\n Stream.call(this);\n\n this.run = function(data) {\n var self = this;\n data.forEach(function(line) {\n self.emit('data', line + '\\n');\n });\n }\n}", "processData(socket, data) {\n\n rideProcess.listen(socket, data);\n\n\n }", "_onRenderedDataChange() {\n if (!this._renderedRange) {\n return;\n }\n this._renderedItems = this._data.slice(this._renderedRange.start, this._renderedRange.end);\n if (!this._differ) {\n // Use a wrapper function for the `trackBy` so any new values are\n // picked up automatically without having to recreate the differ.\n this._differ = this._differs.find(this._renderedItems).create((index, item) => {\n return this.cdkVirtualForTrackBy ? this.cdkVirtualForTrackBy(index, item) : item;\n });\n }\n this._needsUpdate = true;\n }", "function emitter() {\n\tvar i;\n\t// store stringified data\n\t// append new line character so can determine end of JSON object\n\tstringified = JSON.stringify(bobj) + '\\n';\n\t// emit data on every socket connection in eList\n\tfor (i in eList)\n\t\teList[i].write(stringified);\n\t// cleanup\n\tstringified = '';\n\tbobj = {};\n}" ]
[ "0.65513027", "0.5845343", "0.5828928", "0.58125", "0.5673418", "0.56472117", "0.5590598", "0.5556058", "0.5555709", "0.55441004", "0.5483723", "0.5482346", "0.5442747", "0.54296744", "0.5423778", "0.5405285", "0.53719753", "0.53719753", "0.5355241", "0.5355241", "0.5355241", "0.5355241", "0.5354725", "0.5354725", "0.5351682", "0.53435034", "0.5338057", "0.5334628", "0.53325385", "0.53325385", "0.53325385", "0.5292729", "0.52881193", "0.5266353", "0.5261699", "0.525935", "0.5253214", "0.5253214", "0.52518183", "0.52518183", "0.52518183", "0.52518183", "0.52518183", "0.5250491", "0.52400714", "0.52276874", "0.5220491", "0.5220491", "0.5220491", "0.5213808", "0.51963866", "0.51894945", "0.51894945", "0.517551", "0.51731193", "0.5159966", "0.5151767", "0.5149961", "0.5149383", "0.5146896", "0.5141275", "0.5137679", "0.5137679", "0.51368594", "0.5125317", "0.5110049", "0.51028806", "0.5091395", "0.50868654", "0.50826293", "0.5080184", "0.5075808", "0.50715023", "0.5028589", "0.50227076", "0.5009151", "0.50073206", "0.5005679", "0.500168", "0.500168", "0.50009125", "0.49992427", "0.49981767", "0.49894652", "0.4989199", "0.4989139", "0.49851042", "0.49841493", "0.4981825", "0.4974666", "0.49705842", "0.49689937", "0.4959084", "0.49582136", "0.4956124", "0.4952673", "0.49484876", "0.49452668", "0.49410525", "0.49400514" ]
0.5941531
1
we cannot sort in a push
push(input){ this.next !== null ? this.next.push(input) : this.terminalFunc(input); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sort() {\n\t}", "sort() {\n\t}", "function sortData(data)\n\t{\n\t\tfor (let i = 0; i < data.length; i++)\n \t{\n\t \tfor (let j = 0; j < data.length - i - 1; j++)\n\t \t{\n\t \t\tif (+data[j].subCount < +data[j + 1].subCount)\n\t \t\t{\n\t \t\t\tlet tmp = data[j];\n\t \t\t\tdata[j] = data[j + 1];\n\t \t\t\tdata[j + 1] = tmp;\n\t \t\t}\n\t \t}\n \t}\n \treturn data;\n\t}", "function Sort() {}", "sort(){\n\n }", "enqueue(arr) {\n this.collection = this.collection.reverse()\n let found_index = this.collection.findIndex((item) => item[1] <= arr[1])\n if (found_index === -1) {\n this.collection.push(arr)\n } else {\n this.collection.splice(found_index, 0, arr)\n }\n this.collection = this.collection.reverse()\n }", "function insertionSort1(arr,cmp){\n cmp=cmp||compare;\n for(let j=1;j<arr.length;++j){\n let current=arr[j];\n let i;\n for(i=j-1;i>=0&&cmp(arr[i],current)>0;--i){\n arr[i+1]=arr[i];\n }\n arr[i+1]=current;\n }\n return arr;\n}", "sort() {\n if(this.data.length >= 2){\n for (var i = 0; i < this.data.length - 1; i++){\n for (var j = i + 1; j < this.data.length; j++){\n if (this.data[i].users.length < this.data[j].users.length){\n let tmp = this.data[i];\n this.data[i] = this.data[j];\n this.data[j] = tmp;\n \n }\n }\n \n }\n }\n }", "sort() {\n let a = this.array;\n const step = 1;\n let compares = 0;\n for (let i = 0; i < a.length; i++) {\n let tmp = a[i];\n for (var j = i; j >= step; j -= step) {\n this.store(step, i, j, tmp, compares);\n compares++;\n if (a[j - step] > tmp) {\n a[j] = a[j - step];\n this.store(step, i, j, tmp, compares);\n } else {\n break;\n }\n }\n a[j] = tmp;\n this.store(step, i, j, tmp, compares);\n }\n this.array = a;\n }", "function inssort2(A) {\n var temp;\n for (var i = 1; i < A.length; i++) // Insert i'th record\n for (var j = i; (j > 0) && (A[j] < A[j - 1]); j--) {\n temp = A[j]; A[j] = A[j - 1]; A[j - 1] = temp;\n }\n}", "function _lazyInsertionSort (arr) {\n var i = 0,\n currentItem,\n finalArr = [];\n\n if (arr !== undefined && arr.length > 1) {\n finalArr[0] = arr.splice(0, 1)[0];\n while (arr.length > 0) {\n i = 0;\n currentItem = arr.splice(0, 1)[0];\n while (finalArr[i] !== undefined) {\n if (currentItem < finalArr[i]) {\n finalArr.splice(i, 0, currentItem);\n break;\n } else {\n i++;\n }\n }\n if (i === finalArr.length) {\n finalArr.push(currentItem);\n }\n // debug.info(finalArr.toString());\n }\n\n return finalArr;\n }\n }", "function mergeSort(arr) {\n\n}", "function shellSort(arr,comp){\r\n var h = 1;\r\n for(; h < arr.length; h = 3*h+1);\r\n for(; h > 0; h = Math.floor(h / 3)){\r\n for(var i = 0; i < h; i ++){\r\n insertCustom(arr,comp,i,h,arr.length);\r\n }\r\n }\r\n}", "function sortPlaylist() {\n playlistArr = Object.entries(livePlaylist);\n\n if (playlistArr.length > 2) {\n var sorted = false;\n while (!sorted) {\n sorted = true;\n for (var i = 1; i < playlistArr.length - 1; i++) {\n if ((playlistArr[i][1].upvote < playlistArr[i + 1][1].upvote)) {\n sorted = false;\n var temp = playlistArr[i];\n playlistArr[i] = playlistArr[i + 1];\n playlistArr[i + 1] = temp;\n // })\n }\n // playlistArr[i][1].index = i;\n }\n }\n }\n return playlistArr;\n}", "function sort(data){\n console.log('in sort');\n // I really like promises\n return new Promise(function(resolve, reject) {\n var sorted = {};\n //I go through the data to make all the word that are the same together.\n for (var i = 0; i < data.length; i++) {\n // cause it is an object I get the key.\n for(var k in data[i]){\n // the word is new ? or not ?\n if(!sorted[k]){\n // it is ! I initialize it !\n sorted[k]=[1];\n }else {\n // it aint ! well that is one more.\n sorted[k].push(1);\n }\n }\n }\n // have you ever heard about promises ?\n resolve(sorted);\n });\n }", "function _insertionSort (arr) {\n var defer = new $.Deferred();\n\n for (var i = 1; i < arr.length; i++) {\n for (var j = i; j > 0; j--) {\n if (arr[j] < arr[j - 1]) {\n var temp = arr[j];\n arr[j] = arr[j - 1];\n arr[j - 1] = temp;\n }\n };\n // document.write(arr.toString() + '<br>');\n }\n\n defer.resolve(arr);\n return defer.promise();\n }", "function musasSortFunction(array){\n const sortedArray =[];\n//take all array \n array.forEach(element => {\n// for every element check new array\n for (let i = 0; i < array.length; i++) {\n// if array empty, push your element and stop loop\n if(sortedArray.length === 0){ \n sortedArray.push(element);\n break;\n }\n//if element smaller or equal than sortedArray element, put before than it and stop loop\n if(element <=sortedArray[i]){\n// console.log(`${element} smaller than ${sortedArray[i]} ----pushed array`);\n sortedArray.splice(i,0,element);\n break;\n// if you can not find until end of the array, its biggest element. push end of the sortedArray\n }else if(i === sortedArray.length-1){//arayin sonuna gelindi sona ekle\n sortedArray.push(element);\n break;\n }\n }\n });\n // console.log(`SORTED SOLUTION: ${sortedArray} k<<<<<<<<<<<<<`);\n return sortedArray;\n}", "function insertSort(raws){\n\tfor( let i = 0, stop = raws.length; i < stop; i++){\n\t\tfor( let j = i + 1; j < stop; j++){\n\n\t\t\t// flag to run diagnostic mode, off by default\n\t\t\tif (Boolean(process.argv[3]) > 0){console.log(`[${raws[i]}] and [${raws[j]}]`);}\n\n\t\t\tif (raws[j] < raws[i]){\n\t\t\t\tlet c = raws[j];\n\t\t\t\traws[j] = raws[i];\n\t\t\t\traws[i] = c;\n\t\t\t\tif (Boolean(process.argv[3]) > 0){console.log(`--------[${raws[i]}] and [${raws[j]}]`);}\n\t\t\t}\n\t\t} // end J\n\t} // end I\n\treturn raws;\n}", "sort() {\n const ret = [].sort.apply(this, arguments);\n this._registerAtomic('$set', this);\n return ret;\n }", "sort() {\n const ret = [].sort.apply(this, arguments);\n this._registerAtomic('$set', this);\n return ret;\n }", "function sort(arr) {\n return null; \n}", "async function TopologicalSort(){}", "mergeSort(arr, l, r) { \n if (l < r){\n let m = Math.floor(l + (r - l) / 2)\n \n // # Sort first and second halves \n this.mergeSort(arr, l, m); \n this.mergeSort(arr, m + 1, r);\n l = 0 \n tStack.add([...arr])\n this.merge(arr, l, m, r); \n }\n }", "_flush(done) {\n let length = this.sorted.length;\n while (length--) {\n this._push(this.sorted.pop());\n }\n done();\n }", "function insertionSort10(arr) {\n let count = 0;\n for (let i = 0; i < arr.length; i++) {\n if (arr[i + 1] < arr[i]) {\n [arr[i], arr[i + 1]] = [arr[i + 1], arr[i]];\n if (i > 1) {\n for (let j = i + 1; j <= 0; j--) {\n count++;\n if (arr[i] < arr[j]) {\n [arr[j], arr[i]] = [arr[i], arr[j]];\n }\n console.log(\"current array :\", arr);\n }\n }\n }\n }\n console.log(\"Count:\", count);\n return arr;\n}", "sort() {\n let { head } = this;\n\n while (head.hasNext()) {\n let innerHead = this.head;\n\n while (innerHead.hasNext()) {\n if (head.data > innerHead.data && head.data < innerHead.next.data) {\n // inserts\n }\n innerHead = innerHead.next;\n }\n head = head.next;\n }\n }", "Sort() {\n\n }", "function qsortBy(cmp, l){\r\n return foldr(function(a, b){ return insertBy(cmp, a, b) }, emptyListOf(l), l);\r\n}", "itemsToSort() {\n return [];\n }", "function insertSort(arr){\n const {length} = arr;\n for(let i=1;i<length;i++){\n let j = i;\n temp = arr[i];\n while(j>0&&arr[j-1]>temp){\n arr[j] = arr[j-1];\n j--\n }\n arr[j] = temp;\n }\n return arr;\n}", "function insertionSort(arr) {\n for (let i = 1; i < arr.length; i++) {\n if (arr[i] < arr[i - 1]) {\n for (let j = i; j > -1; j--) {\n if (arr[j] < arr[j - 1]) {\n [arr[j - 1], arr[j]] = [arr[j], arr[j - 1]];\n console.log(arr);\n } else {\n break;\n }\n }\n }\n }\n return arr;\n}", "function mergeSorted(arr1, arr2) {\n let result = []\n let i = 0\n let j = 0\n while (arr1.length !=0 && arr2.length !=0) {\n if (arr1[0]<=arr2[0]) {\n result.push(arr1.shift())\n } else {\n result.push(arr2.shift())\n }\n }\n return result.concat(arr1).concat(arr2)\n}", "function shellSort (arr) {\n for (var g = arr.length; g = parseInt(g / 2);) {\n for (var i = g; i < arr.length; i++) {\n var k = arr[i];\n for (var j = i; j >= g && k < arr[j - g]; j -= g) {\n arr[j] = arr[j - g];\n }\n \tarr[j] = k;\n }\n }\n return arr;\n}", "function _shellSort (arr) {\n var increment,\n groupedArr = [],\n defer = new $.Deferred();\n\n if (arr.length > 1) {\n increment = parseInt(arr.length / 2);\n while (increment >= 1) {\n for (var i = 0; i < increment; i++) {\n groupedArr = [];\n groupedArr.length = 0;\n for (var j = 0; j * increment + i< arr.length; j++) {\n groupedArr.push(arr[j * increment + i]);\n };\n groupedArr = _insertionSort(groupedArr);\n for (var j = 0; j < groupedArr.length; j++) {\n arr[j * increment + i] = groupedArr[j];\n };\n };\n\n // document.write(arr.toString() + \"<br>\");\n increment = parseInt(increment / 2);\n }\n }\n\n defer.resolve(arr);\n return defer.promise();\n }", "function sortdisheshightolow(o) {\r\n\tvar swapped=true;\r\n\twhile (swapped==true){\r\n\t\tswapped=false;\r\n\t\tfor (var i= 0; i<o.length-1; i++){\r\n\t\t\tif (o[i].price<o[i+1].price){\r\n\t\t\t\tvar temp = o[i];\r\n\t\t\t\to[i]=o[i+1];\r\n\t\t\t\to[i+1]=temp;\r\n\t\t\t\tswapped=true;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}\r\n\r\n return o;\r\n}", "function insertSort(a, compare) {\n for (var i = 0; i < a.length; i++) {\n var k = a[i];\n var j = void 0;\n\n for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) {\n a[j] = a[j - 1];\n }\n\n a[j] = k;\n }\n\n return a;\n}", "function insertSort(a, compare) {\n for (var i = 0; i < a.length; i++) {\n var k = a[i];\n var j = void 0;\n\n for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) {\n a[j] = a[j - 1];\n }\n\n a[j] = k;\n }\n\n return a;\n}", "sort() {\n const a = this.dict;\n const n = a.length;\n\n if( n < 2 ) { // eslint-disable-line \n } else if( n < 100 ) {\n // insertion sort\n for( let i = 1; i < n; i += 1 ) {\n const item = a[ i ];\n let j = i - 1;\n while( j >= 0 && item[ 0 ] < a[ j ][ 0 ] ) {\n a[ j + 1 ] = a[ j ];\n j -= 1;\n }\n a[ j + 1 ] = item;\n }\n } else {\n /**\n * Bottom-up iterative merge sort\n */\n for( let c = 1; c <= n - 1; c = 2 * c ) {\n for( let l = 0; l < n - 1; l += 2 * c ) {\n const m = l + c - 1;\n const r = Math.min( l + 2 * c - 1, n - 1 );\n if( m > r ) continue;\n merge( a, l, m, r );\n }\n }\n }\n }", "sort() {\n for (let i = 0; i < this.values.length - 1; i++) {\n let min = i;\n for (let j = i + 1; j < this.values.length; j++) {\n if (this.values[j] < this.values[min]) min = j;\n }\n\n this.swap(i, min);\n }\n }", "insertionSort(arr){\n \n var starttime = process.hrtime();\n\n for (let i = 1; i < arr.length; i++) {\n var key = arr[i];\n var j = i-1;\n while(j>=0 && arr[j]>key){\n arr[j+1] = arr[j];\n j--;\n }\n arr[j+1]= key;\n }\n var endtime = process.hrtime();\n var et = this.elapsedTime(starttime, endtime);\n console.log('Elapsed time for Insertion sort is : '+et, 'milisecod');\n return arr;\n }", "sorted(x) {\n super.sorted(0, x);\n }", "function insertSort(items) {\n // start at the beginning of the array\n // placeholder to for items in unsorted list to the right\n var i;\n\n // placeholder for index number of items in the sorted section to the left\n\n var j;\n // move into a loop\n for (i = 0; i < items.length; i++) {\n \n // create a place holder for the item to be sorted during its comparison\n var value = items[i];\n // Starting at the element (items[i - 1])\n // before the current value (value, items[i]),\n // move left through the array (decrementing j)\n // and shift each value to the right\n // (move to items[j + 1]) if it is larger\n // than the current value.\n \n for (j = i - 1; j > -1 && items[j] > value; j--) {\n // Stop when you reach a value which is less than\n // or equal to the current value.\n items[j + 1] = items[j];\n }\n\n }\n \nreturn items;\n}", "function sortTasks(arr) {\n let high = [];\n let normal = [];\n let low = [];\n let done = [];\n arr.forEach((item) => {\n if (item.done === true) done.push(item);\n else if (item.priority === 'high') high.push(item);\n else if (item.priority === 'normal') normal.push(item);\n else if (item.priority === 'low') low.push(item);\n });\n return high.concat(normal,low,done);\n}", "function insertionSort(arr) {\n let sorted = [];\n for (let i = 0; i < arr.length; i += 1) {\n if (i == 0) { // first element from src automatically goes to sorted\n sorted.push(arr[i]);\n } else {\n for (let j = sorted.length - 1; j >= 0; j -= 1) {\n if (arr[i] >= sorted[j]) {\n sorted = sorted.slice(0,j+1).concat(arr[i], sorted.slice(j+1));\n break;\n } else if (j == 0) {\n sorted = [arr[i]].concat(sorted);\n }\n }\n }\n }\n return sorted;\n}", "mergeSort(){\n if(this.length() > 1){\n let mid = traverseIndex(this.length()/2);\n let L = arr.slice(0,mid-1);\n let R = arr.slice(mid);\n\n this.mergeSort(L);\n this.mergeSort(R);\n\n i = j = k = 0;\n\n while( i < ){\n\n }\n }\n }", "function mergeSort(array) {\n\n}", "insertionSort(size) {\n try {\n var arr = [];\n for (let i = 0; i < size; i++) {\n arr[i] = readline.question(\"Enter the elements : \");\n\n }\n for (let i = 1; i < arr.length; i++) {\n var key = arr[i];\n var j = i - 1;\n while (j >= 0 && arr[j] > key) {\n console.log(arr);\n arr[j + 1] = arr[j];\n j--;\n\n }\n arr[j + 1] = key;\n }\n console.log(arr);\n\n }\n catch (error) {\n console.log(error.message);\n\n }\n}", "function insertionSort(arr) {\n \n}", "function insertionSort(m, arr) {\n\tlet i, j, key;\n\tfor (j = 2;j <= m;j++) {\n\t\tkey = arr[j];\n\t\ti = j - 1;\n\t\twhile ((i > 0) && (arr[i] > key)) {\n\t\t\tarr[i + 1] = arr[i];\n\t\t\ti = i - 1;\n\t\t}\n\t\tarr[i + 1] = key;\n\t}\n\treturn arr;\n}", "insert(val) {\n this.values.push(val)\n let currentIndex = this.values.length - 1\n while (currentIndex > 0) {\n let parentIndex = Math.floor((currentIndex - 1)/2)\n if (this.values[parentIndex] < this.values[currentIndex]) {\n [this.values[currentIndex], this.values[parentIndex]] = [this.values[parentIndex], this.values[currentIndex]]\n currentIndex = parentIndex\n } else {\n break\n }\n }\n console.log(this.values)\n }", "_insertionSort() {\n let arr = this.curList.listItems;\n\n for (let i = 1; i < arr.length; i++) {\n let tempObj = arr[i];\n let tempValue = arr[i].sortingOrder;\n let j = i - 1;\n\n while (j >= 0 && tempValue < arr[j].sortingOrder) {\n arr[j + 1] = arr[j];\n j--;\n }\n arr[j + 1] = tempObj;\n }\n\n // Set sorted listItems arr to curList & alter curList in listCollection\n this.curList.listItems = arr;\n this.listCollection[this._findObjectAlgo()] = this.curList;\n\n this._setLocalStorage();\n }", "function insertionSort(arr){\n for(let i = 1; i < arr.length; i++){\n for(let j = i + 1; j >= 0; j--){\n //compare each element with the previous ones\n if(arr[j] < arr[j - 1]){\n let temp = arr[j - 1];\n arr[j - 1] = arr[j];\n arr[j] = temp;\n }\n }\n }\n return arr;\n}", "function _hookInsertSort(hooks) {\n var tmpHook, j, prevHook;\n\n for (var i = 1, len = hooks.length; i < len; i++) {\n tmpHook = hooks[i];\n j = i;\n\n while ((prevHook = hooks[j - 1]) && prevHook.priority > tmpHook.priority) {\n hooks[j] = hooks[j - 1];\n --j;\n }\n\n hooks[j] = tmpHook;\n }\n\n return hooks;\n }", "function sort(arr) {\n var aux = new Array(arr.length);\n mergeSort(arr, aux, 0, arr.length - 1);\n}", "function sortData (data) {\n ...\n}", "function _hookInsertSort( hooks ) {\n var tmpHook, j, prevHook;\n for( var i = 1, len = hooks.length; i < len; i++ ) {\n tmpHook = hooks[ i ];\n j = i;\n while( ( prevHook = hooks[ j - 1 ] ) && prevHook.priority > tmpHook.priority ) {\n hooks[ j ] = hooks[ j - 1 ];\n --j;\n }\n hooks[ j ] = tmpHook;\n }\n\n return hooks;\n }", "function insertionSort(arr) {\n\tfor (let i = 1; i < arr.length; i++) {\n\t\tconst currentItem = arr[i];\n\n\t\tfor (var j = i; j >= 0 && currentItem > arr[j]; j--) {\n\t\t\tarr[j + 1] = arr[j];\n\t\t}\n\n\t\tarr[j] = currentItem;\n\t}\n\n\treturn arr;\n}", "function mergeInsertSort(arr,comp){\r\n // Run insertion sort first\r\n boundedInsertionSort(arr,comp);\r\n \r\n var a1 = arr;\r\n var a2 = new Array(arr.length)\r\n \r\n // w starts at 3 now because it each every 3 element subarray is already sorted.\r\n for(let w = 3; w < arr.length; w *= 2){\r\n for(let lo = 0; lo < arr.length; lo += 2*w){\r\n var hi = lo + w;\r\n if (hi >= arr.length) {\r\n copy(a2, a1, lo, arr.length-1);\r\n break;\r\n }\r\n var top = Math.min(lo + 2*w,arr.length);\r\n merge(a2, a1, lo, hi, top-1, comp);\r\n }\r\n var s = a1;\r\n a1 = a2;\r\n a2 = s;\r\n }\r\n if(a1 !== arr){\r\n copy(arr,a1,0,arr.length-1);\r\n }\r\n}", "sort () {\n this.queue.sort((a, b) => a.priority - b.priority)\n }", "function mergeSortTopDown(arr,comp){\r\n return mergeSortRecurse(arr,comp,0,arr.length-1);\r\n}", "shellsortDynamic() {\n const N = this.dataStore.length;\n let h = 1;\n\n while (h < N/3) {\n h = 3 * h + 1;\n }\n\n while (h >= 1) {\n for (let i = h; i < N; i++) {\n for (let j = i; j >= h && this.dataStore[j] < this.dataStore[j-h]; j -= h) {\n swap(this.dataStore, j, j-h);\n }\n }\n \n h = (h-1)/3;\n }\n }", "function inssortshift2(A) {\n for (var i = 1; i !== A.length; i++) { // Insert i'th record\n var j;\n var temp = A[i];\n for (j = i; (j !== 0) && (temp < A[j - 1]); j--)\n A[j] = A[j-1];\n A[j] = temp;\n }\n}", "getSortedUsers() {\n //clone a new array for users\n let users = [...this.props.users]\n if (this.state.sortDirection === 'asc') {\n users.sort(this.genSortAscendingByField(this.state.sortField))\n } else {\n users.sort(this.genSortDescendingByField(this.state.sortField))\n }\n\n return users\n }", "function InsertionSort(arr){\nfor(let i = 1;i<arr.length;i++){\n\tlet current = arr[i];\n\tfor(var j = i-1;j >= 0 && arr[j] > current;j--){\n\t\tarr[j+1] = arr[j];\n\t}\n\tarr[j+1] = current;\n}\nreturn arr;\n}", "function insertionSort(arr){\n\n for(let i = 1; i < arr.length; i++){\n let currentValue = arr[i];\n let hold = i;\n for(let j = i - 1; j >= 0 && arr[j] > currentValue; j-- ){\n arr[j + 1] = arr[j];\n hold = j\n }\n\n arr[hold] = currentValue;\n }\n return arr;\n}", "function sortdisheslowtohigh(o) {\r\n\tvar swapped=true;\r\n\twhile (swapped==true){\r\n\t\tswapped=false;\r\n\t\tfor (var i= 0; i<o.length-1; i++){\r\n\t\t\tif (o[i].price>o[i+1].price){\r\n\t\t\t\tvar temp = o[i];\r\n\t\t\t\to[i]=o[i+1];\r\n\t\t\t\to[i+1]=temp;\r\n\t\t\t\tswapped=true;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t}\r\n // alert(\"You have to sort the dishes by price!\");\r\n return o;\r\n}", "function insertion_sort(arr) {\r\n var start_time = performance.now();\r\n sorted = arr;\r\n\r\n for(var i = 1;i<sorted.length;i++){\r\n for(var y = 0; y<i; y++){\r\n if(sorted[i] < sorted[y]){\r\n temp = sorted[y];\r\n sorted[y] = arr[i];\r\n arr[i] = temp;\r\n }\r\n }\r\n }\r\n var finish_time = performance.now();\r\n var execution_time = finish_time - start_time;\r\n document.getElementById(\"time_spent\").innerHTML = execution_time;\r\n return sorted;\r\n}", "function sortAlmostSorted(arr, k) {\n\n}", "function bubbleSort(arr,comp){\r\n for(let i = arr.length-1; i > 0; i--){ // The top j elements are sorted after j loops\r\n for(let k = 0; k < i; k++){ // Bubble from 0 to i\r\n if(comp(arr[k],arr[k+1]) > 0){ // If arr[k] > arr[k+1]\r\n [arr[k],arr[k+1]] = [arr[k+1],arr[k]]; // Swap arr[k] and arr[k+1]\r\n }\r\n }\r\n }\r\n}", "function heapSort(arr,comp){\r\n // Turn arr into a heap\r\n heapify(arr,comp);\r\n for(let i = arr.length-1; i > 0; i--){\r\n // The 0th element of a heap is the largest so move it to the top.\r\n [arr[0],arr[i]] = [arr[i],arr[0]];\r\n // The 0th element is no longer the largest; restore the heap property\r\n siftDown(arr,comp,0);\r\n }\r\n}", "function insertionSort(arr){\n let currentVal =0;\n for(let i =1; i<arr.length; i++){\n currentVal = arr[i];\n for(var j=i-1; j>=0&&currentVal<arr[j]; j--){\n arr[j+1] = arr[j]\n }\n arr[j+1] =currentVal;\n\n }\n\n\n return arr;\n}", "function sortCommentsBeforePushing(a,b){\n\t// The primary comments must be added first so that the replies can be added to them. The comments can just be sorted by time of creation. Replies can only be created after the primary comment.\n\treturn Date.parse(a.time)-Date.parse(b.time)\n} // sortCommentsBeforePushing", "function sortEnergy() {\n\n const energyStarter= [\n {name: 'Wind', value: props.program.wind, color: 'skyblue'}, \n {name: 'Solar', value: props.program.solar, color: 'orange'}, \n {name: 'Bio', value: props.program.bio, color: 'limegreen'}, \n {name: 'Hydro', value: props.program.hydro, color: 'dodgerblue'}, \n {name: 'Geo', value: props.program.geo, color: 'orangered'}, \n {name: 'Other', value: props.program.other, color: 'rebeccapurple'}];\n \n let copy = [];\n \n for (let i=0; i<energyStarter.length; i++) {\n if (energyStarter[i].value) {\n //Pushing to the start when it is the first source\n if (copy.length===0) {\n copy.push(energyStarter[i]);\n } else {\n for (let j=0; j<copy.length; j++) {\n if (copy[j].value<energyStarter[i].value) {\n copy.splice(j,0,energyStarter[i]);\n break;\n } else if(j===copy.length-1) {\n copy.push(energyStarter[i]);\n break;\n }\n }\n }\n }\n }\n return copy;\n }", "function insertionSort(arr) {\n for(var i = 1; i < arr.length; i++) {\n var currentVal = arr[i];\n for(var j = i - 1; j >= 0 && arr[j] > currentVal; j--) {\n arr[j+1] = arr[j]\n }\n arr[j+1] = currentVal;\n console.log(arr);\n }\n return arr;\n}", "function sort(arr) {\n \n var newArr;\n \n for (var i = 0; i < arr.length; i++) { // za redjanje od najveceg\n for (var j = i + 1; j < arr.length; j++) {\n if (arr[i] < arr[j]) {\n newArr = arr[i];\n arr[i] = arr[j];\n arr[j] = newArr;\n\n }\n\n } \n \n }\n \n return arr;\n}", "function merge(arr1,arr2, comparator){\n// take two arrays\nif(arr1.length<=0||arr2.length<=0){return console.warn('provide valid array')}\nlet resArr=[], i=0,j=0,end=true;\n\n\ncomparator= comparator!==undefined?comparator:baseCkeck\n//let resComp=comparator!==undefined?comparator(arr1[i],arr2[j]):baseCheck(arr1[i]>arr2[j])\nwhile(end){\n if(i>=arr1.length-1&&j>=arr2.length-1){\n end=false\n }\n if(comparator(arr1[i],arr2[j])<0){\n resArr.push(arr1[i])\n i++\n }\n else if(comparator(arr1[i],arr2[j])>0){\n resArr.push(arr2[j])\n j++\n }\n else if(comparator(arr1[i],arr2[j])===0){\n resArr.push(arr1[i])\n resArr.push(arr2[j])\n i++\n j++\n }\n //end condition\n if(i===arr1.length){\n for(j;j<arr2.length;j++){\n resArr.push(arr2[j])\n end=false\n }\n }else if(j===arr2.length){\n for(i;i<arr1.length;i++){\n resArr.push(arr1[i])\n }\n end=false\n }\n}\nreturn resArr\n}", "function merge_sort(array) {\r\n return merge_aux(array, 0, array.length - 1);\r\n}", "function sortQuick(index1, index2){\r\n if(index2 - index1 > 1){\r\n\tvar pivotIndex = index1;\r\n\tfor(var i=index1+1;i<index2;i++){\r\n\t if(arr[pivotIndex].val >= arr[i].val){\r\n\t\tvar holder = arr[i];\r\n\t\tfor(var j=i;j>pivotIndex;j--){\r\n\t\t arr[j] = arr[j-1];\r\n\t\t}\r\n\t\tarr[pivotIndex] = holder;\r\n\t\tpivotIndex++;\r\n\t }\r\n\t}\r\n\tcallWith_.push([index1, pivotIndex]);\r\n\tcallWith_.push([pivotIndex+1, index2]);\r\n }\r\n}", "function mergeInsertSortOpt(arr,comp){\r\n boundedInsertionSort(arr,comp);\r\n var a1 = arr;\r\n var a2 = new Array(arr.length)\r\n for(var w = 3; w < arr.length; w *= 2){\r\n for(var lo = 0; lo < arr.length; lo += 2*w){\r\n var hi = lo + w;\r\n if (hi >= arr.length) {\r\n copy(a2, a1, lo, arr.length-1);\r\n break;\r\n }\r\n var top = Math.min(lo + 2*w,arr.length);\r\n mergeOpt(a2, a1, lo, hi, top-1, comp);\r\n }\r\n [a1,a2] = [a2,a1];\r\n }\r\n if(a1 !== arr){\r\n copy(arr,a1,0,arr.length-1);\r\n }\r\n}", "function insertionSort(arr) {\n for (let i = 1; i < arr.length; i++) {\n let currentVal = arr[i];\n // condition is in the for loop condition\n for (var j = i - 1; j >= 0 && arr[j] > currentVal; j--) {\n arr[j + 1] = arr[j];\n }\n arr[j + 1] = currentVal;\n }\n return arr;\n}", "function insertionSort(arr) {\n for (let i = 1; i < arr.length; i++) {\n let currentVal = arr[i]\n for (var j = i - 1; j >= 0 && arr[j] > currentVal; j--) {\n arr[j + 1] = arr[j]\n }\n arr[j + 1] = currentVal\n console.log(arr)\n }\n return arr\n}", "enqueue(element) {\n if(this.isEmpty()) {\n this.collection.push(element);\n } else {\n let added = false;\n for(let i=0; i<this.collection.length; i++) {\n if(element[1] < this.collection[i][1]) {\n this.collection.splice(i, 0, element);\n added = true;\n break;\n }\n }\n if(!added) {\n this.collection.push(element);\n }\n }\n }", "sortHipsterArray() {\n // removes any instances of known chains with gross coffee.\n this.hipsterShops(this.coffeeShops().slice()); //copies all objects in the coffeeShops array over to hipsterShops\n // remove instances of the coffee shops that don't belong\n this.hipsterShops.remove(function(shop) {\n return shop.title.includes(\"The Coffee Bean\");\n });\n this.hipsterShops.remove(function(shop) {\n return shop.title.includes(\"Coffee Bean\");\n });\n this.hipsterShops.remove(function(shop) {\n return shop.title.includes(\"Starbuck\");\n });\n this.hipsterShops.remove(function(shop) {\n return shop.title.includes(\"Peet\");\n });\n this.hipsterShops.remove(function(shop) {\n return shop.isChain;\n });\n }", "_orderSort(l, r) {\n return l.order - r.order;\n }", "function insertionSortC(arr){\n\n for(let i = 1; i < arr.length; i++){\n let currentVal = arr[i];\n for(var j = i - 1; j >= 0 && arr[j] > currentVal; j--){\n arr[j + 1] = arr[j];\n }\n arr[j + 1] = currentVal;\n }\n return arr;\n}", "sortBy(arr, compare) {\n let sorted = [];\n sorted = arr.sort(compare);\n return sorted;\n }", "function insertion_sort(array, length){\n\n for(var i = 0; i < length; i++){\n\n var tempArray = array[i];\n var j = i;\n\n while( j > 0 && tempArray < array[ j -1]) {\n \n array[j] = array[j - 1];\n j = j - 1;\n }\n\n array[j] = tempArray;\n }\n\n console.log(array);\n}", "function subSort(arr) {\n // didnt get this one. try again\n}", "function insertSorted(arr, val) {\n arr.push(val);\n var i = arr.length - 1;\n while (i > 0 && arr[i - 1] > val) {\n arr[i] = arr[i - 1];\n i--;\n }\n arr[i] = val;\n}", "function insertionSort(arr){\n // first loop: arr length, start index 1.\n for(let i=1; i<arr.length; i++){\n // second loop: loop backward\n for(let j=i; j>0; j--){\n if(arr[j-1]>arr[j]){\n let temp = arr[j-1];\n arr[j-1] = arr[j];\n arr[j] = temp;\n }\n }\n console.log(arr);\n console.log(\"Finished one loop\");\n }\n return arr;\n}", "function copySorted(arr) {\n return arr.slice().sort();\n}", "function copySorted(arr){\n let a=arr.slice(0);\n return a.sort();\n}", "function sortArr(a, b){\n return a - b ;\n }", "sortedItems() {\n return this.childItems.slice().sort((i1, i2) => {\n return i1.index - i2.index;\n });\n }", "function insertionSort(arr) {\n for (let i = 0; i < arr.length; i++) {\n let val = arr[i];\n for (var j = i - 1; j >= 0 && arr[j] > val; j--) {\n arr[j + 1] = arr[j];\n }\n arr[j + 1] = val;\n }\n return arr;\n}", "function sortingAscend() {\n setSearchData(null)\n let sorted = studentData.sort(function(a, b){\n return b.id - a.id;\n })\n\n setStudentData(sorted)\n console.log(sorted, typeof(sorted))\n }", "enqueue(\n element // Time Complexity O(1)\n ) {\n if (this.isEmpty()) {\n this.list.push(element);\n } else {\n let added = false;\n for (let i = 0; i < this.list.length; i++) {\n if (element[1] < this.list[i][1]) {\n // Checking priorities\n this.list.splice(i, 0, element);\n added = true;\n break;\n }\n }\n if (!added) {\n this.list.push(element);\n }\n }\n }", "async function qwikSort(arr, low, high)\n {\n if (low < high)\n {\n \n // pi is partitioning index, arr[p]\n // is now at right place\n let pi = await partition(arr, low, high);\n \n // Separately sort elements before\n // partition and after partition\n qwikSort(arr, low, pi - 1);\n qwikSort(arr, pi + 1, high);\n }\n \n }", "heapSort(start, length) {\n this.heapify(start, length);\n\n for (let i = length - start; i > 1; i--) {\n this.Writes.swap(start, start + i - 1);\n this.siftDown(1, i - 1, start);\n }\n\n // if(!isMax) {\n // this.Writes.reversal(arr, start, start + length - 1, 1, true, false);\n // }\n}", "sortData() {\n this.data.sort(($val1, $val2 ) => {\n const a = JSON.stringify($val1[this.sortBy]);\n const b = JSON.stringify($val2[this.sortBy]);\n if ( a < b ){\n return -this.sortDir;\n }\n if ( a > b ){\n return this.sortDir;\n }\n return 0;\n });\n }", "function sortItems(arr) {\r\n return arr.sort();\r\n}" ]
[ "0.6692783", "0.6692783", "0.6558604", "0.6537924", "0.6419929", "0.6409419", "0.63682246", "0.6349012", "0.6329023", "0.62746865", "0.62673795", "0.6265736", "0.62430525", "0.6197283", "0.6182318", "0.6180305", "0.6180135", "0.6167526", "0.61529577", "0.61529577", "0.6149281", "0.6142685", "0.61283726", "0.61180604", "0.61179084", "0.6109698", "0.6105476", "0.60944253", "0.6085886", "0.60805464", "0.6079522", "0.60770875", "0.6071611", "0.60701287", "0.604983", "0.6041993", "0.6041993", "0.6038521", "0.6030728", "0.60112095", "0.6008129", "0.60064703", "0.5978959", "0.5972806", "0.5971465", "0.5968855", "0.5958519", "0.5958431", "0.5942052", "0.59407943", "0.5936636", "0.5929605", "0.59274995", "0.59185153", "0.5915558", "0.5908822", "0.5907869", "0.59013355", "0.58781224", "0.5872234", "0.58692306", "0.586314", "0.5861406", "0.585978", "0.5856245", "0.5854877", "0.5850207", "0.58452284", "0.5842683", "0.5840721", "0.58376324", "0.5831951", "0.5830749", "0.5828803", "0.582659", "0.5826014", "0.58258754", "0.5823789", "0.58220893", "0.580378", "0.57930785", "0.5791758", "0.5790252", "0.57883066", "0.57878035", "0.5779007", "0.5770457", "0.5769869", "0.5769189", "0.5768593", "0.57671934", "0.5764735", "0.57629657", "0.5760961", "0.575825", "0.5758238", "0.5755558", "0.5751273", "0.5747312", "0.57455766", "0.57452875" ]
0.0
-1
This method receives streams of data from the Streamer subscription
notify(data){ this.push(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sub(streams){\n this.socket.on('open',async ()=>{\n await this.checkGrantAccessAndQuerySessionInfo()\n this.subRequest(streams, this.authToken, this.sessionId)\n this.socket.on('message', (data)=>{\n // log stream data to file or console here\n // console.log(JSON.parse(data))\n // console.log(this.data.length)\n this.data.push(JSON.parse(data))\n })\n })\n }", "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "function subscribeToStream(streamer, flow){\n var func = function(data){\n setTimeout(() => flow._prePush(data, streamer), 0);\n };\n\n streamer.subscribe(func);\n flow.subscribers[streamer.key] = func;\n }", "onStreamStart() {\n if (this.onStartTrigger.length > 0) {\n this.onStartTrigger.forEach(trigger => {\n controller.handleData(trigger);\n })\n }\n }", "_read(size) {\n /*\n console.log(`read called with size ${size}`);\n for (let i = 0; i < this.streams.length; i++) {\n const currentStream = this.streams[i];\n let chunk = currentStream.read();\n if (Buffer.isBuffer(chunk)) {\n chunk = chunk.toString();\n console.log(`chunk for stream ${i}: ${chunk}`);\n }\n }\n */\n /*\n //this[kSource].fetchSomeData(size, (data, encoding) => {\n this.push(Buffer.from(data, encoding));\n console.log(`reading buffer: ${Buffer.from(data, encoding)}`);\n });\n */\n }", "async publishStream () {\n\t\tawait new StreamPublisher({\n\t\t\tdata: this.responseData,\n\t\t\trequest: this,\n\t\t\tbroadcaster: this.api.services.broadcaster,\n\t\t\tstream: this.updater.stream.attributes\n\t\t}).publishStream();\n\t}", "function handleAddStream(data) {\n console.log(\"got stream from peer\");\n console.log(\"peer stream\", data.stream)\n console.log(\"my stream\", myStream)\n const peerStream = document.getElementById(\"peerFace\");\n peerStream.srcObject = data.stream;\n}", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\n if( !this.isDiscretized ) {\n while(true) {\n if (!this.isListening || this.pos >= this.iterators.length)\n break;\n //get the data from the current iterator\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done)\n break;\n\n this.push(obj.value);\n }\n }\n else{//for discretized flows\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n do{\n obj = this.iterators[this.pos].next();\n while( !obj.done ){\n this.streamElements.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( this.streamElements.length > 0 ){\n while(true) {\n this.streamElements.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n break;\n }\n }\n }\n\n this.pos++;\n }while( this.pos < this.iterators.length );\n }\n else{\n var ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n var justEnded = false;\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n ended.push(false);\n }\n\n do{\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n justEnded = true;\n this.push(this.streamElements.slice());\n this.streamElements = [];\n\n //check if all items have ended\n if( Flow.from(ended).allMatch((input) => input) )\n break;\n }\n else\n justEnded = false;\n }while(true);\n }\n }\n\n this.isListening = false; //we done processing so stop listening\n this.pos = 0; //reset the pos for other operations\n }", "setupDataHandlers() {\n this.dc.onmessage = (e) => {\n var msg = JSON.parse(e.data);\n console.log(\"received message over data channel:\" + msg);\n };\n this.dc.onclose = () => {\n this.remoteStream.getVideoTracks()[0].stop();\n console.log(\"The Data Channel is Closed\");\n };\n }", "watchStreamStatus() {\n const tracks = this.stream.getTracks();\n for (let track of tracks) {\n track.onended = this.handleStreamEnd;\n }\n }", "constructor() {\n this.streams = [];\n }", "listen() {\n const subscription = this.client.subscribe(\n this.subject,\n this.queueGroupName,\n this.subscriptionOptions()\n );\n\n subscription.on('message', (msg) => {\n console.log(\n 'Message Received: ' + this.subject + '/' + this.queueGroupName\n );\n\n const parsedData = this.parseMessage(msg);\n this.onMessage(parsedData, msg);\n });\n }", "function onData(data) {\n\n // Attach or extend receive buffer\n _receiveBuffer = (null === _receiveBuffer) ? data : Buffer.concat([_receiveBuffer, data]);\n\n // Pop all messages until the buffer is exhausted\n while(null !== _receiveBuffer && _receiveBuffer.length > 3) {\n var size = _receiveBuffer.readInt32BE(0);\n\n // Early exit processing if we don't have enough data yet\n if((size + 4) > _receiveBuffer.length) {\n break;\n }\n\n // Pull out the message\n var json = _receiveBuffer.toString('utf8', 4, (size + 4));\n\n // Resize the receive buffer\n _receiveBuffer = ((size + 4) === _receiveBuffer.length) ? null : _receiveBuffer.slice((size + 4));\n\n // Parse the message as a JSON object\n try {\n var msgObj = JSON.parse(json);\n\n // emit the generic message received event\n _self.emit('message', msgObj);\n\n // emit an object-type specific event\n if((typeof msgObj.messageName) === 'undefined') {\n _self.emit('unknown', msgObj);\n } else {\n _self.emit(msgObj.messageName, msgObj);\n }\n }\n catch(ex) {\n _self.emit('exception', ex);\n }\n }\n }", "streamingStart( subscriber ) {\n var id = this.getClientId(subscriber);\n console.log(\"Stream started for client \"+id)\n for ( var i = 0; i < this.clients.length; i++) {\n var client = this.clients[i];\n if ( client.id == id ) {\n // matched\n this.attachAudioStream(client.streamToMesh, this.getStream(subscriber));\n //this.clients.splice(i,1); // too eager, we may need to keep it for another stream\n console.log(\"Audio/video stream started for avatar of client \"+id)\n this.attachVideoStream(client, subscriber);\n break;\n }\n }\n this.subscribers.push(subscriber);\n }", "constructor(stream) {\n\n /** call super() to invoke extended class's constructor */\n super();\n\n /** capture incoming data */\n let buffer = '';\n\n /** handle the incoming data events */\n stream.on('data', data => {\n /**\n * append raw data to end of buffer then, starting from\n * the front backwards, look for complete messages\n */\n buffer += data;\n let boundary = buffer.indexOf('\\n');\n /**\n * JSON.parse each message string and emit as message\n * event by LDJclient via this.emit\n */\n while (boundary !== -1) {\n const input = buffer.substring(0, boundary);\n buffer = buffer.substring(boundary + 1);\n this.emit('message', JSON.parse(input));\n boundary = buffer.indexOf('\\n');\n }\n });\n }", "publish (data) {\n this.subscribers.forEach(subscriber => {\n subscriber(data);\n });\n }", "processData(socket, data) {\n\n rideProcess.listen(socket, data);\n\n\n }", "async function handleStream() {\n const signal = controller.signal;\n for await (const chunk of ipfs.cat(image.cid, { signal })) {\n setImgBuffer((oldBuff) => [...oldBuff, chunk]);\n }\n\n if (mode === modeType.scanlation) {\n let textBuffer = [];\n //will only begin loading translation data if component isn't unloading\n for await (const chunk of ipfs.cat(data.cid, { signal })) {\n textBuffer = [...textBuffer, chunk];\n }\n setTranslation(JSON.parse(Buffer.concat(textBuffer).toString()));\n }\n }", "onReceive(data)\n {\n //console.log(\"RX:\", data);\n\n // Capture the data\n this.receivedBuffers.push(data);\n\n // Resolve waiting promise\n if (this.waiter)\n this.waiter();\n }", "function OnStreams(e = null){\n\tif (HasValidResponse()){ \n\t\tBuildStreamUI(RawResponse['streams']);\n\t}\n}", "connect() {\n /*this.client.get('application/rate_limit_status', (error, tweets, response) => {\n console.log('Response', response)\n })*/\n this.stream = this.client.stream('statuses/filter', { track: this.track })\n this.stream.on('data', (tweet) => {\n let data = Object.assign({\n query: this.track\n }, tweet)\n this.push(data)\n })\n this.stream.on('error', (error) => { console.log(error) })\n }", "listenForData() {\n this.socket.on(EVENT_DATA, data => this.handleData(data))\n }", "_requestEventStream() {\n if (! this._eventStreamEnabled) {\n Utils.logDebug(`Event stream ${this._eventStreamUrl} not enabled`);\n return;\n }\n\n if (this._eventStreamSession === null) {\n this._eventStreamEnabled = false;\n this.enableEventStream();\n }\n\n if (this._eventStreamMsg !== null) {\n Utils.logDebug(`Event stream message already requested on: ${this._eventStreamUrl}`);\n return;\n }\n\n Utils.logDebug(`Event stream ${this._eventStreamUrl} request`);\n\n let msg = PhueMessage.new(\"GET\", this._eventStreamUrl);\n\n msg.requestHueType = PhueRequestype.EVENT;\n msg.request_headers.append(\"ssl\", \"False\");\n msg.request_headers.append(\"hue-application-key\", this._userName);\n\n this._eventStreamMsg = msg;\n\n this._eventStreamSession.queue_message(msg, (sess, mess) => {\n if (mess.status_code === Soup.Status.OK) {\n this._eventStreamMsg = null;\n try {\n this._eventStreamData = JSON.parse(mess.response_body.data);\n\n this.emit(\"event-stream-data\");\n } catch {\n Utils.logDebug(`Event stream ${this._eventStreamUrl} data problem - failed to parse JSON`);\n this._eventStreamData = [];\n }\n\n this._requestEventStream();\n } else if (mess.status_code === Soup.Status.CANCELLED) {\n /* event stream already disabled - this is what left from the msg, do nothing*/\n Utils.logDebug(`Event stream ${this._eventStreamUrl} cancelled`);\n return;\n } else {\n this._eventStreamMsg = null;\n Utils.logDebug(`Event stream ${this._eventStreamUrl} stopped due to error code: ${mess.status_code}`);\n this._eventStreamData = [];\n }\n })\n }", "function subscribe(params) {\n return new Promise((resolve, reject) => {\n var response;\n var streamName = params.stream;\n multichain.subscribe({\n \"stream\": streamName,\n \"rescan\": true\n },\n (err, res) => {\n console.log(res)\n if (err == null) {\n return resolve({\n response: res,\n message: \"Assets/Streams craeted and subscribed\"\n });\n } else {\n console.log(err)\n return reject({\n status: 500,\n message: 'Internal Server Error !'\n });\n }\n }\n )\n\n })\n}", "async function handle_fetch_stream (stream, cb) {\n if (is_nodejs)\n stream = to_whatwg_stream(stream)\n\n // Set up a reader\n var reader = stream.getReader(),\n decoder = new TextDecoder('utf-8'),\n parser = subscription_parser(cb)\n \n while (true) {\n var versions = []\n\n try {\n // Read the next chunk of stream!\n var {done, value} = await reader.read()\n\n // Check if this connection has been closed!\n if (done) {\n console.debug(\"Connection closed.\")\n cb(null, 'Connection closed')\n return\n }\n\n // Tell the parser to process some more stream\n parser.read(decoder.decode(value))\n }\n\n catch (e) {\n cb(null, e)\n return\n }\n }\n}", "subscribe() {}", "_emitChange() {\n // Must create array copy so React may detect changes\n const payload = this.queue.map(info => {\n const { stream, ...metaInfo } = info;\n return { ...metaInfo }\n });\n this.onQueueChange(payload);\n }", "function DataStream() {\n\tvar _this = this;\n\t\n\t_this._data = [];\n}", "function DataStream() {\n\tvar _this = this;\n\t\n\t_this._data = [];\n}", "onData(chunk) {\n this.chunks.push(chunk);\n }", "onData(chunk) {\n this.chunks.push(chunk);\n }", "onStreamStop() {\n if (this.onStopTrigger.length > 0) {\n this.onStopTrigger.forEach(trigger => {\n controller.handleData(trigger);\n })\n }\n }", "function openUpdateStream() {\n var source = new EventSource(updates_url);\n source.onmessage = function (response) {\n processResponseData(response.data)\n };\n console.log(\"Stream Opened:\", updates_url);\n }", "function emitData() {\n // While there are `data` listeners and items, emit them\n var item;\n while (this._hasListeners('data') && (item = this.read()) !== null)\n this.emit('data', item);\n // Stop draining the source if there are no more `data` listeners\n if (!this._hasListeners('data') && !this.done) {\n this.removeListener('readable', emitData);\n this._addSingleListener('newListener', waitForDataListener);\n }\n}", "createStream () {\n\n }", "function hasPipeDataListeners(stream){var listeners=stream.listeners('data');for(var i=0;i<listeners.length;i++){if(listeners[i].name==='ondata'){return true;}}return false;}", "collect () {\n const buf = []\n buf.dataLength = 0\n this.on('data', c => {\n buf.push(c)\n buf.dataLength += c.length\n })\n return this.promise().then(() => buf)\n }", "function ArrayStream() {\n this.run = function(data) {\n var self = this;\n data.forEach(function(line) {\n self.emit('data', line + '\\n');\n });\n }\n}", "function Stream() {\n EventEmitter.call(this);\n }", "_onStreamEvent(message) {\n let eventTarget;\n if (this._publication && message.id === this._publication.id) {\n eventTarget = this._publication;\n } else if (\n this._subscribedStream && message.id === this._subscribedStream.id) {\n eventTarget = this._subscription;\n }\n if (!eventTarget) {\n return;\n }\n let trackKind;\n if (message.data.field === 'audio.status') {\n trackKind = TrackKind.AUDIO;\n } else if (message.data.field === 'video.status') {\n trackKind = TrackKind.VIDEO;\n } else {\n Logger.warning('Invalid data field for stream update info.');\n }\n if (message.data.value === 'active') {\n eventTarget.dispatchEvent(new MuteEvent('unmute', {kind: trackKind}));\n } else if (message.data.value === 'inactive') {\n eventTarget.dispatchEvent(new MuteEvent('mute', {kind: trackKind}));\n } else {\n Logger.warning('Invalid data value for stream update info.');\n }\n }", "function startStream() {\n streamInterval = setInterval(working, msFrequency);\n}", "relay(stream, streamName) {\n var that = this;\n stream.forEach((value) =>\n that.push(streamName, value)\n );\n }", "subscribe () {}", "function liveStreamCallback(historyData) {\n setHistoryTips();\n updateStats(historyData);\n}", "updateHostedStream() {\n let thisObj = this;\n this.StreamClient.streamAsync({\n live: true,\n privateMode: thisObj.state.privateMode,\n voting: thisObj.state.voting,\n autopilot: thisObj.state.autopilot,\n limited: thisObj.state.limited\n }, {\n streamData: thisObj.setStreamData.bind(thisObj),\n locked: thisObj.setListData('locked').bind(thisObj),\n queue: thisObj.setListData('queue').bind(thisObj),\n suggestion: thisObj.setListData('suggestion').bind(thisObj),\n autoplay: thisObj.setListData('autoplay').bind(thisObj),\n reaction: thisObj.captureReaction.bind(thisObj)\n })\n .then((data) => {\n thisObj.setState({\n error: null,\n hosting: true,\n stream: thisObj.state.username,\n lockedActive: true,\n queueActive: true,\n suggestionActive: thisObj.state.voting &&\n !thisObj.state.autopilot,\n autoplayActive: true\n });\n })\n .catch((error) =>\n thisObj.setState({ error: 'Host', errorMsg: 'Stream Error' }));\n }", "onData(data) {\n debug(\"polling got data %s\", data);\n\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n } // if its a close packet, we close the ongoing requests\n\n\n if (\"close\" === packet.type) {\n this.onClose();\n return false;\n } // otherwise bypass onData and handle the message\n\n\n this.onPacket(packet);\n }; // decode payload\n\n\n parser.decodePayload(data, this.socket.binaryType).forEach(callback); // if an event did not trigger closing\n\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "_onReadable() {\r\n\t\t// Read all the data until one of two conditions is met\r\n\t\t// 1. there is nothing left to read on the socket\r\n\t\t// 2. reading is paused because the consumer is slow\r\n\t\twhile (!this._readingPaused) {\r\n\t\t\t// First step is reading the 32-bit integer from the socket\r\n\t\t\t// and if there is not a value, we simply abort processing\r\n\t\t\tlet lenBuf = this._socket.read(4)\r\n\t\t\tif (!lenBuf) return\r\n\r\n\t\t\t// Now that we have a length buffer we can convert it\r\n\t\t\t// into a number by reading the UInt32BE value\r\n\t\t\t// from the buffer.\r\n\t\t\tlet len = lenBuf.readUInt32LE()\r\n\t\t\t// ensure that we don't exceed the max size of 256KiB\r\n\t\t\tif (len > 2 ** 18) {\r\n\t\t\t\tthis.socket.destroy(new Error('Max length exceeded'))\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\r\n\t\t\t// With the length, we can then consume the rest of the body.\r\n\t\t\tlet body = this._socket.read(len)\r\n\r\n\t\t\t// If we did not have enough data on the wire to read the body\r\n\t\t\t// we will wait for the body to arrive and push the length\r\n\t\t\t// back into the socket's read buffer with unshift.\r\n\t\t\tif (!body) {\r\n\t\t\t\tthis._socket.unshift(lenBuf)\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\t// Try to parse the data and if it fails destroy the socket.\r\n\t\t\tlet json\r\n\t\t\ttry {\r\n\t\t\t\tlet message = Buffer.from(body).toString('utf8')\r\n\t\t\t\tif (this.encrypted) {\r\n\t\t\t\t\tmessage = decrypt(this.shkey, message)\r\n\t\t\t\t}\r\n\t\t\t\tjson = JSON.parse(message)\r\n\t\t\t} catch (ex) {\r\n\t\t\t\tthis._socket.destroy()\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\r\n\t\t\t// Push the data into the read buffer and capture whether\r\n\t\t\t// we are hitting the back pressure limits\r\n\t\t\tlet pushOk = this.push(json)\r\n\r\n\t\t\t// When the push fails, we need to pause the ability to read\r\n\t\t\t// messages because the consumer is getting backed up.\r\n\t\t\tif (!pushOk) this._readingPaused = true\r\n\t\t}\r\n\t}", "startTweetStream () {\n const options = {\n hostname: this.TWT_API_HOST,\n path: '/2/tweets/search/stream',\n method: 'GET',\n headers: {\n Authorization: `Bearer ${process.env.TWITTER_BEARER_TOKEN}`\n }\n }\n\n const req = http.request(options, res => {\n res.on('data', chunk => {\n this.tweetStream.push(chunk.toString())\n })\n })\n req.end()\n }", "subscribe(mainWindow: BrowserWindow) {\n mainLog.info('Subscribing to Lightning gRPC streams')\n this.mainWindow = mainWindow\n\n this.subscriptions.channelGraph = subscribeToChannelGraph.call(this)\n this.subscriptions.invoices = subscribeToInvoices.call(this)\n this.subscriptions.transactions = subscribeToTransactions.call(this)\n }", "stream() {\n if (!redis.isConnected){\n throw Error('Failed to stream event. DB disconnected');\n }\n\n this.logger.log(`Streaming new event \"${this.message}\" at ${moment(this.timestamp).format('YYYY-MM-DD HH:mm:ss.SSS')}`);\n\n redis.addToQueue(config.EVENTS_STREAM_NAME, null, ['timestamp', this.timestamp, 'message', this.message], (err, msgId) => {\n if (err){\n throw Error(`Failed to stream event, ${err.message}`);\n }\n\n this.id = msgId;\n\n this.logger.log(`New event streamed with id ${msgId}`);\n });\n }", "onDataReceived(data) {\n /*\n All received data is appended to a ReceiveBuffer.\n This makes sure that all the data we need is received before we attempt to process it.\n */\n this._receiveBuffer.append(data);\n // Process data that we have.\n this.processData();\n }", "static subscribeToStreams(onCollectionChanged = () => { }, onError = () => { }) {\n if (streamsSubscription)\n throw new Error('Already subscribed for streams real time data update.');\n\n streamsSubscription = FirebaseServices.subscribeToCollectionData('streams', onCollectionChanged, onError);\n FirebaseServices.addOnFirebaseFailure(StreamsService.unsubscribeFromStreams);\n }", "function processConsume(data) {\n setConsume(data);\n}", "getStream() {\n if(this.newStreamRequired()) {\n if (this.stream){\n this.stream.destroy();\n } \n this.streamCreatedAt = new Date();\n //console.log(\"Sending request as \" + this.request.config.languageCode);\n this.stream = speech.streamingRecognize(this.request)\n .on('error', console.error) \n .on('data', this.sendTranscription.bind(this));\n }\n return this.stream;\n }", "function Stream() {\n EventEmitter.call(this);\n }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n lib$1.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "setupDataListener(){\n PubSub.subscribe('Items:item-data-loaded',(evt)=>{this.initiliaze(evt.detail)});\n }", "static getStreams() {\n return FirebaseServices.getCollectionData('streams');\n }", "function handleDataAvailable(e) {\n console.log('video data available');\n recordedChunks.push(e.data);\n}", "function ArrayStream() {\n Stream.call(this);\n\n this.run = function(data) {\n var self = this;\n data.forEach(function(line) {\n self.emit('data', line + '\\n');\n });\n }\n}", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n parser.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n parser.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "function mediaRecorderDataAvailable(e) {\n chunks.push(e.data);\n}", "function handleDataAvailable(e) {\n console.log('video data available');\n recordedChunks.push(e.data);\n }", "makeStreamData (callback) {\n\t\t// find one of the other users in the team, and add them to the stream\n\t\tsuper.makeStreamData(() => {\n\t\t\tthis.addedUsers = this.getAddedUsers();\n\t\t\tthis.expectedData.stream.$addToSet = this.expectedData.stream.$addToSet || {};\n\t\t\tif (this.addedUsers.length === 1) {\n\t\t\t\t// this tests conversion of single element to an array\n\t\t\t\tconst addedUser = this.addedUsers[0];\n\t\t\t\tthis.data.$addToSet = { memberIds: addedUser.id };\n\t\t\t\tthis.expectedData.stream.$addToSet.memberIds = [addedUser.id];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst addedUserIds = this.addedUsers.map(user => user.id);\n\t\t\t\tthis.data.$addToSet = { memberIds: addedUserIds };\n\t\t\t\tthis.expectedData.stream.$addToSet.memberIds = [...addedUserIds];\n\t\t\t}\n\t\t\tthis.expectedData.stream.$addToSet.memberIds.sort();\n\t\t\tcallback();\n\t\t});\n\t}", "onData(data) {\n debug(\"polling got data %s\", data);\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose();\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n (0, engine_io_parser_1.decodePayload)(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "function gotStream(stream) {\n createAnalyser()\n // Create an AudioNode from the stream.\n var mediaStreamSource = context.createMediaStreamSource(stream);\n connectAnalyser(mediaStreamSource)\n //update();\n}", "function Stream() {\n EventEmitter.call(this);\n}", "function Stream() {\n EventEmitter.call(this);\n}", "fetchAndPipeToStdout () {\n this._terminalSubstream.on('data', (data) => {\n process.stdout.write(data)\n })\n\n keypress(process.stdin)\n\n process.stdin.on('keypress', (ch, key) => {\n var data = ''\n if (key && key.sequence) {\n data = key.sequence\n } else if (ch) {\n data = ch\n } else {\n console.log('error?', arguments)\n }\n this._terminalSubstream.write(data)\n })\n\n process.stdin.setRawMode(true)\n process.stdin.resume()\n\n this._client.on('data', (data) => {\n if (keypather.get(data, 'args') === 'substream::end') {\n process.exit(0)\n }\n })\n this._client.write({\n id: 1,\n event: 'terminal-stream',\n data: {\n dockHost: this._dockerHost,\n type: 'filibuster',\n containerId: this._dockerContainer,\n terminalStreamId: this._terminalSubstreamId,\n eventStreamId: this._terminalEventsSubstreamId\n }\n })\n }", "_sendData(events, requestKey, type) {\n this._subscriptions[requestKey]\n .filter(subscription => {\n return subscription.type === type;\n })\n .forEach(subscription => {\n let result = subscription.convert(events);\n subscription.data(result);\n });\n }", "constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {\n /**\n * An internal event emitter.\n */\n this.emitter = new events.EventEmitter();\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n this.offset = 0;\n /**\n * An internal marker to track whether stream is end.\n */\n this.isStreamEnd = false;\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n this.isError = false;\n /**\n * How many handlers are executing.\n */\n this.executingOutgoingHandlers = 0;\n /**\n * How many buffers have been allocated.\n */\n this.numBuffers = 0;\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n this.unresolvedDataArray = [];\n /**\n * How much data consisted in unresolvedDataArray.\n */\n this.unresolvedLength = 0;\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n this.incoming = [];\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n this.outgoing = [];\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }", "constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {\n /**\n * An internal event emitter.\n */\n this.emitter = new events.EventEmitter();\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n this.offset = 0;\n /**\n * An internal marker to track whether stream is end.\n */\n this.isStreamEnd = false;\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n this.isError = false;\n /**\n * How many handlers are executing.\n */\n this.executingOutgoingHandlers = 0;\n /**\n * How many buffers have been allocated.\n */\n this.numBuffers = 0;\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n this.unresolvedDataArray = [];\n /**\n * How much data consisted in unresolvedDataArray.\n */\n this.unresolvedLength = 0;\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n this.incoming = [];\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n this.outgoing = [];\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }", "onData(data) {\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n }\n }", "async checkStreamStatus() {\n\n let newOnlineStreamers = await twitch.updateOnlineStreams();\n\n for (let streamerData of newOnlineStreamers) {\n await this.announceStream(streamerData);\n }\n }", "function startStream() {\n\n twitter.stream('statuses/filter', {\n track: config.me\n }, function(stream) {\n console.log(\"listening to stream for \" + config.me);\n stream.on('data', triageTweet);\n });\n}", "subscribe() {\n this.subscriptionID = this.client.subscribe(this.channel, this.onNewData)\n this.currencyCollection.subscribe(this.render)\n this.currencyCollection.subscribe(this.drawInitialSparkLine)\n this.currencyCollection.subscribeToSparkLineEvent(this.drawSparkLine)\n }", "function startStreamListener() {\n\t\tvar streamListenerParams = {\n\t\t\tip: self.streamingSource.sourceIP,\n\t\t\tport: self.streamingSource.sourcePort\n\t\t};\n\t\treturn self.streamListener.startListen(streamListenerParams)\n\t\t\t.then(function() {\n\t\t\t\tself.streamStatusTimer.setInterval(function() {\n\t\t\t\t\tself.streamingSourceDAL.notifySourceListening(self.streamingSource.sourceID);\n\t\t\t\t});\n\t\t\t});\n\t}", "_setData(d) {\n if (!(d instanceof SplitStreamInputData || d instanceof SplitStreamFilter))\n console.error(\n 'Added data is not an instance of SplitStreamData or SplitStreamFilter'\n );\n\n this._datasetsLoaded++;\n this._data = d.data;\n this._update();\n }", "pushFromBuffer() {\n let stream = this.stream;\n let chunk = this.buffer.shift();\n // Stream the data\n try {\n this.shouldRead = stream.push(chunk.data);\n }\n catch (err) {\n this.emit(\"error\", err);\n }\n if (this.options.emit) {\n // Also emit specific events, based on the type of chunk\n chunk.file && this.emit(\"file\", chunk.data);\n chunk.symlink && this.emit(\"symlink\", chunk.data);\n chunk.directory && this.emit(\"directory\", chunk.data);\n }\n }", "pusher_subscription_counter_part(channel_name) {\n\n const {email} = this.props.user;\n var channel = pusher.subscribe(channel_name);\n console.log(channel_name);\n\n channel.bind('my_event', function(data) {\n console.log(data);\n console.log('data at pusher subscription counter part..');\n if (data != null) {\n if (data.sender_email === email.toLowerCase()) {\n\n } else {\n if (data.message != null){\n console.log('data');\n console.log(data);\n //converting data to object that fits to the model.\n const object = {sender_email: data.sender_email, sender_first_name: data.sender_first_name, text:data.message, date: data.date};\n console.log(object);\n\n this.props.appendMessageCounterPart(object);\n }\n }\n }\n }.bind(this));\n }", "function loadPollutionTweets(socket){\n console.log(\"Loading Pollution Data\");\n\n var toSend = [];\n\n var stream = air_pollution_Model.find().stream();\n\n stream.on('data', function (doc) {\n //console.log(doc)\n toSend.push(doc);\n socket.emit(\"pollution_data\", toSend);\n toSend = [];\n // do something with the mongoose document\n }).on('error', function (err) {\n // handle the error\n }).on('close', function () { \n // the stream is closed\n socket.emit(\"finished_sending_pollution_data\", \"\");\n loadPM25Data(socket)\n });\n\n}", "function gotStream(stream) {\n console.log(\"Received local stream\");\n var video = document.querySelector(\"video\");\n video.src = URL.createObjectURL(stream);\n window.localStream = stream;\n stream.onended = function() { console.log(\"Ended\"); };\n}", "function displayStreamersData() {\n\t\t\t\t// foreach streamer get info from api\n\t\t\t\tstreamers.forEach(function (streamerName) {\n\t\t\t\t\tgetStreamerData(streamerName);\n\t\t\t\t});\n\t\t\t}", "function SimpleStream(){\n EventHandler.call(this);\n }", "function listenToWWSDataWithStomp() {\n\t\n\n\t//Different wws instances, Paris is best if EAT is done since Murray Hill has inconsistent\n\t//uptime and will often block outside signals\n\n\t//MH\n\t//const url = \"ws://stream_bridge_user1:[email protected]/ws\"\n\t//Paris\n\t//const url = \"ws://stream_bridge_user1:[email protected]:15674/ws\"\n\t//EAT\n\t//const url = \"ws://stream_bridge_user1:[email protected]:15674/ws\"\n\n\t// WSS\n\tconst url = \"wss://stream_bridge_user1:WWS2016@wws_us_east1.msv-project.com/ws\";\n\t\n\tconst exchange = \"/exchange/data/\";\n\n\t// Check if we have a BAN_ID provided as an URL parameter\n\n\n\n\n\tlet client = Stomp.client(url);\n\n\tfunction onError() {\n\t\tconsole.log('Stomp error');\n\t\tconnectAttempts++;\n\t\t//Wait after repeated attempts to connect\n\t\tif(connectAttempts>4){\n\t\t\tsetTimeout(listenToWWSDataWithStomp, 5000);\n\t\t} else{\n\t\t\tlistenToWWSDataWithStomp();\n\t\t}\n\t}\n\n\t//Connected\n\tfunction onConnectListener(x) {\n\t\tconsole.log(\"Listening to \" + BAN_ID);\n\t\tconnected = true;\n\t\tuniqueName = genName(tag_no);\n\t\tconsole.log(\"Generated new name which is \" + uniqueName)\n\t\tsendMessage(sendban, uniqueName + ' online')\n\t\tsendUpdate();\n\n\t//Subscribing to the BANID, receives these messages\n client.subscribe(exchange+BAN_ID, function(msg) {\n\t\t\t// Update motion information\n\t\t\t//console.log(msg.body);\n\t\t\t//curSamp is not set here, but only when a new sample is played\n\t\t\t//curSamp = data.code;\n\t\t\tlet data = JSON.parse(msg.body);\n\t\t\tif(debugMode){\n\t\t\t\tconsole.log(\"received\" + data.code);\n\t\t\t}\n\t\t\t\n\n\t\t\tplaySamp(data.code);\n\n\t\t});\n\t}\n\n\t//The actual connection function\n\tclient.connect(\"stream_bridge_user1\", \"WWS2016\", onConnectListener, onError, \"/test\");\n\tsendClient = client;\n}", "subscribe() {\n this.unsubscribe();\n this.sub_list.map(\n (value) => this.subscriptions.push(\n this.eventbus.subscribe(value[0], value[1])\n ));\n }", "run(){\n //Determining right strategy for getting messages from topic\n let getter = this.lastId ? new MessageGetterBeforeLastIDStrategy(this.topic, this.lastId, this.howMany):\n new MessageGetterLastStrategy(this.topic, this.howMany)\n\n //Getting messages\n let messages = getter.get()\n\n //updating remaining messages count\n this.howMany -= messages.length;\n\n //if there are any messages at all\n if(messages.length > 0){\n //Giving them to writer\n let writer = this.outWriterFactory.make()\n\n let response = {\n pkfp: this.topic.pkfp,\n messages: messages,\n before: this.lastId,\n topic: this.topic\n }\n\n writer.output(response)\n\n //Updating last written message id\n this.lastId = messages[messages.length-1].header.id;\n }\n\n //Checking whether request is fulfilled\n if(new FulfilledCondition(this.topic, this.howMany).isFulfilled()){\n //If request fulfilled - unsubscribing from bus and terminating\n console.log(\"Request fulfilled!\");\n this.uxBus.off(this);\n }\n }", "function dataavailableCb(chunk) {\n var encoded = self._arrayBufferToBase64(chunk);\n console.log('Sending audio chunk to websocket for recordingId: ' +\n self._recordingId);\n self._session.call('nl.itslanguage.recording.write',\n [self._recordingId, encoded, 'base64']).then(\n // RPC success callback\n function(res) {\n // Wrote data.\n },\n // RPC error callback\n function(res) {\n self.logRPCError(res);\n _ecb(res);\n }\n );\n }", "function handleAddStreamEvent(event) {\n log(\"*** Stream added\");\n console.log('///////////////////////////////// Stream added');\n // document.getElementById(\"received_video\").srcObject = event.stream;\n // document.getElementById(\"hangup-button\").disabled = false;\n}", "subscribe() {\n return this.stream.subscribe('Screen', 'TripUI', (screen) => {\n return this.onScreen(screen);\n });\n }", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "function Stream() {\n\t EventEmitter.call(this);\n\t}", "startRecievingData() {\n Stream.subscribe(\"user_activity\", rows => {\n if (!rows || rows.length === 0) {\n // show latency flag if no data for more than 10 mins\n console.log('no data!')\n let hasNoData =\n this.getSecondsFromNow(this.lastDataRecieved) >=\n this.latencyThreshold && this.enableRealtime;\n\n hasNoData ? (this.isDelayed = true) : (this.isDelayed = false);\n\n return;\n }\n\n // A node for each person's schedule\n for (let d of rows) {\n let timestamp = d.timestamp; \n let diff = Math.abs(this.getDateOffset().getTime() - this.userActivityDropTime * 1000 - this.getDateOffset(d.timestamp).getTime()) /1000\n console.log('diff',diff)\n console.log('lastdatareceived',this.lastDataRecieved)\n console.log('timediff',this.getSecondsFromNow(timestamp))\n console.log('systime', this.getDateOffset().getTime())\n console.log('recordtime', this.getDateOffset(timestamp).getTime())\n console.log('last', this.getSecondsFromNow(this.lastDataRecieved))\n this.lastDataRecieved = d.timestamp;\n \n \n let hasLatency =\n this.getSecondsFromNow(d.timestamp) >= this.latencyThreshold &&\n this.enableRealtime; \n \n hasLatency ? (this.isDelayed = true) : (this.isDelayed = false);\n \n if (hasLatency) {\n continue;\n }\n // drop records that are passing activity drop time \n if (\n this.getSecondsFromNow(d.timestamp) >= this.userActivityDropTime &&\n this.enableRealtime\n ) {\n continue;\n }\n\n // show latency flag if records and current time is more than 10 mins apart\n\n //let hasLatency =\n // this.getSecondsFromNow(d.timestamp) >= this.latencyThreshold &&\n // this.enableRealtime;\n\n //hasLatency ? (this.isDelayed = true) : (this.isDelayed = false);\n\n let activity = d.value.split(\",\");\n let actValue = activity[this.getConfigIndex(\"index\")];\n let styleValue = activity[this.getConfigIndex(\"style\")];\n\n //***set transparent for 'enter digibank' --- max// \n //if (actValue === \"16\") {\n //styleValue = \"5\";\n //}\n\n let scheds = {\n id: activity[this.getConfigIndex(\"visid\")],\n act: actValue,\n style: styleValue,\n errorStyle: this.getErrors(activity)\n };\n let { act, style, errorStyle } = scheds;\n let nodeIndex = this.nodes.findIndex(node => node.id == scheds.id);\n if (nodeIndex >= 0) {\n if (this.nodes[nodeIndex].act != act) {\n this.nodeQueue.push({\n ...this.nodes[nodeIndex],\n act,\n styles: this.getCombinedNodeStyle(style, errorStyle),\n timestamp: d.timestamp,\n index: nodeIndex\n });\n }\n } else {\n this.nodeQueue.push({\n ...scheds,\n radius: 3,\n x: this.foci[act].x + Math.random(),\n y: this.foci[act].y + Math.random(),\n styles: this.getCombinedNodeStyle(style, errorStyle),\n timestamp: d.timestamp,\n index: -1\n });\n }\n }\n });\n }", "function _updateStreamList() {\n var streams = playback.createFilteredVideoStreamList(),\n streamsLength = streams.length;\n CadmiumMediaStreams$addMethodsToArray(streams);\n for (var i = 0; i < streamsLength; i++) {\n streams[i].lower = streams[i - 1];\n streams[i].higher = streams[i + 1];\n }\n _videoStreamList = streams;\n }", "consumeStream(topic, callback) {\n // let's monitor end of stream to show in pending list if timeout happens\n this.consume(`${topic }:end`).catch(() => {});\n // eslint-disable-next-line no-use-before-define\n const stream = new ReadableStream(topic, this.eventContext);\n if (callback) {\n callback(stream);\n return this;\n }\n return stream;\n }", "function parseStream(stream) {\n return __awaiter(this, void 0, void 0, function () {\n var reg, streaming;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n console.log(\"parsing stream\");\n reg = /\\B(\\$[a-zA-Z][a-zA-Z0-9]+\\b)(?!;)/gm;\n streaming = true;\n // listen to stream\n stream\n .on(\"data\", function (data) {\n // convert data (as buffer) to JSON tweet data\n var tweet = JSON.parse(Buffer.from(data).toString(\"utf-8\"));\n // store tweet text\n var text;\n // attempt to get the full tweet content\n try {\n if (tweet.extended_tweet)\n text = tweet.extended_tweet.full_text;\n else if (tweet.retweeted_status)\n text = tweet.retweeted_status.extended_tweet.full_text;\n }\n catch (error) {\n // TODO: figure out all types of tweet data\n return;\n }\n // exit if text doesn't match filter\n if (!text || !text.match(reg))\n return;\n // too many fake-looking tweets from whaleagent telegram\n if (text.indexOf(\"whaleagent\") > -1) {\n console.log(tweet);\n console.log(text.indexOf(\"whaleagent\"));\n return;\n }\n var tickerList = text.match(reg);\n for (var _i = 0, tickerList_1 = tickerList; _i < tickerList_1.length; _i++) {\n var ticker = tickerList_1[_i];\n frequencyList.add(ticker);\n }\n })\n .on(\"connection aborted\", function () {\n streaming = false;\n });\n _a.label = 1;\n case 1:\n if (!(streaming && !restarting)) return [3 /*break*/, 3];\n return [4 /*yield*/, wait(500)];\n case 2:\n _a.sent();\n return [3 /*break*/, 1];\n case 3:\n console.log(\"done streaming\");\n return [2 /*return*/];\n }\n });\n });\n}", "stream(track) {\n const _opts = {\n method: \"post\",\n url: this._stream,\n qs: {\n track,\n language: \"en\",\n stall_warnings: true\n }\n };\n // create initial request with auth & options\n this.activeStream = this._request(_opts);\n this.activeStream.on(\"response\", response => {\n let buffer = \"\";\n \n if(response.statusCode !== 200) {\n this.events.emit(\"twitter:stream:error\", { type: \"STATUS\", err: response });\n }\n \n response.on(\"data\", data => {\n let index, json;\n buffer += data.toString(\"utf8\");\n \n // loop over the stream while there is an indexOf new line characters\n while ((index = buffer.indexOf(\"\\r\\n\")) > -1) {\n json = buffer.slice(0, index); // grab the json to the first end of line\n buffer = buffer.slice(index + 2); // set the next buffer content\n if (json.length) { // if the json has length try to parse and emit a success/error event\n try {\n this.events.emit(\"twitter:stream:success\", JSON.parse(json));\n }\n catch(err) {\n this.events.emit(\"twitter:stream:error\", { type: 'JSON', err });\n }\n }\n }\n }).on(\"error\", err => {\n // response error\n this.events.emit(\"twitter:stream:error\", {type: \"RESPONSE\", err});\n this.activeStream.abort();\n }).on(\"end\", () => {\n // response end\n this.events.emit(\"twitter:stream:end\");\n });\n \n }).on(\"error\", err => {\n // request error\n this.events.emit(\"twitter:stream:error\", {type: \"REQUEST\", err})\n this.activeStream.abort();\n });\n\n this.activeStream.end();\n }" ]
[ "0.7555975", "0.67507976", "0.62720823", "0.62312895", "0.6212201", "0.60684174", "0.60365725", "0.59991777", "0.5997595", "0.59265834", "0.5922826", "0.5919994", "0.5863007", "0.58500856", "0.5810274", "0.5797977", "0.5763799", "0.5763379", "0.5731796", "0.5728546", "0.5723247", "0.5710948", "0.5705961", "0.5681917", "0.5669196", "0.56661165", "0.56641763", "0.565287", "0.565287", "0.5647336", "0.5647336", "0.56343883", "0.5617064", "0.56161255", "0.5615572", "0.5609026", "0.5596288", "0.5583667", "0.5581603", "0.5580281", "0.55781937", "0.557056", "0.5565999", "0.55611366", "0.5554696", "0.5551179", "0.55433863", "0.55234826", "0.5520263", "0.55155057", "0.5499019", "0.549241", "0.5483183", "0.54823446", "0.5477426", "0.5458751", "0.54575884", "0.5456875", "0.54550725", "0.5452868", "0.5445557", "0.5445557", "0.54423743", "0.5441666", "0.54365164", "0.5430068", "0.54182583", "0.5411093", "0.5411093", "0.53998613", "0.5398772", "0.53942215", "0.53942215", "0.5365828", "0.53607386", "0.53466195", "0.53398365", "0.5336311", "0.53338355", "0.53332376", "0.53326565", "0.5329658", "0.5328812", "0.53280413", "0.5325173", "0.53097373", "0.53044444", "0.5295544", "0.52859473", "0.528023", "0.5276914", "0.52754295", "0.52754295", "0.52754295", "0.52754295", "0.52754295", "0.52696157", "0.52684826", "0.5268051", "0.5267387", "0.52655256" ]
0.0
-1
regularize InFlow if it is chained for piping
process(){ return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PipeDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function pipeline (input, fun1, fun2) {\n return fun2(fun1(input))\n}", "function piper(transformer) {\r\n function nextPipe(nextTransformer) {\r\n return piper(function (value) {\r\n return nextTransformer(transformer(value));\r\n });\r\n }\r\n nextPipe.run = (value) => transformer(value);\r\n return nextPipe;\r\n}", "function pipe(context) {\n if (context.pipes.length < 1) {\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Request pipeline contains no methods!\", 3 /* Error */);\n throw Error(\"Request pipeline contains no methods!\");\n }\n var promise = next(context).then(function (ctx) { return returnResult(ctx); }).catch(function (e) {\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].error(e);\n throw e;\n });\n if (context.isBatched) {\n // this will block the batch's execute method from returning until the child requests have been resolved\n context.batch.addResolveBatchDependency(promise);\n }\n return promise;\n}", "_transform(data, done){\r\n this.stdio.stdin.splitPush(data)\r\n this.fork.stdin.write(data) && done() || this.fork.stdin.on('drain', done)\r\n }", "pipeTypeCheck(them) {\n // console.log(this.name + \" got pipe from\");\n // console.log(them);\n }", "function pipe(context) {\r\n if (context.pipeline.length < 1) {\r\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Request pipeline contains no methods!\", 2 /* Warning */);\r\n }\r\n var promise = next(context).then(function (ctx) { return returnResult(ctx); }).catch(function (e) {\r\n _pnp_logging__WEBPACK_IMPORTED_MODULE_2__[\"Logger\"].error(e);\r\n throw e;\r\n });\r\n if (context.isBatched) {\r\n // this will block the batch's execute method from returning until the child requets have been resolved\r\n context.batch.addResolveBatchDependency(promise);\r\n }\r\n return promise;\r\n}", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function PipeDecorator() {} // WARNING: interface has both a type and a value, skipping emit", "function pipe(stream) {\n var cache, scope = this;\n if(stream) {\n // add to the pipeline\n this.fuse(stream);\n // ensure return values are also added to the pipeline\n cache = stream.pipe;\n stream.pipe = function(/* dest */) {\n // restore cached method when called\n this.pipe = cache;\n // proxy to the outer pipe function (recurses)\n return scope.pipe.apply(scope, arguments);\n }\n stream.pipe.cache = cache;\n }\n return stream;\n}", "function pipeLoop() {\n return newPromise((resolveLoop, rejectLoop) => {\n function next(done) {\n if (done) {\n resolveLoop();\n }\n else {\n // Use `PerformPromiseThen` instead of `uponPromise` to avoid\n // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers\n PerformPromiseThen(pipeStep(), next, rejectLoop);\n }\n }\n next(false);\n });\n }", "function pipeLoop() {\n return newPromise((resolveLoop, rejectLoop) => {\n function next(done) {\n if (done) {\n resolveLoop();\n }\n else {\n // Use `PerformPromiseThen` instead of `uponPromise` to avoid\n // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers\n PerformPromiseThen(pipeStep(), next, rejectLoop);\n }\n }\n next(false);\n });\n }", "function next(c) {\n return c.pipes.length > 0 ? c.pipes.shift()(c) : Promise.resolve(c);\n}", "function pipe() {\n return {name: 'pipe', value: [].slice.call(arguments)}\n}", "async execPipeline(operation, scope) {\n scope = await fetch(scope, operation, this.fetcher, this) // eslint-disable-line no-param-reassign\n const ops = operation.operations.slice()\n const firstOp = ops.shift()\n debug('first op', firstOp)\n let current = await this.exec(firstOp, scope)\n debug('first op result:', current)\n while (ops.length > 0) {\n debug('current:', current)\n const nextOp = ops.shift()\n debug('nextOp:', nextOp)\n current = await this.pipe(nextOp, current) // eslint-disable-line no-await-in-loop\n }\n debug('current:', current)\n return current\n }", "process(){\n if (this.pos >= this.iterators.length) {\n this.pos = 0;\n return null;\n }\n\n if( !this.isDiscretized ) {\n //##go through the iterators one after the other##\n\n //get the data from the current iterator\n var obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n if (this.next !== null)\n return this.next.pipe(obj.value);\n return obj.value;\n }\n else{//for discretized flows\n //we use this instead of the streamElements cause we don't need to save state.\n //Also, clearing streamElements could affect implementations storing the output\n var streamData = [];\n\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done) {\n this.pos = 0;\n return null;\n }\n\n while( !obj.done ){\n streamData.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( streamData.length > 0 ){\n while(true) {\n streamData.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, streamData.length) ){\n if (this.next !== null)\n return this.next.pipe(streamData);\n return streamData;\n }\n }\n }\n }\n else{\n if( !this.recall.ended ) {\n this.recall.ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n this.recall.justEnded = false;\n\n for (let i = 0; i < this.discreteStreamLength; i++) {\n this.recall.ended.push(false);\n }\n }\n\n do{\n //check if all items have ended\n if( this.recall.justEnded && Flow.from(this.recall.ended).allMatch((input) => input) )\n break;\n\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( this.recall.ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n this.recall.ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( this.recall.justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n this.recall.justEnded = true;\n\n try {\n if (this.next !== null)\n return this.next.pipe(this.streamElements.slice());\n return this.streamElements.slice();\n }\n finally{\n this.streamElements = [];\n }\n }\n else\n this.recall.justEnded = false;\n }while(true);\n\n this.pos = 0; //reset the pos variable to allow for reuse\n\n //clear temp fields\n delete this.recall.ended;\n delete this.recall.justEnded;\n //reset temp stream storage variable\n this.streamElements = [];\n\n return null;\n }\n }\n }", "function pipe(context) {\n return next(context)\n .then(function (ctx) { return returnResult(ctx); })\n .catch(function (e) {\n logging_1.Logger.log({\n data: e,\n level: logging_1.LogLevel.Error,\n message: \"Error in request pipeline: \" + e.message,\n });\n throw e;\n });\n}", "function pipe(value) {\r\n function nextPipe(transformer) {\r\n return pipe(transformer(value));\r\n }\r\n nextPipe.value = value;\r\n return nextPipe;\r\n}", "function piperA(transformer) {\r\n function nextPipe(nextTransformer) {\r\n return piperA(function (valuePromise) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const value = yield valuePromise;\r\n const next = yield transformer(value);\r\n return nextTransformer(next);\r\n });\r\n });\r\n }\r\n nextPipe.run = function (value) {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n return transformer(yield value);\r\n });\r\n };\r\n return nextPipe;\r\n}", "function pipeA(value) {\r\n function nextPipe(transformer) {\r\n return pipeA(Promise.resolve(value).then(transformer));\r\n }\r\n nextPipe.value = Promise.resolve(value);\r\n return nextPipe;\r\n}", "pipe(...parsers) {\n // Call each parser and merge returned value into one object\n return parsers.reduce((previousValue, parser) => {\n const result = parser[1](generator);\n return Object.assign({}, previousValue, { [parser[0]]: result });\n }, initialObject);\n }", "function next(c) {\r\n if (c.pipeline.length > 0) {\r\n return c.pipeline.shift()(c);\r\n }\r\n else {\r\n return Promise.resolve(c);\r\n }\r\n}", "repipe(stage){\n log.silly('Session.repipe:', `Session ${this.name}:`,\n `origin: ${stage.origin}`);\n\n // was error on source?\n if(stage.id === this.source.id){\n let to = this.chain.ingress.length > 0 ?\n this.chain.ingress[0] : this.destination;\n stage.pipe(to);\n let from = this.chain.egress.length > 0 ?\n this.chain.egress[this.chain.egress.length - 1] :\n this.destination;\n from.pipe(stage);\n stage.status = 'READY';\n\n log.silly('Session.repipe:', `Session ${this.name}:`,\n `source stage \"${stage.origin}\" repiped`);\n return true;\n }\n\n // was error on destination?\n if(stage.id === this.destination.id){\n let from = this.chain.ingress.length > 0 ?\n this.chain.ingress[this.chain.ingress.length - 1] :\n this.source;\n from.pipe(stage);\n let to = this.chain.egress.length > 0 ?\n this.chain.egress[0] : this.source;\n stage.pipe(to);\n stage.status = 'READY';\n\n log.silly('Session.repipe:', `Session ${this.name}:`,\n `destination stage \"${stage.origin}\" repiped`);\n return true;\n }\n\n // was error on ingress?\n let i = this.chain.ingress.findIndex(r => r.id === stage.id);\n if(i >= 0){\n let from = i === 0 ? this.source : this.chain.ingress[i-1];\n from.pipe(stage);\n let to = i === this.chain.ingress.length - 1 ?\n this.destination : this.chain.ingress[i+1];\n stage.pipe(to);\n stage.status = 'READY';\n\n log.silly('Stage.repipe:', `Session ${this.name}:`,\n `ingress chain repiped on cluster \"${stage.origin}\"`);\n return true;\n }\n\n i = this.chain.egress.findIndex(r => r.id === stage.id);\n if(i<0)\n log.error('Session.repipe: Internal error:',\n 'Could not find disconnected stage',\n `${stage.origin}`);\n\n let from = i === 0 ? this.destination : this.chain.egress[i-1];\n from.pipe(stage);\n let to = i === this.chain.egress - 1 ?\n this.source : this.chain.egress[i+1];\n stage.pipe(to);\n stage.status = 'READY';\n\n log.silly('Session.repipe:', `Session ${this.name}:`,\n `egress chain repiped on cluster \"${stage.origin}\"`);\n\n return true;\n }", "function pipe(source, ...ops) {\n return ops.reduce((res, op) => op(res), source);\n}", "function next(c) {\n if (c.pipeline.length < 1) {\n return Promise.resolve(c);\n }\n return c.pipeline.shift()(c);\n}", "function main(...fns) {return fns.reduce(pipe)}", "function pipe(context) {\r\n return next(context)\r\n .then(function (ctx) { return returnResult(ctx); })\r\n .catch(function (e) {\r\n __WEBPACK_IMPORTED_MODULE_2__pnp_logging__[\"a\" /* Logger */].log({\r\n data: e,\r\n level: 3 /* Error */,\r\n message: \"Error in request pipeline: \" + e.message,\r\n });\r\n throw e;\r\n });\r\n}", "function pipe(fs) {\n return function(x) {\n return reduce (T) (x) (fs);\n };\n }", "function recurse (streams) {\n if(streams.length < 2)\n return\n streams[0].pipe(streams[1])\n recurse(streams.slice(1)) \n }", "function recurse (streams) {\n if(streams.length < 2)\n return\n streams[0].pipe(streams[1])\n recurse(streams.slice(1)) \n }", "function $SYhk$var$pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n $SYhk$var$debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && $SYhk$var$EElistenerCount(src, 'data')) {\n state.flowing = true;\n $SYhk$var$flow(src);\n }\n };\n}", "function recurse (streams) {\n if(streams.length < 2)\n return\n streams[0].pipe(streams[1])\n recurse(streams.slice(1))\n }", "function recurse (streams) {\n if(streams.length < 2)\n return\n streams[0].pipe(streams[1])\n recurse(streams.slice(1))\n }", "function recurse (streams) {\n if(streams.length < 2)\n return\n streams[0].pipe(streams[1])\n recurse(streams.slice(1))\n }", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i - 0] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i - 0] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i - 0] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i - 0] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function isPipe (path) {\n return path.node.operator === LEFTPIPE\n}", "function pipe() {\n\t var funcs = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t funcs[_i - 0] = arguments[_i];\n\t }\n\t return compose.apply(null, [].slice.call(arguments).reverse());\n\t}", "function next(c) {\r\n var _next = c.pipeline.shift();\r\n if (typeof _next !== \"undefined\") {\r\n return _next(c);\r\n }\r\n else {\r\n return Promise.resolve(c);\r\n }\r\n}", "function operatorPipeline(id) {\n\tvar state = _precedence[id]\n\tvar node;\n\tvar parent;\n\tvar tmp;\n\n\tnode = state.func ? state.func() : operatorPipeline(id + 1);\n\twhile (accept(state.lx)) {\n\t parent = {name:_curr.name, children:[node]};\n\t shift();\n\t if (!(tmp = (state.func ? state.func() : operatorPipeline(id + 1))))\n\t\treturn (false);\n\t parent.children.push(tmp);\n\t node = parent;\n\t}\n\treturn (node);\n }", "function PipeDecorator() { }", "function PipeDecorator() { }", "function pipeTransforms (stream, transforms) {\n var head, rest;\n if (!Array.isArray(transforms) || !transforms.length) {\n return stream;\n }\n head = transforms[0];\n rest = transforms.slice(1);\n // recursively pipe to remaining Transforms\n return pipeTransforms(stream.pipe(head), rest);\n}", "run() {\n const self = this;\n return new Promise((resolve, reject) => {\n const pipelineArgs = [\n self.feedInStream,\n new LoggerStream({\n message: \"feedReader.run feedInStream>\"\n }),\n parallel.transform(\n (feed, encoding, callback) => {\n self\n .process(feed.url)\n .then(() => {\n callback(null, feed);\n return feed;\n })\n .catch(error => {\n callback(error);\n });\n }, {\n objectMode: true,\n concurrency: self.concurrency\n }),\n new LoggerStream({\n message: \"feedReader.run parallel.transform>\"\n }),\n ];\n if (self.feedOutStream) {\n pipelineArgs.push(\n new LoggerStream({\n message: \"feedReader.run >feedOutStream\"\n }),\n self.feedOutStream\n );\n }\n // Pipeline final argument is a callback\n pipelineArgs.push((error) => {\n if (error) {\n return reject(error);\n }\n resolve();\n });\n pipeline.apply(null, pipelineArgs);\n });\n }", "function pipe() {\n\t var funcs = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t funcs[_i] = arguments[_i];\n\t }\n\t return compose.apply(null, [].slice.call(arguments).reverse());\n\t}", "function startPipeline() {\n // In this way we read one block while we decode and play another.\n if (state.state == STATE.PLAYING) {\n processState();\n }\n processState();\n }", "function pipeStream() {\n var args = _.toArray(arguments);\n var src = args.shift();\n\n return new Promise(function(resolve, reject) {\n var stream = src;\n var target;\n\n while ((target = args.shift()) != null) {\n stream = stream.pipe(target).on('error', reject);\n }\n\n stream.on('finish', resolve);\n stream.on('end', resolve);\n stream.on('close', resolve);\n });\n}", "function pipeExec(fn) {\n\n\t\tlet canExec = true;\n\n\t\tfunction transform(chunk, enc, cb) {\n\t\t\tif (canExec) {\n\t\t\t\tfn();\n\t\t\t\tcanExec = false;\n\t\t\t}\n\t\t\tcb(null, chunk);\n\t\t}\n\n\t\tfunction flush(cb) {\n\t\t\tcanExec = false;\n\t\t\tcb();\n\t\t}\n\n\t\treturn lib.through.obj(null, transform, flush);\n\n\t}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}", "function chain(stream, state, parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }", "function doit(sequence, data, pipe, ctx) {\n\n return sequence.reduce(function(doWork, funcArr, funcIndex) {\n\n var systemEnvs = {\n both: {\n predicate: function () {\n return funcArr._env === 'both';\n },\n handler: function () {\n var toNextEnv = getNameNextEnv(PromisePipe.env);\n\n if (!toNextEnv) {\n return function (data) {\n return funcArr(data);\n };\n }\n\n return function (data) {\n return doWork.then(funcArr).then(function () {\n var msg = PromisePipe.createTransitionMessage(data, ctx, pipe._id, funcArr._id, funcArr._id, ctx._pipecallId);\n\n var range = rangeChain(funcArr._id, sequence);\n\n ctx._passChains = passChains(range[0]-1, range[0]-1);\n return TransactionHandler.createTransaction(msg)\n .send(PromisePipe.envTransitions[ctx._env][toNextEnv])\n .then(updateContextAfterTransition)\n .then(handleRejectAfterTransition)\n });\n };\n }\n },\n inherit: {\n predicate: function () {\n return funcArr._env === 'inherit';\n },\n handler: function () {\n funcArr._env = sequence[funcIndex]._env;\n\n return funcArr;\n }\n },\n cache: {\n predicate: function () {\n return funcArr._env === 'cache';\n },\n handler: function () {\n var toNextEnv = getNameNextEnv(PromisePipe.env);\n\n if (!toNextEnv) {\n return function (data) {\n return funcArr(data);\n };\n }\n var range = rangeChain(funcArr._id, sequence);\n ctx._passChains = passChains(range[0]+1, range[1]);\n return function (data) {\n var handler = {};\n function cacherFunc(data, context){\n var cacheResult = new Promise(function(resolve, reject){\n \t\t\t\thandler.reject=reject;\n \t\t\t\thandler.resolve=resolve;\n \t\t\t});\n var result = funcArr.call(this, data, context, cacheResult);\n if(!result) {\n return function(cacheResult){\n \t\t\t\t return handler.resolve(cacheResult);\n \t\t\t }\n } else {\n return result;\n }\n }\n return doWork.then(cacherFunc).then(function (cacheResult) {\n if(typeof(cacheResult) == \"function\"){\n var msg = PromisePipe.createTransitionMessage(data, ctx, pipe._id, sequence[range[0]+1]._id, sequence[range[1]]._id, ctx._pipecallId);\n\n return TransactionHandler.createTransaction(msg)\n .send(PromisePipe.envTransitions[ctx._env][toNextEnv])\n .then(updateContextAfterTransition)\n .then(fillCache)\n .then(handleRejectAfterTransition)\n function fillCache(response){\n cacheResult(response.data);\n return response;\n }\n } else {\n return cacheResult;\n }\n });\n };\n }\n }\n };\n\n function getNameNextEnv(env) {\n if (!PromisePipe.envTransitions[ctx._env]) {\n return null;\n }\n\n return Object.keys(PromisePipe.envTransitions[ctx._env]).reduce(function (nextEnv, name) {\n if (nextEnv) { return nextEnv; }\n\n if (name === env) {\n return nextEnv;\n }\n\n if (name !== env) {\n return name;\n }\n }, null);\n }\n\n /**\n * Get index of next env appearance\n * @param {Number} fromIndex\n * @param {String} env\n * @return {Number}\n */\n function getIndexOfNextEnvAppearance(fromIndex, env){\n return sequence.map(function(el){\n return el._env;\n }).indexOf(env, fromIndex);\n }\n\n /**\n * Check env of system behavoir\n * @param {String} env Env for checking\n * @return {Boolean}\n */\n function isSystemTransition (env) {\n return !!systemEnvs[env];\n }\n\n /**\n * Check valid is transition\n */\n function isValidTransition (funcArr, ctx) {\n var isValid = true;\n\n if (!(PromisePipe.envTransitions[ctx._env] && PromisePipe.envTransitions[ctx._env][funcArr._env])) {\n if (!isSystemTransition(funcArr._env)) {\n isValid = false;\n }\n }\n return isValid;\n }\n\n /**\n * Return filtered list for passing functions\n * @param {Number} first\n * @param {Number} last\n * @return {Array}\n */\n function passChains (first, last) {\n return sequence.map(function (el) {\n return el._id;\n }).slice(first, last + 1);\n }\n\n /**\n * Return lastChain index\n * @param {Number} first\n * @return {Number}\n */\n function lastChain (first) {\n var index = getIndexOfNextEnvAppearance(first, PromisePipe.env, sequence);\n\n return index === -1 ? (sequence.length - 1) : (index - 1);\n }\n\n /**\n * Return tuple of chained indexes\n * @param {Number} id\n * @return {Tuple}\n */\n function rangeChain (id) {\n var first = getChainIndexById(id, sequence);\n\n return [first, lastChain(first, sequence)];\n }\n\n /**\n * Get chain by index\n * @param {String} id\n * @param {Array} sequence\n */\n function getChainIndexById(id){\n return sequence.map(function(el){\n return el._id;\n }).indexOf(id);\n }\n\n //transition returns context in another object.\n //we must preserve existing object and make changes accordingly\n function updateContextAfterTransition(message){\n //inherit from coming message context\n Object.keys(message.context).reduce(function(context, name){\n if(name !== '_env') context[name] = message.context[name];\n return context;\n }, ctx);\n return message;\n }\n function handleRejectAfterTransition(message){\n return new Promise(function(resolve, reject){\n if(message.unhandledFail) return reject(message.data);\n resolve(message.data);\n })\n }\n\n function jump (range) {\n return function (data) {\n\n var msg = PromisePipe.createTransitionMessage(data, ctx, pipe._id, funcArr._id, sequence[range[1]]._id, ctx._pipecallId);\n\n var result = TransactionHandler.createTransaction(msg)\n .send(PromisePipe.envTransitions[ctx._env][funcArr._env])\n .then(updateContextAfterTransition)\n .then(handleRejectAfterTransition);\n\n return result;\n };\n }\n\n /**\n * Jump to next env\n * @return {Function}\n */\n function toNextEnv () {\n var range = rangeChain(funcArr._id, sequence);\n\n ctx._passChains = passChains(range[0], range[1]);\n\n if (!isValidTransition(funcArr, ctx)) {\n throw Error('there is no transition ' + ctx._env + ' to ' + funcArr._env);\n }\n\n return jump(range);\n }\n\n /**\n * Will we go to the next env\n */\n function goToNextEnv () {\n return ctx._env !== funcArr._env;\n }\n\n //it shows error in console and passes it down\n function errorEnhancer(data){\n //is plain Error and was not yet caught\n if(data instanceof Error && !data.caughtOnChainId){\n data.caughtOnChainId = funcArr._id;\n\n var trace = stackTrace({e: data});\n if(funcArr._name) {\n console.log('Failed inside ' + funcArr._name);\n }\n console.log(data.toString());\n console.log(trace.join('\\n'));\n }\n return Promise.reject(data);\n }\n\n /**\n * Skip this chain\n * @return {Function}\n */\n function toNextChain () {\n return function (data) {\n return data;\n };\n }\n\n /**\n * Check is skip chain\n * @return {Boolean}\n */\n function skipChain() {\n if (!ctx._passChains) {\n return false;\n }\n\n if (!!~ctx._passChains.indexOf(funcArr._id)) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Execute handler on correct env\n * @return {Function}\n */\n function doOnPropEnv () {\n\n var chain = Object.keys(systemEnvs).reduce(function (chain, name) {\n if (chain !== funcArr) {\n // fixed handler for current chain\n return chain;\n }\n if (systemEnvs[name].predicate(sequence, funcArr)) {\n return systemEnvs[name].handler(sequence, funcArr, funcIndex, ctx);\n }\n\n return chain;\n }, funcArr);\n\n if(chain == funcArr){\n\n if (goToNextEnv() && !skipChain()) {\n return toNextEnv();\n }\n\n if (goToNextEnv() && skipChain()) {\n return toNextChain();\n }\n }\n return chain;\n }\n\n if (funcArr && funcArr.isCatch) {\n return doWork.catch(funcArr);\n }\n\n return doWork.then(doOnPropEnv()).catch(errorEnhancer);\n }, Promise.resolve(data));\n }", "function pipe(...fns) {\n const fnArguments = Array(...fns)\n return function(x) {\n let result = null;\n console.log(fns)\n fnArguments.forEach(fn => {\n if(!result) {\n result = fn(x)\n } else {\n result = fn(result)\n }\n console.log(result)\n })\n\n return result\n }\n \n}", "function $Fj4k$var$pipeOnDrain(src) {\n return function pipeOnDrainFunctionResult() {\n var state = src._readableState;\n $Fj4k$var$debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && $Fj4k$var$EElistenerCount(src, 'data')) {\n state.flowing = true;\n $Fj4k$var$flow(src);\n }\n };\n}", "function pipe() {\n var funcs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n funcs[_i] = arguments[_i];\n }\n return compose.apply(null, [].slice.call(arguments).reverse());\n }", "function fork (next, pipeline) {\n return async function (request) {\n try {\n // Send the request through the fork\n return await pipeline.pipe(request)\n } catch (e) {\n // If an error is thrown that isn't a [NoResponseError],\n // we should rethrow it.\n if (!(e instanceof NoResponseError)) {\n throw e\n }\n\n // Elsewise, try passing the request on through its\n // original pipeline.\n return next(request)\n }\n }\n}", "function intersperse_(self, middle) {\n return new _definitions.Stream(M.map_(M.let_(M.bind_(M.bind_(M.do, \"state\", () => Ref.makeManagedRef(true)), \"chunks\", () => self.proc), \"pull\", ({\n chunks,\n state\n }) => T.chain_(chunks, os => {\n return Ref.modify_(state, first => {\n let builder = A.empty();\n let flagResult = first;\n\n for (const o of os) {\n if (flagResult) {\n flagResult = false;\n builder = A.append_(builder, o);\n } else {\n builder = A.append_(A.append_(builder, middle), o);\n }\n }\n\n return Tp.tuple(builder, flagResult);\n });\n })), ({\n pull\n }) => pull));\n}", "resume() {\n var self = this;\n self._paused = false;\n\n debug('Relaying captured events to target stream.');\n\n if (!self._disablePiping && self._pipeData) {\n debug('Piping data from source to target.');\n self._source.pipe(self._target);\n self._source.resume();\n } else {\n debug('Target stream is not being piped.');\n }\n\n var eventNames;\n if (typeof self._target.eventNames !== 'undefined') {\n eventNames = self._target.eventNames();\n }\n\n self._eventsStash.forEach(function(event) {\n if (typeof eventNames === 'undefined' || eventNames.indexOf(event[0]) !== -1) {\n self._target.emit.apply(self._target, event);\n }\n });\n }", "function pipe(...fns) {\n return arg => fns.reduce((fn1, fn2) => fn2(fn1), arg)\n}", "function flattenPipeline(jq) {\n var result = [];\n (function recur(jq) {\n if (jq.type === 'Pipe') {\n recur(jq.left);\n recur(jq.right);\n } else {\n result.push(jq);\n }\n })(jq);\n return result;\n}", "function pipe() {\n var funcs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n funcs[_i] = arguments[_i];\n }\n return compose.apply(null, [].slice.call(arguments).reverse());\n}", "function pipe() {\n var funcs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n funcs[_i] = arguments[_i];\n }\n return compose.apply(null, [].slice.call(arguments).reverse());\n}", "function pipe() {\n var funcs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n funcs[_i] = arguments[_i];\n }\n return compose.apply(null, [].slice.call(arguments).reverse());\n}", "function pipe() {\n var funcs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n funcs[_i] = arguments[_i];\n }\n return compose.apply(null, [].slice.call(arguments).reverse());\n}", "step(step) {\n let result = this.maybeStep(step);\n if (result.failed)\n throw new TransformError(result.failed);\n return this;\n }", "function getSubflow(_, ctx) {\n var spec = _.$subflow;\n return function(dataflow, key$$1, parent) {\n var subctx = parseDataflow(spec, ctx.fork()),\n op = subctx.get(spec.operators[0].id),\n p = subctx.signals.parent;\n if (p) p.set(parent);\n return op;\n };\n }", "pipe(to){\n let from = this;\n if(!from) log.warn('Stage.pipe: \"from stage\" mssing');\n if(!to) log.warn('Stage.pipe: \"from to\" mssing');\n\n // default: source remains alive is destination closes/errs\n return from.stream.pipe(to.stream);\n // this will kill the source if the destination fails\n // miss.pipe(from, to, (error) => {\n // error = error || '';\n // log.silly(\"Session.pipe.Error event: \", `${error}`);\n // this.emit('error', error, from, to);\n // });\n }", "function getSubflow(_, ctx) {\n var spec = _.$subflow;\n return function(dataflow, key, parent) {\n var subctx = parseDataflow(spec, ctx.fork()),\n op = subctx.get(spec.operators[0].id),\n p = subctx.signals.parent;\n if (p) p.set(parent);\n return op;\n };\n }", "function explode(visitor) {\n if (visitor._exploded) return visitor;\n visitor._exploded = true;\n\n // normalise pipes\n for (var nodeType in visitor) {\n if (shouldIgnoreKey(nodeType)) continue;\n\n var parts = nodeType.split(\"|\");\n if (parts.length === 1) continue;\n\n var fns = visitor[nodeType];\n delete visitor[nodeType];\n\n var _arr = parts;\n for (var _i = 0; _i < _arr.length; _i++) {\n var part = _arr[_i];\n visitor[part] = fns;\n }\n }\n\n // verify data structure\n verify(visitor);\n\n // make sure there's no __esModule type since this is because we're using loose mode\n // and it sets __esModule to be enumerable on all modules :(\n delete visitor.__esModule;\n\n // ensure visitors are objects\n ensureEntranceObjects(visitor);\n\n // ensure enter/exit callbacks are arrays\n ensureCallbackArrays(visitor);\n\n // add type wrappers\n\n var _arr2 = Object.keys(visitor);\n\n for (var _i2 = 0; _i2 < _arr2.length; _i2++) {\n var nodeType = _arr2[_i2];\n if (shouldIgnoreKey(nodeType)) continue;\n\n var wrapper = virtualTypes[nodeType];\n if (!wrapper) continue;\n\n // wrap all the functions\n var fns = visitor[nodeType];\n for (var type in fns) {\n fns[type] = wrapCheck(wrapper, fns[type]);\n }\n\n // clear it from the visitor\n delete visitor[nodeType];\n\n if (wrapper.types) {\n var _arr4 = wrapper.types;\n\n for (var _i4 = 0; _i4 < _arr4.length; _i4++) {\n var type = _arr4[_i4];\n // merge the visitor if necessary or just put it back in\n if (visitor[type]) {\n mergePair(visitor[type], fns);\n } else {\n visitor[type] = fns;\n }\n }\n } else {\n mergePair(visitor, fns);\n }\n }\n\n // add aliases\n for (var nodeType in visitor) {\n if (shouldIgnoreKey(nodeType)) continue;\n\n var fns = visitor[nodeType];\n\n var aliases = t.FLIPPED_ALIAS_KEYS[nodeType];\n if (!aliases) continue;\n\n // clear it from the visitor\n delete visitor[nodeType];\n\n var _arr3 = aliases;\n for (var _i3 = 0; _i3 < _arr3.length; _i3++) {\n var alias = _arr3[_i3];\n var existing = visitor[alias];\n if (existing) {\n mergePair(existing, fns);\n } else {\n visitor[alias] = _lodashLangClone2[\"default\"](fns);\n }\n }\n }\n\n for (var nodeType in visitor) {\n if (shouldIgnoreKey(nodeType)) continue;\n\n ensureCallbackArrays(visitor[nodeType]);\n }\n\n return visitor;\n}", "function stream$chain(m) {\n // metdo\n return Stream(observer => {\n const cancel = this.subscribe({\n next: x => {\n m(x).subscribe({\n next: x => {\n observer.next(x)\n },\n complete: observer.complete\n })\n return ()=> {}\n },\n error: observer.error\n })\n return ()=> {}\n })\n}", "unpipe(func) {\n const { pipeline } = this,\n len = pipeline.length;\n let x = 0;\n for(x;x<len;x++)\n {\n if(pipeline[x] === func) { pipeline.splice(x, 1); break; }\n }\n return this;\n }", "function chainOperation(input) {\n opChain.push(input);\n}", "enter (path, { opts }) {\n if (!hasDirective(path)) return\n\n fileHasDirective = true\n\n const { as = 'pipe' } = opts || {}\n\n if (isPipe(path)) {\n const [left, right] = side(path)\n if (!left.node || !right.node) return\n\n path.replaceWith(pipe(as, left.node, right.node))\n }\n\n if (isAntiPipe(path)) {\n const [left, right] = side(path)\n if (!left.node || !right.node) return\n\n path.replaceWith(pipe(as, right.node, left.node))\n }\n\n if (isTriplePipe(path)) {\n const [ left, right ] = side(path)\n if (!left.node || !right.node) return\n\n if (t.isIdentifier(right)) {\n path.replaceWith(pipe(right.node.name, left.node))\n }\n\n if (t.isCallExpression(right)) {\n path.replaceWith(pipe(right.node.callee.name,\n ...right.node.arguments, left.node))\n }\n }\n }", "passthrough() {\n const me = this;\n // A chunk counter for debugging\n let _scan_complete = false;\n let _av_waiting = null;\n let _av_scan_time = false;\n\n // DRY method for clearing the interval and counter related to scan times\n const clear_scan_benchmark = () => {\n if (_av_waiting) clearInterval(_av_waiting);\n _av_waiting = null;\n _av_scan_time = 0;\n };\n\n // Return a Transform stream so this can act as a \"man-in-the-middle\"\n // for the streaming pipeline.\n // Ex. upload_stream.pipe(<this_transform_stream>).pipe(destination_stream)\n return new Transform({\n // This should be fired on each chunk received\n async transform(chunk, encoding, cb) {\n\n // DRY method for handling each chunk as it comes in\n const do_transform = () => {\n // Write data to our fork stream. If it fails,\n // emit a 'drain' event\n if (!this._fork_stream.write(chunk)) {\n this._fork_stream.once('drain', () => {\n cb(null, chunk);\n });\n } else {\n // Push data back out to whatever is listening (if anything)\n // and let Node know we're ready for more data\n cb(null, chunk);\n }\n };\n\n // DRY method for handling errors when the arise from the\n // ClamAV Socket connection\n const handle_error = (err, is_infected=null, result=null) => {\n this._fork_stream.unpipe();\n this._fork_stream.destroy();\n this._clamav_transform.destroy();\n clear_scan_benchmark();\n\n // Finding an infected file isn't really an error...\n if (is_infected === true) {\n if (_scan_complete === false) {\n _scan_complete = true;\n this.emit('scan-complete', result);\n }\n this.emit('stream-infected', result); // just another way to catch an infected stream\n } else {\n this.emit('error', err);\n }\n };\n\n // If we haven't initialized a socket connection to ClamAV yet,\n // now is the time...\n if (!this._clamav_socket) {\n // We're using a PassThrough stream as a middle man to fork the input\n // into two paths... (1) ClamAV and (2) The final destination.\n this._fork_stream = new PassThrough();\n // Instantiate our custom Transform stream that coddles\n // chunks into the correct format for the ClamAV socket.\n this._clamav_transform = new NodeClamTransform({}, me.settings.debug_mode);\n // Setup an array to collect the responses from ClamAV\n this._clamav_response_chunks = [];\n\n try {\n // Get a connection to the ClamAV Socket\n this._clamav_socket = await me._init_socket('passthrough');\n if (me.settings.debug_mode) console.log(`${me.debug_label}: ClamAV Socket Initialized...`);\n\n // Setup a pipeline that will pass chunks through our custom Tranform and on to ClamAV\n this._fork_stream.pipe(this._clamav_transform).pipe(this._clamav_socket);\n\n // When the CLamAV socket connection is closed (could be after 'end' or because of an error)...\n this._clamav_socket.on('close', hadError => {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: ClamAV socket has been closed! Because of Error:`, hadError);\n })\n // When the ClamAV socket connection ends (receives chunk)\n .on('end', () => {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: ClamAV socket has received the last chunk!`);\n // Process the collected chunks\n const response = Buffer.concat(this._clamav_response_chunks);\n const result = me._process_result(response.toString('utf8'), null);\n this._clamav_response_chunks = [];\n if (me.settings.debug_mode) {\n console.log(`${me.debug_label}: Result of scan:`, result);\n console.log(`${me.debug_label}: It took ${_av_scan_time} seconds to scan the file(s).`);\n clear_scan_benchmark();\n }\n\n // NOTE: \"scan-complete\" could be called by the `handle_error` method.\n // We don't want to to double-emit this message.\n if (_scan_complete === false) {\n _scan_complete = true;\n this.emit('scan-complete', result);\n }\n })\n // If connection timesout.\n .on('timeout', () => {\n this.emit('timeout', new Error('Connection to host/socket has timed out'));\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Connection to host/socket has timed out`);\n })\n // When the ClamAV socket is ready to receive packets (this will probably never fire here)\n .on('ready', () => {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: ClamAV socket ready to receive`);\n })\n // When we are officially connected to the ClamAV socket (probably will never fire here)\n .on('connect', () => {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Connected to ClamAV socket`);\n })\n // If an error is emitted from the ClamAV socket\n .on('error', err => {\n console.error(`${me.debug_label}: Error emitted from ClamAV socket: `, err);\n handle_error(err);\n })\n // If ClamAV is sending stuff to us (ie, an \"OK\", \"Virus FOUND\", or \"ERROR\")\n .on('data', cv_chunk => {\n // Push this chunk to our results collection array\n this._clamav_response_chunks.push(cv_chunk);\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Got result!`, cv_chunk.toString());\n\n // Parse what we've gotten back from ClamAV so far...\n const response = Buffer.concat(this._clamav_response_chunks);\n const result = me._process_result(response.toString(), null);\n\n // If there's an error supplied or if we detect a virus, stop stream immediately.\n if (result instanceof NodeClamError || (typeof result === 'object' && 'is_infected' in result && result.is_infected === true)) {\n // If a virus is detected...\n if (typeof result === 'object' && 'is_infected' in result && result.is_infected === true) {\n // handle_error(new NodeClamError(result, `Virus(es) found! ${'viruses' in result && Array.isArray(result.viruses) ? `Suspects: ${result.viruses.join(', ')}` : ''}`));\n handle_error(null, true, result);\n }\n // If any other kind of error is detected...\n else {\n handle_error(result);\n }\n }\n // For debugging purposes, spit out what was processed (if anything).\n else {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Processed Result: `, result, response.toString());\n }\n });\n\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Doing initial transform!`);\n // Handle the chunk\n do_transform();\n } catch (err) {\n // If there's an issue connecting to the ClamAV socket, this is where that's handled\n if (me.settings.debug_mode) console.error(`${me.debug_label}: Error initiating socket to ClamAV: `, err);\n handle_error(err);\n }\n } else {\n //if (me.settings.debug_mode) console.log(`${me.debug_label}: Doing transform: ${++counter}`);\n // Handle the chunk\n do_transform();\n }\n },\n\n // This is what is called when the input stream has dried up\n flush(cb) {\n if (me.settings.debug_mode) console.log(`${me.debug_label}: Done with the full pipeline.`);\n\n // Keep track of how long it's taking to scan a file..\n _av_waiting = null;\n _av_scan_time = 0;\n if (me.settings.debug_mode) {\n _av_waiting = setInterval(() => {\n _av_scan_time += 1;\n if (_av_scan_time % 5 === 0) console.log(`${me.debug_label}: ClamAV has been scanning for ${_av_scan_time} seconds...`);\n }, 1000);\n }\n\n // TODO: Investigate why this needs to be done in order\n // for the ClamAV socket to be closed (why NodeClamTransform's\n // `_flush` method isn't getting called)\n // If the incoming stream is empty, transform() won't have been called, so we won't\n // have a socket here.\n if (this._clamav_socket && this._clamav_socket.writable === true) {\n const size = Buffer.alloc(4);\n size.writeInt32BE(0, 0);\n this._clamav_socket.write(size, cb);\n }\n }\n });\n }", "function pipeline(args, callback)\n{\n\tvar funcs, uarg, rv, next;\n\n\tmod_assert.equal(typeof (args), 'object', '\"args\" must be an object');\n\tmod_assert.ok(Array.isArray(args['funcs']),\n\t '\"args.funcs\" must be specified and must be an array');\n\n\tfuncs = args['funcs'].slice(0);\n\tuarg = args['arg'];\n\n\trv = {\n\t 'operations': funcs.map(function (func) {\n\t\treturn ({\n\t\t 'func': func,\n\t\t 'funcname': func.name || '(anon)',\n\t\t 'status': 'waiting'\n\t\t});\n\t }),\n\t 'successes': [],\n\t 'ndone': 0,\n\t 'nerrors': 0\n\t};\n\n\tif (funcs.length === 0) {\n\t\tsetImmediate(function () { callback(null, rv); });\n\t\treturn (rv);\n\t}\n\n\tnext = function (err, result) {\n\t\tif (rv['nerrors'] > 0 ||\n\t\t rv['ndone'] >= rv['operations'].length) {\n\t\t\tthrow new mod_verror.VError('pipeline callback ' +\n\t\t\t 'invoked after the pipeline has already ' +\n\t\t\t 'completed (%j)', rv);\n\t\t}\n\n\t\tvar entry = rv['operations'][rv['ndone']++];\n\n\t\tmod_assert.equal(entry['status'], 'pending');\n\n\t\tentry['status'] = err ? 'fail' : 'ok';\n\t\tentry['err'] = err;\n\t\tentry['result'] = result;\n\n\t\tif (err)\n\t\t\trv['nerrors']++;\n\t\telse\n\t\t\trv['successes'].push(result);\n\n\t\tif (err || rv['ndone'] == funcs.length) {\n\t\t\tcallback(err, rv);\n\t\t} else {\n\t\t\tvar nextent = rv['operations'][rv['ndone']];\n\t\t\tnextent['status'] = 'pending';\n\n\t\t\t/*\n\t\t\t * We invoke the next function on the next tick so that\n\t\t\t * the caller (stage N) need not worry about the case\n\t\t\t * that the next stage (stage N + 1) runs in its own\n\t\t\t * context.\n\t\t\t */\n\t\t\tsetImmediate(function () {\n\t\t\t\tnextent['func'](uarg, next);\n\t\t\t});\n\t\t}\n\t};\n\n\trv['operations'][0]['status'] = 'pending';\n\tfuncs[0](uarg, next);\n\n\treturn (rv);\n}", "function pipe(arrOfFuncs, value) {\n\n}", "function stream_pipeline(...streams) {\n if (streams.length === 0) throw new Error('empty pipeline');\n return new Promise((resolve, reject) => {\n streams.reduce((inlet, outlet) => {\n inlet.on('error', reject);\n return inlet.pipe(outlet);\n }).on('error', reject).on('finish', resolve);\n });\n}", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"n\" /* is */].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"n\" /* is */].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"n\" /* is */].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"n\" /* is */].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function isPipe(){\n\treturn isMatch(pipe, getPipe());\n}", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = _utils__WEBPACK_IMPORTED_MODULE_0__[\"is\"].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = _utils__WEBPACK_IMPORTED_MODULE_0__[\"is\"].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = _utils__WEBPACK_IMPORTED_MODULE_0__[\"is\"].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = _utils__WEBPACK_IMPORTED_MODULE_0__[\"is\"].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = _utils__WEBPACK_IMPORTED_MODULE_0__[\"is\"].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = _utils__WEBPACK_IMPORTED_MODULE_0__[\"is\"].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = _utils__WEBPACK_IMPORTED_MODULE_0__[\"is\"].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = _utils__WEBPACK_IMPORTED_MODULE_0__[\"is\"].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = _utils.is.func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = _utils.is.func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = _utils.is.func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = _utils.is.func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function intermediate() { }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"q\" /* is */].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"q\" /* is */].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"q\" /* is */].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"q\" /* is */].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function next(arg, isErr) {\n // Preventive measure. If we end up here, then there is really something wrong\n if (!mainTask.isRunning) {\n throw new Error('Trying to resume an already finished generator');\n }\n\n try {\n var result = void 0;\n if (isErr) {\n result = iterator.throw(arg);\n } else if (arg === TASK_CANCEL) {\n /**\n getting TASK_CANCEL automatically cancels the main task\n We can get this value here\n - By cancelling the parent task manually\n - By joining a Cancelled task\n **/\n mainTask.isCancelled = true;\n /**\n Cancels the current effect; this will propagate the cancellation down to any called tasks\n **/\n next.cancel();\n /**\n If this Generator has a `return` method then invokes it\n This will jump to the finally block\n **/\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"q\" /* is */].func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };\n } else if (arg === CHANNEL_END) {\n // We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)\n result = __WEBPACK_IMPORTED_MODULE_0__utils__[\"q\" /* is */].func(iterator.return) ? iterator.return() : { done: true };\n } else {\n result = iterator.next(arg);\n }\n\n if (!result.done) {\n runEffect(result.value, parentEffectId, '', next);\n } else {\n /**\n This Generator has ended, terminate the main task and notify the fork queue\n **/\n mainTask.isMainRunning = false;\n mainTask.cont && mainTask.cont(result.value);\n }\n } catch (error) {\n if (mainTask.isCancelled) {\n logError(error);\n }\n mainTask.isMainRunning = false;\n mainTask.cont(error, true);\n }\n }", "function getSubflow(_, ctx) {\n var spec = _.$subflow;\n return function(dataflow, key, parent) {\n var subctx = Object(__WEBPACK_IMPORTED_MODULE_0__dataflow__[\"a\" /* default */])(spec, ctx.fork()),\n op = subctx.get(spec.operators[0].id),\n p = subctx.signals.parent;\n if (p) p.set(parent);\n return op;\n };\n}", "pipe() {\n return new Promise(resolve => {\n const args = [];\n const stdin = process.openStdin();\n \n stdin.on('data', _ => args.push(..._.toString().split(this.opts.splitChar)));\n stdin.on('end', _ => resolve(args));\n stdin.on('error', _ => this.opts.stdErr(`Error: `, _));\n \n setTimeout(_ => {\n if (!args.length) {\n stdin.destroy();\n resolve(false);\n }\n }, this.opts.pipeTimeout);\n });\n }", "execute(state, next){\n const pipeline = state.pipelineHandler;\n if(state.lastCode !== 0){\n const process = pipeline.clone({process: state.config.lastFailed});\n return process.execute(state, next);\n }\n const process = pipeline.clone({process: state.config.lastSucceeded});\n return process.execute(state, next);\n }", "transformer (source, name, filename, options) {\n return (size) => {\n let readStream;\n readStream = fs.createReadStream(filename);\n this.state(name, { sync: true }) // update header\n// // Since the function is not immediately invoked,\n// // the source stream (chain file) may have already closed\n// // by the time this function is called. \n// // Therefore check if it's already closed\n// // If already closed, create a normal stream\n// // If stil open (still writing, in case of a large file), create a tailstream\n// if (!source || source.writableFinished) {\n// readStream = fs.createReadStream(filename);\n// this.state(name, { sync: true }) // update header\n// } else {\n// readStream = ts.createReadStream(filename, { waitForCreate: true })\n// source.on(\"close\", () => {\n// this.state(name, { sync: true }) // update header\n// readStream.on(\"eof\", () => { readStream.end() }) // close tail stream\n// })\n// }\n let stx = readStream.pipe(es.split()).pipe(es.map((item, cb) => {\n this.parse(item, options).then((data) => {\n cb(null, data);\n })\n }))\n if (this.filter) stx = stx.pipe(es.filterSync(this.filter))\n if (this.map) stx = stx.pipe(es.mapSync((e) => {\n let mapped = this.map(e)\n let res = Object.assign({\"$\": mapped}, {tx: e.tx})\n if (e.blk) res.blk = e.blk\n return res\n }))\n // If 'size' is specified, create a batch stream\n if (size) {\n let batch = new BatchStream({ size : size });\n stx = stx.pipe(batch)\n }\n return stx;\n }\n }", "loop(count) {\n // save basePipe reference to avoid returned pipe calling itself\n const basePipe = this.pipe;\n return {\n pipe(...parsers) {\n const entries = [];\n // Call basePipe `count` times\n for (let i = 0; i < count; i += 1) {\n entries.push(basePipe(...parsers));\n }\n return entries;\n },\n };\n }", "function isPipeCall (as, node) {\n return node.callee && node.callee.name === as\n}", "chain(_) {\n return this\n }" ]
[ "0.5841287", "0.57548285", "0.5680209", "0.5627322", "0.56138843", "0.55605215", "0.5546891", "0.5528825", "0.5528825", "0.5528825", "0.5521588", "0.5500015", "0.5500015", "0.5462556", "0.54427505", "0.54389554", "0.5417531", "0.5380848", "0.5370469", "0.5343364", "0.5328384", "0.5325747", "0.5312232", "0.53013724", "0.5251774", "0.524534", "0.52418923", "0.5241446", "0.522423", "0.521304", "0.521304", "0.52119166", "0.5199536", "0.5199536", "0.5199536", "0.5142556", "0.5142556", "0.5142556", "0.5142556", "0.5119666", "0.5118406", "0.5107175", "0.5104808", "0.50892085", "0.50892085", "0.50865614", "0.5082566", "0.5076672", "0.5066923", "0.50607187", "0.505391", "0.50516844", "0.50516844", "0.50516844", "0.5044141", "0.5029381", "0.50052255", "0.49949422", "0.49643713", "0.49562177", "0.49441537", "0.49417636", "0.49326158", "0.49286124", "0.48899075", "0.48899075", "0.48899075", "0.48899075", "0.48797435", "0.4865199", "0.4860727", "0.485847", "0.4857922", "0.4833503", "0.48325667", "0.48228046", "0.48187378", "0.481507", "0.48015013", "0.4800913", "0.4797444", "0.47897488", "0.47897488", "0.47879803", "0.47853377", "0.47853377", "0.47853377", "0.47853377", "0.47852382", "0.47852382", "0.4780221", "0.4779221", "0.4779221", "0.4779221", "0.4776042", "0.47551826", "0.47453198", "0.47429442", "0.47405806", "0.47340894", "0.4733567" ]
0.0
-1
This method would be called by the OutFlow each time data is available at the Flow chain end. If a receiver is specified in the constructor, the receiver would be sent the data each time it arrives otherwise, you will need to override this class to specify your implementation
push(input, key){ if( this.receiver != null ) this.receiver(input, key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onReceive(data)\n {\n //console.log(\"RX:\", data);\n\n // Capture the data\n this.receivedBuffers.push(data);\n\n // Resolve waiting promise\n if (this.waiter)\n this.waiter();\n }", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n });\n this.sendBuffer = [];\n }", "function realHandler(data) {\n self.bytesReceived += data.length;\n self._receiver.add(data);\n }", "function realHandler(data) {\n self.bytesReceived += data.length;\n self._receiver.add(data);\n }", "function realHandler(data) {\n self.bytesReceived += data.length;\n self._receiver.add(data);\n }", "function emitData() {\n // While there are `data` listeners and items, emit them\n var item;\n while (this._hasListeners('data') && (item = this.read()) !== null)\n this.emit('data', item);\n // Stop draining the source if there are no more `data` listeners\n if (!this._hasListeners('data') && !this.done) {\n this.removeListener('readable', emitData);\n this._addSingleListener('newListener', waitForDataListener);\n }\n}", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => this.packet(packet));\n this.sendBuffer = [];\n }", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => this.packet(packet));\n this.sendBuffer = [];\n }", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => this.packet(packet));\n this.sendBuffer = [];\n }", "function Receiver () {\n\n if (!(this instanceof Receiver)) return new Receiver();\n\n debug('new receiver');\n\n events.EventEmitter.call(this);\n\n var self = this;\n\n /**\n * We bind this method to an input source\n *\n * @api public\n * @param {Message} message\n * @param {Socekt} socket *optional\n * @param {function} done *optional\n */\n\n this.onReceive = function () {\n debug('onReceive', arguments);\n var args = slice.call(arguments);\n var message = Message(args.shift());\n message.delivered = message.responded = message.consumed = undefined;\n var router = self.router();\n router.route.apply(router, [message].concat(args));\n };\n\n /**\n * We use this method to let our listeners know we\n * have received a message\n *\n * @api private\n * @param {Message} message\n * @param {Socekt} socket * optional\n */\n\n this.onReceived = function (message, socket) {\n debug('onReceived', message.data.id, (socket ? socket.id : null));\n emit.apply(self,['received'].concat(slice.call(arguments)))\n };\n\n /**\n * Used for propagating the errors\n *\n * @api private\n * @param {Error} err\n */\n\n this.onError = function (err) {\n debug('onError',err);\n emit.apply(self,['error'].concat(slice.call(arguments)))\n };\n\n /**\n * Used for propagating the consumed messages\n *\n * @param {Message} message\n * @param {Socket} socket *optional\n */\n\n this.onConsumed = function (message, socket) {\n debug('onConsumed', message.data.id, (socket ? socket.id : null));\n emit.apply(self,['consumed'].concat(slice.call(arguments)))\n };\n\n}", "emitBuffered() {\n this.receiveBuffer.forEach(args => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach(packet => this.packet(packet));\n this.sendBuffer = [];\n }", "function Emitter(){\n emitters.set(this, {});\n receivers.set(this, this);\n }", "function emitter() {\n\tvar i;\n\t// store stringified data\n\t// append new line character so can determine end of JSON object\n\tstringified = JSON.stringify(bobj) + '\\n';\n\t// emit data on every socket connection in eList\n\tfor (i in eList)\n\t\teList[i].write(stringified);\n\t// cleanup\n\tstringified = '';\n\tbobj = {};\n}", "constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {\n /**\n * An internal event emitter.\n */\n this.emitter = new events.EventEmitter();\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n this.offset = 0;\n /**\n * An internal marker to track whether stream is end.\n */\n this.isStreamEnd = false;\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n this.isError = false;\n /**\n * How many handlers are executing.\n */\n this.executingOutgoingHandlers = 0;\n /**\n * How many buffers have been allocated.\n */\n this.numBuffers = 0;\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n this.unresolvedDataArray = [];\n /**\n * How much data consisted in unresolvedDataArray.\n */\n this.unresolvedLength = 0;\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n this.incoming = [];\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n this.outgoing = [];\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }", "constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {\n /**\n * An internal event emitter.\n */\n this.emitter = new events.EventEmitter();\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n this.offset = 0;\n /**\n * An internal marker to track whether stream is end.\n */\n this.isStreamEnd = false;\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n this.isError = false;\n /**\n * How many handlers are executing.\n */\n this.executingOutgoingHandlers = 0;\n /**\n * How many buffers have been allocated.\n */\n this.numBuffers = 0;\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n this.unresolvedDataArray = [];\n /**\n * How much data consisted in unresolvedDataArray.\n */\n this.unresolvedLength = 0;\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n this.incoming = [];\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n this.outgoing = [];\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }", "function DataEmitter() {\n}", "onDataReceived(data) {\n /*\n All received data is appended to a ReceiveBuffer.\n This makes sure that all the data we need is received before we attempt to process it.\n */\n this._receiveBuffer.append(data);\n // Process data that we have.\n this.processData();\n }", "send(data){\n Flow.from(this.listeners).where(listener => listener.notify && Util.isFunction(listener.notify)).foreach(listener => listener.notify(data));\n Flow.from(this.listeners).where(listener => !(listener.notify && Util.isFunction(listener.notify)) && Util.isFunction(listener)).foreach(listener => listener(data));\n }", "function onData(data) {\n\n // Attach or extend receive buffer\n _receiveBuffer = (null === _receiveBuffer) ? data : Buffer.concat([_receiveBuffer, data]);\n\n // Pop all messages until the buffer is exhausted\n while(null !== _receiveBuffer && _receiveBuffer.length > 3) {\n var size = _receiveBuffer.readInt32BE(0);\n\n // Early exit processing if we don't have enough data yet\n if((size + 4) > _receiveBuffer.length) {\n break;\n }\n\n // Pull out the message\n var json = _receiveBuffer.toString('utf8', 4, (size + 4));\n\n // Resize the receive buffer\n _receiveBuffer = ((size + 4) === _receiveBuffer.length) ? null : _receiveBuffer.slice((size + 4));\n\n // Parse the message as a JSON object\n try {\n var msgObj = JSON.parse(json);\n\n // emit the generic message received event\n _self.emit('message', msgObj);\n\n // emit an object-type specific event\n if((typeof msgObj.messageName) === 'undefined') {\n _self.emit('unknown', msgObj);\n } else {\n _self.emit(msgObj.messageName, msgObj);\n }\n }\n catch(ex) {\n _self.emit('exception', ex);\n }\n }\n }", "async _emit(provider, message) {\n throw new Error(\"sub-classes must implemente this; _emit\");\n }", "handleOutboundInput() {\n for (var x = 0; x < this.outboundMessages.length; x++) {\n this.socket.emit(this.outboundMessages[x].command, this.outboundMessages[x].data);\n }\n this.outboundMessages = [];\n }", "function emit() {\n channel.emit.apply(self, arguments);\n self.emit.apply(channel, arguments);\n }", "emit(name, data) {\n this.params$.onNext(data);\n\n let handler = this.handlers[name];\n\n if (handler !== null && handler !== undefined) {\n this.handlers$.onNext(handler);\n } else {\n this.handlers$.onNext(undefined);\n }\n }", "function sink() {}", "function sink() {}", "function emitBoth(data) {\n //Prevent the dreaded infinite loop\n if (data.flags && data.flags !== {} && data.flags.toCinna) return\n var resolved = (data.msg === 'kipsupervisor') ? false : true\n if (data.msg && (data.msg.trim() === 'kipsupervisor') && data.thread && data.thread.ticket) {\n data.thread.ticket.isOpen = true\n } else if (data.msg && (data.msg.trim() === 'kipsupervisor') && !data.thread.ticket) {\n data.thread.ticket = {}\n data.thread.ticket.id = shortid.generate();\n data.thread.ticket.isOpen = true\n }\n ioClient.emit('new channel', {\n name: data.source.channel,\n id: data.source.id,\n resolved: resolved\n })\n var action = data.action ? data.action : '';\n var flags = (data.flags && data.flags !== {}) ? data.flags : {toSupervisor: true};\n\n ioClient.emit('new message', {\n id: null,\n incoming: true,\n msg: (data.msg ? data.msg : ''),\n tokens: ((data.msg && typeof data.msg == 'string') ? data.msg.split() : []),\n bucket: data.bucket,\n action: action,\n amazon: [],\n source: {\n //chnge to data.source.origin\n origin: data.source.origin,\n channel: data.source.channel,\n org: data.source.id.split('_')[0],\n id: data.source.id\n },\n client_res: [],\n ts: Date.now,\n thread: data.thread,\n urlShorten:data.urlShorten,\n thread: data.thread,\n flags: flags\n })\n}", "SetOutputStream() {\n\n }", "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "constructor(message) {\n super(message.from).then(that => {\n console.info('Starting response to', that.peerId);\n that.constructor.instances[that.peerId] = that; // Keep track for existingInstance.\n that.trackHandler = event => that.channel && that.channel.send(event.track.kind);\n that.peer.addEventListener('track', that.trackHandler);\n that.peer.ondatachannel = event => {\n console.log('Got data channel for', that.peerId);\n const channel = event.channel;\n that.initDataChannel(channel);\n channel.onmessage = event => {\n const message = event.data,\n key = message.slice(0, 4);\n console.log('Got', key, 'from', that.peerId);\n switch (key) {\n case 'ping':\n // Server should not send other people's data, but the peer can.\n channel.send(browserData.ip);\n break;\n case 'data':\n channel.send(message);\n break;\n default:\n console.error('Unrecognized data', message, 'from', that.peerId);\n }\n };\n };\n that[message.type](message.data); // And now act on whatever triggered our creation (e.g., offer).\n return that;\n });\n }", "handleRemoteData({ receiveHandler = {} }) {\n// console.log('handleRemoteData');\n const { data: handlerData } = receiveHandler;\n if (_.isEmpty(handlerData)) {\n return;\n }\n\n Object.keys(handlerData).forEach((id) => {\n const { type, data } = handlerData[id] || {};\n if (\n _.findIndex(this.sendBuffers, { id }) === -1 &&\n this.executeCheckList.indexOf(id) === -1\n ) {\n const sendData = this.makeData(type, data);\n this.sendBuffers.push({\n id,\n data: sendData,\n index: this.executeCount,\n });\n }\n });\n }", "receive (data) {\n\n\t\tlet signal;\n\n\t\ttry {\n\n\t\t\t// Instantiate new signal model if necessary\n\t\t\tsignal = data instanceof Signal ? data : new Signal(data);\n\n\t\t\t// If world is not listening (such as when syncing the clock/directory)\n\t\t\t// buffer signal so it will be passed back to receive on call to listen\n\t\t\tif (!this.listening) {\n\t\t\t\tthis.event('onBuffer', data);\n\t\t\t\tthis.signals.buffered.push(signal);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check signed epoch uuid matches uuid of previous epoch\n\t\t\tif (signal.epoch !== this.epoch.ancestor) {\n\t\t\t\tthrow Error('Epoch context inconsistent');\n\t\t\t}\n\n\t\t\tif (typeof signal.blockNumber === 'undefined') {\n\t\t\t\tthrow Error('Missing \\'blockNumber\\' param');\n\t\t\t}\n\n\t\t\t// Check that block has not already been included\n\t\t\tif (signal.blockNumber <= this.position) {\n\t\t\t\tthrow Error('Block has already been included');\n\t\t\t}\n\n\t\t\t// Loop backward to compare recently received signals first\n\t\t\tfor (let z = this.signals.received.length - 1; z >= 0; z--) {\n\t\t\t\tif (signal.uuid === this.signals.received[z].uuid) {\n\t\t\t\t\tthrow Error('Duplicate signal');\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (error) {\n\t\t\tthis.event('onIgnore', { signal, error });\n\t\t\treturn;\n\t\t}\n\n\t\t// Add this world's domain param\n\t\tsignal.addParams({ world: this.signer });\n\n\t\t// If signal was previously dropped (this can\n\t\t// happen when reloading signals on restart)\n\t\tif (signal.dropped) {\n\n\t\t\t// Repopulate its entry on the dropped record\n\t\t\tthis.signals.dropped[signal.uuid] = signal.dropped;\n\n\t\t} else { // Otherwise, proceed\n\n\t\t\t// Put the message in the received pool\n\t\t\t// to be verified as the world advances\n\t\t\tthis.signals.received.push(signal);\n\t\t\tthis.event('onReceive', signal);\n\t\t}\n\t}", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "writing() {\n dataWriter(this);\n }", "emit(type, data) {\n\n if(!data) {\n data = {};\n }\n\n // Prevent cycles by refusing to emit more events until this one is over\n if(this.locked) {\n return;\n }\n\n this.locked = true;\n\n if(this.subs[type]) {\n for(var cb of this.subs[type]) {\n cb(data, this);\n }\n }\n\n if(this.subs['*']) {\n for(var cb of this.subs['*']) {\n cb(data, this);\n }\n }\n\n this.locked = false;\n }", "_sendData() {\n\n }", "bus_rx(data) { this.send('bus-rx', data); }", "function Receiver() {\n\n\tthis.connected = false;\n\n}", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "constructor() {\n super();\n\n this._Add_event(\"offer\");\n this._Add_event(\"data_in\");\n this._Add_event(\"file_end\");\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen); // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "function Emitter() {\r\n\t\tthis.callbacks = {};\r\n\t}", "apply() {\n this.engine.receive([this])\n }", "send_data_to_partner(data_received){\n\t\tclients[data_received['person_b']].socket.emit('data_received',{'type' : 'partner_data', 'content': data_received['content']});\n\t}", "onReceive( pdu ) {\n\n // We push it to the Transform object, which spits it out\n // the Readable side of the stream as a 'data' event\n this.push( Buffer.from( pdu.slice(3, pdu.length-1 )));\n\n }", "processData(socket, data) {\n\n rideProcess.listen(socket, data);\n\n\n }", "networkQueryOffersCollected() {\n this.socket.emit('networkQueryOffersCollected');\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n\n if (0 === this.writeBuffer.length) {\n this.emit(\"drain\");\n } else {\n this.flush();\n }\n }", "get receiver() {\n\t\treturn this.__receiver;\n\t}", "_onData(data) {\n\n let me = this;\n\n me._rxData = me._rxData + data.toString();\n\n // If we are waiting for a response from the device, see if this is it\n if(this.requestQueue.length > 0) {\n\n let cmd = me.requestQueue[0];\n\n if(me._rxData.search(cmd.regex) > -1) {\n // found what we are looking for\n\n\n // Cancel the no-response timeout because we have a response\n if(cmd.timer !== null) {\n clearTimeout(cmd.timer);\n cmd.timer = null;\n }\n\n // Signal the caller with the response data\n if(cmd.cb) {\n cmd.cb(null, me._rxData);\n }\n\n // Remove the request from the queue\n me.requestQueue.shift();\n\n // discard all data (this only works because we only send one\n // command at a time...)\n me._rxData = '';\n }\n } else if(me.isReady) {\n\n let packets = me._rxData.split(';');\n\n if(packets.length > 0) {\n\n\n // save any extra data that's not a full packet for next time\n me._rxData = packets.pop();\n\n packets.forEach(function(packet) {\n\n let fields = packet.match(/:([SX])([0-9A-F]{1,8})N([0-9A-F]{0,16})/);\n\n if(fields) {\n\n let id = 0;\n let ext = false,\n data;\n\n try {\n\n data = Buffer.from(fields[3], 'hex');\n id = parseInt(fields[2], 16);\n\n if(fields[1] === 'X') {\n ext = true;\n }\n\n } catch (err) {\n // we sometimes get malformed packets (like an odd number of hex digits for the data)\n // I dunno why that is, so ignore them\n // console.log('onData error: ', fields, err);\n }\n\n if(id > 0) {\n // emit a standard (non-J1939) message\n me.push({\n id: id,\n ext: ext,\n buf: data\n });\n\n }\n\n }\n });\n }\n }\n }", "function Emitter() {\n this._subscriptions = [];\n}", "function receivedData(objs) {\n // if the received data is not of the last request: do nothing with it\n if (id == this._dataRequestID) {\n this._processData(objs,callback);\n }\n }", "get bytesReceived() {return this._bytesIn;}", "function Emitter() {\n }", "dispatch(data) {\n this._receiveListener(data);\n }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n parser.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n parser.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "function onReceive(channelId, data) {\r\n\t\tconsole.log(data);\r\n\t}", "onData(data) {\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n }\n }", "makeData (callback) {\n\t\tif (this.streamType === 'direct') {\n\t\t\tthis.skipFollow = true;\n\t\t\tthis.expectedVersion = 2;\n\t\t}\n\t\tthis.init(callback);\n\t}", "function Emiter() {}", "function receiverOnDrain() {\n this[kWebSocket$1]._socket.resume();\n}", "function emitMsg(data) {\n // console.log('\\n\\n\\nEmitting message\\n\\n\\n')\n ioClient.emit('new message', data)\n}", "static receive() {}", "function reqSink() { console.log( 'reqSink', arguments ); }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n lib$1.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "function through (write, end) {\n write = write || function (data) { this.emit('data', data) }\n end = end || function () { this.emit('end') }\n\n var ended = false, destroyed = false\n var stream = new Stream(), buffer = []\n stream.buffer = buffer\n stream.readable = stream.writable = true\n stream.paused = false\n stream.write = function (data) {\n write.call(this, data)\n return !stream.paused\n }\n\n function drain() {\n while(buffer.length && !stream.paused) {\n var data = buffer.shift()\n if(null === data)\n return stream.emit('end')\n else\n stream.emit('data', data)\n }\n }\n\n stream.queue = function (data) {\n buffer.push(data)\n drain()\n }\n\n //this will be registered as the first 'end' listener\n //must call destroy next tick, to make sure we're after any\n //stream piped from here.\n //this is only a problem if end is not emitted synchronously.\n //a nicer way to do this is to make sure this is the last listener for 'end'\n\n stream.on('end', function () {\n stream.readable = false\n if(!stream.writable)\n process.nextTick(function () {\n stream.destroy()\n })\n })\n\n function _end () {\n stream.writable = false\n end.call(stream)\n if(!stream.readable)\n stream.destroy()\n }\n\n stream.end = function (data) {\n if(ended) return\n ended = true\n if(arguments.length) stream.write(data)\n _end() // will emit or queue\n }\n\n stream.destroy = function () {\n if(destroyed) return\n destroyed = true\n ended = true\n buffer.length = 0\n stream.writable = stream.readable = false\n stream.emit('close')\n }\n\n stream.pause = function () {\n if(stream.paused) return\n stream.paused = true\n stream.emit('pause')\n }\n stream.resume = function () {\n if(stream.paused) {\n stream.paused = false\n }\n drain()\n //may have become paused again,\n //as drain emits 'data'.\n if(!stream.paused)\n stream.emit('drain')\n }\n return stream\n}", "function receiverOnDrain () {\n this[kWebSocket]._socket.resume();\n}", "function receiverOnDrain () {\n this[kWebSocket]._socket.resume();\n}", "emit(evt) {\n\t\tif (!Duplex.prototype._flush && evt === 'finish') {\n\t\t\tthis._flush((err) => {\n\t\t\t\tif (err) EventEmitter.prototype.emit.call(this, 'error', err);\n\t\t\t\telse EventEmitter.prototype.emit.call(this, 'finish');\n\t\t\t});\n\t\t} else {\n\t\t\tconst args = Array.prototype.slice.call(arguments);\n\t\t\tEventEmitter.prototype.emit.apply(this, args);\n\t\t}\n\t}", "on() {\n socket.emit('OUTPUT', { index: this.index, method: 'on' });\n }", "listenForData() {\n this.socket.on(EVENT_DATA, data => this.handleData(data))\n }", "onAfterSend()\n {\n }", "propagationReceived(fromId, signalId, value) {\n //Not needed\n }", "function receiverOnDrain() {\n this[kWebSocket]._socket.resume();\n}", "function receiverOnDrain() {\n this[kWebSocket]._socket.resume();\n}", "emit() {\n if (this.active) {\n super.emit.apply(this, arguments);\n } else {\n this.emits.push(arguments);\n }\n }", "function subscribeReceiver() {\n let data = {\n op: \"IN_R\",\n channel: channel\n }\n socket.emit('channel', data);\n}", "async triggerOutgoingHandler(buffer) {\n const bufferLength = buffer.size;\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n try {\n await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength);\n }\n catch (err) {\n this.emitter.emit(\"error\", err);\n return;\n }\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }", "async triggerOutgoingHandler(buffer) {\n const bufferLength = buffer.size;\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n try {\n await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength);\n }\n catch (err) {\n this.emitter.emit(\"error\", err);\n return;\n }\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }", "_constructCallbacks() {\n\t\tthis._contract.on(\"PriceSent\", this._receivePrice.bind(this));\n\n\t\tthis._contract.on(\"InvoiceSent\", this._receiveInvoice.bind(this));\n\t}", "_dataReceived(data) {\n this._rawData = data;\n this._data = JSON.parse(this._rawData);\n try {\n this._initialise();\n } catch(e) {\n console.error(e.message);\n }\n }", "function selfEmit(type){//registrationFailed handler is invoked with two arguments. Allow event handlers to be invoked with a variable no. of arguments\nreturn self.emit.bind(self,type);}// Set Accepted Body Types", "start() {\n if (!this.stopped && !this.stopping) {\n this.channel.on('close', () => {\n if (this.forcelyStop || (!this.pausing && !this.paused)) {\n if (!this.trapped)\n this.emit('done');\n this.emit('close');\n }\n this.stopped = false;\n });\n this.channel.on('stream', (packet) => {\n if (this.debounceSendingEmptyData)\n this.debounceSendingEmptyData.run();\n this.onStream(packet);\n });\n this.channel.once('trap', this.onTrap.bind(this));\n this.channel.once('done', this.onDone.bind(this));\n this.channel.write(this.params.slice(), true, false);\n this.emit('started');\n if (this.shouldDebounceEmptyData)\n this.prepareDebounceEmptyData();\n }\n }", "onData(data) {\n debug(\"polling got data %s\", data);\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose();\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n (0, engine_io_parser_1.decodePayload)(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "_onRead(data) {\n\t this.valueBytes.write(data);\n\t }", "function processConsume(data) {\n setConsume(data);\n}", "onData(data) {\n debug(\"polling got data %s\", data);\n\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n } // if its a close packet, we close the ongoing requests\n\n\n if (\"close\" === packet.type) {\n this.onClose();\n return false;\n } // otherwise bypass onData and handle the message\n\n\n this.onPacket(packet);\n }; // decode payload\n\n\n parser.decodePayload(data, this.socket.binaryType).forEach(callback); // if an event did not trigger closing\n\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "constructor(type, sent, received, payload) {\n this.type = type;\n this.sent = sent;\n this.received = received;\n this.payload = payload;\n }", "start() {\n const that = this;\n this.transport.socket.on('data', (data) => {\n that.bufferQueue = Buffer.concat([that.bufferQueue, Buffer.from(data)]);\n if (that.bufferQueue.length > RTConst.PROTOCOL_HEADER_LEN) { // parse head length\n const packetLen = that.bufferQueue.readUInt32BE(0);\n const totalLen = packetLen + RTConst.PROTOCOL_HEADER_LEN;\n if (that.bufferQueue.length >= totalLen) {\n // it is a full packet, this packet can be parsed as message\n const messageBuffer = Buffer.alloc(packetLen);\n that.bufferQueue.copy(messageBuffer, 0, RTConst.PROTOCOL_HEADER_LEN, totalLen);\n that.incomeMessage(RTRemoteSerializer.fromBuffer(messageBuffer));\n that.bufferQueue = that.bufferQueue.slice(totalLen); // remove parsed message\n }\n }\n });\n }", "function Emitter() {\n this.callbacks = {};\n}", "function Emitter() {\n this.callbacks = {};\n}", "function Emitter() {\n this.callbacks = {};\n}", "function Emitter() {\n this.callbacks = {};\n}", "async initializeReceiver() {\r\n this.receiver = Receiver._getInstance(_getWorkerGlobalScope());\r\n // Refresh from persistence if we receive a KeyChanged message.\r\n this.receiver._subscribe(\"keyChanged\" /* KEY_CHANGED */, async (_origin, data) => {\r\n const keys = await this._poll();\r\n return {\r\n keyProcessed: keys.includes(data.key)\r\n };\r\n });\r\n // Let the sender know that we are listening so they give us more timeout.\r\n this.receiver._subscribe(\"ping\" /* PING */, async (_origin, _data) => {\r\n return [\"keyChanged\" /* KEY_CHANGED */];\r\n });\r\n }" ]
[ "0.6152492", "0.6127788", "0.6118728", "0.6118728", "0.6118728", "0.61002374", "0.6060994", "0.6017111", "0.6017111", "0.5976113", "0.5910101", "0.58992016", "0.5889595", "0.58468443", "0.58468443", "0.5837217", "0.58325315", "0.5799023", "0.5738228", "0.5667161", "0.5640132", "0.5622437", "0.5616554", "0.55624646", "0.55624646", "0.5557144", "0.5472684", "0.5464052", "0.54490423", "0.5427417", "0.5427417", "0.5427417", "0.5421095", "0.5417373", "0.54085284", "0.5406712", "0.5406712", "0.5403941", "0.54019785", "0.53962", "0.53487027", "0.53387755", "0.5336156", "0.5333515", "0.53319323", "0.5308291", "0.5272347", "0.5272001", "0.5268279", "0.5260359", "0.5259775", "0.5252004", "0.52498347", "0.52498347", "0.52453935", "0.52387214", "0.5199883", "0.5189578", "0.51865864", "0.51826596", "0.5180071", "0.51794684", "0.51794684", "0.5178653", "0.5176801", "0.51683635", "0.51623154", "0.5158464", "0.51516443", "0.5151192", "0.51503557", "0.5150009", "0.5149964", "0.5149427", "0.5149427", "0.5140549", "0.5139478", "0.5135471", "0.51299465", "0.51227415", "0.5119625", "0.5119625", "0.5116579", "0.51131433", "0.5106364", "0.5106364", "0.51039016", "0.5102875", "0.5102438", "0.50989723", "0.5088883", "0.50884634", "0.50846446", "0.5084614", "0.5081501", "0.507179", "0.5070248", "0.5070248", "0.5070248", "0.5070248", "0.50699455" ]
0.0
-1
This will be used to subscribe a listener for data streams
subscribe(listener){ if( (listener.notify && Util.isFunction(listener.notify)) || Util.isFunction(listener) ) this.listeners.push(listener); else throw new Error("Listener object must either be a function or an object with a `notify` function."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listen() {\n const subscription = this.client.subscribe(\n this.subject,\n this.queueGroupName,\n this.subscriptionOptions()\n );\n\n subscription.on('message', (msg) => {\n console.log(\n 'Message Received: ' + this.subject + '/' + this.queueGroupName\n );\n\n const parsedData = this.parseMessage(msg);\n this.onMessage(parsedData, msg);\n });\n }", "function startStreamListener() {\n\t\tvar streamListenerParams = {\n\t\t\tip: self.streamingSource.sourceIP,\n\t\t\tport: self.streamingSource.sourcePort\n\t\t};\n\t\treturn self.streamListener.startListen(streamListenerParams)\n\t\t\t.then(function() {\n\t\t\t\tself.streamStatusTimer.setInterval(function() {\n\t\t\t\t\tself.streamingSourceDAL.notifySourceListening(self.streamingSource.sourceID);\n\t\t\t\t});\n\t\t\t});\n\t}", "listenForData() {\n this.socket.on(EVENT_DATA, data => this.handleData(data))\n }", "sub(streams){\n this.socket.on('open',async ()=>{\n await this.checkGrantAccessAndQuerySessionInfo()\n this.subRequest(streams, this.authToken, this.sessionId)\n this.socket.on('message', (data)=>{\n // log stream data to file or console here\n // console.log(JSON.parse(data))\n // console.log(this.data.length)\n this.data.push(JSON.parse(data))\n })\n })\n }", "subscribe() {}", "subscribeTo(event, callback) {\n this.socket.on(event, callback);\n }", "function subscribe(listener) {\n listeners.push(listener);\n }", "setupDataListener(){\n PubSub.subscribe('Items:item-data-loaded',(evt)=>{this.initiliaze(evt.detail)});\n }", "setupDataHandlers() {\n this.dc.onmessage = (e) => {\n var msg = JSON.parse(e.data);\n console.log(\"received message over data channel:\" + msg);\n };\n this.dc.onclose = () => {\n this.remoteStream.getVideoTracks()[0].stop();\n console.log(\"The Data Channel is Closed\");\n };\n }", "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "function subscribe(listener) {\r\n subscribers.push(listener);\r\n }", "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n }", "setListeners(){\n let self = this;\n\n self.socketHub.on('connection', (socket) => {\n console.log(`SOCKET HUB CONNECTION: socket id: ${socket.id}`)\n self.emit(\"client_connected\", socket.id);\n socket.on(\"disconnect\", (reason)=>{\n console.log(\"Client disconnected: \" + socket.id)\n self.emit(\"client_disconnected\", socket.id)\n });\n\n socket.on('reconnect', (attemptNumber) => {\n self.emit(\"client_reconnected\", socket.id)\n });\n\n socket.on(\"ping\", ()=>{\n console.log(\"RECEIVED PING FROM CLIENT\")\n socket.emit(\"pong\");\n })\n\n socket.on(\"error\", (err)=>{\n Logger.error(`Client socket error: ${err.message}`, {stack: err.stack});\n })\n\n });\n\n self.dataSocketHub.on('connection', (socket)=>{\n console.log(\"File socket connected\");\n self.emit(\"data_channel_opened\", socket);\n console.log(\"After data_channel_opened emit\")\n socket.on(\"disconnect\", (reason)=>{\n self.emit(\"data_channel_closed\", socket.id);\n });\n\n socket.on(\"reconnect\", (attemptNumber) => {\n self.emit(\"data_channel_reconnection\", socket.id);\n })\n\n socket.on(\"error\", (err)=>{\n Logger.error(\"Data socket error: \" + err)\n })\n\n })\n }", "subscribe(mainWindow: BrowserWindow) {\n mainLog.info('Subscribing to Lightning gRPC streams')\n this.mainWindow = mainWindow\n\n this.subscriptions.channelGraph = subscribeToChannelGraph.call(this)\n this.subscriptions.invoices = subscribeToInvoices.call(this)\n this.subscriptions.transactions = subscribeToTransactions.call(this)\n }", "subscribe () {}", "_subscribe () {\n if (!this.connected)\n throw new Error('No connection exist')\n\n this.subClient.on('message', this._onMessage.bind(this))\n\n if (_.isFunction(this._config.handlers.onError)) {\n this.subClient.on('error', this._config.handlers.onError)\n }\n }", "addStreamListener(streamName, callback) {\n let streamHandler = this.getStreamHandler(streamName);\n if (streamHandler.callbackExists(callback)) {\n return;\n }\n streamHandler.addListener(callback);\n }", "listen() {\n this.media_.addListener(this.handler_)\n this.handler_(this.media_)\n }", "function _subscribe() {\n\n _comapiSDK.on(\"conversationMessageEvent\", function (event) {\n console.log(\"got a conversationMessageEvent\", event);\n if (event.name === \"conversationMessage.sent\") {\n $rootScope.$broadcast(\"conversationMessage.sent\", event.payload);\n }\n });\n\n _comapiSDK.on(\"participantAdded\", function (event) {\n console.log(\"got a participantAdded\", event);\n $rootScope.$broadcast(\"participantAdded\", event);\n });\n\n _comapiSDK.on(\"participantRemoved\", function (event) {\n console.log(\"got a participantRemoved\", event);\n $rootScope.$broadcast(\"participantRemoved\", event);\n });\n\n _comapiSDK.on(\"conversationDeleted\", function (event) {\n console.log(\"got a conversationDeleted\", event);\n $rootScope.$broadcast(\"conversationDeleted\", event);\n });\n\n }", "static subscribeToStreams(onCollectionChanged = () => { }, onError = () => { }) {\n if (streamsSubscription)\n throw new Error('Already subscribed for streams real time data update.');\n\n streamsSubscription = FirebaseServices.subscribeToCollectionData('streams', onCollectionChanged, onError);\n FirebaseServices.addOnFirebaseFailure(StreamsService.unsubscribeFromStreams);\n }", "onClientSubscribed(callback) {\n this.subCallback = callback;\n }", "addDataListener(callback) {\n this.addListener( this.dataListeners, callback);\n }", "function subscribeForEvents() {\n const userResponseEvetnType = 'UserHIReceived';\n const subscriber = eventSubscriber();\n subscriber.subscribeEvent(userResponseEvetnType, userResponseEventReceived);\n }", "function subscribe(subEventCallback){\n\n mySolace.subscribe(subEventCallback);\n \n }", "subscribe(callback) {\n let type = typeof callback;\n\n invariant(type === 'function', 'Bus.listenTo() expects a function, instead it received a ' + type);\n\n _callbacks = _callbacks.concat(callback);\n }", "subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on_1.on(io, \"open\", this.onopen.bind(this)),\n on_1.on(io, \"packet\", this.onpacket.bind(this)),\n on_1.on(io, \"error\", this.onerror.bind(this)),\n on_1.on(io, \"close\", this.onclose.bind(this)),\n ];\n }", "streamingStart( subscriber ) {\n var id = this.getClientId(subscriber);\n console.log(\"Stream started for client \"+id)\n for ( var i = 0; i < this.clients.length; i++) {\n var client = this.clients[i];\n if ( client.id == id ) {\n // matched\n this.attachAudioStream(client.streamToMesh, this.getStream(subscriber));\n //this.clients.splice(i,1); // too eager, we may need to keep it for another stream\n console.log(\"Audio/video stream started for avatar of client \"+id)\n this.attachVideoStream(client, subscriber);\n break;\n }\n }\n this.subscribers.push(subscriber);\n }", "subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on(io, \"open\", this.onopen.bind(this)),\n on(io, \"packet\", this.onpacket.bind(this)),\n on(io, \"error\", this.onerror.bind(this)),\n on(io, \"close\", this.onclose.bind(this)),\n ];\n }", "subEvents() {\n if (this.subs) return;\n const io = this.io;\n this.subs = [on_1.on(io, \"open\", this.onopen.bind(this)), on_1.on(io, \"packet\", this.onpacket.bind(this)), on_1.on(io, \"error\", this.onerror.bind(this)), on_1.on(io, \"close\", this.onclose.bind(this))];\n }", "connectedCallback(){\n this.subscription = subscribe(\n this.messageContext,\n LMSChannel1,\n (message) => this.handleMessage(message)\n );\n }", "onInit() {\n this._client.subscribe(\"connect\", this.onConnect.bind(this));\n this._client.subscribe(\"message\", this.onMessage.bind(this));\n this._client.subscribe(\"error\", this.onError.bind(this));\n }", "function createStreamListener(k) {\n return {\n _data: \"\",\n _stream: null,\n\n QueryInterface: ChromeUtils.generateQI([\n \"nsIStreamListener\",\n \"nsIRequestObserver\",\n ]),\n\n // nsIRequestObserver\n onStartRequest(aRequest) {},\n onStopRequest(aRequest, aStatusCode) {\n k(this._data);\n },\n\n // nsIStreamListener\n onDataAvailable(aRequest, aInputStream, aOffset, aCount) {\n if (this._stream == null) {\n this._stream = Cc[\n \"@mozilla.org/scriptableinputstream;1\"\n ].createInstance(Ci.nsIScriptableInputStream);\n this._stream.init(aInputStream);\n }\n this._data += this._stream.read(aCount);\n },\n };\n}", "subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }", "_onStreamEvent(message) {\n let eventTarget;\n if (this._publication && message.id === this._publication.id) {\n eventTarget = this._publication;\n } else if (\n this._subscribedStream && message.id === this._subscribedStream.id) {\n eventTarget = this._subscription;\n }\n if (!eventTarget) {\n return;\n }\n let trackKind;\n if (message.data.field === 'audio.status') {\n trackKind = TrackKind.AUDIO;\n } else if (message.data.field === 'video.status') {\n trackKind = TrackKind.VIDEO;\n } else {\n Logger.warning('Invalid data field for stream update info.');\n }\n if (message.data.value === 'active') {\n eventTarget.dispatchEvent(new MuteEvent('unmute', {kind: trackKind}));\n } else if (message.data.value === 'inactive') {\n eventTarget.dispatchEvent(new MuteEvent('mute', {kind: trackKind}));\n } else {\n Logger.warning('Invalid data value for stream update info.');\n }\n }", "onStreamStart() {\n if (this.onStartTrigger.length > 0) {\n this.onStartTrigger.forEach(trigger => {\n controller.handleData(trigger);\n })\n }\n }", "listen() {\r\n this.client.on('message', message => this.onMessage(message));\r\n }", "subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on_1.on(io, \"open\", this.onopen.bind(this)),\n on_1.on(io, \"packet\", this.onpacket.bind(this)),\n on_1.on(io, \"error\", this.onerror.bind(this)),\n on_1.on(io, \"close\", this.onclose.bind(this)),\n ];\n }", "_subscribe (event, callback)\n {\n diva.Events.subscribe(event, callback, this.settings.ID);\n }", "subscribe(event, callback) {\n this.bus.addEventListener(event, callback);\n }", "function subscribeToStream(streamer, flow){\n var func = function(data){\n setTimeout(() => flow._prePush(data, streamer), 0);\n };\n\n streamer.subscribe(func);\n flow.subscribers[streamer.key] = func;\n }", "subscribe(callback) {\n this._subscribers.add(callback);\n }", "listen (observable, callback) {\n observable.addObserver(this);\n // la vue devient un observer\n this.update = callback;\n }", "watchStreamStatus() {\n const tracks = this.stream.getTracks();\n for (let track of tracks) {\n track.onended = this.handleStreamEnd;\n }\n }", "on (channel, cb) {\n this.subClient.subscribe(channel)\n super.on(channel, cb)\n }", "newStringStreamListener(onStopCallback) {\n let listener = {\n data: \"\",\n inStream: Cc[\"@mozilla.org/binaryinputstream;1\"].createInstance(\n Ci.nsIBinaryInputStream\n ),\n QueryInterface: ChromeUtils.generateQI([\n \"nsIStreamListener\",\n \"nsIRequestObserver\",\n ]),\n\n onStartRequest(channel) {},\n\n onStopRequest(channel, status) {\n this.inStream = null;\n onStopCallback(this.data);\n },\n };\n\n listener.onDataAvailable = function(req, stream, offset, count) {\n this.inStream.setInputStream(stream);\n this.data += this.inStream.readBytes(count);\n };\n\n return listener;\n }", "listen(){\n this.namespace.on('connection', (socket)=>{\n socket.on('teacher start poll', (teacherSocketId, poll) => {\n this.handleStartPoll(teacherSocketId, poll);\n });\n socket.on('student submit poll', (answersInfo, userId, sessionId)=>{\n this.handleStudentSubmitPoll(answersInfo, userId, sessionId);\n })\n });\n }", "onListening() {\n this.emit('ready');\n }", "onListening() {\n this.emit('ready');\n }", "_registerMessageListener() {\n this._mav.on('message', (message) => {\n let type = this._mav.getMessageName(message.id);\n\n // Wait for specific message event to get the all the fields.\n this._mav.once(type, (_, fields) => {\n // Emit both events.\n this.emit('message', type, fields);\n let listened = this.emit(type, fields);\n\n // Emit another event if the message was not listened for.\n if (!listened) {\n this.emit('ignored', type, fields);\n }\n });\n });\n }", "addEventListener(event, callback) {\n const RNAliyunEmitter = Platform.OS === 'ios' ? new NativeEventEmitter(RNAliyunOSS) : DeviceEventEmitter;\n switch (event) {\n case 'uploadProgress':\n subscription = RNAliyunEmitter.addListener(\n 'uploadProgress',\n e => callback(e)\n );\n break;\n case 'downloadProgress':\n subscription = RNAliyunEmitter.addListener(\n 'downloadProgress',\n e => callback(e)\n );\n break;\n default:\n break;\n }\n }", "subscribe(newInfo, request, callback) {\n this.subscribers.push({\n newInfo,\n request,\n callback\n });\n }", "subscribe() {\n this.subscriptionID = this.client.subscribe(this.channel, this.onNewData)\n this.currencyCollection.subscribe(this.render)\n this.currencyCollection.subscribe(this.drawInitialSparkLine)\n this.currencyCollection.subscribeToSparkLineEvent(this.drawSparkLine)\n }", "function openUpdateStream() {\n var source = new EventSource(updates_url);\n source.onmessage = function (response) {\n processResponseData(response.data)\n };\n console.log(\"Stream Opened:\", updates_url);\n }", "function ChannelListener()\n{\n // Initialized in onStartRequest\n this.request = null;\n\n // The response will be written into the outputStream of this pipe.\n this.sink = Cc[\"@mozilla.org/pipe;1\"].createInstance(Ci.nsIPipe);\n this.sink.init(false, false, 0x20000, 0x4000, null);\n\n // Create reference to avoid GC removal.\n this.inputStream = this.sink.inputStream;\n}", "_registerSocketListener() {\n this._socket.on('message', (data) => {\n this._mav.parse(data);\n });\n }", "function listen() {\r\n __sco.on(\"message\", react);\r\n }", "function startStream() {\n streamInterval = setInterval(working, msFrequency);\n}", "start$() {\n\n //default on error handler\n const onErrorHandler = error => {\n console.error(\"Error handling GraphQl incoming event\", error);\n process.exit(1);\n };\n\n //default onComplete handler\n const onCompleteHandler = () => {\n () => console.log(\"GraphQlService incoming event subscription completed\");\n };\n return Rx.Observable.from(this.getSubscriptionDescriptors())\n .map(aggregateEvent => { return { ...aggregateEvent, onErrorHandler, onCompleteHandler } })\n .map(params => this.subscribeEventHandler(params));\n }", "function handleAddStreamEvent(event) {\n log(\"*** Stream added\");\n console.log('///////////////////////////////// Stream added');\n // document.getElementById(\"received_video\").srcObject = event.stream;\n // document.getElementById(\"hangup-button\").disabled = false;\n}", "function subscribe(){\n performance.mark('subscribing');\n client.subscribe('payload/empty', function (err) {});\n performance.mark('subscribed');\n performance.measure('subscribing to subscribed', 'subscribing', 'subscribed');\n}", "handleSubscribe() {\n // Callback invoked whenever a new event message is received\n const messageCallback = (response) => {\n console.log(\"New Component Update message received: \", JSON.stringify(response.data.payload));\n this.doDemoComponentRefresh();\n }\n\n subscribe(this.channelName, -1, messageCallback).then((response) => {\n // Response contains the subscription information on subscribe call\n console.log(`Subscription request sent to: ${JSON.stringify(response.channel)}`);\n console.log(`Subscription request Response: ${JSON.stringify(response)}`);\n this.subscription = response;\n this.isSubscriptionRequested = false;\n this.isSubscribed = true;\n });\n }", "subscribe(listener) {\n const isFirstListener = this.listeners.length === 0;\n this.listeners = [...this.listeners, listener];\n if (isFirstListener && !this.fetching && !this.fetchComplete) {\n this.doFetch();\n }\n if (this.fetchComplete) {\n listener(this.lastResponse);\n }\n return () => {\n this.listeners = this.listeners.filter(l => l !== listener);\n };\n }", "subscribe (OTL) {\n OTL.subscriber.push(this);\n }", "function onConnect() {\r\n // Once a connection has been made, make a subscription and send a message.\r\n console.log(\"onConnect\");\r\n client.subscribe(subscribeTopic.lights); //for subscription of lights\r\n client.subscribe(subscribeTopic.window); //for subscription of windows\r\n client.subscribe(subscribeTopic.tempHumidity); //for subscription of tempHumidity\r\n client.subscribe(subscribeTopic.tempTemperature);\r\n client.subscribe(subscribeTopic.AirQuality); //for subscription of AirQuality\r\n}", "listener() {}", "subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on_js_1.on(io, \"open\", this.onopen.bind(this)),\n on_js_1.on(io, \"packet\", this.onpacket.bind(this)),\n on_js_1.on(io, \"error\", this.onerror.bind(this)),\n on_js_1.on(io, \"close\", this.onclose.bind(this)),\n ];\n }", "function hasPipeDataListeners(stream){var listeners=stream.listeners('data');for(var i=0;i<listeners.length;i++){if(listeners[i].name==='ondata'){return true;}}return false;}", "connectedCallback() {\n // Callback function to be passed in the subscribe call after an event is received.\n // This callback prints the event payload to the console.\n // A helper method displays the message in the console app.\n var self = this;\n const messageCallback = function(response) {\n self.onReceiveEvent(response);\n };\n // Subscribe to the channel and save the returned subscription object.\n subscribe(this.channelName, -1, messageCallback).then(response => {\n this.subscription = response;\n });\n }", "subscribe(name, fn) {\n this.events.get(name).subscribe(fn);\n }", "_constructMIDIListeners () {\n this._player.on('fileLoaded', () => {\n this.emit('midiLoaded')\n })\n\n this._player.on('playing', () => {\n this.emit('midiPlaying')\n })\n\n this._player.on('midiEvent', event => {\n this.emit('midiEvent', event)\n })\n\n this._player.on('endOfFile', () => {\n this.emit('midiEnded')\n })\n }", "_listen() {\n let onExit = () => {\n this._log('exit signal');\n\n this._exit();\n };\n\n let onMessage = (data) => {\n if (data && data.event === SIGNAL_OUT_OF_MEMORY) {\n this.rotate();\n }\n\n this.emit('message', data);\n };\n\n let onDisconnect = () => {\n this._log('disconnect signal');\n\n if (!this.started || this._disconnecting) {\n return;\n }\n\n this._exit();\n };\n\n let onClose = () => {\n this._log('close signal');\n };\n\n this.worker.on('exit', onExit);\n this.worker.on('message', onMessage);\n this.worker.on('disconnect', onDisconnect);\n this.worker.on('close', onClose);\n }", "function ondata(data) {\n\tswitch (data.type) {\n\t\tcase 'publish':\n\t\t\tsaveMsg.call(this, data.channel, data.msg);\n\t\t\tonNewData.call(this, data.channel, data.msg);\n\t\t\tbreak;\n\t\tcase 'subscribe':\n\t\t\tchsSub.call(this, data.id, data.channels);\n\t\t\tonNewSubscr.call(this, data.id, data.channels);\n\t\t\tbreak;\n\t\tcase 'notify':\n\t\t\tonNewNotifications.call(this, data.notifications);\n\t\t\tbreak;\n\t}\n}", "_callSubscribe() {\n console.log(\" 0 observers \");\n }", "subscribe(listener) {\n privates.get(this).keyring.store.subscribe(listener);\n }", "function xcoffee_subscribe(sensor_id)\r\n{\r\n console.log('** subscribing to',sensor_id);\r\n\r\n var msg_obj = { msg_type: 'rt_subscribe',\r\n request_id: 'A',\r\n filters: [ { test: \"=\",\r\n key: \"acp_id\",\r\n value: sensor_id } ]\r\n };\r\n //sock_send_str(JSON.stringify(msg_obj));\r\n rt_mon.subscribe(sensor_id, msg_obj, handle_records);\r\n}", "_subscribeForLogging() {\n const oThis = this;\n\n oThis.client.on('log', function(level, className, message, furtherInfo) {\n const msg = `cassandra log event: ${level} -- ${message}`;\n\n switch (level) {\n case 'info': {\n break;\n }\n case 'warning': {\n logger.warn('l_cw_2', msg);\n break;\n }\n case 'error': {\n logger.error('l_cw_3', msg);\n const errorObject = responseHelper.error({\n internal_error_identifier: 'l_cw_3',\n api_error_identifier: 'something_went_wrong',\n debug_options: {\n message: message,\n className: className,\n furtherInfo: furtherInfo\n }\n });\n\n createErrorLogsEntry.perform(errorObject, errorLogsConstants.highSeverity);\n break;\n }\n case 'verbose': {\n break;\n }\n default: {\n logger.log(`Current level: ${level}.--${msg}`);\n break;\n }\n }\n });\n }", "function DataEmitter() {\n}", "function onConnect(){\n console.log(\"Connected!\");\n client.subscribe(topic);\n }", "function startListening(){\n\trecord();\n}", "constructor(stream) {\n\n /** call super() to invoke extended class's constructor */\n super();\n\n /** capture incoming data */\n let buffer = '';\n\n /** handle the incoming data events */\n stream.on('data', data => {\n /**\n * append raw data to end of buffer then, starting from\n * the front backwards, look for complete messages\n */\n buffer += data;\n let boundary = buffer.indexOf('\\n');\n /**\n * JSON.parse each message string and emit as message\n * event by LDJclient via this.emit\n */\n while (boundary !== -1) {\n const input = buffer.substring(0, boundary);\n buffer = buffer.substring(boundary + 1);\n this.emit('message', JSON.parse(input));\n boundary = buffer.indexOf('\\n');\n }\n });\n }", "subscribe(name, fn) {\r\n this.events.get(name).subscribe(fn);\r\n }", "constructor() {\n this.#listen();\n }", "constructor() {\n this.#listen();\n }", "handleSubscribe() {\n // Callback invoked whenever a new event message is received\n const messageCallback = (response) => {\n console.log('Segment Membership PE fired: ', JSON.stringify(response));\n // Response contains the payload of the new message received\n this.notifier = JSON.stringify(response);\n this.refresh = true;\n // refresh LWC\n if(response.data.payload.Category__c == 'Segmentation') {\n this.getData();\n }\n \n\n\n };\n\n // Invoke subscribe method of empApi. Pass reference to messageCallback\n subscribe(this.channelName, -1, messageCallback).then(response => {\n // Response contains the subscription information on subscribe call\n console.log('Subscription request sent to: ', JSON.stringify(response.channel));\n this.subscription = response;\n this.toggleSubscribeButton(true);\n });\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(SUBSCRIBER);\n }", "function setDataListener(request, onData)\n{\n\tvar buffer = '';\n\t\n\trequest.on('data', function(chunk){\n\t\tbuffer += chunk;\n\t})\n\t\n\trequest.on('end', function(){\n\t\tonData(buffer);\n\t});\n}", "_connectEvents () {\n this._socket.on('sensorChanged', this._onSensorChanged);\n this._socket.on('deviceWasClosed', this._onDisconnect);\n this._socket.on('disconnect', this._onDisconnect);\n }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n lib$1.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "onopen() {\n debug(\"open\");\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n super.emit(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on_1.on(socket, \"ping\", this.onping.bind(this)), on_1.on(socket, \"data\", this.ondata.bind(this)), on_1.on(socket, \"error\", this.onerror.bind(this)), on_1.on(socket, \"close\", this.onclose.bind(this)), on_1.on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }", "subscribeToEvent(eventName, listener){\n this._eventEmmiter.on(eventName, listener);\n }", "function onData(data) {\n\n // Attach or extend receive buffer\n _receiveBuffer = (null === _receiveBuffer) ? data : Buffer.concat([_receiveBuffer, data]);\n\n // Pop all messages until the buffer is exhausted\n while(null !== _receiveBuffer && _receiveBuffer.length > 3) {\n var size = _receiveBuffer.readInt32BE(0);\n\n // Early exit processing if we don't have enough data yet\n if((size + 4) > _receiveBuffer.length) {\n break;\n }\n\n // Pull out the message\n var json = _receiveBuffer.toString('utf8', 4, (size + 4));\n\n // Resize the receive buffer\n _receiveBuffer = ((size + 4) === _receiveBuffer.length) ? null : _receiveBuffer.slice((size + 4));\n\n // Parse the message as a JSON object\n try {\n var msgObj = JSON.parse(json);\n\n // emit the generic message received event\n _self.emit('message', msgObj);\n\n // emit an object-type specific event\n if((typeof msgObj.messageName) === 'undefined') {\n _self.emit('unknown', msgObj);\n } else {\n _self.emit(msgObj.messageName, msgObj);\n }\n }\n catch(ex) {\n _self.emit('exception', ex);\n }\n }\n }", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n client.subscribe(temp_topic);\n client.subscribe(humidity_topic);\n client.subscribe(light_topic);\n}", "function newListener(outputFunction) {\n var dataStart = true;\n var recievedData = new Array;\n return function reciever(signal) {\n if (dataStart) {\n if (!signal) {\n dataStart = false;\n } else {\n return 1;\n };\n };\n if (signal) {\n recievedData[recievedData.length-1] += 1;\n } else {\n recievedData.push(-1);\n }\n area.innerText = recievedData.join(\"|\");\n \n }\n}", "function subscribe (listener) {\n\t if (typeof listener !== 'function') {\n\t throw new Error('listener must be a function.')\n\t }\n\t var currentId = id;\n\t listeners[currentId] = listener;\n\t id += 1;\n\t return currentId\n\t }", "function subscribe (listener) {\n\t if (typeof listener !== 'function') {\n\t throw new Error('listener must be a function.')\n\t }\n\t var currentId = id;\n\t listeners[currentId] = listener;\n\t id += 1;\n\t return currentId\n\t }", "function subscribe($scope) {\n socket.on('create reach', function (item) {\n listContainer.push(item);\n\n if (typeof(onListChangedFn) !== 'undefined') {\n onListChangedFn(listContainer);\n }\n });\n\n // Clean up.\n if(typeof($scope) !== 'undefined') {\n $scope.$on(\"$destroy\", function () {\n unsubscribe();\n });\n }\n }", "function onListening() {\n var addr = Dich_vu.address();\n var bind = typeof addr === 'string'\n ? 'pipe ' + addr\n : 'port ' + addr.port;\n console.log('Listening on ' + bind);\n}", "function onConnect() {\n\t\tclient.subscribe(endpoints.Liveliness, onData);\n\t}", "function onConnect() {\n // Once a connection has been made, make a subscription and send a message.\n console.log(\"onConnect\");\n client.subscribe(topic);\n }", "function _subscribe(type, opts) {\n sc.subscribe(type, opts, (err, data) => {\n onCallback(\"Subscribe\", type, err, data);\n });\n\n setListener(type);\n}", "function emitData() {\n // While there are `data` listeners and items, emit them\n var item;\n while (this._hasListeners('data') && (item = this.read()) !== null)\n this.emit('data', item);\n // Stop draining the source if there are no more `data` listeners\n if (!this._hasListeners('data') && !this.done) {\n this.removeListener('readable', emitData);\n this._addSingleListener('newListener', waitForDataListener);\n }\n}" ]
[ "0.6750277", "0.66075", "0.6567859", "0.6429837", "0.64089686", "0.6402483", "0.6361166", "0.63215816", "0.6285055", "0.6283506", "0.6281141", "0.62720525", "0.621081", "0.61862016", "0.6184958", "0.61642575", "0.61564994", "0.6145766", "0.6134912", "0.6117304", "0.6096442", "0.60737616", "0.6072818", "0.60658056", "0.6046524", "0.5990012", "0.5986615", "0.59834546", "0.59613913", "0.5960655", "0.5960028", "0.59577423", "0.59575456", "0.59529525", "0.5952688", "0.59478265", "0.592317", "0.59184694", "0.59167117", "0.5904917", "0.59048474", "0.589535", "0.58930254", "0.58928853", "0.58910334", "0.5879785", "0.5856009", "0.5856009", "0.58447134", "0.58266914", "0.5826302", "0.58115196", "0.57985586", "0.5798425", "0.5789316", "0.57815677", "0.578144", "0.57789683", "0.5774686", "0.5771491", "0.5767258", "0.57632506", "0.5759572", "0.575739", "0.5753761", "0.57532215", "0.5732883", "0.5730434", "0.5726221", "0.5723815", "0.5717922", "0.57126576", "0.570986", "0.5708457", "0.5699256", "0.5692402", "0.56871986", "0.56870615", "0.5685988", "0.5679772", "0.5678511", "0.5678421", "0.5678421", "0.5671838", "0.5668912", "0.5663422", "0.5659318", "0.5650894", "0.56424177", "0.5632374", "0.56317556", "0.5628591", "0.5627071", "0.56234103", "0.56234103", "0.5623378", "0.5623335", "0.5618763", "0.5614442", "0.5612989", "0.5610536" ]
0.0
-1
This method should be called by your internal implementation to send data to listeners like the InFlow and/or IteratorFlow
send(data){ Flow.from(this.listeners).where(listener => listener.notify && Util.isFunction(listener.notify)).foreach(listener => listener.notify(data)); Flow.from(this.listeners).where(listener => !(listener.notify && Util.isFunction(listener.notify)) && Util.isFunction(listener)).foreach(listener => listener(data)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dispatch(data) {\n this._receiveListener(data);\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "onData(data) {\n this.emit(\"data\", data);\n this.onSuccess();\n }", "function onData(data) {\n\n // Attach or extend receive buffer\n _receiveBuffer = (null === _receiveBuffer) ? data : Buffer.concat([_receiveBuffer, data]);\n\n // Pop all messages until the buffer is exhausted\n while(null !== _receiveBuffer && _receiveBuffer.length > 3) {\n var size = _receiveBuffer.readInt32BE(0);\n\n // Early exit processing if we don't have enough data yet\n if((size + 4) > _receiveBuffer.length) {\n break;\n }\n\n // Pull out the message\n var json = _receiveBuffer.toString('utf8', 4, (size + 4));\n\n // Resize the receive buffer\n _receiveBuffer = ((size + 4) === _receiveBuffer.length) ? null : _receiveBuffer.slice((size + 4));\n\n // Parse the message as a JSON object\n try {\n var msgObj = JSON.parse(json);\n\n // emit the generic message received event\n _self.emit('message', msgObj);\n\n // emit an object-type specific event\n if((typeof msgObj.messageName) === 'undefined') {\n _self.emit('unknown', msgObj);\n } else {\n _self.emit(msgObj.messageName, msgObj);\n }\n }\n catch(ex) {\n _self.emit('exception', ex);\n }\n }\n }", "function ondata(data) {\n\tswitch (data.type) {\n\t\tcase 'publish':\n\t\t\tsaveMsg.call(this, data.channel, data.msg);\n\t\t\tonNewData.call(this, data.channel, data.msg);\n\t\t\tbreak;\n\t\tcase 'subscribe':\n\t\t\tchsSub.call(this, data.id, data.channels);\n\t\t\tonNewSubscr.call(this, data.id, data.channels);\n\t\t\tbreak;\n\t\tcase 'notify':\n\t\t\tonNewNotifications.call(this, data.notifications);\n\t\t\tbreak;\n\t}\n}", "listenForData() {\n this.socket.on(EVENT_DATA, data => this.handleData(data))\n }", "_sendData() {\n\n }", "function emitData() {\n // While there are `data` listeners and items, emit them\n var item;\n while (this._hasListeners('data') && (item = this.read()) !== null)\n this.emit('data', item);\n // Stop draining the source if there are no more `data` listeners\n if (!this._hasListeners('data') && !this.done) {\n this.removeListener('readable', emitData);\n this._addSingleListener('newListener', waitForDataListener);\n }\n}", "onData(data) {\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n }\n }", "onDataReceived(data) {\n /*\n All received data is appended to a ReceiveBuffer.\n This makes sure that all the data we need is received before we attempt to process it.\n */\n this._receiveBuffer.append(data);\n // Process data that we have.\n this.processData();\n }", "function realHandler(data) {\n self.bytesReceived += data.length;\n self._receiver.add(data);\n }", "function realHandler(data) {\n self.bytesReceived += data.length;\n self._receiver.add(data);\n }", "function realHandler(data) {\n self.bytesReceived += data.length;\n self._receiver.add(data);\n }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n parser.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n parser.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "onData(data) {\n debug(\"polling got data %s\", data);\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose();\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n (0, engine_io_parser_1.decodePayload)(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "static listen(data){\n\t\t\tswitch (data.event) {\n\t\t\t\tcase \"createPlaceableObjects\":\n\t\t\t\t\t{\n\t\t\t\t\t\tlet [parent, createdObjs, options, userId] = data.eventdata;\n\t\t\t\t\t\tparent = game.scenes.get(parent._id);\n\t\t\t\t\t\tHooks.callAll(\"createPlaceableObjects\", parent, createdObjs, options, userId);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"AttachToToken\":\n\t\t\t\t\tif(TokenAttacher.isFirstActiveGM())\tTokenAttacher._AttachToToken(...data.eventdata);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DetachFromToken\":\n\t\t\t\t\tif(TokenAttacher.isFirstActiveGM())\tTokenAttacher._DetachFromToken(...data.eventdata);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"attachElementsToToken\":\n\t\t\t\t\tif(TokenAttacher.isFirstActiveGM())\tTokenAttacher._attachElementsToToken(...data.eventdata);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"detachElementsFromToken\":\n\t\t\t\t\tif(TokenAttacher.isFirstActiveGM())\tTokenAttacher._detachElementsFromToken(...data.eventdata);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ReattachAfterUndo\":\n\t\t\t\t\tif(TokenAttacher.isFirstActiveGM())\tTokenAttacher._ReattachAfterUndo(...data.eventdata);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"UpdateAttachedOfBase\":\n\t\t\t\t\tif(TokenAttacher.isFirstActiveGM())\tTokenAttacher._UpdateAttachedOfBase(...data.eventdata);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"setElementsLockStatus\":\n\t\t\t\t\tif(TokenAttacher.isFirstActiveGM())\tTokenAttacher._setElementsLockStatus(...data.eventdata);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.log(\"Token Attacher| wtf did I just read?\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "on(data) {\n switch (data.type) {\n case ACTION_TYPES.CHANGE_GRAMMAR:\n this.onGrammar(data.grammar);\n break;\n case ACTION_TYPES.MOVE_CURSOR:\n this.onCursorMoved(data.cursor, data.user);\n break;\n case ACTION_TYPES.HIGHLIGHT:\n this.onHighlight(data.newRange, data.userId);\n break;\n case ACTION_TYPES.CHANGE_FILE:\n this.onChange(data.path, data.buffer);\n break;\n default:\n }\n }", "function DataEmitter() {\n}", "processData(socket, data) {\n\n rideProcess.listen(socket, data);\n\n\n }", "function sendEvent(data, localHandler = function (data) {\n }) {\n /*now we serve the queue as well*/\n localHandler(data);\n eventQueue.forEach(fn => fn(data));\n }", "onData(data) {\n const self = this;\n debug(\"polling got data %s\", data);\n const callback = function(packet, index, total) {\n // if its the first message we consider the transport open\n if (\"opening\" === self.readyState && packet.type === \"open\") {\n self.onOpen();\n }\n\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n self.onClose();\n return false;\n }\n\n // otherwise bypass onData and handle the message\n self.onPacket(packet);\n };\n\n // decode payload\n lib$1.decodePayload(data, this.socket.binaryType).forEach(callback);\n\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "function onrecieveData(data)\n{\n\t for (myConnection in connections) \n\t { // iterate over the array of connections\n\t\tconnections[myConnection].send(data); // send the data to each connection\n\t }\n\tconsole.log(\"Received data: \" + data);\n}", "constructor() {\n super();\n\n this._Add_event(\"offer\");\n this._Add_event(\"data_in\");\n this._Add_event(\"file_end\");\n }", "on() {\n socket.emit('OUTPUT', { index: this.index, method: 'on' });\n }", "function onEvent(type, data) {\n eventsBuffer.push({type: type, data: data});\n }", "recieveData(data) {\n switch (data.event) {\n\n //Start game event.\n case \"begin-game\":\n if (this.gameState === 0) {\n this.handleStartGame();\n this.handleStartTurn();\n }\n break;\n //Event for joining a team\n case \"join-team\":\n this.handleJoinTeam(data);\n break;\n\n //This just forwards team chat.\n case \"team-chat\":\n this.handleTeamChat(data);\n break;\n\n //This happens when the client submits the red hint data.\n case \"red-hints\":\n this.handleRedHints(data);\n break;\n //This happens when the client submits the blue hint data.\n case \"blue-hints\":\n this.handleBlueHints(data);\n break;\n\n //When guesses are being made, update selections across all clients\n case \"red-selections\":\n this.handleRedSelections(data);\n break;\n case \"blue-selections\":\n this.handleBlueSelections(data);\n break;\n\n //This event contains guess data for each team.\n case \"submit-guess\":\n this.handleGuess(data);\n break;\n\n //Round is over, clients are ready for the next round to begin.\n case \"next-round\":\n if (this.gameState === 5) {\n this.advanceTurnOrder();\n this.currentRound += 1;\n this.handleStartTurn();\n }\n break;\n\n //Reset the game for a new one.\n case \"new-game\":\n if (this.gameState === 6) {\n this.handleNewGame();\n }\n break;\n default:\n break;\n }\n }", "send(event, data) {\n\t\t// Don't bother sending anything if we're disconnected\n\t\tif (status.server.connected === false) {\n\t\t\t// log.msg('Server disconnected, cannot send message);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.intf === null) return;\n\n\t\tif (event !== 'bus-tx') return;\n\n\t\tlet dst = data.bus;\n\n\t\tlet message = {\n\t\t\thost : {\n\t\t\t\tname : status.system.host.short,\n\t\t\t\tintf : status.system.intf,\n\t\t\t},\n\n\t\t\tevent : event,\n\t\t\tdata : data,\n\t\t};\n\n\t\t// Encode object as AMP message\n\t\tlet amp_message = new amp();\n\t\tamp_message.push(message);\n\n\t\t// Send AMP message over zeroMQ\n\t\tthis.intf.send([ dst, app_intf + '-tx', amp_message.toBuffer() ]);\n\t}", "onDispatch(data) {\n console.log(\"signal-client onDispatch\");\n var self = this;\n self.emit('dispatch', {selfId: data.sourceId, targetId: data.targetId});\n }", "onData(data) {\n debug(\"polling got data %s\", data);\n\n const callback = packet => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n } // if its a close packet, we close the ongoing requests\n\n\n if (\"close\" === packet.type) {\n this.onClose();\n return false;\n } // otherwise bypass onData and handle the message\n\n\n this.onPacket(packet);\n }; // decode payload\n\n\n parser.decodePayload(data, this.socket.binaryType).forEach(callback); // if an event did not trigger closing\n\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emit(\"pollComplete\");\n\n if (\"open\" === this.readyState) {\n this.poll();\n } else {\n debug('ignoring poll - transport state \"%s\"', this.readyState);\n }\n }\n }", "_constructCallbacks() {\n\t\tthis._contract.on(\"PriceSent\", this._receivePrice.bind(this));\n\n\t\tthis._contract.on(\"InvoiceSent\", this._receiveInvoice.bind(this));\n\t}", "_emitChange() {\n // Must create array copy so React may detect changes\n const payload = this.queue.map(info => {\n const { stream, ...metaInfo } = info;\n return { ...metaInfo }\n });\n this.onQueueChange(payload);\n }", "function sendBack(obj){\n zAu.send(new zk.Event(widget, \"onData\", obj, {toServer:true}));\n}", "sending () {\n }", "onRequestWillBeSent(data) {\n // NOTE: data.timestamp -> time, data.type -> resourceType\n this.networkManager._dispatcher.requestWillBeSent(data.requestId,\n data.frameId, data.loaderId, data.documentURL, data.request,\n data.timestamp, data.wallTime, data.initiator, data.redirectResponse,\n data.type);\n }", "onRequestWillBeSent(data) {\n // NOTE: data.timestamp -> time, data.type -> resourceType\n this.networkManager._dispatcher.requestWillBeSent(data.requestId,\n data.frameId, data.loaderId, data.documentURL, data.request,\n data.timestamp, data.wallTime, data.initiator, data.redirectResponse,\n data.type);\n }", "function sliderChange(e) {\n socket.emit('data request', dataRequestPayload());\n}", "function send_data (ev_type, ev_data) {\n\t\t\n\t\t/*\n\t\t * Send the mouse data to the framework, to sync with other clients */\n\t\tf_handle_cached.send_info('*', ev_type, ev_data, 0);\n\t}", "resume() {\r\n\t\tthis._input.on(\"data\", this._dataListener);\r\n\t}", "senddata(e, Data) {\n return socket.emit('req', { event: e, data: Data });\n }", "function notifySubscribers() {\n var eventPayload = {\n routeObj: getCurrentRoute(), // { route:, data: }\n fragment: getURLFragment()\n };\n\n _subject.onNext(eventPayload);\n }", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n });\n this.sendBuffer = [];\n }", "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "data(data) {\n this.__processEvent('data', data);\n }", "send(data) {\n if (this._readyState !== 'open')\n throw new errors_1.InvalidStateError('not open');\n if (typeof data === 'string') {\n this._channel.notify('datachannel.send', this._internal, data);\n }\n else if (data instanceof ArrayBuffer) {\n const buffer = Buffer.from(data);\n this._channel.notify('datachannel.sendBinary', this._internal, buffer.toString('base64'));\n }\n else if (data instanceof Buffer) {\n this._channel.notify('datachannel.sendBinary', this._internal, data.toString('base64'));\n }\n else {\n throw new TypeError('invalid data type');\n }\n }", "emit(name, data) {\n this.params$.onNext(data);\n\n let handler = this.handlers[name];\n\n if (handler !== null && handler !== undefined) {\n this.handlers$.onNext(handler);\n } else {\n this.handlers$.onNext(undefined);\n }\n }", "function EventEmitter(){}// Shortcuts to improve speed and size", "_received(data) {\n console.log('This is getting called...');\n // const element = this.statusTarget\n // element.innerHTML = data\n }", "function trigger(event, data) {\n console.log(event);\n if(subscribers[event] && subscribers[event].length) {\n for(var i = 0; i < subscribers[event].length ; i++) {\n subscribers[event][i](data);\n }\n }\n }", "on_assign_data() {\n }", "sendIn(text) {\n this.emit('message', { data: text });\n }", "function emitter() {\n\tvar i;\n\t// store stringified data\n\t// append new line character so can determine end of JSON object\n\tstringified = JSON.stringify(bobj) + '\\n';\n\t// emit data on every socket connection in eList\n\tfor (i in eList)\n\t\teList[i].write(stringified);\n\t// cleanup\n\tstringified = '';\n\tbobj = {};\n}", "function onData(event) {\n\t\tif(event.getSubject() != '/pushlet/ping') {\n\t\t\tif(event.getSubject() == 'system_online') {\n\t\t\t\tsystemOnline(event);\n\t\t\t} else {\n\t\t\t\tif(event.getSubject() == 'system_logout') {\n\t\t\t\t\tsystemLogout(event);\n\t\t\t\t} else {\n\t\t\t\t\tif(event.getSubject() == 'system_chat') {\n\t\t\t\t\t\tsystemChat(event);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(event.getSubject() == 'system_notice') {\n\t\t\t\t\t\t\tsystemNotice(event);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(globalDataPower.noticeTypeCode[event.getSubject()]['point']) {\n\t\t\t\t\t\t\t\teval(globalDataPower.noticeTypeCode[event.getSubject()]['point'] + \".call(window, event)\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => this.packet(packet));\n this.sendBuffer = [];\n }", "handleOutboundInput() {\n for (var x = 0; x < this.outboundMessages.length; x++) {\n this.socket.emit(this.outboundMessages[x].command, this.outboundMessages[x].data);\n }\n this.outboundMessages = [];\n }", "send(data) {\n if (data === void 0 && typeof this.dataDelegate === 'function') {\n data = this.dataDelegate();\n }\n return this.handleSocketEvent('data', data);\n }", "broadcast(kind, data) {\n // TODO [LOW] optimize with dynamic subchans\n this._connection.io.to(this._gameId).emit(kind, data);\n }", "function sendmsg(data, evType, newValue){\n\t//console.log(objPath);\n\tport.postMessage({msgType: \"RecordedEvent\", \"data\": data, \"evType\": evType, \"newValue\" : newValue});\n}", "function sendData() {\n dispatch(\n addPoll({\n question: question,\n options: options,\n status: status,\n }),\n )\n history.replace('/view-poll')\n }", "function sendData(newData,avg10,avg1000){\n newData.title = 'newData';\n newData.description = 'Data prints in at 1/s';\n avg10.title = 'avg10';\n avg10.description = 'average of the last 10 shots';\n avg1000.title = 'avg1000';\n avg1000.description = 'average of last 1000 shots';\n var brainDataChunk = [ newData, avg10, avg1000 ];\n // var brainDataChunk = [ newData ];\n console.log( brainDataChunk );\n io.sockets.emit( 'brain-data' , brainDataChunk );\n}", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => this.packet(packet));\n this.sendBuffer = [];\n }", "emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => this.packet(packet));\n this.sendBuffer = [];\n }", "apply() {\n this.engine.receive([this])\n }", "static listenSocketEvents() {\n Socket.shared.on(\"wallet:updated\", (data) => {\n let logger = Logger.create(\"wallet:updated\");\n logger.info(\"enter\", data);\n\n Redux.dispatch(Wallet.actions.walletUpdatedEvent(data));\n });\n }", "function onReceiveImportantData(data) {\n console.log(\"Important data: \" + data);\n}", "function listen() {\r\n __sco.on(\"message\", react);\r\n }", "onMessage(event) {\n try {\n const data = JSON.parse(event.data);\n // data.event is used to lookup which registered listener to call\n this.ee.emit(data.event, data);\n } catch (error) {\n this.ee.emit('error', error);\n }\n }", "function setupDataChannel() {\n\t\tcheckDataChannelState();\n\t\tdataChannel.onopen = checkDataChannelState;\n\t\tdataChannel.onclose = checkDataChannelState;\n\t\tdataChannel.onmessage = Reversi.remoteMessage;\n\t}", "handleLocalData(data) {\n const count = data[data.length - 3];\n const blockId = this.executeCheckList[count];\n if (blockId) {\n const socketData = this.handler.encode();\n socketData.blockId = blockId;\n this.setSocketData({\n data,\n socketData,\n });\n this.socket.send(socketData);\n }\n }", "publish (data) {\n this.subscribers.forEach(subscriber => {\n subscriber(data);\n });\n }", "importSucceeded(data) {\n this.socket.emit('importSucceeded', data);\n }", "send_data_to_partner(data_received){\n\t\tclients[data_received['person_b']].socket.emit('data_received',{'type' : 'partner_data', 'content': data_received['content']});\n\t}", "_sendData(events, requestKey, type) {\n this._subscriptions[requestKey]\n .filter(subscription => {\n return subscription.type === type;\n })\n .forEach(subscription => {\n let result = subscription.convert(events);\n subscription.data(result);\n });\n }", "function emitMsg(data) {\n // console.log('\\n\\n\\nEmitting message\\n\\n\\n')\n ioClient.emit('new message', data)\n}", "onData(chunk) {\n this.chunks.push(chunk);\n }", "onData(chunk) {\n this.chunks.push(chunk);\n }", "function onInputFired (data) {\r\n\tvar movePlayer = find_playerid(this.id, this.room); \r\n\t\r\n\t\r\n\tif (!movePlayer) {\r\n\t\treturn;\r\n\t\tconsole.log('no player'); \r\n\t}\r\n\r\n\t//when sendData is true, we send the data back to client. \r\n\tif (!movePlayer.sendData) {\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t//every 50ms, we send the data. \r\n\tsetTimeout(function() {movePlayer.sendData = true}, 50);\r\n\t//we set sendData to false when we send the data. \r\n\tmovePlayer.sendData = false;\r\n\t\r\n\t//Make a new pointer with the new inputs from the client. \r\n\t//contains player positions in server\r\n\tvar serverPointer = {\r\n\t\tx: data.pointer_x,\r\n\t\ty: data.pointer_y,\r\n\t\tworldX: data.pointer_worldx, \t\t\r\n\t\tworldY: data.pointer_worldy\r\n\t}\r\n\t\r\n //moving the player to the new inputs from the player\r\n\tif (physics.distanceToPointer(movePlayer, serverPointer) <= 30) {\r\n\t\tmovePlayer.body.angle = physics.movetoPointer(movePlayer, 0, serverPointer, 1000);\r\n\t} else {\r\n\t\tmovePlayer.body.angle = physics.movetoPointer(movePlayer, movePlayer.speed, serverPointer);\t\r\n\t}\r\n\t\r\n\t//new player position to be sent back to client. \r\n\tvar info = {\r\n\t\tx: movePlayer.body.position[0],\r\n\t\ty: movePlayer.body.position[1],\r\n\t\tangle: movePlayer.body.angle\r\n\t}\r\n\r\n\t//send to sender (not to every clients). \r\n\tthis.emit('input_recieved', info);\r\n\t\r\n\t//data to be sent back to everyone except sender \r\n\tvar moveplayerData = {\r\n\t\tid: movePlayer.id, \r\n\t\tx: movePlayer.body.position[0],\r\n\t\ty: movePlayer.body.position[1],\r\n\t\tangle: movePlayer.body.angle,\r\n\t}\r\n\t\r\n\t//send to everyone except sender \r\n\tthis.broadcast.emit('enemy_move', moveplayerData);\r\n}", "handlePositionChangeEvent(data) {\n console.log('in handlePositionChangeEvent method '+ JSON.stringify(data));\n let dataObj = data.data;\n this.calculateNewCoinDataSet(dataObj.playerType, dataObj.positionFrom,\n dataObj.positionTo, dataObj.coinId);\n this.changePlayerTurnToNextPlayer();\n }", "listenRequests() {\n this.request(event.detail.request);\n }", "onopen() {\n debug(\"open\");\n // clear old subs\n this.cleanup();\n // mark as open\n this.readyState = \"open\";\n super.emit(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on_1.on(socket, \"data\", component_bind_1.default(this, \"ondata\")));\n this.subs.push(on_1.on(socket, \"ping\", component_bind_1.default(this, \"onping\")));\n this.subs.push(on_1.on(socket, \"error\", component_bind_1.default(this, \"onerror\")));\n this.subs.push(on_1.on(socket, \"close\", component_bind_1.default(this, \"onclose\")));\n this.subs.push(on_1.on(this.decoder, \"decoded\", component_bind_1.default(this, \"ondecoded\")));\n }", "importRequestData() {\n const message = '[DC] Import complete';\n this.socket.emit('importRequestData', message);\n }", "onStreamStart() {\n if (this.onStartTrigger.length > 0) {\n this.onStartTrigger.forEach(trigger => {\n controller.handleData(trigger);\n })\n }\n }", "onReceive(data)\n {\n //console.log(\"RX:\", data);\n\n // Capture the data\n this.receivedBuffers.push(data);\n\n // Resolve waiting promise\n if (this.waiter)\n this.waiter();\n }", "getData () {\n if (data) {\n this.data = data;\n this.emit('change', this.data);\n }\n }", "receiveInputData() {\n const receivedItem = {};\n receivedItem.title = document.getElementById('input-item').value;\n // receivedItem.status = \"active\";\n this.data.push(receivedItem);\n this.addItem(receivedItem);\n }", "rxGameData(evt) {\n // JitsiExternalAPI::endpointTextMessageReceived event arguments format: \n // evt = {\n // data: {\n // senderInfo: {\n // jid: \"string\", // the jid of the sender\n // id: \"string\" // the participant id of the sender\n // },\n // eventData: {\n // name: \"string\", // the name of the datachannel event: `endpoint-text-message`\n // text: \"string\" // the received text from the sender\n // }\n // }\n //};\n const data = JSON.parse(evt.data.eventData.text);\n if (data.hax === APP_FINGERPRINT) {\n const evt2 = new CallaUserEvent(evt.data.senderInfo.id, data);\n this.dispatchEvent(evt2);\n }\n }", "listenRequests() {\n this.request(event.detail.request);\n }", "_onRead(data) {\n\t this.valueBytes.write(data);\n\t }", "function receiveInventory(receivedInventoryData) {\n inventoryData = receivedInventoryData;\n saveInventory();\n }", "static get observers() {\n return [\n 'handle_input_data_changed(inputData)'\n ]\n }", "sendData(message, data){\n this.socket.emit(message, data);\n }", "constructor( data ){\n this._emitter = new EventTarget();\n this._converters = new Map();\n this._dynamicProperties = false;\n this._data = data;\n }", "setupDataHandlers() {\n this.dc.onmessage = (e) => {\n var msg = JSON.parse(e.data);\n console.log(\"received message over data channel:\" + msg);\n };\n this.dc.onclose = () => {\n this.remoteStream.getVideoTracks()[0].stop();\n console.log(\"The Data Channel is Closed\");\n };\n }", "function broadcastInput(data) {\n socket.emit('keywordAdded', data);\n }", "broadcastEvent(msg, data) {\n this.socket.emit('bc', {msg: msg, data: data});\n this.gameEngine.emit(msg, Object.assign({\n playerId: this.playerId\n }, data));\n }", "handleRemoteData({ receiveHandler = {} }) {\n// console.log('handleRemoteData');\n const { data: handlerData } = receiveHandler;\n if (_.isEmpty(handlerData)) {\n return;\n }\n\n Object.keys(handlerData).forEach((id) => {\n const { type, data } = handlerData[id] || {};\n if (\n _.findIndex(this.sendBuffers, { id }) === -1 &&\n this.executeCheckList.indexOf(id) === -1\n ) {\n const sendData = this.makeData(type, data);\n this.sendBuffers.push({\n id,\n data: sendData,\n index: this.executeCount,\n });\n }\n });\n }", "send(event, data, callback) {\n\t\tWSFormatter.send(this, event, data, callback);\n\t}" ]
[ "0.64082885", "0.62990487", "0.62565744", "0.6215769", "0.6215769", "0.6215769", "0.61426413", "0.60756236", "0.60725445", "0.6047418", "0.6030183", "0.6023809", "0.5988507", "0.59221447", "0.59221447", "0.59221447", "0.59020776", "0.59020776", "0.5895517", "0.588165", "0.58688277", "0.58588547", "0.5847683", "0.58475935", "0.58347017", "0.580714", "0.57848203", "0.57804734", "0.5761901", "0.5728413", "0.5728401", "0.5715922", "0.56793207", "0.5679002", "0.56784403", "0.5647875", "0.56335974", "0.56282765", "0.56282765", "0.56171626", "0.56163186", "0.56151026", "0.5606167", "0.5593658", "0.55890787", "0.5587089", "0.5585123", "0.5576922", "0.55741316", "0.55617946", "0.5551737", "0.5548557", "0.5532323", "0.5522771", "0.55216825", "0.5517062", "0.5515918", "0.5513294", "0.5497778", "0.54963034", "0.5492596", "0.54864687", "0.5479073", "0.5478097", "0.5478097", "0.54777724", "0.5465269", "0.54568654", "0.54541415", "0.54495174", "0.54488695", "0.5447545", "0.5440834", "0.54339767", "0.542969", "0.5427005", "0.54256696", "0.54208773", "0.54208773", "0.5420382", "0.5418744", "0.5418516", "0.54119986", "0.54117537", "0.54066753", "0.5406044", "0.5403808", "0.5399034", "0.5394877", "0.53864264", "0.53853184", "0.5385097", "0.5381846", "0.53811795", "0.5380417", "0.5371608", "0.53703403", "0.5362608", "0.5360517", "0.5356376" ]
0.73781633
0
This method will be used by the InFlow/IteratorFlow to unsubscribe from receiving stream data. When stopPush is called on element of the Flow chain
unsubscribe(listener){ let index = this.listeners.indexOf(listener); if( index >= 0 ) this.listeners.splice(index, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stop() {\r\n Utils.log('ttt-pusher stop() stopping pusher');\r\n this.data.pusherContext && this.data.pusherContext.stop();\r\n }", "stop () {\n const priv = privs.get(this)\n if (!priv.receiving) return\n priv.receiving = false\n priv.emitter.removeListener(priv.eventName, priv.receive)\n if (priv.watchError) {\n priv.emitter.removeListener('error', priv.receiveError)\n }\n priv.emitter = null\n priv.receive = null\n priv.receiveError = null\n priv.fail = null\n priv.updated = null\n priv.values = null\n }", "stop()\n\t{\n\t\t//Don't call it twice\n\t\tif (!this.receiver) return;\n\t\t\n\t\t//for each encoding\n\t\tfor (let encoding of this.encodings.values())\n\t\t\t//Stop the depacketizer\n\t\t\tencoding.depacketizer.Stop();\n\t\t\n\t\t/**\n\t\t* IncomingStreamTrack stopped event\n\t\t*\n\t\t* @event IncomingStreamTrack#stopped\n\t\t* @type {object}\n\t\t*/\n\t\tthis.emitter.emit(\"stopped\");\n\t\t\n\t\t//remove encpodings\n\t\tthis.encodings.clear();\n\t\t\n\t\t//Remove transport reference, so destructor is called on GC\n\t\tthis.receiver = null;\n\t}", "stop()\n\t{\n\t\t//Don't call it twice\n\t\tif (this.stopped) return;\n\n\t\t//Stopped\n\t\tthis.stopped = true;\n\t\t/**\n\t\t* IncomingStreamTrack stopped event\n\t\t*\n\t\t* @name stopped\n\t\t* @memberof IncomingStreamTrack\n\t\t* @kind event\n\t\t* @argument {IncomingStreamTrack} incomingStreamTrack\n\t\t*/\n\t\tthis.emitter.emit(\"stopped\",this);\n\t\t\n\t\t//remove encodings\n\t\tthis.encodings.clear();\n\t\tthis.depacketizer = null;\n\t\t\n\t\t//Remove transport reference, so destructor is called on GC\n\t\tthis.bridge = null;\n\t\tthis.receiver = null;\n\t}", "stop () {\n debug('Push interactor stopped')\n if (this._worker_executor !== undefined) {\n clearInterval(this._worker_executor)\n this._worker_executor = null\n }\n if (this._cacheFS._worker !== undefined) {\n clearInterval(this._cacheFS._worker)\n this._cacheFS._worker = null\n }\n }", "static unsubscribeFromStreams() {\n if (!streamsSubscription)\n throw new Error('There is currently no active streams real time data update subscriptions.');\n\n streamsSubscription();\n streamsSubscription = null;\n }", "unsubscribe() {\n this.bufferSubscriptions.dispose();\n this.bufferSubscriptions = new Atom.CompositeDisposable();\n }", "onStreamStop() {\n if (this.onStopTrigger.length > 0) {\n this.onStopTrigger.forEach(trigger => {\n controller.handleData(trigger);\n })\n }\n }", "unsubscribe() {\n if (this.subscriptions.length === 0) return;\n while (this.subscriptions.length > 0)\n this.subscriptions.pop().dispose();\n }", "stop() {\n this._state = 0;\n clearTimeout(this._audioTimer);\n this._audioTimer = null;\n this._playableStream.removeAllListeners('readable');\n this._playableStream = null;\n this._interpolateBreak();\n }", "destroy() {\n this._clearListeners();\n this._pending = [];\n this._targetStream.complete();\n }", "unsubscribe() {\n mainLog.info('Unsubscribing from Lightning gRPC streams')\n this.mainWindow = null\n Object.keys(this.subscriptions).forEach(subscription => {\n if (this.subscriptions[subscription]) {\n this.subscriptions[subscription].cancel()\n this.subscriptions[subscription] = null\n }\n })\n }", "_destroy() {\r\n\t\tif (this._interval) clearInterval(this._interval)\r\n\t\tthis._internalStream.removeAllListeners()\r\n\t\tthis._internalStream = null\r\n\t\tthis._destroyed = true\r\n\t}", "_doPush(){//This works best for streaming from filesystem (since it is static/finite) and JS generators too...\n var obj;\n\n if( !this.isDiscretized ) {\n while(true) {\n if (!this.isListening || this.pos >= this.iterators.length)\n break;\n //get the data from the current iterator\n obj = this.iterators[this.pos].next();\n\n //check for the next iterator that has data\n while (obj.done && this.pos < this.iterators.length) {\n this.pos++;\n if (this.pos >= this.iterators.length)\n break;\n\n obj = this.iterators[this.pos].next();\n }\n\n if (obj.done)\n break;\n\n this.push(obj.value);\n }\n }\n else{//for discretized flows\n //ensure that our discrete stream length is not more than the number of iterators we have\n this.discreteStreamLength = Math.min(this.discreteStreamLength, this.iterators.length);\n\n if( this.discreteStreamLength == 1 ){//operate on one stream first and then move to the next\n do{\n obj = this.iterators[this.pos].next();\n while( !obj.done ){\n this.streamElements.push(obj.value);\n\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n }\n\n obj = this.iterators[this.pos].next();\n }\n\n //At this point, if we have elements in the stream, we fill it will nulls since we are instructed to\n //discretize with one iterator\n if( this.streamElements.length > 0 ){\n while(true) {\n this.streamElements.push(null);\n if( this.isDataEndObject.isDataEnd(obj.value, this.streamElements.length) ){\n this.push(this.streamElements.slice());\n this.streamElements = [];\n break;\n }\n }\n }\n\n this.pos++;\n }while( this.pos < this.iterators.length );\n }\n else{\n var ended = []; //we need this since the iterators reset...we need to know the ones that have ended\n //a flag that states if the last check was data end. Because we cannot peek into the iterator, we have to\n //waste one round of iteration to discover that they have all ended which will create null data.\n var justEnded = false;\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n ended.push(false);\n }\n\n do{\n var pack = [];\n\n for(let i = 0; i < this.discreteStreamLength; i++){\n if( ended[i] )\n pack[i] = null;\n else {\n obj = this.iterators[i].next();\n if( obj.done ) {\n ended[i] = true;\n pack[i] = null;\n }\n else\n pack[i] = obj.value;\n }\n }\n\n //check if we just ended on the last iteration and this current sets of data are just nulls\n if( justEnded && Flow.from(pack).allMatch((input) => input == null) )\n break;\n\n this.streamElements.push(pack);\n\n if( this.isDataEndObject.isDataEnd(pack, this.streamElements.length) ){\n justEnded = true;\n this.push(this.streamElements.slice());\n this.streamElements = [];\n\n //check if all items have ended\n if( Flow.from(ended).allMatch((input) => input) )\n break;\n }\n else\n justEnded = false;\n }while(true);\n }\n }\n\n this.isListening = false; //we done processing so stop listening\n this.pos = 0; //reset the pos for other operations\n }", "unwatchStreamStatus() {\n const tracks = this.stream.getTracks();\n for (let track of tracks) {\n track.onended = null;\n }\n }", "stop() {\n this.statusSubject.next();\n }", "stop() {\n\n // exit if no stream is active\n if (typeof this._stream === 'undefined') {\n return;\n }\n\n // loop through all stream tracks (audio + video) and stop them\n this._stream.getTracks().forEach(function(track) {\n track.stop();\n });\n\n // reset the media element\n this._media.srcObject = null;\n }", "deQueue() {\n this._dataStore.shift();\n this._length--;\n }", "function stop() {\n\t\tclearTimeout(t._loopTimer);\n\t\tsockets[0].removeAllListeners();\n\t\tsockets[1].removeAllListeners();\n\t} // end private stop", "stop() {\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.feedStartTime = null;\n }\n }", "function stopStream(event) {\n\tsocket.send(\"ended\");\n}", "stop() {\n this.running = false;\n // Tell the server we are done in order to save resources. We cannot wait for the result.\n // This may fail when socket connection is not open, thus ignore errors in queueRequest\n const endRequest = Object.assign(Object.assign({}, this.request), { method: \"unsubscribe\" });\n try {\n this.socket.queueRequest(JSON.stringify(endRequest));\n }\n catch (error) {\n if (error instanceof Error && error.message.match(/socket has disconnected/i)) {\n // ignore\n }\n else {\n throw error;\n }\n }\n }", "function onMessageReceivedUnsubscribe() {\n self.registration.pushManager.getSubscription()\n .then(subscription => subscription.unsubscribe())\n .then(() => {\n // OPTIONALLY IMPLEMENT: Forward the unsubscription to your server here\n broadcastReply(WorkerMessengerCommand.AMP_UNSUBSCRIBE, null);\n });\n }", "stopPolling() {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }", "stopPolling() {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }", "stopPolling() {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }", "function unsubscribePush() {\n navigator.serviceWorker.ready\n .then(function (registration) {\n // Mendapatkan 'push subscription'\n registration.pushManager.getSubscription()\n .then(function (subscription) {\n // Jika tidak ada 'push subscription, kembali\n if (!subscription) {\n alert('Tidak dapat membatalkan push notification.');\n return;\n }\n // Berhenti melanggan 'push notification'\n subscription.unsubscribe()\n .then(function () {\n toast('berhasil berhenti melanggan.');\n console.info('Push notification berhenti dilanggan.');\n console.log(subscription);\n //deleteSubscriptionID(subscription);\n changePushStatus(false);\n })\n .catch(function (error) {\n console.error(error);\n });\n })\n .catch(function (error) {\n console.error('Gagal untuk berhenti melanggan push notification.');\n });\n })\n }", "function stop() {\n if (!started)\n return;\n started = false;\n loading.value = false;\n onStopHandlers.forEach(function (handler) { return handler(); });\n onStopHandlers = [];\n if (query.value) {\n query.value.stopPolling();\n query.value = null;\n }\n if (observer) {\n observer.unsubscribe();\n observer = null;\n }\n }", "function handleRemoteStreamRemove(evt) {\n console.log('Removed a remote stream Event: ', evt);\n }", "stopRecv() {\n this._handle._stop_recv();\n }", "stopRequesting() {\n this.data = [];\n clearInterval(this.data_request);\n }", "dispose() {\n\t\twhile(this._subscriptions.length) {\n\t\t\tthis._subscriptions.shift().unsubscribe();\n\t\t}\n\t}", "unsubscribe() {\n this.subscriptions.forEach((unsub) => unsub());\n }", "stop() {\n this.isRunning = false; // Clear the general queue\n\n this._queue.clear(); // Clear the cold call queue\n\n\n this._coldCallQueue.clear();\n\n this._cleanInterval.clear(); // Abort the individual peer queues\n\n\n const queues = Object.values(this._queues);\n queues.forEach(dialQueue => {\n dialQueue.abort();\n delete this._queues[dialQueue.id];\n });\n }", "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n }", "stop() {\n let cnt = this._iaStack.length;\n if (cnt == 0) {\n return;\n } \n if (this._iaStack[cnt-1].stop) {\n this._iaStack[cnt-1].stop();\n }\n this._iaStack.pop();\n }", "unsubscribe() {\n this.subscriptions.forEach((unsub) => unsub());\n this.subscriptions = [];\n }", "_clearState() {\n this.log.debug('[Demux] Clearing demux state');\n\n clearTimeout(this.timeoutId);\n\n for (const sinkData of this.sinkMap.values()) {\n this._sinkClose(sinkData);\n }\n }", "function cleanup(){source.removeListener('data',ondata);dest.removeListener('drain',ondrain);source.removeListener('end',onend);source.removeListener('close',onclose);source.removeListener('error',onerror);dest.removeListener('error',onerror);source.removeListener('end',cleanup);source.removeListener('close',cleanup);dest.removeListener('close',cleanup);}", "function cleanup(){source.removeListener('data',ondata);dest.removeListener('drain',ondrain);source.removeListener('end',onend);source.removeListener('close',onclose);source.removeListener('error',onerror);dest.removeListener('error',onerror);source.removeListener('end',cleanup);source.removeListener('close',cleanup);dest.removeListener('close',cleanup);}", "function cleanup(){source.removeListener('data',ondata);dest.removeListener('drain',ondrain);source.removeListener('end',onend);source.removeListener('close',onclose);source.removeListener('error',onerror);dest.removeListener('error',onerror);source.removeListener('end',cleanup);source.removeListener('close',cleanup);dest.removeListener('close',cleanup);}", "function cleanup(){source.removeListener('data',ondata);dest.removeListener('drain',ondrain);source.removeListener('end',onend);source.removeListener('close',onclose);source.removeListener('error',onerror);dest.removeListener('error',onerror);source.removeListener('end',cleanup);source.removeListener('close',cleanup);dest.removeListener('close',cleanup);}", "function shutdownReceiver() {\n if (!window.currentStream) {\n return;\n }\n\n var player = document.getElementById('player');\n player.src = '';\n var tracks = window.currentStream.getTracks();\n for (var i = 0; i < tracks.length; ++i) {\n tracks[i].stop();\n }\n window.currentStream = null;\n\n document.body.className = 'shutdown';\n}", "unsubAll () {\n this._subscribers.clear()\n }", "stop() {\n this.running = false;\n this.debug('stopping listening to queue');\n }", "unsubscribe() {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const doUnsubscribe = (sub) => {\n if (sub === null) {\n throw new Error('Not subscribed to push notifications.');\n }\n return sub.unsubscribe().then(success => {\n if (!success) {\n throw new Error('Unsubscribe failed!');\n }\n this.subscriptionChanges.next(null);\n });\n };\n return this.subscription.pipe(take(1), switchMap(doUnsubscribe)).toPromise();\n }", "function stopStream() {\n\tstream.close();\n}", "_listen(){\n if( this.isDiscretized ) {//for discretized flows...maintain the subscription state for consistency\n var streamers = []; //the order with which we should arrange data in discretized flows\n\n for (let iterator of this.iterators) {\n if (iterator.streamer) {\n streamers.push(iterator.streamer);\n subscribeToStream(iterator.streamer, this);\n }\n }\n\n //set up the basics for a discretized push\n //this.recall.streamers = streamers; //save the order in recall\n this.recall.streamKeys = Flow.from(streamers).select((streamer) => streamer.key).collect(Flow.toArray);\n this.recall.queues = Flow.from(streamers).select((streamer) => new Queue()).collect(Flow.toArray);\n this.discreteStreamLength = Math.min(streamers.length, this.discreteStreamLength); //ensure minimum\n this.recall.ready = true; //a flag that ensures we do not have more than one setTimeout function in queue\n this.recall.called = false; //if we have called the setTimeout function at least once\n this.streamElements = [];\n }\n else{//subscribe to Streamers\n for (let iterator of this.iterators) {\n if( iterator.streamer )\n subscribeToStream(iterator.streamer, this);\n }\n }\n }", "async function unsubscribePooling ({ state }) {\n const api = state.origin.split('/')[0].replace(/\\*/g, '+'),\n origin = state.origin.replace(`${api}/`, '').replace(/\\*/g, '+')\n if (loopId) {\n clearInterval(loopId)\n messagesBuffer = []\n loopId = 0\n }\n const filter = state.filter ? `$filter/payload=${encodeURIComponent(state.filter)}${state.cid ? `&cid=${state.cid}` : ''}` : undefined\n await Vue.connector.unsubscribeLogs(api, origin, '#', undefined, { prefix: filter })\n state.realtimeEnabled = false\n logger.info(`unsubscribed to Logs ${api} ${origin} ${state.active} ${filter || ''}`)\n }", "clear() {\n wasm.raweventqueue_clear(this.ptr);\n }", "stopUp() {\r\n this.socket.emit('Stop up', this.number);\r\n this.stopUpNext();\r\n }", "unlisten() {\n this.media_.removeListener(this.handler_)\n }", "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n dest.removeListener('close', cleanup);\n }", "stopDataLoop() {\n clearInterval(this.intervalId);\n }", "function onRemoteStreamRemoved(event) {\n console.log(\"Remove remote stream\");\n remotevid.src = \"\";\n }", "function _stopReceive(event) {\n console.log(\"Stop :\", event.timestamp);\n}", "unsubscribe() {\n const sub = this.sub\n , url = this.url;\n if (url && sub) {\n debug('sub.disconnect: %s', this.url)\n try {\n sub.disconnect(this.url);\n }\n catch(_e) {/* ignore */}\n sub.unsubscribe(this[secretBuf$]);\n clearTimeout(this._pulseTimeout);\n this._pulseTimeout = null;\n }\n }", "stop() {\n this.listening_ = false;\n this.chromeEvent_.removeListener(this.callback_);\n }", "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n dest.removeListener('close', cleanup);\n }", "async stop() {\n this.setState({ isRunning: false }, async () => {\n if (this._subscriptions) {\n await this._apiClient.zmqUnsubscribe(\n {\n subscriptionIds: this._subscriptions.map(s => s.subscriptionId)\n });\n\n this._subscriptions = [];\n }\n });\n }", "stop() {\n // Stop the Unarchiver (which will kill the worker) and then delete the unarchiver\n // which should free up some memory, including the unarchived array buffer.\n this.unarchiver.stop();\n this.unarchiver = null;\n }", "function cleanup() {\r\n source.removeListener('data', ondata);\r\n dest.removeListener('drain', ondrain);\r\n\r\n source.removeListener('end', onend);\r\n source.removeListener('close', onclose);\r\n\r\n source.removeListener('error', onerror);\r\n dest.removeListener('error', onerror);\r\n\r\n source.removeListener('end', cleanup);\r\n source.removeListener('close', cleanup);\r\n\r\n dest.removeListener('close', cleanup);\r\n }", "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }", "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }", "remove() {\n //remove handlers of any atomic data defined here\n const {source, handler} = this.events;\n source.remove();\n //reset `this.events` \n this.events = {};\n }", "remove() {\n //remove handlers of any atomic data defined here\n const {source, handler} = this.events;\n source.remove();\n //reset `this.events` \n this.events = {};\n }", "remove(stream) {\n stream.on('data', quad => {\n this.removeQuad(quad);\n });\n return stream;\n }", "removeRemoteStream(elem) {\n this._addOrRemoveRemoteStream(false\n /* remove */\n , elem);\n }", "deactivate(){\n // unsubscribe all\n for(let t in this.subscriptionTokens){\n this.topicData.unsubscribe(t);\n }\n }", "removeRemoteStream(elem) {\n this._addOrRemoveRemoteStream(false /* remove */, elem);\n }", "function stopPublishing() {\n if (publisher) {\n // Stop the stream\n session.unpublish(publisher);\n publisher = null;\n }\n\n document.getElementById(\"status\").innerHTML = \"Stopping your stream...\";\n hide(\"unpublishLink\");\n hide(\"signalLink\");\n show(\"publishLink\");\n }", "stop() {\n clearInterval(this.interval);\n this.parent.senders = this.parent.senders.filter(function(value) {\n if (value === this) {\n return false;\n }\n return true;\n });\n this.socket.close();\n }", "unsubscribe(eventName, handler) {\n if (!this.ready) {\n return this.queue.push({op: 'unsubscribe', eventName, handler });\n }\n this.socket.removeListener(eventName, handler);\n }", "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }", "cleanup() {\n const { stream } = this;\n stream.getTracks().forEach(track => {\n track.stop();\n stream.removeTrack(track);\n });\n }", "_unlisten() {\n const that = this;\n\n if (that._trackListener) {\n that._trackListener.unlisten();\n }\n\n if (that._fillListener) {\n that._fillListener.unlisten();\n }\n\n if (that._lineListener) {\n that._lineListener.unlisten();\n }\n }", "deactivateStreaming() {\n\t\tif (this.socket !== null) {\n\t\t\tthis.socket.disconnect();\n\t\t\tthis.socket = null;\n\t\t}\n\t}", "Stop(skip) {\n // blocks if the client is not playing\n if(this.isPlaying) {\n // closes the audio stream, empties the queue and stops playing\n if(!skip) {\n this.queue = [];\n this.Leave();\n this.dispatcher.end();\n }\n // shifts onward\n else\n this.dispatcher.end();\n }\n }", "function onclose(){dest.removeListener('finish',onfinish);unpipe();}", "function onclose(){dest.removeListener('finish',onfinish);unpipe();}", "function onclose(){dest.removeListener('finish',onfinish);unpipe();}", "function onclose(){dest.removeListener('finish',onfinish);unpipe();}", "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n dest.removeListener('close', cleanup);\n }", "function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n dest.removeListener('close', cleanup);\n }", "clear () {\n for (let i = 0; i < this.listeningIpcs.length; i++) {\n let pair = this.listeningIpcs[i];\n _ipc.removeListener( pair[0], pair[1] );\n }\n this.listeningIpcs.length = 0;\n }", "function onclose(){dest.removeListener(\"finish\",onfinish);unpipe()}", "stop () {\n listener.end();\n }", "stopEmit() {\n this.totalEmitTimes = -1;\n this.currentEmitTime = 0;\n this.isEmitting = false;\n }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('end', cleanup);\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }", "function cleanup() {\n\t source.removeListener('data', ondata);\n\t dest.removeListener('drain', ondrain);\n\n\t source.removeListener('end', onend);\n\t source.removeListener('close', onclose);\n\n\t source.removeListener('error', onerror);\n\t dest.removeListener('error', onerror);\n\n\t source.removeListener('end', cleanup);\n\t source.removeListener('close', cleanup);\n\n\t dest.removeListener('close', cleanup);\n\t }" ]
[ "0.69079596", "0.65906143", "0.65443397", "0.6526078", "0.62948966", "0.61777025", "0.61586237", "0.61419386", "0.6114692", "0.6060259", "0.603508", "0.5947886", "0.58970886", "0.5894296", "0.5830296", "0.57991934", "0.57971674", "0.57534665", "0.5739715", "0.569963", "0.56996226", "0.56909776", "0.5650068", "0.56449157", "0.56449157", "0.56449157", "0.56098676", "0.5591052", "0.5584651", "0.5548598", "0.5523749", "0.55175775", "0.5503858", "0.5491816", "0.5490043", "0.5489928", "0.5487247", "0.5482054", "0.54756606", "0.54756606", "0.54756606", "0.54756606", "0.54730034", "0.5472482", "0.5467498", "0.54643023", "0.5462115", "0.54491746", "0.5429324", "0.54283684", "0.5427834", "0.54255754", "0.5421313", "0.54190147", "0.5407807", "0.5402536", "0.5398675", "0.5395982", "0.53845626", "0.53834516", "0.53763354", "0.5373645", "0.5372971", "0.5372971", "0.5367975", "0.5367975", "0.53650117", "0.53617513", "0.5360535", "0.53518945", "0.5349451", "0.53431857", "0.5341801", "0.5324131", "0.53157467", "0.5314897", "0.5312875", "0.53126764", "0.5304484", "0.5304484", "0.5304484", "0.5304484", "0.5299511", "0.5299511", "0.52930105", "0.52927613", "0.52870786", "0.52856714", "0.5279973", "0.5277706", "0.5277706", "0.5277706", "0.5277706", "0.5277706", "0.5277706", "0.5277706", "0.5277706", "0.5277706", "0.5277706", "0.5277706", "0.5277706" ]
0.0
-1
Create a Flow from any object that implements the Javascript Iterable framework
static createIteratorFromIterable(iterable){ //TODO save state for restarting when Flow is being reused return iterable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static of(){\n if( arguments.length == 0 )\n return FlowFactory.getFlow([]);\n\n if( arguments.length > 1 )\n return FlowFactory.getFlow(arguments);\n\n if( arguments.length == 1 && Util.isNumber(arguments[0]) )\n return new IteratorFlow(FlowFactory.createIteratorWithEmptyArraysFromNumber(arguments[0]));\n\n return FlowFactory.getFlow(arguments[0]);\n }", "function Iterable() {}", "function FunctionIterable(fn){\n this.fn = fn\n}", "function ObjectIterable(obj){\n this.obj = obj\n this.keys = keys(obj)\n}", "function ArrayIterable(arr){\n this.arr = arr\n}", "function makeIterable(i) {\n function* fromIterator(i) {\n for (let r = i.next(); !r.done; r = i.next()) {\n yield r.value;\n }\n }\n function* fromIterable(i) {\n yield* i;\n }\n return isIterable(i) ? (isIterableIterator(i) ? i : fromIterable(i)) : fromIterator(i);\n}", "function Enumerable() {}", "*[Symbol.iterator]() {\n let i = 0\n while (i < this.size()) {\n yield this.get(i)\n i++\n }\n }", "*[Symbol.iterator]() {\n let pointer = this.head\n while (pointer) {\n yield pointer\n pointer = pointer.next\n }\n }", "function _ensureIterable(src) {\n if (src) {\n if (src[Symbol.iterator])\n return;\n if (typeof src === 'function' && src.constructor.name === 'GeneratorFunction')\n return;\n }\n throw new Error('the argument must be iterable!');\n }", "function readabletoIterable(readStream) {\n return __asyncGenerator(this, arguments, function readabletoIterable_1() {\n var streamEnded, generationEnded, records, value;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n streamEnded = false;\n generationEnded = false;\n records = new Array();\n readStream.on(\"error\", function (err) {\n if (!streamEnded) {\n streamEnded = true;\n }\n if (err) {\n throw err;\n }\n });\n readStream.on(\"data\", function (data) {\n records.push(data);\n });\n readStream.on(\"end\", function () {\n streamEnded = true;\n });\n _a.label = 1;\n case 1:\n if (!!generationEnded) return [3 /*break*/, 6];\n return [4 /*yield*/, __await(new Promise(function (resolve) { return setTimeout(function () { return resolve(records.shift()); }, 0); }))];\n case 2:\n value = _a.sent();\n if (!value) return [3 /*break*/, 5];\n return [4 /*yield*/, __await(value)];\n case 3: return [4 /*yield*/, _a.sent()];\n case 4:\n _a.sent();\n _a.label = 5;\n case 5:\n generationEnded = streamEnded && records.length === 0;\n return [3 /*break*/, 1];\n case 6: return [2 /*return*/];\n }\n });\n });\n}", "function StreamLikeSequence() {}", "*[Symbol.iterator]() {\n let values = this.values;\n for (let i = 0; i < values.length; i++)\n yield values[i];\n }", "static from(data){\n return FlowFactory.getFlow(data);\n }", "*[Symbol.iterator]() {\n const length = this.length;\n for (let i = 0 ; i < length ; i++) {\n yield this.get(i);\n }\n }", "constructor(iterable) {\n this.iterator = null;\n let artifacts = new IterationArtifacts(iterable);\n this.artifacts = artifacts;\n }", "constructor(iterable) {\n this.iterator = null;\n let artifacts = new IterationArtifacts(iterable);\n this.artifacts = artifacts;\n }", "function makeIterator(src, thisObj){\n\t if (src == null) {\n\t return identity;\n\t }\n\t switch(typeof src) {\n\t case 'function':\n\t // function is the first to improve perf (most common case)\n\t // also avoid using `Function#call` if not needed, which boosts\n\t // perf a lot in some cases\n\t return (typeof thisObj !== 'undefined')? function(val, i, arr){\n\t return src.call(thisObj, val, i, arr);\n\t } : src;\n\t case 'object':\n\t return function(val){\n\t return deepMatches(val, src);\n\t };\n\t case 'string':\n\t case 'number':\n\t return prop(src);\n\t }\n\t }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n \n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n \n return iterator\n }", "*[Symbol.iterator]() {\n let node = this.head;\n\n while(node) {\n yield node;\n node = node.next;\n }\n }", "function isIterable(input) {\n return input && typeof input[iterator] === 'function';\n }", "*[Symbol.iterator]() {\n let node = this.head;\n while (node) {\n yield node;\n node = node.next;\n }\n }", "function makeIterator(src, thisObj){\n if (src == null) {\n return identity;\n }\n switch(typeof src) {\n case 'function':\n // function is the first to improve perf (most common case)\n // also avoid using `Function#call` if not needed, which boosts\n // perf a lot in some cases\n return (typeof thisObj !== 'undefined')? function(val, i, arr){\n return src.call(thisObj, val, i, arr);\n } : src;\n case 'object':\n return function(val){\n return deepMatches(val, src);\n };\n case 'string':\n case 'number':\n return prop(src);\n }\n }", "function makeIterator(src, thisObj){\n if (src == null) {\n return identity;\n }\n switch(typeof src) {\n case 'function':\n // function is the first to improve perf (most common case)\n // also avoid using `Function#call` if not needed, which boosts\n // perf a lot in some cases\n return (typeof thisObj !== 'undefined')? function(val, i, arr){\n return src.call(thisObj, val, i, arr);\n } : src;\n case 'object':\n return function(val){\n return deepMatches(val, src);\n };\n case 'string':\n case 'number':\n return prop(src);\n }\n }", "function makeIterator(src, thisObj){\n if (src == null) {\n return identity;\n }\n switch(typeof src) {\n case 'function':\n // function is the first to improve perf (most common case)\n // also avoid using `Function#call` if not needed, which boosts\n // perf a lot in some cases\n return (typeof thisObj !== 'undefined')? function(val, i, arr){\n return src.call(thisObj, val, i, arr);\n } : src;\n case 'object':\n return function(val){\n return deepMatches(val, src);\n };\n case 'string':\n case 'number':\n return prop(src);\n }\n }", "function iteratorFor(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function isIterable(input) {\n return input && typeof input[__WEBPACK_IMPORTED_MODULE_0__symbol_iterator__[\"a\" /* iterator */]] === 'function';\n}", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "function makeReusableIterable(generatorFn) {\n return {\n [Symbol.iterator]: generatorFn\n };\n}", "function iteratorFor(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "* [Symbol.iterator] () {\n yield* this.items;\n }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "function fd(t){var e=\"function\"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}", "function iteratorFor(items) {\n\t\t var iterator = {\n\t\t next: function() {\n\t\t var value = items.shift()\n\t\t return {done: value === undefined, value: value}\n\t\t }\n\t\t }\n\t\t\n\t\t if (support.iterable) {\n\t\t iterator[Symbol.iterator] = function() {\n\t\t return iterator\n\t\t }\n\t\t }\n\t\t\n\t\t return iterator\n\t\t }", "function isIterable(input) {\n return input && typeof input[iterator_iterator] === 'function';\n}", "constructor(iterable) {\n this.iterator = null;\n let artifacts = new IterationArtifacts(iterable);\n this.artifacts = artifacts;\n }", "function Flow(nodeList, flows, node, type) {\n this.nodeList = nodeList;\n this.flows = flows;\n this.node = node;\n this.type = type;\n}", "function iteratorFor(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "function iteratorFor(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "function a(t){var e=\"function\"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function next() {\n\t var value = items.shift();\n\t return { done: value === undefined, value: value };\n\t }\n\t };\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function () {\n\t return iterator;\n\t };\n\t }\n\n\t return iterator;\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function next() {\n\t var value = items.shift();\n\t return { done: value === undefined, value: value };\n\t }\n\t };\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function () {\n\t return iterator;\n\t };\n\t }\n\n\t return iterator;\n\t }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function isIterable(input) {\n return input && typeof input[symbol_iterator/* iterator */.hZ] === 'function';\n}", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift();\n\t return {done: value === undefined, value: value}\n\t }\n\t };\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t };\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift();\n\t return {done: value === undefined, value: value}\n\t }\n\t };\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t };\n\t }\n\n\t return iterator\n\t }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "function isIterable(input) {\n\t return input && typeof input[iterator] === 'function';\n\t}", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "constructor(iterable) {\n this._available = undefined;\n this._pending = undefined;\n if (!utils_1.isIterable(iterable, /*optional*/ true))\n throw new TypeError(\"Object not iterable: iterable.\");\n if (!utils_1.isMissing(iterable)) {\n this._available = [];\n for (const value of iterable) {\n this._available.push(Promise.resolve(value));\n }\n }\n }", "function fromIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n if (!scheduler) {\n return new Observable(subscribeToIterable(input));\n }\n else {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var iterator$$1;\n sub.add(function () {\n if (iterator$$1 && typeof iterator$$1.return === 'function') {\n iterator$$1.return();\n }\n });\n sub.add(scheduler.schedule(function () {\n iterator$$1 = input[iterator]();\n sub.add(scheduler.schedule(function () {\n if (subscriber.closed) {\n return;\n }\n var value;\n var done;\n try {\n var result = iterator$$1.next();\n value = result.value;\n done = result.done;\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n this.schedule();\n }\n }));\n }));\n return sub;\n });\n }\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }" ]
[ "0.6666977", "0.63464296", "0.5896912", "0.56354374", "0.56059796", "0.5503439", "0.54766095", "0.54322994", "0.5401885", "0.5397467", "0.5382203", "0.5318642", "0.5275923", "0.5248009", "0.521134", "0.5196181", "0.5196181", "0.5191738", "0.5181552", "0.51783013", "0.51695806", "0.51647073", "0.5163205", "0.5163205", "0.5163205", "0.5151448", "0.5141312", "0.51400644", "0.51387936", "0.5138785", "0.5138785", "0.5138785", "0.5138785", "0.5138785", "0.5138785", "0.5138785", "0.5138785", "0.5138785", "0.5138785", "0.5138125", "0.51356065", "0.5128771", "0.5126946", "0.5126946", "0.5126946", "0.5126946", "0.5126946", "0.5126946", "0.5126946", "0.5126946", "0.5126946", "0.5126946", "0.5126946", "0.51260424", "0.5125263", "0.51213825", "0.5119756", "0.51195514", "0.511934", "0.511934", "0.5118392", "0.5116623", "0.5116623", "0.5112109", "0.51119727", "0.51101416", "0.51101416", "0.51101416", "0.5109916", "0.510878", "0.510878", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.50996023", "0.5099489", "0.50978404", "0.5094968", "0.50946254", "0.5086938", "0.5086938", "0.5086938", "0.5086938", "0.5086938", "0.5086938", "0.5086938", "0.5086938" ]
0.61491233
2
Create a Flow from a JS Generator
static createIteratorFromGenerator(gen){ return (function(_gen){ let gen = _gen; let iterator = gen(); let elem; return { next: function(){ try { elem = iterator.next(); return elem; } finally{ //create a new iterator for reuse. Note that this may not always replicate the initial //state based on how the data is retrieved. It is the responsibility of the programmer //to make this happen if reuse is required. if( elem.done ) iterator = gen(); } } }; })(gen); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static from(data){\n return FlowFactory.getFlow(data);\n }", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}", "function Generator() {}" ]
[ "0.6088698", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586", "0.58507586" ]
0.0
-1
Create a Flow from a Javascript Object, iterating through the properties and creating a propertyvalue pair
static createIteratorFromObject(object){ return (function(_object){ let object = _object; let keys = Object.keys(object); let pos = 0; let length = keys.length; return { next: function(){ try { return pos < length ? {value: {key: keys[pos], value: object[keys[pos]]}, done: false} : {done: true}; } finally{ pos++; if( pos > length ) { //reset the position to start after the last value is returned pos = 0; //incase the underlying data changes keys = Object.keys(object); length = keys.length; } } } }; })(object); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "astProperties(o) {\r\n\t\t\t\t\tvar computed, property, ref1, ref2;\r\n\t\t\t\t\tref1 = this.properties, [property] = slice1.call(ref1, -1);\r\n\t\t\t\t\tif (this.isJSXTag()) {\r\n\t\t\t\t\t\tproperty.name.jsx = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcomputed = property instanceof Index || !(((ref2 = property.name) != null ? ref2.unwrap() : void 0) instanceof PropertyName);\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tobject: this.object().ast(o, LEVEL_ACCESS),\r\n\t\t\t\t\t\tproperty: property.ast(o, (computed ? LEVEL_PAREN : void 0)),\r\n\t\t\t\t\t\tcomputed,\r\n\t\t\t\t\t\toptional: !!property.soak,\r\n\t\t\t\t\t\tshorthand: !!property.shorthand\r\n\t\t\t\t\t};\r\n\t\t\t\t}", "function propTypeToFlowTypeTransform(j, node, callback) {\n // instanceOf(), arrayOf(), etc..\n const {\n name\n } = node.callee.property;\n\n switch (name) {\n case _constants.PROPTYPES_IDENTIFIERS.INSTANCE_OF:\n return j.genericTypeAnnotation(node.arguments[0], null);\n\n case _constants.PROPTYPES_IDENTIFIERS.ARRAY_OF:\n return j.genericTypeAnnotation(j.identifier('Array'), j.typeParameterInstantiation([callback(j, null, node.arguments[0] || j.anyTypeAnnotation())]));\n\n case _constants.PROPTYPES_IDENTIFIERS.OBJECT_OF:\n return j.genericTypeAnnotation(j.identifier('Object'), j.typeParameterInstantiation([callback(j, null, node.arguments[0] || j.anyTypeAnnotation())]));\n\n case _constants.PROPTYPES_IDENTIFIERS.SHAPE:\n return j.objectTypeAnnotation(node.arguments[0].properties.map(arg => callback(j, arg.key, arg.value)));\n\n case _constants.PROPTYPES_IDENTIFIERS.ONE_OF:\n case _constants.PROPTYPES_IDENTIFIERS.ONE_OF_TYPE:\n return j.unionTypeAnnotation(node.arguments[0].elements.map(arg => callback(j, null, arg)));\n\n default:\n break;\n }\n}", "setProperties(properties) {\n for (const [key, value] of properties.entries()) {\n switch(key) {\n case \"type\": this.type = value;\n break;\n case \"startArrowHead\": this.startArrowHead = value;\n break;\n case \"endArrowHead\": this.endArrowHead = value;\n }\n }\n }", "function genProperties(){\n var result = {};\n\n // generates this structure\n //\"properties\": {\n // \"user\": {\n // \"type\": \"string\"\n // },\n // \"tweets\": {\n // \"type\": \"string\"\n // }\n //}\n\n for(var prop in body){\n result[prop] = {\n type: body[prop]\n }\n }\n\n return result;\n }", "createFlow() {\n // Very simple random unique ID generator\n this.formattedFlow.flowId = `${new Date().getTime()}`;\n this.formattedFlow.flowName = this.originalFlow.flow;\n this.formattedFlow.comment = this.originalFlow.comment;\n this.formattedFlow.startAt = this.originalFlow.startAt;\n this.formattedFlow.states = Object.assign({}, this.originalFlow.states);\n this.formattedFlow.flowStartTime = new Date().getTime();\n this.formattedFlow.flowExecutionTime = '';\n\n return { isError: false, code: this.code, item: this.formattedFlow };\n }", "function cfnPipelinePipelineObjectPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPipeline_PipelineObjectPropertyValidator(properties).assertSuccess();\n return {\n Fields: cdk.listMapper(cfnPipelineFieldPropertyToCloudFormation)(properties.fields),\n Id: cdk.stringToCloudFormation(properties.id),\n Name: cdk.stringToCloudFormation(properties.name),\n };\n}", "interface(properties) {\r\n const keys = Object.keys(properties);\r\n const decode = (input) => {\r\n if (!isObject(input)) {\r\n return Either_1.Left(reportError('an object', input));\r\n }\r\n const result = {};\r\n for (const key of keys) {\r\n if (!input.hasOwnProperty(key) &&\r\n !properties[key]._isOptional) {\r\n return Either_1.Left(`Problem with property \"${key}\": it does not exist in received object ${JSON.stringify(input)}`);\r\n }\r\n const decodedProperty = properties[key].decode(input[key]);\r\n if (decodedProperty.isLeft()) {\r\n return Either_1.Left(`Problem with the value of property \"${key}\": ${decodedProperty.extract()}`);\r\n }\r\n const value = decodedProperty.extract();\r\n if (value !== undefined) {\r\n result[key] = value;\r\n }\r\n }\r\n return Either_1.Right(result);\r\n };\r\n const encode = (input) => {\r\n const result = {};\r\n for (const key of keys) {\r\n result[key] = properties[key].encode(input[key]);\r\n }\r\n return result;\r\n };\r\n return {\r\n decode,\r\n encode,\r\n unsafeDecode: (input) => decode(input).mapLeft(Error).unsafeCoerce(),\r\n schema: () => keys.reduce((acc, key) => {\r\n const isOptional = properties[key]._isOptional;\r\n if (!isOptional) {\r\n acc.required.push(key);\r\n }\r\n acc.properties[key] = optimizeSchema(properties[key].schema());\r\n return acc;\r\n }, {\r\n type: 'object',\r\n properties: {},\r\n required: []\r\n })\r\n };\r\n }", "propertiesToObject(props) {\n const obj = {}\n props.forEach((elem) => {\n const key = elem.name;\n\n let value;\n if (elem.value) {\n // Some properties (e.g. with getters/setters) don't have a value.\n switch (elem.value.type) {\n case \"undefined\": value = undefined; break;\n default: value = elem.value.value; break;\n }\n }\n\n obj[key] = value;\n })\n\n return obj;\n }", "function cfnPipelineParameterObjectPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPipeline_ParameterObjectPropertyValidator(properties).assertSuccess();\n return {\n Attributes: cdk.listMapper(cfnPipelineParameterAttributePropertyToCloudFormation)(properties.attributes),\n Id: cdk.stringToCloudFormation(properties.id),\n };\n}", "function parseAndDisplayJS() {\n\n // iterate over objectsFromJS\n for(var i in objectsFromJS) {\n // pass both fields of the object to displayObject\n displayObject(objectsFromJS[i].h4, objectsFromJS[i][\"p\"]);\n }\n\n}", "function cfnPipelineActivityPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPipeline_ActivityPropertyValidator(properties).assertSuccess();\n return {\n AddAttributes: cfnPipelineAddAttributesPropertyToCloudFormation(properties.addAttributes),\n Channel: cfnPipelineChannelPropertyToCloudFormation(properties.channel),\n Datastore: cfnPipelineDatastorePropertyToCloudFormation(properties.datastore),\n DeviceRegistryEnrich: cfnPipelineDeviceRegistryEnrichPropertyToCloudFormation(properties.deviceRegistryEnrich),\n DeviceShadowEnrich: cfnPipelineDeviceShadowEnrichPropertyToCloudFormation(properties.deviceShadowEnrich),\n Filter: cfnPipelineFilterPropertyToCloudFormation(properties.filter),\n Lambda: cfnPipelineLambdaPropertyToCloudFormation(properties.lambda),\n Math: cfnPipelineMathPropertyToCloudFormation(properties.math),\n RemoveAttributes: cfnPipelineRemoveAttributesPropertyToCloudFormation(properties.removeAttributes),\n SelectAttributes: cfnPipelineSelectAttributesPropertyToCloudFormation(properties.selectAttributes),\n };\n}", "function createHTMLListFromObject(jsObject) {\n var list = document.createElement('ul');\n // Change the padding (top: 0, right:0, bottom:0 and left:1.5)\n list.style.padding = '0 0 0 1.5rem';\n // For each property of the object\n Object.keys(jsObject).forEach(function _(property) {\n // create item\n var item = document.createElement('li');\n // append property name\n item.appendChild(document.createTextNode(property));\n\n if (jsObject[property] === null) {\n jsObject[property] = 'null';\n }\n\n if (typeof jsObject[property] === 'object') {\n // if property value is an object, then recurse to\n // create a list from it\n item.appendChild(\n createHTMLListFromObject(jsObject[property]));\n } else {\n // else append the value of the property to the item\n item.appendChild(document.createTextNode(': '));\n item.appendChild(\n document.createTextNode(jsObject[property]));\n }\n list.appendChild(item);\n });\n return list;\n}", "function visitPropertySerialize (context, parameters, body, fields) {\n body.forEach(function (node) {\n if (node.type == 'IfStatement') {\n var conditional = {\n type: 'condition',\n conditions: []\n }\n createConditions(context, parameters, conditional.conditions, node)\n fields.push(conditional)\n } else {\n assert(node.type == 'ExpressionStatement')\n node = node.expression\n assert(node.type == 'CallExpression')\n assert(node.callee.name == '_')\n\n var arg = node.arguments[0]\n if (arg.type == 'Identifier') {\n assert(arg.name == context)\n arg = node.arguments[1]\n assert(arg.type == 'ObjectExpression')\n var integer = {\n type: 'integer',\n fields: []\n }\n arg.properties.forEach(function (property) {\n assert(property.type == 'Property')\n integer.fields.push({\n type: 'integer',\n name: property.key.name,\n endianness: 'b',\n bits: property.value.value\n })\n })\n fields.push(integer)\n } else {\n console.log(arg)\n assert(arg.type == 'MemberExpression')\n assert(arg.object.name == context)\n assert(arg.property.type == 'Identifier')\n var name = arg.property.name\n\n var arg = node.arguments[1]\n if (arg.type == 'FunctionExpression') {\n var structure = {\n name: name,\n type: 'structure',\n fields: []\n }\n visitPropertySerialize(name, parameters, arg.body.body, structure.fields)\n fields.push(structure)\n } else {\n var value = arg.value\n\n fields.push({\n name: name,\n type: 'integer',\n endianness: 'b',\n bits: value\n })\n }\n }\n }\n })\n}", "execStateScopeObject(obj) {\n const serialized_scope = this.getProperties(obj.objectId);\n const scope = this.propertiesToObject(serialized_scope);\n return { value : () => scope,\n property : (prop) =>\n this.execStateScopeObjectProperty(serialized_scope, prop),\n properties : () => serialized_scope.map(elem => elem.value),\n propertyNames : () => serialized_scope.map(elem => elem.name)\n };\n }", "function propTypeToFlowTypeMapper(j) {\n if (PropTypeToFlowTypeMap) {\n return PropTypeToFlowTypeMap;\n }\n\n PropTypeToFlowTypeMap = {\n [_constants.PROPTYPES_IDENTIFIERS.ANY]: j.anyTypeAnnotation(),\n [_constants.PROPTYPES_IDENTIFIERS.BOOLEAN]: j.booleanTypeAnnotation(),\n [_constants.PROPTYPES_IDENTIFIERS.NUMBER]: j.numberTypeAnnotation(),\n [_constants.PROPTYPES_IDENTIFIERS.STRING]: j.stringTypeAnnotation(),\n [_constants.PROPTYPES_IDENTIFIERS.FUNCTION]: j.genericTypeAnnotation(j.identifier('Function'), null),\n [_constants.PROPTYPES_IDENTIFIERS.OBJECT]: j.genericTypeAnnotation(j.identifier('Object'), null),\n [_constants.PROPTYPES_IDENTIFIERS.ARRAY]: j.genericTypeAnnotation(j.identifier('Array'), j.typeParameterInstantiation([j.anyTypeAnnotation()])),\n [_constants.PROPTYPES_IDENTIFIERS.ELEMENT]: j.genericTypeAnnotation(j.qualifiedTypeIdentifier(j.identifier('React'), j.identifier('Element')), null),\n [_constants.PROPTYPES_IDENTIFIERS.NODE]: j.unionTypeAnnotation([j.numberTypeAnnotation(), j.stringTypeAnnotation(), j.genericTypeAnnotation(j.qualifiedTypeIdentifier(j.identifier('React'), j.identifier('Element')), null), j.genericTypeAnnotation(j.identifier('Array'), j.typeParameterInstantiation([j.anyTypeAnnotation()]))])\n };\n return PropTypeToFlowTypeMap;\n}", "createEntityFrom(...properties) {\n const src = this.slice(...properties)\n return entity(toJS(src))\n }", "function functionalTransform(o) {\n for(var prop in o) {\n if(o.hasOwnProperty(prop) && typeof o[prop] !== 'function')\n o['f'+prop] = new Function(o[prop]);\n }\n }", "static initialize(obj, value, profileId) { \n obj['value'] = value;\n obj['profileId'] = profileId;\n }", "setProperties(properties) {\n this.checkTransactionStart();\n let before = clone(this.properties);\n for (let item in properties) {\n let val = properties[item];\n this.properties[item] = val;\n }\n this.emit('changeProperties', this.properties, before);\n return this.checkTransactionEnd();\n }", "function wrapProps$(props) {\n\tif (props === null) return (0, _streamy.stream)();\n\tif ((0, _streamy.isStream)(props)) {\n\t\treturn props;\n\t}\n\n\t// go through all the props and make them a stream\n\t// if they are objects, traverse them to check if they include streams\t\n\tvar props$Arr = Object.keys(props).map(function (propName, index) {\n\t\tvar value = props[propName];\n\t\tif ((0, _streamy.isStream)(value)) {\n\t\t\treturn value.map(function (value) {\n\t\t\t\treturn {\n\t\t\t\t\tkey: propName,\n\t\t\t\t\tvalue: value\n\t\t\t\t};\n\t\t\t});\n\t\t} else {\n\t\t\t// if it's an object, traverse the sub-object making it a stream\n\t\t\tif (value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {\n\t\t\t\treturn wrapProps$(value).map(function (value) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkey: propName,\n\t\t\t\t\t\tvalue: value\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t}\n\t\t\t// if it's a plain value wrap it in a stream\n\t\t\treturn (0, _streamy.stream)({\n\t\t\t\tkey: propName,\n\t\t\t\tvalue: value\n\t\t\t});\n\t\t}\n\t});\n\t// merge streams of all properties\n\t// on changes, reconstruct the properties object from the properties\n\treturn _streamy.merge$.apply(undefined, _toConsumableArray(props$Arr)).map(function (props) {\n\t\treturn props.reduce(function (obj, _ref3) {\n\t\t\tvar key = _ref3.key,\n\t\t\t value = _ref3.value;\n\n\t\t\tobj[key] = value;\n\t\t\treturn obj;\n\t\t}, {});\n\t});\n}", "function gen(obj) {\n function sub(m,name) {\n var p, i, typ = gettype(m), rc = {type:typ};\n switch (typ) {\n case 'number':\n case 'boolean':\n case 'string':\n case 'null':\n break;\n case 'array':\n if (m[0]===undefined) throw('array must be non-empty '+name);\n rc.items = sub(m[0], name);\n break;\n case 'object':\n rc.properties = {};\n var req = [];\n for (i in m) {\n rc.properties[i] = sub(m[i], i);\n req.push(i);\n }\n if (req.length)\n rc.required = req;\n break;\n \n default:\n console.log('ignoring unsupported type:', typ);\n }\n return rc;\n }\n return sub(obj,'');\n }", "keyFrameStateFrom(obj) {\n\t\tconst {state, ...styleProperties} = obj;\n\t\treturn {\n\t\t\t[state]: styleProperties\n\t\t};\n\t}", "function cfnPipelineChannelPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPipeline_ChannelPropertyValidator(properties).assertSuccess();\n return {\n ChannelName: cdk.stringToCloudFormation(properties.channelName),\n Name: cdk.stringToCloudFormation(properties.name),\n Next: cdk.stringToCloudFormation(properties.next),\n };\n}", "function cfnPipelineLambdaPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPipeline_LambdaPropertyValidator(properties).assertSuccess();\n return {\n BatchSize: cdk.numberToCloudFormation(properties.batchSize),\n LambdaName: cdk.stringToCloudFormation(properties.lambdaName),\n Name: cdk.stringToCloudFormation(properties.name),\n Next: cdk.stringToCloudFormation(properties.next),\n };\n}", "function cfnFunctionStreamSAMPTPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_StreamSAMPTPropertyValidator(properties).assertSuccess();\n return {\n StreamName: cdk.stringToCloudFormation(properties.streamName),\n };\n}", "function cfnFunctionStreamSAMPTPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_StreamSAMPTPropertyValidator(properties).assertSuccess();\n return {\n StreamName: cdk.stringToCloudFormation(properties.streamName),\n };\n}", "function Fay$$jsToFay(type,jsObj){\n var base = type[0];\n var args = type[1];\n var fayObj;\n switch(base){\n case \"action\": {\n // Unserialize a \"monadic\" JavaScript return value into a monadic value.\n fayObj = new Fay$$Monad(Fay$$jsToFay(args[0],jsObj));\n break;\n }\n case \"string\": {\n // Unserialize a JS string into Fay list (String).\n fayObj = Fay$$list(jsObj);\n break;\n }\n case \"list\": {\n // Unserialize a JS array into a Fay list ([a]).\n var serializedList = [];\n for (var i = 0, len = jsObj.length; i < len; i++) {\n // Unserialize each JS value into a Fay value, too.\n serializedList.push(Fay$$jsToFay(args[0],jsObj[i]));\n }\n // Pop it all in a Fay list.\n fayObj = Fay$$list(serializedList);\n break;\n }\n case \"tuple\": {\n // Unserialize a JS array into a Fay tuple ((a,b,c,...)).\n var serializedTuple = [];\n for (var i = 0, len = jsObj.length; i < len; i++) {\n // Unserialize each JS value into a Fay value, too.\n serializedTuple.push(Fay$$jsToFay(args[i],jsObj[i]));\n }\n // Pop it all in a Fay list.\n fayObj = Fay$$list(serializedTuple);\n break;\n }\n case \"defined\": {\n if (jsObj === undefined) {\n fayObj = new $_Language$Fay$FFI$Undefined();\n } else {\n fayObj = new $_Language$Fay$FFI$Defined(Fay$$jsToFay(args[0],jsObj));\n }\n break;\n }\n case \"nullable\": {\n if (jsObj === null) {\n fayObj = new $_Language$Fay$FFI$Null();\n } else {\n fayObj = new $_Language$Fay$FFI$Nullable(Fay$$jsToFay(args[0],jsObj));\n }\n break;\n }\n case \"double\": {\n // Doubles are unboxed, so there's nothing to do.\n fayObj = jsObj;\n break;\n }\n case \"int\": {\n // Int are unboxed, so there's no forcing to do.\n // But we can do validation that the int has no decimal places.\n // E.g. Math.round(x)!=x? throw \"NOT AN INTEGER, GET OUT!\"\n fayObj = Math.round(jsObj);\n if(fayObj!==jsObj) throw \"Argument \" + jsObj + \" is not an integer!\";\n break;\n }\n case \"bool\": {\n // Bools are unboxed.\n fayObj = jsObj;\n break;\n }\n case \"unknown\":\n case \"user\": {\n if (jsObj && jsObj['instance']) {\n fayObj = Fay$$jsToFayUserDefined(type,jsObj);\n }\n else\n fayObj = jsObj;\n break;\n }\n default: throw new Error(\"Unhandled JS->Fay translation type: \" + base);\n }\n return fayObj;\n}", "function objectProperties(someObj) {\n for(let propName in someObj) {\n propValue = someObj[propName]\n console.log(`${propName}: ${propValue}`);\n }\n}", "constructor(Addr) {\n this._Addr = Addr;\n this._Obj = host.createPointerObject(\n this._Addr,\n Module,\n 'JSObject*'\n );\n\n this._Properties = [];\n const Group = this._Obj.group_.value;\n this._ClassName = host.memory.readString(Group.clasp_.name);\n const NonNative = Group.clasp_.flags.bitwiseAnd(CLASS_NON_NATIVE).compareTo(0) != 0;\n if(NonNative) {\n return;\n }\n\n const Shape = host.createPointerObject(\n this._Obj.shapeOrExpando_.address,\n Module,\n 'js::Shape*'\n );\n\n const NativeObject = host.createPointerObject(Addr, Module, 'js::NativeObject*');\n\n if(this._ClassName == 'Array') {\n\n //\n // Optimization for 'length' property if 'Array' cf\n // js::ArrayObject::length / js::GetLengthProperty\n //\n\n const ObjectElements = heapslot_to_objectelements(NativeObject.elements_.address);\n this._Properties.push('length : ' + ObjectElements.length);\n return;\n }\n\n //\n // Walk the list of Shapes and get the property names\n //\n\n const Properties = {};\n let CurrentShape = Shape;\n while(CurrentShape.parent.value.address.compareTo(0) != 0) {\n const SlotIdx = CurrentShape.immutableFlags.bitwiseAnd(SLOT_MASK).asNumber();\n Properties[SlotIdx] = get_property_from_shape(CurrentShape);\n CurrentShape = CurrentShape.parent.value;\n }\n\n //\n // Walk the slots to get the values now (check NativeGetPropertyInline/GetExistingProperty)\n //\n\n const NativeObjectTypeSize = host.getModuleType(Module, 'js::NativeObject').size;\n const NativeObjectElements = NativeObject.address.add(NativeObjectTypeSize);\n const NativeObjectSlots = NativeObject.slots_.address;\n const Max = Shape.immutableFlags.bitwiseShiftRight(FIXED_SLOTS_SHIFT).asNumber();\n for(let Idx = 0; Idx < Object.keys(Properties).length; Idx++) {\n\n //\n // Check out NativeObject::getSlot()\n //\n\n const PropertyName = Properties[Idx];\n let PropertyValue = undefined;\n let ElementAddr = undefined;\n if(Idx < Max) {\n ElementAddr = NativeObjectElements.add(Idx * 8);\n } else {\n ElementAddr = NativeObjectSlots.add((Idx - Max) * 8);\n }\n\n const JSValue = read_u64(ElementAddr);\n PropertyValue = jsvalue_to_instance(JSValue);\n this._Properties.push(PropertyName + ' : ' + PropertyValue);\n }\n }", "parseObjectProperty() {\n\t\tlet propertyObject = {\n\t\t\tname: this.next(),\n\t\t};\n\n\t\tthis.skip('punctuation', ':');\n\n\t\tlet typeName = this.nextIf('identifier').value;\n\t\tpropertyObject.type = this.typestore.getDefinition(typeName);\n\n\t\treturn propertyObject;\n\t}", "function CfnFunction_StreamSAMPTPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('streamName', cdk.requiredValidator)(properties.streamName));\n errors.collect(cdk.propertyValidator('streamName', cdk.validateString)(properties.streamName));\n return errors.wrap('supplied properties not correct for \"StreamSAMPTProperty\"');\n}", "function cfnFunctionTableStreamSAMPTPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_TableStreamSAMPTPropertyValidator(properties).assertSuccess();\n return {\n StreamName: cdk.stringToCloudFormation(properties.streamName),\n TableName: cdk.stringToCloudFormation(properties.tableName),\n };\n}", "function cfnFunctionTableStreamSAMPTPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_TableStreamSAMPTPropertyValidator(properties).assertSuccess();\n return {\n StreamName: cdk.stringToCloudFormation(properties.streamName),\n TableName: cdk.stringToCloudFormation(properties.tableName),\n };\n}", "function each_pair_in_object_expression(ast, func) {\n if (! (ast && ast[\"type\"] == \"ObjectExpression\")) {\n return;\n }\n\n return _.each(ast[\"properties\"], function(p) {\n isFn(key_value(p[\"key\"]), p[\"value\"], p);\n });\n}", "_convertObjectToVar (prop, data) {\n return reduce(data, (all, value, metric) => {\n if (isObject(value)) {\n return all + Object.entries(value).map(([propKey, propValue]) => {\n return this._buildVar(\n this._propertyNameSanitizer(prop, `${metric}-${propKey}`),\n this._sanitizePropValue(propValue)\n )\n }).join('')\n } else {\n return all + this._buildVar(\n this._propertyNameSanitizer(prop, metric),\n this._sanitizePropValue(value)\n )\n }\n }, '')\n }", "function parseToJson(props, object) {\n for (var i = 0; i < props.length; i++) {\n object[props[i]] = JSON.parse(object[props[i]]);\n }\n return object;\n}", "function convertPropertiesToDefinitions(obj, defs) {\n procNode(obj);\n\n function procNode(obj) {\n if (obj.tag == 'path' && obj.properties['fill-pattern']) {\n convertFillPattern(obj.properties, defs);\n }\n if (obj.tag == 'image') {\n if (/\\.svg/.test(obj.properties.href || '')) {\n convertSvgImage(obj, defs);\n }\n } else if (obj.children) {\n obj.children.forEach(procNode);\n }\n }\n }", "add(properties) {\r\n return this.postCore({\r\n body: jsS(properties),\r\n });\r\n }", "add(properties) {\r\n return this.postCore({\r\n body: jsS(properties),\r\n });\r\n }", "add(properties) {\r\n return this.postCore({\r\n body: jsS(properties),\r\n });\r\n }", "static from(data){\n return FlowFactory.getFlow(data);\n }", "function cfnPipelineParameterValuePropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPipeline_ParameterValuePropertyValidator(properties).assertSuccess();\n return {\n Id: cdk.stringToCloudFormation(properties.id),\n StringValue: cdk.stringToCloudFormation(properties.stringValue),\n };\n}", "function makeEvent(obj) {\n // obj = { type:'ATTACK', value:7, stat:'crew' }\n // Deconstruct obj into variables from it's properties\n const { type, notification, text, value, products, stat } = obj // {type, value, stat}\n console.log(type, notification, text, value, products, stat)\n switch(obj.type) {\n case 'ATTACK':\n return new EventType(type, notification, text)\n case 'STAT-CHANGE': \n return new StatChange(type, notification, text, value, stat)\n case 'SHOP':\n return new ShopEvent(type, notification, text, products)\n default: \n return {} // Handle \n }\n}", "function cfnFunctionEventSourcePropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_EventSourcePropertyValidator(properties).assertSuccess();\n return {\n Properties: cdk.unionMapper([CfnFunction_S3EventPropertyValidator, CfnFunction_SNSEventPropertyValidator, CfnFunction_SQSEventPropertyValidator, CfnFunction_KinesisEventPropertyValidator, CfnFunction_DynamoDBEventPropertyValidator, CfnFunction_ApiEventPropertyValidator, CfnFunction_ScheduleEventPropertyValidator, CfnFunction_CloudWatchEventEventPropertyValidator, CfnFunction_CloudWatchLogsEventPropertyValidator, CfnFunction_IoTRuleEventPropertyValidator, CfnFunction_AlexaSkillEventPropertyValidator], [cfnFunctionS3EventPropertyToCloudFormation, cfnFunctionSNSEventPropertyToCloudFormation, cfnFunctionSQSEventPropertyToCloudFormation, cfnFunctionKinesisEventPropertyToCloudFormation, cfnFunctionDynamoDBEventPropertyToCloudFormation, cfnFunctionApiEventPropertyToCloudFormation, cfnFunctionScheduleEventPropertyToCloudFormation, cfnFunctionCloudWatchEventEventPropertyToCloudFormation, cfnFunctionCloudWatchLogsEventPropertyToCloudFormation, cfnFunctionIoTRuleEventPropertyToCloudFormation, cfnFunctionAlexaSkillEventPropertyToCloudFormation])(properties.properties),\n Type: cdk.stringToCloudFormation(properties.type),\n };\n}", "function getValsFromProperties(properties, maxLevel){\n //Store object entries as array of key/values for use\n const arrayProperties = Object.entries(properties);\n //Create a new object to store the new values\n const valProperties = {};\n //For each property have the key in valProperties the same as arrayProperties and the value our evaluated expression\n arrayProperties.forEach(it =>{\n //If statement to omit non expressions\n if(!it[1].includes(']') && it[0] !== 'action' && it[0] !== 'memo_PL' && !it[1].includes('Image<Rgba32>:')){\n valProperties[it[0]] = (Parser.evaluate(it[1], { x: maxLevel, d: Math.floor, u: Math.ceil, y: 1}));\n }\n });\n //Required to convert any milliseconds cooldowns into seconds cooldowns else we will have wrong cooldowns (like 500 secs instead of 0.5 secs) \n if(valProperties.cooltimeMS) { valProperties.cooltimeMS = valProperties.cooltimeMS * 0.001;}\n return valProperties;\n}", "function pick(obj, properties) {\n if (_typeof(obj) !== 'object') {\n return {};\n }\n\n return properties.reduce(function (newObj, prop, i) {\n if (typeof prop === 'function') {\n return newObj;\n }\n\n var newProp = prop;\n var match = prop.match(/^(.+?)\\sas\\s(.+?)$/i);\n\n if (match) {\n prop = match[1];\n newProp = match[2];\n }\n\n var value = obj[prop];\n\n if (typeof properties[i + 1] === 'function') {\n value = properties[i + 1](value, newObj);\n }\n\n if (typeof value !== 'undefined') {\n newObj[newProp] = value;\n }\n\n return newObj;\n }, {});\n}", "function cfnFunctionEventSourcePropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_EventSourcePropertyValidator(properties).assertSuccess();\n return {\n Properties: cdk.unionMapper([CfnFunction_S3EventPropertyValidator, CfnFunction_SNSEventPropertyValidator, CfnFunction_SQSEventPropertyValidator, CfnFunction_KinesisEventPropertyValidator, CfnFunction_DynamoDBEventPropertyValidator, CfnFunction_ApiEventPropertyValidator, CfnFunction_ScheduleEventPropertyValidator, CfnFunction_CloudWatchEventEventPropertyValidator, CfnFunction_CloudWatchLogsEventPropertyValidator, CfnFunction_IoTRuleEventPropertyValidator, CfnFunction_AlexaSkillEventPropertyValidator, CfnFunction_EventBridgeRuleEventPropertyValidator], [cfnFunctionS3EventPropertyToCloudFormation, cfnFunctionSNSEventPropertyToCloudFormation, cfnFunctionSQSEventPropertyToCloudFormation, cfnFunctionKinesisEventPropertyToCloudFormation, cfnFunctionDynamoDBEventPropertyToCloudFormation, cfnFunctionApiEventPropertyToCloudFormation, cfnFunctionScheduleEventPropertyToCloudFormation, cfnFunctionCloudWatchEventEventPropertyToCloudFormation, cfnFunctionCloudWatchLogsEventPropertyToCloudFormation, cfnFunctionIoTRuleEventPropertyToCloudFormation, cfnFunctionAlexaSkillEventPropertyToCloudFormation, cfnFunctionEventBridgeRuleEventPropertyToCloudFormation])(properties.properties),\n Type: cdk.stringToCloudFormation(properties.type),\n };\n}", "function CfnFunction_TableStreamSAMPTPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('streamName', cdk.requiredValidator)(properties.streamName));\n errors.collect(cdk.propertyValidator('streamName', cdk.validateString)(properties.streamName));\n errors.collect(cdk.propertyValidator('tableName', cdk.requiredValidator)(properties.tableName));\n errors.collect(cdk.propertyValidator('tableName', cdk.validateString)(properties.tableName));\n return errors.wrap('supplied properties not correct for \"TableStreamSAMPTProperty\"');\n}", "function read_object_from_form() {\n\n // compose object\n\n var new_obj = {};\n\n try {\n\n // keyid\n // remove all whitespace\n var keyId = document.querySelector(\"table.single_rule_table tr td[j_name=url_match]\").textContent;\n\n // validate data content\n console.debug(keyId);\n// restruct to characters that may appear in a domain name\n new_obj.keyId = keyId.replace(/[\\s]/gi,\"\").replace(/[^a-zA-Z0-9\\.:\\/\\-_]/gi,\"\");\n\n console.debug(new_obj.keyId);\n\n // url_match\n // remove all whitespace\n var url_match = document.querySelector(\"table.single_rule_table tr td[j_name=url_match]\").textContent;\n\n // validate data content\n // remove all whitespace\n new_obj.url_match = url_match.replace(/[\\s]/gi,\"\").replace(/[^a-zA-Z0-9\\.:\\/\\-_]/gi,\"\");\n\n // steps\n \n new_obj.steps = [];\n \n //var steps = [];\n var steps = document.querySelectorAll(\"table.steps_table tr.step_row\");\n console.debug(\"step count: \" + steps.length);\n var s = 0;\n while (s < steps.length && s < 12) {\n console.debug(steps[s]);\n // st[m].setAttribute(\"contenteditable\", \"false\");\n \n \tvar step = {};\n var procedure = \"\";\n var list = steps[s].querySelector(\"td[j_name=procedure] select\");\n console.debug(list);\n\n // is selection list, or just a single text value\n if (typeof list == 'undefined' || list == null) {\n // ok, no selection list\n console.debug(\"no dropdown\");\n procedure = steps[s].querySelector(\"td[j_name=procedure]\").textContent;\n\n } else {\n\n console.debug(list.options);\n console.debug(list.options);\n\n var selectedValue = list.options[list.selectedIndex];\n console.debug(selectedValue);\n procedure = selectedValue.getAttribute('value');\n\n }\n\n // console.debug(procedure);\n\n step.procedure = procedure ;\n // console.debug(step);\n\n // console.debug(JSON.stringify(step));\n\n // parameters for the step\n var parameters = [];\n \n var pt = steps[s].querySelectorAll(\"table.parameters_table tr.parameter\");\n // console.debug(pt);\n\n var p = 0;\n // maximum of 50 parameters\n while (p < pt.length && p < 50) {\n // console.debug(pt[p]);\n var value = \"\";\n // remove non-space whitespace characters\n value = pt[p].querySelector(\"td[j_name=value]\").textContent.replace(/ /gi,\"_place_holder_for_spacechar_\").replace(/[\\s]/gi,\"\").replace(/_place_holder_for_spacechar_/gi,\" \");\n // notes for this paramter\n var notes = \"\"; \n \tnotes = pt[p].querySelector(\"td[j_name=notes]\").textContent;\n\n // console.debug(\"parameter notes: \" + notes);\n var parameter = JSON.parse('{\"value\":\"' + value + '\",\"notes\":\"' + notes + '\"}');\n\n parameters.push(parameter);\n p++;\n }\n\n \n step.parameters = parameters;\n\n // notes for this step\n // console.debug(steps[s]);\n var step_notes = steps[s].querySelector(\"tr.step_row > td[j_name=notes]\").textContent;\n // console.debug(step_notes);\n\n // console.debug(\"step notes: \" + step_notes);\n\n step.notes = step_notes;\n // console.debug(JSON.stringify(step));\n new_obj.steps.push(step);\n \n //new_obj.steps = steps;\n s++;\n }\n\n // notes for this policy\n var notes = document.querySelector(\"table.single_rule_table tr > td[j_name=notes]\").textContent.replace(/[^\\w]/gi,\"\");\n\n console.debug(\"policy notes: \" + notes);\n\n // validate data content\n new_obj.notes = notes;\n // createtime\n\n var createtime = document.querySelector(\"td[j_name=createtime]\").textContent;\n // validate data format\n\n new_obj.createtime = createtime;\n // modifytime\n\n\n // compute current timestamp\n var today = new Date();\n\n var YYYY = today.getFullYear();\n var MM = (today.getMonth() + 1);\n var DD = (today.getDate() + 1);\n\n if (MM < 10) {\n MM = \"0\" + MM;\n }\n\n if (DD < 10) {\n DD = \"0\" + DD;\n }\n\n var HH = (today.getHours() + 1);\n\n if (HH < 10) {\n HH = \"0\" + HH;\n }\n\n var mm = (today.getMinutes() + 1);\n\n if (mm < 10) {\n mm = \"0\" + mm;\n }\n\n var ss = (today.getSeconds() + 1);\n\n if (ss < 10) {\n ss = \"0\" + ss;\n }\n\n var dateTime = YYYY + MM + DD + HH + mm + ss;\n\n console.debug(dateTime);\n\n // validate data format\n new_obj.lastmodifiedtime = dateTime;\n } catch (e) {}\n\n console.debug(JSON.stringify(new_obj));\n\n return new_obj;\n\n}", "constructor(scope, id, props) {\n super(scope, id);\n this.properties = props;\n this.value = this.referenceToken;\n this.stringValue = this.value.toString();\n this.stringListValue = this.value.toList();\n this.noEcho = props.noEcho || false;\n }", "static initialize(obj, actionField, emailField, flowIDField) { \n obj['ActionField'] = actionField;\n obj['EmailField'] = emailField;\n obj['FlowIDField'] = flowIDField;\n }", "function defineProperties(obj, properties) {\n for (const i in properties) {\n const value = properties[i];\n Object.defineProperty(\n obj,\n i,\n typeof value === 'function' ? { value } : value\n );\n }\n}", "function cfnPipelineFieldPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPipeline_FieldPropertyValidator(properties).assertSuccess();\n return {\n Key: cdk.stringToCloudFormation(properties.key),\n RefValue: cdk.stringToCloudFormation(properties.refValue),\n StringValue: cdk.stringToCloudFormation(properties.stringValue),\n };\n}", "static initialize(obj, propertyId, contractAddress) { \n obj['propertyId'] = propertyId;\n obj['contractAddress'] = contractAddress;\n }", "function cfnStateMachineEventSourcePropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnStateMachine_EventSourcePropertyValidator(properties).assertSuccess();\n return {\n Properties: cdk.unionMapper([CfnStateMachine_CloudWatchEventEventPropertyValidator, CfnStateMachine_EventBridgeRuleEventPropertyValidator, CfnStateMachine_ScheduleEventPropertyValidator, CfnStateMachine_ApiEventPropertyValidator], [cfnStateMachineCloudWatchEventEventPropertyToCloudFormation, cfnStateMachineEventBridgeRuleEventPropertyToCloudFormation, cfnStateMachineScheduleEventPropertyToCloudFormation, cfnStateMachineApiEventPropertyToCloudFormation])(properties.properties),\n Type: cdk.stringToCloudFormation(properties.type),\n };\n}", "function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key]}}}", "function cfnFunctionScheduleEventPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_ScheduleEventPropertyValidator(properties).assertSuccess();\n return {\n Input: cdk.stringToCloudFormation(properties.input),\n Schedule: cdk.stringToCloudFormation(properties.schedule),\n };\n}", "function cfnFunctionScheduleEventPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_ScheduleEventPropertyValidator(properties).assertSuccess();\n return {\n Input: cdk.stringToCloudFormation(properties.input),\n Schedule: cdk.stringToCloudFormation(properties.schedule),\n };\n}", "static get properties() {\n return {\n \"cityProp\": {\n \"name\": \"cityProp\",\n \"type\": \"String\",\n \"value\": \" \",\n \"reflect\": true,\n \"attribute\": true,\n \"observer\": false\n },\n \"inputId\": {\n \"name\": \"inputId\",\n \"type\": \"String\",\n \"value\": \" \",\n \"reflectToAttribute\": false,\n \"observer\": false\n },\n \"width\": {\n \"name\": \"width\",\n \"type\": \"String\",\n \"value\": \" \",\n \"reflectToAttribute\": false,\n \"observer\": false\n }\n}\n;\n }", "function makeTally (subject, property, result) {\n return function(object) {\n var profile = {\n id: object.profile_id,\n name: object.profile_name,\n picURL: object.picURL,\n headline: object.headline\n }\n\n var val = object[property];\n result[subject][val] = result[subject][val] || [];\n result[subject][val].push(profile);\n ++result[subject].total;\n\n if(subject === 'positions'){\n var positionID = object.position_id;\n var positionName = object.position_name;\n result[subject].positionsSummary[positionName] = positionID;\n }\n\n };\n}", "function cfnFlowLogPropsToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFlowLogPropsValidator(properties).assertSuccess();\n return {\n ResourceId: cdk.stringToCloudFormation(properties.resourceId),\n ResourceType: cdk.stringToCloudFormation(properties.resourceType),\n TrafficType: cdk.stringToCloudFormation(properties.trafficType),\n DeliverLogsPermissionArn: cdk.stringToCloudFormation(properties.deliverLogsPermissionArn),\n LogDestination: cdk.stringToCloudFormation(properties.logDestination),\n LogDestinationType: cdk.stringToCloudFormation(properties.logDestinationType),\n LogGroupName: cdk.stringToCloudFormation(properties.logGroupName),\n };\n}", "function fillProperties(target,source){for(var key in source){if(source.hasOwnProperty(key)&&!target.hasOwnProperty(key)){target[key]=source[key];}}}", "function createAnonymousObject(propertyList) {\n\t var entity = blank();\n\t return {\n\t entity: entity,\n\t triples: propertyList.map(function (t) {\n\t return extend(triple(entity), t);\n\t })\n\t };\n\t }", "add(properties) {\r\n return this.postCore({\r\n body: jsS(properties),\r\n }).then(r => {\r\n return {\r\n data: r,\r\n event: this.getById(r.id),\r\n };\r\n });\r\n }", "function processProperties(swagger, properties, requiredProperties) {\n var result = {};\n for (var name in properties) {\n var property = properties[name];\n var descriptor = {\n propertyName: name.indexOf('-') === -1 && name.indexOf(\".\") === -1 ? name : `\"${name}\"`,\n propertyComments: toComments(property.description, 1),\n propertyRequired: requiredProperties.indexOf(name) >= 0,\n propertyType: propertyType(property),\n };\n result[name] = descriptor;\n }\n return result;\n}", "function createAnonymousObject(propertyList) {\n var entity = blank();\n return {\n entity: entity,\n triples: propertyList.map(function (t) { return extend(triple(entity), t); })\n };\n }", "function createAnonymousObject(propertyList) {\n var entity = blank();\n return {\n entity: entity,\n triples: propertyList.map(function (t) { return extend(triple(entity), t); })\n };\n }", "function setObjectProperties(params, callback) {\n var objId = params.objId;\n var type = params.type;\n var properties = params.properties;\n if (!objId || !type || !properties || !properties.length) {\n return callback(\"Please specify objId, type, and properties array as {path:string,value:any}\");\n }\n if (!_model) {\n return callback(\"setObjectProperties: Director not initialised\");\n }\n _model.setObjectProperties({\n objId: objId,\n type: type,\n properties: properties\n }, function (err) {\n if (err) {\n return callback(err);\n }\n return callback(null);\n });\n }", "function showJSon(obj) {\n\n for (var prop in obj) {\n showvalue(prop + ':&nbsp;&nbsp;' + obj[prop]);\n }\n}", "function cfnStateMachineScheduleEventPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnStateMachine_ScheduleEventPropertyValidator(properties).assertSuccess();\n return {\n Input: cdk.stringToCloudFormation(properties.input),\n Schedule: cdk.stringToCloudFormation(properties.schedule),\n };\n}", "function Flow(nodeList, flows, node, type) {\n this.nodeList = nodeList;\n this.flows = flows;\n this.node = node;\n this.type = type;\n}", "walk(obj: Object) {\n // 使对象上的每一个属性变成响应式的\n const keys = Object.keys(obj)\n for (let i = 0; i < keys.length; i++) {\n defineReactive(obj, keys[i])\n }\n }", "enterObjectExpression(node, _parent) {\n if (!this.currentBehavior || !this.propertyHandlers) {\n return;\n }\n for (const prop of node.properties) {\n const name = esutil.objectKeyToString(prop.key);\n if (!name) {\n this.currentBehavior.warnings.push(new model_1.Warning({\n code: 'cant-determine-name',\n message: `Unable to determine property name from expression of type ` +\n `${node.type}`,\n severity: model_1.Severity.WARNING,\n sourceRange: this.document.sourceRangeForNode(node),\n parsedDocument: this.document\n }));\n continue;\n }\n if (name in this.propertyHandlers) {\n this.propertyHandlers[name](prop.value);\n }\n else if (esutil.isFunctionType(prop.value)) {\n const method = esutil.toScannedMethod(prop, this.document.sourceRangeForNode(prop), this.document);\n this.currentBehavior.addMethod(method);\n }\n else {\n const property = js_utils_1.toScannedPolymerProperty(prop, this.document.sourceRangeForNode(prop), this.document);\n this.currentBehavior.addProperty(property);\n }\n }\n this._finishBehavior();\n }", "function evaluate_property_access(input_text,statement,env) {\n\tvar objec = evaluate(input_text,property_access_object(statement),env);\n\tvar property = evaluate(input_text,property_access_property(statement),env);\n\treturn evaluate_object_property_access(objec, property);\n}", "function parseObj(obj) {\n\tobjCount = 0;\n\tvar objStr = '';\n\t\tfor (prop in obj) {\n\t\t\tobjStr += '<TR><TD>Property: </TD><TD><B>' + prop + '</B></TD><TD>Type: </TD><TD><B>' + typeof(obj[prop]) + \n\t\t\t\t'</B></TD><TD>Value: </TD><TD><B>' + obj[prop] + '</B></TD></TR>';\n\t\t\tif (typeof(obj[prop]) == \"object\") {\n\t\t\t\tobjStr += parseObj(obj[prop]);\n\t\t\t\t}\n\t\t\t}\n\treturn objStr;\n\t}", "function createData(property, content) {\n return { property, content };\n}", "function copyp(obfrom, props) {\n var obj = {};\n $.each(props, function(i,v) { obj[v] = obfrom[v]; });\n return obj;\n }", "function collectPropertyBindings(properties, tNode, lView, tData) {\n let bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex];\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}", "function collectPropertyBindings(properties, tNode, lView, tData) {\n let bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex];\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}", "function collectPropertyBindings(properties, tNode, lView, tData) {\n let bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex];\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}", "function collectPropertyBindings(properties, tNode, lView, tData) {\n let bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex];\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}", "function collectPropertyBindings(properties, tNode, lView, tData) {\n let bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex];\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}", "function collectPropertyBindings(properties, tNode, lView, tData) {\n let bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (let i = 0; i < bindingIndexes.length; i++) {\n const bindingIndex = bindingIndexes[i];\n const propMetadata = tData[bindingIndex];\n const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n const propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n let value = metadataParts[1];\n for (let j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}", "function CfnPipeline_PipelineObjectPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('fields', cdk.requiredValidator)(properties.fields));\n errors.collect(cdk.propertyValidator('fields', cdk.listValidator(CfnPipeline_FieldPropertyValidator))(properties.fields));\n errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id));\n errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id));\n errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));\n errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));\n return errors.wrap('supplied properties not correct for \"PipelineObjectProperty\"');\n}", "function parseProductProperties() {\n var props = angular.fromJson(ctrl.product.properties);\n angular.forEach(props, function(value, key) {\n ctrl.productProperties.push({'key': key, 'value': value});\n });\n }", "function init() {\n for (var k in PROPERTY) {\n var p = PROPERTY[k];\n PROPERTY_DECODE[p[0]] = [ k, p[1], p[2] ];\n }\n}", "create(props){\n const obj = {type: this.name};\n\n Object.keys(this.props).forEach((prop) => {\n obj[prop] = props[prop];\n\n // If not primitive type\n // if(this.props[prop].rel !== undefined){\n // types[this.props[prop].type].create(props[prop]);\n // }\n // // Create new instance of type and add relationship\n // this.props[prop].create = (obj) => types[prop.type].create(obj);\n //\n // // Fetch existing instance of type and add relationship\n // this.props[prop].link = (obj) => types[prop.type].link(obj);\n // }\n });\n\n return obj;\n }", "function cfnFunctionKinesisEventPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_KinesisEventPropertyValidator(properties).assertSuccess();\n return {\n BatchSize: cdk.numberToCloudFormation(properties.batchSize),\n Enabled: cdk.booleanToCloudFormation(properties.enabled),\n StartingPosition: cdk.stringToCloudFormation(properties.startingPosition),\n Stream: cdk.stringToCloudFormation(properties.stream),\n };\n}", "function cfnFunctionKinesisEventPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnFunction_KinesisEventPropertyValidator(properties).assertSuccess();\n return {\n BatchSize: cdk.numberToCloudFormation(properties.batchSize),\n Enabled: cdk.booleanToCloudFormation(properties.enabled),\n StartingPosition: cdk.stringToCloudFormation(properties.startingPosition),\n Stream: cdk.stringToCloudFormation(properties.stream),\n };\n}", "function cfnPipelineFilterPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnPipeline_FilterPropertyValidator(properties).assertSuccess();\n return {\n Filter: cdk.stringToCloudFormation(properties.filter),\n Name: cdk.stringToCloudFormation(properties.name),\n Next: cdk.stringToCloudFormation(properties.next),\n };\n}", "function flowStartParseObjPropValue() {\n // method shorthand\n if (match(TokenType.lessThan)) {\n flowParseTypeParameterDeclaration();\n if (!match(TokenType.parenL)) unexpected();\n }\n}", "function objectToAst(def, valueIsTemplateNode = false) {\n const sourceStringValue = valueIsTemplateNode ? templateLiteralNode(def) : stringLiteralNode(def);\n return {\n type: 'ObjectExpression',\n properties: [\n {\n type: 'ObjectProperty',\n key: {\n type: 'Identifier',\n name: 'message',\n },\n value: sourceStringValue,\n },\n {\n type: 'ObjectProperty',\n key: {\n type: 'Identifier',\n name: 'context',\n },\n value: {\n type: 'StringLiteral',\n value: extractContext(def['Context']),\n },\n },\n ],\n };\n}", "function objects() {\n const person = { // attributes of a JavaScript object are enclosed in {}\n firstName: \"Bill\", // code a comma (,) between elements\n lastName: \"Lumbergh\",\n age: 42,\n employees: [ // an attribute in a JavaScript object maybe an array\n \"Peter Gibbons\",\n \"Milton Waddams\",\n \"Samir Nagheenanajar\",\n \"Michael Bolton\"\n ],\n // define a called meatball function for the object to format some it's data\n meatball : function() { // identify the attribute as type function()\n return `${this.lastName}, ${this.firstName} (${this.age})` // this. reference the current object\n }\n };\n\n // Log the object\n console.log(person)\n console.table(person);\n\n // Log the first and last name\n // To reference an attribute in an object: objectName.attributeName\n console.log(`Person's name: ${person.firstName} ${person.lastName}`)\n\n // Log each employee\n // an employee is an element of an array in the person object\n // to process each employee we need to loop through that array\n // in Java we'd use a for loop\n // we do the same thing in JavaScript - syntax/format is the same as in Java\n\n for (let i=0; i < person.employees.length; i++) {\n console.log(`Employee #${i+1}: ${person.employees[i]}`)\n }\n\n // We just want to get the person's name and age when reference the object\n // Now we get all the data in person displayed when we reference it\n // \n // In Java we would define a toString() for the class to control what data was given for an object\n // We do the same thing in JavaScript - define a toString() method for the object\n console.log(person.meatball()); // Call a function defined in the object using the object name\n\n\n}", "function getObjWithProps(props, assignmentValue = []) {\n\tconst obj = {};\n\n\tfor (let i of props) {\n\t\tobj[i] = assignmentValue\n\t}\n\n\treturn obj;\n}", "static initialize(obj, type, operation, value) { \n obj['type'] = type;\n obj['operation'] = operation;\n obj['value'] = value;\n }", "function CJumbotronvue_type_script_lang_js_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }", "function fromObject(obj) {\n return new _2.DataFrame(Object.keys(obj)\n .map(function (fieldName) { return ({\n Field: fieldName,\n Value: obj[fieldName],\n }); }));\n}", "function converter (obj) {\n\t\n\t\tarr.push(obj.value) //push in the value\n\n\t\tif(obj.rest !== null){\n\n\t\t\tconverter(obj.rest); //keep calling the rest in the object\n\t\n\t\t}\n\t}", "function cfnWebACLJsonBodyPropertyToCloudFormation(properties) {\n if (!cdk.canInspect(properties)) {\n return properties;\n }\n CfnWebACL_JsonBodyPropertyValidator(properties).assertSuccess();\n return {\n InvalidFallbackBehavior: cdk.stringToCloudFormation(properties.invalidFallbackBehavior),\n MatchPattern: cfnWebACLJsonMatchPatternPropertyToCloudFormation(properties.matchPattern),\n MatchScope: cdk.stringToCloudFormation(properties.matchScope),\n OversizeHandling: cdk.stringToCloudFormation(properties.oversizeHandling),\n };\n}", "function objectSpread(p1, p2, p3) {\n console.log(p1) // represents value of 'tiger'\n console.log(p2) // represents value of 'lion'\n console.log(p3) // represents value of 'rest' -> (monkey, bird)\n}", "function CfnPipeline_ActivityPropertyValidator(properties) {\n if (!cdk.canInspect(properties)) {\n return cdk.VALIDATION_SUCCESS;\n }\n const errors = new cdk.ValidationResults();\n if (typeof properties !== 'object') {\n errors.collect(new cdk.ValidationResult('Expected an object, but received: ' + JSON.stringify(properties)));\n }\n errors.collect(cdk.propertyValidator('addAttributes', CfnPipeline_AddAttributesPropertyValidator)(properties.addAttributes));\n errors.collect(cdk.propertyValidator('channel', CfnPipeline_ChannelPropertyValidator)(properties.channel));\n errors.collect(cdk.propertyValidator('datastore', CfnPipeline_DatastorePropertyValidator)(properties.datastore));\n errors.collect(cdk.propertyValidator('deviceRegistryEnrich', CfnPipeline_DeviceRegistryEnrichPropertyValidator)(properties.deviceRegistryEnrich));\n errors.collect(cdk.propertyValidator('deviceShadowEnrich', CfnPipeline_DeviceShadowEnrichPropertyValidator)(properties.deviceShadowEnrich));\n errors.collect(cdk.propertyValidator('filter', CfnPipeline_FilterPropertyValidator)(properties.filter));\n errors.collect(cdk.propertyValidator('lambda', CfnPipeline_LambdaPropertyValidator)(properties.lambda));\n errors.collect(cdk.propertyValidator('math', CfnPipeline_MathPropertyValidator)(properties.math));\n errors.collect(cdk.propertyValidator('removeAttributes', CfnPipeline_RemoveAttributesPropertyValidator)(properties.removeAttributes));\n errors.collect(cdk.propertyValidator('selectAttributes', CfnPipeline_SelectAttributesPropertyValidator)(properties.selectAttributes));\n return errors.wrap('supplied properties not correct for \"ActivityProperty\"');\n}" ]
[ "0.5428093", "0.51196736", "0.5051341", "0.50242513", "0.49777344", "0.48940158", "0.48647156", "0.48534572", "0.48284438", "0.47887272", "0.4767054", "0.4766189", "0.4759498", "0.47594088", "0.47523558", "0.474209", "0.46894836", "0.46600226", "0.4653309", "0.4640964", "0.46117333", "0.4609124", "0.459758", "0.45943713", "0.45923245", "0.45923245", "0.45849413", "0.45725775", "0.45721003", "0.45585597", "0.45576772", "0.45070702", "0.45070702", "0.44888574", "0.44770223", "0.44718358", "0.4469157", "0.44632182", "0.44632182", "0.44632182", "0.44587192", "0.44451144", "0.44399148", "0.443913", "0.44381818", "0.44363227", "0.44276085", "0.44206187", "0.44132838", "0.44128436", "0.44099128", "0.44014692", "0.43957052", "0.4387165", "0.43812284", "0.4368588", "0.43627903", "0.43627903", "0.43583634", "0.4348222", "0.43475294", "0.43463603", "0.43454784", "0.43326145", "0.43276682", "0.43253997", "0.43253997", "0.43224332", "0.43155774", "0.43116957", "0.43082845", "0.43052968", "0.43049553", "0.4304115", "0.43027636", "0.4300858", "0.42963743", "0.42951527", "0.42951527", "0.42951527", "0.42951527", "0.42951527", "0.42951527", "0.42949632", "0.42913088", "0.42762274", "0.42732307", "0.42692205", "0.42692205", "0.42658755", "0.42554483", "0.42552054", "0.4250805", "0.4238098", "0.42364097", "0.42330617", "0.42305714", "0.4225262", "0.4225245", "0.42249462", "0.4222231" ]
0.0
-1
As opposed to throwing an exception, create a Flow with the value as the only value
static createIteratorFromValue(value){ return (function(){ let used = false; return { next: function(){ try { return used ? {done: true} : {value: value, done: false}; } finally{ used = !used; } } }; })(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initFlow() {\n if (this.validateFlow() == SUCCESS.VALIDATED) {\n this.code = SUCCESS.VALIDATED;\n return this.createFlow();\n }\n return { isError: true, code: this.code, item: this.originalFlow };\n }", "function absorb(val) {\n return (isStream(val)) ? val.val : val;\n}", "static from(data){\n return FlowFactory.getFlow(data);\n }", "static of(){\n if( arguments.length == 0 )\n return FlowFactory.getFlow([]);\n\n if( arguments.length > 1 )\n return FlowFactory.getFlow(arguments);\n\n if( arguments.length == 1 && Util.isNumber(arguments[0]) )\n return new IteratorFlow(FlowFactory.createIteratorWithEmptyArraysFromNumber(arguments[0]));\n\n return FlowFactory.getFlow(arguments[0]);\n }", "value(state, action, target) { throw 'Not implemented' }", "createFlow() {\n // Very simple random unique ID generator\n this.formattedFlow.flowId = `${new Date().getTime()}`;\n this.formattedFlow.flowName = this.originalFlow.flow;\n this.formattedFlow.comment = this.originalFlow.comment;\n this.formattedFlow.startAt = this.originalFlow.startAt;\n this.formattedFlow.states = Object.assign({}, this.originalFlow.states);\n this.formattedFlow.flowStartTime = new Date().getTime();\n this.formattedFlow.flowExecutionTime = '';\n\n return { isError: false, code: this.code, item: this.formattedFlow };\n }", "validateFlow() {\n if (this.originalFlow) {\n if (!this.originalFlow.hasOwnProperty('flow')) {\n this.code = ERROR.FLOW_NAME;\n return this.code;\n }\n if (!this.originalFlow.hasOwnProperty('comment')) {\n this.code = ERROR.FLOW_COMMENT;\n return this.code;\n }\n if (!this.originalFlow.hasOwnProperty('startAt')) {\n this.code = ERROR.FLOW_START_P;\n return this.code;\n }\n if (!this.originalFlow.hasOwnProperty('states') && !this.originalFlow.states.Object.hasOwnProprty('stop')) {\n this.code = ERROR.FLOW_STATES;\n return this.code;\n }\n }\n\n return SUCCESS.VALIDATED;\n }", "get valueErrorStream() {\n if (!this._valueErrorStream) {\n this._valueErrorStream = merge(\n this._current.pipe(map(() => ({ type: 'value', message: this }))),\n this._errors.pipe(map((error) => ({ type: 'error', message: error }))),\n );\n }\n return this._valueErrorStream;\n }", "Just(value) {\n return { value };\n }", "get value() {\n throw new TypeError('`value` can’t be accessed in an abstract instance of Maybe.Just');\n }", "function dddwTrayCatch_A() {\n const selectedFlow = document.querySelector('#idTrayCatch_A').value;\n\n switch (selectedFlow) {\n\n case 'undefinedVariable':\n // Accessing undefined Var. JS will throw and error. \"Catch it\"\n console.log('\\n\\naccess a VARIABLE that |is not defined| ');\n try {\n let x = 8;\n x += notDefinedVar ? 10 : 5; // notDefinedVar was NOT Defined\n console.log('I should NEVER reach this line');\n }\n catch (errMsg) {\n console.log( 'FAILED. err thrown by JS. errMsg = ' + errMsg);\n }\n break;\n\n case 'propertyNotDefined':\n // Accessing undefined property. JS will throw and error. \"Catch it\".\n // Not the variable is DEFINED\n console.log('\\n\\nAccess a PROPERTY that is not defined');\n try {\n let y = [10, 20, 30];\n console.log('Access a property that is not defined || ' + y[9].name);\n }\n catch (errMsg) {\n console.log( 'FAILED. err thrown by JS. errMsg = ' + errMsg);\n }\n break;\n case 'logicalErrUsingThrow':\n console.log ('\\n\\nbusiness logical Error --> Using \"Throw\" ');\n try {\n let x = 5;\n console.log(Math.pow(5, 3));\n throw \"I want to fail this Math Functions\"\n }\n catch (e) {\n console.log ('FAILED ON Purpose ... ' + e);\n }\n break;\n\n case 'forgotToCatchMyOwnThrow':\n console.log('\\n\\n What happens when u raise your logical flow yet forget to code the catch()')\n throw ' failing due to Business .... but did NOT catch';\n\n default:\n console.log ('\\n scenario not yet coded');\n }\n}", "function FlowCalculator(step) {\n this.step = step || 8;\n}", "function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }", "of(value) {\n return Just(value);\n }", "function P$1(value) {\n this._currentEvent = { type: 'error', value: value, current: true };\n}", "function Flow(nodeList, flows, node, type) {\n this.nodeList = nodeList;\n this.flows = flows;\n this.node = node;\n this.type = type;\n}", "function act(state, action) {\n var val = action(state);\n if (state.error !== null) {\n throw state.error;\n }\n return val;\n }", "try() {\n if (this.isOk()) {\n return this.value\n }\n throw this.error\n }", "function value() { }", "select(func){\n var flow = new Flow();\n if( Util.isFunction(func) )\n flow.pipeFunc = func;\n else{\n flow.pipeFunc = function(input){\n return input[func];\n };\n }\n\n setRefs(this, flow);\n\n return flow;\n }", "receiveValue(v) {\n if(phase===\"input\") {\n this.potentialValues.push(v);\n if(this.potentialValues.length>=this.inputPorts.length){\n this.resolve();\n }\n } else {\n throw new Error('Variable '+this.name+' receiving value during phase '+phase);\n }\n }", "function of(value) {\n return function continuable(callback) {\n callback(null, value)\n }\n}", "function of(value) {\n return function continuable(callback) {\n callback(null, value)\n }\n}", "function _fulfilled(value) {\n\t try {\n\t return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n\t } catch (exception) {\n\t return reject(exception);\n\t }\n\t }", "function _fulfilled(value) {\n\t try {\n\t return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n\t } catch (exception) {\n\t return reject(exception);\n\t }\n\t }", "function _fulfilled(value) {\n\t try {\n\t return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n\t } catch (exception) {\n\t return reject(exception);\n\t }\n\t }", "function _fulfilled(value) {\n\t try {\n\t return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n\t } catch (exception) {\n\t return reject(exception);\n\t }\n\t }", "function _fulfilled(value) {\n\t try {\n\t return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n\t } catch (exception) {\n\t return reject(exception);\n\t }\n\t }", "constructor(val) { //constructor that takes single value\n if (!val) return new Error('Value must be passed as argument'); //if no value, returns error to alert\n this.val = val; //this nodes value is the passed value\n this.next = null; //this nodes next is null\n }", "function _fulfilled(value) {\n\t\t try {\n\t\t return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n\t\t } catch (exception) {\n\t\t return reject(exception);\n\t\t }\n\t\t }", "function flow(from, rate, to) {\n\tto = to || universe;\n\treturn { from:from, rate:rate, to:to };\n}", "function _fulfilled(value) {\n\t try {\n\t return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n\t } catch (exception) {\n\t return reject(exception);\n\t }\n\t }", "value() { return undefined; }", "enterNullValue(ctx) {\n }", "function _fulfilled(value){try{return typeof fulfilled===\"function\"?fulfilled(value):value;}catch(exception){return reject(exception);}}", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "updateFlow() {\n this.flow += 1;\n }", "getProcessedValue(value) {\n const { returnValue } = this.props;\n\n switch (returnValue) {\n case 'start':\n return this.getValueFrom(value);\n case 'end':\n return this.getValueTo(value);\n case 'range':\n return this.getValueArray(value);\n default:\n throw new Error('Invalid returnValue.');\n }\n }", "_getValue_unavailable() {}", "function none(value) {\n\treturn value\n}", "function flowSignal(value, object) {\n if (value === 0) {\n object.lastFlowRateTimer ++;\n return;\n }\n if (value === 1) {\n object.pulses ++;\n }\n object.lastFlowPinState = value;\n object.flowrate = object.flowrate;\n object.flowrate /= object.lastFlowRateTimer;\n object.lastFlowRateTimer = 0;\n}", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function _fulfilled(value) {\n try {\n return typeof fulfilled === \"function\" ? fulfilled(value) : value;\n } catch (exception) {\n return reject(exception);\n }\n }", "function to_value(ast) {\n try {\n return Evaluator.to_value(ast);\n }\n catch (e) {\n //console.warn(\"Warning\".yellow + \": \" + e);\n return null;\n }\n}", "onValueChange(newValue) {\n if (typeof newValue === 'number' && newValue >= 0 && newValue < 100) {\n return super.onValueChange(newValue);\n }\n throw new Error('value not allowed');\n }", "'validateValue'(value) {}", "function Throw(){ return Statement.apply(this,arguments) }", "function pipe(value) {\r\n function nextPipe(transformer) {\r\n return pipe(transformer(value));\r\n }\r\n nextPipe.value = value;\r\n return nextPipe;\r\n}", "constructor(value) {\n this.value = value;\n }", "function unsecret(val) {\n return new exports.Output(val.resources(), val.promise(/*withUnknowns*/ true), val.isKnown, Promise.resolve(false), val.allResources());\n}", "constructor(value){\n\t\tthis.value = value;\n\t}", "function ensureNever(value) { }", "function Do(gen) {\n function step(value) {\n const result = gen.next(value)\n if (result.done) {\n return result.value\n }\n return result.value.bind(step)\n }\n return step()\n }", "set booking(stuff){\n throw \"sorry you cannot do this\"\n }", "function throwMyError() {\n // Generate an exception with a value read from stdin\n throw new Error(input);\n}", "function OptionalDecorator(){}// WARNING: interface has both a type and a value, skipping emit", "function value(val) { return control_1.default(val); }", "function _test(field, value, rule) {\n return __awaiter(this, void 0, void 0, function () {\n var ruleSchema, normalizedValue, params, result, values_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n ruleSchema = RuleContainer.getRuleDefinition(rule.name);\n if (!ruleSchema || !ruleSchema.validate) {\n throw new Error(\"No such validator '\" + rule.name + \"' exists.\");\n }\n normalizedValue = ruleSchema.castValue ? ruleSchema.castValue(value) : value;\n params = fillTargetValues(rule.params, field.crossTable);\n return [4 /*yield*/, ruleSchema.validate(normalizedValue, params)];\n case 1:\n result = _a.sent();\n if (typeof result === 'string') {\n values_1 = __assign(__assign({}, (params || {})), { _field_: field.name, _value_: value, _rule_: rule.name });\n return [2 /*return*/, {\n valid: false,\n error: { rule: rule.name, msg: function () { return interpolate(result, values_1); } }\n }];\n }\n if (!isObject(result)) {\n result = { valid: result, data: {} };\n }\n return [2 /*return*/, {\n valid: result.valid,\n required: result.required,\n data: result.data || {},\n error: result.valid ? undefined : _generateFieldError(field, value, ruleSchema, rule.name, params, result.data)\n }];\n }\n });\n });\n }", "skip(num){\n if( num <= 0 )\n throw new Error(\"Skip value must be greater than 0\");\n\n var flow = new RangeMethodFlow(num, Number.MAX_VALUE);\n setRefs(this, flow);\n\n return flow;\n }", "constructor(value) {\n this.defined = value !== undefined;\n this.value = value;\n }", "function raise(value, name) {\n throw new Error('Invalid value `' + value + '` for setting `' + name + '`');\n}", "handleChangeInfectedValue({commit}, payload) {\n commit('setInfectedValue', payload);\n }", "function enumerable(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if(Object(__WEBPACK_IMPORTED_MODULE_1__util__[\"e\"/* isEmptyValue */])(value)&&!rule.required){return callback();}__WEBPACK_IMPORTED_MODULE_0__rule___[\"a\"/* default */].required(rule,value,source,errors,options);if(value){__WEBPACK_IMPORTED_MODULE_0__rule___[\"a\"/* default */][ENUM](rule,value,source,errors,options);}}callback(errors);}", "function invariant(value, msg) {\n if (!value) {\n throw new Error(`Invariant Violation: ${msg}`);\n }\n }", "function invariant(value, msg) {\n if (!value) {\n throw new Error(`Invariant Violation: ${msg}`);\n }\n }", "static fail(value) {\n return new Flag(\"fail\", { value });\n }", "function enumerable(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value){_rule2[\"default\"][ENUM](rule,value,source,errors,options);}}callback(errors);}", "function enumerable(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if((0,_util.isEmptyValue)(value)&&!rule.required){return callback();}_rule2[\"default\"].required(rule,value,source,errors,options);if(value){_rule2[\"default\"][ENUM](rule,value,source,errors,options);}}callback(errors);}" ]
[ "0.5648238", "0.55251104", "0.5514643", "0.53843147", "0.5381006", "0.5273136", "0.5196975", "0.51839685", "0.510901", "0.50123024", "0.5007515", "0.49796844", "0.4960807", "0.4913575", "0.4872144", "0.4839806", "0.47758394", "0.47608337", "0.47528547", "0.47121018", "0.4694087", "0.46817845", "0.46817845", "0.46565974", "0.46565974", "0.46565974", "0.46565974", "0.46565974", "0.46434718", "0.4638753", "0.46378452", "0.46245837", "0.4616328", "0.46054968", "0.4602701", "0.45995545", "0.45978898", "0.45978898", "0.4597311", "0.45938936", "0.45885214", "0.45789707", "0.45782745", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.45706636", "0.4569788", "0.45435274", "0.45434564", "0.4532", "0.45167345", "0.45087945", "0.44960624", "0.44897604", "0.44895634", "0.44895077", "0.44891196", "0.44811642", "0.44797593", "0.44688445", "0.44681758", "0.44657537", "0.4464953", "0.44630983", "0.44617862", "0.44603357", "0.44555563", "0.44555563", "0.44537693", "0.44519535", "0.44519535" ]
0.0
-1
This method is for regularizing the design
static createIteratorFromStreamer(streamer){ return (function(){ let length = streamer.size(); let nul = {}; let pos = 0; let item; return { next: function(){ try { if( pos >= length ) return {done: true}; item = streamer.get(pos); return {value: item == null ? nul : item, done: false}; } finally{ pos++; if( pos > length ){ pos = 0; //reset for reuse //if the underlying data size changed length = streamer.size(); } } }, streamer: streamer }; })(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "recalculateAndDraw() {\n\n\t\tif (!this.tgOrigin.getOrigin()) return;\n\n\t\t//console.log('recalculateAndDraw');\n\t\t\n\t this.tgRoads.calDispRoads();\n\t\tthis.tgWater.calDispWater();\n\t\tthis.tgLanduse.calDispLanduse();\n\t\t//this.tgPlaces.calDispPlace();\n\t\t\n\n\t\tif (this.currentMode === 'DC') {\n\t\t\tthis.calAllDispNodeAsOriginal();\n\t\t\t//this.tgRoads.discard();\n\t\t\t//this.tgWater.discard();\n\t\t\t//this.tgLanduse.discard();\n\n\t\t\tthis.tgLocs.discard();\n\t\t\tthis.tgIsochrone.discard();\n\t\t\t//this.tgLocs.setHighLightMode(false, 0);\n\t\t}\n\t\telse {\n\t\t\tthis.tgRoads.render();\n\t\t\tthis.tgWater.render();\n\t\t\tthis.tgLanduse.render();\n\t\t\t//this.tgPlaces.render();\n\n\t\t}\n\n\t\tthis.requestControlPoints();\n\t}", "function VixenRateGroupOverrideClass()\n{\n\t// This will be multidimensional array storing all the RateGroup data (Id, Name, Description)\n\t// for each RateGroup associated with the ServiceType of the Service which a RateGroup override is being performed on\n\tthis._arrRateGroups = {};\n\t\n\tthis.Initialise = function(arrRateGroups)\n\t{\n\t\t//TODO!\n\t}\n\t\n\n//----------------------------------------------------------------------------//\n// The following is code from the validate_charge.js file. This object\n// will work similarly to it\n//----------------------------------------------------------------------------//\n \n\n\n\t//------------------------------------------------------------------------//\n\t// _objChargeTypeData\n\t//------------------------------------------------------------------------//\n\t/**\n\t * _objChargeTypeData\n\t *\n\t * Stores data relating to each unarchived Charge Type from the database table \"ChargeType\"\n\t *\n\t * Stores data relating to each unarchived Charge Type from the database table \"ChargeType\"\n\t * \n\t * @type\t\tobject\n\t *\n\t * @property\n\t */\n\tthis._objChargeTypeData = {};\n\n\t//------------------------------------------------------------------------//\n\t// SetChargeTypes\n\t//------------------------------------------------------------------------//\n\t/**\n\t * SetChargeTypes\n\t *\n\t * Sets the member variable storing data relating to all unarchived Charge Types\n\t *\n\t * Sets the member variable storing data relating to all unarchived Charge Types\n\t *\n\t * @param\tobj\t\tobjChargeTypeData\t\tobject storing all Charge Type data\n\t *\t\t\t\t\t\t\t\t\t\t\tstructure:\n\t *\t\t\t\t\t\t\t\t\t\t\tobjChargeTypeData.{ChargeType}.Nature\n\t *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .Fixed\n\t *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .Amount\n\t *\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .Description\n\t * @return\tvoid\n\t * @method\n\t */\n\tthis.SetChargeTypes = function(objChargeTypeData)\n\t{\n\t\tthis._objChargeTypeData = objChargeTypeData;\n\t}\n\t\n\t//------------------------------------------------------------------------//\n\t// DeclareChargeType\n\t//------------------------------------------------------------------------//\n\t/**\n\t * DeclareChargeType\n\t *\n\t * Sets various related controls when a Charge Type has been chosen from the combobox\n\t * \n\t * Sets various related controls when a Charge Type has been chosen from the combobox\n\t * It sets the ChargeType label, Description label, Nature label, and the Amount textbox.\n\t * If the charge type has a fixed value, then the Amount textbox id disabled\n\t *\n\t * @param\tobj\t\tobjComboBox\t\tThe HTML element that calls this method (the Charge Type combobox)\n\t *\n\t * @return\tvoid\n\t * @method\n\t */\n\tthis.DeclareChargeType = function(objComboBox)\n\t{\n\t\tvar strChargeType;\n\t\tvar strDefaultAmount;\n\t\tvar strDescription;\n\t\tvar strNature;\n\t\tvar strFixed;\n\t\tvar intChargeTypeId\n\t\t\n\t\t// make sure there is a value specificed\n\t\tif (!objComboBox.value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// retrieve values relating to the Charge Type selected\n\t\tintChargeTypeId\t\t= objComboBox.value;\n\t\tstrDefaultAmount\t= this._objChargeTypeData[intChargeTypeId].Amount;\n\t\tstrDescription\t\t= this._objChargeTypeData[intChargeTypeId].Description;\n\t\tstrChargeType\t\t= this._objChargeTypeData[intChargeTypeId].ChargeType;\n\t\t\n\t\tif (this._objChargeTypeData[intChargeTypeId].Nature == \"CR\")\n\t\t{\n\t\t\tstrNature = \"Credit\";\n\t\t}\n\t\telse if (this._objChargeTypeData[intChargeTypeId].Nature == \"DR\")\n\t\t{\n\t\t\tstrNature = \"Debit\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstrNature = this._objChargeTypeData[intChargeTypeId].Nature;\n\t\t}\n\t\t\n\t\t// setup values on the form\n\t\tdocument.getElementById('ChargeType.ChargeType.Output').innerHTML = strChargeType;\n\t\tdocument.getElementById('ChargeType.Description.Output').innerHTML = strDescription;\n\t\tdocument.getElementById('ChargeType.Nature.Output').innerHTML = strNature;\n\t\tvar elmChargeAmount = document.getElementById('Charge.Amount');\n\t\telmChargeAmount.value = strDefaultAmount;\n\t\telmChargeAmount.style.backgroundColor = \"#FFFFFF\";\n\t\tdocument.getElementById('ChargeType.Id').value = intChargeTypeId;\n\t\t\n\t\t// If the charge type has a fixed amount then disable the amount textbox, else enable it\n\t\tif (this._objChargeTypeData[intChargeTypeId].Fixed == 1)\n\t\t{\n\t\t\t// disable the charge amount textbox\n\t\t\telmChargeAmount.disabled = TRUE;\n\t\t\tdocument.getElementById('InvoiceComboBox').focus();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// enable the charge amount textbox\n\t\t\telmChargeAmount.disabled = FALSE;\n\t\t\telmChargeAmount.focus();\n\t\t}\n\t}\n}", "function normalizeAll()\n {\n normalizeForms();\n normalizeControls();\n }", "function updateAll(){refreshSliderDimensions();ngModelRender();}", "_afterRender () {\n this.adjust();\n }", "function calcAndUpdateDemographics() {\n\n\t\t\tvar population = 0;\n\t\t\tvar employedLegal = 0;\n\t\t\tvar employedIllegal = 0;\n\t\t\tvar police = 0;\n\t\t\tvar totalFear = 0;\n\t\t\tvar totalLevel = 0;\n\t\t\tvar fearCount = 0;\n\n\t\t\tfor (var i = 0; i < numRows; i++) {\n\t\t\t\t\tfor (var j = 0; j < numCols; j++) {\n\t\t\t\t\t\t\tvar baseBuilding = _buildings[i][j].baseBuilding;\n\n\t\t\t\t\t\t\t/* Add this building to our demographics\n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\tif (_buildings[i][j].fear != 0) {\n\t\t\t\t\t\t\t\ttotalFear += _buildings[i][j].fear;\n\t\t\t\t\t\t\t\tfearCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalLevel += _buildings[i][j].level;\n\t\t\t\t\t\t\tpopulation += baseBuilding.peopleLiving;\n\t\t\t\t\t\t\tif (baseBuilding.isLegal)\n\t\t\t\t\t\t\t\t\temployedLegal += baseBuilding.peopleEmployed;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\temployedIllegal += baseBuilding.peopleEmployed;\n\t\t\t\t\t\t\tif (baseBuilding.isPolice) {\n\t\t\t\t\t\t\t\t\tpolice += baseBuilding.peopleEmployed;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t/* Update population info based on building contents\n\t\t\t*/\n\t\t\tvar averageFear = totalFear / (fearCount);\n\t\t\tvar averageLevel = totalLevel / (numRows * numCols);\n\t\t\tupdateDemographics(population, employedLegal, employedIllegal, police, averageFear, averageLevel);\n\t\t\t}", "function update_design_information(type) {\n\n\n // Was wireframe?\n var washaveWireFrame = false;\n\n\n // Check wireframe\n if (body.hasClass(\"yp-wireframe-mode\")) {\n washaveWireFrame = true;\n body.removeClass(\"yp-wireframe-mode\");\n }\n\n\n // Cache elements\n var elementMain = $(\".info-element-general\"),\n elementClasseslist = $(\".info-element-class-list\"),\n elementSelectorList = $(\".info-element-selector-list\");\n\n\n // Clean Old data\n $(\".info-element-general,.info-element-class-list,.info-element-selector-list\").empty();\n\n\n // Updating Section.\n if (type != 'element') {\n\n\n // Delete Old\n $(\".info-color-scheme-list,.info-font-family-list,.info-animation-list,.info-basic-typography-list,.info-basic-size-list\").empty();\n\n\n // Get elements as variable.\n var colorlist = $(\".info-color-scheme-list\"),\n familylist = $(\".info-font-family-list\"),\n animatelist = $(\".info-animation-list\"),\n sizelist = $(\".info-basic-size-list\"),\n typographyList = $(\".info-basic-typography-list\"),\n globalclasslist = $(\".info-global-class-list\"),\n globalidlist = $(\".info-global-id-list\");\n\n\n // Variables\n var maxWidth = 0,\n maxWidthEl = null,\n k = $(window).width();\n\n\n // Append general elements\n iframeBody.append(\"<h1 id='yp-heading-test-level-1'></h1><h2 id='yp-heading-test-level-2'></h2><h3 id='yp-heading-test-level-3'></h3><h4 id='yp-heading-test-level-4'></h4><h5 id='yp-heading-test-level-5'></h5><h6 id='yp-heading-test-level-6'></h6><h6 id='yp-paragraph-test'></h6>\");\n\n\n // Font Sizes\n var paragraphElement = iframeBody.find(\"#yp-paragraph-test\"),\n bodyFontSize = (Math.round(parseFloat(iframeBody.css(\"font-size\")) * 10) / 10),\n paragraphFontSize = (Math.round(parseFloat(paragraphElement.css(\"font-size\")) * 10) / 10);\n\n\n // Font family\n var bodyFamily = iframeBody.css(\"font-family\");\n var paragraphFamily = paragraphElement.css(\"font-family\");\n\n\n // Update typography information\n typographyList\n .append('<li><span class=\"typo-list-left\">General (body)</span><span class=\"typo-list-right\"><span>' + bodyFontSize + 'px, ' + get_font_name(bodyFamily) + '</span></span></li>')\n .append('<li><span class=\"typo-list-left\">Paragraph</span><span class=\"typo-list-right\"><span>' + paragraphFontSize + 'px, ' + get_font_name(paragraphFamily) + '</span></span></li>');\n\n\n // Delete created element. (Created only for test)\n paragraphElement.remove();\n\n\n // Update Heading tags. h1 > h6\n for (var i = 1; i <= 6; i++) {\n var el = iframeBody.find(\"#yp-heading-test-level-\" + i);\n var size = parseFloat(el.css(\"font-size\"));\n size = Math.round(size * 10) / 10;\n var family = el.css(\"font-family\");\n typographyList.append('<li><span class=\"typo-list-left\">Heading Level ' + i + '</span><span class=\"typo-list-right\"><span>' + size + 'px, ' + get_font_name(family) + '</span></span></li>');\n el.remove();\n }\n\n\n // Each all elements for find what we need.\n var ColoredEl = [];\n var familyArray = [];\n var animatedArray = [];\n var classArray = [];\n var idArray = [];\n var boxSizingArray = [];\n\n // Each\n iframeBody.find(get_all_elements()).each(function (i) {\n\n\n // Element\n var el = $(this);\n\n\n // Find container\n var otherWidth = el.outerWidth();\n\n // 720 768 940 960 980 1030 1040 1170 1210 1268\n if (otherWidth >= 720 && otherWidth <= 1268 && otherWidth < (k - 80)) {\n if (otherWidth > maxWidth) {\n maxWidthEl = el;\n }\n\n // MaxWidth Element Founded. (Container)\n maxWidth = Math.max(otherWidth, maxWidth);\n\n }\n\n\n // Filter font family elements.\n var family = get_font_name(el.css(\"font-family\"));\n if (familyArray.indexOf(family) == -1) {\n familyArray.push(family);\n }\n\n\n // Filter colored elements.\n var color = el.css(\"background-color\").toLowerCase().replace(/ /g, \"\");\n if (color != 'transparent' && color != 'rgb(255,255,255)' && color != 'rgba(0,0,0,0)' && color != 'rgba(255,255,255,0)') {\n ColoredEl.push(this);\n }\n\n\n // Get box sizing\n if (i < 20) { // Get only on first 20 elements. no need to more.\n var boxSizing = (el.css(\"box-sizing\"));\n if (isDefined(boxSizing)) {\n\n boxSizing = $.trim(boxSizing);\n\n if (boxSizingArray.indexOf(boxSizing) == -1) {\n boxSizingArray.push(boxSizing);\n }\n\n }\n }\n\n\n // Find classes and ids\n setTimeout(function () {\n\n // If there not have any class in our list\n if (globalclasslist.find(\"li\").length === 0) {\n\n // Get Cleaned classes.\n var arrayClassAll = get_cleaned_classes(el, classArray);\n\n // Concat if not empty.\n if (arrayClassAll.length > 0) {\n classArray = classArray.concat(arrayClassAll);\n }\n\n }\n\n\n // Get ID\n // If there not have any id in our list.\n if (globalidlist.find(\"li\").length === 0) {\n\n // Get Id\n var id = el.attr(\"id\");\n\n // is defined\n if (isDefined(id)) {\n\n // continue If not have this class in data\n if (idArray.indexOf(id) == -1) {\n\n // Push\n idArray.push(id);\n\n }\n\n }\n\n }\n\n\n }, 500);\n\n });\n\n\n // Filter animated elements.\n iframe.find(\".yp-styles-area [data-rule='animation-name']\").each(function () {\n\n var animate = escape_data_value($(this).html());\n\n if (animatedArray.indexOf(animate) == -1) {\n animatedArray.push(animate);\n }\n\n });\n\n\n // Not adding on responsive mode.\n var containerWidth;\n if ($(\"body\").hasClass(\"yp-responsive-device-mode\") === false) {\n\n containerWidth = maxWidth + 'px';\n\n } else {\n containerWidth = 'Unknown';\n }\n\n\n // Apply colors\n $(ColoredEl).each(function () {\n\n var el = $(this);\n var color = el.css(\"background-color\").toLowerCase().replace(/ /g, \"\");\n\n var current = $(\".info-color-scheme-list div[data-color='\" + color + \"']\");\n var ratio = parseFloat(100 / $(ColoredEl).length);\n\n if (current.length > 0) {\n var cWi = parseFloat(current.attr(\"data-width\"));\n current.css(\"width\", (cWi + ratio) + \"%\");\n current.attr(\"data-width\", (cWi + ratio));\n } else {\n colorlist.append('<div data-width=\"' + ratio + '\" data-color=\"' + color + '\" style=\"width:' + ratio + '%;background-color:' + color + ';\"></div>');\n }\n\n });\n\n\n // Update fonts\n $.each(familyArray, function (i, v) {\n familylist.append(\"<li>\" + v + \"</li>\");\n });\n\n\n // Update animations.\n $.each(animatedArray, function (i, v) {\n animatelist.append(\"<li>\" + v + \"</li>\");\n });\n\n\n // Append Size information to size section.\n sizelist.append('<li><span class=\"typo-list-left\">Box Sizing</span><span class=\"typo-list-right\"><span>' + boxSizingArray.toString() + '</span></span></li>')\n .append('<li><span class=\"typo-list-left\">Container Width</span><span class=\"typo-list-right\"><span>' + containerWidth + '</span></span></li>')\n .append('<li><span class=\"typo-list-left\">Document Width</span><span class=\"typo-list-right\"><span>' + (parseInt(iframe.width()) + window.leftbarWidth) + 'px</span></span></li>')\n .append('<li><span class=\"typo-list-left\">Document Height</span><span class=\"typo-list-right\"><span>' + iframe.height() + 'px</span></span></li>');\n\n\n // waiting a litte for high performance.\n setTimeout(function () {\n\n // Append classes\n $.each(classArray, function (i, v) {\n globalclasslist.append(\"<li>.\" + v + \"</li>\");\n });\n\n // Append ids\n $.each(idArray, function (i, v) {\n globalidlist.append(\"<li>#\" + v + \"</li>\");\n });\n\n }, 1000);\n\n\n }\n\n\n // if is element Section\n if (is_content_selected()) {\n\n\n // Hide and show some sections in design information\n $(\".info-no-element-selected\").hide();\n $(\".info-element-selected-section\").show();\n $(\"info-element-selector-section\").hide();\n\n\n // cache selected element\n var selectedEl = get_selected_element();\n var selectedID = selectedEl.attr(\"id\");\n\n\n // Getting element ID.\n if (isDefined(selectedID)) {\n\n // Is valid?\n if (selectedID !== '') {\n\n // Append\n elementMain.append('<li><span class=\"typo-list-left\">Element ID</span><span class=\"typo-list-right\"><span>#' + selectedID + '</span></span></li>');\n\n }\n\n }\n\n\n // Append Tag name\n elementMain.append('<li><span class=\"typo-list-left\">Tag</span><span class=\"typo-list-right\"><span>' + selectedEl[0].nodeName + '</span></span></li>');\n\n\n // Append Affected count\n elementMain.append('<li><span class=\"typo-list-left\">Affected elements</span><span class=\"typo-list-right\"><span>' + (parseInt(iframeBody.find(\".yp-selected-others\").length) + 1) + '</span></span></li>');\n\n\n // Get class Array\n var classSelfArray = get_cleaned_classes(selectedEl, []);\n\n var x;\n\n // Append all classes.\n for (x = 0; x < classSelfArray.length; x++) {\n\n // Append\n elementClasseslist.append(\"<li>.\" + classSelfArray[x] + \"</li>\");\n\n }\n\n\n // Hide class section if empty.\n if (elementClasseslist.find(\"li\").length === 0) {\n $(\".info-element-classes-section\").hide();\n } else {\n $(\".info-element-classes-section\").show();\n }\n\n\n // Current Selector\n elementSelectorList.append('<li>' + get_current_selector() + '</li>');\n\n\n // Create dom data. For show DOM HTML in Design information tool\n var clone = selectedEl.clone();\n\n\n // Clean basic position relative style from clone\n if (isDefined(clone.attr(\"style\"))) {\n\n // Trim Style\n var trimCloneStyle = clone.attr(\"style\").replace(/position:(\\s*?)relative(\\;?)|animation-fill-mode:(\\s*?)(both|forwards|backwards|none)(\\;?)/g, \"\");\n\n // Remove Style Attr if is empty.\n if (trimCloneStyle == '') {\n clone.removeAttr(\"style\");\n } else {\n clone.attr(\"style\", trimCloneStyle);\n }\n\n }\n\n // Remove Class Attr.\n clone.removeAttr(\"class\");\n\n\n // Just add valid classes.\n for (x = 0; x < classSelfArray.length; x++) {\n\n // addClass.\n clone.addClass(classSelfArray[x]);\n\n }\n\n // Dom Content.\n clone.html(\"...\");\n\n // Remove an attr added by editor attr.\n clone.removeAttr(\"data-default-selector\");\n\n // Get.\n var str = $(\"<div />\").append(clone).html();\n\n // Set\n $(\".info-element-dom\").val(str);\n\n\n // Show there no element selected section.\n } else {\n\n $(\".info-no-element-selected\").show();\n\n $(\".info-element-selected-section\").hide();\n\n }\n\n // Active wireframe if was active before open.\n // Notice: This function close wireframe for getting colors and details of the elements.\n if (washaveWireFrame === true) {\n body.addClass(\"yp-wireframe-mode\");\n }\n\n }", "function rebuild() {\n\t\tcalcWidth();\n\t\tcheck();\n\t}", "function model_upcreate()\n {\n baseParams_2_extendedParams();\n var {D,G,AA} = calculateConicPoint_algo( rg.g.value );\n setRgPoint( 'D', D );\n setRgPoint( 'G', G );\n setRgPoint( 'AA', AA );\n\n\n //decorations:\n var N = [\n rg.gN.value*Math.cos( rg.gamma.value ) + rg.H.pos[0],\n -rg.gN.value*Math.sin(rg.gamma.value) + rg.H.pos[1]\n ];\n setRgPoint( 'N', N );\n }", "nextGeneration() {\n let nextGeneration = [];\n this.generationCounter++;\n\n const survivors = Math.round(this.options.phenotypePerGeneration * this.options.repartition[0]);\n const childrens = Math.round(this.options.phenotypePerGeneration * this.options.repartition[1]);\n const randoms = Math.round(this.options.phenotypePerGeneration * this.options.repartition[2]);\n\n for (let i = 0; i < survivors; i++) {\n nextGeneration = [...nextGeneration, this.generation[this.options.phenotypePerGeneration - 1 - i]]\n }\n\n for (let i = survivors; i < survivors + childrens; i++) {\n nextGeneration = [...nextGeneration, this.makeChildren()]\n }\n for (let i = survivors + childrens; i < this.options.phenotypePerGeneration; i++) {\n let phenotype = new Phenotype(this.modelData, this.options.genotypePerPhenotype, this.genomOptions);\n phenotype.random();\n nextGeneration = [...nextGeneration, phenotype]\n }\n\n this.generation = nextGeneration;\n \n for (let i = survivors; i < this.options.phenotypePerGeneration; i++) {\n this.generation[i].similarityRatio = imgUtils.similarityBtwImageData(this.minifyModelData, this.generation[i].generate())\n }\n\n this.generation.sort((a, b) =>\n (a.similarityRatio - b.similarityRatio)) // Baddest to Best\n \n this.drawExample()\n\n let total = 0;\n for (let i = 0; i < this.options.phenotypePerGeneration; i++) {\n total += this.generation[i].similarityRatio\n }\n /** \n console.log(\"Generation n°\" + this.generationCounter \n + \" Best : \" + this.generation[this.options.phenotypePerGeneration - 1].similarityRatio \n + \", total : \" + total/this.options.phenotypePerGeneration);\n */\n }", "function DesignModel(apc,seq,lab) {\n this.apc = apc;\n this.seq = seq;\n this.lab = lab||null;\n this.me1 = 0.0; // mfe for state 1\n this.me2 = 0.0; // mfe for state 2 (no bonus)\n this.ns1 = null; // mfe (natural) shape str for state 1\n this.ns2 = null; // mfe (natural) shape str for state 2\n this.rep = null; // reporter site \n this.apt = null; // aptamer site for state2\n this.con = null; // aptamer constraint for state2\n this.pp1 = null; // pairing probabilities for state 1\n this.pp2 = null; // pairing probabilities for state 2 (with bonus)\n this.dp1 = null; // dotplot for state 1\n this.dp2 = null; // dotplot for state 2\n this.changed = true;\n this.got = null;\n this.snippet = '';\n this.viewers = {}; // who to notify of changes\n this.noInterest = function (viewer) { \n delete this.viewers[viewer];\n return this;\n }\n this.addInterest = function (viewer,cb) { \n if (cb) this.viewers[viewer] = cb;\n else delete this.viewers[viewer];\n return this;\n }\n return this;\n}", "synchModel2Geometry() {\n // position update \n this.sheetGeometry.attributes.position.array = new Float32Array(this.model.x_list)\n this.sheetGeometry.attributes.position.needsUpdate = true;\n // color update\n this.sheetGeometry.attributes.color.array = new Float32Array(this.model.x_list.slice(0))\n this.sheetGeometry.attributes.color.needsUpdate = true;\n }", "_recalc_model() {\n\t this._update_timescales();\n\t this._calc_equilibrium();\n\t}", "function addHTML() {\r\n\t\t// Add image that must hold the design\r\n\t\tdesignImage = document.createElement(\"img\")\r\n\t\tdesignImage.className = \"dev_design\";\r\n\t\tEstate.Develop.GetRoot().appendChild(designImage)\r\n\t\t\r\n\t\t// Set drag events to design image\r\n\t\tEstate.Develop._DragDropDesignImage.Init( designImage );\r\n\t\tEstate.Develop._DragDropDesignImage.InitDesignTesterFeedback();\r\n\t\t\r\n\t\t// Create toolbox for changing the x and y values\r\n\t\tmeasurement.box = document.createElement(\"div\")\r\n\t\tmeasurement.box.className = \"dev_measureBox\"\r\n\t\tmeasurement.x = document.createElement(\"div\")\r\n\t\tmeasurement.x.className = \"dev_axis\"\r\n\t\tmeasurement.x.innerHTML = \"X: \"\r\n\t\tmeasurement.xInput = document.createElement(\"input\")\r\n\t\tmeasurement.xInput.value = '0'\r\n\t\tmeasurement.y = document.createElement(\"div\")\r\n\t\tmeasurement.y.className = \"dev_axis\"\r\n\t\tmeasurement.y.innerHTML = \"Y: \"\r\n\t\tmeasurement.yInput = document.createElement(\"input\")\r\n\t\tmeasurement.yInput.value = '0' \r\n\t\tmeasurement.reposition = document.createElement(\"input\")\r\n\t\tmeasurement.reposition.className = \"dev_measureReposition\"\r\n\t\tmeasurement.reposition.type = \"button\"\r\n\t\tmeasurement.reposition.value = \"Reposition\"\r\n\t\tmeasurement.reset = document.createElement(\"input\")\r\n\t\tmeasurement.reset.className = \"dev_measureReset\"\r\n\t\tmeasurement.reset.type = \"button\"\r\n\t\tmeasurement.reset.value = \"Reset form\"\r\n\t\tmeasurement.setDesignImage = document.createElement(\"input\")\r\n\t\tmeasurement.setDesignImage.className = \"dev_setDesignImage\"\r\n\t\tmeasurement.setDesignImage.type = \"button\"\r\n\t\tmeasurement.setDesignImage.value = \"Alt image\"\r\n\t\t\r\n\t\t\r\n\t\t// Add toolbox to the DOM\r\n\t\tmeasurement.box.appendChild(measurement.x)\r\n\t\tmeasurement.x.appendChild(measurement.xInput)\r\n\t\tmeasurement.box.appendChild(measurement.y)\r\n\t\tmeasurement.y.appendChild(measurement.yInput)\r\n\t\tmeasurement.box.appendChild(measurement.reset)\r\n\t\tmeasurement.box.appendChild(measurement.reposition)\r\n\t\tmeasurement.box.appendChild(measurement.setDesignImage)\r\n\t\tEstate.Develop.GetRoot().appendChild(measurement.box)\r\n\t\t\r\n\t\t// Add events to input boxes\r\n\t\tEstate.Events.AddEvent (\r\n\t\t\tmeasurement.xInput,\r\n\t\t\tfunction(e) {\r\n\t\t\t\tvar KeyID = (window.event) ? event.keyCode : e.which;\r\n\t\t\t\tinputKeyUp(KeyID, \"x\")\r\n\t\t\t},\r\n\t\t\t\"onkeyup\"\r\n\t\t)\r\n\t\tEstate.Events.AddEvent (\r\n\t\t\tmeasurement.yInput,\r\n\t\t\tfunction(e) {\r\n\t\t\t\tvar KeyID = (window.event) ? event.keyCode : e.which;\r\n\t\t\t\tinputKeyUp(KeyID, \"y\")\r\n\t\t\t},\r\n\t\t\t\"onkeyup\"\r\n\t\t)\r\n\t\tEstate.Events.AddEvent (\r\n\t\t\tmeasurement.xInput,\r\n\t\t\tfunction(e) {\r\n\t\t\t\tvar KeyID = (window.event) ? event.keyCode : e.which;\r\n\t\t\t\tinputKeyDown(KeyID, \"x\")\r\n\t\t\t},\r\n\t\t\t\"onkeydown\"\r\n\t\t)\r\n\t\tEstate.Events.AddEvent (\r\n\t\t\tmeasurement.yInput,\r\n\t\t\tfunction(e) {\r\n\t\t\t\tvar KeyID = (window.event) ? event.keyCode : e.which;\r\n\t\t\t\tinputKeyDown(KeyID, \"y\")\r\n\t\t\t},\r\n\t\t\t\"onkeydown\"\r\n\t\t)\r\n\r\n\t\t// Set value input boxes to 0\r\n\t\tmeasurement.reset.onclick = function() {\r\n\t\t\tmeasurement.xInput.value = \"0\"\r\n\t\t\tmeasurement.yInput.value = \"0\"\r\n\t\t}\r\n\t\t\r\n\t\t// Place design on its original position\r\n\t\tmeasurement.reposition.onclick = function() {\r\n\t\t\tisDesignImagePositioned = false;\r\n\t\t\tpositionDesignImage();\r\n\t\t}\r\n\r\n\t\t// Load alternate design file\r\n\t\tmeasurement.setDesignImage.onclick = function() {\r\n\t\t\tvar defaultName = \"filename.\" + config.designImageType\r\n\t\t\tvar designImage = window.prompt('Enter the file name of the design image that has to be loaded.', defaultName);\r\n\t\t\tif (designImage != \"\" && designImage != defaultName) {\r\n\t\t\t\tsetDesignImageSource(designImage)\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function dynamicSummary(){\n fieldArray = [];\t//\tclear array so everytime this is called we update the data\n window.guideBridge.visit(function(cmp){\n var name = cmp.name;\n if(name && isVisible(cmp)){\n var grouped = isGrouped(cmp);\n var hideLabel = isHideLabel(cmp);\n var hideLink = isHideLink(cmp);\n\n if(name.indexOf(\"block_heading_\") == 0){//\tcheck if block heading (like for the address block fields)\n fieldArray.push({\"type\":\"block_heading\",\"size\":size(cmp),\"name\":cmp.name,\"value\":$(cmp.value).html(),\"grouped\":grouped, \"hideLink\":hideLink, \"className\":cmp.className, \"cssClassName\":cmp.cssClassName,\"id\":cmp.id,\"som\":cmp.somExpression});\n }\n else if(name.indexOf(\"block_\") == 0) {//\tcheck if object is a group panel\n fieldArray.push({\"type\":\"block\",\"size\":size(cmp),\"name\":cmp.name,\"title\":cmp.title, \"grouped\":grouped, \"className\":cmp.className, \"id\":cmp.id,\"som\":cmp.somExpression});\n }\n else if(name.indexOf(\"heading_\") == 0){//\tcheck if heading\n fieldArray.push({\"type\":\"heading\",\"size\":size(cmp),\"name\":cmp.name,\"value\":$(cmp.value).html(),\"grouped\":grouped, \"hideLink\":hideLink, \"className\":cmp.className, \"cssClassName\":cmp.cssClassName,\"id\":cmp.id,\"som\":cmp.somExpression});\n }\n else{\n //if(cmp.value != null){\n if(cmp.className == \"guideTextBox\"){\n fieldArray.push({\"type\":\"field\",\"name\":cmp.name,\"title\":cmp.title,\"grouped\":grouped,\"hideLabel\":hideLabel, \"hideLink\":hideLink, \"value\":((cmp.value)?cmp.value:\"Not provided\"),\"className\":cmp.className,\"id\":cmp.id,\"som\":cmp.somExpression});\n }\n if(cmp.className == \"guideRadioButton\" ||\n cmp.className == \"guideCheckBox\" ){\n fieldArray.push({\"type\":\"option\",\"name\":cmp.name,\"title\":cmp.title,\"grouped\":grouped,\"hideLabel\":hideLabel,\"hideLink\":hideLink, \"value\":((cmp.value)?cmp.value:\"Not provided\"), \"obj\":cmp,\"className\":cmp.className,\"id\":cmp.id,\"som\":cmp.somExpression});\n }\n //}\n }\n }\n });\n\n renderHTML();\t//\tthis generates the html inside the summary component\n}", "function buildVisualization(animationSpeed) {\r\n\t\taddDataProcess();\r\n \tbrunel.rebuild(animationSpeed);\r\n\t}", "function refreshAllConstruction () {\n\n\n totalLens = renderableLens.total;\n pointsTable = lens.pointsTable.getData(); \n lens.raphael.constructions.forEach (elem => {\n\n\n // elem is a CONSTRUCTION \n\n\n /* NEGATIVE HEIGHT BECAUSE TABLE AND GRAPH HAVE OPPOSITELY SIGNED DIRECTIONS */\n\n console.log (`- REFRESH construction ID = ${elem.getId()}`);\n aRow = lens.pointsTable.getRow(elem.getId()).getData();\n aPoint = { id: aRow.id, which: \"object\", z:aRow.zo, h:-aRow.ho, t:aRow.to };\n\n\n /* question is whether this needs to reversed in height */\n\n pairData = Optics.calculateConjugatePairFrom(aPoint, totalLens);\n elem.setPairData(pairData); \n elem.setLens(totalLens); // <--- this should change \n elem.refresh();\n\n // update on POINTS TABLE \n console.log (`- CALLED Update on Points Table`); \n updatePointsTable(aPoint.id, pairData);\n });\n }", "function refresh() {\n\tstate = Engine.new_scenario();\n\tEngine.update_min_weight_val();\n\tPlotError.update_error_line();\n\tPlotError.update_true_weight_line();\n PlotData.update_target_line();\n PlotData.update_hypothesis_line();\n\tPlotData.update_training_circles();\n\tupdate_sliders();\n\treset_sgd();\n\tPlotError.update_batch_error_line();\n}", "derive() {\n super.derive();\n\n this.assignToDataset({\n SOPClassUID: DicomMetaDictionary.sopClassUIDsByName.EnhancedSR,\n Modality: \"SR\",\n ValueType: \"CONTAINER\"\n });\n\n this.assignFromReference([]);\n }", "function update() {\n\t\tfilterName = $(\"#new_pipeline #filterName\");\n\t\trequestType = $(\"#new_pipeline #requestType\");\n\t\trequestRank = $(\"#new_pipeline #requestRank\");\n\t\tmakeTrace = $(\"#new_pipeline #makeTrace\");\n\t\ttips = $(\"#new_pipeline .validateTips\");\n\t\tallFields = $([]).add(filterName).add(requestType).add(requestRank).add(makeTrace);\n\t}", "postCreate() {\n self_cw = this;\n this.inherited(arguments);\n // console.log('Consulta_wgt::postCreate');;\n this._getAllLayers();\n this.feature_dc = this.layersMap.getLayerInfoById(this.config.layer_id_dc);\n this.feature_dc_table = this.layersMap.getTableInfoById(this.config.table_id_dc);\n this.feature_dm = this.layersMap.getLayerInfoById(this.config.layer_id_dm);\n this.feature_dep = this.layersMap.getLayerInfoById(this.config.layer_id_dep);\n this.feature_prov = this.layersMap.getLayerInfoById(this.config.layer_id_prov);\n this.feature_dist = this.layersMap.getLayerInfoById(this.config.layer_id_dist);\n }", "function _buildElements() {\n\t\t\t_buildGroup(_settings.layout.left);\n\t\t\t_buildGroup(_settings.layout.right, -1);\n\t\t\t_buildGroup(_settings.layout.center);\n\t\t}", "_preprocess(original) {\n const json = _merge({}, this.templates.defaultModel, original);\n const metamodel = this.metamodel.unwrap();\n if (!json.diagram.metadata.ref) {\n if (metamodel.diagram.metadata.id) {\n json.diagram.metadata.ref = metamodel.diagram.metadata.id;\n } else {\n json.diagram.metadata.ref = '$';\n }\n }\n\n for (const lifeline of json.diagram.lifelines) {\n lifeline.id = lifeline.id || lifeline.name;\n }\n\n for (const step of json.diagram.steps) {\n if (step.message) {\n step.message.id = step.message.id || Model._guid();\n const occurrences = step.message.occurrences;\n if (occurrences) {\n occurrences.start = occurrences.start || [];\n occurrences.stop = occurrences.stop || [];\n }\n }\n }\n\n if (!json.diagram.metadata.id || json.diagram.metadata.id === '$') {\n json.diagram.metadata.id = Model._guid();\n }\n\n return json;\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n }", "compile() {\n const drawHash = this._makeDrawHash();\n if (this._state.drawHash !== drawHash) {\n this._state.drawHash = drawHash;\n this._putDrawRenderers();\n this._drawRenderer = DrawRenderer.get(this);\n // this._shadowRenderer = ShadowRenderer.get(this);\n this._emphasisFillRenderer = EmphasisFillRenderer.get(this);\n this._emphasisEdgesRenderer = EmphasisEdgesRenderer.get(this);\n }\n const pickHash = this._makePickHash();\n if (this._state.pickHash !== pickHash) {\n this._state.pickHash = pickHash;\n this._putPickRenderers();\n this._pickMeshRenderer = PickMeshRenderer.get(this);\n }\n const occlusionHash = this._makeOcclusionHash();\n if (this._state.occlusionHash !== occlusionHash) {\n this._state.occlusionHash = occlusionHash;\n this._putOcclusionRenderer();\n this._occlusionRenderer = OcclusionRenderer.get(this);\n }\n }", "_createSliderStructure() {\n this._viewLimiter = this._createViewLimiter();\n this._itemsHolder = this._createItemsHolder();\n }", "function visualizationLogic(){\n console.log(\"Visualization Logic\")\n //text\n //INFO from: https://earthquake.usgs.gov/earthquakes/browse/significant.php#sigdef\n // let t2 = createP('Events in this list and shown in red on our real-time earthquake map and list are considered “significant events’,<br>and they are determined by a combination of magnitude, number of Did You Feel It responses, and PAGER alert level.');\n // t2.class('small');\n // t2.parent('canvas1');\n // t2.position(0,0);\n\n //-------------------------------------------------------------//\n // 1. Magnitude Level //\n //-------------------------------------------------------------//\n\n //Variables for All\n let legendW = 60;\n //Variables for Magnitude\n let Mag_Legends = [0, 1, 3, 4.5, 6, 9];\n let Mag_xPos = (cWidth - Mag_Legends.length * legendW)/2; //CENTER THEM\n let Mag_margin = 10;\n let Mag_angle = 0;\n\n //Variables for Significance\n let minSig = minValue(quakes, 'sig');\n let maxSig = maxValue(quakes, 'sig');\n console.log(`MinSig is ${minSig} MaxSig is ${maxSig}`);\n let sig_Legends = [0, 100, 200, 400, 600, 1000, 1500];\n let sig_xPos = (cWidth - sig_Legends.length * legendW)/2; //CENTER THEM\n let sig_margin = 10;\n\n textFont(font1);\n //\n push();\n translate(Mag_xPos, legendW); \n for (let i = 0; i < Mag_Legends.length; i ++) {\n let myAPT_W, myAPT_H;\n myAPT_W = map(1000, 0, 1500, 1, legendW/2); \n myAPT_H = 2 * myAPT_W;\n Mag_angle = radians ( map(Mag_Legends[i], 0, 9, 0, 90) ); //Input, min, max, 0, 90\n //This is the class for the buildings;\n //\n push();\n let xTrans = legendW/2 - myAPT_W/2;\n translate(xTrans, 0); // ****************. FIX THIS PART\n rotate(Mag_angle);\n //2. Building \n let mySigC = sigScale(1000).hex();\n let myMagC = magScale(Mag_Legends[i]).hex();\n myMagC = color(myMagC);\n myMagC.setAlpha(150); // Add Alpha\n fill(mySigC);\n strokeWeight(1);\n stroke('#000000');\n rect(0, 0, myAPT_W, - myAPT_H);//x, y, w, h\n //3. Window\n fill('#ffffff');\n strokeWeight(0.5);\n let myWindowW = map(400, 0, 1500, 1, legendW/7);\n let myWindwX1 = legendW/2 - myAPT_W/5 - myWindowW/2 - xTrans;\n let myWindwX2 = myWindwX1 + 2*(myAPT_W/5) ;\n rect(myWindwX1, - myAPT_H/4 + myWindowW/2, myWindowW, - myWindowW); \n rect(myWindwX1, - (myAPT_H/4) * 2 + myWindowW/2, myWindowW, - myWindowW);\n rect(myWindwX1, - (myAPT_H/4) * 3 + myWindowW/2, myWindowW, - myWindowW);\n rect(myWindwX2, - myAPT_H/4 + myWindowW/2, myWindowW, - myWindowW); \n rect(myWindwX2, - (myAPT_H/4) * 2 + myWindowW/2, myWindowW, - myWindowW);\n rect(myWindwX2, - (myAPT_H/4) * 3 + myWindowW/2, myWindowW, - myWindowW);\n //4. Rooftop\n let x1, y1;\n x1 = legendW/2 - myAPT_W/2 - xTrans;\n y1 = - myAPT_H;\n let h = map(1000, 0, 1500, 1, myWindowW);\n line(x1, y1, x1 - h, y1 - h); //Left\n line(x1 + myAPT_W, y1, x1 + myAPT_W + h, y1 - h); //Right\n line(x1 - h, y1 - h, x1 + myAPT_W + h, y1 - h); //top\n pop();\n //1. Ground\n noStroke(); \n fill(myMagC);\n rect(Mag_margin, 0, legendW - 2 * Mag_margin, 15 * map(Mag_Legends[i], 0, 9, 0, 90)/90 ); ////x, y, w, h\n //5. -- Legend Text Below -- //\n noStroke();\n fill('orange');\n textSize(12);\n textAlign(CENTER);\n text(Mag_Legends[i], legendW/2, 35); //text,x, y\n //6. //Move to the next spot to the Right (Add scale)\n translate(legendW, 0); \n }\n pop();\n //Text Description\n textAlign(CENTER);\n textSize(15);\n text(\"Magnitude Level\", cWidth/2, legendW*1.9); \n\n //-------------------------------------------------------------//\n // 2. Significance Level //\n //-------------------------------------------------------------//\n // Cali range 0 from 640, World Range from 0 to 1492\n\n push();\n translate(sig_xPos, legendYPos + legendW + sig_margin); //x, y\n for (let i = 0; i < sig_Legends.length; i ++) {\n let myAPT_W, myAPT_H;\n myAPT_W = map(sig_Legends[i], 0, 1500, 1, legendW/2); //Input, min, max,\n myAPT_H = 2 * myAPT_W; //2 Times over -> Max will be 60\n //This is the class for the buildings;\n //1. Ground\n // noStroke();\n // fill(magScale(0).hex()); //Show the Color at Mag = 0;\n // //fill('rgba(150, 75, 0, 0.5)'); // Brown //************** Should be re-written \n // rect(sig_margin, 0, legendW - 2 * sig_margin, 20); ////x, y, w, h\n //2. Building //Half Point: legendW/2\n let myC = sigScale(sig_Legends[i]).hex();\n fill(myC);\n strokeWeight(1);\n stroke('#000000');\n rect(legendW/2 - myAPT_W/2, 0, myAPT_W, - myAPT_H);//x, y, w, h\n //3. Apartment Windows\n fill('#ffffff');\n strokeWeight(0.5);\n let myWindowW = map(sig_Legends[3], 0, 1500, 1, legendW/7);\n if (sig_Legends[i] < 200) { // No Window\n console.log(\"Sig level below 200 - No Window\");\n }\n if (sig_Legends[i] >= 200 && sig_Legends[i] < 400) { //One Window\n console.log(\"Sig level between 200 & 400\"); \n rect(legendW/2 - myWindowW/2, - myAPT_H/2 + myWindowW/2, myWindowW, - myWindowW); \n } \n if (sig_Legends[i] >= 400 && sig_Legends[i] < 600) { //Two Windows\n console.log(\"Sig level between 400 & 600\"); \n rect(legendW/2 - myWindowW/2, - myAPT_H/3 + myWindowW/2, myWindowW, - myWindowW); \n rect(legendW/2 - myWindowW/2, - (myAPT_H/3) * 2 + myWindowW/2, myWindowW, - myWindowW);\n }\n if (sig_Legends[i] >= 600 && sig_Legends[i] < 1000) { //Two Windows * 2 Cols\n console.log(\"Sig level between 600 & 1000\"); \n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - myAPT_H/3 + myWindowW/2, myWindowW, - myWindowW); \n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - (myAPT_H/3) * 2 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - myAPT_H/3 + myWindowW/2, myWindowW, - myWindowW); \n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - (myAPT_H/3) * 2 + myWindowW/2, myWindowW, - myWindowW);\n }\n if (sig_Legends[i] >= 1000 && sig_Legends[i] < 1500) { //Two Windows * 3 Cols\n console.log(\"Sig level between 1000 & 1500\"); \n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - myAPT_H/4 + myWindowW/2, myWindowW, - myWindowW); \n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - (myAPT_H/4) * 2 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - (myAPT_H/4) * 3 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - myAPT_H/4 + myWindowW/2, myWindowW, - myWindowW); \n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - (myAPT_H/4) * 2 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - (myAPT_H/4) * 3 + myWindowW/2, myWindowW, - myWindowW);\n }\n if (sig_Legends[i] >= 1500) { //Two Windows * 3 Cols\n console.log(\"Sig level Over 1500\"); \n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - myAPT_H/6 + myWindowW/2, myWindowW, - myWindowW); \n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - (myAPT_H/6) * 2 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - (myAPT_H/6) * 3 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - (myAPT_H/6) * 4 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 - myAPT_W/5 - myWindowW/2, - (myAPT_H/6) * 5 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - myAPT_H/6 + myWindowW/2, myWindowW, - myWindowW); \n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - (myAPT_H/6) * 2 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - (myAPT_H/6) * 3 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - (myAPT_H/6) * 4 + myWindowW/2, myWindowW, - myWindowW);\n rect(legendW/2 + myAPT_W/5 - myWindowW/2, - (myAPT_H/6) * 5 + myWindowW/2, myWindowW, - myWindowW);\n }\n //4. RoofTop - 3 lines;\n let x1, y1, x2, y2;\n x1 = legendW/2 - myAPT_W/2;\n y1 = - myAPT_H;\n let h = map(sig_Legends[i], 0, 1500, 1, myWindowW);\n line(x1, y1, x1 - h, y1 - h); //Left\n line(x1 + myAPT_W, y1, x1 + myAPT_W + h, y1 - h); //Right\n line(x1 - h, y1 - h, x1 + myAPT_W + h, y1 - h); //top\n //5. -- Legend Text Below -- //\n noStroke();\n fill('#cccccc');\n textSize(12);\n textAlign(CENTER);\n text(sig_Legends[i], legendW/2, 15); //text,x, y\n //6. //Move to the next spot to the Right (Add scale)\n translate(legendW, 0); \n }\n pop();\n //Text Description\n textAlign(CENTER);\n textSize(15);\n fill('#000000');\n text(\"Significance Level\", cWidth/2, legendYPos + legendW*1.75);\n\n\n}", "renderElements(data, xScale, renderGroups) {\n\n let { lineG, circleG,/* arrowG,*/ tagG } = renderGroups;\n\n lineG.selectAll('rect').remove();\n circleG.selectAll('circle').remove();\n tagG.selectAll('polyline').remove();\n tagG.selectAll('text').remove();\n\n\n this.renderLines(data, xScale, lineG);\n this.renderCircles(data, xScale, circleG);\n this.renderTags(data, xScale, tagG);\n //if(!data.realEndDate) this.renderArrows(data, xScale,arrowG);\n\n }", "function comportement (){\n\t }", "function optimizeLayout(controlPanel, numIt, k, language)\n{\n this.numCols = Math.floor($(window).width()/this.pixelsCol);\n this.numLayers = this.layers.length;\n\n // calculates the width in columns of every layer\n this.widths = new Array(this.numLayers);\n\n for (var i=0 ; i<this.numLayers ; i++) {\n this.widths[i] = parseInt(($(this.layers[i]).width()/this.pixelsCol)+0.5);\n }\n\n \n\n theLayout = this;\n\n if (theLayout.numLayers<2) {\n if (language==\"spanish\")\n alert(\"Para optimizar debe haber al menos 2 noticias\");\n else\n alert(\"There must be two or more news to optimize\");\n\n return;\n }\n\n var numIterations = parseInt(numIt);\n\n if ( numIterations <=0 ) {\n if (language==\"spanish\")\n alert(\"Numero de iteraciones incorrecto\");\n else\n alert(\"Incorrect number of iterations\");\n } else {\n\n var initTemp = -(10/Math.log(0.8));\n var minTemp = initTemp / (numIterations + 1);\n\n // Create the initial solution\n this.solution = new Chromosome (this.numLayers);\n\n // Eval the solution\n this.solution.calculateFitness();\n\n var timeBefore=(new Date()).getTime();\n var t = initTemp;\n var n=0;\n if (controlPanel!=null) {\n controlPanel.document.forms[0].it.value = n;\n }\n\n do {\n for (j=0 ; j<k ; j++) {\n var opt = this.solution.clone();\n opt.mutate();\n opt.calculateFitness();\n\n var delta = opt.fitness - this.solution.fitness;\n if (delta<0 || Math.random() < Math.exp(-(delta/t))) {\n this.solution.kill();\n this.solution = opt.clone();\n this.solution.fitness = opt.fitness;\n }\n opt.kill();\n opt = null;\n }\n t = initTemp / (n + 1);\n n++;\n\n if (controlPanel!=null) {\n controlPanel.document.forms[0].it.value = n;\n }\n\n }while (t>=minTemp);\n\n var timeAfter=(new Date()).getTime();\n if (controlPanel!=null) {\n controlPanel.document.forms[0].time.value = (timeAfter-timeBefore)/1000;\n controlPanel.document.forms[0].fitness.value = this.solution.fitness;\n }\n this.paint(this.solution);\n }\n}", "prepare() {\n //Update values\n this.prepared = {\n cycle:this.cycle + (this.hunger > 0 ? this.genes.growth_rate : 0),\n fertility:this.fertility + (this.adult ? this.genes.fertility_rate : 0),\n hp:this.hp + (this.hunger > 0 ? this.genes.stats.hp_regen : this.genes.hunger_hp_loss),\n hunger:this.hunger-this.genes.hunger_rate,\n sudden_death:this.manager.life.reaper(this.age, this.genes.longetivity),\n busy:-1\n }\n //Update action and target\n this.prepared.action = this.output.prepare(this.inputs.prepared())\n //Update target infos\n if ((this.targets.length)||(\"r\" in this.prepared)) {\n if (!(\"r\" in this.prepared)) { this.prepared.r = this.r + this.from(this.targets[0]).angle }\n if (!this.busy) {\n this.prepared.x = this.x + Math.cos(this.prepared.r)*this.speed\n this.prepared.y = this.y + Math.sin(this.prepared.r)*this.speed\n }\n }\n }", "_render() {\n\t\tthis.tracker.replaceSelectedMeasures();\n }", "function model_upcreate()\n {\n //==========================\n //:at landing, copies study-model-pars from config to app model\n if( !ns.h( ssD, 'EPSILON' ) ) {\n ssD.EPSILON = sconf.EPSILON;\n ssD.delta_fraction = sconf.DELTA_FRACTION;\n }\n //==========================\n //:study-pars\n var EPSILON = ssD.EPSILON; //curve params\n var delta_fraction = ssD.delta_fraction;\n var limDemo = mat.limDemo = mat.limDemo || {};\n if( !limDemo.instance ) {\n //.recall: beats_sample is a result of execution of the data generator\n //.beats_sample = prepareBeatData()\n var ww = limDemo.dataSamples.beats_sample;\n ww.SVG_XAXIS_LEN = 800;\n ww.SVG_XAXIS_START = 100;\n\n ww.SVG_YAXIS_LEN = 800;\n ww.SVG_YAXIS_START = 50;\n limDemo.instance = limDemo.setDemo( ww );\n\n modelPaths = limDemo.instance.model_2_media(\n stdMod.mmedia\n );\n toreg( 'modelPaths' )( 'modelPaths', modelPaths );\n }\n var lim = limDemo.dataSamples.beats_sample.lim;\n var modE = toreg( 'point-E' )( 'pos', [-0.06,lim + EPSILON] )( 'pos' );\n //ccc('upcr: modE.posY=' + rg['point-E']['pos'][1] );\n ///full interval of epsilon range\n toreg( 'eps_Neighb' )( 'eps_Neighb',\n [\n [ modE[0], 2*lim - modE[1] ],\n [ modE[0], modE[1] ]\n ]\n );\n ///upper half of epsilon strip\n toreg( 'eps_NeighbUp' )( 'eps_NeighbUp',\n [\n [ modE[0], lim ],\n [ modE[0], EPSILON + lim ]\n ]\n );\n\n //-----------------------------------------\n // //\\\\ finds gamma-neighbourhood\n //-----------------------------------------\n var absVariation = modelPaths.absVariation;\n var neighbIx = 0;\n absVariation.forEach( (abs, ix) => {\n if( EPSILON > abs ) {\n neighbIx = ix;\n }\n });\n var xNeighb= modelPaths.xArray[ neighbIx ];\n var yNeighb= modelPaths.absVariation[ neighbIx ];\n\n var neighbIxChosen = 1;\n var ww = delta_fraction * xNeighb;\n modelPaths.modelLowPath.forEach( (point, ix) => {\n if( point[0] <= ww && ix ) {\n neighbIxChosen = ix;\n }\n });\n toreg( 'neighbIxChosen' )( 'neighbIxChosen', neighbIxChosen );\n\n //ccc( neighbIx, xNeighb, yNeighb );\n var modD = toreg( 'point-D' )( 'pos', [delta_fraction * xNeighb, 0] )( 'pos' );\n\n toreg( 'yNeighbUpper' )( 'yNeighbUpper',\n {\n upperLine :\n [\n [ 0, lim+yNeighb ],\n [ xNeighb, lim+yNeighb ]\n ],\n lowerLine :\n [\n [ 0, lim-yNeighb ],\n [ xNeighb, lim-yNeighb ]\n ]\n }\n );\n toreg( 'neighbVertical' )( 'neighbVertical',\n [\n [ xNeighb, lim+yNeighb ],\n [ xNeighb, 0 ]\n ]\n );\n ///permitted delta range:\n toreg( 'neighbHor' )( 'neighbHor',\n [\n [ 0, 0 ],\n [ xNeighb, 0 ]\n ]\n );\n ///permitted delta range:\n toreg( 'chosenDelta' )( 'chosenDelta',\n [\n [ 0, 0 ],\n [ modD[0], modD[1] ]\n ]\n );\n //-----------------------------------------\n // \\\\// finds gamma-neighbourhood\n //-----------------------------------------\n }", "function layoutInvalidated() {\n\t\t\t//console.log('layoutInvalidated();');\n\t\t\t//var timeline = new TimelineMax();\n\n\t\t\tG.containerwidth = $container.width();\n\t\t\tG.boxWidth = G.containerwidth / G.cols;\n\t\t\tvar imageResizeRatio = G.containerwidth / G.originalWidth;\n\t\t\tvar modifiedHeight = G.originalHeight * imageResizeRatio;\n\t\t\tG.boxHeight = modifiedHeight / G.rows;\n\n\t\t\t//Assign the BG image to all boxes here. will position and scale it below\n\t\t\t$('.box').css('background-image', 'url(' + G.image + ')');\n\t\t\t$('.box').css('background-size', G.containerwidth+'px');\n\n\t\t\t$(\".box\").each(function(index, element) {\n\n\t\t\t\t//for each box, update its variables then move/scale it appropriately\n\t\t\t\tvar tile = this.tile;\n\t\t\t\t$.extend(tile, {\n\t\t\t\t\t x : getXPositionFromIndex(tile.order),\n\t\t\t\t\t y : getYPositionFromIndex(tile.order),\n\t\t\t\t\t width : G.boxWidth,\n\t\t\t\t\t height : G.boxHeight\n\t\t\t\t\t});\n\n\t\t\t\t//Assign and scale the BG image\n\t\t\t\t$(element).css('background-position', -getXPositionFromIndex(tile.index)+\"px \"+-getYPositionFromIndex(tile.index)+\"px\");\n\t\t\t\tTweenLite.to(element, G.swapTime, {\n\t\t\t\t\tx : Math.floor(tile.x),\n\t\t\t\t\ty : Math.floor(tile.y),\n\t\t\t\t\twidth : tile.width,\n\t\t\t\t\theight : tile.height,\n\t\t\t\t\tease:Strong.easeInOut,\n\t\t\t\t\tonComplete : function() { tile.positioned = true; },\n\t\t\t\t\tonStart : function() { tile.positioned = false; }\n\t\t\t\t });\n\t\t\t});\n\n\t\t\t//Make the container the height of the puzzle - this helps with positioning the start button in the center\n\t\t\t$(\"#slide-\"+G.currentSlide+\"\").height(G.originalHeight*imageResizeRatio);\n\n\t\t\t//adjust the score size and placement\n\t\t\t//make the success states huge: https://github.com/davatron5000/FitText.js\n\t\t\tvar canvasHeight = $(\"#slide-\"+G.currentSlide).height();\n\n\t\t}", "function revenueResize() {\n\n // Layout variables\n width = d3Container.node().getBoundingClientRect().width - margin.left - margin.right;\n\n\n // Layout\n // -------------------------\n\n // Main svg width\n container.attr(\"width\", width + margin.left + margin.right);\n\n // Width of appended group\n svg.attr(\"width\", width + margin.left + margin.right);\n\n // Horizontal range\n x.range([padding, width - padding]);\n\n\n // Chart elements\n // -------------------------\n\n // Mask\n clipRect.attr(\"width\", width);\n\n // Line path\n svg.selectAll('.d3-line').attr(\"d\", line(dataset));\n\n // Circles\n svg.selectAll('.d3-line-circle').attr(\"cx\", line.x());\n\n // Guide lines\n svg.selectAll('.d3-line-guides')\n .attr('x1', function (d, i) {\n return x(d.date);\n })\n .attr('x2', function (d, i) {\n return x(d.date);\n });\n }", "function BrushableScale(ctx,svg,width,updateFunctionNameInCtx,redrawFunctionNameInCtx,scaleNameInCtx,params){ // var svg = d3.select(\"#vis\").append(\"svg\").attr({\n\t// width:800,\n\t// height:800\n\t// })\n\tvar offsetX=0,offsetY=0;var distanceBetweenAxis=25; // distance between two scales\n\tvar distanceBetweenUpperAndLower=20; // should be fix !!\n\t// height=20;\n\tvar width=width;var xScale=d3.scale.pow().exponent(2).domain([1,width]).range([0,width]);var xOverViewAxisUpper=d3.svg.axis().scale(xScale);var xOverViewAxisLower=d3.svg.axis().scale(xScale).orient(\"top\").tickFormat(function(d){return \"\";});var xDetailScale=d3.scale.linear().domain([0,width]).range([0,width]).clamp(true);var xDetailAxisUpper=d3.svg.axis().scale(xDetailScale).ticks(5);var xDetailAxisLower=d3.svg.axis().scale(xDetailScale).orient(\"top\").tickFormat(function(d){return \"\";}).ticks(5);var param=param;var columnLabel=\"ABC\";var maxValue=100;var labels=[{name:\"largest intersection\",id:\"I\",value:100},{name:\"largest group\",id:\"G\",value:200},{name:\"largest set\",id:\"S\",value:300},{name:\"all items\",id:\"A\",value:400}];var actionsTriggeredByLabelClick=params.actionsTrioggeredByLabelClick;var connectionAreaData=[[0,-distanceBetweenAxis],[100,-distanceBetweenAxis],[width,0]]; // add axis\n\tsvg.append(\"g\").attr({\"class\":\"x overviewAxisUpper axis\",\"transform\":\"translate(\"+offsetX+\",\"+offsetY+\")\"}).call(xOverViewAxisUpper);svg.append(\"g\").attr({\"class\":\"x overviewAxisLower axis\",\"transform\":\"translate(\"+offsetX+\",\"+(offsetY+distanceBetweenUpperAndLower)+\")\"}).call(xOverViewAxisLower);svg.append(\"g\").attr({\"class\":\"x detailAxisUpper axis\",\"transform\":\"translate(\"+offsetX+\",\"+(offsetY+distanceBetweenAxis+distanceBetweenUpperAndLower)+\")\"}).call(xDetailAxisUpper);svg.append(\"g\").attr({\"class\":\"x detailAxisLower axis\",\"transform\":\"translate(\"+offsetX+\",\"+(offsetY+distanceBetweenAxis+2*distanceBetweenUpperAndLower)+\")\"}).call(xDetailAxisLower); // svg.append(\"path\").attr({\n\t// class:\"connectionArea\",\n\t// \"transform\":\"translate(\"+offsetX+\",\"+offsetY+\")\"\n\t// })\n\tvar sliders;var overViewBrushDef;var overviewBrush;var redrawFunction=ctx[redrawFunctionNameInCtx]; // brushed function\n\tvar brushed=function brushed(){var endRange=overViewBrushDef.extent()[1];if(endRange<5){endRange=5;overViewBrushDef.extent([0,5]);}svg.select(\".drawBrush\").attr({width:xScale(endRange)});xDetailScale.domain([0,endRange]);xDetailAxisUpper.scale(xDetailScale);xDetailAxisLower.scale(xDetailScale);svg.selectAll(\".detailAxisUpper\").call(xDetailAxisUpper);svg.selectAll(\".detailAxisLower\").call(xDetailAxisLower);connectionAreaData[1][0]=xScale(endRange);updateConnectionArea();if(redrawFunction!=null)redrawFunction();ctx[scaleNameInCtx]=xDetailScale;};var setBrush=function setBrush(size){ // var sizeB =xScale(size);\n\toverViewBrushDef.extent([0,size]); // overviewBrush.select(\".e\").attr({\n\t// \"transform\":\"translate(\"+xScale(size)+\",\"+0+\")\"\n\t// })\n\toverviewBrush.call(overViewBrushDef);brushed();};function updateColumnLabel(){svg.select(\".columnLabelGroup\").select(\"rect\").attr({width:width});svg.select(\".columnLabelGroup\").select(\"text\").attr({x:width/2});}var update=function update(params){if(params.maxValue!=null)maxValue=params.maxValue;if(params.labels!=null)labels=params.labels;if(params.width!=null)width=params.width;updateScales();updateSliderLabels();updateColumnLabel();};function init(){if(params.columnLabel!=null)columnLabel=params.columnLabel; // define slider\n\toverViewBrushDef=d3.svg.brush().x(xScale).extent([0,100]).on(\"brush\",brushed).on(\"brushstart\",function(){svg.selectAll(\".columnLabelGroup\").transition().duration(100).style({opacity:0});svg.selectAll(\".connectionArea\").transition().duration(100).style({opacity:.2});}).on(\"brushend\",function(){svg.selectAll(\".columnLabelGroup\").transition().duration(500).style({opacity:1});svg.selectAll(\".connectionArea\").transition().duration(500).style({opacity:.00001});});sliders=svg.append(\"g\").attr({class:\"sliderGroup\",\"transform\":\"translate(\"+offsetX+\",\"+offsetY+\")\"});sliders.append(\"path\").attr({class:\"connectionArea\"}).style({opacity:.00001});var labelHeight=20;var columnLabelGroup=svg.append(\"g\").attr({class:\"columnLabelGroup\",\"transform\":\"translate(\"+0+\",\"+(distanceBetweenUpperAndLower+(distanceBetweenAxis-labelHeight)/2)+\")\" //Math.floor\n\t});columnLabelGroup.append(\"rect\").attr({class:\"labelBackground\",x:0,y:0,width:width,height:labelHeight // TODO magic number\n\t}).on({\"click\":function click(){actionsTriggeredByLabelClick.forEach(function(d){d();});}});columnLabelGroup.append(\"text\").attr({class:\"columnLabel\",\"pointer-events\":\"none\",x:width/2,y:labelHeight/2}) // .style({\n\t// \"font-size\":\"1em\"\n\t// })\n\t.text(columnLabel);sliders.append(\"rect\").attr({class:\"drawBrush\",x:0,y:0,height:distanceBetweenUpperAndLower,width:overViewBrushDef.extent()[1]});overviewBrush=sliders.append(\"g\").attr({class:\"slider\"}).call(overViewBrushDef);overviewBrush.selectAll(\".w, .extent, .background\").remove();overviewBrush.selectAll(\"rect\").attr({height:50,width:20});overviewBrush.selectAll(\".e\").append(\"rect\").attr({\"class\":\"handle\"});overviewBrush.selectAll(\"rect\").attr({transform:\"translate(0,\"+distanceBetweenUpperAndLower/2+\")rotate(45)\",x:-5,y:-5,height:10,width:10});sliders.append(\"g\").attr({class:\"labels\"});}function updateScales(){var brushedValue=d3.min([overViewBrushDef.extent()[1],maxValue]);var optimalExponent=getOptimalExponent(maxValue,width);xScale.domain([0,maxValue]).range([0,width]).exponent(optimalExponent); // Heavy label stuff\n\tvar formatFunction=null;var tickValues=xScale.ticks(10);tickValues.push(maxValue);var tickValuesReverse=tickValues.reverse();var drawLabels={};var numberWidth=6/2; // TODO magic Number 6\n\tvar maxSpace=width-maxValue.toString(10).length*numberWidth;drawLabels[maxValue]=true;tickValuesReverse.forEach(function(label){if(xScale(label)+label.toString(10).length*numberWidth<maxSpace){maxSpace=xScale(label)-label.toString(10).length*numberWidth;drawLabels[label]=true;}});formatFunction=function formatFunction(d,i){return d in drawLabels?d:\"\";}; // kill last regular tick if too close to maxValue\n\t// if (xScale(tickValuesReverse[0])< width-maxValue.toString(10).length* numberWidth){\n\t// tickValues.slice()\n\t// }\n\t// if (optimalExponent>.8){\n\t// tickValues = xScale.ticks(6);\n\t// formatFunction = function(d,i){return d;}\n\t// //[0,Math.floor(maxValue/3),Math.floor(maxValue*2/3),maxValue]\n\t// }else{\n\t// tickValues = xScale.ticks(8);\n\t// formatFunction = function(d,i){return (i%2==0 || i<4 || i==(tickValues.length-1))?d:\"\";}\n\t// }\n\t// tickValues.pop();\n\ttickValues.push(maxValue);xOverViewAxisUpper.scale(xScale).tickValues(tickValues).tickFormat(formatFunction);xOverViewAxisLower.scale(xScale).tickValues(tickValues);xDetailScale.range([0,width]);xDetailAxisUpper.scale(xDetailScale);xDetailAxisLower.scale(xDetailScale);connectionAreaData[2]=[width,0];svg.select(\".x.overviewAxisUpper.axis\").call(xOverViewAxisUpper);svg.select(\".x.overviewAxisLower.axis\").call(xOverViewAxisLower);svg.select(\".x.detailAxisUpper.axis\").call(xDetailAxisUpper);svg.select(\".x.detailAxisLower.axis\").call(xDetailAxisLower); // do NOT redraw !\n\toverViewBrushDef.x(xScale);var saveRedraw=redrawFunction;redrawFunction=null;setBrush(brushedValue);redrawFunction=saveRedraw;}function updateSliderLabels(){ // slider labels\n\tvar sliderLabels=sliders.select(\".labels\").selectAll(\".sliderLabel\").data(labels,function(d){return d.name;});sliderLabels.exit().remove();var sliderLabelsEnter=sliderLabels.enter().append(\"g\").attr({class:\"sliderLabel\"});sliderLabelsEnter.append(\"rect\").attr({x:-5,y:0,width:10,height:15}).append(\"svg:title\").text(function(d){return d.name;});sliderLabelsEnter.append(\"line\").attr({x1:0,x2:0,y1:15,y2:20});sliderLabelsEnter.append(\"text\").text(function(d){return d.id;}).attr({dy:\"1em\",\"pointer-events\":\"none\"});sliderLabels.attr({\"transform\":function transform(d){return \"translate(\"+xScale(d.value)+\",\"+-20+\")\";}}).on({\"click\":function click(d){setBrush(d.value);}});}function getOptimalExponent(maxValue,width){if(maxValue<=width)return 1;else { // ensure that value 5 has at least 5 pixel\n\tvar deltaValue=5;var deltaPixel=5;var optimalExponent=Math.log(deltaPixel/width)/Math.log(deltaValue/maxValue);return optimalExponent;}}function updateConnectionArea(){var cAreaNode=svg.selectAll(\".connectionArea\").data([connectionAreaData]);cAreaNode.exit().remove();cAreaNode.enter().append(\"path\").attr({class:\"connectionArea\",\"transform\":\"translate(\"+offsetX+\",\"+(offsetY+distanceBetweenUpperAndLower+distanceBetweenAxis)+\")\"});cAreaNode.attr({\"transform\":\"translate(\"+offsetX+\",\"+(offsetY+distanceBetweenUpperAndLower+distanceBetweenAxis)+\")\",d:d3.svg.area()});}init();updateSliderLabels();updateConnectionArea(); // updateScales();\n\tctx[updateFunctionNameInCtx]=function(d,params){update(params);};}", "function adjustDefs(obj){\n var defs = obj.map(function(value){\n var newText = {id:value.ID , type: value.type, css:value.CSS};\n return newText;\n });\n\n var NotesPosition = function(){\n var width = window.innerWidth, height = window.innerHeight, result;\n if(width/height > 1){ //landscape\n result = [ '8%', '24%', '3.5%', '3.5%', '38%', '50%', '44%', '77.5%', '38%', '2.5%', '4%', '2.5%' ];\n }\n else { //portrait\n result = ['7%', '2.5%', '3.5%', '3.5%', '66%', '2.5%', '80%', '52.5%', '24%', '2.5%', '4%', '1%' ];\n }\n return result;\n };\n\n var totalHeight = window.innerHeight;\n var totalWidth = window.innerWidth;\n var itemsToBeReplaced = [\n 'totalWidth', \n 'totalHeight', \n 'marginWidth', \n 'marginHeight', \n 'marginCarouselHeight', \n 'note1Top', \n 'note1Left', \n 'note2Top', \n 'note2Left', \n 'note3Top', \n 'note3Left', \n 'note4Top', \n 'note4Left', \n 'note5Top', \n 'note5Left', \n 'note6Top', \n 'note6Left', \n 'boardLeft', \n 'boardTop', \n 'boardWidth', \n 'boardHeight', \n 'aboutWidth', \n 'aboutHeight', \n 'skillsWidth', \n 'skillsHeight', \n 'linksWidth', \n 'linksHeight', \n 'webDevTop', \n 'webDevPaddingTop', \n 'AboutDescriptionTop', \n 'skillHolderTop', \n 'nameWidth',\n 'nameHeight',\n 'nameTop',\n 'skillsWidth',\n 'linkFontSize',\n 'linksTitleFontSize',\n 'nameFontSize',\n 'webDevFontSize',\n 'AboutTitleFontSize',\n 'SkillsTitleFontSize',\n 'skillsHolderFontSize',\n 'AboutDescriptionFontSize',\n 'linksTop',\n '-prefix-'\n ];\n\n var newValues = [\n totalWidth+'px', \n totalHeight+'px', \n Math.floor(totalWidth/-2)+'px', \n Math.floor(totalHeight/-2)+'px', \n Math.floor((totalHeight-130)/-2)+'px', \n NotesPosition()[0], \n NotesPosition()[1], \n NotesPosition()[2], \n NotesPosition()[3], \n NotesPosition()[4], \n NotesPosition()[5], \n NotesPosition()[6], \n NotesPosition()[7], \n NotesPosition()[8], \n NotesPosition()[9], \n NotesPosition()[10], \n NotesPosition()[11], \n boardLeft(), \n boardTop(), \n boardWidth(), \n boardHeight(), \n aboutWidth(), \n aboutHeight(), \n skillsWidth(), \n skillsHeight(), \n linksWidth(), \n linksHeight(), \n webDevTop(), \n webDevPaddingTop(), \n AboutDescriptionTop(), \n skillHolderTop(), \n nameWidth(),\n nameHeight(),\n nameTop(), \n skillsWidth(),\n linkFontSize(),\n linksTitleFontSize(),\n nameFontSize(),\n webDevFontSize(),\n AboutTitleFontSize(),\n SkillsTitleFontSize(),\n skillsHolderFontSize(),\n AboutDescriptionFontSize(),\n linksTop(),\n myPrefix.css\n ];\n\n var length = defs.length;\n var itemsLength = itemsToBeReplaced.length;\n\n for (var s = 0 ; s < length; ++s){\n for (var r = 0; r < itemsLength; ++r){\n (function(oldValue,newValue,u){\n defs[u].css = defs[u].css.replaceAll(oldValue, newValue);\n }(itemsToBeReplaced[r],newValues[r],s))\n }\n }\n\n function boardLeft(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor((totalWidth - (totalHeight * 1.333))/2);\n } \n else {\n size = 0;\n }\n return size.toString() + 'px';\n }\n\n function boardTop(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = 0;\n } \n else {\n size = Math.floor(( totalHeight - (totalWidth * 1.333))/2);\n }\n return size.toString() + 'px';\n }\n\n function boardWidth(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 1.333);\n } \n else {\n size = Math.floor(totalWidth);\n }\n return size.toString() + 'px';\n }\n\n function boardHeight(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight);\n } \n else {\n size = Math.floor(totalWidth * 1.333);\n }\n return size.toString() + 'px';\n }\n\n function nameWidth(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 1.333 * 0.72);\n } \n else {\n size = Math.floor(totalWidth * 0.72);\n }\n return size.toString() + 'px';\n }\n\n function nameHeight(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.38);\n } \n else {\n size = Math.floor(totalWidth * 1.333 * 0.38);\n }\n return size.toString() + 'px';\n }\n\n function skillsWidth(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 1.333 * 0.5 * 0.95);\n } \n else {\n size = Math.floor(totalWidth * 0.95);\n }\n return size .toString() + 'px';\n }\n\n function skillsHeight(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 2 * 0.4);\n } \n else {\n size = Math.floor(totalWidth * 1.333 * 0.4);\n }\n return size.toString() + 'px';\n }\n\n function linksWidth(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.33);\n } \n else {\n size = Math.floor(totalWidth * 0.25);\n }\n return size.toString() + 'px';\n }\n\n function linksHeight(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.33);\n } \n else {\n size = Math.floor(totalWidth * 0.33);\n }\n return size.toString() + 'px';\n }\n\n function webDevTop(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.38 * 0.3666);\n } \n else {\n size = Math.floor(totalWidth * 1.333 * 0.38 * 0.2);\n }\n return size.toString() + 'px';\n }\n\n function linksTop(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * -0.008);\n } \n else {\n size = Math.floor(totalWidth * 0.0117);\n }\n return size.toString() + 'px';\n }\n\n function nameTop(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.38 * 0.22);\n } \n else {\n size = Math.floor(totalWidth * 1.333 * 0.38 * 0.125);\n }\n return size.toString() + 'px';\n }\n\n function webDevPaddingTop(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.38 * 0.03125);\n } \n else {\n size = Math.floor(totalWidth * 1.333 * 0.38 * 0.03125);\n }\n return size.toString() + 'px';\n }\n\n function AboutDescriptionTop(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.16667);\n } \n else {\n size = Math.floor(totalWidth * 0.2);\n }\n return size.toString() + 'px';\n }\n\n function skillHolderTop(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.1777);\n } \n else {\n size = Math.floor(totalWidth * 0.225);\n }\n return size.toString() + 'px';\n }\n\n function aboutWidth(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 1.333 * 0.5 * 0.95);\n } \n else {\n size = Math.floor(totalWidth * 0.95);\n }\n return size.toString() + 'px';\n }\n\n function aboutHeight(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 2 * 0.52);\n } \n else {\n size = Math.floor(totalWidth * 1.333 * 0.52);\n }\n return size.toString() + 'px';\n }\n\n function skillsWidth(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 1.333 * 0.5 * 0.95);\n } \n else {\n size = Math.floor(totalWidth * 0.95);\n }\n return size.toString() + 'px';\n }\n\n function linkFontSize(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.0556);\n } \n else {\n size = Math.floor(totalWidth * 0.04125);\n }\n return size.toString() + 'px';\n }\n\n function linksTitleFontSize(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.1177);\n } \n else {\n size = Math.floor(totalWidth * 0.09);\n }\n return size.toString() + 'px';\n }\n\n function nameFontSize(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.1);\n } \n else {\n size = Math.floor(totalWidth * 0.08);\n }\n return size.toString() + 'px';\n }\n\n function webDevFontSize(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.06);\n } \n else {\n size = Math.floor(totalWidth * 0.0475);\n }\n return size.toString() + 'px';\n }\n\n function AboutTitleFontSize(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.1887);\n } \n else {\n size = Math.floor(totalWidth * 0.2125);\n }\n return size.toString() + 'px';\n }\n\n function SkillsTitleFontSize(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.1887);\n } \n else {\n size = Math.floor(totalWidth * 0.2325);\n }\n return size.toString() + 'px';\n }\n\n function skillsHolderFontSize(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.0475);\n } \n else {\n size = Math.floor(totalWidth * 0.035);\n }\n return size.toString() + 'px';\n }\n\n function AboutDescriptionFontSize(){\n var size;\n if (totalWidth > totalHeight){ //landscape\n size = Math.floor(totalHeight * 0.055);\n } \n else {\n size = Math.floor(totalWidth * 0.077);\n }\n return size.toString() + 'px';\n }\n\n var setAnimationValues = function(){\n var top = totalHeight * 0.38;\n\n var animateAbout = new TimelineMax({\n paused:true,\n onComplete: function(){ Elements[2].classList.add('big')},\n onReverseComplete: function(){Elements[2].classList.remove('big')}\n });\n\n var animateSkills = new TimelineMax({\n paused:true,\n onComplete: function(){Elements[3].classList.add('big')},\n onReverseComplete: function(){Elements[3].classList.remove('big')}\n });\n\n var animateLinks = new TimelineMax({\n paused:true,\n onComplete: function(){Elements[4].classList.add('big')},\n onReverseComplete: function(){Elements[4].classList.remove('big')}\n });\n var x = 0;\n\n animateAbout.add(TweenMax.to(Elements[2], 1, {\n top: top,\n left: 0,\n //width: x,\n //height: x,\n fontSize: 16\n } ));\n\n animateAbout.add(TweenMax.to(Elements[1], 1, { css:{width: window.innerWidth, left:0 }}),'-=1');\n animateAbout.add(TweenMax.to(Elements[3], 1, { autoAlpha: 0} ),'-=2');\n animateAbout.add(TweenMax.to(Elements[4], 1, { autoAlpha: 0} ),'-=3');\n\n animateSkills.add(TweenMax.to(Elements[3], 1, { \n top:top,\n left: 0,\n //width: x,\n //height: x,\n fontSize: 16\n } ));\n\n animateSkills.add(TweenMax.to(Elements[1], 1, { width: window.innerWidth, left:0} ),'-=1');\n animateSkills.add(TweenMax.to(Elements[2], 1, { autoAlpha: 0} ),'-=2');\n animateSkills.add(TweenMax.to(Elements[4], 1, { autoAlpha: 0} ),'-=3');\n\n animateLinks.add(TweenMax.to(Elements[4], 1, { \n top: top,\n left: 0,\n // width: x,\n //height: x,\n //fontSize: 36\n } ));\n animateLinks.add(TweenMax.to(Elements[4].children[0], 1, { fontSize:30, autoRound: false}));\n animateLinks.add(TweenMax.to(Elements[4].children[1], 1, { fontSize:30, autoRound: false}));\n animateLinks.add(TweenMax.to(Elements[1], 1, { width: window.innerWidth, left:0} ),'-=1');\n animateLinks.add(TweenMax.to(Elements[2], 1, { autoAlpha: 0} ),'-=2');\n animateLinks.add(TweenMax.to(Elements[3], 1, { autoAlpha: 0} ),'-=3');\n\n return {\n about: animateAbout,\n skills: animateSkills,\n links: animateLinks\n }\n }\n\n return {\n definitions: defs,\n animation: function(){\n return setAnimationValues()\n }\n }\n }", "function finishDefinition(){\n\t//get the defined mask type: todo\n\t// g_regionMask.getDefinedMask();\n\t//delete the elements and pros\n detectElements();\n //fade unselected \n // fadeUndetected();\n //reset the cross filter\n resetCrossFilter();\n // generate the original object groups\t\n g_ObjectGroupManager.generateOriginalOGroup();\n //detect the default linked groups\n //generate \"default_compound\"\n g_ObjectGroupManager.detectDefaultLinkedGroups();\n \n //console.log('generateLegend()');\n drawFilter(); \n}", "function buildFields() {\n let rules = document.getElementsByClassName('rule');\n let rule = rules[0];\n var container = document.getElementsByClassName('container')[0];\n var newRule = rule.cloneNode(true);\n\n var elements = getStringsReplace(newRule);\n\n elements.string.id = 'string' + (rules.length + 1);\n elements.replace.id = 'replace' + (rules.length +1);\n clearFields(elements)\n\n container.appendChild(newRule);\n createEventListeners(newRule.getElementsByClassName('delete')[0]);\n}", "function prepareItem(def, idx) {\n // updateData is called in response to UI events; it tells\n // the dataProvider to update the data to match the UI.\n //\n // updateData must be inside prepareItem() since it uses idx;\n // d3's listener method cannot guarantee the index passed to\n // updateData will be correct:\n function updateData(data) {\n // data.selectedGen++;\n // model.provider.updateField(data.name, { active: data.selected });\n model.provider.toggleFieldSelection(data.name);\n }\n\n // get existing sub elements\n const ttab = d3.select(this);\n let trow1 = ttab.select(`tr.${style.jsLegendRow}`);\n let trow2 = ttab.select(`tr.${style.jsTr2}`);\n let tdsl = trow2.select(`td.${style.jsSparkline}`);\n let legendCell = trow1.select(`.${style.jsLegend}`);\n let fieldCell = trow1.select(`.${style.jsFieldName}`);\n let iconCell = trow1.select(`.${style.jsLegendIcons}`);\n let iconCellViz = iconCell.select(`.${style.jsLegendIconsViz}`);\n let svgGr = tdsl.select('svg').select(`.${style.jsGHist}`);\n // let svgOverlay = svgGr.select(`.${style.jsOverlay}`);\n\n // if they are not created yet then create them\n if (trow1.empty()) {\n trow1 = ttab\n .append('tr')\n .classed(style.legendRow, true)\n .on(\n 'click',\n multiClicker([\n function singleClick(d, i) {\n // single click handler\n // const overCoords = d3.mouse(model.listContainer);\n updateData(d);\n },\n // double click handler\n toggleSingleModeEvt,\n ])\n );\n trow2 = ttab.append('tr').classed(style.jsTr2, true);\n tdsl = trow2\n .append('td')\n .classed(style.sparkline, true)\n .attr('colspan', '3');\n legendCell = trow1.append('td').classed(style.legend, true);\n\n fieldCell = trow1.append('td').classed(style.fieldName, true);\n iconCell = trow1.append('td').classed(style.legendIcons, true);\n iconCellViz = iconCell\n .append('span')\n .classed(style.legendIconsViz, true);\n scoreHelper.createScoreIcons(iconCellViz);\n iconCellViz\n .append('i')\n .classed(style.expandIcon, true)\n .on('click', toggleSingleModeEvt);\n\n // Create SVG, and main group created inside the margins for use by axes, title, etc.\n svgGr = tdsl\n .append('svg')\n .classed(style.sparklineSvg, true)\n .append('g')\n .classed(style.jsGHist, true)\n .attr(\n 'transform',\n `translate( ${model.histMargin.left}, ${model.histMargin.top} )`\n );\n // nested groups inside main group\n svgGr.append('g').classed(style.axis, true);\n svgGr.append('g').classed(style.jsGRect, true);\n // scoring interface\n scoreHelper.createGroups(svgGr);\n svgGr\n .append('rect')\n .classed(style.overlay, true)\n .style('cursor', 'default');\n }\n const dataActive = def.active;\n // Apply legend\n if (model.provider.isA('LegendProvider')) {\n const { color, shape } = model.provider.getLegend(def.name);\n legendCell.html(`<svg class='${style.legendSvg}' width='${legendSize}' height='${legendSize}' viewBox='${shape.viewBox}'\n fill='${color}' stroke='black'><use xlink:href='#${shape.id}'/></svg>`);\n } else {\n legendCell.html('<i></i>').select('i');\n }\n trow1\n .classed(\n !dataActive ? style.selectedLegendRow : style.unselectedLegendRow,\n false\n )\n .classed(\n dataActive ? style.selectedLegendRow : style.unselectedLegendRow,\n true\n );\n // selection outline\n ttab\n .classed(style.hiddenBox, false)\n .classed(!dataActive ? style.selectedBox : style.unselectedBox, false)\n .classed(dataActive ? style.selectedBox : style.unselectedBox, true);\n\n // Change interaction icons based on state.\n // scoreHelper has save icon and score icon.\n const numIcons =\n (model.singleModeSticky ? 0 : 1) + scoreHelper.numScoreIcons(def);\n iconCell.style('width', `${numIcons * iconSize + 2}px`);\n scoreHelper.updateScoreIcons(iconCellViz, def);\n iconCellViz\n .select(`.${style.jsExpandIcon}`)\n .attr(\n 'class',\n model.singleModeName === null ? style.expandIcon : style.shrinkIcon\n )\n .style('display', model.singleModeSticky ? 'none' : null);\n // + 2 accounts for internal padding.\n const allIconsWidth =\n Math.ceil(iconCellViz.node().getBoundingClientRect().width) + 2;\n // reset to the actual width used.\n iconCell.style('width', `${allIconsWidth}px`);\n // Apply field name\n fieldCell\n .style(\n 'width',\n `${model.boxWidth - (10 + legendSize + 6 + allIconsWidth)}px`\n )\n .text(def.name);\n\n // adjust some settings based on current size\n tdsl\n .select('svg')\n .attr('width', publicAPI.svgWidth())\n .attr('height', publicAPI.svgHeight());\n\n // get the histogram data and rebuild the histogram based on the results\n const hobj = def.hobj;\n if (hobj) {\n const cmax = 1.0 * d3.max(hobj.counts);\n const hsize = hobj.counts.length;\n const hdata = svgGr\n .select(`.${style.jsGRect}`)\n .selectAll(`.${style.jsHistRect}`)\n .data(hobj.counts);\n\n hdata.enter().append('rect');\n // changes apply to both enter and update data join:\n hdata\n .attr('class', (d, i) =>\n i % 2 === 0 ? style.histRectEven : style.histRectOdd\n )\n .attr('pname', def.name)\n .attr('y', (d) => model.histHeight * (1.0 - d / cmax))\n .attr('x', (d, i) => (model.histWidth / hsize) * i)\n .attr('height', (d) => model.histHeight * (d / cmax))\n .attr('width', Math.ceil(model.histWidth / hsize));\n\n hdata.exit().remove();\n\n const svgOverlay = svgGr.select(`.${style.jsOverlay}`);\n svgOverlay\n .attr('x', -model.histMargin.left)\n .attr('y', -model.histMargin.top)\n .attr('width', publicAPI.svgWidth())\n .attr('height', publicAPI.svgHeight()); // allow clicks inside x-axis.\n\n if (!scoreHelper.editingScore(def)) {\n if (model.provider.isA('HistogramBinHoverProvider')) {\n svgOverlay\n .on('mousemove.hs', (d, i) => {\n const mCoords = publicAPI.getMouseCoords(tdsl);\n const binNum = Math.floor(\n (mCoords[0] / model.histWidth) * hsize\n );\n const state = {};\n state[def.name] = [binNum];\n model.provider.setHoverState({ state });\n })\n .on('mouseout.hs', (d, i) => {\n const state = {};\n state[def.name] = [-1];\n model.provider.setHoverState({ state });\n });\n }\n svgOverlay.on('click.hs', (d) => {\n const overCoords = publicAPI.getMouseCoords(tdsl);\n if (overCoords[1] <= model.histHeight) {\n updateData(d);\n }\n });\n } else {\n // disable when score editing is happening - it's distracting.\n // Note we still respond to hovers over other components.\n svgOverlay.on('.hs', null);\n }\n\n // Show an x-axis with just min/max displayed.\n // Attach scale, axis objects to this box's\n // data (the 'def' object) to allow persistence when scrolled.\n if (typeof def.xScale === 'undefined') {\n def.xScale = d3.scale.linear();\n }\n const [minRange, maxRange] = scoreHelper.getHistRange(def);\n def.xScale\n .rangeRound([0, model.histWidth])\n .domain([minRange, maxRange]);\n\n if (typeof def.xAxis === 'undefined') {\n const formatter = d3.format('.3s');\n def.xAxis = d3.svg.axis().tickFormat(formatter).orient('bottom');\n }\n def.xAxis.scale(def.xScale);\n let numTicks = 2;\n if (model.histWidth >= model.moreTicksSize) {\n numTicks = 5;\n // using .ticks() results in skipping min/max values,\n // if they aren't 'nice'. Make exactly 5 ticks.\n const myTicks = d3\n .range(numTicks)\n .map(\n (d) => minRange + (d / (numTicks - 1)) * (maxRange - minRange)\n );\n def.xAxis.tickValues(myTicks);\n } else {\n def.xAxis.tickValues(def.xScale.domain());\n }\n // nested group for the x-axis min/max display.\n const gAxis = svgGr.select(`.${style.jsAxis}`);\n gAxis\n .attr('transform', `translate(0, ${model.histHeight})`)\n .call(def.xAxis);\n const tickLabels = gAxis\n .selectAll('text')\n .classed(style.axisText, true);\n numTicks = tickLabels.size();\n tickLabels.style('text-anchor', (d, i) =>\n i === 0 ? 'start' : i === numTicks - 1 ? 'end' : 'middle'\n );\n gAxis.selectAll('line').classed(style.axisLine, true);\n gAxis.selectAll('path').classed(style.axisPath, true);\n\n scoreHelper.prepareItem(def, idx, svgGr, tdsl);\n }\n }", "function updateWeightedRangeValues_() {\n vm_.settlementSelection = Utilities.generateValueRanges(vm_.settlementSelection);\n vm_.powerCenterSelection = Utilities.generateValueRanges(vm_.powerCenterSelection);\n vm_.powerCenterAlignmentSelection = Utilities.generateValueRanges(vm_.powerCenterAlignmentSelection);\n vm_.authorityFigureSelection = Utilities.generateValueRanges(vm_.authorityFigureSelection);\n vm_.racialMixSelection = Utilities.generateValueRanges(vm_.racialMixSelection);\n\n for (var race = 0; race < vm_.raceSelection.length; race++) {\n vm_.raceSelection[race].ageCategories = Utilities.generateValueRanges(vm_.raceSelection[race].ageCategories);\n }\n\n for (var alignment = 0; alignment < vm_.powerCenterAlignmentSelection.length; alignment++) {\n vm_.powerCenterAlignmentSelection[alignment].monstrous = Utilities.generateValueRanges(vm_.powerCenterAlignmentSelection[alignment].monstrous);\n }\n }", "function updateData() {\n\t\txyData = pruneData(xyData);\n\t\tllmseFit = xyHelper.llmse(xyData, xPowers);\n\t\tupdate();\n\t}", "_transformModel(sitawareChorModel) {\n console.log('Received following model:');\n console.log(sitawareChorModel);\n\n // the elements of the situation-aware choreography model\n let sitawareChorModelDefinitions = sitawareChorModel['bpmn2:definitions'];\n\n let cliMethods = this._getMethods(this.cli);\n let bpmnjsMethods = this._getMethods(this.bpmnjs);\n let bpmnFactoryMethods = this._getMethods(this.bpmnFactory);\n let bpmnRendererMethods = this._getMethods(this.bpmnRenderer);\n let chorModelMethods = this._getMethods(sitawareChorModel);\n let modelingMethods = this._getMethods(this.modeling);\n\n console.log('CLI methods: ');\n console.log(cliMethods);\n\n console.log('bpmnJs methods: ');\n console.log(bpmnjsMethods);\n\n console.log('bpmnFacMethods:');\n console.log(bpmnFactoryMethods);\n\n console.log('bpmnRenderer Methods :');\n console.log(bpmnRendererMethods);\n\n console.log('SitAware Chor Model Methods: ');\n console.log(chorModelMethods);\n\n console.log('Modeling Methods: ');\n console.log(modelingMethods);\n\n this.modeling.makeCollaboration();\n\n let collaborationRootElementId = this._getCollaborationId();\n\n this._removeAll([collaborationRootElementId]);\n\n console.log('Currently there are the following elements:');\n console.log(this.cli.elements());\n\n console.log('With the following definitions: ');\n console.log(this.bpmnjs.getDefinitions);\n\n // we will create the collaboration model within these elements\n let sitawareCollabModelDefinitions = this.bpmnjs.getDefinitions();\n\n // find all participants of the model\n let participants = this._findParticipants(sitawareChorModel);\n console.log('Found following participants: ');\n console.log(participants);\n\n // find all available situations\n let situations = this._findSituations(sitawareChorModel);\n console.log('Found following situations: ');\n console.log(situations);\n\n let y_index = 1;\n\n // for each participant and situation we create a participant inside the new collaboration model\n for (let index = 0; index < participants.length; index++) {\n let participant = participants[index];\n this._createParticipant(participant.id, participant.name, 100, 100 * (y_index), collaborationRootElementId, sitawareCollabModelDefinitions, true);\n y_index++;\n }\n\n let sitawareChorModelStartEvents = this._findStartEvents(sitawareChorModel);\n\n console.log('Found following start events: ');\n console.log(sitawareChorModelStartEvents);\n\n let visited = [];\n let created = [];\n console.log('Starting choreography to collaboration walk to create tasks in participants:');\n this._choreography2collaborationWalk(sitawareChorModelStartEvents, visited, created, sitawareChorModel, sitawareCollabModelDefinitions);\n\n console.log('Starting to connect created tasks');\n this._transformChoreographyFlowToCollaborationFlow(created, sitawareChorModel, sitawareCollabModelDefinitions);\n\n console.log('Finished creating collaboration');\n\n\n console.log('Creating Situation-Aware logic:');\n for (let index = 0; index < situations.length; index++) {\n let situation = situations[index];\n console.log('Adding Situation to collaboration');\n this._createParticipant(this._createSituationId(situation.situationname), situation.situationname, 300 , 100 * (y_index), collaborationRootElementId, sitawareCollabModelDefinitions, false);\n y_index++;\n }\n\n this._transformSituationAwareScopes(sitawareChorModel, sitawareCollabModelDefinitions);\n\n this._layout();\n }", "function onResize(){\n\twindowFullWidth = window.innerWidth;\n\twindowFullHeight = window.innerHeight;\n\twindowHalfWidth = windowFullWidth / 2;\n\twindowHalfHeight = windowFullHeight / 2;\n\t\n\tratioSiteWidth = Math.min(windowFullWidth, 1180);\n\tratioSiteHeight = Math.min(windowFullHeight, 1080);\n\t\n\t// ONLY GET RATIO FROM WIDTH\n\tratioPercentage = Math.min((ratioSiteWidth/1180));\n\tratioPercentageHeight = Math.min((ratioSiteHeight/1080));\n\t\n\tminSiteWidth = Math.max(windowFullWidth, 1180);\n\tminSiteHeight = Math.max(windowFullHeight, 1080);\n\t\n\trenderer.resize( windowFullWidth, windowFullHeight );\n\tvizGroup.width = minSiteWidth;\n\tvizGroup.position.y = windowFullHeight;\n\tvizGroup.scale.x = vizGroup.scale.y = ratioPercentage;\n\t\n\tvizGroupCenter.width = minSiteWidth;\n\tvizGroupCenter.position.y = windowHalfHeight;\n\tvizGroupCenter.scale.x = vizGroupCenter.scale.y = ratioPercentage;\n\t\n\tcoverupGroup.width = minSiteWidth;\n\tcoverupGroup.position.y = windowFullHeight;\n\tcoverupGroup.scale.x = coverupGroup.scale.y = ratioPercentage;\n\t\n\tredrawMasks();\n\t\n\twindowFullWidthDifference = windowFullWidth * (windowFullWidth / (windowFullWidth * ratioPercentage));\n\twindowFullHeightDifference = windowFullHeight * (windowFullHeight / (windowFullHeight * ratioPercentage));\n\tvar upscalePercentageX = Math.max((Math.max(windowFullWidth, 1920)/1920));\n\tvar upscalePercentageY = Math.max((Math.max(windowFullHeight, 1080)/1080));\n\tvar rainRatio = Math.max(upscalePercentageX, upscalePercentageY);\n\tvar upscaleBackgroundY = Math.max((Math.max(windowFullHeightDifference, 1080)/1080));\n\t\n\tif (scene0Loaded) {\n\t\tscene0Car.position.x = minSiteWidth/2;\n\t\tscene0Swipe.position.x = minSiteWidth/2;\n\t\tscene0Water.tilePosition.x = minSiteWidth/2;\n\t\tscene0CoverRight.position.x = windowFullWidth - 250;\n\t\t// POSITION THE RIGHT LAND MASS\n\t\tif (ratioPercentage < 1) {\n\t\t\tscene0CoverRight.position.x = windowFullWidthDifference - 275;\n\t\t}\n\t\tvar scene0ScaleFactor = Math.min((Math.min(windowFullHeight, 800)/800));\n\t\tif ($html.hasClass(\"touch\")) scene0ScaleFactor = .70;\n\t\tscene0Car.scale.x = scene0Car.scale.y = scene0ScaleFactor;\n\t}\n\t\n\tif (scene1Loaded) scenes[1].car.position.x = minSiteWidth/2;\n\tif (scene2Loaded) {\n\t\tscene2Car.position.x = minSiteWidth/2;\n\t\tscene2Bg.scale.x = scene2Bg.scale.y = upscaleBackgroundY;\n\t}\n\tif (scene3Loaded) scenes[3].car.position.x = minSiteWidth/2;\n\tif (scene4Loaded) {\n\t\tscene4SidewalkTop.position.y = -((minSiteHeight - 1080) / 2);\n\t\tscene4SidewalkBottom.position.y = 1080 + ((minSiteHeight - 1080) / 2);\n\t\tscene4Car.position.x = minSiteWidth/2;\n\t}\n\tif (scene5Loaded) {\n\t\tscenes[5].car.position.x = minSiteWidth/2;\n\t\tscene5GlowNight.position.x = minSiteWidth/2;\n\t}\n\tif (scene6Loaded) {\n\t\tscene6Car.position.x = minSiteWidth/2;\n\t\tscene6Glow.position.x = minSiteWidth/2;\n\t\tscene6Bg.scale.x = scene6Bg.scale.y = upscaleBackgroundY;\n\t}\n\tif (scene7Loaded) {\n\t\tscenes[7].car.position.x = minSiteWidth/2;\n\t\tscene7Glow.position.x = minSiteWidth/2;\n\t}\n\tif (scene8Loaded) {\n\t\tscene8Car.position.x = minSiteWidth/2;\n\t\tscene8Dots.width = minSiteWidth/2;\n\t}\n\tif (scene9Loaded) {\n\t\tscenes[9].car.position.x = minSiteWidth/2;\n\t\tscene9Glow.position.x = minSiteWidth/2;\n\t\t// scenes[9].rain.scale.x = scenes[9].rain.scale.y = assetRatio * 2;\n\t\t// scenes[9].rain.position.x = minSiteWidth / 2;\n\t\t// scenes[9].rain.position.y = minSiteHeight;\n\t}\n\tif (scene10Loaded) {\n\t\tscene10Puddles.position.x = minSiteWidth/2;\n\t\tscene10Puddles.position.y = -((minSiteHeight - 1080) / 2);\n\t\tscene10Car.position.x = minSiteWidth/2;\n\t\tscene10Car.position.y = -((minSiteHeight - 1080) / 2);\n\t\tscene10CarLight.position.x = minSiteWidth/2;\n\t\tscene10CarLight.position.y = -((minSiteHeight - 1080) / 2);\n\t\tscene10Glow.position.x = minSiteWidth/2;\n\t\tscene10Glow.position.y = -((minSiteHeight - 1080) / 2);\n\t}\n\tif (scene11Loaded) {\n\t\tscenes[11].car.position.x = minSiteWidth/2;\n\t\tscene11Glow.position.x = minSiteWidth/2;\n\t}\n\tif (safeAreaMarker){\n\t\tsafeAreaMarker.position.x = minSiteWidth/2;\n\t\tsafeAreaMarker.position.y = minSiteHeight;\n\t}\n}", "process_models() {\n //for each model\n for(var i=0; i<models.length; ++i) {\n //pre set starting positions\n //left - middle left - middle - middle right - right\n if(typeof models[i].start == \"string\") {\n //if the starting position includes the word \"middle\"\n if(models[i].start.indexOf(\"middle\") !== -1) {\n //if starting middle left\n if(models[i].start.indexOf(\"left\") !== -1) {\n models[i].x = this.rect_width/2 - this.step;\n }\n //if starting middle right\n else if(models[i].start.indexOf(\"right\") !== -1) {\n models[i].x = this.rect_width/2 + this.step;\n }\n //else just middle\n else {\n models[i].x = this.rect_width/2;\n }\n }\n //if starting left\n else if(models[i].start.indexOf(\"left\") !== -1) {\n models[i].x = this.rect_width/2 - 2*this.step;\n }\n //if starting right\n else if(models[i].start.indexOf(\"right\") !== -1) {\n models[i].x = this.rect_width/2 + 2*this.step;\n }\n models[i].y = this.rect_height-20; //all set starting positions start at bottom of T\n }\n //custom starting position\n else {\n models[i].x = models[i].start[0];\n models[i].y = models[i].start[1];\n }\n\n //for each of this model's pre moves\n for(var j=0; j<models[i].pre_moves.length; ++j) {\n var count = 0;\n //while we are below the count length\n while(count < models[i].pre_moves[j][0]) {\n //if the move is a string\n if(typeof models[i].pre_moves[j][1] == \"string\") {\n var move = models[i].pre_moves[j][1];\n if(move.indexOf(\"up\") !== -1) {\n models[i].moves.push({dx:0,dy:-1,move:move});\n }\n else if(move.indexOf(\"down\") !== -1) {\n models[i].moves.push({dx:0,dy:1,move:move});\n }\n else if(move==\"pose\" || move==\"delay\" || move==\"kneel\" || move==\"pause\") {\n models[i].moves.push({dx:0,dy:0,move:move});\n }\n else if(move.indexOf(\"right\") !== -1) {\n models[i].moves.push({dx:1,dy:0,move:move});\n }\n else if(move.indexOf(\"left\") !== -1) {\n models[i].moves.push({dx:-1,dy:0,move:move});\n }\n else if(move.indexOf(\"diag ne\") !== -1) {\n models[i].moves.push({dx:1,dy:-1,move:move});\n }\n else if(move.indexOf(\"diag se\") !== -1) {\n models[i].moves.push({dx:1,dy:1,move:move});\n }\n else if(move.indexOf(\"diag sw\") !== -1) {\n models[i].moves.push({dx:-1,dy:1,move:move});\n }\n else if(move.indexOf(\"diag nw\") !== -1) {\n models[i].moves.push({dx:-1,dy:-1,move:move});\n }\n\n //if the model is moving at half speed\n if(move.indexOf(\"half speed\") !== -1) {\n this.recordModelNewPosition(i)\n\n //push half speed delay\n models[i].moves.push({dx:0,dy:0,move:\"pause\"});\n ++count;\n }\n }\n //otherwise the move is custom\n else {\n //manually calculate move\n var duration = models[i].pre_moves[j][0];\n var dx = models[i].pre_moves[j][1] / duration;\n var dy = models[i].pre_moves[j][2] / duration;\n\n //check if there is a custom move description\n var move = \"walk\";\n if(models[i].pre_moves[j][3]) {\n move = models[i].pre_moves[j][3];\n }\n\n //if the model is moving at half speed\n if(move.indexOf(\"half speed\") !== -1) {\n //record double the half step to make a regular step\n models[i].moves.push({dx:2*dx,dy:2*dy,move:move});\n\n this.recordModelNewPosition(i)\n\n //push half speed delay\n models[i].moves.push({dx:0,dy:0,move:\"pause\"});\n ++count;\n }\n else {\n models[i].moves.push({dx:dx,dy:dy,move:move});\n }\n }\n\n this.recordModelNewPosition(i)\n\n //increase count\n ++count;\n }\n }\n\n this.binary_insert(models[i].name,this.model_names); //binary inser this model into the list\n }\n }", "function matchFormToModel() {\n maxspdslider[0].value = tsdParams.maxspdslider;\n\t scaleslider[0].value = tsdParams.scaleslider;\n }", "function layoutInvalidated() {\n\t\tglobalVars.containerwidth = $container.width();\n\t\tglobalVars.boxWidth = globalVars.containerwidth / globalVars.cols;\n\t\tvar imageResizeRatio = globalVars.containerwidth / globalVars.originalWidth;\n\t\tvar modifiedHeight = globalVars.originalHeight * imageResizeRatio;\n\t\tglobalVars.boxHeight = modifiedHeight / globalVars.rows;\n\t\t$container.height( modifiedHeight );\n\t\t\t\t\t\n\t\t//Assign the BG image to all boxes here. will position and scale it below\n\t\t$('.box').css('background-image', 'url(' + globalVars.image + ')');\n\t\t$('.box').css('background-size', globalVars.containerwidth+'px');\n\t\t\n\t\t$(\".box\").each(function(index, element) {\n\t\t\n\t\t\t//for each box, update its variables then move/scale it appropriately\n\t\t\tvar tile = this.tile;\n\t\t\t$.extend(tile, {\n\t\t\t\t x : getXPositionFromIndex(tile.order),\n\t\t\t\t y : getYPositionFromIndex(tile.order),\n\t\t\t\t width : globalVars.boxWidth,\n\t\t\t\t height : globalVars.boxHeight\n\t\t\t\t});\t\n\t\t\t\t\n\t\t\t//Assign and scale the BG image\n\t\t\t$(element).css('background-position', -getXPositionFromIndex(tile.index)+\"px \"+-getYPositionFromIndex(tile.index)+\"px\");\n\t\t\t\n\t\t\tTweenLite.to(element, .3, {\n\t\t\t\tx : Math.floor(tile.x),\n\t\t\t\ty : Math.floor(tile.y),\n\t\t\t\twidth : tile.width,\n\t\t\t\theight : tile.height,\n\t\t\t\tease:Strong.easeInOut,\n\t\t\t\tonComplete : function() { tile.positioned = true; },\n\t\t\t\tonStart : function() { tile.positioned = false; }\n\t\t\t });\n\t\t});\n\n\t}", "function BaseLayouter() { }", "function updateShapes() {\n\trebuildLines();\t\n}", "function init() {\n\n\t\t\t// WOW일때 컬러칩 active 안 되는 경우 처리\n\t\t\tif( $('.layout-2 #selectColor').length > 0 && $('.layout-2 #selectColor .active').length == 0 ){\n\t\t\t\t$('.layout-2 #selectColor').find('.swatch').first().addClass('active');\n\t\t\t}\n\n\t\t\tnew ss.PDPStandard.PDPFeaturesController();\n\t\t\tnew ss.PDPStandard.PDPAccessories();\n\n\t\t\tnew ss.PDPStandard.PDPThreeSixty();\n\t\t\tnew ss.PDPStandard.PDPGallery();\n\t\t\t//new ss.PDPStandard.PDPKeyVisual();\n\n\t\t\tif ($('.media-module').find('.sampleimages').length > 0) {\n\t\t\t\tnew ss.PDPStandard.PDPSampleImages();\n\t\t\t}\n\n\t\t\tcurrentMetrics = ss.metrics;\n\n\t\t\tbindEvents();\n\t\t\theroSize();\n\t\t\tthrottleCarousel();\n\n\t\t\tnew ss.PDPStandard.PDPCommon();\n\t\t\tnew ss.PDPStandard.PDPeCommerceWOW();\n\t\t\tss.PDPStandard.optionInitWOW();\n\t\t}", "function media_upcreate___part_of_medupcr_basic()\n {\n //=================================================\n // //\\\\ manages legend CSS-visibility\n // by essay-state\n //=================================================\n var rgMainLegend = haz( rg, 'main-legend' );\n if( rgMainLegend ) {\n var rgTeoTab = rgMainLegend[ amode.theorion ];\n if( amode.theorion === 'corollary' && amode.aspect === 'model' ) {\n $$.$( rgTeoTab.tableDom ).addClass( 'hidden' );\n } else {\n $$.$( rgTeoTab.tableDom ).removeClass( 'hidden' );\n }\n }\n //=================================================\n // \\\\// manages legend CSS-visibility\n //=================================================\n\n //vital for letters/picture conflict\n //see: model-point-dragger.js ... haz( sconf, 'dragHidesPictures' )\n rg.allLettersAreHidden = !rg.detected_user_interaction_effect_DONE;\n\n //=================================================\n // //\\\\ analytical derivative dy/dx\n //=================================================\n var cfun = ssD.repoConf[ssD.repoConf.customFunction];\n\n //-------------------------------------------------\n // //\\\\ original arc and curve\n //-------------------------------------------------\n\n //must be in synch with rotation of AL\n //pointB : rg.B,\n\n\n ssF.paintsCurve({\n //rgName : will become 'arc-AB',\n fun : cfun.fun,\n pointA : rg.A,\n pointB : rg.B,\n\n //-----------------------------------------\n // //\\\\ apparently this fixes\n //-----------------------------------------\n // arc out of synch with B\n start : rg.A.pos[0],\n step : (rg.B.unrotatedParameterX - rg.A.pos[0] ) / 20,\n stepsCount : 20,\n //-----------------------------------------\n // \\\\// apparently this fixes\n //-----------------------------------------\n\n mmedia : stdMod.mmedia,\n addToStepCount : 1,\n });\n\n ssF.paintsCurve({\n rgName : 'curve-AB',\n fun : cfun.fun,\n\n //this makes curve's beginning tail going up - not good\n //pointA : rg.curveStart,\n //so, we truncate it, but need to draw it separately later on,\n pointA : rg.A,\n\n pointB : rg.curveEnd,\n mmedia : stdMod.mmedia,\n addToStepCount : 1,\n });\n\n ///left branch of original curve is a reflection against axis y\n ssF.paintsCurve({\n rgName : 'left-curve-AB',\n fun : ssD.repoConf[2].fun,\n\n pointA : rg.A,\n pointB : rg.curveEnd,\n mmedia : stdMod.mmedia,\n addToStepCount : 1,\n });\n\n\n\n //-------------------------------------------------\n // \\\\// original arc and curve\n //-------------------------------------------------\n\n\n\n\n //-------------------------------------------------\n // //\\\\ paints magnified curve\n //-------------------------------------------------\n var magnitude = rg.magnitude.value;\n //misleading notation: this is not ..._b, this is ..._B\n rg.derotated_b = toreg( 'derotated_b' )( 'pos', [rg.B.unrotatedParameterX,0] )();\n ssF.paintsCurve({\n rgName : 'arc-Ab',\n fun : cfun.fun, //for l8, cust fun = 0 = rotated fun\n pointA : rg.A,\n pointB : rg.derotated_b,\n mmedia : stdMod.mmedia,\n magnitude,\n //addedCssClass: 'tp-arc-Ab tp-both-curves', \n addedCssClass: 'tp-arc-Ab', \n addToStepCount : 1,\n stepsCount : fconf.sappId === \"b1sec1lemma8\" ? 200 : null,\n });\n //-------------------------------------------------\n // \\\\// paints magnified curve\n //-------------------------------------------------\n\n ///draws tangentPhi\n var angleName =\n ( amode.subessay === 'derivative' ||\n amode.subessay === 'vector-derivative'\n ) ? 'ψ' : 'φₒ';\n var wwRg = toreg( 'tangentPhi' )( 'pname', 'tangentPhi' )\n ( 'pos', rg.L.pos )( 'pcolor', rg.L.pcolor )();\n wwRg.medpos = ssF.mod2inn( rg.tangentPhi.pos );\n ssF.drawAngleFrom_rayAB2rayCD_at_medpos({\n AB : [ rg.dr.pivots[1], rg.dr.pivots[0] ],\n CD : rg.AL.pivots,\n rgSample : wwRg,\n ANGLE_SIZE : 1,\n caption : angleName,\n });\n\n\n ( function() {\n var AB = null;\n ////delta phi\n var rgSample = toreg( 'deltaphi' )( 'pname', 'deltaphi' )( 'pcolor', rg.A.pcolor )();\n if( amode.subessay === 'sin(x)/x' ){\n ///draws phi and renames it\n var caption = 'φ';\n rgSample.pos = rg.r.pos;\n var AB = [ rg.Ar.pivots[1], rg.Ar.pivots[0] ];\n var CD = [ rg.Br.pivots[1], rg.Br.pivots[0] ];\n } else if( amode.subessay === 'sine derivative' ) {\n ///draws delta phi\n var caption = 'Δφ';\n rgSample.pos = rg.O.pos;\n var AB = [ rg.AO.pivots[1], rg.AO.pivots[0] ];\n var CD = [ rg.BO.pivots[1], rg.BO.pivots[0] ];\n }\n rgSample.medpos = ssF.mod2inn( rgSample.pos );\n if( AB ) {\n ///todM useless when not displayed, but algo fails to omit this block:\n ssF.drawAngleFrom_rayAB2rayCD_at_medpos({\n AB,\n CD,\n rgSample,\n ANGLE_SIZE : 1,\n caption,\n })\n }\n }) ();\n ssF.angleVisib({ pname : 'deltaphi' });\n\n if( amode.subessay === 'sine derivative' ||\n amode.subessay === 'derivative' ||\n amode.subessay === 'vector-derivative'\n ){\n ///draws phi\n ///adds an extra point at rg.O to comply angle-api\n var wwRg = toreg( 'phi0' )( 'pname', 'phi0' )( 'pos', rg.O.pos )\n ( 'pcolor', rg.A.pcolor )();\n wwRg.medpos = ssF.mod2inn( wwRg.pos );\n ssF.drawAngleFrom_rayAB2rayCD_at_medpos({\n AB : rg[ 'O,ytop' ].pivots,\n CD : [ rg.AO.pivots[1], rg.AO.pivots[0] ],\n rgSample : wwRg,\n ANGLE_SIZE : 1.5,\n caption : 'φₒ',\n })\n }\n ssF.angleVisib({ pname : 'phi0' });\n\n if( amode.subessay === 'sine derivative' ) {\n var wwLine = ssF.str2line( 'x0,x', 'tp-debug', sconf.lines[ 'x0,x' ], 'Δsin(φ)' );\n //patch: overrides wide-lemma settings for tp-width for svg-text element\n wwLine.pnameLabelsvg$.addClass( 'hover-width' );\n } else {\n ////todo patch ... overrides caption by rewriting the line\n ssF.str2line( 'x0,x', 'tp-debug', sconf.lines[ 'x0,x' ], ' ' );\n }\n }", "configureComponents () {\n var self = this\n this.components = {}\n this.components.horizontal = {}\n this.components.vertical = {}\n\n // Layout component 'compositions'\n this.components.horizontal.dictionary =\n {\n margin1: ['margin.left'],\n tree: ['clustering.row.size', 'clustering.row.padding.right'],\n heatmap: ['heatmap.width'],\n labels: ['rowAxis.labels.padding.left', 'rowAxis.labels.width'],\n axis: ['rowAxis.title.padding.left', 'rowAxis.title.font.size'],\n margin2: ['margin.right']\n }\n this.components.vertical.dictionary =\n {\n margin1: ['margin.top'],\n title: ['title.font.size', 'title.padding.bottom'],\n tree: ['clustering.col.size', 'clustering.col.padding.bottom'],\n heatmap: ['heatmap.height'],\n labels: ['colAxis.labels.padding.top', 'colAxis.labels.height'],\n axis: ['colAxis.title.padding.top', 'colAxis.title.font.size'],\n margin2: ['margin.bottom']\n }\n\n var hKeys = Object.keys(this.components.horizontal.dictionary)\n var vKeys = Object.keys(this.components.vertical.dictionary)\n\n // Build map so that values can be stored sequentially in array -- should be faster look up?\n this.components.horizontal.map = {}\n this.components.vertical.map = {}\n var _ = require('lodash')\n\n // Calculate default component size values\n this.components.horizontal.values = []\n this.components.vertical.values = []\n for (let x = 0, l = hKeys.length; x < l; x++) {\n let key = hKeys[x]\n let arr = this.components.horizontal.dictionary[key]\n var htot = 0\n arr.forEach(subComp => {\n htot = htot + _.get(self.appearance, subComp)\n })\n this.components.horizontal.map[key] = x\n this.components.horizontal.values[x] = htot\n }\n for (let y = 0, l = vKeys.length; y < l; y++) {\n let key = vKeys[y]\n let arr = this.components.vertical.dictionary[key]\n var vtot = 0\n arr.forEach(subComp => { vtot += _.get(self.appearance, subComp) })\n this.components.vertical.map[key] = y\n this.components.vertical.values[y] = vtot\n }\n }", "function adjustLayout() {\n\t\t\t// set row-width\n\t\t\t$rows.width(rowWidth);\n\n\t\t\t// compute table width\n\t\t\tvar columnsWidth = controller.columns.length * cellWidth; \n\t\t\t$columns.width(columnsWidth); \n\t\t\t$ganttTable.width(columnsWidth); \n\n\t\t\t// adjust cell-dims\n\t\t\tjQuery('.tableCell', $ganttTable).css({ \n\t\t\t\twidth : cellWidth, \n\t\t\t\theight : cellHeight\n\t\t\t});\n\t\t\tjQuery('.tableCell', $columns).css('width', cellWidth); \n\n\t\t\t// adjust cell-container\t\t\n\t\t\t$cellContainer.css({\n\t\t\t\tleft : rowWidth + 'px',\n\t\t\t\ttop : '0px'\n\t\t\t});\n\t\t\t$cellContainer.width($container.width() - rowWidth - rightPadding);\n\n\t\t\t// adjust v-scroller\t\t\t\n\t\t\t$vscroller.css({\n\t\t\t\t\t\theight : ($container.height() - $colsContainer.height() - bottomPadding) + 'px'\n\t\t\t\t\t});\n\n\t\t\t// adjust cols-container\n\t\t\t$colsContainer.css({\n\t\t\t\t'margin-left' : rowWidth -1 + 'px', /* adjusts for border */\n\t\t\t\twidth : $cellContainer.width() + 'px'\n\t\t\t});\n\n\t\t\t// adjust rows-table\n\t\t\tjQuery('.tableCell', $rows).css({height: cellHeight, width: rowWidth});\n\n\t\t\t// adjust h-scroller\t\t\n\t\t\t$hscroller.css({\n\t\t\t\tleft : rowWidth + 'px',\n\t\t\t\ttop : $colsContainer.outerHeight(),\n\t\t\t\twidth : $cellContainer.width(),\n\t\t\t\theight : $container.height() - $colsContainer.outerHeight()\n\t\t\t});\n\t\t\tjQuery('.fake', $hscroller).width($ganttTable.outerWidth());\n\t\t}", "function refreshInteractiveElements(){\r\n $.logEvent('[dataVisualization.core.refreshInteractiveElements]');\r\n \r\n var interactiveTypeObj;\r\n \r\n $.each(dataVisualization.configuration.loadSequence,function(){\r\n interactiveTypeObj = this.id.split('-');\r\n \r\n if(typeof(window[this.id]) == 'object'){ \r\n // window[this.id].validateNow();\r\n \r\n // Re-draw the centre percentage value for all instances of donut charts\r\n //if(interactiveTypeObj[0] == 'donut'){\r\n // $('#' + this.id).donutChart('createCentreValue');\r\n //}\r\n }\r\n });\r\n }", "function getModelLayout(){\r\n\tvar layout = document.implementation.createDocument(null, \"FORM_LAYOUT\", null).documentElement;\r\n\r\n\t//Se recorren todos los elementos agregados al grid\r\n\tvar i=0;\r\n\twhile (i<gridSchema.length){\r\n\t\tvar cell = gridSchema[i];\r\n\t\r\n\t\tvar field = document.createElementNS(null, \"FORM_FIELD\");\r\n\t\tloadFromObjectAttributes(cell.field, field, ['fieldId','fieldType','fieldLabel','attId','attName'])\r\n\t\t\t\t\r\n\t\t//Propiedades fijas: tamaño y ubicación de celda\r\n\t\tfield.setAttribute('x', cell.x-1); \r\n\t\tfield.setAttribute('y', cell.y-1);\r\n\t\t\t\t\r\n\t\tif (cell.xSize>1) {\r\n\t\t\tvar property = document.createElementNS(null, \"PROPERTY\");\r\n\t\t\tproperty.setAttribute('type','N');\r\n\t\t\tproperty.setAttribute('prpId','8');\r\n\t\t\tproperty.setAttribute('value', cell.xSize); \r\n\t\t\tfield.appendChild(property);\r\n\t\t}\r\n\t\tif (cell.ySize>1) {\r\n\t\t\tvar property = document.createElementNS(null, \"PROPERTY\");\r\n\t\t\tproperty.setAttribute('type','N');\r\n\t\t\tproperty.setAttribute('prpId','9');\r\n\t\t\tproperty.setAttribute('value', cell.ySize); \r\n\t\t\tfield.appendChild(property); \r\n\t\t}\r\n\t\t// *********************************************\r\n\t\t\r\n\t\t//Se procesan todas las propiedades asociadas a la celda\t\t\r\n\t\tprocessProperties(cell.field.properties, field, false /*isFormProperty*/);\r\n\t\t\r\n\t\t//Caso que la celda se un elemento 'Table' se procesan celdas contenidas\r\n\t\tif (cell.isTable()){\r\n\t\t\tvar children = cell.field.tableElements;\r\n\t\t\tfor (var j=0; j<children.length; j++){\r\n\t\t\t\tvar child = document.createElementNS(null, \"FORM_FIELD_CHILD\");\r\n\t\t\t\tloadFromObjectAttributes(children[j].field, child, ['fieldId','fieldType','fieldLabel','attId','attName'])\r\n\t\t\t\tchild.setAttribute('x', children[j].x+1);\r\n\t\t\t\tchild.setAttribute('y', 0);\r\n\t\t\t\t\r\n\t\t\t\t//Se procesan todas las propiedades asociadas a la celda\t\t\r\n\t\t\t\tprocessProperties(children[j].field.properties, child, false /*isFormProperty*/);\r\n\t\t\t\t\r\n\t\t\t\tfield.appendChild(child);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ti+= 1+children.length;\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t\tlayout.appendChild(field);\r\n\t}\r\n\t\r\n\t\r\n\t//Propiedades fijas: cantidad de filas y columnas\r\n\tvar property = document.createElementNS(null, \"FORM_PROPERTY\");\r\n\tproperty.setAttribute('type','N');\r\n\tproperty.setAttribute('prpId','79');\r\n\tproperty.setAttribute('value', cols); \r\n\tlayout.appendChild(property);\r\n\r\n\tvar property = document.createElementNS(null, \"FORM_PROPERTY\");\r\n\tproperty.setAttribute('type','N');\r\n\tproperty.setAttribute('prpId','80');\r\n\tproperty.setAttribute('value', rows); \r\n\tlayout.appendChild(property);\r\n\t// *********************************************\r\n\t\r\n\t//Se procesan todas las propiedades asociadas al formulario\r\n\tprocessProperties(formProperties, layout, true /*isFormProperty*/);\r\n\t\r\n\tif(window.XMLSerializer) {\r\n\t\treturn new XMLSerializer().serializeToString(layout);\r\n\t} else {\r\n\t\treturn layout.xml;\r\n\t}\r\n}", "regularization() {\n const system_optimal = this.systemOptimal;\n\n var search_area = [];\n search_area.push(system_optimal);\n var i = system_optimal[0];\n var j = system_optimal[1];\n if (i - 1 > -1) {\n search_area.push([i-1,j]);\n }\n if (i + 1 < this.featureSize) {\n search_area.push([i+1,j]);\n }\n if (j - 1 > -1) {\n search_area.push([i,j-1]);\n }\n if (j + 1 < this.featureSize) {\n search_area.push([i,j+1]);\n }\n if (i - 1 > -1 && j - 1 > -1) {\n search_area.push([i-1,j-1]);\n }\n if (i + 1 < this.featureSize && j + 1 < this.featureSize) {\n search_area.push([i + 1, j+1]);\n }\n if (i - 1 > -1 && j + 1 < this.featureSize) {\n search_area.push([i - 1, j+1]);\n }\n if (i + 1 < this.featureSize && j - 1 > -1) {\n search_area.push([i + 1, j - 1]);\n }\n return search_area;\n }", "function updateSample1(textpara,fontfamily,textsize,bold,italic,weight) {\n var f = getText(textpara,fontfamily,textsize,bold,italic,weight)\n if(f.textWidth >=45)\n {\n $(\"#textToolTooWide\").show();\n }\n else {\n $(\"#textToolTooWide\").hide();\n }\n newlayer.clearBeforeDraw(true);\n newlayer.clearCache();\n gridHiddenTextGroup.destroy();\n newlayer.draw();\n var q = gridSize;\n var g = applyDeselRatio(q);\n var d = Math.ceil(stage.width() / g);\n var p = Math.ceil(stage.height() / q);\n var o = Math.max(0, Math.floor((f.width - d) / 2));\n var m = Math.max(0, Math.floor((f.height - p) / 2));\n var j = Math.min(f.width, 1 + Math.ceil((f.width + d) / 2));\n var h = Math.min(f.height, 1 + Math.ceil((f.height + p) / 2));\n var b = Math.floor(stage.width() / 2 - g * f.width / 2);\n var a = Math.floor(stage.height() / 2 - q * f.height / 2);\n\n for (var l = m; l < h; l++) {\n var k = (false && (l & 1)) ? Math.round(g / 2) : 0;\n for (var n = o; n < j; n++) {\n var e = (l * f.width + n) * 4;\n var fillStyle = f.data[e + 3] == 255 ? \"#000000\" : \"#ffffff\";\n var complexText = new Konva.Text({\n x: b + n * g + k,\n y: a + l * q,\n text: 'X',\n fill: fillStyle,\n align: 'center',\n });\n gridHiddenTextGroup.add(complexText);\n }\n }\n newlayer.add(gridHiddenTextGroup);\n gridHiddenTextGroup.draw();\n stage.batchDraw();\n }", "function DesignView(apc,model) {\n this.apc = apc;\n this.model = model;\n this.style = apc.style;\n this.valid = true;\n // for the moment, default to natural mode\n this.style = apc.getval('style') || 'arc';\n this.view = apc.getval('view') || 'states';\n this.automark = true;\n this.autolike = false;\n this.footnote = false;\n this.footseq = null;\n this.footcount = 0;\n this.footmax = 100;\n this.footnotes = [];\n var myView = this;\n this.changed = function (model) {\n myView.valid = false;\n if (myView.model!=model) {\n if (myView.model) myView.model.noInterest(myView);\n }\n myView.model = model;\n if (model) {\n model.addInterest(myView,myView.changed.bind(myView));\n myView.valid = false;\n myView.recompute();\n myView.draw(apc.vp.ctx);\n apc.vp.valid = false;\n if (this.footnote && this.footseq && this.model.got==this.footseq)\n this.addFootnote();\n else if (this.bonusflag && this.footseq && this.model.got==this.footseq)\n this.addBonus();\n else if (this.autolike && this.likeseq && this.model.got==this.likeseq)\n this.addLike();\n }\n }\n if (model) model.addInterest(this,this.changed.bind(this));\n return this;\n}", "refresh() {\n // console.log('### XfControl.refresh on : ', this);\n // this.modelItem = modelItem;\n this.applyProperties();\n }", "designmode() {\n this.godmode();\n recipeList.recipes.filter(r=>r.recipeType === \"normal\").forEach(recipe => {\n recipe.craftCount = 99;\n })\n WorkerManager.workers[0].lvl = 9;\n HeroManager.heroes[0].owned = false;\n TownManager.fortuneUnlock = false;\n forceSave(); \n }", "function handleButRegularizeClick() {\n\tregularize(true);\n}", "function convertToViewDefObj(){\n\tvar view = tabsFrame.newView;\n\tvar pattern = String(tabsFrame.patternRestriction);\n var patterntgrps = Number(tabsFrame.tablegroupsRestriction);\n var uniqueFilename = tabsFrame.uniqueFilename;\n var viewToCreate = \"\";\n\t\n\tif (pattern.match(/paginated/g)){\n\t\tisPaginated = true;\n\t}\n \t\n // pattern\n viewToCreate += 'myView.addPattern( \"' + view.pattern + '\"); \\n';\n \n // if a title was specified, add it. otherwise, use \"Title for View\" as the title\n if (view.title != undefined) {\n viewToCreate += 'myView.addTitle( \"' + view.title + '\"); \\n';\n }\n else {\n viewToCreate += 'myView.addTitle( \"' + 'Title for View' + '\"); \\n';\n }\n \n // loop through each tablegroup...\n for (var i = 0; i < view.tableGroups.length; i++) {\n var curTgrp = view.tableGroups[i];\n var isDrawingHighlightTgrp = false;\n\t\tvar isDrawingLabelTgrp = false;\n\t\t\n\t\tif (pattern.match(/paginated-highlight/gi) && (i==1)){\n\t\t\tisDrawingLabelTgrp = true;\n\t\t}\n\n\t\tif (pattern.match(/paginated-highlight-thematic/gi) && (i==0)) {\n\t\t\tisDrawingHighlightTgrp = true;\n\t\t}\n\t\t\t\t\t\t\n // add any tables and specify the table's role (main or standard)\n var tables = curTgrp.tables;\n if (tables != undefined) {\n for (x = 0; x < tables.length; x++) {\n if (tables[x].role == \"main\") {\n viewToCreate += 'myView.addTable( \"' + tables[x].table_name + '\", Ab.ViewDef.Table.MAIN_TABLE, ' + \"'AXVW' ); \\n\";\n }\n if (tables[x].role == \"standard\") {\n viewToCreate += 'myView.addTable( \"' + tables[x].table_name + '\", Ab.ViewDef.Table.STANDARD_TABLE, ' + \"'AXVW' ); \\n\";\n }\n }\n }\n \n // add the table title if exists\n if ((curTgrp.tables[0].table_name != undefined) && (curTgrp.tables[0].table_name != \"\") && (curTgrp.title != undefined)) {\n viewToCreate += 'myView.addTableTitle( \"' + curTgrp.tables[0].table_name + '\", \"' + curTgrp.title + '\"); \\n';\n }\n \n // add any fields. if none exists, prompt and navigate to \"Set Characteristics\"\n if (curTgrp.fields != undefined) {\n var fields = curTgrp.fields;\n\n if ( (fields.length == 0) && (!isDrawingLabelTgrp) && !pattern.match(/highlight-thematic/gi)) {\n alert(getMessage(\"noFields\") + \" '\" + curTgrp.tables[0].table_name + \"' \" + getMessage(\"noFields2\"));\n tabsFrame.selectTab('page4');\n return;\n }\n else {\n \tvar indexFieldNum = 1000; // random assignment, there shouldn't be 1000 primary keys\n \t\n for (j = 0; j < fields.length; j++) {\n\t\t\t\t\tvar field = fields[j];\n viewToCreate += 'myView.addField( \"' + field.field_name + '\", \"' + field.table_name + '\", \"AXVW\", false, false, \"' + field.afm_type + '\"';\n\t\t\t\t\tif (field.hasOwnProperty('restriction_parameter')) {\n\t\t\t\t\t\tviewToCreate += ', \"' + field.restriction_parameter + '\" '; \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tviewToCreate += ', \"\"'; \n\t\t\t\t\t}\n\t\t\t\t\t// viewToCreate += ', \"' + field.ml_heading.replace(/[\\n|\\r]/gi, \" \") + '\" , \"' + field.primary_key + '\" , \"' + field.data_type + '\"';\n\t\t\t\t\tviewToCreate += ', \"' + field.ml_heading.replace(/[\\n|\\r]/gi, \" \") + '\" ,'; \n\t\t\t\t\tviewToCreate += ' \"' + field.ml_heading_english.replace(/[\\n|\\r]/gi, \" \") + '\" ,'; \n\t\t\t\t\tviewToCreate += ' \"' + field.primary_key + '\" , \"' + field.data_type + '\"';\n\t\t\t\t\tif (field.hasOwnProperty('showSelectValueAction')) {\n\t\t\t\t\t\tviewToCreate += ', ' + field.showSelectValueAction + ' '; \n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tviewToCreate += ', \"\"'; \n\t\t\t\t\t}\n\t\t\t\t\tviewToCreate += ', ' + field.is_virtual;\n\n\t\t\t\t\tif(typeof(field.sql) == 'string'){\n\t\t\t\t\t\tviewToCreate += ', ' + \"'\" + field.sql + \"'\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tviewToCreate += ', ' + toJSON(field.sql);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// rowspan\n\t\t\t\t\tviewToCreate += ', ';\n\t\t\t\t\tviewToCreate += (field.hasOwnProperty('rowspan')) ? field['rowspan'] : null;\n\n\t\t\t\t\t// colspan\n\t\t\t\t\tviewToCreate += ', ';\n\t\t\t\t\tviewToCreate += (field.hasOwnProperty('colspan')) ? field['colspan'] : null;\n\t\t\t\t\t\n\t\t\t\t\t// custom field title\n\t\t\t\t\tviewToCreate += ', \"' + field.ml_heading_english_original.replace(/[\\n|\\r]/gi, '') + '\"';\n\t\t\t\t\t// viewToCreate += (field.ml_heading_english.replace('\\r\\n', ' ') != field.ml_heading_english_original.replace('\\r\\n', ' ')) ? field.ml_heading_english : null;\n\t\t\t\t\t\n\t\t\t\t\t//viewToCreate += ', ' + eval('(' + field.sql + ')');\n\t\t\t\t\tviewToCreate += ' ); \\n';\n\n\t\t\t\t\t// store index field\n\t\t\t\t\tvar numTgrps = view.tableGroups.length;\n\t\t\t\t\tif(indexPattern()){\t\n\t\t\t\t\t\tif (pattern.match(/editform/gi) &&\t!pattern.match(/popup/gi) && (i == numTgrps-1)){\t\t\t\t\t\t\n\t\t\t\t\t\t \t// remove index for panel type=\"form\"\n\t\t\t\t\t\t \tdelete curTgrp.indexField;\t\t\t\t\n\t\t\t\t\t\t} else if ((field.primary_key > 0) && (field.primary_key < indexFieldNum)){\n\t\t\t\t\t\t\tcurTgrp.indexField = field;\n\t\t\t\t\t\t\tindexFieldNum = field.primary_key;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t} \t\t\t\t\t\t\t\t\t\n }\n }\n }\n else if (!isDrawingLabelTgrp && !pattern.match(/highlight-thematic/gi)) {\n alert(getMessage(\"noFields\") + \" '\" + curTgrp.tables[0].table_name + \"' \" + getMessage(\"noFields2\"));\n tabsFrame.selectTab('page4');\n return;\n }\n \n // add sorts\n\t\tvar sortFields = curTgrp.sortFields;\n if ((sortFields != undefined) && (sortFields != '')) {\n\t\t\tfor (m = 0; m < sortFields.length; m++) {\n\t\t\t\t//viewToCreate += 'myView.addSortField( \"' + sortFields[m].table_name + '\", \"' + sortFields[m].field_name + '\", \"' + sortFields[m].ml_heading.replace(/[\\n|\\r]/gi, \" \") + '\", \"AXVW\",' + sortFields[m].isAscending + ', \"' + sortFields[m].groupByDate + '\") ; \\n';\n\t\t\t\tviewToCreate += 'myView.addSortField( \"' + sortFields[m].table_name + '\", \"' + sortFields[m].field_name + '\", \"' + sortFields[m].ml_heading.replace(/[\\n|\\r]/gi, \" \") + '\", \"' + sortFields[m].ml_heading_english.replace(/[\\n|\\r]/gi, \" \") + '\", \"AXVW\",' + sortFields[m].isAscending + ', \"' + sortFields[m].groupByDate + '\") ; \\n';\n\t\t\t}\n\t\t// } else if (isDrawingHighlightTgrp){\n\t\t// } else if ((pattern.match(/summary/gi) && (i == view.tableGroups.length - 1)) || (pattern.match(/paginated-highlight/gi) && ((i == 2) || (i == 0)) ) || ((pattern.match(/paginated/gi) && hasSummarizeBySortOrder(curTgrp) && !pattern.match(/paginated-stats-data/gi))) || (pattern.match(/paginated-stats-data/gi) && (i==0))) {\n\t\t} else if ((pattern.match(/summary/gi) && (i == view.tableGroups.length - 1)) || (pattern.match(/paginated-highlight/gi) && ((i == 2) || (i == 0)) ) || ((pattern.match(/paginated/gi) && hasSummarizeBySortOrder(curTgrp) && !pattern.match(/paginated-stats-data/gi)))) {\t\t \t\n\t\t\talert(getMessage('noSort'));\t\t\t\n\t\t\ttabsFrame.selectTab('page4');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (curTgrp.hasOwnProperty('indexField')){\n\t\t\tvar indexField = curTgrp.indexField;\n\t\t\tviewToCreate += \"myView.addIndexField( '\" + indexField.table_name + \"', '\" + indexField.field_name + \"' ) ; \\n\";\n\t\t}\n \t\t\t\t\t\t \n // add restrictions\n if ((curTgrp.parsedRestrictionClauses != undefined) && (curTgrp.parsedRestrictionClauses != '')){\n var restrictions = curTgrp.parsedRestrictionClauses;\n for (p = 0; p < restrictions.length; p++) {\n var table_name = restrictions[p].table_name;\n var field_name = restrictions[p].field_name;\n viewToCreate += \"myView.addParsedRestrictionClause( '\" + restrictions[p].relop + \"', \" + '\"' + table_name + '\", \"' + field_name + '\", \"' + restrictions[p].op + '\", \"' + restrictions[p].value + '\" ) ; \\n';\n }\n } else if (pattern.match(/paginated-highlight-restriction/gi) && ((i==0) || (i==2))){\n\t\t\talert(getMessage('noRestriction'));\n\t\t\ttabsFrame.selectTab('page4');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar paramRestrictions = curTgrp.parameterRestrictionClauses;\n\t\tif ((isPaginated) && (paramRestrictions != undefined)){\n for (var q = 0; q < paramRestrictions.length; q++) {\n\t\t\t\tvar paramRest = paramRestrictions[q];\n\t\t\t\tviewToCreate += \"myView.addParamRestrictionClause( 'AND', \" + '\"' + paramRest.table_name + '\", \"' + paramRest.field_name + '\", \"=\", \"' + \"${parameters['\" + paramRest.value + \"']}\" + '\" ) ; \\n';\n\t\t\t}\n\t\t}\n\t\t\n\t\tvar parameters = curTgrp.parameters;\n\t\tif ((isPaginated) && (parameters != undefined)) {\n\t\t\tfor (var q = 0; q < parameters.length; q++) {\n\t\t\t\tvar parameter = parameters[q];\n\t\t\t\tviewToCreate += \"myView.addParameter( '\" + parameter.name + \"', '\" + parameter.value + \"', '\" + parameter.dataType + \"' ) ; \\n\";\n\t\t\t}\n\t\t}\t\t\t\n\n // add sql restrictions\n if ((curTgrp.sqlRestriction != undefined) && (curTgrp.sqlRestriction != '')) {\n var sqlRest = curTgrp.sqlRestriction;\n viewToCreate += 'myView.addSqlRestriction( \"' + sqlRest.table_name + '\", \"' + sqlRest.sql + '\"); \\n';\n }\n\n\t\t// add measures\n if ((curTgrp.measures != undefined) && (curTgrp.measures != '')) {\n\t\t\tvar measures = curTgrp.measures;\n\t\t\tfor (var r = 0; r < measures.length; r++) {\n\t\t\t\tvar measure = measures[r];\n\t\t\t\tfor(var s=0; s<measure.stats.length; s++){\t\n\t\t\t\t\t// handle translated headings such as activity_log.cond_value and cond_priority\n\t\t\t\t\tif(measure.ml_heading){\n\t\t\t\t\t\tviewToCreate += 'myView.addMeasure( \"' + measure.field_name + '\", \"' + measure.stats[s] + '\", \"' + measure.name + '\", \"' + measure.ml_heading.replace(/[\\n|\\r]/gi, \" \") + '\", \"' + measure.ml_heading_english.replace(/[\\n|\\r]/gi, \" \") + '\", \"'+ measure.table_name + '\" ) ; \\n';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tviewToCreate += 'myView.addMeasure( \"' + measure.field_name + '\", \"' + measure.stats[s] + '\", \"' + measure.name + '\", \"' + measure.ml_headings[s] + '\", \"' + measure.ml_headings_english[s] + '\", \"'+ measure.table_name + '\" ) ; \\n';\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n }\n\n\t\tif (curTgrp.hasOwnProperty('paginatedPanelProperties')){\n\t\t\tvar paginatedPanelProperties = curTgrp.paginatedPanelProperties;\n\t\t\tfor (s in paginatedPanelProperties) {\n\t\t\t\tviewToCreate += \"myView.addPaginatedPanelProperties( '\" + s + \"', '\" + paginatedPanelProperties[s] + \"' ) ; \\n\";\n\t\t\t}\n\t\t}\t\t\n }\n \n if (view.hasOwnProperty('viewURL')){\n \tviewToCreate += \"myView.addURL( '\" + view.viewURL + \"' ) ; \\n\";\n }\n\n // convert the javascript statements into a view definition object\n var myView = new Ab.ViewDef.View();\n var myConverter = new Ab.ViewDef.Convert(viewToCreate, \"myView\");\n myConverter.convertDo();\n // warn if any unconvertable sections were found\n eval(myConverter.getConvertedContentsAsJavascript());\n if (myConverter.hasUnconvertableSections()) \n alert(myConverter.getDescriptionOfUnconvertableSections());\n\n return myView;\n}", "handleCaseControlObj() {\n let newCaseControlObj = {};\n newCaseControlObj.statisticalValues = [];\n\n // Iterate statistical values array\n /*** Keep for next release enhancement\n let statisticsNodes = document.querySelectorAll('.caseControlStatistics'),\n newObj = {}, newArray = [];\n let statisticsObjects = Array.from(statisticsNodes);\n statisticsObjects.forEach(obj => {\n newObj = {\n valueType: obj.getFormValue('statisticValueType'),\n otherType: obj.getFormValue('statisticOtherType'),\n value: obj.getFormValue('statisticValue')\n };\n newArray.push(newObj);\n });\n */\n\n let newArray = [];\n let newObj = {\n valueType: this.getFormValue('statisticValueType') !== 'none' ? this.getFormValue('statisticValueType') : '',\n otherType: this.getFormValue('statisticOtherType') !== 'none' ? this.getFormValue('statisticOtherType') : '',\n value: this.getFormValue('statisticValue') ? parseFloat(this.getFormValue('statisticValue')) : null\n };\n newArray.push(newObj);\n\n // Put together a new 'caseControl' object\n newCaseControlObj = {\n studyType: this.getFormValue('studyType') !== 'none' ? this.getFormValue('studyType') : '',\n detectionMethod: this.getFormValue('detectionMethod') !== 'none' ? this.getFormValue('detectionMethod') : '',\n statisticalValues: newArray,\n pValue: this.getFormValue('pValue') ? parseFloat(this.getFormValue('pValue')) : null,\n confidenceIntervalFrom: this.getFormValue('confidenceIntervalFrom') ? parseFloat(this.getFormValue('confidenceIntervalFrom')) : null,\n confidenceIntervalTo: this.getFormValue('confidenceIntervalTo') ? parseFloat(this.getFormValue('confidenceIntervalTo')) : null,\n demographicInfoMatched: this.getFormValue('demographicInfoMatched') !== 'none' ? this.getFormValue('demographicInfoMatched') : '',\n factorOfDemographicInfoMatched: this.getFormValue('factorOfDemographicInfoMatched') !== 'none' ? this.getFormValue('factorOfDemographicInfoMatched') : '',\n explanationForDemographicMatched: this.getFormValue('explanationForDemographicMatched'),\n geneticAncestryMatched: this.getFormValue('geneticAncestryMatched') !== 'none' ? this.getFormValue('geneticAncestryMatched') : '',\n factorOfGeneticAncestryNotMatched: this.getFormValue('factorOfGeneticAncestryNotMatched') !== 'none' ? this.getFormValue('factorOfGeneticAncestryNotMatched') : '',\n explanationForGeneticAncestryNotMatched: this.getFormValue('explanationForGeneticAncestryNotMatched'),\n diseaseHistoryEvaluated: this.getFormValue('diseaseHistoryEvaluated') !== 'none' ? this.getFormValue('diseaseHistoryEvaluated') : '',\n explanationForDiseaseHistoryEvaluation: this.getFormValue('explanationForDiseaseHistoryEvaluation'),\n differInVariables: this.getFormValue('differInVariables') !== 'none' ? this.getFormValue('differInVariables') : '',\n explanationForDifference: this.getFormValue('explanationForDifference'),\n comments: this.getFormValue('comments')\n };\n\n return Object.keys(newCaseControlObj).length ? newCaseControlObj : null;\n }", "function modifySegments() {\n /* ----------------------------- START loop Calls hl7Buttons and sends the segments to generate the fields buttons at front end ---------------------------------------------- */\n for (var i = 0; i < selectedArray.length; i++) {\n hl7Buttons(selectedArray[i]);\n }\n /* ----------------------------- END loop Calls hl7Buttons and sends the segments to generate the fields buttons at front end ---------------------------------------------- */\n /* --------------------------------------- START loop for Checking, Highlighting and disabling the buttons for the mandatory HL7 fields ------------------------------------ */\n for (var i = 0; i < mandatoryFields.length; i++) {\n $(\".\" + mandatoryFields[i]).addClass('disabled'); //Label tag button class to disable the mandatory fields\n $(\"#\" + mandatoryFields[i]).attr('checked', true); //Checkbox tag id to add checked attribute the mandatory fields\n }\n /* --------------------------------------- END loop for Checking, Highlighting and disabling the buttons for the mandatory HL7 fields ------------------------------------ */\n\n /* --------------------------------------- START loop for hiding the fields not supported ------------------------------------ */\n for (var i = 0; i < notUsedFields.length; i++) {\n $(\".\" + notUsedFields[i]).addClass('hiddenFields'); //Adding class to identify the hidden fields and is used in click function for select all button\n $(\".\" + notUsedFields[i]).hide(); //Hiding the fields which we are not using\n }\n /* --------------------------------------- END loop for hiding the fields not supported ------------------------------------ */\n}", "excute () {\n\t\tthis.object.property.scale = this.newScale; // 这里都没有转化,全部都是json串\n\n\t\t// 向后台提交呈现物的三维属性数据\n\t\tif (this.roleBindType == 1) { // LBS 呈现物\n\t\t\tSubmitObjPropsApis.submitLBSRoleThreedProps(this.object.bind_id, 'scale', this.newScale);\n\t\t} else if (this.roleBindType == 2) { // 标志物绑定的呈现物\n\t\t\tSubmitObjPropsApis.submitIdentifyBindRoleThreedProps(this.boundIdentifyID, this.object.id, 'scale', this.newScale);\n\t\t}\n\n\t\t// 操作场景中的模型\n\t\tthis.roleModelInfo.model && this.roleModelInfo.model.scale.copy( JSON.parse(this.newScale) );\n\t\tthis.roleModelInfo.model && this.roleModelInfo.model.updateMatrixWorld( true );\n\t\tthis.roleModelInfo.ctrl && this.roleModelInfo.ctrl.update();\n\t}", "function recreateDynamicArrays() {\n dynamicProjectHolder.createAllTasks(projectHolder.groupAllTasks());\n dynamicProjectHolder.sortAllByDate();\n dynamicProjectHolder.createTodayTasks();\n dynamicProjectHolder.createWeekTasks();\n dynamicProjectHolder.createLateTasks();\n}", "_updateRendering() {\n this._domElement.style.width = this._width + 'px'\n this._domElement.style.height = this._height + 'px'\n this._adjustAll()\n }", "applyLayout(events) {\n super.applyLayout(events, (event, j, slot, slotSize) => {\n event.height = slotSize;\n event.top = slot.start + j * slotSize;\n });\n events.forEach(event => {\n Object.assign(event, this.bandIndexToPxConvertFn.call(this.bandIndexToPxConvertThisObj || this, event.top, event.height, null, event.eventRecord));\n });\n }", "function updateAll() {\n refreshSliderDimensions();\n ngModelRender();\n redrawTicks();\n }", "function reQuery() {\n\n // Update our different OData strings\n updateFilterString();\n updateSortString();\n\n // Refresh the visual collection, resulting in the table refreshing\n properties.visualCollection.refresh();\n\n }", "_updatePositionsAndSizes() {\n\n\t\t\tconst self = this;\n\n\t\t\tconst maxRowLabelWidth = this._getMaxRowLabelWidth()\n\t\t\t\t, maxColLabelHeight = this._getMaxColumnLabelHeight();\n\n\t\t\tconst bandWidth \t= this._columnScale.bandwidth()\n\t\t\t\t, step\t\t\t=this._columnScale.step();\n\n\t\t\tconsole.log('ResistencyMatrix / _updatePositionsAndSizes: maxRowLabelWidth', maxRowLabelWidth, 'collabelheight', maxColLabelHeight, 'bandWidth', bandWidth);\n\n\t\t\t// Update rows\n\t\t\tthis._elements.svg\n\t\t\t\t.selectAll('.row')\n\t\t\t\t.each(function(d,i){\n\t\t\t\t\td3.select(this)\n\t\t\t\t\t\t.attr('height', bandWidth)\n\t\t\t\t\t\t.attr('transform', `translate(0, ${ i * Math.floor( bandWidth ) + Math.floor( maxColLabelHeight ) + self._configuration.spaceBetweenLabelsAndMatrix + i * self._configuration.lineWeight })`);\n\t\t\t\t});\n\n\n\t\t\t// Update cell's rectangles\n\t\t\tthis._elements.svg\n\t\t\t\t.selectAll('.row')\n\t\t\t\t.selectAll('.cell')\n\t\t\t\t.each(function(d, i) {\n\t\t\t\t\tself._alignCell(this, Math.floor(self._columnScale.bandwidth()), i, Math.floor(maxRowLabelWidth + self._configuration.spaceBetweenLabelsAndMatrix), self._configuration.lineWeight);\n\t\t\t\t})\n\t\t\t\t.select('rect')\n\t\t\t\t.each(function() {\n\t\t\t\t\tself._resizeCell(this, Math.floor(self._columnScale.bandwidth()));\n\t\t\t\t});\n\n\t\t\t// Update cols\n\t\t\t//this._elements.columns\n\t\t\tthis._elements.svg\n\t\t\t\t.selectAll('.column')\n\t\t\t\t.each(function(d,i) {\n\t\t\t\t\t// step / 2: Make sure we're kinda centered over the col\n\t\t\t\t\tconst left = i * (Math.floor(step) + self._configuration.lineWeight) + maxRowLabelWidth + self._configuration.spaceBetweenLabelsAndMatrix + step / 2;\n\t\t\t\t\td3.select(this)\n\t\t\t\t\t\t.attr('transform', `translate(${ left }, ${ maxColLabelHeight })`);\n\t\t\t\t});\n\n\t\t\t// Update label's x position\n\t\t\tthis._elements.svg\n\t\t\t\t.selectAll('.row')\n\t\t\t\t.select('.label')\n\t\t\t\t.attr('x', maxRowLabelWidth)\n\t\t\t\t.each(function() {\n\t\t\t\t\td3.select(this)\n\t\t\t\t\t\t.attr('y', bandWidth / 2 + this.getBBox().height / 2);\n\t\t\t\t});\n\n\t\t\t// Update col label's y position\n\t\t\t//this._elements.columns\n\t\t\t//\t.select('.label')\n\t\t\t//\t.attr('transform', 'rotate(-45)');\n\n\t\t\t// Update svg height\n\t\t\tconst amountOfCols = ( Object.keys(this._data).length )\n\t\t\t\t, colHeight = this._columnScale.step();\n\t\t\tthis._container.style.height = (this._getMaxColumnLabelHeight() + (colHeight + this._configuration.lineWeight) * amountOfCols + this._configuration.spaceBetweenLabelsAndMatrix) + 'px';\n\n\t\t}", "function rebuildScreenOne() {\n\n // set attributes to start value\n totalRowWidth = 0;\n rowWidths = [];\n\n // get new container width\n containerWidth = getContainerWidth();\n\n // set new rows\n setRows(images);\n\n // get new last row index\n lastRowIndex = getLastRowIndex(images);\n\n // calculate new relative percentage of new rows\n calculateRelativePercentage(images);\n\n // scale\n scaleImages(images);\n\n // delete dots\n deleteDots();\n\n // make new dots\n makeDots();\n\n // check if dot of dotIndex still exists\n checkDotExistence(dotIndex);\n\n // show the content of dot dotIndex\n showContentDot(dotIndex);\n}", "function update() {\n\t\t\n\t\t// Call measure each time before we update to make sure all our our layout properties are set correctly\n\t\tmeasure();\n\t\t\n\t\t// Layout all of our primary SVG d3.elements.\n\t\tsvg.attr(\"width\", size.measuredWidth).attr(\"height\", size.measuredHeight);\n\t\tbackground.attr(\"width\", size.measuredWidth).attr(\"height\", size.measuredHeight);\n\t\tplot.attr('transform','translate(' + size.left + ',' + size.top + ')')\n\t\t\n\t\tscope.dispatch.apply('updated', viz);\n\t\t\n\t}", "Update() {\n let self = this;\n let ctrl_store = new StoreHelper();\n\n let parent = ctrl_store.getPlanogramItemById(self.VueStore, self.ParentID);\n\n if (parent == null) {\n return;\n }\n\n // console.log(\"[UPDATE] CALLED\", self.Type, self.ID, parent);\n\n self.DestroyMilkCrate();\n\n switch (self.Type.toUpperCase()) {\n case \"PRODUCT\": {\n if (parent.MilkCrate.enabled == false) {\n self.SetObjectDimensions();\n self.DestroyMilkCrate();\n self.AddProductDisplay();\n } else {\n self.SetObjectDimensions(parent.MilkCrate);\n self.DestroyDisplayForRedraw();\n self.AddMilkCrate(parent.MilkCrate);\n }\n\n self.Cache();\n }\n break;\n case \"BASKET\": {\n if (parent.MilkCrate.enabled == false) {\n self.DestroyMilkCrate();\n } else {\n self.AddMilkCrate(parent.MilkCrate);\n }\n }\n break;\n case \"DIVIDER\": {\n if (parent.MilkCrate.enabled == false) {\n self.DestroyMilkCrate();\n } else {\n self.AddMilkCrate(parent.MilkCrate);\n }\n }\n break;\n }\n\n // let posRedrawTree = new ParentTreeRedraw();\n // posRedrawTree.PositionDirectChildren(self.VueStore, self.ParentID);\n\n parent.ApplyZIndexing();\n\n self.Group.draw();\n }", "function applySourceDataChanges(){\n var composer = document.getElementById(\"composer\").value;\n var title = document.getElementById(\"title\").value;\n var location = document.getElementById(\"location\").value;\n var ownership = document.getElementById(\"ownership\").value;\n var date = document.getElementById(\"date\").value;\n var publicationstatus = document.getElementById(\"publicationstatus\").value;\n var medium = document.getElementById(\"medium\").value;\n var x = document.getElementById(\"x\").value;\n var y = document.getElementById(\"y\").value;\n var unit = document.getElementById(\"unit\").value;\n var condition = document.getElementById(\"condition\").value;\n var extent = document.getElementById(\"extent\").value;\n var language = document.getElementById(\"language\").value;\n var handwriting = document.getElementById(\"handwriting\").value;\n \n if(composer){\n currentSource.composer = composer;\n }\n if(title){\n currentSource.title = title;\n }\n if(location){\n currentSource.location = location;\n }\n if(ownership){\n currentSource.ownership = ownership;\n }\n if(date){\n currentSource.date = date;\n }\n if(publicationstatus){\n currentSource.publicationstatus = publicationstatus;\n }\n if(medium){\n currentSource.medium = medium;\n }\n if(x){\n currentSource.x = x;\n }\n if(y){\n currentSource.y = y;\n }\n if(unit){\n currentSource.unit = unit;\n }\n if(condition){\n currentSource.condition = condition;\n }\n if(extent){\n currentSource.extent = extent;\n }\n if(language){\n currentSource.language = language;\n }\n if(handwriting){\n currentSource.handwriting = handwriting;\n }\n \n document.getElementById(\"input\").innerHTML = sourceDataChangeForm();\n document.getElementById(\"meiOutput\").value = createMEIOutput();\n createSVGOutput();\n}", "function preprocess(){\n\t// add requirements etc. here\n\n}", "function create_deriv_view() {\n var deriv_vis = null;\n var deriv_x = null;\n var deriv_y = null;\n $(__div_memderiv).css(\"border\", \"solid green 2px\"); \n __vS.addListener(\"init\", function(eventname, event, caller) {\n __db.f_counts(function(counts) { \n var xmax = counts.event-1,\n ymax = Math.round(counts.max_addr / 1024),\n w = 450,\n h = 450,\n p = 20;\n\n deriv_x = d3.scale.linear().domain([0,xmax]).range([0, w]);\n deriv_y = d3.scale.linear().domain([0,ymax]).range([h, 0]);\n\n deriv_vis = d3.select(__div_memderiv).append(\"svg\")\n .attr(\"width\", w + p * 2)\n .attr(\"height\", h + p * 2)\n .append(\"g\")\n .attr(\"transform\", \"translate(\" + p + \",\" + p + \")\");\n/*\n var xrule = deriv_vis.selectAll(\"g.x\")\n .data(deriv_x.ticks(10))\n .enter().append(\"g\")\n .attr(\"class\", \"x\");\n\n xrule.append(\"line\")\n .attr(\"x1\", deriv_x)\n .attr(\"x2\", deriv_x)\n .attr(\"y1\", 0)\n .attr(\"y2\", h);\n\n xrule.append(\"text\")\n .attr(\"x\", deriv_x)\n .attr(\"y\", h + 3)\n .attr(\"dy\", \".71em\")\n .attr(\"text-anchor\", \"middle\")\n .text(deriv_x.tickFormat(10));\n*/\n var yrule = deriv_vis.selectAll(\"g.y\")\n .data(deriv_y.ticks(10))\n .enter().append(\"g\")\n .attr(\"class\", \"y\");\n\n yrule.append(\"line\")\n .attr(\"x1\", 0)\n .attr(\"x2\", w)\n .attr(\"y1\", deriv_y)\n .attr(\"y2\", deriv_y);\n\n yrule.append(\"text\")\n .attr(\"x\", -3)\n .attr(\"y\", deriv_y)\n .attr(\"dy\", \".35em\")\n .attr(\"text-anchor\", \"end\")\n .text(deriv_y.tickFormat(10));\n\n deriv_vis.append(\"rect\")\n .attr(\"width\", w)\n .attr(\"height\", h);\n });\n });\n\n __vS.addListener(\"frameslider_change\", function(eventname, event, caller) { \n __db.f_memderiv(event, function(data) {\n deriv_vis.data(data.events).append(\"path\")\n .attr(\"class\", \"line\")\n .attr(\"d\", d3.svg.line()\n .x(function(d) { return deriv_x(d.index); })\n .y(function(d) { return deriv_y(d.delta); }));\n /*lines.transition().duration(0)\n .attr(\"class\", \"line\")\n .attr(\"d\", d3.svg.line()\n .x(function(d) { return deriv_x(d.index); })\n .y(function(d) { return deriv_y(d.delta); }));*/\n\n var points = deriv_vis.selectAll(\"circle.line\")\n .data(data.events);\n points.enter().append(\"circle\")\n .attr(\"class\", \"line\")\n .attr(\"cx\", function(d) { return deriv_x(d.index); })\n .attr(\"cy\", function(d) { return deriv_y(d.delta); })\n .attr(\"r\", 3.5)\n points.transition().duration(0)\n .attr(\"class\", \"line\")\n .attr(\"cx\", function(d) { return deriv_x(d.index); })\n .attr(\"cy\", function(d) { return deriv_y(d.delta); })\n .attr(\"r\", 3.5)\n points.exit().remove();\n });\n });\n }", "function resetGlobalDesign () {\n _GlobalDesign.setDesignName(\"globalDesign\");\n var arrayGlobalFigure = _GlobalDesign.getFigures();\n var currentFigure = 0;\n for (currentFigure; currentFigure < _GlobalDesign.getAmountOfFigures(); currentFigure++) {\n arrayGlobalFigure.pop();\n }\n _GlobalDesign.setAmountOfFigures(0);\n }", "function simpleLayoutChanges() {\n \"use strict\";\n var container = $('.container').width();\n $('.testimonial_carousel .item').each(function() {\n\n var self = $(this);\n var wpb_column = self.parents('.wpb_column').first().width();\n self.innerWidth(wpb_column + 'px');\n self.height(self.height() + 'px');\n self.parents('.caroufredsel_wrapper').first().height(self.height() + 'px');\n self.parents('.testimonial_carousel').first().height(self.height() + 'px');\n\n });\n\n $('.clients_caro .item').each(function() {\n var self = $(this);\n var wpb_column = self.parents('.vc_column-inner').width();\n\n if (container > 420 && container <= 724) {\n self.innerWidth((wpb_column / 3) + 'px');\n }\n if (container > 724 && container < 940) {\n self.innerWidth((wpb_column / 4) + 'px');\n }\n if (container > 940) {\n self.innerWidth((wpb_column / 6) + 'px');\n }\n });\n\n clientsCarousel();\n }", "__applyModelChanges() {\n this.buildLookupTable();\n this._applyDefaultSelection();\n }", "function BaseLayouter() {}", "function BaseLayouter() {}", "function BaseLayouter() {}", "function redCommonAdversaries(idx, homeTeam, awayTeam){\r\n/*in the reduced format we don't need data from the curent weeks matches ecause we will not display\r\n * forms, or goals data just weeks, teams and results that we already have from form data request\t*/\r\n\tconsole.log(\"in redCommonAdversaries\");\r\n\t\r\n\t\r\n\tvar t1spoting=[];\r\n\tvar t2spoting=[];\r\n\r\n\t\r\n\t\r\n\tvar tab= $(\"#common\"+idx).find('td');\r\n\ttab[0].innerHTML=homeTeam;\r\n\t$(tab[0]).css({'font-size':18});\r\n\t$(tab[0]).css(\"font-weight\",\"Bold\");\r\n\t$(tab[0]).css('text-decoration', 'underline')\r\n\ttab[1].innerHTML=awayTeam;\r\n\t$(tab[1]).css({'font-size':18});\r\n\t$(tab[1]).css(\"font-weight\",\"Bold\");\r\n\t$(tab[1]).css('text-decoration', 'underline')\r\n\t\r\n\t\r\n\tvar currentWeek= compRedData[compRedData.length-2][0]+1;\r\n\tvar advObj1={};\r\n\tvar advObj2={};\r\n\t\r\n\t\r\n\tfor(var i=compRedData.length-2;i>=0;i--){\r\n\t\tif(compRedData[i][0] + commonBackWeeksSearch < currentWeek){break;} // iterate 10 last weeks\r\n\t\tif(homeTeam === compRedData[i][1]){\r\n\t\t\tadvObj1={datWeek:compRedData[i][0], team:homeTeam, adv:compRedData[i][2], pos:i, inOut:\"In\", tRes:compRedData[i][3],\r\n\t\t\t\t\tadvRes:compRedData[i][4]\r\n\t\t\t\t\t/*, tForm:weeklyMatches[i].t1form, advForm:weeklyMatches[i].t2form,\r\n\t\t\t\t\t tAtack:(compRedData[i][7]), advAtak:(weeklyMatches[i].t2atackIn +weeklyMatches[i].t2atackOut),\r\n\t\t\t\t\t tDef:(weeklyMatches[i].t1defIn +weeklyMatches[i].t1defOut), advDef:(weeklyMatches[i].t2defIn +weeklyMatches[i].t2defOut),\r\n\t\t\t\t\t tAvgScore:(weeklyMatches[i].t1AvgScoreIn + weeklyMatches[i].t1AvgScoreOut), \r\n\t\t\t\t\t advAvgScore:(weeklyMatches[i].t2AvgScoreIn + weeklyMatches[i].t2AvgScoreOut)*/\r\n\t\t\t\t };\r\n\t\t\t\t t1spoting.push(advObj1);\r\n\t\t}\r\n\t\telse if(homeTeam == compRedData[i][2]){\r\n\t\t\tadvObj1={datWeek:compRedData[i][0], team:homeTeam, adv:compRedData[i][1], pos:i, inOut:\"Out\", tRes:compRedData[i][4], \r\n\t\t\t\t\tadvRes:compRedData[i][3]\r\n\t\t\t\t\t/*, tForm:weeklyMatches[i].t2form, advForm:weeklyMatches[i].t1form, \r\n\t\t\t\t\t tAtack:(weeklyMatches[i].t2atackIn +weeklyMatches[i].t2atackOut), advAtak:(weeklyMatches[i].t1atackIn +weeklyMatches[i].t1atackOut),\r\n\t\t\t\t\t tDef:(weeklyMatches[i].t2defIn +weeklyMatches[i].t2defOut), advDef:(weeklyMatches[i].t1defIn +weeklyMatches[i].t1defOut),\r\n\t\t\t\t\t tAvgScore:(weeklyMatches[i].t2AvgScoreIn + weeklyMatches[i].t2AvgScoreOut), \r\n\t\t\t\t\t advAvgScore:(weeklyMatches[i].t1AvgScoreIn + weeklyMatches[i].t1AvgScoreOut)*/\r\n\t\t\t\t };\r\n\t\t\t\t t1spoting.push(advObj1);\r\n\t\t}\r\n\t\t\r\n\t\tif(awayTeam ==compRedData[i][1]){\r\n\t\t\tadvObj2={datWeek:compRedData[i][0], team:awayTeam, adv:compRedData[i][2], pos:i, inOut:\"In\", tRes:compRedData[i][3],\r\n\t\t\t\t\tadvRes:compRedData[i][4]\r\n\t\t\t\t\t/*, tForm:weeklyMatches[i].t1form, advForm:weeklyMatches[i].t2form,\r\n\t\t\t\t\t tAtack:(weeklyMatches[i].t1atackIn +weeklyMatches[i].t1atackOut), advAtak:(weeklyMatches[i].t2atackIn +weeklyMatches[i].t2atackOut),\r\n\t\t\t\t\t tDef:(weeklyMatches[i].t1defIn +weeklyMatches[i].t1defOut), advDef:(weeklyMatches[i].t2defIn +weeklyMatches[i].t2defOut),\r\n\t\t\t\t\t tAvgScore:(weeklyMatches[i].t1AvgScoreIn + weeklyMatches[i].t1AvgScoreOut), \r\n\t\t\t\t\t advAvgScore:(weeklyMatches[i].t2AvgScoreIn + weeklyMatches[i].t2AvgScoreOut)*/\r\n\t\t\t\t };\r\n\t\t\t\t t2spoting.push(advObj2);\r\n\t\t}\r\n\t\telse if(awayTeam == compRedData[i][2]){\r\n\t\t\tadvObj2={datWeek:compRedData[i][0], team:awayTeam, adv:compRedData[i][1], pos:i, inOut:\"Out\", tRes:compRedData[i][4],\r\n\t\t\t\t\tadvRes:compRedData[i][3]\r\n\t\t\t\t\t/*, tForm:weeklyMatches[i].t2form, advForm:weeklyMatches[i].t1form, \r\n\t\t\t\t\t tAtack:(weeklyMatches[i].t2atackIn +weeklyMatches[i].t2atackOut), advAtak:(weeklyMatches[i].t1atackIn +weeklyMatches[i].t1atackOut),\r\n\t\t\t\t\t tDef:(weeklyMatches[i].t2defIn +weeklyMatches[i].t2defOut), advDef:(weeklyMatches[i].t1defIn +weeklyMatches[i].t1defOut),\r\n\t\t\t\t\t tAvgScore:(weeklyMatches[i].t2AvgScoreIn + weeklyMatches[i].t2AvgScoreOut), \r\n\t\t\t\t\t advAvgScore:(weeklyMatches[i].t1AvgScoreIn + weeklyMatches[i].t1AvgScoreOut)*/\r\n\t\t\t\t };\r\n\t\t\t\t t2spoting.push(advObj2);\r\n\t\t}\r\n\t}\t\r\n\t\r\n\t//---------------search first 3 common adv from t1spotiong then 2 from t2 spoting for tot of last 5 common adversaries\r\n\t// when a common adv is found we pair them so that we know which match in spot1 corresponds to spot2\r\n\tvar count=0;\r\n\tfor(var i=0;i<t1spoting.length;i++){// i & j =1 and not 0 because 0 has the current match data\r\n\t\tif(count>=3){break;}\r\n\t\tfor(var j=0;j<t2spoting.length;j++){\r\n\t\t\tif(t2spoting[j].pair!==undefined){continue;}\r\n\t\t\tif(t1spoting[i].adv ==t2spoting[j].adv){//-> found a common Adversary\r\n\t\t\t\tt1spoting[i].pair=j;\r\n\t\t\t\tt2spoting[j].pair=i;\r\n\t\t\t\tcount++;\r\n\t\t\t\r\n\t\t\t\t/*t1spoting[i].newForn = t1spoting[i-1].tForm;\r\n\t\t\t\tt1spoting[i].newAtack = t1spoting[i-1].tAtack;\r\n\t\t\t\tt1spoting[i].newDef = t1spoting[i-1].tDef;\r\n\t\t\t\t\r\n\t\t\t\tt2spoting[j].newForn = t2spoting[j-1].tForm;\r\n t2spoting[j].newAtack = t2spoting[j-1].tAtack;\r\n t2spoting[j].newDef = t2spoting[j-1].tDef;*/\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tcount=0;\r\n\tfor(var i=0;i<t2spoting.length;i++){\r\n\t\tif(count>=2){break;}\r\n\t\tif(t2spoting[i].pair!==undefined){continue;}\r\n\t\tfor(var j=0;j<t1spoting.length;j++){\r\n\t\t\tif(t1spoting[j].pair!==undefined){continue;}\r\n\t\t\t\r\n\t\t\tif(t2spoting[i].adv ==t1spoting[j].adv){//-> found a common Adversary\r\n\t\t\t\tt2spoting[i].pair=j;\r\n\t\t\t\tt1spoting[j].pair=i;\r\n\t\t\t\tcount++;\r\n\t\t\t\r\n\t\t\t\t/*t1spoting[j].newForn = t1spoting[j-1].tForm;\r\n\t\t\t\tt1spoting[j].newAtack = t1spoting[j-1].tAtack;\r\n\t\t\t\tt1spoting[j].newDef = t1spoting[j-1].tDef;\r\n\t\t\t\t\r\n\t\t\t\tt2spoting[i].newForn = t2spoting[i-1].tForm;\r\n t2spoting[i].newAtack = t2spoting[i-1].tAtack;\r\n t2spoting[i].newDef = t2spoting[i-1].tDef;*/\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\t\r\n\t\t\r\n\tvar directadv =[];\r\n\t//show their direct previous encounters\r\n\tfor(var i=0;i<t1spoting.length;i++){\r\n//\t\tconsole.log(\"direct -- t1spoting \"+j+\" \"+t1spoting[i].adv);\r\n\t\tif( t1spoting[i].adv==awayTeam){\r\n\t\t\tdirectadv.push(t1spoting[i]);\r\n\t\t\ttobj={week:t1spoting[i].datWeek, tname:homeTeam, adv:awayTeam, io:t1spoting[i].inOut, t1Res:t1spoting[i].tRes, t2Res:t1spoting[i].advRes};\r\n\t\t\tcommonAdvTabShower(idx, tobj, null);\r\n\t\t}\r\n\t}\r\n\r\n\tvar tobj1;\r\n\tvar tobj2;\r\n\tvar pos2;\r\n\tfor(var i=1;i<t1spoting.length;i++){\r\n\t\tif(t1spoting[i].pair!==undefined){\r\n\t\t\ttobj1={week:t1spoting[i].datWeek, tname:t1spoting[i].team, adv:t1spoting[i].adv, io:t1spoting[i].inOut, t1Res:t1spoting[i].tRes, t2Res:t1spoting[i].advRes};\r\n\t\t\tpos2=t1spoting[i].pair;\r\n\t\t\ttobj2={week:t2spoting[pos2].datWeek,tname:t2spoting[pos2].team, adv:t2spoting[pos2].adv, io:t2spoting[pos2].inOut, t1Res:t2spoting[pos2].tRes, t2Res:t2spoting[pos2].advRes};\r\n\t\t\tcommonAdvTabShower(idx, tobj1, tobj2);\r\n\t\t}\r\n\t}\r\n\t\r\n}", "function BrickLayoutStore() {\n this.counter = 0;\n this.brickImages = new Array();\n\n this.brickImages['basic'] = new Image();\n this.brickImages['basic'].src = './img/brick_basic.png';\n this.brickImages['twoball'] = new Image();\n this.brickImages['twoball'].src = './img/brick_twoball.png';\n this.brickImages['speedball'] = new Image();\n this.brickImages['speedball'].src = './img/brick_speedball.png';\n\n\n this.brickLayouts = new Array();\n\n this.brickLayouts[0] = new BrickLayout();\n this.brickLayouts[0].pattern = [\n [{ type: 'void' }, { type: 'void' }, { type: 'basic' }], //first row\n [{ type: 'basic' }, { type: 'void' }, { type: 'void' }] //second row\n ]; \n\n this.brickLayouts[1] = new BrickLayout();\n this.brickLayouts[1].pattern = [\n [{ type: 'void' }, { type: 'void' }, { type: 'void' }, { type: 'basic' }], //first row\n [{ type: 'basic' }, { type: 'void' }, { type: 'void' }] //second row\n ];\n\n this.brickLayouts[2] = new BrickLayout();\n this.brickLayouts[2].pattern = [\n [{ type: 'void' }, { type: 'void' }, { type: 'void' }, { type: 'void' }, { type: 'void' }, { type: 'basic' }], //first row\n [{ type: 'void' }, { type: 'void' }, { type: 'void' }, { type: 'void' }, { type: 'basic' }], //second row\n [{ type: 'void' }, { type: 'void' }, { type: 'void' }, { type: 'basic' }] //third row\n ]; \n\n}", "function resizer() {\n const $components = config.componentCollection;\n const breakPoints = config.breakPoints;\n let size;\n for (let i = 0; i < $components.length; i++) {\n if (\n !$($components[i]).is(':visible') &&\n $($components[i])\n .parent()\n .is('.bannerSlides')\n ) {\n // Handle Hidden Banners in widgets\n size = $($components[i])\n .parent()\n .width();\n } else if (\n !$($components[i]).is(':visible') &&\n $($components[i])\n .parent()\n .parent()\n .parent()\n .is('.widgetContent')\n ) {\n // Handle Hidden Banners in FLEX widgets\n size = $($components[i])\n .parent()\n .parent()\n .width();\n } else {\n size = $($components[i]).width();\n }\n switch (true) {\n case size < breakPoints[0]:\n if ($components[i].currentSize !== sizes.small) {\n functions.small($components[i]);\n $components[i].currentSize = sizes.small;\n }\n break;\n case size >= breakPoints[0] && size < breakPoints[1]:\n if ($components[i].currentSize !== sizes.medium) {\n functions.medium($components[i]);\n $components[i].currentSize = sizes.medium;\n }\n break;\n case size >= breakPoints[1] && size < breakPoints[2]:\n if ($components[i].currentSize !== sizes.large) {\n functions.large($components[i]);\n $components[i].currentSize = sizes.large;\n }\n break;\n case size >= breakPoints[2]:\n if ($components[i].currentSize !== sizes.huge) {\n functions.huge($components[i]);\n $components[i].currentSize = sizes.huge;\n }\n break;\n default:\n break;\n }\n\n // Allows for dynamic text resizing for components that define such functionality\n functions.textResizer($components[i]);\n }\n }", "_applyScale() {\n // adjust textures size\n for(let i = 0; i < this.textures.length; i++) {\n this.textures[i].resize();\n }\n\n // we should update the plane mvMatrix\n this._updateMVMatrix = true;\n }", "function pass1(structureControl) {\n if (!structureControl) {\n return;\n }\n\n /////\n // Get the structure controls minimum viable size.\n /////\n function getMinSize(dimension) {\n if (!structureControl || !dimension) {\n return;\n }\n\n var cssMinHeight;\n var cssMinWidth;\n\n if (dimension === dimensions.horizontal) {\n cssMinWidth = structureControl.domElement.css('min-width');\n\n if (!structureControl.domElement[0].originalMinWidth) {\n structureControl.domElement[0].originalMinWidth = cssMinWidth;\n }\n }\n\n if (dimension === dimensions.vertical) {\n cssMinHeight = structureControl.domElement.css('min-height');\n\n if (!structureControl.domElement[0].originalMinHeight) {\n structureControl.domElement[0].originalMinHeight = cssMinHeight;\n }\n }\n\n var min;\n var childIndex = 0;\n var child;\n var aggregateMin = 0;\n var parentPadding = 0;\n\n if (dimension === dimensions.vertical) {\n min = parseFloat(structureControl.domElement[0].originalMinHeight) || 0;\n\n if (structureControl.children && structureControl.children.length) {\n\n parentPadding = structureControl.domElement.outerHeight() - structureControl.domElement.height();\n\n if (structureControl.lineBreakClass) {\n var lineBreak = structureControl.domElement.find(structureControl.lineBreakClass).first();\n\n if (lineBreak && lineBreak.length) {\n parentPadding += 17;\n }\n }\n\n var alias = structureControl.control.type.getAlias();\n\n if (structureControl.isExplicitContainer && !structureControl.control.hideLabel && alias !== spFormBuilderService.containers.screen && alias !== spFormBuilderService.containers.form) {\n if (structureControl.titleClass) {\n var label = structureControl.domElement.find(structureControl.titleClass).first();\n\n if (label && label.length) {\n parentPadding += label.outerHeight();\n }\n }\n }\n\n if (structureControl.isHorizontalContainer || structureControl.isTabContainer) {\n\n for (childIndex = 0; childIndex < structureControl.children.length; childIndex++) {\n child = structureControl.children[childIndex];\n\n if (child.minSize.height + parentPadding > min) {\n min = child.minSize.height + parentPadding;\n }\n }\n } else {\n for (childIndex = 0; childIndex < structureControl.children.length; childIndex++) {\n child = structureControl.children[childIndex];\n\n aggregateMin += child.minSize.height;\n }\n\n if (aggregateMin + parentPadding > min) {\n min = aggregateMin + parentPadding;\n }\n }\n }\n\n return min;\n } else {\n min = parseFloat(structureControl.domElement[0].originalMinWidth) || 0;\n\n if (structureControl.children && structureControl.children.length) {\n\n parentPadding = structureControl.domElement.outerWidth() - structureControl.domElement.width();\n\n for (childIndex = 0; childIndex < structureControl.children.length; childIndex++) {\n child = structureControl.children[childIndex];\n\n if (child.minSize.width + parentPadding > min) {\n min = child.minSize.width + parentPadding;\n }\n }\n }\n\n return min;\n }\n }\n\n /////\n // Temporarily disable overflow. (prefix)\n /////\n if (structureControl.isContainer) {\n\n structureControl.domElement.css('overflow-x', 'hidden');\n\n if (structureControl.firstContentControl) {\n structureControl.firstContentControl.css('overflow-x', 'hidden');\n }\n }\n\n /////\n // Recursive.\n /////\n if (structureControl.children && structureControl.children.length) {\n for (var childIndex = 0; childIndex < structureControl.children.length; childIndex++) {\n var child = structureControl.children[childIndex];\n\n pass1(child);\n }\n }\n\n /////\n // Calculate the controls minimum size. (postfix)\n /////\n structureControl.minSize.height = getMinSize(dimensions.vertical) || 0;\n structureControl.minSize.width = getMinSize(dimensions.horizontal) || 0;\n\n if (structureControl.isField) {\n structureControl.minSize.height += (structureControl.domElement.outerHeight() - structureControl.domElement.height());\n structureControl.minSize.width += (structureControl.domElement.outerWidth() - structureControl.domElement.width());\n }\n }", "function buildSystems(televisions, amplifiers, speakers) {\n\t\tvar sum = 0;\t\t \t// Total system design cost\n\t\tvar performance = 0;\t// Total system performance\n\t\tvar reliability = 0; \t// Total system reliability \n\t\tvar counter = 1;\t\t// Used to label design names\n\n\t\tfor (var i = televisions.length - 1; i >= 0; i--) { // Loop through television container array\n\t\t\tfor (var j = amplifiers.length - 1; j >= 0; j--) { // Loop through amplifier container array\n\t\t\t\tfor (var k = speakers.length - 1; k >= 0; k--) { // Loop through speaker container array\n\t\t\t\t\tsum = televisions[i].cost + amplifiers[j].cost + speakers[k].cost;\n\t\t\t\t\tperformance = (televisions[i].performance + amplifiers[j].performance + speakers[k].performance) / 3;\n\t\t\t\t\treliability = (televisions[i].reliability + amplifiers[j].reliability + speakers[k].reliability) / 3;\n\t\t\t\t\tsystemDesigns.push( // Add system design object to system design container array\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"name\" : \"design \" + counter,\n\t\t\t\t\t\t\t\"cost\" : sum,\n\t\t\t\t\t\t\t\"performance\" : performance,\n\t\t\t\t\t\t\t\"reliability\" : reliability,\n\t\t\t\t\t\t\t\"television\" : televisions[i].brand,\n\t\t\t\t\t\t\t\"amplifier\" : amplifiers[j].brand,\n\t\t\t\t\t\t\t\"speaker\" : speakers[k].brand\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\tcounter++;\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\t// console.log(systemDesigns[0].name + \" \" + systemDesigns[0].cost + \" \" + systemDesigns[0].performance + \" \" + systemDesigns[0].reliability);\n\t\t/*\n\t\t\tBuild a table of deisgns to complement the graph\n\t\t*/\t\t\n\t\tsystemDesigns.forEach(function(x) {\n\t\t\t$(\"#designTableBody\").append(\"<tr><td>\" + \n\t\t\t\tx.name + \"</td><td>\" + \n\t\t\t\tx.television + \"</td><td>\" + \n\t\t\t\tx.speaker + \"</td><td>\" + \n\t\t\t\tx.amplifier + \"</td><td>\"+\n\t\t\t\tx.cost + \"</td><td>\" +\n\t\t\t\tx.performance.toFixed(2) + \"</td><td>\" +\n\t\t\t\tx.reliability.toFixed(2) +\t\"</td></tr>\");\n\t\t});\t\t\n\t}", "function finalDraw() {\n\t Shapes.drawAll(gd);\n\t Images.draw(gd);\n\t Plotly.Annotations.drawAll(gd);\n\t Legend.draw(gd);\n\t RangeSlider.draw(gd);\n\t RangeSelector.draw(gd);\n\t }", "constructor(wrapperElem, canvas) {\n super(wrapperElem, canvas);\n\n this.shaderProgram = this.shaderFac.shaderPrograms[PROGRAMS.COLOR_SHADER];\n this.positionAttrib = this.shaderProgram.attribs[\"a_position\"].index;\n this.colorAttrib = this.shaderProgram.attribs[\"a_color\"].index;\n this.matrixUniform = this.shaderProgram.uniforms[\"u_matrix\"].index;\n this.resolutionUniform = this.shaderProgram.uniforms[\"u_resolution\"].index;\n\n this.assignmentPlans = [];\n this.sideLabelList = [];\n this.waitingLabelList = [];\n\n this.MOUSE = {\n offsetX: 0,\n offsetY: 0,\n isDown: false,\n startX: 0,\n startY: 0,\n netPanningX: 0,\n netPanningY: 0,\n isDrag: false\n };\n\n this.canvas.onmousemove = function (e) {\n\n if (!this.appTimeTransform) return;\n\n var mouseX = e.offsetX;\n var mouseY = e.offsetY;\n\n if (this.MOUSE.isDown) {\n // tell the browser we're handling this event\n e.preventDefault();\n e.stopPropagation();\n\n // dx & dy are the distance the mouse has moved since\n // the last mousemove event\n var dx = mouseX - this.MOUSE.startX;\n var dy = mouseY - this.MOUSE.startY;\n\n // reset the vars for next mousemove\n this.MOUSE.startX = mouseX;\n this.MOUSE.startY = mouseY;\n\n // console.log(dx);\n\n if (Math.abs(dx) > Math.abs(dy)) {\n this.appTimeTransform.applyPan(dx);\n }\n else {\n this.appTimeTransform.verticalScroll(dy);\n }\n\n this.renderAll();\n }\n else {\n mouseX = this.appTimeTransform.reverseX(mouseX);\n mouseY = this.appTimeTransform.reverseY(mouseY);\n var objs = this.hashLookup.getObjectsAt({ x: mouseX, y: mouseY });\n //console.log(objs);\n\n if (objs) {\n var box = objs.getBoundingBox();\n\n box.left = this.appTimeTransform.transformX(box.left);\n box.right = this.appTimeTransform.transformX(box.right);\n box.top = this.appTimeTransform.transformY(box.top);\n box.bottom = this.appTimeTransform.transformY(box.bottom);\n\n var offset = Utils.cumulativeOffset(this.wrapperElem);\n this.tooltip.emptyList();\n this.tooltip.addItem(objs.wrappedObj.BusName);\n //this.tooltip.addItem(\"Vessel Type: \" + objs.wrappedObj.vessel.IncoTerms);\n //this.tooltip.addItem(\"Laycan Range: \" + objs.wrappedObj.vessel.LaycanStart + \" - \" + objs.wrappedObj.LaycanEnd);\n //this.tooltip.addItem(\"SVP date: \" + objs.wrappedObj.vessel.Eta);\n\n var tooltipLeft = box.left;\n if (box.left < 0) tooltipLeft = 0;\n else if (box.right >= this.canvas.width) tooltipLeft = this.canvas.width - 220;\n\n //this.tooltip.showAt(offset.left + tooltipLeft + 10, offset.top + box.top + 10);\n this.tooltipHandler(true, objs.wrappedObj, { x: tooltipLeft + 10, y: box.top + 10 });\n }\n else {\n //this.tooltip.hide();\n this.tooltipHandler(false);\n }\n }\n\n }.bind(this);\n\n\n this.canvas.onmousedown = function (e) {\n if (!this.appTimeTransform) return;\n //console.log(\"Mouse Down\");\n //console.log(e);\n\n // tell the browser we're handling this event\n e.preventDefault();\n e.stopPropagation();\n\n // calc the starting mouse X,Y for the drag\n this.MOUSE.startX = parseInt(e.offsetX, 10);\n this.MOUSE.startY = parseInt(e.offsetY, 10);\n\n // set the isDragging flag\n this.MOUSE.isDown = true;\n\n this.MOUSE.isDrag = false;\n\n this.tooltipHandler(false);\n }.bind(this);\n\n this.canvas.onmouseup = function (e) {\n if (!this.appTimeTransform) return;\n //console.log(\"Mouse Up\");\n //console.log(e);\n\n if (!this.MOUSE.isDrag) {\n //this.MOUSE.mouseClick(e);\n }\n\n // tell the browser we're handling this event\n e.preventDefault();\n e.stopPropagation();\n\n // clear the isDragging flag\n this.MOUSE.isDown = false;\n }.bind(this);\n\n this.canvas.onmouseout = function (e) {\n if (!this.appTimeTransform) return;\n //console.log(\"Mouse Out\");\n //console.log(e);\n\n // tell the browser we're handling this event\n e.preventDefault();\n e.stopPropagation();\n\n // clear the isDragging flag\n this.MOUSE.isDown = false;\n }.bind(this);\n\n this.canvas.onmousewheel = function (e) {\n if (!this.appTimeTransform) return;\n // console.log(e.wheelDelta);\n var offset = Utils.cumulativeOffset(this.wrapperElem);\n this.appTimeTransform.applyZoom(0.05, e.wheelDelta, e.clientX - offset.left);\n this.renderAll();\n }.bind(this);\n\n // setTimeout(()=>{ console.log(this); }, 5000);\n }", "function Resizer(sExtraSizeMe){\r\n\tvar main = \"ctl00_oCPH1_\";\r\n\t//* Remove Annoyances *//\r\n//\ts = \"#header, #footer, div.vert, div.alignL, span#ctl00_ctl00_cpHeader_Header1_topNav_Span6, div.saveButtons , input#\"+main+\"-btnSave, img#\"+main+\"-Image1, #topnav, #details_tabs, hr.separator {display:none;}\\n\";\r\n//\ts+= \"body {font-family:Calibri, Arial; font-size:12px;}\\n\";\r\n\t\r\n\t//* Interests & Personality Page *//\r\n\ts+= \"input#\"+main+\"txtQuote {font-family:Calibri, Arial; font-size:12px;width: 700px;}\\n\"; \r\n\ts+= \"input#\"+main+\"txtQuote:hover {font-family:Calibri, Arial; font-size:11px; width: 700px;}\\n\";\r\n\ts+= \"textarea#\"+main+\"txtAboutMe {font-family:Calibri, Arial; font-size:12px; width: 700px; height: 600px;}\\n\";//\r\n\ts+= \"textarea#\"+main+\"txtWhoILikeToMeet, #\"+main+\"txtLinks, #\"+main+\"txtInterests, #\"+main+\"txtWebsites, #\"+main+\"txtMusic, #\"+main+\"txtMovies, #\"+main+\"txtBooks {font-family:Calibri, Arial; font-size:12px; width: 700px; height: 100px;}\\n\";\r\n\ts+= \"input#\"+main+\"btnSave {width:100px;height:25px;position:fixed;right:100px;top:5px;}\\n\";\r\n\ts+= \"img#\"+main+\"Image1 {width:100px;height:25px;position:fixed;right:205px;top:5px;}\\n\";\r\n\t\r\n\t//* Blog Edit Page *//\r\n//style=\"width: 430px; height: 220px;\" hardcoded in HTML source likely to be the cause of the stopage\t\r\n\ts+= \"textarea#\"+main+\"txtBody {font-family:Calibri, Arial; font-size:12px; width: 700px; height: 800px;}\\n\";\r\n\ts+= \"input#\"+main+\"btnAddMyBlog {width:100px;height:25px;position:fixed;right:100px;top:5px;}\\n\";\r\n\t\t\r\n\t//* Names Page *//\r\n\t\r\n//\ts+= \"span#\"+main+\"editName_MySpaceNameLit, #\"+main+\"editName_MySpaceURlLit, #\"+main+\"editName_NameMsgLit {font-family:Calibri, Arial; font-size:13px; width: 500px;}\\n\";\r\n//\ts+= \"input#\"+main+\"editName_DisplayNameTextBox, #\"+main+\"editName_FirstNameTextBox, #\"+main+\"editName_LastNameTextBox {font-family:Calibri, Arial; font-size:12px; width: 500px;}\\n\";\r\n\t\r\n\t//* Basic Information Page *//\r\n\t\r\n//\ts+= \"input#\"+main+\"editBasicInfo_occupationTextBox, #\"+main+\"editBasicInfo_cityTextBox {font-family:Calibri, Arial; font-size:12px; width: 325px;}\\n\";\r\n//\ts+= \"input#\"+main+\"editBasicInfo_postalCodeTextBox, select#ddMonth, #ddDay, #ddYear, #\"+main+\"editBasicInfo_GeoLocation1_ddlCountry, #\"+main+\"editBasicInfo_GeoLocation1_ddlRegion, #\"+main+\"editBasicInfo_ethnicityDropDownList, #\"+main+\"editBasicInfo_bodyTypeDropDownList, #\"+main+\"editBasicInfo_feetDropDownList, #\"+main+\"editBasicInfo_inchesDropDownList {font-family:Calibri, Arial; font-size:12px;}\\n\";\r\n\t\r\n\t//* Background and Lifestyle *//\r\n\t\r\n//\ts+= \"input#\"+main+\"editLifestyle_HometownText {font-family:Calibri, Arial; font-size:12px; width: 325px;}\\n\";\r\n//\ts+= \"select#\"+main+\"editLifestyle_ReligionDropDown, #\"+main+\"editLifestyle_IncomeDropDown {font-family:Calibri, Arial; font-size:12px;}\\n\";\r\n\t\r\n\t//* Schools Page *//\r\n\t\r\n//\ts+= \"input#\"+main+\"schoolEditor_schoolFinder_schoolNameTextBox {font-family:Calibri, Arial; font-size:12px; width: 325px;}\\n\";\r\n//\ts+= \"select#\"+main+\"schoolEditor_schoolFinder_countryDropDownList, #\"+main+\"schoolEditor_schoolFinder_regionDropDownList {font-family:Calibri, Arial; font-size:12px;}\\n\";\r\n\t\r\n\t//* Companies Page *//\r\n\t\r\n//\ts+= \"div.bgGrey {display:none;}\\n\";\r\n//\ts+= \"input#\"+main+\"companyEditor_companyNameTextBox, #\"+main+\"companyEditor_cityTextBox, #\"+main+\"companyEditor_regionTextBox, #\"+main+\"companyEditor_titleTextBox, #\"+main+\"companyEditor_divisionTextBox, #\"+main+\"companyEditor_datesEmployedTextBox {font-family:Calibri, Arial; font-size:12px; width: 325px;}\\n\";\r\n//\ts+= \"select#\"+main+\"companyEditor_countryDropDownList {font-family:Calibri, Arial; font-size:12px;}\\n\";\r\n\t\r\n\t//* Networking Page *//\r\n\t\r\n//\ts+= \"textarea#\"+main+\"networkEditor_descriptionTextBox {font-family:Calibri, Arial; font-size:12px; width: 400px; height:150px;}\\n\";\r\n//\ts+= \"select#\"+main+\"networkEditor_categoryDropDownList, #\"+main+\"networkEditor_skillDropDownList, #\"+main+\"networkEditor_roleDropDownList {font-family:Calibri, Arial; font-size:12px;}\\n\";\r\n\t\r\n\t GM_addStyle(s);\r\n\t \r\n\tvar DEBUG = 1;\r\n\tfunction trace (level,msg) { if(DEBUG >= level) GM_log(msg); return; }\r\n\t\r\n\tif (\r\n\t document.documentElement.tagName == \"HTML\"\r\n\t && document.contentType == \"text/html\"\r\n\t && document.body // Basic sanity\r\n\t) {\r\n\t trace(11, \"Starting\");\r\n\t run();\r\n\t}\r\n\t\r\n\tfunction run () {\r\n\t var them = document.getElementsByTagName(\"textarea\");\r\n\t var themInputs = document.getElementsByTagName(\"input\");\r\n\t if(!(them && them.length)) { trace(11, \"No textareas.\"); return; }\r\n\t inits();\r\n\t for(var i = them.length - 1; i >= 0; i--) {\r\n\t tweak_textarea(them[i]);\r\n\t }\r\n\r\n\t trace(5, them.length.toString() + \" textareas\");\r\n\t \r\n\t if(!(themInputs && themInputs.length)) { trace(11, \"No Inputs.\"); return; }\r\n\t for(var i = themInputs.length - 1; i >= 0; i--) {\r\n\t tweak_input(themInputs[i]);\r\n\t }\t \r\n\t return;\r\n\t}\r\n\t\r\n\t// - - - - - - - - -\r\n\t\r\n\tfunction get_pref (prefname, defaulty) {\r\n\t var gotten = GM_getValue(prefname, null);\r\n\t if(gotten == null) {\r\n\t GM_setValue(prefname, defaulty);\r\n\t return defaulty;\r\n\t } else {\r\n\t return gotten;\r\n\t }\r\n\t}\r\n\t\r\n\tvar Drag_increments, Min_Height, Min_Width, Max_Height, Max_Width;\r\n\t\r\n\tfunction inits () {\r\n\t // Number of pixels that we grow by at a time:\r\n\t Drag_increments = get_pref('drag_increment_size', 15);\r\n\t\r\n\t // Constraints (in pixels) on draggable dimensions of textareas:\r\n\t Min_Height = get_pref('min_height', 30);\r\n\t Min_Width = get_pref('min_width' , 30);\r\n\t Max_Height = get_pref('max_height', 1400);\r\n\t Max_Width = get_pref('max_width' , 1400);\r\n\t \r\n\t return;\r\n\t}\r\n\tfunction tweak_input (t) {\r\n\t\t if (t.id==\"ctl00_oCPH1_txtTitle\"){\r\n\t\t\t//alert(t.id+\" : \" + t.style.width +\" : \" + t.style.height);\r\n\t\t\t//t.style=undefined;\r\n\t\t \tt.style.width=\"550px\";\r\n\t\t \tt.style.height=null;\r\n\t\t}\t\t\r\n\t}\r\n\tfunction tweak_textarea (t) {\r\n\t var d = t.ownerDocument;\r\n\t var p = t.parentNode;\r\n\t var n = t.nextSibling;\r\n\t if (t.id==\"ctl00_oCPH1_txtBody\"){\r\n\t\t//alert(t.id+\" : \" + t.style.width +\" : \" + t.style.height);\r\n\t\t//t.style=undefined;\r\n\t \tt.style.width=\"550px\";\r\n\t \tt.style.height=null;\r\n\t}\r\n\t var s = getComputedStyle(t, \"\" );\r\n\t var\r\n\t oh = num(s.height),\r\n\t ow = num(s.width ),\r\n\t br = d.createElement('br');\r\n\t button = d.createElement('img');\r\n\t\r\n\t button.setAttribute('src','resource://gre/res/grabber.gif');\r\n\t button.setAttribute('height',12);\r\n\t button.setAttribute('width' ,12);\r\n\t button.setAttribute('alt','grabby');\r\n\t\r\n\t // don't wrap button\r\n\t p.style.whiteSpace=\"nowrap\";\r\n\t\r\n\t // insert linebreak\r\n\t p.insertBefore(br, t);\r\n\t \r\n\t // insert after textarea\r\n\t if (n) p.insertBefore(button, n);\r\n\t else p.appendChild(button);\r\n\t\r\n\t button.title = \"Click and drag me to change the textarea's size\";\r\n\t\r\n\t button.addEventListener('mousedown', function(event) {\r\n\t // Yes, I think we really do need this as a closure here-- otherwise\r\n\t // there's no (easy) way to work back from the event target to the textarea.\r\n\t start_dragging( event, t, button );\r\n\t event.preventDefault();\r\n\t return;\r\n\t },\r\n\t true\r\n\t );\r\n\t\r\n\t if(ow && oh) {\r\n\t t.style.height = oh.toString() + \"px\";\r\n\t t.style.width = ow.toString() + \"px\";\r\n\t }\r\n\t\r\n\t return;\r\n\t}\r\n\t\r\n\tvar Orig_width, Orig_height, Cursor_start_x, Cursor_start_y;\r\n\t\r\n\tfunction start_dragging (event, textarea, button) {\r\n\t Textarea = textarea;\r\n\t Cursor_start_x = event.clientX;\r\n\t Cursor_start_y = event.clientY;\r\n\t var s = getComputedStyle(textarea, \"\" );\r\n\t Orig_width = num( s.width );\r\n\t Orig_height = num( s.height );\r\n\t\r\n\t trace(4, \"Starting dimensions of textarea: h=\" + s.height.toString() +\r\n\t \" by w=\" + s.width.toString());\r\n\t textarea.ownerDocument.addEventListener(\"mousemove\", ev_drag_move, true);\r\n\t textarea.ownerDocument.addEventListener(\"mouseup\", ev_drag_stop, true);\r\n\t\r\n\t trace(5,\"Starting dragging\");\r\n\t return;\r\n\t}\r\n\t\r\n\tfunction num (i) {\r\n\t var m;\r\n\t if(typeof(i) == \"string\") {\r\n\t m = i.match( /(\\d+)(\\.\\d+)*px/ );\r\n\t // nota bene: yes, the computed style can be fractional, like \"123.56px\"!!\r\n\t if(m) {\r\n\t i = parseInt(m[1], 10);\r\n\t } else {\r\n\t trace(1, \"Weird pseudonumerical value: \\\"\" + i + \"\\\"!\");\r\n\t }\r\n\t } else if(typeof(i) == \"number\") {\r\n\t // just fall thru\r\n\t } else {\r\n\t trace(1, \"Weird nonnumerical value: \\\"\" + i + \"\\\"!\");\r\n\t }\r\n\t //trace( typeof(i) + \": \" + i.toString() );\r\n\t return i;\r\n\t}\r\n\t\r\n\t\r\n\tfunction ev_drag_move (event) {\r\n\t var\r\n\t new_width = event.clientX - Cursor_start_x + Orig_width ,\r\n\t new_height = event.clientY - Cursor_start_y + Orig_height;\r\n\t\r\n\t new_width = px_between(Min_Width ,new_width , Max_Width, Drag_increments);;\r\n\t new_height = px_between(Min_Height,new_height, Max_Height, Drag_increments);;\r\n\t\r\n\t trace(10, \"Setting dimensions to h=\" + new_height.toString() +\r\n\t \" w=\" + new_width.toString() );\r\n\t\r\n\t Textarea.style.width = new_width;\r\n\t Textarea.style.height = new_height;\r\n\t\r\n\t event.preventDefault();\r\n\t return;\r\n\t}\r\n\t\r\n\tfunction ev_drag_stop (event) {\r\n\t // Stop capturing the mousemove and mouseup events.\r\n\t document.removeEventListener(\"mousemove\", ev_drag_move, true);\r\n\t document.removeEventListener(\"mouseup\", ev_drag_stop, true);\r\n\t event.preventDefault();\r\n\t return;\r\n\t}\r\n\t\r\n\tfunction px_between (min, i, max, incr) {\r\n\t if(incr) i = Math.floor(i/incr) * incr;\r\n\t return(\r\n\t (\r\n\t (i > max) ? max\r\n\t :(i < min) ? min\r\n\t : i\r\n\t ).toString() + \"px\"\r\n\t );\r\n\t}\r\n\t\r\n}", "static preRender() {\n $(\".ship-inventory-content > div > div\").first().empty();\n $(\"#config-\" + equipment.config + \" > div.\" + equipment.display + \"-equipment-container > .\" + equipment.display + \"-equipment-slots\").empty();\n $(\"#config-\" + equipment.config + \" > .\" + equipment.display + \"-equipment-container > div > div\").first().empty();\n }", "function updateContext() {\n\t// Switch the background image of the data – using an image to improve performance\n\tupdateContextBackgroundImage();\n\n\t// Mark each species in the context view, colored by threat level\n\t//contextCircles();\n\t//contextBars();\n\t\n\t// Draw rects for each family in context view, colored by threat level\n\t//contextFamilies();\n\t\n\t// Label each order with a line and its name\n\tcontextOrders();\n\t\n\t// Update context label\n\td3.select(\".contextlabel\").text(\"BROWSE ALL \"+getSingularFormClassname().toUpperCase()+\" SPECIES\")\t\n\t\t.attr(\"x\", function(d, i) {\n\t\t\tcontextlabelwidth = d3.select(this).node().getBBox().width\n\t\t\treturn x0;\n\t\t\t//return (divwidth/2)-(contextlabelwidth/2)\n\t\t\t})\n\t\td3.select(\".contextlabelhelperrect\").attr(\"x\", function () {\n\t\treturn x0-3;\n\t\t//return ((divwidth/2)-(contextlabelwidth/2))-contextlabelhelperrectspace;\n\t\t})\n\t\t.attr(\"width\", function() {return contextlabelwidth+(2*contextlabelhelperrectspace);}).attr(\"fill\", \"white\")\n\n\t\n\n}", "static gsbhooks(data) {\n const chart = this.container;\n // create a d3-hierarchy from our form-json\n _graph_d3_styles_js__WEBPACK_IMPORTED_MODULE_3__[\"clearDefaults\"](this.svg); // clear default styles for svg export\n\n const root = d3__WEBPACK_IMPORTED_MODULE_0__[\"hierarchy\"](data, d => d.space)\n .sum(d => d.space ? 0 : 1);\n\n this.styleClass = 'basic';\n const compactReEntry = (this.compactChecked !== null) ? this.compactChecked : true;\n\n // set up design variables\n const design = _graph_d3_styles_js__WEBPACK_IMPORTED_MODULE_3__[\"boxmodel\"][this.styleClass];\n const {elemMargin, formMargin, formPadding, minFormSize, maxLineWidth, fontVar, fontConst, fontContext, labels} = {...design};\n const unclearPad = {hz: elemMargin.hz/2, vt: elemMargin.vt};\n const dataLabelPad = 4;\n\n // define boxmodel layout\n const layout = boxmodel_layout_for_d3__WEBPACK_IMPORTED_MODULE_1___default()()\n .vAlign('bottom')\n .edgeMargins(d => !(isContainer(d) && !d.parent.parent && d.parent.data.unmarked) )\n .isContainer(d => isContainer(d))\n .padding(d => {\n let p = {left: 0, right: 0, top: 0, bottom: 0};\n \n if (isContainer(d)) {\n p.left = p.right = formPadding.hz;\n if (d.data.type === 'reEntry') {\n const text = d.data.reEven ? labels.reEven : labels.reOdd;\n const txtSz = Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"textSize\"])(text, fontContext.size, fontContext.family, fontContext.style);\n p.bottom = txtSz.height + elemMargin.vt/2;\n }\n }\n return p;\n })\n .margin(d => {\n let m = {left: 0, right: 0, top: 0, bottom: 0};\n \n if (isContainer(d)) {\n m.top = formMargin.top;\n m.right = formMargin.right;\n if (d.depth === 0) m.top = 0;\n if (d.data.reChild) {\n if (d.parent.children.length === 1) m.right = minFormSize.width;\n if (d.parent.data.lastOpen) m.top = 0;\n if (compactReEntry && d.parent.data.reChild) {\n if (!(d.children[0].data.type === 'reEntryPoint' && reParentLastOpen(d))) m.top = 0;\n }\n }\n }\n else if (d.data.type !== 'reEntryPoint') { // all other elements\n m.top = m.bottom = elemMargin.vt;\n m.left = m.right = elemMargin.hz;\n if (fontVar.style == 'italic') m.right += 1;\n\n if (d.data.type === 'unclear') {\n // m.bottom = (d.data.symbol.split('_').length > 1) ? -6 : 0;\n m.bottom = 0;\n }\n }\n else if (d.data.type === 'reEntryPoint') {\n m.right = formMargin.right;\n }\n \n return m;\n })\n .spanHeight(d => {\n let span = false;\n if (compactReEntry && d.data.reChild) {\n span = true;\n }\n return span;\n })\n .minContainerSize(d => {\n let w = minFormSize.width;\n let h = minFormSize.height;\n if (d.data.reChild) {\n if (d.children.length === 1 && d.children[0].data.type === 'reEntryPoint') {\n if (reParentLastOpen(d)) w = minFormSize.width/2;\n }\n }\n if (d.data.type === 'reEntry' && d.children.length <= 2 && d.children[0].data.type === 'reEntryPoint') {\n const text = d.data.reEven ? labels.reEven : labels.reOdd;\n let txtSz = Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"textSize\"])(text, fontContext.size, fontContext.family, fontContext.style);\n w = txtSz.width + dataLabelPad*2;\n w = w < minFormSize.width ? minFormSize.width : w;\n }\n return {width: w, height: h};\n })\n .maxLineWidth(d => {\n let w = maxLineWidth;\n return w;\n })\n .nodeSize(d => {\n let w = 0, h = 0;\n \n if (isText(d)) {\n let txtSz = undefined;\n switch (d.data.type) {\n case 'var':\n txtSz = Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"textSize\"])(d.data.symbol, fontVar.size, fontVar.family, fontVar.style);\n w = txtSz.width;\n h = txtSz.height * 0.7;\n break;\n case 'unclear':\n txtSz = Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"textSize\"])(d.data.symbol, fontVar.size, fontVar.family, 'normal');\n w = txtSz.width;\n h = txtSz.height * 0.7;\n\n w += skewDiff((h + unclearPad.vt*2))*2 + unclearPad.hz*2;\n h += unclearPad.vt*2;\n break;\n case 'const':\n txtSz = Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"textSize\"])(d.data.value, fontConst.size, fontConst.family, fontConst.style);\n w = txtSz.width;\n h = txtSz.height * 0.7;\n break;\n }\n \n }\n return {width: w, height: h};\n });\n\n const boxmodel = layout(root);\n\n // setup basic chart structure\n chart.attr('class', 'graph-boxmodel')\n .attr('transform', `translate(${this.padding.left},${this.padding.top})`);\n\n// chart.attr('width','100%').attr('height','100%').style('fill','rgba(255,0,0,.2)');\n\n const nodes = chart.selectAll('.node')\n .data(boxmodel.descendants())\n .enter().append('g')\n .classed('node', true)\n .attr('transform', d => `translate(${d.x0},${d.y0})`);\n\n // generate node partition selections\n const nodePartitions = resolveNodes(boxmodel, nodes);\n const [leaves, sets, forms, reEntries, reChilds, rePoints, elements, vars, consts, unclear] = nodePartitions;\n\n // define detailled structure/logic\n\n forms.append('polyline') //.filter(d => !d.data.unmarked).append('polyline')\n .attr('points', d => `0,0 ${d.x1-d.x0},0 ${d.x1-d.x0},${d.y1-d.y0}`);\n reEntries.append('polyline')\n .attr('points', d => {\n const w = d.x1-d.x0;\n const h = d.y1-d.y0;\n const reH = minFormSize.height;\n return `0,0 ${w},0 ${w},${h} 0,${h} 0,${h-reH}`;\n })\n .filter(d => d.data.lastOpen)\n .attr('points', d => {\n const w = d.x1-d.x0;\n const h = d.y1-d.y0;\n const reH = minFormSize.height;\n return `${w},${h-reH} ${w},${h} 0,${h} 0,${h-reH}`;\n });\n reEntries.filter(d => d.data.reEven !== 'undefined').append('text')\n .classed('label', true)\n .attr('transform', d => `translate(0,${d.y1-d.y0})`)\n .attr('x',d => dataLabelPad )\n .attr('y',d => -5 )\n .text(d => d.data.reEven ? labels.reEven : labels.reOdd);\n\n const unclTxtSize = d => Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"textSize\"])(d.data.symbol, fontVar.size, fontVar.family, 'normal');\n const unclDiff = d => skewDiff( (unclTxtSize(d).height*0.7 + unclearPad.vt*2) );\n\n unclear.append('rect')\n .classed('unclearMark',true)\n .attr('transform', d => `skewX(-30) translate(${unclDiff(d)},${0})`)\n .attr('width', d => ((d.x1-d.x0) - unclDiff(d) ))\n .attr('height', d => (d.y1-d.y0) )\n unclear.append('text')\n .attr('x',d => unclDiff(d) + unclearPad.hz )\n .attr('y',d => (d.y1-d.y0) -unclearPad.vt - ((d.data.symbol.split('_').length > 1) ? 6 : 0) )\n .call(Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"textSubscript\"])(d => d.data.symbol));\n \n consts.append('text')\n .attr('y',d => (d.y1-d.y0) )\n .text(d => d.data.value);\n vars.append('text')\n .attr('y',d => (d.y1-d.y0) )\n .call(Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"textSubscript\"])(d => d.data.symbol));\n\n\n // apply all style-related attributes to the selections\n design.applyNodeStyles(nodes, nodePartitions, chart);\n\n Object(_common_d3_helper__WEBPACK_IMPORTED_MODULE_2__[\"fitChart\"])(chart, this.padding);\n\n // debugging:\n // [this.root, this.layout, this.chart, this.boxmodel, this.design] = \n // [root, layout, chart, boxmodel, design];\n }", "prepare() {\n super.prepare()\n }", "function newFieldNeuralStructure(){\n var structureField = select('#neural-structure-field-value');\n var bias = select('#checkbox-1');\n\n var text = structureField.value();\n numbers = textToNumbers(text);\n\n if(numbers.length>=2){ //Minimum les entrées et sorties\n displayNewNetwork(numbers, bias.checked());\n }else console.log(\"! : il faut minimum 2 chiffres (>0)\");\n}", "function generateRefencedData() {\n data_array = ['BsIfMajor', 'BsIfMedium', 'BsIfMinor', 'BsIfAnicuts', 'BsRciaMajorTanks', 'BsRciaMediumTanks', 'BsRciaMinorTanks', 'BsRciaAnicuts', 'BsRciaOtherStructures', 'BsRciRiverEmbankmnt'];\n\n var dl_model1 = null;\n var dl_model2 = null;\n var dl_model3 = null;\n var dl_model4 = null;\n var dl_model5 = null;\n var dl_model6 = null;\n var dl_model7 = null;\n var dl_model8 = null;\n var dl_model9 = null;\n\n angular.forEach(data_array, function(value, key) {\n obj_array = $scope.bs_data[value];\n console.log('iri',obj_array);\n model_name = value;\n\n var particular_value_1 = null;\n var particular_value_2 = null;\n var particular_value_3 = null;\n var particular_value_4 = null;\n var particular_value_5 = null;\n var particular_value_6 = null;\n var particular_value_7 = null;\n var particular_value_8 = null;\n var particular_value_9 = null;\n\n if(model_name == 'BsRciaMajorTanks') {\n dl_model1 = 'DlMajorTanks';\n particular_value_1 = 'Total';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model1] = [];\n }\n if(model_name == 'BsRciaMediumTanks') {\n dl_model2 = 'DlMediumTanks';\n particular_value_2 = 'Total';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model2] = [];\n }\n if(model_name == 'BsRciaMinorTanks') {\n dl_model3 = 'DlMinorTanks';\n particular_value_3 = 'Total';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model3] = [];\n }\n if(model_name == 'BsRciaAnicuts') {\n dl_model4 = 'DlAnicuts';\n particular_value_4 = 'Total';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model4] = [];\n }\n if(model_name == 'BsRciaOtherStructures') {\n dl_model5 = 'DlOtherStructures';\n particular_value_5 = 'Total';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model5] = [];\n }\n\n if(model_name == 'BsIfMajor') {\n dl_model6 = 'DlLosMajorTanks';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model6] = [];\n }\n if(model_name == 'BsIfMedium') {\n dl_model7 = 'DlLosMediumTanks';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model7] = [];\n }\n if(model_name == 'BsIfMinor') {\n dl_model8 = 'DlLosMinorTanks';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model8] = [];\n }\n if(model_name == 'BsIfAnicuts') {\n dl_model9 = 'DlLosAnicuts';\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model9] = [];\n }\n\n var obj1 = {\n irrigation_assets : particular_value_1,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n var obj2 = {\n irrigation_assets : particular_value_2,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n var obj3 = {\n irrigation_assets : particular_value_3,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n var obj4 = {\n irrigation_assets : particular_value_4,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n var obj5 = {\n irrigation_assets : particular_value_5,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n\n angular.forEach(obj_array, function(value, key) {\n var obj1 = {\n irrigation_assets : value.fields.irrigation_facility,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n var obj2 = {\n irrigation_assets : value.fields.irrigation_facility,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n var obj3 = {\n irrigation_assets : value.fields.irrigation_facility,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n var obj4 = {\n irrigation_assets : value.fields.irrigation_facility,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n var obj5 = {\n irrigation_assets : value.fields.irrigation_facility,\n partially_damaged : null,\n totally_destroyed : null,\n damages : null,\n };\n\n var obj6 = {\n irrigation_assets : value.fields.irrigation_facility,\n high_operation_cost : null,\n other_unexpected_expenses : null,\n total_los : null,\n };\n var obj7 = {\n irrigation_assets : value.fields.irrigation_facility,\n high_operation_cost : null,\n other_unexpected_expenses : null,\n total_los : null,\n };\n var obj8 = {\n irrigation_assets : value.fields.irrigation_facility,\n high_operation_cost : null,\n other_unexpected_expenses : null,\n total_los : null,\n };\n var obj9 = {\n irrigation_assets : value.fields.irrigation_facility,\n high_operation_cost : null,\n other_unexpected_expenses : null,\n total_los : null,\n };\n\n if(model_name == 'BsRciaMajorTanks') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model1].push(obj1);\n }\n if(model_name == 'BsRciaMediumTanks') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model2].push(obj2);\n }\n if(model_name == 'BsRciaMinorTanks') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model3].push(obj3);\n }\n if(model_name == 'BsRciaAnicuts') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model4].push(obj4);\n }\n if(model_name == 'BsRciaOtherStructures') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model5].push(obj5);\n }\n\n if(model_name == 'BsIfMajor') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model6].push(obj6);\n }\n if(model_name == 'BsIfMedium') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model7].push(obj7);\n }\n if(model_name == 'BsIfMinor') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model8].push(obj8);\n }\n if(model_name == 'BsIfAnicuts') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model9].push(obj9);\n }\n });\n\n if(model_name == 'BsRciaMajorTanks') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model1].push(obj1);\n }\n if(model_name == 'BsRciaMediumTanks') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model2].push(obj2);\n }\n if(model_name == 'BsRciaMinorTanks') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model3].push(obj3);\n }\n if(model_name == 'BsRciaAnicuts') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model4].push(obj4);\n }\n if(model_name == 'BsRciaOtherStructures') {\n $scope.dlIrrigation.agri_irrigation.Table_3[dl_model5].push(obj5);\n }\n });\n }", "_refreshCostume () {\n if (this.costume) {\n this.width = this.costume.visibleWidth\n this.height = this.costume.visibleHeight\n }\n\n this.element ? this.element.update(this) : null\n }" ]
[ "0.5526384", "0.5486169", "0.5429024", "0.54123235", "0.5346472", "0.53269637", "0.5249486", "0.5236653", "0.5207239", "0.5203663", "0.5183295", "0.51811075", "0.5123563", "0.5122597", "0.51168984", "0.510657", "0.5106151", "0.5102037", "0.509806", "0.50856674", "0.50805694", "0.5075816", "0.5061969", "0.5045391", "0.5045391", "0.5045391", "0.5033882", "0.5026401", "0.50253123", "0.5024717", "0.5015852", "0.5009915", "0.5009431", "0.50077206", "0.5002538", "0.49682364", "0.49655053", "0.49602473", "0.49527872", "0.4942232", "0.49187705", "0.49168673", "0.491071", "0.4896777", "0.4896457", "0.48934042", "0.4883743", "0.48783082", "0.48683313", "0.48591906", "0.48529527", "0.48433194", "0.48411983", "0.48361894", "0.48315248", "0.48299244", "0.48275647", "0.48271692", "0.4826704", "0.48262417", "0.48187914", "0.48047814", "0.48015055", "0.47995615", "0.4795855", "0.47948983", "0.47929725", "0.47902787", "0.47849602", "0.4784811", "0.4782392", "0.47758842", "0.4775552", "0.4766397", "0.4763514", "0.47624654", "0.47553554", "0.47543788", "0.47534338", "0.47484753", "0.47449782", "0.47424388", "0.4741894", "0.4741894", "0.4741894", "0.47403446", "0.4739169", "0.47377318", "0.47370976", "0.4736543", "0.47237173", "0.47194555", "0.47174928", "0.47161987", "0.4713994", "0.4713127", "0.4712926", "0.470808", "0.47033727", "0.47004363", "0.4699332" ]
0.0
-1
Run axecore tests on each urlview combination
async run() { await Promise.all(this[QUEUE].map(this[TEST_PAGE])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run_all_tests(){\n\t$(\"#tests_list .section_title\").each(function(num,obj){\n\t\ttype=obj.id.substr(8);\n\t\trun_tests(type);\n\t});\n}", "function applicationsTests({ apiGET, apiPOST }) {}", "async function runTestOnAllHtmlUrls() {\n\tconst testUrls = [\n\t\t 'http://example.com',\n\t\t /*\n \t 'https://www.theguardian.com/environment/2016/aug/02/environment-climate-change-records-broken-international-report', // https://github.com/hypothesis/client/issues/73\n\t\t 'https://telegra.ph/whatsapp-backdoor-01-16', // https://github.com/hypothesis/client/issues/558\n\t\t 'https://dashboard.wikiedu.org/training/students/wikipedia-essentials/policies-and-guidelines-basic-overview', // https://github.com/hypothesis/product-backlog/issues/493\n\t\t 'https://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/',\n\t\t 'https://www.poetryfoundation.org/poems/50364/neutral-tones',\n\t\t 'https://hackernoon.com/why-native-app-developers-should-take-a-serious-look-at-flutter-e97361a1c073',\n\t\t 'https://lincolnmullen.com/projects/spatial-workshop/literacy.html',\n\t\t 'https://www.greenpeace.org/usa/reports/click-clean-virginia/',\n\t\t 'https://www.fastcompany.com/28905/brand-called-you',\n\t\t 'https://www.forbes.com/sites/danschawbel/2011/12/21/reviving-work-ethic-in-america/#67ab8458449a',\n\t\t 'http://mmcr.education/courses/pls206-01-W19/readings/marbury_v_madison.html',\n\t\t 'https://www.si.com/vault/2002/03/25/320766/the-real-new-york-giants',\n\t\t 'https://www.nytimes.com/2018/12/08/opinion/college-gpa-career-success.html',\n\t\t 'https://www.dartmouth.edu/~milton/reading_room/pl/book_3/text.shtml',\n\t\t 'http://mikecosgrave.com/annotation/reclaiming-conversation-social-media/',\n\t\t 'https://english.writingpzimmer.net/about/snow-day-billy-collins/',\n\t\t 'https://www.facinghistory.org/resource-library/video/day-learning-2013-binna-kandola-diffusing-bias',\n\t\t 'http://codylindley.com/frontenddevbooks/es2015enlightenment/'\n\t\t */\n\t]\n\tconst omitted = [\n // embeds client, cannot work. note: no highlights at libretexts, they are missing our css\t\t\n\t\t// 'https://human.libretexts.org/Bookshelves/Composition/Book%3A_Successful_College_Composition_(Crowther_et_al.)/3%3A_Rhetorical_Modes_of_Writing/3.1%3A_Narration', \n\t]\n\tlet results = {}\n\tfor (let testUrlIndex = 0; testUrlIndex < testUrls.length; testUrlIndex++) {\n\t\tlet testUrl = testUrls[testUrlIndex]\n\t\tlet result = await runHtmlTest(testUrl) \n\t\twriteResults(testUrlIndex, result, 'html', '0')\n\t\tresults[testUrl] = result\n\t}\n\twriteResults('all', results, 'html')\n}", "function _runTest (index, basename, html) {\n const tests = [\n // preamble page\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // tests titlePage option\n _testToc(root, basename, 'Welcome');\n t.is(root.find('#_footnoteref_3').length, 1);\n t.is(root.find('#_footnotedef_3').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // part I\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Part I');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap 1\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '1. First Chapter');\n t.is(root.find('#_footnoteref_4').length, 1);\n t.is(root.find('#_footnotedef_4').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // chap 2\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2. Second Chapter');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec1\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.1. Chap2. First Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.2. Chap2. Second Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-1 (depth:3)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.2.1. Chap2. Sec 2-1');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-1-1 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-1-1');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-1-2 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-1-2');\n t.is(root.find('#_footnoteref_4').length, 1);\n t.is(root.find('#_footnotedef_4').length, 1);\n t.is(root.find('a.footnote').length, 2); // multiply referred in Sec 2-1-2\n t.is(root.find('div.footnote').length, 1);\n },\n // chap2 sec2-2 (depth:3)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.2.2. Chap2. Sec 2-2');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-2-1 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-2-1');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-2-2 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-2-2');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-2-3 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-2-3<sup class=\"footnote\">[1]</sup>');\n t.is(root.find('#_footnoteref_1').length, 1);\n t.is(root.find('#_footnotedef_1').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // chap2 sec2-3 (depth:3)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.2.3. Chap2. Sec 2-3');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec3 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.3. Chap2. Third Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // part II\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Part II');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap 3 (depth:1)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3. Third Chapter<sup class=\"footnote\">[2]</sup>');\n t.is(root.find('#_footnoteref_2').length, 1);\n t.is(root.find('#_footnotedef_2').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // chap3 sec1 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3.1. Chap3. First Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap3 sec2 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3.2. Chap3. Second Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap3 sec3 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3.3. Chap3. Third Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n ];\n if (tests[index])\n tests[index](basename, html);\n }", "function _runTest (index, basename, html) {\n const tests = [\n // preamble page\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Titlepage');\n t.is(root.find('#_footnoteref_3').length, 1);\n t.is(root.find('#_footnotedef_3').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // part I\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Part I');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap 1\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '1. First Chapter');\n t.is(root.find('#_footnoteref_4').length, 1);\n t.is(root.find('#_footnotedef_4').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // chap 2\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2. Second Chapter');\n t.is(root.find('#_footnoteref_1').length, 1);\n t.is(root.find('#_footnotedef_1').length, 1);\n t.is(root.find('#_footnoteref_4').length, 1);\n t.is(root.find('#_footnotedef_4').length, 1);\n t.is(root.find('a.footnote').length, 3); // multiply referred in Sec 2-1-2\n t.is(root.find('div.footnote').length, 2);\n },\n // part II\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Part II');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap 3\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3. Third Chapter<sup class=\"footnote\">[2]</sup>');\n t.is(root.find('#_footnoteref_2').length, 1);\n t.is(root.find('#_footnotedef_2').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n ];\n if (tests[index])\n tests[index](basename, html);\n }", "function run(__index) {\n __index++;\n\n var obj = tests[__index];\n // All data in the query gets the strings replaced which are placed into the config.json in the root directory.\n obj.data.data = jsonTools.parseConfigIntoJSONObject(config, obj.data.data);\n // Same for the REST API Link\n var parsed_request_url = jsonTools.parseConfigIntoTemplateString(config, obj.data.path);\n\n // Logging the Method and URL after Parse here\n console.log(obj.data.method + ' ' + parsed_request_url);\n\n fetch(parsed_request_url, {\n method: obj.data.method,\n body: JSON.stringify(obj.data.data),\n headers: { 'Content-Type': 'application/json' }\n })\n .then((result) => result.json())\n .then((json) => {\n console.log('\\n ' + JSON.stringify(json));\n console.log(' As expected? ' + (JSON.stringify(json)==JSON.stringify(obj.data.expected)) + '\\n');\n run(__index);\n })\n .catch((err) => {\n console.log('\\n' + ' Response was empty(probably, todo: more error handling)');\n console.log(' As expected? ' + (null==obj.data.expected) + '\\n');\n });\n}", "function performAllUnitTests()\n{\n utCount = 0;\n for(var i = 1; i <= 2000; i++)\n {\n var id = \"unit-test-anchor-\" + i;\n var elem = document.getElementById(id);\n if(elem && elem.href)\n {\n utCount += 1;\n setTimeout(elem.href, (utCount * 1000));\n }\n }\n}", "function runAllTests() {\n var baseSpreadsheetTests = new BaseSpreadsheetTests();\n baseSpreadsheetTests.run();\n\n var masteryTrackerTests = new MasteryTrackerTests();\n masteryTrackerTests.run();\n\n var masteryDataTests = new MasteryDataTests();\n masteryDataTests.run();\n}", "async testNavigateToOtherPages(index) {\n await this.homePage.navigateToHomePage()\n await this.homePage.navigateToGivenPage(index)\n }", "function run_selectedTests() {\r\n\tadd_UnSelectedTestsToShould_ignore();\r\n\tvar suite = framework.createTestSuite(framework.testcaseArray[\"suiteName\"]);\r\n\tfor (var tc in framework.testcaseArray) {\r\n\t\tsuite.add(framework.testcaseArray[tc]);\r\n\t}\r\n\tframework.runSuite(suite);\r\n\t//enable the four display button\r\n\tdocument.getElementById('btnXML').style.display = 'inline';\r\n\tdocument.getElementById('btnTAP').style.display = 'inline';\r\n\tdocument.getElementById('btnJUnitXML').style.display = 'inline';\r\n\tdocument.getElementById('btnJSON').style.display = 'inline';\r\n\tdocument.getElementById('btnSendReport').style.display = 'inline';\r\n}", "function _run () {\n // Set up Guideline-specific behaviors.\n var noop = function () {};\n for (var guideline in quail.guidelines) {\n if (quail.guidelines[guideline] && typeof quail.guidelines[guideline].setup === 'function') {\n quail.guidelines[guideline].setup(quail.tests, this, {\n successCriteriaEvaluated: options.successCriteriaEvaluated || noop\n });\n }\n }\n\n // Invoke all the registered tests.\n quail.tests.run({\n preFilter: options.preFilter || function () {},\n caseResolve: options.caseResolve || function () {},\n testComplete: options.testComplete || function () {},\n testCollectionComplete: options.testCollectionComplete || function () {},\n complete: options.complete || function () {}\n });\n }", "testMainPage(mainPageApiUrl) {\n describe ('Main page', () => {\n it('Main page content', (done) => {\n chai.request(this._app)\n .get(mainPageApiUrl)\n .end((err, res) => {\n res.should.have.status(200);\n done();\n });\n });\n });\n }", "function testAllTests() {\n testExtremal();\n testDifference();\n testSpearman();\n testSerial()\n}", "function loadAllUnitTests(urls)\n{\n let promises = []\n for(let i in urls)\n {\n let def = new $.Deferred();\n promises.push(def.promise());\n\n var link = document.createElement(\"script\");\n link.setAttribute(\"type\", \"text/javascript\");\n link.setAttribute(\"src\", urls[i]+'?r='+Math.random());\n\n link.onload = function(def){\n return function(){\n def.resolve();\n }\n }(def)\n document.getElementsByTagName(\"head\")[0].appendChild(link);\n\n break;\n }\n\n $.when.apply($, promises).done(() => {\n //injectQunit()\n\n if(urls.length == 1)\n {\n return injectQunit()\n }\n urls.splice(0, 1)\n loadAllUnitTests(urls)\n })\n}", "function runTests() {\n\ttestBeepBoop();\n\ttestGetDigits();\n}", "run_test() { start_tests(); }", "function test() {\n runTests0();\n runTests1(); \n return true;\n}", "function executeTests() {\n\n\tconsole.log('Executing tests...');\n\n\tsetupOutput();\n\n\tfor (var testFile of tests) {\n\t\tconsole.log('Running test %s', testFile);\n\n\t\trequire(testFile);\n\t}\n}", "function test(url) {\n // begin switch statement to elimintate exclusions\n switch (true) {\t\n // begin case statement to test for exclusions\n case links[i].host !== location.host:\n // console.log(\"Matched a url that is an external link\");\n totalLinksExternal = totalLinksExternal + 1\n totalLinksExcluded = totalLinksExcluded + 1\n linkInfoExternal = linkInfoExternal + '<span class=\"external\">' + totalLinksExternal.toString() + ') <strong>External</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoExcluded = linkInfoExcluded + '<span class=\"external\">' + totalLinksExcluded.toString() + ') <strong>External</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"external\" style=\"background-color:plum\">' + (i+1).toString() + ') <strong>External</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n break;\n case /layouts/gi.test(url):\n // console.log(\"Matched a url that contains 'layouts'\");\n totalLinksExcluded = totalLinksExcluded + 1\n linkInfoExcluded = linkInfoExcluded + '<span class=\"excluded\">' + totalLinksExcluded.toString() + ') <strong>Excluded</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"excluded\" style=\"background-color:yellow\">' + (i+1).toString() + ') <strong>Excluded</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n break;\n case /file/gi.test(url):\n // console.log(\"Matched a url that contains 'file'\");\n totalLinksExcluded = totalLinksExcluded + 1\n linkInfoExcluded = linkInfoExcluded + '<span class=\"excluded\">' + totalLinksExcluded.toString() + ') <strong>Excluded</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"excluded\" style=\"background-color:yellow\">' + (i+1).toString() + ') <strong>Excluded</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n break;\n default:\n // console.log(\"this link is okay to test\");\n // console.log(url);\n \n // the next line opens the link and gets the status of the http request. Comment out when testing or working on visual design\n var http = new XMLHttpRequest();\n http.open('HEAD', url, false);\n \n // begin try catch block to test for error on send\n try {\n http.send();\n var response = http.status;\n console.log(response);\n \n if (http.status == 200){\n // console.log(\"found a good link\");\n // console.log(response);\n totalLinksGood = totalLinksGood + 1\n linkInfoGood = linkInfoGood + '<span class=\"good\">' + totalLinksGood.toString() + ') <strong>Good</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"good\" style=\"background-color:LightGreen\">' + (i+1).toString() + ') <strong>Good</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n var linksTested = parseInt(linksTested);\n var linksTested = linksTested++;\n \n } else if (http.status == 404) {\n // console.log(\"found a broken link\");\n // console.log(response);\n totalLinksBad = totalLinksBad + 1\n linkInfoBad = linkInfoBad + '<span class=\"broken\">' + totalLinksBad.toString() + ') <strong>Broken</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n linkInfoTotal = linkInfoTotal + '<span class=\"broken\" style=\"background-color:LightCoral\">' + (i+1).toString() + ') <strong>Broken</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n var linksTested = parseInt(linksTested);\n var linksTested = linksTested++;\n \n } else {\n \n // console.log(\"something else is happening here\");\n // console.log(response);\n linkInfoTotal = linkInfoTotal + '<span class=\"something else\" style=\"background-color:LightBlue\">' + (i+1).toString() + ') <strong>Something Else</strong> ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n var linksTested = parseInt(linksTested);\n var linksTested = linksTested++;\n \n // end if statement to test http status\n }\n \n } catch (e) {\n \n console.log(e);\n // end try catch block to test for error on send\n // linkInfoTotal = linkInfoTotal + '<span class=\"something else\">' + i.toString() + ') ' + links[i].href + ' = ' + linkAnchors[i].text + '</span><br />'\n // var linksTested = parseInt(linksTested);\n // var linksTested = linksTested++;\n \n // end try catch block to test for error on send\n }\n \n break;\n // end case statement to test for exclusions\n \n // end switch statement to elimintate exclusions\n }\n // end enclosing function to test url to see if it contains some restricted locations, then open up a http request to the page and see if the page exists\n }", "function viewCall(){\n viewMatch = false;\n \n hashStr = location.hash.substr(1);\n if(hashStr.indexOf(\"/\") === -1 || hashStr == \"/\"){\n hashStr = \"/mash\";\n location.hash = \"/mash\";\n }\n\n for(var prop in path2func){\n var patt = new RegExp(prop, \"i\");\n //var patt = /\\/tbl\\/(.*)/i;\n var paras = hashStr.match(patt);\n \n if(paras != null ){\n viewMatch = true;\n paras.shift();\n path2func[prop](paras);\n }\n }\n \n if(viewMatch == false){\n alert(\"view not found\");\n }\n}", "function test_request_filter_on_request_page() {}", "testArtists() {\n this.artistTest.startAllTests();\n }", "function testView( Lib, args ) {\n\n return makeTest(Lib, args, ( couch, nock, deferred ) => {\n\n nock.get('/test/_design/d/_view/v')\n .reply(200, {\n rows: [ { id: 1, key: [ 2, 3, ], value: null, }, ],\n });\n\n couch.view('d', 'v')\n .then(deferred.resolve.bind(deferred));\n });\n }", "test() {\n return this.urlFromRequest().href.match(metadataUrlRegex);\n }", "function setup () {\n app.set('visitHome', visitHome)\n app.set('visitConnect', visitConnect)\n app.set('visitGame', visitGame)\n }", "function testSwitcher(count) {\r\n if (count < selectedTestList.length) {\r\n try {\r\n eval(selectedTestList[count] + \"()\");\r\n } catch(err) {\r\n console.log(\"Error while eval function \" + selectedTestList[count], err);\r\n }\r\n } else {\r\n done();\r\n }\r\n}", "test(urlsToGet, started, updated) {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n _this.createFolder();\n\n let htmlRepository = new _HtmlRepository.default(_this.args.getProjectPath());\n let urls = urlsToGet.filter(url => {\n return !_fs.default.existsSync(_path.default.join(_this.folder, url.name + '.json'));\n }).filter(url => {\n return !url.url.endsWith('.pdf');\n }).filter(url => {\n return url.errorCount < 3;\n });\n let progress = new _Progress.default(null, urls.length);\n started(progress);\n\n for (let url of urls) {\n let scanLocation = htmlRepository.file(url);\n\n if (_this.args.remote) {\n let fragment = url.fragment;\n scanLocation = url.url + (fragment ? fragment : '');\n }\n\n _this.currentUrl = url;\n const results = yield (0, _pa11y.default)(scanLocation, _this.option.a11y);\n\n const jsonFile = _path.default.join(_this.folder, url.name + '.json');\n\n yield _fs.default.writeFileSync(jsonFile, JSON.stringify(results));\n url.tested = true;\n progress.update(url);\n updated(progress);\n }\n\n return new _Progress.default(null, urls.length);\n })();\n }", "function loadTests(testJson){\n\n var baseUrl = testJson.config.baseUrl\n , checks = testJson.checks\n , path\n , k\n , i\n , asserts\n , assertArr\n , testArr = []\n , url\n ;\n\n if ( checks.length < 1 ) {\n console.error(\"Fatal : No checks found\");\n process.exit(1);\n }\n\n\n var synchForLoop = function(k) {\n\n if (k < checks.length ) {\n asserts = checks[k].asserts;\n assertArr = [];\n for (i = 0; i < asserts.length; i++) {\n assertArr.push(new cao(asserts[i].action, asserts[i].locator, asserts[i].value))\n }\n\n\n url = baseUrl + checks[k].path;\n\n console.log(url);\n\n request(url, function (error, response, body) {\n if (!error) {\n testArr.push(new cto(body,assertArr))\n k = k + 1;\n synchForLoop(k)\n } else {\n //console.error(\"Response Code :\" + response.statusCode)\n console.error(\"Error :\" + error)\n }\n })\n } else {\n runTests(testArr);\n }\n }\n\n synchForLoop(0);\n\n\n}", "function run_tests(type){\n\t$(\"#tests_\"+type+\"s tr\").each(function(num,obj){\n\t\tid=obj.id.substr(5);\n\t\tname = $(\"#\"+obj.id+\" .test_name\").html();\n\t\tname = name.substr(0,name.length);\n\t\trun_test(id,type,name);\n\t});\n}", "viewAllIterations (baseUrl,username,spacename){\n browser.get(baseUrl + username + \"/\" + spacename +\"/iterations\");\n }", "testAlbums() {\n this.albumTest.startAllTests();\n }", "function RunTests() {\n var storeIds = [175, 42, 0, 9];\n var transactionIds = [9675, 23, 123, 7];\n\n storeIds.forEach(function(storeId) {\n transactionIds.forEach(function(transactionId) {\n var shortCode = generateShortCode(storeId, transactionId);\n var decodeResult = decodeShortCode(shortCode);\n $(\"#test-results\").append(\n \"<div>\" + storeId + \" - \" + transactionId + \": \" + shortCode + \"</div>\"\n );\n AddTestResult(\"Length <= 9\", shortCode.length <= 9);\n AddTestResult(\"Is String\", typeof shortCode === \"string\");\n AddTestResult(\"Is Today\", IsToday(decodeResult.shopDate));\n AddTestResult(\"StoreId\", storeId === decodeResult.storeId);\n AddTestResult(\"TransId\", transactionId === decodeResult.transactionId);\n });\n });\n}", "function test_case(err, response) {\n\n\tif (err) {\n\t\tconsole.error(err);\n\t} else {\n assert.equal(response.headers['Content-Type'], 'text/json', 'content type is not text/json');\n assert.equal(response.statusCode, 200, 'status code must be 200');\n\n for (key in response.results) {\n kw = response.results[key];\n // at least 6 results\n assert.isAtLeast(kw.results.length, 6, 'results must have at least 6 links');\n assert.equal(kw.no_results, false, 'no results should be false');\n assert.typeOf(kw.num_results, 'string', 'num_results must be a string');\n assert.isAtLeast(kw.num_results.length, 5, 'num_results should be a string of at least 5 chars');\n assert.typeOf(Date.parse(kw.time), 'number', 'time should be a valid date');\n\n for (let res of kw.results) {\n assert.isOk(res.link, 'link must be ok');\n assert.typeOf(res.link, 'string', 'link must be string');\n assert.isAtLeast(res.link.length, 5, 'link must have at least 5 chars');\n\n assert.isOk(res.title, 'title must be ok');\n assert.typeOf(res.title, 'string', 'title must be string');\n assert.isAtLeast(res.title.length, 10, 'title must have at least 10 chars');\n\n assert.isOk(res.snippet, 'snippet must be ok');\n assert.typeOf(res.snippet, 'string', 'snippet must be string');\n assert.isAtLeast(res.snippet.length, 10, 'snippet must have at least 10 chars');\n }\n }\n\t}\n}", "multiCheckGetUrl(expected, responses) {\n\t\tthis.get = (url, success, error) => {\n\t\t\tthis.checkPath(expected[this.requests], url);\n\t\t\tsuccess(responses[this.requests++]);\n\t\t}\n\t}", "function test() {\n console.log('TEST SUITE');\n for(let i=0; i < testFuncs.length; i++) {\n let test = testFuncs[i];\n try {\n test();\n console.log('(' + i + ')' + test.name + ': PASS')\n } catch(e) {\n console.log('(' + i + ')' + test.name + ': FAIL');\n console.log(e);\n }\n }\n}", "function runTests(t, optimizely)\n{\n // prepare env\n optimizely.setOptimizely(optimizelyCode);\n\n // planning tests\n t.plan(7);\n\n // check that test line doesn't exists in teh original html\n t.equal(originalHtml.indexOf('Experiment: Text Change'), -1);\n\n // run the thing\n optimizely(req, originalHtml, function(err, html, extra)\n {\n t.equal(err, null);\n // check updated content\n t.inequal(html.indexOf('Experiment: Text Change'), -1);\n\n // check extras\n t.inequal(extra.images, null);\n t.equal(extra.images.length, 2);\n\n t.inequal(extra.cookies, null);\n t.inequal(extra.cookies.getCookieHeader().length, 0);\n });\n\n}", "init() {\n this.testMainPage('/api/v1');\n\n this.artistTest = new ArtistTest(this._app, '/api/v1/artists');\n this.testArtists();\n\n this.albumTest = new AlbumTest(this._app, '/api/v1/albums', new Artist(this.artistTest.getArtistContent()));\n this.testAlbums();\n }", "function indexTests() {\n let startTestNum = startGameTests(); //testing the startGame function\n let callUnoTestNum = callUnoTests(); //testing the callUno function\n let cheatTestNum = cheatTests();\n console.log(\"\\n$ * * * * All tests for index.js * * * *\");\n console.log(\n \"$ Total tests for start() - 3. Passed: \" +\n startTestNum +\n \". Failed: \" +\n (3 - startTestNum)\n );\n console.log(\n \"$ Total tests for callUno() - 2. Passed: \" +\n callUnoTestNum +\n \". Failed: \" +\n (2 - callUnoTestNum)\n );\n console.log(\n \"$ Total tests for all cheats - 4. Passed: \" +\n cheatTestNum +\n \". Failed: \" +\n (4 - cheatTestNum)\n );\n console.log(\"\\n$ * * * * End tests for index.js * * * *\");\n return startTestNum + callUnoTestNum + cheatTestNum;\n}", "function renderTest() {\n\t loadTestData(renderPage);\n\t}", "function TestRouter(rules) {\n var route = this.route = function(req, scope) {\n var qs = req.query_string;\n var segs = req.path_info.split(\"/\");\n segs.shift();\n\n // only handle /test URLs\n if (segs.shift() !== \"test\") {\n return false;\n }\n\n var test_path = \"//test\" + codebase + \"/\" + segs.join(\"/\") + (qs ? \"?\" + qs : \"\");\n var test_labels = {};\n for (var label in rules.labels) {\n test_labels[\"label/\" + label] = rules.labels[label];\n }\n route_path(test_path, true, null, {\"mounts\": test_labels});\n };\n}", "function runTests (port, build){\n\n describe('build tests', function() {\n this.timeout(20000);\n\n build();\n\n var browser = new Browser();\n\n before(function(d) {\n browser.visit('http://localhost:' + port, d);\n });\n\n\n // layout\n it('should show layout hbs content', function() {\n browser.assert.hasText('.layout', '[defaultLayout-hbs-output]');\n });\n\n\n\n // page\n it('should show index page hbs content', function() {\n browser.assert.hasText('.page', '[indexPage-hbs-output]');\n });\n\n\n\n // partial\n it('should show partial hbs content', function() {\n browser.assert.hasText('.partial', '[partial-hbs-output]');\n });\n\n it('should show partial json content', function() {\n browser.assert.hasText('.partial', '[partial-json-output]');\n });\n\n\n\n // first\n it('should show first hbs content', function() {\n browser.assert.hasText('.first', '[first-hbs-output]');\n });\n\n it('should show first js content', function() {\n browser.assert.hasText('.first', '[first-js-output]');\n });\n\n it('should show first json content', function() {\n browser.assert.hasText('.first', '[first-json-output]');\n });\n\n\n\n // second\n it('should show second hbs content', function() {\n browser.assert.hasText('.second', '[second-hbs-output]');\n });\n\n it('should show second js content', function() {\n browser.assert.hasText('.second', '[second-js-output]');\n });\n\n it('should show second dependency1 js content', function() {\n browser.assert.hasText('.second', '[someDependency1-js-output]');\n });\n\n it('should show second dependency2 js content', function() {\n browser.assert.hasText('.second', '[someDependency2-js-output]');\n });\n\n\n\n var lymCssBrowser = new Browser();\n\n before(function(d) {\n lymCssBrowser.visit('http://localhost:' + port+ '/css/lym.css', d);\n });\n\n it('should show first-settings css', function() {\n lymCssBrowser.assert.hasText('body', '.first-setting{color:red;}',true);\n });\n\n it('should show first-mixin css', function() {\n lymCssBrowser.assert.hasText('body', '.first-mixins{color:red;}',true);\n });\n\n it('should show second-mixin css', function() {\n lymCssBrowser.assert.hasText('body', '.second-mixins{color:orange;}',true);\n });\n\n it('should show second css', function() {\n lymCssBrowser.assert.hasText('body', '.second{color:green;}',true);\n });\n\n\n var firstBundleCssBrowser = new Browser();\n\n before(function(d) {\n firstBundleCssBrowser.visit('http://localhost:' + port+ '/css/first-bundle.css', d);\n });\n\n it('should show first css', function() {\n firstBundleCssBrowser.assert.hasText('body', '.first{color:red;}',true);\n });\n });\n}", "function RunTests() {\n\n var storeIds = [175, 42, 0, 9]\n var transactionIds = [9675, 23, 123, 7]\n\n storeIds.forEach(function (storeId) {\n transactionIds.forEach(function (transactionId) {\n var shortCode = generateShortCode(storeId, transactionId);\n var decodeResult = decodeShortCode(shortCode);\n $(\"#test-results\").append(\"<div>\" + storeId + \" - \" + transactionId + \": \" + shortCode + \"</div>\");\n AddTestResult(\"Length <= 9\", shortCode.length <= 9);\n AddTestResult(\"Is String\", (typeof shortCode === 'string'));\n AddTestResult(\"Is Today\", IsToday(decodeResult.shopDate));\n AddTestResult(\"StoreId\", storeId === decodeResult.storeId);\n AddTestResult(\"TransId\", transactionId === decodeResult.transactionId);\n })\n })\n}", "function run_tests(showbanner)\n{\n\tDEBUG = true;\n\tlog.redirect(log.CONSOLE);\n\tlog.init();\n\t\n\tvar rootcon = new Console();\n\tneuro_addKeyPressListener(rootcon.keyListener);\n\tneuro_addKeyUpListener(rootcon.keyUpListener);\n\tneuro_addKeyDownListener(rootcon.keyDownListener);\n\t\n\tlog.info(\"JU Test thinks you are running: \" + SysBrowser.getGuessDisplay());\n\t//log.info(new SysBrowser().report(true));\n\t\n\tif(showbanner)\n\t\tju_show_banner();\n\t\n\tresultsdiv = document.getElementById(\"testresults\");\n\t\n\t//for(i in this)\n\tfor(i in Tests)\n\t{\n\t\t//if it looks like a test function\n\t\tvar arry = i.toString().match(/^test_/);\n\t\tif(arry != null && arry.length > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\teval( \"ju_test_results.put('\"+i+\"',eval(Tests.\" + i+\"()))\" );\n\t\t\t}\n\t\t\tcatch(e)\n\t\t\t{\n\t\t\t\tju_test_results.put(i, JUAssert.fail() );\n\t\t\t\tlog.error(e);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tju_display_results();\n}", "function runNext() {\n var test = tests[at++];\n if (test) {\n setTimeout( function() {\n compare(test.func,\n window[test.func],\n window[test.func + \"_backported\"],\n test.driver);\n runNext();\n }, 20);\n }\n }", "function executeHTests(){\n\t\n\tconsole.log(\"Hotel Tests:\");\n\ttestHSelectOption(1, 500);\n\ttestHSelectOption(2, 200);\n\ttestHSelectOption(3, 700);\n\ttestHSelectOption(4, 300);\n\ttestHSelectOption(5, 100);\n\ttestHSelectOption(6, 400);\n\ttestHSelectOption(7, 70);\n\ttestHSelectOption(8, 900);\n\ttestHSelectOption(9, 250);\n\ttestHSelectOption(10, 80);\n\tconsole.log(\"Should fail:\")\n\ttestHSelectOption(10, 800);\n\n\n}", "function testViewDocs( Lib, args ) {\n\n return makeTest(Lib, args, ( couch, nock, deferred ) => {\n\n nock.get('/test/_design/d/_view/v?reduce=false&include_docs=true')\n .reply(200, {\n rows: [ { id: 1, key: [ 2, 3, ], doc: { _id: 8, }, }, ],\n });\n\n couch.viewDocs('d', 'v')\n .then(deferred.resolve.bind(deferred), ( err ) => console.log(err));\n });\n }", "function assignmentsTests({ apiGET, apiPOST }) {\n it.todo(\"get assignments for session\");\n it.todo(\"get assignments for position\");\n it.todo(\"create and delete assignment for position\");\n it.todo(\"update assignment dates/note/offer_override_pdf\");\n}", "function RUN_ALL_TESTS() {\n console.log('> itShouldGetConnections');\n getConnections();\n console.log('> itShouldGetSelf'); // Requires the scope userinfo.profile\n getSelf();\n console.log('> itShouldGetAccount');\n getAccount('me');\n}", "function startAllTests(){ \n testGetObjectFromArrays();\n testNormalizeHeader();\n testFillInTemplateFromObject();\n testIsCellEmpty();\n testIsAlnum();\n testIsDigit();\n}", "function bindExamples() {\n $('#l-examples > li > a').click(function(evt) {\n var elId = $(this)[0].id;\n // find elID from exs.id\n // load corresponding url\n for(var i = 0, l = exs.length; i < l; i++) {\n if (exs[i].id == elId) {\n loadExample(exs[i].url);\n return;\n }\n }\n // switch (elId) {\n // case 'a-menu-ex-default':\n // loadExample('../examples/hellowaax.html');\n // break;\n // case 'a-menu-ex-thx':\n // loadExample('../examples/waax-thx.html');\n // break;\n // case 'a-menu-ex-rezobass':\n // loadExample('../examples/rezobass.html');\n // break;\n // case 'a-menu-ex-samplr':\n // loadExample('../examples/samplr.html');\n // break;\n // case 'a-menu-ex-visualizer':\n // loadExample('../examples/visualizer.html');\n // break;\n // case 'a-menu-ex-devmode':\n // loadExample('../examples/devmode.html');\n // break;\n // case 'a-menu-ex-uimanager':\n // loadExample('../examples/uimanager.html');\n // break;\n // case 'a-menu-ex-itrain':\n // loadExample('../examples/take-i-train.html');\n // break;\n // }\n });\n }", "function test_candu_collection_tab() {}", "function testFunctions() {\n loadSelectedTests(fileSystemTests, selectedTests, 'FileSystem');\n }", "function startEndpointTests() {\n\tQUnit.test('GET People - endpoint - no query', function(assert) {\n\t\tvar done = assert.async();\n\t\to('People').get(function(data) {\n\t\t\tassert.ok(data.length >= 0, printResult(this,data));\n\t\t\tdone();\n\t\t}, function(e) { \n\t\t\tassert.ok(e === 200, printResult(this, e));\n\t\t\tdone()\n\t\t});\n\t});\n\n\tQUnit.test('GET People - endpoint - .top(1)', function(assert) {\n\t\tvar done = assert.async();\n\t\to('People').top(1).get(function(data) {\n\t\t\tassert.ok(data.length >= 0, printResult(this,data));\n\t\t\tdone();\n\t\t}, function(e) { \n\t\t\tassert.ok(e === 200, printResult(this, e));\n\t\t\tdone()\n\t\t});\n\t});\n\n\tQUnit.test('GET People(\\''+testEntity.UserName+'\\') - endpoint - no query', function(assert) {\n\t\tvar done = assert.async();\n\t\to('People(\\''+testEntity.UserName+'\\')').get(function(data) {\n\t\t\tassert.ok(data.UserName === testEntity.UserName, printResult(this,data));\n\t\t\tdone();\n\t\t}, function(e) { \n\t\t\tassert.ok(e === 200, printResult(this, e));\n\t\t\tdone()\n\t\t});\n\t});\n\n\tQUnit.test('GET People - endpoint - query: .take(5) and .skip(2)', function(assert) {\n\t\tvar done = assert.async();\n\t\to('People').take(5).skip(2).get(function(data) {\n\t\t\tassert.ok(data.length >= 0, printResult(this,data));\n\t\t\tdone();\n\t\t}, function(e) { \n\t\t\tassert.ok(e === 200, printResult(this, e));\n\t\t\tdone()\n\t\t});\n\t});\n\n\tQUnit.test('GET People - endpoint - query: .take(5) and .expand(\"Trips\")', function(assert) {\n\t\tvar done = assert.async();\n\t\to('People').take(5).expand('Trips').get(function(data) {\n\t\t\tassert.ok(data.length >= 0 && (data[0] && data[0].Trips), printResult(this,data));\n\t\t\tdone();\n\t\t}, function(e) { \n\t\t\tassert.ok(e === 200, printResult(this, e));\n\t\t\tdone()\n\t\t});\n\t});\n\n\tQUnit.test('GET People(\\''+testEntity.UserName+'\\') with q.js promise - endpoint - no query', function(assert) {\n\t\tvar done = assert.async();\n\t\to('People(\\''+testEntity.UserName+'\\')').get().then(function(o) {\n\t\t\tassert.ok(o.data.UserName === testEntity.UserName, printResult(o,o.data));\n\t\t\tdone();\n\t\t}, function(e) { \n\t\t\tassert.ok(e === 200, printResult(this, e));\n\t\t\tdone()\n\t\t});\n\t});\n\n\tQUnit.test('GET People(\\''+testEntity.UserName+'\\') and Group with q.js promise all - endpoint - no query', function(assert) {\n\t\tvar done = assert.async();\n\t\tQ.all([\n\t\t\to('People(\\''+testEntity.UserName+'\\')').get(),\n\t\t\to('People?$filter=UserName eq \\'Yeah\\'')\n\t\t]).then(function(o) {\n\t\t\tassert.ok(o[0].data.UserName==testEntity.UserName, printResult(o[0],o[0].data));\n\t\t\tassert.ok(o[1].data.length >=0, printResult(o[1],o[1].data));\n\t\t\tdone();\n\t\t}).fail(function(err) {\n\t\t\tassert.ok(false, printResult(this, err));\n\t\t\tdone();\n\t\t});\n\t});\n\n\tQUnit.test('GET People(\\''+testEntity.UserName+'\\') and PATCH AAA People(\\''+testEntity.UserName+'\\'), change and save() it with q.js promise - endpoint - no query', function(assert) {\n\t\tvar done1 = assert.async();\n\t\tvar done2 = assert.async();\t\n\t\tvar name='Test_'+Math.random();\n\t\t\n\t\to('People(\\''+testEntity.UserName+'\\')').get().then(function(o) {\n\t\t\to.data.FirstName=name;\n\t\t\tassert.ok(o.data.UserName===testEntity.UserName, printResult(o,o.data));\n\t\t\tdone1();\n\t\t\treturn(o.save());\n\t\t}).then(function(o) {\n\t\t\tassert.ok(o.data.UserName === testEntity.UserName && o.data.FirstName===name, printResult(o,o.data));\n\t\t\tdone2();\n\t\t}).fail(function(err) {\n\t\t\tassert.ok(false, printResult(this, err));\n\t\t\tdone1();\n\t\t\tdone2();\n\t\t});\n\t});\n\t\n\tQUnit.test('GET People(\\''+testEntity.UserName+'\\') and PATCH People(2), change and save() it with q.js promise but provoke error - endpoint - no query', function(assert) {\n\t\tvar done1 = assert.async();\n\t\tvar done2 = assert.async();\t\n\t\tvar name='Test_'+Math.random();\n\t\t\n\t\to('People(\\''+testEntity.UserName+'\\')').get().then(function(o) {\n\t\t\tassert.ok(o.data.UserName===testEntity.UserName, printResult(o,o.data));\n\t\t\to.data.Gender = 1;\n\t\t\tdone1();\n\t\t\treturn(o.save());\n\t\t}).then(function(o) {\n\t\t\t//not reachable because of error\n\t\t}).fail(function(err) {\n\t\t\tassert.ok(err, 'Passed! Error as expected.');\n\t\t\tdone2();\n\t\t});\n\t});\n\n\tQUnit.test('PATCH People(\\''+testEntity.UserName+'\\') - endpoint - no query', function(assert) {\n\t\tvar done = assert.async();\n\t\tvar name='Test_'+Math.random();\n\t\to('People(\\''+testEntity.UserName+'\\')').patch({FirstName:name}).save(function(data) {\n\t\t\tassert.ok(data.length===0, printResult(this,data));\n\t\t\tdone();\n\t\t}, function(e) { \n\t\t\tassert.ok(e === 200, printResult(this, e));\n\t\t\tdone()\n\t\t});\n\t});\n\n\t//DELETES the test data, move it to the end of this file!\n\tQUnit.test('DELETE Products(\\''+testEntity.UserName+'\\') - endpoint - no query', function(assert) {\n\t\tvar done = assert.async();\n\t\tvar name='Test_'+Math.random();\n\t\to('People(\\''+testEntity.UserName+'\\')').delete().save(function(data) {\n\t\t\tassert.ok(data.length===0, printResult(this,data));\n\t\t\tdone();\t\t\t\n\t\t}, function(e) { \n\t\t\tassert.ok(e === 200, printResult(this, e));\n\t\t\tdone()\n\t\t});\n\t});\n}", "function run_all_scripts_data()\n\n{\n \n \n runDemo_test();\n runDemo_tiscali();\n runDemo_gnocca();\n \n// runDemo_test_events();\n// runDemo_test_events_2();\n// runDemo_tiscali_events ();\n}", "function retrieveUnitTests()\n{\n // get the manifest and status filter\n var manifest = getTestSuiteManifest();\n var status = getUnitTestStatusFilter();\n\n // note the test cases are loading\n document.getElementById('unit-tests').innerHTML = \"<span style=\\\"font-size: 150%; font-weight: bold; color: #f00\\\">Test Cases are Loading...</span>\";\n\n // send the HTTP request to the crazy ivan web service\n sendRequest('retrieve-tests?manifest=' + manifest +\n '&status=' + status, displayUnitTests)\n}", "async function runViewTest(testData, searchKeys) {\n // Prep\n log('1. Overdueness view', 'heading');\n log('Preparing database...');\n const db = await prepareTestDatabase(testData);\n await waitForIdle();\n log('Running test...');\n\n const reviewTime = new Date();\n\n // Run test\n const startTime = performance.now();\n await db.put({\n _id: `_design/overdueness`,\n views: {\n overdueness: {\n map: `function(doc) {\n if (\n !doc._id.startsWith('progress-') ||\n typeof doc.level !== 'number' ||\n typeof doc.due !== 'number'\n ) {\n return;\n }\n if (doc.level === 0) {\n // Unfortunately 'Infinity' doesn't seem to work here\n emit(Number.MAX_VALUE, {\n _id: 'card-' + doc._id.substr('progress-'.length),\n progress: {\n level: 0,\n due: doc.due,\n },\n });\n return;\n }\n\n const daysOverdue = (${reviewTime.getTime()} - doc.due) / ${MS_PER_DAY};\n const linearComponent = daysOverdue / doc.level;\n const expComponent = Math.exp(${EXP_FACTOR} * daysOverdue) - 1;\n const overdueValue = linearComponent + expComponent;\n emit(overdueValue, {\n _id: 'card-' + doc._id.substr('progress-'.length),\n progress: {\n level: doc.level,\n due: doc.due,\n }\n });\n }`,\n },\n },\n });\n await db.query('overdueness', { limit: 0 });\n const indexCreationTimeMs = performance.now() - startTime;\n\n const timeResults = [];\n let queryResult;\n for (let i = 0; i < 5; i++) {\n const runStartTime = performance.now();\n const result = await db.query('overdueness', {\n include_docs: true,\n descending: true,\n endkey: 0,\n });\n queryResult = result.rows.map(row => ({\n ...row.doc,\n progress: row.value.progress,\n }));\n timeResults.push(performance.now() - runStartTime);\n }\n const durationMs = performance.now() - startTime;\n\n // Clean up\n await db.destroy();\n\n log(`Index creation took ${indexCreationTimeMs}ms`);\n logResults(durationMs, timeResults);\n\n return queryResult;\n}", "function testQueryProcessingFunctions() {\n testEvalQueryShow();\n testEvalQueryTopK();\n testEvalQuerySliceCompare();\n\n testGetTable();\n\n testCallGcpToGetQueryResultShow();\n testCallGcpToGetQueryResultTopK(); \n testCallGcpToGetQueryResultSliceCompare();\n\n testCallGcpToGetQueryResultUsingJsonShow();\n testCallGcpToGetQueryResultUsingJsonTopK(); \n testCallGcpToGetQueryResultUsingJsonSliceCompare();\n}", "async runTests() {\n for (let file of this.testFiles) {\n console.log(chalk.gray(`--- ${file.shortName}`));\n const beforeEaches = [];\n\n global.render = render;//jsdom\n\n global.beforeEach = (fn) => {\n beforeEaches.push(fn)\n };\n global.it = async (desc, fn) => {\n // console.log(desc);\n beforeEaches.forEach(func => func());\n //to handle errors ocurred during our test we need to do try and catch to avoid the test to collapse\n try {\n await fn();\n console.log(chalk.green(`\\tOK - ${desc}`));\n } catch (err) {\n const message = err.message.replace(/\\n/g, '\\n\\t\\t');\n console.log(chalk.red(`\\tX - ${desc}`));\n console.log(chalk.red('\\t', message));// \\t is tab \n }\n\n };\n //to skip the typo in stopping test for running\n try {\n require(file.name);//when we require the file inside a func node will find it and execute the file here\n } catch (err) {\n console.log(chalk.red('X - Error Loading File'), file.name);\n console.log(chalk.red(err));\n }\n\n }\n }", "function testURLs(hwid, successCallback, i) {\n if (i == undefined) var i = 0;\n\n // Try to find a URL\n $.ajax({\n\t\t\tmethod: 'GET',\n\t\t\t// can't use data: b/c it is for query string params, and this is path\n\t\t\t// type param (i.e. no ?hwid=)\n\t\t\turl: datastore(i, hwid),\n\t\t\tdataType: 'json',\n\t\t\ttimeout: TIMEOUT*1000,\n\t\t\tsuccess: function (data) {\n\t\t // If any of these are true, the data is no good,\n\t\t // so we call this function again for the next datastore\n\t\t if (data == null || 'error' in data || !('urls' in data) || data.url == 'undefined') {\n\t\t \t//wtolog('problem with return data ' + i);\n\t\t\t\t\t// Call it again, Sam.\n\t\t\t\t\ttestURLs(hwid, successCallback, i + 1);\n\t\t\t\t\treturn;\n\t\t }\t\n\t\t successCallback();\n\t\t\t},\n\t\t\terror: function (r, status) {\n\t\t\t // try the next one\n\t\t\t //wtolog('error on URL test ' + i);\n\t\t\t testURLs(hwid, successCallback, i + 1);\n\t\t\t}\n });\n}", "function main() {\n // Setup Applitools\n let eyes = setup();\n\n // Set viewports\n const viewportLandscape = { width: 1920, height: 1200 };\n const viewportPortrait = { width: 600, height: 800 };\n \n // Execute Chrome driver tests\n browserDriver(eyes, Capabilities.chrome(), viewportLandscape, viewportPortrait);\n \n // Execute FireFox driver tests\n browserDriver(eyes, Capabilities.firefox(), viewportLandscape, viewportPortrait);\n}", "function testOpenTabs() {\n controller.open(TEST_DATA[0]);\n controller.waitForPageLoad();\n openTabWithUrl(TEST_DATA[1]);\n\n // Open the third tab and wait for session to be written to disk\n sessionstore.waitForSessionSaved(() => {\n openTabWithUrl(TEST_DATA[2]);\n });\n\n // Check for correct number of opened tabs\n assert.equal(tabBrowser.length, TEST_DATA.length,\n \"There are \" + TEST_DATA.length + \" opened tabs\");\n\n // Check if correct tabs have been opened\n TEST_DATA.forEach((aURL, aIndex) => {\n assert.ok(controller.tabs.getTabWindow(aIndex).location.toString() === aURL,\n \"Tab with URL '\" + aURL + \"' has been opened\");\n });\n}", "async runTests () {\n this.installBchApi()\n utils.log('bch-api dependencies installed.')\n\n await this.runUnitTests()\n\n await this.runAbcIntegrationTests()\n\n await this.runBchnIntegrationTests()\n\n utils.log('bch-api tests complete.')\n utils.log(' ')\n }", "function testRun()\r\n{\r\n}", "function runTests(){\n var test = currentTest();\n var error = {\n path: test.path,\n testName: test.name\n };\n\n try{\n test.func(helpers);\n } catch ( err ) {\n error.msg = err;\n error.contexts = textContexts;\n addError(error);\n advanceTests();\n }\n\n // if no initial errors, test eventually times out\n setTimeout(function(){\n error.contexts = textContexts;\n if ( currentTestError ) {\n error.msg = currentTestError;\n addError(error);\n }else if ( !currentTestCompleted ) {\n error.msg = \"Did not complete in time!\";\n addError(error);\n }\n advanceTests();\n }, test.timeout); \n }", "viewAllAreas (baseUrl,username,spacename){\n browser.get(baseUrl + username + \"/\" + spacename +\"/areas\");\n }", "function advanceTests(){\n if ( !advancing ) {\n advancing = true;\n data.totalAssertCount += totalAssertCount;\n data.passedAssertCount += passedAssertCount;\n data.currentTestIndex += 1;\n save(); \n var should_advance = data.currentTestIndex < allTests.length;\n if ( should_advance ) {\n nav();\n } else {\n data.status = 2;\n save();\n callback();\n }\n }\n }", "function runTest(test) {\n test.testOptions.screenCapture = './accessability-test/output/' + test.name +'.png'\n var options = { \n ...test.testOptions, \n standard: 'Section508'}; //standard: 'Section508'}; standard: 'WCAG2AAA'; \"WCAG2A\"; WCAG2AA}; \n pa11y(test.url, options).then((results) => {\n results.screenGrab = test.name + '.png';\n var htmlResults = accReporter.process(results, test.url, true);\n fs.writeFile('accessability-test/output/'+ test.name + '.html', htmlResults, function(err) {})\n }).catch((err) => {\n console.log(err);\n });\n}", "function runTests() {\n const responseCodes = [];\n for (const currentError in errorCodes) {\n if (responseCodes.includes(errorCodes[currentError].RESPONSE_CODE)) return 1;\n responseCodes.push(errorCodes[currentError].RESPONSE_CODE);\n }\n return typeof process.env.PORT !== 'undefined' && process.env.PORT != null ? 0 : 1;\n }", "function urlLoop(input, index) {\n\t\t\t\tit('url is defined and not empty', function() {\n\t\t\t\t\texpect(input.url).toBeDefined(true, 'failed at index ' + index);\n\t\t\t\t\texpect(input.url.length).not.toBe(0, 'failed at index ' + index);\n\t\t\t\t\t// To double check the correct properties are being tested\n\t\t\t\t\tconsole.log(input.url + ' (at index ' + index + ')');\n\t\t\t\t});\n\t\t\t}", "function downloadTestResults(viewer) {\n start(viewer, function loop(entry, iterator) {\n if (!entry.done) {\n viewer.toBlob((blob) => {\n downloadUrl(URL.createObjectURL(blob), entry.value[0]);\n\n next(viewer, loop, iterator);\n });\n }\n });\n }", "function testAll() {\n testAssert()\n testRemainder()\n testConversions()\n}", "function main() {\n if (isPushBuild()) {\n log('Running all tests because this is a push build...');\n runLintChecks();\n APPS_TO_TEST.forEach(runAppTests);\n } else {\n printChangeSummary();\n runLintChecks();\n determineBuildTargets().forEach(runAppTests);\n }\n}", "function test() {\n\tlog('page loaded');\n\tloadData();\n}", "function runTest(test) {\n debug(\"parsing test\");\n var testConfig = jf.readFileSync(process.env.SUITE_CONFIG);\n var wptLoc = testConfig.wptServer\n ? testConfig.wptServer\n : \"https://www.webpagetest.org\";\n\n var wpt = new WebPageTest(wptLoc, testConfig.wptApiKey),\n options = {\n pollResults: 5, //poll every 5 seconds\n timeout: 600, //wait for 10 minutes\n video: true, //this enables the filmstrip\n location: test.location,\n firstViewOnly: test.firstViewOnly, //refresh view?\n requests: false, //do not capture the details of every request\n lighthouse: true\n };\n\n wptScript = wpt.scriptToString(test.script);\n\n debug(\n \"starting test on script \" + wptScript + \" in location \" + test.location\n );\n\n wpt.runTest(wptScript, options, function(err, results) {\n if (err) {\n return console.error([err, { url: test.url, options: options }]);\n }\n dataStore.saveDatapoint(test, results);\n });\n}", "async function run() {\r\n let test\r\n // await db.init()\r\n // TODO : Run the data manager's test data setup\r\n // dataObjectManager = await require(__dirname + '/../../server/dataObjects/dataObjectManager.js')(engine, db, fs, promise)\r\n for (test in config) {\r\n if (config[test] === 1) {\r\n if (test === \"extensionManager\") {\r\n testExtensionManager.run()\r\n }\r\n }\r\n }\r\n}", "async function runAllTests(){\n await createBlocks();\n await testChainValidation();\n await introduceErrorsInBlockBody();\n await testChainValidation();\n await introduceErrorsInBlockPreviousHash();\n await testChainValidation();\n}", "async actionsTestChangeColor() {\n try {\n await this.actionsPage.navigateToActionsPage()\n await this.homePage.blackAndColor()\n } catch (error) {\n console.error(`Error with ${this.actionsTestChangeColor} function`)\n }\n }", "function chooseURL (urls, callback, index) {\n if (index == undefined) {\n\t\t\tindex = 0;\n }\n\n // >= b/c index is from 0, length from 1\n if (index >= urls.length*10) {\n\t\t\tshowError('nourls', {});\n\t\t\treturn null;\n }\n\n var url = urls[index % urls.length];\n wtolog('Testing URL ' + url.app_url);\n\n // Validate, then ping, then callback\n validateURL(\n\t\t\turl, \n\t\t\tfunction(cleanUrl, status) {\n\t\t\t if (status == 'valid') {\n\t\t\t\t\t\t// Now check that it's up\n\t\t\t\t\t\tpingURL(\n\t\t\t\t\t\t cleanUrl,\n\t\t\t\t\t\t function (availUrl, status) {\n\t\t\t\t\t\t\t\t\tif (status == 'up') {\n\t\t\t\t\t\t\t\t\t // URL is clean and up\n\t\t\t\t\t\t\t\t\t callback(availUrl);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t // not up\n\t\t\t\t\t\t\t\t\t // These vars should be passed down into\n\t\t\t\t\t\t\t\t\t // the closure\n\t\t\t\t\t\t\t\t\t chooseURL(urls, callback, index + 1)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t\t); // pingURL\n\t\t\t }\n\t\t\t else {\n\t\t\t\t\t\tchooseURL(urls, callback, index + 1)\n\t\t\t }\n\t\t\t}\n ); // validateURL\n}", "function showUnitTestDetails(num, html_url, sparql_url)\n{\n var rdfaExtractorUrl = getRdfaExtractorUrl();\n var n3ExtractorUrl = \"http://www.w3.org/2007/08/pyRdfa/extract?format=n3&uri=\";\n\n document.getElementById('unit-test-details-' + num).innerHTML =\n \"Retreiving information...\";\n sendRequest('test-details?id=' + num +\n '&xhtml=' + html_url +\n '&sparql=' + sparql_url +\n '&rdfa-extractor=' + escape(rdfaExtractorUrl) +\n '&n3-extractor=' + escape(n3ExtractorUrl),\n displayUnitTestDetailsResult, num)\n}", "function showGridViews(view, pageNo, sec, actionforward){\r\n\tvar htmlNavAjax = getHTMLAjaxObject();\r\n\thtmlNavAjax.setActionURL(actionforward);\r\n\t\r\n htmlNavAjax.setActionMethod(\"NAVIGATION&view=\"+view);\r\n htmlNavAjax.setProcessHandler(_showNavigationComponent);\r\n htmlNavAjax.sendRequest();\r\n}", "function loadYuiTestsToRunJS() {\r\n\tfor(var testJSFile in framework.yuiTestsToRunArray) {\r\n\t\tloadJS(framework.yuiTestsToRunArray[testJSFile]);\r\n\t}\r\n\t\r\n\t//Setup the runname, based on the platform determined at loadtime in YUITestsToRun.js\r\n\t\r\n\tdocument.getElementById(\"tbRunName\").value = \"YUI_Bxxxx(x.x.x.xxxx)_\" + framework.device;\r\n\t\r\n\t// Run the callback function to generate the Test Case array\r\n\tYUI({useBrowserConsole: true\r\n\t}).use(\"test\", generateTestCaseArray);\r\n\t\r\n\t// Display the Test Case array in the treeview\r\n\tcreateTreeViewForTestCases();\r\n}", "function loadTests (client) {\n client.query(tests, function (err) {\n if (err) {\n console.error('could not load tests', err.toString());\n\n client.end();\n return;\n }\n\n runTests(client);\n });\n}", "function processURLChange()\n {\n switch(window.location.hash) {\n\n case '#restart':\n currentSubunit()\n break\n\n case '#previous':\n previousSubunit()\n break\n\n case '#next':\n nextSubunit()\n break\n\n default:\n updateUnitFromURL()\n }\n }", "function offersTests({ apiGET, apiPOST }) {\n // maybe we don't need this in the API?\n it.todo(\"get offers for session\");\n // maybe we don't need this in the API?\n it.todo(\"get offers for position\");\n it.todo(\"get offer for assignment\");\n it.todo(\"accept/reject/withdraw offer\");\n it.todo(\"increment nag count\");\n it.todo(\"error when attempting to update a frozen field\");\n}", "function runTestArray(testArray, functionToTest) {\n\tconsole.log(\"Testing \" + functionToTest.name);\n\tfor (let i=0; i<testArray.length; i++) {\n\t\tconst test = testArray[i];\n\t\tconst testNumber = i + 1;\n\t\trunTest(functionToTest, test, testNumber);\n\t}\n}", "function callTest(data){\n var call_array=data.tests[data.actual_name]; //array\n if (call_array)\n for (var n=0;n<call_array.length;n++){\n var params=call_array[n];\n console.log(\"- con params: \",JSON.stringify(params.slice(0,2)),\"callback: \",typeof params[2]);\n data.obj_to_test[data.actual_name](params[0],params[1],params[2]); //call fn con los params - params[3] es una callbackfn\n }\n}", "viewIteration (baseUrl,username,spacename,iterationname){\n browser.get(baseUrl + username + \"/\" + spacename +\"/plan?iteration=\" + iterationname);\n }", "function runGCTests(tests, i, title) {\n if (!i) {\n i = 0;\n }\n\n if (tests[i]) {\n if (typeof tests[i] === 'string') {\n title = tests[i];\n runGCTests(tests, i + 1, title);\n } else {\n try {\n tests[i]();\n } catch (e) {\n console.error('Test failed: ' + title);\n throw e;\n }\n setImmediate(() => {\n global.gc();\n runGCTests(tests, i + 1, title);\n });\n }\n }\n}", "async openBrowser (id, pageUrl, browserName) {\r\n var browserString = this.determineValidBrowser(browserName);\r\n\r\n const xCodeProjLocation = path.join(__dirname, '/XCUITest/testApplication/testApplication.xcodeproj');\r\n const startXCTestCmd = 'xcodebuild';\r\n const paramsXCTest = []; \r\n \r\n paramsXCTest.push('-project');\r\n paramsXCTest.push(xCodeProjLocation); \r\n paramsXCTest.push('-scheme');\r\n paramsXCTest.push('testApplication');\r\n paramsXCTest.push('-destination');\r\n paramsXCTest.push(browserString);\r\n paramsXCTest.push('test'); \r\n paramsXCTest.push('IDEVICE_TIMEOUT=10');\r\n paramsXCTest.push('TESTCAFE_URL=' + pageUrl);\r\n\r\n await debug.log('running openBrowser with url:' + pageUrl);\r\n const subProcess = spawn(startXCTestCmd, paramsXCTest,\r\n { stdio: ['ignore', process.stdout, process.stderr] } );\r\n \r\n subProcess.on('close', (code, signal) => { \r\n debug.log('close: code:' + code + ' signal:' + signal); \r\n //subProcess.disconnect();\r\n subProcess.stdio = [null, null, null];\r\n subProcess.kill();\r\n })\r\n .on('exit', (code, signal) => { \r\n debug.log('exit: code:' + code + ' signal:' + signal); \r\n })\r\n .on('error', (code, signal) => { \r\n debug.log('error: code:' + code + ' signal:' + signal); \r\n })\r\n .on('disconnect', (code, signal) => { \r\n debug.log('disconnect: code:' + code + ' signal:' + signal); \r\n })\r\n .on('message', (code, signal) => { \r\n debug.log('message: code:' + code + ' signal:' + signal); \r\n });\r\n\r\n }", "async function run_test(url) {\n try {\n const results = await process_1.process_manifest(url, test_profiles, true);\n console.log(bridge_1.processedToString(results));\n }\n catch (e) {\n console.log(`Something went wrong: ${e.message}`);\n process.exit(1);\n }\n}", "function test(name, url, commit, cb) {\n var localDir = path.join(tmpDir, name);\n\n async.series([\n async.apply(clearRepo, localDir),\n async.apply(cloneRepo, localDir, url),\n async.apply(checkoutCommit, localDir, commit),\n async.apply(bundleInstall, localDir)\n ], function(err, messages) {\n if(err) return cb(err);\n\n util.log(\"Running specs for \" + name + \"/\" + commit);\n runTests(localDir, 'spec', function(err, pass) {\n if(err) return cb(err);\n if(!pass) return cb(err, false, \"Specs\");\n\n util.log(\"Running features for \" + name + \"/\" + commit);\n runTests(localDir, 'cucumber', function(err, pass) {\n if(err) return cb(err);\n if(!pass) return cb(err, false, \"Features\");\n\n return cb(null, true);\n });\n });\n });\n}", "async function setUp() {\n await showCatFilter();\n await showAreaFilter();\n show($home);\n // drawMealPlanTable();\n // generateMealPlanFormOptions();\n }", "function openQAUrl(aUrl)\n{\n openUILinkIn(aUrl, \"current\",\n { triggeringPrincipal:\n Services.scriptSecurityManager.createNullPrincipal({}),\n });\n}", "function ServerAPITest(url = 'http://localhost:3001') {\n var module = new TestModule()\n module._server = new ServerAPI(url)\n for (const prop in module) {\n const member = module[prop]\n if (typeof member === 'function') {\n const result = member()\n if (result === null || typeof result === 'undefined') throw new Error(`error in ${prop}`)\n console.log(prop + ' tested')\n }\n }\n}", "function fetchRunResults() {\n // Request URL for test runs\n var runAPI = testRailURL + \"/index.php?/api/v2/get_runs/\" + projectList[plIndex][0];\n var params = setTestRailHeaders();\n\n // Proxy the request through the container server\n gadgets.io.makeRequest(runAPI, handleRunResponse, params);\n}", "boardItemViewUrl (baseUrl,username,spacename){\n browser.get(baseUrl + username + \"/\" + spacename +\"/plan/board\");\n }", "function runAllTestCasesRecursive() {\n $log.info('Attempting to run all tests');\n var testQueue = [];\n if (vm.testNamesToRun.length == 0) {\n testQueue = angular.copy(vm.testCases);\n } else {\n for (var i = 0; i < vm.testCases.length; i++) {\n for (var j = 0; j < vm.testNamesToRun.length; j++) {\n if (vm.testCases[i].testName === vm.testNamesToRun[j]) {\n testQueue.push(vm.testCases[i]);\n }\n }\n }\n }\n runTestCasesRecursionBody(testQueue);\n vm.tableParams.reload();\n }", "function convertToWPTRequests(testPages) {\n debug(\"converting tests\");\n debug(testPages);\n async.map(testPages, prepareTest, function(err, tests) {\n debug(\"prepared\");\n debug(tests);\n eventEmitter.emit(\"runTests\", tests);\n });\n}", "function generateTestCaseCallback(Y) {\r\n var testCases = new Array();\r\n var Assert = Y.Assert;\r\n\t\t\r\n testCases[0] = new Y.Test.Case({\r\n name: \"blackberry.invoke for Maps\",\r\n\t\t\t\r\n\t\t\t_should: {\r\n error: {\r\n \"MANUAL 3 [5.0] should invoke Maps with Document MapsArguments\" : \"TypeError: Result of expression 'new blackberry.invoke.MapsArguments' [undefined] is not an object.\",\r\n } \r\n },\r\n\t\t\t\r\n\t\t\tsetUp : function () {\r\n\t\t\t\t//Order is a stack, last object will appear first in DOM\r\n\t\t\t\tframework.setupFailButton();\r\n\t\t\t\tframework.setupPassButton();\r\n\t\t\t\tframework.setupInstructions();\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\ttearDown : function () {\r\n\t\t\t\tframework.tearDownFailButton();\r\n\t\t\t\tframework.tearDownPassButton();\r\n\t\t\t\tframework.tearDownInstructions();\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t\"blackberry.invoke.MapsArguments should exist\" : function() {\r\n\t\t\t\tAssert.isNotUndefined(blackberry.invoke.MapsArguments);\r\n\t\t\t},\r\n\t\t\r\n\t\t\t//Invoke Maps with empty MapsArguments\r\n\t\t\t\"MANUAL 1 should invoke Maps with empty MapsArguments\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Maps shoulds show up with default view\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke Maps with empty MapsArgument\");\r\n\t\t\t\tvar args = new blackberry.invoke.MapsArguments();\r\n\t\t\t\tblackberry.invoke.invoke(blackberry.invoke.APP_MAPS,args); \r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Invoke Maps with lat/long MapsArguments\r\n\t\t\t\"MANUAL 2 should invoke Maps with lat/long MapsArguments\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Maps shoulds show up with proper coordinates\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke Maps with lat/long MapsArgument\");\r\n\t\t\t\tvar args = new blackberry.invoke.MapsArguments(43.67750, -80.73390);\r\n\t\t\t\tblackberry.invoke.invoke(blackberry.invoke.APP_MAPS,args); \r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n \r\n\t\t\t//Invoke Maps with Document MapsArguments (5.0 Test)\r\n\t\t\t\"MANUAL 3 [5.0] should invoke Maps with Document MapsArguments\": function() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\t\tframework.setInstructions(\"Maps shoulds show up with proper coordinates\");\r\n\t\t\t\t\t\r\n\t\t\t\t\talert(\"[5.0 ONLY] Will attempt to invoke Maps with Document MapsArgument\");\r\n\t\t\t\t\tvar parser = new DOMParser(); \r\n\t\t\t\t\tvar doc = parser.parseFromString(\"<lbs id='Lake Conservation'><location lat='43.67750' lon='-80.73390' label='Lake conservation' description='Go Leafs Go!' zoom='6'/></lbs>\", \"text/xml\"); \r\n\t\t\t\t\tvar args = new blackberry.invoke.MapsArguments(doc);\r\n\t\t\t\t\tblackberry.invoke.invoke(blackberry.invoke.APP_MAPS, args);\r\n\t\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t\t} catch (err) {\r\n\t\t\t\t\tthrow new Error(err); //6.0 Device Catch Statements\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Invoke Maps with Document(String) MapsArguments (6.0 Test)\r\n\t\t\t\"MANUAL 4 [6.0] should invoke Maps with Document(String) MapsArguments\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Maps should show up with proper coordinates - works on 5.0 as well!\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke Maps with Document(String) MapsArgument\");\r\n\t\t\t\tvar xmlString = \"<lbs id='Lake Conservation'><location lat='4367750' lon='-8073390' label='Lake conservation' description='Go Leafs Go!' zoom='6'/></lbs>\";\r\n var args = new blackberry.invoke.MapsArguments(xmlString);\r\n blackberry.invoke.invoke(blackberry.invoke.APP_MAPS, args);\r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Invoke Maps with Address MapsArguments\r\n\t\t\t\"MANUAL 5 should invoke Maps with Address MapsArguments\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Maps shoulds show up with proper coordinates of Address\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke Maps with Address MapsArgument\");\r\n\t\t\t\tvar workAddress = new blackberry.pim.Address();\r\n workAddress.country = \"Canada\";\r\n workAddress.city = \"Mississauga\";\r\n workAddress.address1 = \"Tahoe Blvd\";\r\n workAddress.stateProvince = \"Ontario\";\r\n var args = new blackberry.invoke.MapsArguments(workAddress);\r\n blackberry.invoke.invoke(blackberry.invoke.APP_MAPS, args);\r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\t\r\n });\r\n\r\n return testCases;\r\n }", "function runTests(configData) {\n var deferred = defer();\n\n var summaries = [];\n\n var useVariants = [];\n if (TEST_VARIANT) {\n useVariants.push(TEST_VARIANT);\n } else {\n for (var variantName in configData.variants) {\n var variantData = configData.variants[variantName];\n if (!variantData.optional ||\n (variantName === 'imap:real' && TEST_PARAMS.type === 'imap') ||\n (variantName === 'activesync:real' &&\n TEST_PARAMS.type === 'activesync')) {\n useVariants.push(variantName);\n }\n }\n }\n console.log('legal variants for tests:', useVariants);\n\n var controlServer = FakeServerSupport.makeControlHttpServer().server;\n\n var runTests = [];\n for (var testName in configData.tests) {\n var testData = configData.tests[testName];\n var testVariants = testData.variants.filter(function(v) {\n return useVariants.indexOf(v) !== -1;\n });\n if (testVariants.length) {\n runTests.push(\n {\n name: testName.replace(/\\.js$/, ''),\n // filter out the variants that we don't want to run right now\n variants: testVariants,\n });\n console.log('planning to run test:', testName);\n }\n }\n\n if (runTests.length === 0) {\n console.warn('0 tests matched; are you sure that you added the file to',\n TEST_CONFIG, 'and that one of its supported variants is',\n 'listed above?');\n }\n\n var iTest = 0, iVariant = 0, curTestInfo = null;\n function runNextTest(summary) {\n if (summary)\n summaries.push(summary);\n\n if (curTestInfo && iVariant >= curTestInfo.variants.length) {\n iTest++;\n iVariant = 0;\n }\n if (iTest >= runTests.length) {\n controlServer.shutdown();\n deferred.resolve(summaries);\n return;\n }\n\n curTestInfo = runTests[iTest];\n\n runTestFile(configData.runner,\n curTestInfo.name, curTestInfo.variants[iVariant++],\n controlServer)\n .then(runNextTest,\n function(err) { console.error('Problem running test:', err); });\n }\n runNextTest();\n\n return deferred.promise;\n}", "function run(){\n\n\tdescribe(\"XML Tester\", function(){\n\t\t\n\t\t//gameName = process.env.npm_config_gamename;\n\t\t//console.log(\"Testing \" + gameName);\n\t\t\n\t\t//findXML();\n\t\t//parseXML();\n\t\t//loadGame();\n\t\t//StartMultiGameTest();\n\t});\n}" ]
[ "0.5877059", "0.58756995", "0.5785658", "0.5730221", "0.5632493", "0.56255096", "0.55625737", "0.5537204", "0.55075663", "0.55004597", "0.5495863", "0.54705954", "0.542833", "0.5367382", "0.5356986", "0.5323607", "0.5317409", "0.5294425", "0.52214086", "0.52053154", "0.52048826", "0.52003855", "0.5194261", "0.51910704", "0.5165272", "0.5155497", "0.51500607", "0.5144518", "0.5143677", "0.5141377", "0.5121416", "0.51072574", "0.5104324", "0.50986916", "0.5078742", "0.5069312", "0.50618845", "0.50614035", "0.5058706", "0.5056635", "0.5048644", "0.5042382", "0.50254023", "0.5024936", "0.50202465", "0.5014925", "0.50076103", "0.49950105", "0.49898544", "0.4984306", "0.49842206", "0.49586746", "0.4948389", "0.49455437", "0.49388108", "0.49382994", "0.4931813", "0.49147528", "0.49133635", "0.48852152", "0.48727825", "0.48679805", "0.48643774", "0.48554444", "0.48487523", "0.48481303", "0.48442233", "0.4826802", "0.4823017", "0.48218074", "0.48122427", "0.48098165", "0.4805102", "0.47803026", "0.47792217", "0.47790805", "0.47703767", "0.4769293", "0.47650552", "0.47633848", "0.4757245", "0.47545823", "0.47469416", "0.47420022", "0.47388232", "0.47382894", "0.47376716", "0.47298703", "0.47279865", "0.4727898", "0.47259247", "0.47254452", "0.4723086", "0.47208282", "0.4720266", "0.47193256", "0.47148106", "0.47141454", "0.47095937", "0.4704115", "0.47007206" ]
0.0
-1
Generate HTML and JSON reports
async report() { const { logger, db } = this[OPTIONS]; const testedPages = await db.read('tested_pages'); logger.info('Saving JSON report'); const json = new JSONReporter(this[OPTIONS]); await json.open(); await json.write(testedPages); await json.close(); logger.info('Saving HTML Report'); const html = new HTMLReporter(this[OPTIONS]); await html.open(); await html.write(testedPages); await html.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static generateHTMLReport(capabilities) {\n const os = require(\"os\");\n\n report.generate({\n jsonDir: path.resolve('./test/'),\n reportPath: path.resolve('./test/'),\n metadata: {\n browser: {\n name: capabilities.get('browserName'),\n version: capabilities.get('version')\n },\n device: \"PC\",\n platform: {\n name: os.platform() === \"win32\" ? \"windows\" : os.platform(),\n version: os.release()\n }\n }\n });\n }", "static generateReport() {\n let data = [];\n console.info(\"Processing Json Report Files\");\n let files = fs.readdirSync(intermediateJsonFilesDirectory);\n for (let i in files) {\n let f = `${intermediateJsonFilesDirectory}/${files[i]}`;\n console.log(`Processing file ${f}`);\n try {\n let fileContent = fs.readFileSync(f, 'utf-8');\n data.push(JSON.parse(fileContent)[0]);\n }catch (err) {\n if (err) {\n console.error(`Failed to process file ${f}`);\n console.error(err);\n }\n }\n }\n\n console.info(\"Writing consolidated json file\");\n try {\n fs.writeFileSync('./e2e/reports/combinedJSON/cucumber_report.json', JSON.stringify(data));\n } catch (err) {\n if (err) {\n console.error(\"Failed to generate the consolidated json file.\");\n console.error(err);\n throw err;\n }\n }\n\n console.info(\"Generating Final HTML Report\");\n try {\n reporter.generate(cucumberReporterOptions);\n } catch (err) {\n if (err) {\n console.error(\"Failed to generate the final html report\");\n console.error(err);\n throw err;\n }\n }\n }", "generateFinalReport() {\n const obj = {\n environment: \"Dev\",\n numberOfTestSuites: this._numberOfTestSuites,\n totalTests: this._numberOfTests,\n browsers: this.browsers,\n testsState: [{\n state: this.standardTestState('Passed'),\n total: this._numberOfPassedTests\n }, {\n state: this.standardTestState('Failed'),\n total: this._numberOfFailedTests\n }, {\n state: this.standardTestState('Skipped'),\n total: this._numberOfSkippedTests\n\n }],\n testsPerBrowserPerState: this._testsCountPerBrowserPerState,\n testsPerSuitePerState: this._testsCountPerSuitePerState,\n testsWeatherState: this.weatherState,\n totalDuration: this._totalDuration,\n testsPerBrowser: this._testsPerBrowser\n };\n\n jsonfile.writeFile(this._finalReport, obj, {\n spaces: 2\n }, function(err) {\n if (err !== null) {\n console.error('Error saving JSON to file:', err)\n }\n console.info('Report generated successfully.');\n });\n }", "function sendBack(html) {\n\n const tmpl = jsr.templates('./public/views/report.html');\n\n // Build the template with jsrender and send to client.\n res.type('text/html').send(tmpl.render({\n dir: env.path,\n title: env.workspace.title || 'GEOLYTIX | XYZ',\n nanoid: nanoid(6),\n token: req.query.token || token.signed || '\"\"',\n template: html || null,\n script_js: 'views/report.js'\n }));\n }", "function renderHTML()\n {\n \n\n fs.writeFile('result/index.html', getTemplate(renderScript()), (err) => {\n \n if (err) throw err;\n \n console.log('HTML generated!');\n });\n \n\n }", "function generateReport(options, successCallback) {\n Database.getFullPlan(options.plan, function success(plan) {\n // Initialise data objects\n var resultsMatrix = {};\n var calc = {total: 0, pass: 0, fail: 0, pending: 0};\n Database.getAllWhere(\"results\", \"plan\", options.plan, function(results) {\n // Organise results so they can be accessed by page and criterion ID\n results.forEach(function(result) {\n resultsMatrix[result.page] = resultsMatrix[result.page] || {};\n resultsMatrix[result.page][result.criterion] = result;\n });\n // Generate the report and pass it back as a string\n successCallback(\"<h1>Web Accessibility Report (\" + plan.details.name + \")</h1>\" +\n \"<h4>Generated: \" + Date() + \"</h4>\" +\n \"<hr>\" +\n // Go through each pages group\n plan.pages.map(function(pages_group) {\n return \"<h2>Web page group: \" + pages_group.name + \"</h2>\" +\n \"<ul>\" +\n (pages_group.items.length ?\n // List all pages in this group\n pages_group.items.map(function(page) {\n return \"<li>\" + page.title + \" (\" + page.url + \")</li>\";\n }).join(\"\") +\n \"</ul>\" +\n // Go through each criteria group\n plan.criteria.map(function(criteria_group) {\n return \"<h3>Criteria set: \" + criteria_group.name + \"</h3>\" +\n \"<ul>\" +\n (criteria_group.items.length ?\n // Go through each criterion in this group\n criteria_group.items.map(function(criterion) {\n return \"<li>\" +\n // Include criterion details (where they exist and are requested in the options)\n \"<h4>\" + criterion.name + \"</h4>\" +\n \"<p>\" + criterion.description.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\\n/g, \"<br>\") + \"</p>\" +\n (options.criteria_details ?\n \"<h5>Why is it important?</h5>\" +\n \"<p>\" + criterion.reasoning.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\\n/g, \"<br>\") + \"</p>\" +\n \"<h5>Guidance</h5>\" +\n \"<p>\" + criterion.guidance.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\\n/g, \"<br>\") + \"</p>\" +\n \"<h5>Documentation</h5>\" +\n \"<p>\" + criterion.links.map(function(link) { return \"<a href='\" + link + \"' target='_blank'>\" + link + \"</a>\"; }).join(\"<br>\") + \"</p>\"\n : \"\") +\n \"<h4>Results</h4>\" +\n // Work out result totals for all pages in this group\n pages_group.items.map(function(page, index) {\n if (index == 0) calc.total = calc.pass = calc.fail = calc.pending = 0;\n var result = (resultsMatrix[page.id] && resultsMatrix[page.id][criterion.id]) || {status: \"pending\"};\n if (options.statuses.indexOf(result.status) != -1) {\n calc.total++;\n calc[result.status]++;\n }\n return \"\";\n }).join(\"\") +\n // Calculate percentages from result totals (for status requested in the options)\n options.statuses.map(function(status) {\n return status.charAt(0).toUpperCase() + status.slice(1) + \": \" + calc[status] + \"/\" + calc.total + \" (\" + (calc.total > 0 ? (Math.round(calc[status] / calc.total * 100) + \"%\") : \"n/a\") + \")<br>\";\n }).join(\"\") +\n (options.level == \"individual\" ?\n // Include information about each individual test on each page (if requested in the options)\n \"<br><ul>\" +\n pages_group.items.map(function(page) {\n var result = (resultsMatrix[page.id] && resultsMatrix[page.id][criterion.id]) || {status: \"pending\"};\n // Only include this test result is it has one of the statuses requested\n return (options.statuses.indexOf(result.status) != -1) ?\n \"<li>\" +\n page.title + \" (\" + page.url + \") - \" + result.status +\n (options.results_annotations && result.annotation ?\n \"<p>\" + result.annotation.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/\\n/g, \"<br>\") + \"</p>\"\n : \"\") +\n (options.results_images && result.image ?\n \"<p><img src='\" + result.image + \"'></p>\"\n : \"\") +\n \"</li>\"\n : \"\";\n }).join(\"\") +\n \"</ul>\"\n : \"\") +\n \"</li>\";\n }).join(\"\")\n : \"<li><em>No criteria</em></li>\") +\n \"</ul>\" +\n \"\";\n }).join(\"\") +\n (options.tables ?\n // Create a table overview of tests on all the pages in this group\n \"<table border='1' cellspacing='2' cellpadding='2'>\" +\n \"<tr>\" +\n \"<th></th>\" +\n // List all pages on the x-axis\n pages_group.items.map(function(page) {\n return \"<th>\" + page.title + \"</th>\";\n }).join(\"\") +\n \"</tr>\" +\n plan.criteria.map(function(criteria_group) {\n // Include criteria group names\n return \"<tr><td><strong>\" + criteria_group.name + \"</strong></td></tr>\" +\n (criteria_group.items.length ?\n // Go through each criterion in the group\n criteria_group.items.map(function(criterion) {\n return \"<tr>\" +\n \"<td>\" + criterion.name + \"</td>\" +\n pages_group.items.map(function(page) {\n var result = (resultsMatrix[page.id] && resultsMatrix[page.id][criterion.id]) || {status: \"pending\"};\n return \"<td>\" +\n (options.statuses.indexOf(result.status) != -1 ?\n // Include tick icon for passing results\n (result.status == \"pass\" ? \"<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMZJREFUOE/FjjEKwkAQRWezdiFJZ29toWfwEoJ6Bw/hRYR4Jru0whYO2AU06B+Z1Y1F1gTEB0N2d/77hP5CwYWV0Ws/REw4KWV6l+ScW8OmJKa7DEr2uoqTcdaSMTfLdqPrbiCKfPiQ17omco2T0FivLczZWAgtGb/+lqumEnmHhcNM9flJVBZU9oFXyVeygIItlk0QdHib4RuXPRCWCNWBcA3O3bIHJQuEL4Ho5ZVG4iA8h3QaJHsgTSAfB8melNORHn8N0QMwhI66An4NAgAAAABJRU5ErkJggg=='> \" : \"\") +\n // Include cross icon for failing results\n (result.status == \"fail\" ? \"<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAKpJREFUOE+lU0EKgCAQ3CD7pPSK+kDQrd7qJehgkO2sJFHqoR0YCHdmWlclIBwHubYdXNctm7WNLGaAGjTQwiMI3kcz0ckMzph1n+dPCNZQEw20CGEvzGMy30TINKUQfD/MNxEyErf0LkSyYev7BsyYI9lLVYExizBfkx/UWiyTtc8tCl5DKhPmzJAFckyllkGu1Y5ZF6DagmqI6mNUXyT1VVY/JuD/cya6APHAd2wGj7MPAAAAAElFTkSuQmCC'> \" : \"\") +\n result.status.charAt(0).toUpperCase() + result.status.slice(1)\n : \"\") +\n \"</td>\";\n }).join(\"\") +\n \"</tr>\";\n }).join(\"\")\n : \"<tr><td colspan='\" + (pages_group.items.length + 1) + \"'><em>No criteria</em></td></tr>\")\n }).join(\"\") +\n \"</table>\"\n : \"\")\n : \"<li><em>No pages</em></li></ul>\");\n }).join(\"\") +\n \"\" +\n \"\");\n });\n });\n}", "function createHtml (){\n fs.writeFileSync(outputPath, render(teamTotal), \"utf-8\");\n console.log(\"Your Team html has been created. Go to the output folder to see your creation.\")\n}", "function writeHTML() {\n\n const html = generateHTML(employees);\n\n writeFileAsync(\"./output/team.html\", html);\n\n console.log(\"team page built!\")\n\n}", "function produceReport(){\n // this is were most functions are called\n\n userURL = getuserURL();\n\n // add this into the website\n vertifyHttps(userURL); // check if the url is http/s\n googleSafeBrowsingAPI(userURL);\n virusTotalAPI(userURL);\n apilityCheck(userURL);\n}", "function printHTML() {\n const html = render(employeeArr);\n fs.writeFile(outputPath, html, (err) => {\n if (err) throw err;\n console.log(\"HTML successfully generated and saved to ./output.\");\n return;\n });\n}", "function generateHTML() {\n\n \n fs.writeFile(outputPath, render(members), \"UTF-8\", (err) => {\n \n\n \n if (err) throw err;\n \n });\n \n console.log(members);\n\n }", "function generate_all_reports()\n{\n report_ToAnswer_emails();\n report_FollowUp_emails();\n report_Work_FollowUp_emails();\n}", "function generateReport (data, outputPdfPath) {\n return webServer.start(webServerPortNo, data)\n .then(server => {\n const urlToCapture = \"http://localhost:\" + webServerPortNo;\n return captureReport(urlToCapture, \"svg\", outputPdfPath)\n .then(() => server.close());\n });\n}", "function buildHtmlPage(fileName, data) {\n fs.writeFileSync(fileName, data, function (err) {\n if (err) {\n console.log(err);\n } else {\n console.log(\"Success. Your team log was created.\");\n }\n });\n console.log(teamMembers);\n}", "function generaReportErm(){\n\t\n\twindow.location.href= \"/CruscottoAuditAtpoWebWeb/jsonATPO/getReportErmPDF\";\n\t\n}", "function buildHTMLTable(reports) {\n // Get a reference to the table body\n var tbody = d3.select(\"tbody\");\n // Clear table body\n tbody.html(\"\")\n\n // loop through ech report and add to HTML table body\n reports.forEach((report) => {\n console.log(report)\n var row = tbody.append(\"tr\");\n Object.entries(report).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "function generateTestReport() {\n var fileName = 'FileSystem - Report.pdf';\n FileMapper.clearAllMappingsInConfig();\n Workbook.setActiveWorkbookPath('c:\\\\user\\\\desktop');\n QUnit.load(testFunctions);\n // Run tests and generate html output\n var htmlOutput = QUnit.getHtml();\n htmlOutput.setWidth(1200);\n htmlOutput.setHeight(800);\n // Display test results\n SpreadsheetApp.getUi().showModalDialog(htmlOutput, fileName);\n // Save test results in Google Drive\n var blob = htmlOutput.getBlob();\n var pdf = blob.getAs('application/pdf');\n DriveApp.createFile(pdf).setName(fileName);\n}", "function main() {\n const allResults = [];\n fs.readdirSync(constants.OUT_PATH).forEach(siteDir => {\n const sitePath = path.resolve(constants.OUT_PATH, siteDir);\n if (!utils.isDir(sitePath)) {\n return;\n }\n allResults.push({site: siteDir, results: analyzeSite(sitePath)});\n });\n const generatedResults = groupByMetrics(allResults);\n fs.writeFileSync(\n GENERATED_RESULTS_PATH,\n `var generatedResults = ${JSON.stringify(generatedResults)}`\n );\n console.log('Opening the charts web page...'); // eslint-disable-line no-console\n opn(path.resolve(__dirname, 'index.html'));\n}", "function _generateHeaderReport() {\n\n\tthis.htmlFile.writeln( \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\");\n this.htmlFile.writeln( \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" >\");\n\tthis.htmlFile.writeln( \"<head>\");\n\tthis.htmlFile.writeln( \" <title>KPI Report</title>\");\n\tthis.htmlFile.writeln( \"</head>\");\n\tthis.htmlFile.writeln( \"<style type=\\\"text/css\\\"></style>\");\n\tthis.htmlFile.writeln( \"<body>\");\n\t\n\tthis.htmlFile.writeln( \"<p>KPI report</p>\" );\n\n\t\n}", "function DrawReport(oJsonResult) {\n\n if (oJsonResult.ERROR != null) {\n window.alert(options.PluginName + \": Server error getting report:\\n\" + oJsonResult.ERROR);\n return;\n }\n\n try {\n\n //Get result table\n var oResultTable = oJsonResult.resultTable;\n\n //Get the DOM object displaying the result table\n var oPrintedTable = getReportTables(oResultTable, true/*Draw column names*/);\n\n //Add export to Excel link \n var oDivReportName = $(\".ReportDataExcel\", oContainer);\n applyExcelLinkWithPrintableColumns(oDivReportName, options);\n\n\n //Get template element to be populated by report \n var oDivReportData = $(\".ReportData\", oContainer);\n\n oDivReportData.html(oPrintedTable);\n\n }\n catch (errorMsg) {\n window.alert(options.PluginName + \": Error displaying report:\\n\" + errorMsg);\n }\n }", "function reports(req,res){\n res.render('admin/general/views/reports');\n}", "function renderReport(doc) {\n\n // ----------------------------------------------\n let br = document.createElement('br');\n let hr = document.createElement('hr');\n let page = document.createElement('span');\n\n let caption = document.createElement('h4'); //append caption\n let innerCaption = document.createElement('small');\n var t1 = document.createTextNode(\"PREVIOUS POSTS\");\n innerCaption.appendChild(t1);\n caption.appendChild(innerCaption)\n\n // append hr\n\n let title = document.createElement('h3'); //append title\n title.textContent = doc.data().studentUserName;\n\n let date = document.createElement('h5')//append date\n let icons = document.createElement('span')\n icons.classList.add('glyphicon');\n icons.classList.add('glyphicon-time');\n let time = document.createElement('span');\n time.textContent = doc.data().time;\n var t2 = document.createTextNode(' Posted on ');\n date.appendChild(icons);\n date.appendChild(t2);\n date.appendChild(time);\n\n\n let mainIcons = document.createElement('h5')//mainIcons\n let glyph1 = document.createElement('span');\n glyph1.classList.add('label');\n glyph1.classList.add('label-success');\n var t3 = document.createTextNode('created');\n var t5 = document.createTextNode(' ');\n glyph1.appendChild(t3);\n let glyph2 = document.createElement('span');\n glyph2.classList.add('label');\n glyph2.classList.add('label-primary');\n var t4 = document.createTextNode('read');\n glyph2.appendChild(t4);\n mainIcons.appendChild(glyph1);\n mainIcons.appendChild(t5);\n mainIcons.appendChild(glyph2);\n\n // append break (br)\n // append break (br)\n\n let comment = document.createElement('p')//append comment\n comment.textContent = doc.data().report;\n\n page.appendChild\n\n page.appendChild(caption);\n page.appendChild(hr);\n page.appendChild(title);\n page.appendChild(date);\n page.appendChild(mainIcons);\n page.appendChild(comment);\n page.appendChild(br);\n page.appendChild(br);\n page.appendChild(br);\n\n reportList.appendChild(page);\n\n}", "function _buildHTMLBody(model) {\n\n\t//load the template source\n\tvar source = dc.readFileSync(__dirname + '/../assets/templates/employee_sales_report_text.htm')\n\t\n\t//compile the template source into an HB template\n\tvar template = hb.compile(source);\n\t\n\t//register the helpers\n\t//average hourly sales\n\thb.registerHelper(\"dollar_converter\", function(number) {\n\t\treturn (number / 100).toFixed(2); \n\t});\n\n\thb.registerHelper(\"to_fixed\", function(number) {\n\t\treturn number.toFixed(2); \n\t});\n\n\t//add the data to the template\n\tvar data = model;\n\t\n\t//render the results\n\tvar result = template(data);\n\n\t//return the text body\n\treturn result;\n}", "function create_report() {\n // send ajax request to server\n var callback = function(responseText) {\n // tmp\n //myT = responseText;\n // end tmp\n // process response from server\n var tests = JSON.parse(responseText);\n google.charts.setOnLoadCallback( function () {\n drawAnnotations(tests);\n });\n }\n httpAsync(\"GET\", window.location.origin + '/star_tests.json' + window.location.search, callback);\n\n}", "function generateReport(){\n\t//create reports folder (if it doesn't already exist)\n\tif(!fs.existsSync(\"reports\")){\n\t\tfs.mkdirSync(\"reports\");\n\t}\n\t\n\t//create a file called by timestamp\n\tvar date = new Date();\n\treportfile = \"reports/\"+date.getDate()+\"-\"+date.getMonth()+\"-\"+date.getFullYear()+\"--\"+date.getHours()+\"h\"+date.getMinutes()+\"m.tex\";\n\t\n\twriteReport();\n\tvar err = createPDF();\n\tif(err){\n\t\tconsole.log(\"ERR : Error during creation of PDF report\");\n\t}\n}", "function pushAnswersToRender(employees) {\ntry {\n fs.writeFileSync('index.html', generateFile(employees));\n console.log('Success! Your team profiles page has been created!');\n //console.log(employees);\n } catch (error) {\n console.log(error);\n };\n}", "display() {\n fs.writeFile(outputFile, makeHtml(this.team), function (err){\n if (err) {\n console.log(err)\n } else {\n console.log(\"Made file!\");\n }\n });\n }", "function _generateFooterReport() {\n\t\n\n\tthis.htmlFile.writeln( \"</body>\");\n\tthis.htmlFile.writeln( \"</html>\");\n}", "static generateXMLReport(pathToJson, pathToXml) {\n const builder = new xml2js.Builder();\n const jsonReport = require(path.resolve(pathToJson));\n\n const xml = builder.buildObject(new JunitReport(jsonReport).build());\n\n fs.writeFile(path.resolve(pathToXml), xml, (err) => {\n if (err) {\n throw err\n }\n })\n }", "function generate_json(page){\n\tvar csv = \"used in,name,title,type,description,format,bareNumber\\n\\\nviews,Date,Date,date,the date in which the views occurred - in ISO8601 format YYYY-MM-DD,%y/%m/%d,\\n\\\nuser-contributions,Date,Date,date,the date in which the views occurred - in ISO8601 format YYYY-MM-DD,%y/%m/%d,\\n\\\nviews,Views,Total of visualizations received,integer,Total of visualizations the items in the GLAM have had within the specified time period. The loading of a page which contains the image is considered as a visualization of said image.,default,TRUE\\n\\\nuser-contributions,User,Username,string,The Wikimedia username of a user who has made contributions to the GLAM in question.,default,\\n\\\nuser-contributions,Count,Count of contributions,integer,Total count of contributions (creations, edits and deletions) made by the User to the items of the GLAM.,default,TRUE\\n\\\ncount,Count,Count of contributions,integer,Total count of contributions (creations, edits and deletions) made by the User to the items of the GLAM.,default,TRUE\\n\\\nusage,File,File name,string,Name of a Wikimedia Commons file.,default,\\n\\\nusage,Project,Wikimedia project,string,Wikimedia project in which the file has been used.,default,\\n\\\nusage,Page,Page title,string,Title of the page in the Project which uses the File.,default,\\n\";\n\tvar lines = csv.split(\"\\n\");\n\tvar headers = lines[0].split(\",\");\n\tvar json = \"\";\n\tjson += '{\\n\\t\"schema\":{\\n';\n\tjson += '\\t\\t\"fields\": [\\n';\n\n\tfor (var i = 1; i < lines.length; i++) {\n\t\tvar current = lines[i].split(\",\");\n\t\tif (page == current[0]) {\n\t\tjson += '\\t\\t\\t{\\n';\n\t\t\tfor (var j = 1; j < headers.length; j++) { // won't add empty information to the JSON\n\t\t\t\tif (current[j] != \"\") json += '\\t\\t\\t\\t\"' + headers[j] + '\": \"' +current[j] + '\",\\n';\n\t\t\t}\n\t\tjson = json.substring(0, json.length - 2) + \"\\n\"; // removes trailing comma\n\t\tjson += '\\t\\t\\t},\\n';\n\t\t}\n\t}\n\tjson = json.substring(0, json.length - 2) + \"\\n\"; // removes trailing comma\n\tjson += \"\\t\\t]\\n\\t}\\n}\";\n\n\treturn (json);\n}", "function initializeOutput() {\r\n HTML_output = new java.io.FileWriter(\"active-hits/shortn-results.\" + soylentJob + \".html\");\r\n lag_output = new java.io.FileWriter(\"active-hits/shortn-\" + soylentJob + \"-fix_errors_lag.csv\");\r\n lag_output.write(\"Stage,Assignment,Wait Type,Time,Paragraph\\n\");\r\n payment_output = new java.io.FileWriter(\"active-hits/shortn-\" + soylentJob + \"-fix_errors_payment.csv\");\r\n payment_output.write(\"Stage,Assignment,Cost,Paragraph\\n\");\r\n patchesOutput = new java.io.FileWriter(\"active-hits/shortn-patches.\" + soylentJob +\".json\");\r\n}", "function renderDrawPage(res) {\n\tlet promise = readFile(__dirname+'/java/output/all.json');\n\tpromise.then((data) => {\n\t\tres.writeHead(200,{'Content-Type':'text/html'});\n\t\tres.render('draw_B.jade', JSON.parse(data),(err,html)=>{\n\t\tif(err) {\n\t\t\tconsole.log('渲染出错');\n\t\t\tthrow err;\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tres.write(html);\n\t\t}\n\t\tres.end();\n\t},(err) => {console.log('rendererror:' + err);return;}); \n\n\t});\n}", "function generateReportPDF(absentWorkers, lateWorkers, activeHoursForWorkers, inactiveHoursForWorkers, siteName, clientName) {\n\tabsentWorkers.map(e => delete e.siteDetail);//no needed\n\tlet data = { absentWorkers, lateWorkers, activeHoursForWorkers, inactiveHoursForWorkers };\n\n\tlet day = new Date();\n\tlet fileName = day.getDate() + \"-\" + monthNames[(day.getMonth())] + \"-\" + day.getFullYear();\n\tconst dir = `${global.__base}/reports/${clientName}`;\n\tconst fullPath = `${dir}/${siteName}-${fileName}.json`\n\tif (!fs.existsSync(dir)) {\n\t\tfs.mkdirSync(dir, { recursive: true });\n\t}\n\tfs.writeFile(fullPath, JSON.stringify(data, null, 4), (err) => {\n\t\tif (err) console.log(err);\n\t\telse console.log(`Report Generated ${global.__base}/reports/${siteName}-${fileName}.json`);\n\t}); //enhancemt for JasperReport PDF\n}", "function htmlWriter() {\n \n //writes the html for introduction\n htmlIntro();\n \n //creates the event functionality for example 1 and example 2\n exampleSetEvents();\n \n //writes the html for the game\n htmlGame();\n }", "function makeTeamHTML(emplyArr) {\n fs.writeFile(outputPath, render(emplyArr), function(err) {\n err?console.log(err):console.log(\"Team html rendered. Have a look!\");\n })\n}", "static get reports() {}", "function writeToHtml() {\n console.log(teamArray);\n const teamHtml = render(teamArray);\n console.log(teamHtml);\n fs.writeFile(outputPath, teamHtml, function (err) {\n if (err) {\n throw err;\n }\n console.log(\"success\");\n })\n}", "function report(title,description,addtionalInfo) {\r\n\trefreshReports();\r\n\tvar jsonObj = {\r\n key: [getDateTime()],\r\n response: [\"Title of bug:\"+title+\" \\n Description:\"+description+\" \\n Addtional information:\"+addtionalInfo]\r\n };\r\n JsonArrayReports.push(jsonObj);\r\n var newFile = fsReports.writeFileSync(\"./Dictionary/Report_Log.json\",JSON.stringify(JsonArrayReports, null, \"\\t\"));\r\n}", "function build_report_txt() {\n\n var txt = [];\n txt.push(\"Page Size Inspector Report\\n\");\n txt.push(\"URL: \"+ tab_url);\n txt.push(Date().toString() + \"\\n\");\n txt.push(build_line(\"REQUEST\", \"REQ\", \"BYTES\", \"CACHEREQ\", \"CACHEBYTES\"));\n\n // total\n var t = table_data.sections.total;\n txt.push(\"\\n\"+build_line(\"TOTAL\", t.reqtransf, t.kbtransf,\n t.reqcached, t.kbcached, \"_\"));\n\n // sections\n var sections = [\"Document\", \"Script\", \"Stylesheet\", \"Image\", \"XHR\",\n \"Font\", \"Other\"];\n const MAX_URL = 45;\n for (const sname of sections) {\n var num = table_data.sections[sname+\"count\"] || {};\n txt.push(\"\\n\"+build_line(sname, num.reqtransf, num.kbtransf,\n num.reqcached, num.kbcached, \"_\"));\n\n var sect = table_data.sections[sname] || [];\n for (const req of sect) {\n var prefix = req.size ? '-' : '+';\n var code = req.code != 200 ? req.code + ' ' : '';\n var url = sanitize_url(req.url, MAX_URL, true) || req.url_display;\n url = prefix + code + url;\n\n txt.push(build_line(url, 0, req.size, 0, req.sizecache));\n }\n }\n\n txt.push(\"\");\n\n var s = txt.join(\"\\n\");\n// deb(s);\n return s;\n}", "function singleClickGenerateAllReports(){\n\n\n\t //PENDING --> TOTAL CALCULATED ROUND OFFFFF\n\t console.log('PENDING API --> TOTAL CALCULATED ROUND OFFFFF')\n\t \n\n\t\trunReportAnimation(95); //of Step 11 which completed the data processing\n\n\n\t\t//Get staff info.\n\t\tvar loggedInStaffInfo = window.localStorage.loggedInStaffData ? JSON.parse(window.localStorage.loggedInStaffData) : {};\n\t\t\n\t\tif(jQuery.isEmptyObject(loggedInStaffInfo)){\n\t\t\tloggedInStaffInfo.name = 'Staff';\n\t\t\tloggedInStaffInfo.code = '0000000000';\n\t\t}\t\n\n\n\t\tvar reportInfo_branch = window.localStorage.accelerate_licence_branch_name ? window.localStorage.accelerate_licence_branch_name : '';\n\t\t\t\n\t\tif(reportInfo_branch == ''){\n\t\t\tshowToast('System Error: Branch name not found. Please contact Accelerate Support.', '#e74c3c');\n\t\t\treturn '';\n\t\t}\n\n\t\tvar temp_address_modified = (window.localStorage.accelerate_licence_branch_name ? window.localStorage.accelerate_licence_branch_name : '') + ' - ' + (window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name : '');\n\t\tvar data_custom_footer_address = window.localStorage.bill_custom_footer_address ? window.localStorage.bill_custom_footer_address : '';\n\n\t\tvar reportInfo_admin = loggedInStaffInfo.name;\n\t\tvar reportInfo_time = moment().format('h:mm a, DD-MM-YYYY');\n\t\tvar reportInfo_address = data_custom_footer_address != '' ? data_custom_footer_address : temp_address_modified;\n\n\n\t\t//Reset Token Number and KOT Number (if preference set)\n\t\tresetBillingCounters();\n\n\t\tgenerateReportContentDownload();\n\n\t\tfunction generateReportContentDownload(){\n\n\t\t\t//To display weekly graph or not\n\t\t\tvar hasWeeklyGraphAttached = false;\n\t\t\tif(window.localStorage.graphImageDataWeekly && window.localStorage.graphImageDataWeekly != ''){\n\t\t\t\thasWeeklyGraphAttached = true;\n\t\t\t}\n\n\t\t\tvar graphRenderSectionContent = '';\n\t\t\tvar fancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY - dddd');\n\n\t\t\tvar reportInfo_title = 'Sales Report of <b>'+fancy_from_date+'</b>';\n\t\t\tvar temp_report_title = 'Sales Report of '+fancy_from_date;\n\t\t\tif(fromDate != toDate){\n\t\t\t\tfancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\t\t\t\tvar fancy_to_date = moment(toDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\n\t\t\t\treportInfo_title = 'Sales Report from <b>'+fancy_from_date+'</b> to <b>'+fancy_to_date+'</b>';\n\t\t\t\ttemp_report_title = 'Sales Report from '+fancy_from_date+' to '+fancy_to_date;\n\t\t\t}\n\t\t else{ //Render graph only if report is for a day\n\n\t\t if(hasWeeklyGraphAttached){\n\n\t\t \tvar temp_image_name = reportInfo_branch+'_'+fromDate;\n\t\t \ttemp_image_name = temp_image_name.replace(/\\s/g,'');\n\n\t\t graphRenderSectionContent = ''+\n\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t '<div class=\"summaryTableSection\">'+\n\t\t '<div class=\"tableQuickHeader\">'+\n\t\t '<h1 class=\"tableQuickHeaderText\">WEEKLY SALES TREND</h1>'+\n\t\t '</div>'+\n\t\t '<div class=\"weeklyGraph\">'+\n\t\t '<img src=\"'+window.localStorage.graphImageDataWeekly+'\" style=\"max-width: 90%\">'+\n\t\t '</div>'+\n\t\t '</div>'+\n\t\t '</div>';\n\t\t }\n\t\t }\n\n\t\t var fancy_report_title_name = reportInfo_branch+' - '+temp_report_title;\n\n\t\t //Quick Summary Content\n\t\t var quickSummaryRendererContent = '';\n\n\t\t var a = 0;\n\t\t while(reportInfoExtras[a]){\n\t\t quickSummaryRendererContent += '<tr><td class=\"tableQuickBrief\">'+reportInfoExtras[a].name+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(reportInfoExtras[a].value).toFixed(2)+'</td></tr>';\n\t\t a++;\n\t\t }\n\n\n\t\t var b = 1; //first one contains total paid\n\t\t while(completeReportInfo[b]){\n\t\t quickSummaryRendererContent += '<tr><td class=\"tableQuickBrief\">'+completeReportInfo[b].name+'</td><td class=\"tableQuickAmount\">'+(completeReportInfo[b].type == 'NEGATIVE' && completeReportInfo[b].value != 0 ? '- ' : '')+'<span class=\"price\">Rs.</span>'+parseFloat(completeReportInfo[b].value).toFixed(2)+'</td></tr>';\n\t\t b++;\n\t\t }\n\n\n\t\t //Sales by Billing Modes Content\n\t\t var salesByBillingModeRenderContent = '';\n\t\t var c = 0;\n\t\t var billSharePercentage = 0;\n\t\t while(detailedListByBillingMode[c]){\n\t\t billSharePercentage = parseFloat((100*detailedListByBillingMode[c].value)/completeReportInfo[0].value).toFixed(0);\n\t\t salesByBillingModeRenderContent += '<tr><td class=\"tableQuickBrief\">'+detailedListByBillingMode[c].name+' '+(billSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+billSharePercentage+'%)</span>' : '')+(detailedListByBillingMode[c].count > 0 ? '<span class=\"smallOrderCount\">'+detailedListByBillingMode[c].count+' orders</span>' : '')+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(detailedListByBillingMode[c].value).toFixed(0)+'</td></tr>';\n\t\t c++;\n\t\t }\n\n\t\t\t//To display bills graph or not\n\t\t\tvar hasBillsGraphAttached = false;\n\t\t\tif(window.localStorage.graphImageDataBills && window.localStorage.graphImageDataBills != '' && window.localStorage.graphImageDataBills != 'data:,'){\n\t\t\t\thasBillsGraphAttached = true;\n\t\t\t}\n\n\t\t var salesByBillingModeRenderContentFinal = '';\n\t\t if(salesByBillingModeRenderContent != ''){\n\n\t\t \tif(hasBillsGraphAttached){\n\t\t\t\t salesByBillingModeRenderContentFinal = ''+\n\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t \t'<div class=\"tableQuickHeader\">'+\n\t\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY BILLS</h1>'+\n\t\t\t\t \t'</div>'+\n\t\t\t\t \t'<div class=\"tableGraphRow\">'+\n\t\t\t\t\t\t '<div class=\"tableGraph_Graph\"> <img src=\"'+window.localStorage.graphImageDataBills+'\" width=\"200px\"> </div>'+\n\t\t\t\t\t\t '<div class=\"tableGraph_Table\">'+\t\n\t\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t\t salesByBillingModeRenderContent+\n\t\t\t\t\t '</table>'+\n\t\t\t\t\t '</div>'+\n\t\t\t\t\t '</div>'+\t\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t salesByBillingModeRenderContentFinal = ''+\n\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY BILLS</h1>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t salesByBillingModeRenderContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>';\t\t\t\t\n\t\t\t\t}\n\t\t }\n\n\n\t\t //Sales by Payment Types Content\n\t\t var salesByPaymentTypeRenderContent = '';\n\t\t var d = 0;\n\t\t var paymentSharePercentage = 0;\n\t\t while(detailedListByPaymentMode[d]){\n\t\t paymentSharePercentage = parseFloat((100*detailedListByPaymentMode[d].value)/completeReportInfo[0].value).toFixed(0);\n\t\t salesByPaymentTypeRenderContent += '<tr><td class=\"tableQuickBrief\">'+detailedListByPaymentMode[d].name+' '+(paymentSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+paymentSharePercentage+'%)</span>' : '')+(detailedListByPaymentMode[d].count > 0 ? '<span class=\"smallOrderCount\">'+detailedListByPaymentMode[d].count+' orders</span>' : '')+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(detailedListByPaymentMode[d].value).toFixed(0)+'</td></tr>';\n\t\t d++;\n\t\t }\n\n\t\t\t//To display payment graph or not\n\t\t\tvar hasPaymentsGraphAttached = false;\n\t\t\tif(window.localStorage.graphImageDataPayments && window.localStorage.graphImageDataPayments != '' && window.localStorage.graphImageDataPayments != 'data:,'){\n\t\t\t\thasPaymentsGraphAttached = true;\n\t\t\t}\n\n\t\t var salesByPaymentTypeRenderContentFinal = '';\n\t\t if(salesByPaymentTypeRenderContent != ''){\n\n\t\t \tif(hasPaymentsGraphAttached){\n\t\t\t salesByPaymentTypeRenderContentFinal = ''+\n\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t \t'<div class=\"tableQuickHeader\">'+\n\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY PAYMENT</h1>'+\n\t\t\t \t'</div>'+\n\t\t\t \t'<div class=\"tableGraphRow\">'+\n\t\t\t\t\t '<div class=\"tableGraph_Graph\"> <img src=\"'+window.localStorage.graphImageDataPayments+'\" width=\"200px\"> </div>'+\n\t\t\t\t\t '<div class=\"tableGraph_Table\">'+\t\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t salesByPaymentTypeRenderContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>';\n\t\t\t }\n\t\t\t else{\n\t\t\t \tsalesByPaymentTypeRenderContentFinal = ''+\n\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY PAYMENT</h1>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t salesByPaymentTypeRenderContent+\n\t\t\t '</table>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>';\n\t\t\t }\n\t\t }\n\n\t\t var temp_licenced_client = window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name.toLowerCase() : 'common';\n\t\t var cssData = '<head> <style type=\"text/css\"> body{font-family:sans-serif;margin:0}#logo{min-height:60px;width:100%}.mainHeader{background:url(https://accelerateengine.app/clients/'+temp_licenced_client+'/pattern.jpg) #c63931;width:100%;min-height:95px;padding:10px 0;border-bottom:2px solid #a8302b}.headerLeftBox{width:55%;display:inline-block;padding-left:25px}.headerRightBox{width:35%;float:right;display:inline-block;text-align:right;padding-right:25px}.headerAddress{margin:0 0 5px;font-size:14px;color:#e4a1a6}.headerBranch{margin:10px 0;font-weight:700;text-transform:uppercase;font-size:21px;padding:3px 8px;color:#c63931;display:inline-block;background:#FFF}.headerAdmin{margin:0 0 3px;font-size:16px;color:#FFF}.headerTimestamp{margin:0 0 5px;font-size:12px;color:#e4a1a6}.reportTitle{margin:15px 0;font-size:26px;font-weight:400;text-align:center;color:#3498db}.introFacts{background:0 0;width:100%;min-height:95px;padding:10px 0}.factsArea{display:block;padding:10px;text-align:center}.factsBox{margin-right: 5px; width:18%; display:inline-block;text-align:left;padding:20px 15px;border:2px solid #a8302b;border-radius:5px;color:#FFF;height:65px;background:#c63931}.factsBoxFigure{margin:0 0 8px;font-weight:700;font-size:32px}.factsBoxFigure .factsPrice{font-weight:400;font-size:40%;color:#e4a1a6;margin-left:2px}.factsBoxBrief{margin:0;font-size:16px;color:#F1C40F;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.summaryTableSectionHolder{width:100%}.summaryTableSection{padding:0 25px;margin-top:30px}.summaryTableSection table{border-collapse:collapse}.summaryTableSection td{border-bottom:1px solid #fdebed}.tableQuick{padding:10px}.tableQuickHeader{min-height:40px;background:#c63931;border-bottom:3px solid #a8302b;border-top-right-radius:15px;color:#FFF}.tableQuickHeaderText{margin:0 0 0 25px;font-size:18px;letter-spacing:2px;text-transform:uppercase;padding-top:10px;font-weight:700}.smallOrderCount{font-size:80%;margin-left:15px;color:#aba9a9;font-style:italic;}.tableQuickBrief{padding:10px;font-size:16px;color:#a71a14}.tableQuickAmount{padding:10px;font-size:18px;text-align:right;color:#a71a14}.tableQuickAmount .price{font-size:70%;margin-right:2px}.tableGraphRow{position:relative}.tableGraph_Graph{width:35%;display:block;text-align:center;float:right;position:absolute;top:20px;left:62%}.footerNote,.weeklyGraph{text-align:center;margin:0}.tableGraph_Table{padding:10px;width:55%;display:block;min-height:250px;}.weeklyGraph{padding:25px;border:1px solid #f2f2f2;border-top:none}.footerNote{font-size:12px;color:#595959}@media screen and (max-width:1000px){.headerLeftBox{display:none!important}.headerRightBox{padding-right:5px!important;width:90%!important}.reportTitle{font-size:18px!important}.tableQuick{padding:0 0 5px!important}.factsArea{padding:5px!important}.factsBox{width:90%!important;margin:0 0 5px!important}.smallOrderCount{margin:0!important;display:block!important}.summaryTableSection{padding:0 5px!important}}</style> </head>';\n\t\t \n\t\t var finalReport_downloadContent = cssData+\n\t\t\t '<body>'+\n\t\t\t '<div class=\"mainHeader\">'+\n\t\t\t '<div class=\"headerLeftBox\">'+\n\t\t\t '<div id=\"logo\">'+\n\t\t\t '<img src=\"https://accelerateengine.app/clients/'+temp_licenced_client+'/email_logo.png\">'+\n\t\t\t '</div>'+\n\t\t\t '<p class=\"headerAddress\">'+reportInfo_address+'</p>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"headerRightBox\">'+\n\t\t\t '<h1 class=\"headerBranch\">'+reportInfo_branch+'</h1>'+\n\t\t\t '<p class=\"headerAdmin\">'+reportInfo_admin+'</p>'+\n\t\t\t '<p class=\"headerTimestamp\">'+reportInfo_time+'</p>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"introFacts\">'+\n\t\t\t '<h1 class=\"reportTitle\">'+reportInfo_title+'</h1>'+\n\t\t\t '<div class=\"factsArea\">'+\n\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(0)+' <span class=\"factsPrice\">INR</span></h1><p class=\"factsBoxBrief\">Net Sales</p></div>'+ \n\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+parseFloat(netSalesWorth).toFixed(0)+'<span class=\"factsPrice\">INR</span></h1><p class=\"factsBoxBrief\">Gross Sales</p></div>'+ \n\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+netGuestsCount+'</h1><p class=\"factsBoxBrief\">Guests</p></div>'+ \n\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+completeReportInfo[0].count+'</h1><p class=\"factsBoxBrief\">Bills</p></div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+graphRenderSectionContent+\n\t\t\t (hasWeeklyGraphAttached ? '<div style=\"page-break-before: always; margin-top: 20px\"></div><div style=\"height: 30px; width: 100%; display: block\"></div>' : '')+\n\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t '<h1 class=\"tableQuickHeaderText\">Quick Summary</h1>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t '<tr><td class=\"tableQuickBrief\" style=\"font-weight: bold;\">Gross Amount</td><td class=\"tableQuickAmount\" style=\"font-weight: bold;\"><span class=\"price\">Rs.</span>'+parseFloat(netSalesWorth).toFixed(2)+'</td></tr>'+\n\t\t\t quickSummaryRendererContent+\n\t\t\t '<tr><td class=\"tableQuickBrief\" style=\"background: #f3eced; font-size: 120%; font-weight: bold; color: #292727; border-bottom: 2px solid #b03c3e\">Net Sales</td><td class=\"tableQuickAmount\" style=\"background: #f3eced; font-size: 120%; font-weight: bold; color: #292727; border-bottom: 2px solid #b03c3e\"><span class=\"price\">Rs.</span>'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(2)+'</td></tr>'+\n\t\t\t '</table>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '<div style=\"page-break-before: always; margin-top: 20px\"></div><div style=\"height: 30px; width: 100%; display: block\"></div>'+\n\t\t\t salesByBillingModeRenderContentFinal+\n\t\t\t salesByPaymentTypeRenderContentFinal+\n\t\t\t '<div style=\"border-top: 2px solid #989898; padding: 12px; background: #f2f2f2;\">'+\n\t\t\t '<p class=\"footerNote\">www.accelerate.net.in | [email protected]</p>'+\n\t\t\t '</div>'+\n\t\t\t '</body>';\n\n\t\t\t\tvar finalContent_EncodedDownload = encodeURI(finalReport_downloadContent);\n\t\t\t\t$('#reportActionButtonDownload').attr('data-hold', finalContent_EncodedDownload);\n\n\t\t\t\tvar finalContent_EncodedText = encodeURI(fancy_report_title_name);\n\t\t\t\t$('#reportActionButtonDownload').attr('text-hold', finalContent_EncodedText);\n\n\t\t\t\tgenerateReportContentEmail();\n\n\t\t}\n\n\t\tfunction generateReportContentEmail(){\n\n\t\t\t\trunReportAnimation(97);\n\n\t\t\t\t//To display weekly graph or not\n\t\t\t\tvar hasWeeklyGraphAttached = false;\n\t\t\t\tif(window.localStorage.graphImageDataWeekly && window.localStorage.graphImageDataWeekly != ''){\n\t\t\t\t\thasWeeklyGraphAttached = true;\n\t\t\t\t}\n\n\t\t\t\tvar temp_licenced_client = window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name.toLowerCase() : 'common';\n\n\t\t\t\tvar graphRenderSectionContent = '';\n\t\t\t\tvar fancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY - dddd');\n\n\t\t\t\tvar reportInfo_title = 'Sales Report of <b>'+fancy_from_date+'</b>';\n\t\t\t\tvar temp_report_title = 'Sales Report of '+fancy_from_date;\n\t\t\t\tif(fromDate != toDate){\n\t\t\t\t\tfancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\t\t\t\t\tvar fancy_to_date = moment(toDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\n\t\t\t\t\treportInfo_title = 'Sales Report from <b>'+fancy_from_date+'</b> to <b>'+fancy_to_date+'</b>';\n\t\t\t\t\ttemp_report_title = 'Sales Report from '+fancy_from_date+' to '+fancy_to_date;\n\t\t\t\t}\n\t\t\t else{ //Render graph only if report is for a day\n\n\t\t\t if(hasWeeklyGraphAttached){\n\n\t\t\t \tvar temp_image_name = reportInfo_branch+'_'+fromDate;\n\t\t\t \ttemp_image_name = temp_image_name.replace(/\\s/g,'');\n\n\t\t\t graphRenderSectionContent = ''+\n\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t '<h1 class=\"tableQuickHeaderText\">WEEKLY SALES TREND</h1>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"weeklyGraph\">'+\n\t\t\t '<img src=\"https://accelerateengine.app/clients/'+temp_licenced_client+'/report_trend_images_repo/'+temp_image_name+'.png\" style=\"max-width: 90%\">'+\n\t\t\t '</div>'+\n\t\t\t '</div>'+\n\t\t\t '</div>';\n\t\t\t }\n\t\t\t }\n\n\t\t\t var fancy_report_title_name = reportInfo_branch+' - '+temp_report_title;\n\n\t\t\t //Quick Summary Content\n\t\t\t var quickSummaryRendererContent = '';\n\n\t\t\t var a = 0;\n\t\t\t while(reportInfoExtras[a]){\n\t\t\t quickSummaryRendererContent += '<tr><td class=\"tableQuickBrief\">'+reportInfoExtras[a].name+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(reportInfoExtras[a].value).toFixed(2)+'</td></tr>';\n\t\t\t a++;\n\t\t\t }\n\n\n\t\t\t var b = 1; //first one contains total paid\n\t\t\t while(completeReportInfo[b]){\n\t\t\t quickSummaryRendererContent += '<tr><td class=\"tableQuickBrief\">'+completeReportInfo[b].name+'</td><td class=\"tableQuickAmount\">'+(completeReportInfo[b].type == 'NEGATIVE' && completeReportInfo[b].value != 0 ? '- ' : '')+'<span class=\"price\">Rs.</span>'+parseFloat(completeReportInfo[b].value).toFixed(2)+'</td></tr>';\n\t\t\t b++;\n\t\t\t }\n\n\n\t\t\t //Sales by Billing Modes Content\n\t\t\t var salesByBillingModeRenderContent = '';\n\t\t\t var c = 0;\n\t\t\t var billSharePercentage = 0;\n\t\t\t while(detailedListByBillingMode[c]){\n\t\t\t billSharePercentage = parseFloat((100*detailedListByBillingMode[c].value)/completeReportInfo[0].value).toFixed(0);\n\t\t\t salesByBillingModeRenderContent += '<tr><td class=\"tableQuickBrief\">'+detailedListByBillingMode[c].name+' '+(billSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+billSharePercentage+'%)</span>' : '')+(detailedListByBillingMode[c].count > 0 ? '<span class=\"smallOrderCount\">'+detailedListByBillingMode[c].count+' orders</span>' : '')+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(detailedListByBillingMode[c].value).toFixed(0)+'</td></tr>';\n\t\t\t c++;\n\t\t\t }\n\n\t\t\t\t//To display bills graph or not\n\t\t\t\tvar hasBillsGraphAttached = false;\n\t\t\t\tif(window.localStorage.graphImageDataBills && window.localStorage.graphImageDataBills != '' && window.localStorage.graphImageDataBills != 'data:,'){\n\t\t\t\t\thasBillsGraphAttached = true;\n\t\t\t\t}\n\n\t\t\t var salesByBillingModeRenderContentFinal = '';\n\t\t\t if(salesByBillingModeRenderContent != ''){\n\t\t\t\t\t salesByBillingModeRenderContentFinal = ''+\n\t\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY BILLS</h1>'+\n\t\t\t\t\t '</div>'+\n\t\t\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t\t salesByBillingModeRenderContent+\n\t\t\t\t\t '</table>'+\n\t\t\t\t\t '</div>'+\n\t\t\t\t\t '</div>'+\n\t\t\t\t\t '</div>';\n\t\t\t }\n\n\n\t\t\t //Sales by Payment Types Content\n\t\t\t var salesByPaymentTypeRenderContent = '';\n\t\t\t var d = 0;\n\t\t\t var paymentSharePercentage = 0;\n\t\t\t while(detailedListByPaymentMode[d]){\n\t\t\t paymentSharePercentage = parseFloat((100*detailedListByPaymentMode[d].value)/completeReportInfo[0].value).toFixed(0);\n\t\t\t salesByPaymentTypeRenderContent += '<tr><td class=\"tableQuickBrief\">'+detailedListByPaymentMode[d].name+' '+(paymentSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+paymentSharePercentage+'%)</span>' : '')+(detailedListByPaymentMode[d].count > 0 ? '<span class=\"smallOrderCount\">'+detailedListByPaymentMode[d].count+' orders</span>' : '')+'</td><td class=\"tableQuickAmount\"><span class=\"price\">Rs.</span>'+parseFloat(detailedListByPaymentMode[d].value).toFixed(0)+'</td></tr>';\n\t\t\t d++;\n\t\t\t }\n\n\t\t\t var salesByPaymentTypeRenderContentFinal = '';\n\t\t\t if(salesByPaymentTypeRenderContent != ''){\n\t\t\t\t \tsalesByPaymentTypeRenderContentFinal = ''+\n\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t\t '<h1 class=\"tableQuickHeaderText\">SUMMARY BY PAYMENT</h1>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t salesByPaymentTypeRenderContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>';\n\t\t\t }\n\n\t\t\t var temp_licenced_client = window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name.toLowerCase() : 'common';\n\t\t\t var cssData = '<head> <style type=\"text/css\"> body{font-family:sans-serif;margin:0}#logo{min-height:60px;width:100%}.mainHeader{background:url(https://accelerateengine.app/clients/'+temp_licenced_client+'/pattern.jpg) #c63931;width:100%;min-height:95px;padding:10px 0;border-bottom:2px solid #a8302b}.headerLeftBox{width:55%;display:inline-block;padding-left:25px}.headerRightBox{width:35%;float:right;display:inline-block;text-align:right;padding-right:25px}.headerAddress{margin:0 0 5px;font-size:14px;color:#e4a1a6}.headerBranch{margin:10px 0;font-weight:700;text-transform:uppercase;font-size:21px;padding:3px 8px;color:#c63931;display:inline-block;background:#FFF}.headerAdmin{margin:0 0 3px;font-size:16px;color:#FFF}.headerTimestamp{margin:0 0 5px;font-size:12px;color:#e4a1a6}.reportTitle{margin:15px 0;font-size:26px;font-weight:400;text-align:center;color:#3498db}.introFacts{background:0 0;width:100%;min-height:95px;padding:10px 0}.factsArea{display:block;padding:10px;text-align:center}.factsBox{margin-right: 5px; width:18%; display:inline-block;text-align:left;padding:20px 15px;border:2px solid #a8302b;border-radius:5px;color:#FFF;height:65px;background:#c63931}.factsBoxFigure{margin:0 0 8px;font-weight:700;font-size:32px}.factsBoxFigure .factsPrice{font-weight:400;font-size:40%;color:#e4a1a6;margin-left:2px}.factsBoxBrief{margin:0;font-size:16px;color:#F1C40F;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.summaryTableSectionHolder{width:100%}.summaryTableSection{padding:0 25px;margin-top:30px}.summaryTableSection table{border-collapse:collapse}.summaryTableSection td{border-bottom:1px solid #fdebed}.tableQuick{padding:10px}.tableQuickHeader{min-height:40px;background:#c63931;border-bottom:3px solid #a8302b;border-top-right-radius:15px;color:#FFF}.tableQuickHeaderText{margin:0 0 0 25px;font-size:18px;letter-spacing:2px;text-transform:uppercase;padding-top:10px;font-weight:700}.smallOrderCount{font-size:80%;margin-left:15px;color:#aba9a9;font-style:italic;}.tableQuickBrief{padding:10px;font-size:16px;color:#a71a14}.tableQuickAmount{padding:10px;font-size:18px;text-align:right;color:#a71a14}.tableQuickAmount .price{font-size:70%;margin-right:2px}.tableGraphRow{position:relative}.tableGraph_Graph{width:35%;display:block;text-align:center;float:right;position:absolute;top:20px;left:62%}.footerNote,.weeklyGraph{text-align:center;margin:0}.tableGraph_Table{padding:10px;width:55%;display:block;min-height:250px;}.weeklyGraph{padding:25px;border:1px solid #f2f2f2;border-top:none}.footerNote{font-size:12px;color:#595959}@media screen and (max-width:1000px){.headerLeftBox{display:none!important}.headerRightBox{padding-right:5px!important;width:90%!important}.reportTitle{font-size:18px!important}.tableQuick{padding:0 0 5px!important}.factsArea{padding:5px!important}.factsBox{width:90%!important;margin:0 0 5px!important}.smallOrderCount{margin:0!important;display:block!important}.summaryTableSection{padding:0 5px!important}}</style> </head>';\n\t\t\t \n\t\t\t var finalReport_emailContent = '<html>'+cssData+\n\t\t\t\t '<body>'+\n\t\t\t\t '<div class=\"mainHeader\">'+\n\t\t\t\t '<div class=\"headerLeftBox\">'+\n\t\t\t\t '<div id=\"logo\">'+\n\t\t\t\t '<img src=\"https://accelerateengine.app/clients/'+temp_licenced_client+'/email_logo.png\">'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<p class=\"headerAddress\">'+reportInfo_address+'</p>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"headerRightBox\">'+\n\t\t\t\t '<h1 class=\"headerBranch\">'+reportInfo_branch+'</h1>'+\n\t\t\t\t '<p class=\"headerAdmin\">'+reportInfo_admin+'</p>'+\n\t\t\t\t '<p class=\"headerTimestamp\">'+reportInfo_time+'</p>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"introFacts\">'+\n\t\t\t\t '<h1 class=\"reportTitle\">'+reportInfo_title+'</h1>'+\n\t\t\t\t '<div class=\"factsArea\">'+\n\t\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(0)+' <span class=\"factsPrice\">INR</span></h1><p class=\"factsBoxBrief\">Net Sales</p></div>'+ \n\t\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+parseFloat(netSalesWorth).toFixed(0)+'<span class=\"factsPrice\">INR</span></h1><p class=\"factsBoxBrief\">Gross Sales</p></div>'+ \n\t\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+netGuestsCount+'</h1><p class=\"factsBoxBrief\">Guests</p></div>'+ \n\t\t\t\t '<div class=\"factsBox\"><h1 class=\"factsBoxFigure\">'+completeReportInfo[0].count+'</h1><p class=\"factsBoxBrief\">Bills</p></div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+graphRenderSectionContent+\n\t\t\t\t (hasWeeklyGraphAttached ? '<div style=\"page-break-before: always; margin-top: 20px\"></div><div style=\"height: 30px; width: 100%; display: block\"></div>' : '')+\n\t\t\t\t '<div class=\"summaryTableSectionHolder\">'+\n\t\t\t\t '<div class=\"summaryTableSection\">'+\n\t\t\t\t '<div class=\"tableQuickHeader\">'+\n\t\t\t\t '<h1 class=\"tableQuickHeaderText\">Quick Summary</h1>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div class=\"tableQuick\">'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 70%\">'+\n\t\t\t\t '<col style=\"width: 30%\">'+\n\t\t\t\t '<tr><td class=\"tableQuickBrief\" style=\"font-weight: bold;\">Gross Sales</td><td class=\"tableQuickAmount\" style=\"font-weight: bold;\"><span class=\"price\">Rs.</span>'+parseFloat(netSalesWorth).toFixed(2)+'</td></tr>'+\n\t\t\t\t quickSummaryRendererContent+\n\t\t\t\t '<tr><td class=\"tableQuickBrief\" style=\"background: #f3eced; font-size: 120%; font-weight: bold; color: #292727; border-bottom: 2px solid #b03c3e\">Net Sales</td><td class=\"tableQuickAmount\" style=\"background: #f3eced; font-size: 120%; font-weight: bold; color: #292727; border-bottom: 2px solid #b03c3e\"><span class=\"price\">Rs.</span>'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(2)+'</td></tr>'+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '<div style=\"page-break-before: always; margin-top: 20px\"></div><div style=\"height: 30px; width: 100%; display: block\"></div>'+\n\t\t\t\t salesByBillingModeRenderContentFinal+\n\t\t\t\t salesByPaymentTypeRenderContentFinal+\n\t\t\t\t '<div style=\"border-top: 2px solid #989898; padding: 12px; background: #f2f2f2;\">'+\n\t\t\t\t '<p class=\"footerNote\">www.accelerate.net.in | [email protected]</p>'+\n\t\t\t\t '</div>'+\n\t\t\t\t '</body>'+\n\t\t\t\t '<html>';\n\n\t\t\t\tvar finalContent_EncodedEmail = encodeURI(finalReport_emailContent);\n\t\t\t\t$('#reportActionButtonEmail').attr('data-hold', finalContent_EncodedEmail);\n\n\t\t\t\tvar myFinalCollectionText = {\n\t\t\t\t\t\"reportTitle\" : fancy_report_title_name,\n\t\t\t\t\t\"imageName\": reportInfo_branch+'_'+fromDate\n\t\t\t\t}\n\n\t\t\t\tvar finalContent_EncodedText = encodeURI(JSON.stringify(myFinalCollectionText));\n\t\t\t\t$('#reportActionButtonEmail').attr('text-hold', finalContent_EncodedText);\t\n\n\t\t\t\tgenerateReportContentPrint();\t\t\n\t\t}\n\n\t\tfunction generateReportContentPrint(){\n\n\t\t\trunReportAnimation(99);\n\n\t\t\tvar graphRenderSectionContent = '';\n\t\t\tvar fancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY - dddd');\n\n\t\t\tvar reportInfo_title = 'Sales Report of <b>'+fancy_from_date+'</b>';\n\t\t\tvar temp_report_title = 'Sales Report of '+fancy_from_date;\n\t\t\tif(fromDate != toDate){\n\t\t\t\tfancy_from_date = moment(fromDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\t\t\t\tvar fancy_to_date = moment(toDate, 'YYYYMMDD').format('Do MMMM YYYY');\n\n\t\t\t\treportInfo_title = 'Sales Report from <b>'+fancy_from_date+'</b> to <b>'+fancy_to_date+'</b>';\n\t\t\t\ttemp_report_title = 'Sales Report from '+fancy_from_date+' to '+fancy_to_date;\n\t\t\t}\n\n\n\t\t //Quick Summary Content\n\t\t var quickSummaryRendererContent = '';\n\n\t\t var a = 0;\n\t\t while(reportInfoExtras[a]){\n\t\t quickSummaryRendererContent += '<tr><td style=\"font-size: 11px\">'+reportInfoExtras[a].name+'</td><td style=\"font-size: 11px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(reportInfoExtras[a].value).toFixed(2)+'</td></tr>';\n\t\t a++;\n\t\t }\n\n\t\t var b = 1; //first one contains total paid\n\t\t while(completeReportInfo[b]){\n\t\t quickSummaryRendererContent += '<tr><td style=\"font-size: 11px\">'+completeReportInfo[b].name+'</td><td style=\"font-size: 11px; text-align: right\">'+(completeReportInfo[b].type == 'NEGATIVE' && completeReportInfo[b].value != 0 ? '- ' : '')+'<span style=\"font-size: 60%\">Rs.</span>'+parseFloat(completeReportInfo[b].value).toFixed(2)+'</td></tr>';\n\t\t b++;\n\t\t }\n\n\t\t var printSummaryAll = ''+\n\t\t \t'<div class=\"KOTContent\">'+\n\t\t \t\t '<h2 style=\"text-align: center; margin: 5px 0 3px 0; font-weight: bold; border-bottom: 1px solid #444;\">OVERALL SUMMARY</h2>'+\n\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t '<col style=\"width: 85%\">'+\n\t\t\t '<col style=\"width: 15%\">'+ \n\t\t\t '<tr><td style=\"font-size: 11px\"><b>Gross Sales</b></td><td style=\"font-size: 11px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(netSalesWorth).toFixed(2)+'</td></tr>'+\n\t\t\t quickSummaryRendererContent+\n\t\t\t '<tr><td style=\"font-size: 13px\"><b>Net Sales</b></td><td style=\"font-size: 13px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(completeReportInfo[0].value - netRefundsProcessed).toFixed(2)+'</td></tr>'+\n\t\t\t '</table>'+\n\t\t\t '</div>';\n\n\t\t //Sales by Billing Modes Content\n\t\t var printSummaryBillsContent = '';\n\t\t var c = 0;\n\t\t var billSharePercentage = 0;\n\t\t while(detailedListByBillingMode[c]){\n\t\t billSharePercentage = parseFloat((100*detailedListByBillingMode[c].value)/completeReportInfo[0].value).toFixed(0);\n\t\t printSummaryBillsContent += '<tr><td style=\"font-size: 11px\">'+detailedListByBillingMode[c].name+' '+(billSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+billSharePercentage+'%)</span>' : '')+(detailedListByBillingMode[c].count > 0 ? '<span style=\"font-style:italic; font-size: 60%; display: block;\">'+detailedListByBillingMode[c].count+' orders</span>' : '')+'</td><td style=\"font-size: 11px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(detailedListByBillingMode[c].value).toFixed(0)+'</td></tr>';\n\t\t c++;\n\t\t }\n\n\t\t var printSummaryBills = '';\n\t\t if(printSummaryBillsContent != ''){\n\t\t\t\tprintSummaryBills = ''+\n\t\t\t \t'<div class=\"KOTContent\">'+\n\t\t\t \t\t '<h2 style=\"text-align: center; margin: 5px 0 3px 0; font-weight: bold; border-bottom: 1px solid #444;\">BILLING MODES</h2>'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 85%\">'+\n\t\t\t\t '<col style=\"width: 15%\">'+ \n\t\t\t\t printSummaryBillsContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>';\t\n\t\t }\n\n\n\t\t //Sales by Payment Types Content\n\t\t var printSummaryPaymentContent = '';\n\t\t var d = 0;\n\t\t var paymentSharePercentage = 0;\n\t\t while(detailedListByPaymentMode[d]){\n\t\t paymentSharePercentage = parseFloat((100*detailedListByPaymentMode[d].value)/completeReportInfo[0].value).toFixed(0);\n\t\t printSummaryPaymentContent += '<tr><td style=\"font-size: 11px\">'+detailedListByPaymentMode[d].name+' '+(paymentSharePercentage > 0 ? '<span style=\"color: #5a5757\">('+paymentSharePercentage+'%)</span>' : '')+(detailedListByPaymentMode[d].count > 0 ? '<span style=\"font-style:italic; font-size: 60%; display: block;\">'+detailedListByPaymentMode[d].count+' orders</span>' : '')+'</td><td style=\"font-size: 11px; text-align: right\"><span style=\"font-size: 60%\">Rs.</span>'+parseFloat(detailedListByPaymentMode[d].value).toFixed(0)+'</td></tr>'; \n\t\t d++;\n\t\t }\n\n\t\t var printSummaryPayment = '';\n\t\t if(printSummaryPaymentContent != ''){\n\t\t\t printSummaryPayment = ''+\n\t\t\t \t'<div class=\"KOTContent\">'+\n\t\t\t \t\t '<h2 style=\"text-align: center; margin: 5px 0 3px 0; font-weight: bold; border-bottom: 1px solid #444;\">PAYMENT TYPES</h2>'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 85%\">'+\n\t\t\t\t '<col style=\"width: 15%\">'+ \n\t\t\t\t printSummaryPaymentContent+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>';\t\n\t\t }\n\n\n\t\t var printSummaryCounts = ''+\n\t\t\t \t'<div class=\"KOTContent\">'+\n\t\t\t \t\t '<h2 style=\"text-align: center; margin: 5px 0 3px 0; font-weight: bold; border-bottom: 1px solid #444;\">OTHER DETAILS</h2>'+\n\t\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t\t '<col style=\"width: 85%\">'+\n\t\t\t\t '<col style=\"width: 15%\">'+ \n\t\t\t\t '<tr><td style=\"font-size: 10px\">Total Guests</td><td style=\"font-size: 13px\">'+netGuestsCount+'</td></tr>'+\n\t\t\t\t '<tr><td style=\"font-size: 10px\">Total Bills</td><td style=\"font-size: 13px\">'+completeReportInfo[0].count+'</td></tr>'+\n\t\t\t\t '</table>'+\n\t\t\t\t '</div>';\n\n\n\n\n\t\t var cssData = '<head> <style type=\"text/css\"> .KOTContent,.KOTHeader,.KOTNumberArea,.KOTSummary{width:100%;background-color:none}.subLabel,body{font-family:sans-serif}.KOTNumber,.invoiceNumber,.subLabel{letter-spacing:2px}#logo{min-height:60px;width:100%;border-bottom:2px solid #000}.KOTHeader,.KOTNumberArea{min-height:30px;padding:5px 0;border-bottom:1px solid #7b7b7b}.KOTContent{min-height:100px;font-size:11px;padding-top:6px;border-bottom:2px solid}.KOTSummary{font-size:11px;padding:5px 0;border-bottom:1px solid}.KOTContent td,.KOTContent table{border-collapse:collapse}.KOTContent td{border-bottom:1px dashed #444;padding:7px 0}.invoiceHeader,.invoiceNumberArea{padding:5px 0;border-bottom:1px solid #7b7b7b;width:100%;background-color:none}.KOTSpecialComments{min-height:20px;width:100%;background-color:none;padding:5px 0}.invoiceNumberArea{min-height:30px}.invoiceContent{min-height:100px;width:100%;background-color:none;font-size:11px;padding-top:6px;border-bottom:1px solid}.invoiceCharges{min-height:90px;font-size:11px;width:100%;background-color:none;padding:5px 0;border-bottom:2px solid}.invoiceCustomText,.invoicePaymentsLink{background-color:none;border-bottom:1px solid;width:100%}.invoicePaymentsLink{min-height:72px}.invoiceCustomText{padding:5px 0;font-size:12px;text-align:center}.subLabel{display:block;font-size:8px;font-weight:300;text-transform:uppercase;margin-bottom:5px}p{margin:0}.itemComments,.itemOldComments{font-style:italic;margin-left:10px}.serviceType{border:1px solid;padding:4px;font-size:12px;display:block;text-align:center;margin-bottom:8px}.tokenNumber{display:block;font-size:16px;font-weight:700}.billingAddress,.timeStamp{font-weight:300;display:block}.billingAddress{font-size:12px;line-height:1.2em}.mobileNumber{display:block;margin-top:8px;font-size:12px}.timeStamp{font-size:11px}.KOTNumber{font-size:15px;font-weight:700}.commentsSubText{font-size:12px;font-style:italic;font-weight:300;display:block}.invoiceNumber{font-size:15px;font-weight:700}.timeDisplay{font-size:75%;display:block}.rs{font-size:60%}.paymentSubText{font-size:10px;font-weight:300;display:block}.paymentSubHead{font-size:12px;font-weight:700;display:block}.qrCode{width:100%;max-width:120px;text-align:right}.addressContact,.addressText{color:gray;text-align:center}.addressText{font-size:10px;padding:5px 0}.addressContact{font-size:9px;padding:0 0 5px}.gstNumber{font-weight:700;font-size:10px}.attendantName,.itemQuantity{font-size:12px}#defaultScreen{position:fixed;left:0;top:0;z-index:100001;width:100%;height:100%;overflow:visible;background-image:url(../data/photos/brand/pattern.jpg);background-repeat:repeat;padding-top:100px}.attendantName{font-weight:300;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.itemComments,.itemQuantity{font-weight:700;display:block}.itemOldComments{display:block;text-decoration:line-through}.itemOldQuantity{font-size:12px;text-decoration:line-through;display:block} </style> </head>';\n\n\t\t var data_custom_header_image = window.localStorage.bill_custom_header_image ? window.localStorage.bill_custom_header_image : '';\n\n\t\t var data_custom_header_client_name = window.localStorage.accelerate_licence_client_name ? window.localStorage.accelerate_licence_client_name : '';\n\t\t\tif(data_custom_header_client_name == ''){\n\t\t\t data_custom_header_client_name = 'Report';\n\t\t\t}\n\n\t\t var finalReport_printContent = cssData +\n\t\t \t'<body>'+\n\t\t\t '<div id=\"logo\">'+\n\t\t\t (data_custom_header_image != '' ? '<center><img style=\"max-width: 90%\" src=\\''+data_custom_header_image+'\\'/></center>' : '<h1 style=\"text-align: center\">'+data_custom_header_client_name+'</h1>')+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"KOTHeader\" style=\"padding: 0; background: #444;\">'+\n\t\t\t \t'<p style=\"text-align: center; font-size: 16px; font-weight: bold; text-transform: uppercase; padding-top: 6px; color: #FFF;\">'+reportInfo_branch+'</p>'+\n\t\t\t '</div>'+\n\t\t\t '<div class=\"KOTNumberArea\">'+\n\t\t\t '<table style=\"width: 100%\">'+\n\t\t\t '<col style=\"width: 50%\">'+\n\t\t\t '<col style=\"width: 50%\">'+\n\t\t\t '<tr>'+\n\t\t\t '<td style=\"vertical-align: top\">'+\n\t\t\t '<p>'+\n\t\t\t '<tag class=\"subLabel\">Admin</tag>'+\n\t\t\t '<tag class=\"KOTNumber\" style=\"font-size: 13; font-weight: 300; letter-spacing: unset;\">'+reportInfo_admin+'</tag>'+\n\t\t\t '</p>'+\n\t\t\t '</td>'+\n\t\t\t '<td style=\"vertical-align: top\">'+\n\t\t\t '<p style=\" text-align: right; float: right\">'+\n\t\t\t '<tag class=\"subLabel\">TIME STAMP</tag>'+\n\t\t\t '<tag class=\"timeStamp\">'+reportInfo_time+'</tag>'+\n\t\t\t '</p>'+\n\t\t\t '</td>'+\n\t\t\t '</tr>'+\n\t\t\t '</table>'+\n\t\t\t '</div>'+\n\t\t\t '<h1 style=\"margin: 6px 3px; padding-bottom: 5px; font-weight: 400; text-align: center; font-size: 15px; border-bottom: 2px solid; }\">'+reportInfo_title+'</h1>'+\n\t\t\t \t printSummaryAll+printSummaryBills+printSummaryPayment+printSummaryCounts+\n\t\t\t \t'</body>';\n\n\t\t\t\tvar finalContent_EncodedPrint = encodeURI(finalReport_printContent);\n\t\t\t\t$('#reportActionButtonPrint').attr('data-hold', finalContent_EncodedPrint);\n\n\t\t\t\trunReportAnimation(100); //Done!\n\t\t}\n\t}", "function controller() {\n\n var arrShirts = [];\n var dir = 'data';\n var curDate = moment().format('YYYY-MM-DD');\n\n var configMain = {\n repeatItemGroup: '.nav > li',\n dataFormat: {\n URL: {\n selector: 'li > a',\n type: 'attr:href'\n }\n }\n };\n\n getPage(baseURL, configMain).then( function(data) {\n for (var i = 0; i < data.length; i++) {\n if (data[i].URL.search('shirt') !== -1) {\n var url = baseURL + '/' + data[i].URL;\n return url;\n }\n }\n }).then( function(url) {\n var configShirts = {\n repeatItemGroup: '.products > li',\n dataFormat: {\n ImageURL: {\n selector: 'li > a > img',\n type: 'attr:src'\n },\n URL: {\n selector: 'li > a',\n type: 'attr:href'\n },\n Time: moment().format('LTS')\n }\n };\n return getPage(url, configShirts);\n }).then( function(data) {\n arrShirts = data;\n var configDetails = {\n repeatItemGroup: '.shirt-details',\n dataFormat: {\n Title: {\n selector: '.shirt-details > h1',\n type: 'text'\n },\n Price: {\n selector: '.price',\n type: 'text'\n }\n }\n };\n return (getDetailPage(data, configDetails));\n }).then( function(data) {\n\n /** Combine two objects into one and remove price from title string and */\n for( var i = 0; i < arrShirts.length; i++) {\n /** data is an array of objects, where each object is stored as an array. Odd, I know. */\n arrShirts[i] = (merge(data[i][0], arrShirts[i]));\n arrShirts[i].Title = arrShirts[i].Title.replace(/\\$\\d+/g, '').trim();\n }\n\n /** convert JSON to csv to prepare for writing to file */\n var csv = baby.unparse(arrShirts);\n\n /** Create data directory if one does not exist */\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir);\n }\n\n /** Write to file */\n var file = dir + '/' + curDate + '.csv';\n fs.writeFile(file, csv, (err) => {\n if (err) throw err;\n var msg = 'Data saved to file: ' + file + '.';\n logger.log(msg);\n });\n\n }).catch(function(e) {\n var msg = '';\n /** Create message to append to error log */ \n if (e.message.startsWith('getaddrinfo ENOTFOUND')) {\n msg = '-- Page couldn\\'t be accessed: ';\n } else {\n msg = '-- Something went wrong: ';\n }\n msg = moment().format('dddd, MMM Do, YYYY, h:mm:ss a') + msg + e.message + '\\n';\n fs.appendFile('scraper.error.log', msg, (err) => {\n if (err) throw err;\n logger.log(msg);\n });\n });\n}", "function HtmlReportFile(htmlFileName) {\n this.fileName = htmlFileName;\n \tthis.htmlFile = new IloOplOutputFile( this.fileName, false);\n\n \t// Add the object methods\n \tthis.generateReport = _generateReport;\n \tthis.generateHeaderReport = _generateHeaderReport;\n \tthis.generateFooterReport = _generateFooterReport;\n}", "function assembleReport() {\n var key, element, component, errorBool = false;\n \n //assemble whitelist report\n esprimaReport = esprimaReport.concat('Whitelist: <br>');\n for (element in parameters.whitelist) {\n if (parameters.whitelist[element] !== true) {\n errorBool = true;\n esprimaReport = esprimaReport.concat('&nbsp Error: You are missing a ' + element + '.');\n }\n }\n if (!errorBool) {\n esprimaReport = esprimaReport.concat('&nbsp No issues!<br>');\n } else {\n esprimaReport = esprimaReport.concat('<br>');\n }\n \n //assemble blacklist report\n esprimaReport = esprimaReport.concat('Blacklist:');\n if (reports.blacklist.length > 0) {\n esprimaReport = esprimaReport.concat('<br>');\n reports.blacklist.forEach(function (element) {\n esprimaReport = esprimaReport.concat('&nbsp Error: You have a ' + element.type + ' on line ' + element.location + '.<br>');\n });\n } else {\n esprimaReport = esprimaReport.concat(' No issues! <br>');\n }\n \n //assemble structure report\n esprimaReport = esprimaReport.concat('Structure: <br>');\n if (parameters.structure.integrity) {\n esprimaReport = esprimaReport.concat('&nbsp No issues! <br>');\n } else {\n parameters.structure.components.some(function (component, index) {\n if (index === 0) {\n esprimaReport = esprimaReport.concat('&nbsp Error: You are missing a ');\n }\n component.array.forEach(function (element, index) {\n esprimaReport = esprimaReport.concat(element);\n if (index < component.array.length - 1) {\n esprimaReport = esprimaReport.concat(' enclosing a ');\n }\n });\n if (index < component.array.length - 1) {\n esprimaReport = esprimaReport.concat(', followed by a <br>');\n }\n });\n esprimaReport = esprimaReport.concat('.<br>');\n }\n }", "function createHTML() {\n const html = render(employeeList);\n // check if directory exists and create if not exists\n if (!fs.existsSync(OUTPUT_DIR)) {\n fs.mkdirSync(OUTPUT_DIR);\n }\n\n fs.writeFile(outputPath, html, function (err) {\n if (err) {\n console.log(err);\n } else {\n console.log(\"Successfully created the Team profile file!\");\n }\n });\n}", "function RenderReport(jSONReportResult, htmlDivId){\n\n if(jSONReportResult.ResultType == \"fusionchart\"){\n \n DrawFusionChart(htmlDivId + \"_fc\", jSONReportResult.xml, jSONReportResult.file, htmlDivId, jSONReportResult.width, jSONReportResult.height);\n }\n else if(jSONReportResult.ResultType == \"plugin\"){\n ApplyReportPlugin(jSONReportResult, htmlDivId);\n }\n else{ // \"html\" result type\n var oDiv = document.getElementById(htmlDivId);\n oDiv.innerHTML = jSONReportResult.html;\n } \n}", "sendJSONReport() {\n const VIEWER_ORIGIN = 'https://googlechrome.github.io';\n const VIEWER_URL = `${VIEWER_ORIGIN}/lighthouse/viewer/`;\n\n // Chrome doesn't allow us to immediately postMessage to a popup right\n // after it's created. Normally, we could also listen for the popup window's\n // load event, however it is cross-domain and won't fire. Instead, listen\n // for a message from the target app saying \"I'm open\".\n window.addEventListener('message', function msgHandler(e) {\n if (e.origin !== VIEWER_ORIGIN) {\n return;\n }\n\n if (e.data.opened) {\n popup.postMessage({lhresults: this.json}, VIEWER_ORIGIN);\n window.removeEventListener('message', msgHandler);\n }\n }.bind(this));\n\n const popup = window.open(VIEWER_URL, '_blank');\n }", "function _makeReport() {\n document.getElementById(\"reportTable\").hidden = false;\n document.getElementById(\"chartContainer\").hidden = false;\n updateReportFromDB();\n}", "function displayUserReport(data) {\n $('body').append(\n \t'<p>' + 'Report: ' + data.report + '</p>');\n}", "function writeHtml() {\n fs.writeFile('team.html', Html.createHtml(team), function (err) {\n if (err) return console.log(err);\n });\n}", "function getSummaryReport() {\n var result;\n result = {\n table: {\n widths: ['*'],\n body: [\n [{\n text: 'DILAPIDATION SURVEY REPORT SUMMARY',\n style: 'tableHeader'\n }],\n [{\n text: getIt('surveyReportSummary'),\n style: 'tableText'\n }]\n ]\n }\n };\n return result;\n}", "function writeHTML() {\n let html = render(teamMembers);\n writeToFile('./dist/team.html', html);\n}", "function generateTeamReport() {\n var dialog1 = {\n 'title': 'Response Form',\n 'customTitle': false,\n 'subText': 'Would you like to generate a team report?'\n };\n \n var dialog2 = {\n 'title': 'Enter Time Tracking Response Link',\n 'subText': 'Please enter the response link to generate team report:'\n };\n \n reportDialog(dialog1, createTeamReport, dialog2);\n}", "function buildTeamHtml() {\n if (!fs.existsSync(OUTPUT_DIR)) {\n fs.mkdirSync(OUTPUT_DIR);\n }\n fs.writeFileSync(outputPath, render(teamMembersArr), 'utf8');\n}", "function writeHtml() {\n const html = render(teamMembers);\n fs.writeFileSync(\"./output/team.html\", html, \"utf8\");\n}", "function writeHTML() {\n let html = starterCode.getStarterCode();\n fs.writeFile(\"./output/index.html\", html, (err) => {\n if (err) throw err;\n });\n}", "function outputPageContent() {\n \n $('#APIdata').html(outhtml); // this prints the apidata in the blank div section in the html\n }", "function reportToString(data){\n var myJSON = data.scans;\n const keys = Object.keys(myJSON);\n var values = Object.values(myJSON);\n\n printfyHead();\n\n for( k in keys){\n console.log(keys[k]);\n var result = JSON.stringify(values[k]);\n result = result.replace(/\\\"/g, \"\"); // removes \"}\" and ' \"\" '\n result = result.replace(/\\{|\\}/g, \"\");\n console.log(result); // object type\n printfyBody(result, keys[k]);\n }\n\n}", "function weeklystatusreport (request, response) {\n var contextData = {};\n response.render('weekly-status-report.html', contextData);\n}", "function populateHtmlAndWriteToFile(teamMembers) {\n const fileName = \"./dist/team.html\";\n const html = baseHtmlTemplate.renderBaseHtml(teamMembers);\n console.log(\"******************TEAM PROFILE HTML GENERATED FOR DISPLAY******************\")\n return fsPromises.writeFile(fileName, html)\n}", "function printStructure( obj ){\r\tvar result = toStringObj( obj );\r\tif( result == null || result == undefined ) {\r\t\talert(\"non result\");\r\t\treturn;\r\t}\r\t\r\tvar outputPath = baseURL+ baseDir;\r\tvar filePath = outputPath;\r\t\r if(File.fs == \"Windows\" ) {\r filePath.replace(/([A-Za-z]+)\\:(.*)/,\"file:///\" +RegExp.$1+\"|\"+RegExp.$2 );\r filePath = \"file:///\" +RegExp.$1+\"|\"+RegExp.$2;\r }\r else {\r //dir.replace(/([A-Za-z]+)\\:(.*)/,\"file:///\" +RegExp.$1+\"|\"+RegExp.$2 );\r filePath = \"file://Macintosh HD\" + filePath;\r }\r\r var htmlFile = new File( outputPath + getNameRemovedExtendType(document) + \".html\");\r\thtmlFile.open(\"w\");\r\thtmlFile.encoding = \"utf-8\";\r \r var cssFileName = getNameRemovedExtendType(document) + \".css\";\r var cssFile = new File( outputPath + cssFileName);\r\tcssFile.open(\"w\");\r\tcssFile.encoding = \"utf-8\";\r var css = [];\r var html = [\r '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">',\r'<html>',\r'\t<head>',\r'\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />',\r'\t\t<title></title>',\r'\t\t<link rel=\"stylesheet\" charset=\"utf-8\" href=\"' + cssFileName + '\" media=\"all\" />',\r'\t</head>',\r'\t<body>'];\r \r css.push('.artlayer { position: absolute; overflow: hidden; }');\r css.push('.text { position: absolute; }');\r for (var i=0,l=obj.length;i<l;i++)\r {\r if (obj[i].type == \"image\")\r {\r html.push('\t\t<div id=\"image' + i + '\" class=\"artlayer\"></div>');\r css.push('#image' + i + ' { left:' + parseInt( obj[i].position[0] ) +'px; top: ' + parseInt( obj[i].position[1] ) +'px; width: ' + obj[i].width + 'px; height: ' + obj[i].height + 'px; background-image: url(\"' + unescape(obj[i].filename) + '\"); background-size: ' + obj[i].width + 'px ' + obj[i].height + 'px; }');\r }\r else\r {\r html.push('\t\t<div id=\"text' + i + '\" class=\"text\">' + obj[i].text +'</div>');\r css.push('#text' + i + ' { left:' + parseInt( obj[i].position[0] ) +'px; top: ' + parseInt( obj[i].position[1] ) +'px; width: ' + obj[i].width + 'px; height: ' + obj[i].height + 'px; }');\r }\r }\r \r html.push('\t</body>');\r html.push('</html>');\r htmlFile.write(html.join(\"\\n\"));\r htmlFile.close();\r cssFile.write(css.join(\"\\n\"));\r cssFile.close();\r \r}", "function outputResponse(data, page) {\r\n let output = '';\r\n\r\n if (page === 'films') {\r\n data.results.forEach(item => {\r\n // Append resutls into empty output string\r\n output += `\r\n <div class=\"card m-1 p-4\" style=\"opacity:.8\">\r\n <h3 class=\"card-title text-center\" style=\"width: 18rem;\">${item.title}</h3>\r\n <div class=\"card-content\">\r\n <p class=\"card-text text-center\">Producer: ${item.producer}</p>\r\n <p class=\"card-text text-center\">Director: ${item.director}</p>\r\n <p class=\"card-text text-center\">Release date: ${item.release_date}</p>\r\n <p class=\"card-text text-center\">\r\n <span class=\"quote\">\"</span>\r\n ${item.opening_crawl}\r\n <span class=\"quote\">\"</span>\r\n </p>\r\n </div>\r\n </div>\r\n `;\r\n })\r\n }\r\n if (page === 'people') {\r\n data.results.forEach(item => {\r\n output += `\r\n <div class=\"card m-1 p-2\" style=\"opacity:.8\">\r\n <h3 class=\"card-title text-center\">${item.name}</h3>\r\n <div class=\"card-content\">\r\n <p class=\"card-text\">Gender: ${item.gender}</p>\r\n <p class=\"card-text\">Height: ${item.height}</p>\r\n <p class=\"card-text\">Weight: ${item.mass}</p>\r\n <p class=\"card-text\">Skin Colour: ${item.skin_color}</p>\r\n </div>\r\n </div>\r\n `\r\n })\r\n }\r\n\r\n if (page === 'planets') {\r\n data.results.forEach(item => {\r\n output += `\r\n <div class=\"card m-1 p-2\" style=\"opacity:.8\">\r\n <h3 class=\"card-title text-center\">${item.name}</h3>\r\n <div class=\"card-content\">\r\n <p class=\"card-text\">Diameter: ${item.diameter}</p>\r\n <p class=\"card-text\">Year Length: ${item.orbital_period} days</p>\r\n <p class=\"card-text\">Day Length: ${item.rotation_period} hours</p>\r\n <p class=\"card-text\">Terrain: ${item.terrain}</p>\r\n </div>\r\n </div>\r\n `\r\n })\r\n }\r\n\r\n if (page === 'starships') {\r\n data.results.forEach(item => {\r\n output += `\r\n <div class=\"card m-1 p-2\" style=\"opacity:.8\">\r\n <h3 class=\"card-title text-center\">${item.name}</h3>\r\n <div class=\"card-content\">\r\n <p class=\"card-text\">Crew: ${item.crew}</p>\r\n <p class=\"card-text\">Hyper Drive Class: ${item.hyperdrive_rating}</p>\r\n <p class=\"card-text\">Model: ${item.model} hours</p>\r\n <p class=\"card-text\">Passengers: ${item.passengers}</p>\r\n </div>\r\n </div>\r\n `\r\n })\r\n }\r\n // Add data to page\r\n results.innerHTML = output;\r\n}", "function build() {\n //conditional statement that checks if the output directory has been created\n if(!fs.existsSync(OUTPUT_DIR)) {\n fs.mkdirSync(OUTPUT_DIR)\n\n }\n //validation of dir and path variables\nconsole.log(OUTPUT_DIR, outputPath)\n//this writes the html file\nfs.writeFileSync(outputPath, render(members), \"utf-8\")\n\n}", "function renderCvtPage(data) { \n // get cvt data from API call...\n $.getJSON(\"api/cvt\", function(data) {\n // generate the proper HTML...\n generateAllCvtHTML(data);\n\n var page = $('.cvt-report');\n page.addClass('visible'); \n });\n }", "function Report() {\n this.json = new reportformat.Reportformat('json', '.json');\n this.txt = new reportformat.Reportformat('txt', '.txt');\n /**\n * Format of the report file.\n *\n * @private\n */\n this.format = this.json;\n /**\n * The report filepath.\n *\n * @private\n */\n this.filepath = 'report';\n}", "function writeResults(aTestcases) {\n var tc = 0;\n var output = \"\"; //why initialize\n//document.domain = \"mcom.com\";\n//added by stummala to get suitename when running all suites...\n//for forms u can see this in /cgi-bin/forms2.cgi\n if (aTestcases[tc].filename == \"catt001.html\") {\n \t output = '<A NAME=\"dom-core\"><H1> DOM CORE/HTML </H1>';\n }\n else if (aTestcases[tc].filename == \"dhtml001.html\") {\n \t output = '<A NAME=\"dhtml\"><H1> DHTML </H1>';\n }\n else if (aTestcases[tc].filename == \"sc2p000.html\") {\n \t output = '<A NAME=\"domcss\"><H1> DOM CSS </H1>';\n }\n else if (aTestcases[tc].filename == \"areanode.html\") {\n \t output = '<A NAME=\"inhr\"><H1> INHERITANCE </H1>';\n }\n else if (aTestcases[tc].filename == \"are001.html\") {\n \t output = '<A NAME=\"javascript\"><H1> JAVASCRIPT </H1>';\n }\n \n // Writes Test Filename and Creates Table\n output = output + '<H3>' + aTestcases[tc].filename + '</H3>' + '<TABLE BORDER=1>\\n <TBODY>\\n';\n \n // Writes Header\n output = output + ' <TR><TD><B>Description</B></TD>\\n <TD><B>Pass</B></TD>\\n ' +\n '<TD><B>Bug Number</B></TD>\\n <TD><B>Actual Result</B></TD>';\n if (top.name != \"testWindow\") {\n\t output += '\\n <TD><B>Expected Result</B></TD>';\n }\n output +='\\n </TR>\\n';\n\n // Iterates through Tests writing the Test Result\n for (tc=0; tc < aTestcases.length; tc++) {\n failed = (!aTestcases[tc].result);\n\n output += (' <TR>\\n <TD' + ((failed)?' bgcolor=red style=\"color:white;\"':'') +'>' + aTestcases[tc].testcase );\n\n // Writes Bug number for Failed Tests\n if (failed) {\n output += ('\\n <TD bgcolor=red style=\"color:white;\">failed');\n output += ('\\n <TD bgcolor=red style=\"color:white;\">' + aTestcases[tc].bug);\n output += ('\\n <TD bgcolor=red style=\"color:white;\">' + aTestcases[tc].actual);\n } else {\n output += (\"\\n <TD colspan=2>passed\");\n output += ('\\n <TD>' + aTestcases[tc].actual);\n }\n if (top.name != \"testWindow\") {\n output += ('\\n <TD>' + aTestcases[tc].expected);\n }\n output += ('\\n </TR>\\n');\n }\n\n output = output + ' </TBODY>\\n</TABLE>\\n\\n';\n document.results.textarea.value = output;\n\n\n if (top.name == \"testWindow\") {\n// document.results.submit(); submit() moved to BODY, it's failing here\n }\n else {\n document.write(document.results.textarea.value);\n //dump(document.results.textarea.value);\n }\n}", "function create_report(ResultString) {\r\n // Requirement to read and save JS file\r\n var fs = require(\"fs\");\r\n\r\n // Load data from exisitng JSON\r\n try {\r\n casedata = fs.readFileSync(`./reports/case_status.json`);\r\n casedata = JSON.parse(casedata);\r\n console.log(casedata);\r\n } catch (e) {\r\n var casedata; // Anweisungen für jeden Fehler\r\n console.log(e); // Fehler-Objekt an die Error-Funktion geben\r\n }\r\n\r\n // Get the positon in front end behind the TC_Number and slice it off\r\n // \"with status\" appears twice, that is why last Index is used to search from behind\r\n var TC_Number_PosFront, TC_Number_PosBack, TC_Number, TC_Status;\r\n TC_Number_PosFront = ResultString.search(\"Suite finished: \");\r\n TC_Number_PosBack = ResultString.lastIndexOf(\" with status:\");\r\n\r\n // SLice the Number and Staus\r\n TC_Number = ResultString.slice(TC_Number_PosFront + 16, TC_Number_PosBack);\r\n TC_Status = ResultString.slice(\r\n TC_Number_PosBack + 14,\r\n TC_Number_PosBack + 20\r\n );\r\n\r\n console.log(\"TC_Number: \" + TC_Number);\r\n console.log(\"TC_Status: \" + TC_Status);\r\n\r\n // Get current time\r\n var currentdate = new Date();\r\n var datetime =\r\n currentdate.getDate() +\r\n \"/\" +\r\n (currentdate.getMonth() + 1) +\r\n \"/\" +\r\n currentdate.getFullYear() +\r\n \" @ \" +\r\n currentdate.getHours() +\r\n \":\";\r\n var min = currentdate.getMinutes();\r\n\r\n if (min < 10) {\r\n min = \"0\" + min;\r\n } else {\r\n min = min + \"\";\r\n }\r\n console.log(min);\r\n\r\n datetime = datetime + min;\r\n\r\n // Save Result in ONject called JSON\r\n var JSON_String = {\r\n cases: [\r\n { TC_Number: TC_Number, TC_Status: TC_Status, Current_Time: datetime },\r\n ],\r\n };\r\n\r\n writeCaseData(TC_Number, TC_Status, datetime);\r\n\r\n try {\r\n // Saves new string into old results\r\n casedata[\"cases\"].unshift({\r\n TC_Number: TC_Number,\r\n TC_Status: TC_Status,\r\n Current_Time: datetime,\r\n });\r\n } catch (e) {\r\n // If it does not exist, make new file\r\n var casedata = JSON_String;\r\n }\r\n\r\n // Parses the object to an JSON\r\n var TC_JSON = JSON.stringify(casedata);\r\n console.log(casedata);\r\n\r\n // Write JSON in JSON File\r\n\r\n fs.writeFile(\"./reports/case_status.json\", TC_JSON, function (err) {\r\n if (err) {\r\n console.log(err);\r\n }\r\n });\r\n}", "function jsonToHTML (data) {\n \n var html;\n \n \n \n return html;\n}", "function buildPage(file, data) {\n // Create a file called teamprofilepage.html, adding the input data transformed by generateHTML.js formatting.\n fs.writeFile(\"./dist/teampage.html\", generateHTML(data), function (error) {\n // If file created successfull, notify user of success in the command line interface. If error, notify user in the command line interface.\n if(error) {\n console.log(\"An unknown error occurred.\")\n }\n else {\n console.log(\"Your teampage.html file has been created successfully!\")\n }\n })\n}", "function html(object, root) {\n var doc, docStart, docEnd, sectionStart, sectionEnd, s;\n \n // templates\n docStart = '<html><head>'\n docStart += '<title>{title}</title>'\n docStart += '<link rel=\"stylesheet\" href=\"'+root+'/files/html.css\" />'\n docStart += '</head><body>';\n sectionStart = \"<h1>{section}</h1><div>\";\n sectionEnd = \"</div>\";\n docEnd = \"</body></html>\";\n \n doc = \"\";\n doc += docStart;\n \n // handle sections\n s=\"\";\n for(s in object) {\n doc += sectionStart.replace(\"{section}\",s);\n doc = doc.replace(\"{title}\",s);\n \n switch(s) {\n case \"home\":\n doc += processHome(object[s], root);\n break;\n case \"task\":\n doc += processTasks(object[s], root, s);\n break;\n case \"category\":\n doc += processCategory(object[s], root, s);\n break;\n case \"user\":\n doc += processUser(object[s], root, s);\n break;\n case \"actions\":\n doc += processActions(object[s], root, s);\n break;\n case \"error\":\n doc += processError(object[s], root);\n break;\n default:\n doc += \"<pre>\"+JSON.stringify(object, null, 2)+\"<pre>\";\n break;\n }\n doc += sectionEnd;\n }\n doc += docEnd;\n \n return doc;\n}", "function html(data) {\n if (data.type == \"heading\") {\n $(\"div\")\n .add(\"<h1>\" + data.model.text + \"</h1>\")\n .appendTo(document.getElementById(\"one\"));\n } else if (data.type == \"paragraph\") {\n $(\"div\")\n .add(\"<p>\" + data.model.text + \"</p>\")\n .appendTo(document.getElementById(\"one\"));\n } else if (data.type == \"image\") {\n $(\"div\")\n .add(\n \"<img src=\" +\n data.model.url +\n \" alt=\" +\n data.model.altText +\n \" height=\" +\n data.model.height +\n \" width=\" +\n data.model.width +\n \"/>\"\n )\n .appendTo(document.getElementById(\"one\"));\n } else if (data.type == \"list\") {\n if (data.model.type == \"unordered\") {\n $(\"div\")\n .add(\"<ul>\")\n .appendTo(document.getElementById(\"one\"));\n $.each(data.model.items, function(i, dat) {\n $(\"div\")\n .add(\"<li>\" + dat + \"</li>\")\n .appendTo(document.getElementById(\"one\"));\n });\n $(\"div\")\n .add(\"</ul>\")\n .appendTo(document.getElementById(\"one\"));\n } else {\n //works if the json file contains ordered lists\n $(\"div\")\n .add(\"<ol>\")\n .appendTo(document.getElementById(\"one\"));\n $.each(data.model.items, function(i, dat) {\n $(\"div\")\n .add(\"<li>\" + dat + \"</li>\")\n .appendTo(document.getElementById(\"one\"));\n });\n $(\"div\")\n .add(\"</ol>\")\n .appendTo(document.getElementById(\"one\"));\n }\n }\n}", "function displayAssessmentReport(result){\n var keys=Object.keys(result[0]);\n\n //tempArray is used to store one type of grade (hw,exam,or proj) at a time:\n var tempArray=[];\n\n //outter for is to loop on the keys that are available in each student object,\n //i.e gives one grade type at a time.\n for (var i=0; i<=keys.length-1; i++){\n\n //the inside foreach loops on all students.\n result.forEach(function(element){\n if (element[keys[i]] !== null){\n tempArray.push(element[keys[i]]);\n }\n });\n\n //if it is not an empty array then scale it and update the view.\n if(tempArray.length > 0){\n //scale one grade type at a time:\n scale(tempArray);\n\n //re empty the tempArray for the next iteration.\n tempArray=[];\n\n //Updating the View:\n var $tr=$(\"<tr class='assessment-report'>\"), $th=$(\"<th>\"), $tdT=$(\"<td>\"), $tdAB=$(\"<td>\"), $tdC=$(\"<td>\"), $tdDF=$(\"<td>\");\n\n //appending table data tags to a table row.\n $th.text(keys[i]);\n $tr.append($th);\n $tdT.text(assessmentScale.total);\n $tr.append($tdT);\n $tdAB.text(assessmentScale.satisfactory);\n $tr.append($tdAB);\n $tdC.text(assessmentScale.developing);\n $tr.append($tdC);\n $tdDF.text(assessmentScale.unsatisfactory);\n $tr.append($tdDF);\n\n //populating download obj and array with data, this data is sent to the server when generating pdf report.\n var assessmentObj={workType:\"\", totalNum:\"\", satisfactory:\"\", developing:\"\", unsatisfactory:\"\"};\n assessmentObj.workType= keys[i];\n assessmentObj.totalNum= assessmentScale.total;\n assessmentObj.satisfactory= assessmentScale.satisfactory;\n assessmentObj.developing= assessmentScale.developing;\n assessmentObj.unsatisfactory= assessmentScale.unsatisfactory;\n assessmentArray.push(assessmentObj);\n\n //appending the table row to the whole table.\n $(\".assessment-report-table\").append($tr);\n }//end if\n }//end of outter for.\n}//end of displayAssessmentReport function.", "saveAsOneFile() {\r\n // HTML exportation\r\n this.saveFile('index', 'HTML', this.content)\r\n // We show the export result\r\n setTimeout(this.showOutput, 2500)\r\n }", "function writeToDocument(url) {\n // body...\n var tableRows = [];\n var el = document.getElementById(\"data\");\n el.innerHTML = \"\";\n \n getData(url, function(data){\n //browse trough object and see format\n //console.dir(data);\n var pagination;\n if (data.next || data.previous ){\n pagination = generatePaginationButtons(data.next, data.previous)\n }\n \n data = data.results;\n var tableHeaders = getTableHeaders(data[0]);\n \n data.forEach(function(item){\n //iterate over keys\n // Object.keys(item).forEach(function(key){\n // console.log(key);\n // })\n // el.innerHTML += \"<p>\" + item.name + \"</p>\";\n var dataRow = [];\n \n Object.keys(item).forEach(function(key){\n var rowData = item[key].toString();\n var truncatedData = rowData.substring(0, 15);\n dataRow.push(`<td>${truncatedData}</td>`);\n });\n tableRows.push(`<tr>${dataRow}</tr>`);\n });\n \n el.innerHTML = `<table>${tableHeaders}${tableRows}</table>${pagination}`.replace(/,/g, \"\");\n \n });\n}", "function completedFile(employees) {\n console.log(\"Success!\");\n const html = generatePage(employees);\n writeFileAsync(\"./dist/team-profile.html\", html, \"utf-8\");\n}", "function buildTeamPage(){\nconst data = render(teamMembers);\n\nfs.writeFile(outputPath, data, (err) => {\n if (err) throw err;\n console.log('The file has been saved!');\n});\n}", "async buildHTML() {\n const readFileAsync = util.promisify(fs.readFile);\n const writeFileAsync = util.promisify(fs.writeFile);\n try{\n let mainHTML = await readFileAsync(\"./templates/main.html\", \"utf8\");\n const managerHTML = await this.employees[0].getHTML();\n const engineerHTMLarr = [];\n const internHTMLarr = [];\n for(const employee of this.employees) {\n let role = employee.getRole();\n let html = \"\";\n if(role === \"Engineer\") {\n html = await employee.getHTML();\n engineerHTMLarr.push(html);\n }\n else if(role === \"Intern\") {\n html = await employee.getHTML();\n internHTMLarr.push(html);\n }\n } \n \n const engineerHTML = engineerHTMLarr.join(\"\\n\");\n const internHTML = internHTMLarr.join(\"\\n\");\n mainHTML = mainHTML.replace(/%manager%/, managerHTML);\n mainHTML = mainHTML.replace(/%engineers%/, engineerHTML);\n mainHTML = mainHTML.replace(/%interns%/, internHTML);\n \n await writeFileAsync(\"./output/team.html\", mainHTML);\n }\n catch(err) {\n console.log(err);\n }\n console.log(\"File written! Goodbye!\");\n process.exit(0);\n }", "function generaReportAccessi(){\n\t\n\twindow.location.href= \"/CruscottoAuditAtpoWebWeb/jsonATPO/getReportAccessoPDF\";\n\t\n}", "function writeHTML(array) { \n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n \n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <title>Team Profile Generator</title>\n <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css\" integrity=\"sha512-HK5fgLBL+xu6dm/Ii3z4xhlSUyZgTT9tuc/hSrtw6uzJOvgRr2a9jyxxT1ely+B+xFAmJKVSTbpM/CuL7qxO8w==\" crossorigin=\"anonymous\" />\n <link rel=\"stylesheet\" href=\"./dist/style.css\">\n </head>\n\n <body>\n <header>\n <h1>\n Team Profile \n </h1>\n </header>\n\n <main>\n <div class=\"main\">\n ${writeEmployees(array)}\n </div>\n </main>\n </body>\n `\n}", "function getReports() {\n const endpoint = BASE_URL + \"/report/readAll\";\n return fetch(endpoint).then((res) => res.json());\n}", "function generateReport(id, name)\r\n{\r\n\t//Tracker#13895.Removing the invalid Record check and the changed fields check(Previous logic).\r\n\r\n // Tracker#: 13709 ADD ROW_NO FIELD TO CONSTRUCTION_D AND CONST_MODEL_D\r\n\t// Check for valid record to execute process(New logic).\r\n \tif(!isValidRecord(true))\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\r\n\t//Tracker# 13972 NO MSG IS SHOWN TO THE USER IF THERE ARE CHANGES ON THE SCREEN WHEN USER CLICKS ON THE REPORT LINK\r\n\t//Check for the field data modified or not.\r\n\tvar objHtmlData = _getWorkAreaDefaultObj().checkForNavigation();\r\n\r\n\tif(objHtmlData!=null && objHtmlData.hasUserModifiedData()==true)\r\n {\r\n //perform save operation\r\n objHtmlData.performSaveChanges(_defaultWorkAreaSave);\r\n }\r\n else\r\n {\r\n\t\tvar str = 'report.do?id=' + id + '&reportname=' + name;\r\n \toW('report', str, 800, 650);\r\n }\r\n\r\n}", "function getReport(){\n\n }", "async function main() {\n try {\n await prompt()\n // for i to teamArray.length => \n\n for (let i = 0; i < teamArray.length; i++) {\n //template literal=``\n teamstr = teamstr + html.generateCard(teamArray[i]);\n }\n\n let finalHTML = html.generateHTML(teamstr)\n\n console.log(teamstr)\n\n //call generate function to generate the html template literal\n\n //write file \n writeFileAsync(\"./output/index.html\", finalHTML)\n\n\n } catch (err) {\n return console.log(err);\n }\n}", "function createHtmlFile(employeeArr) {\n for (let i = 0; i < employeeArr.length; i++) {\n let employee = employeeArr[i];\n\n // runs through the employee array and dynamically generates html cards depending on what the role of the person is\n if (employee.role === 'Manager') {\n // pushes the manager card to the html array\n htmlArr.push(managerCard(employee.name, employee.id, employee.email, employee.officeNumber));\n } else if (employee.role === 'Engineer') {\n // pushes the engineer card to the html array\n htmlArr.push(engineerCard(employee.name,employee.id, employee.email, employee.github));\n } else if (employee.role === 'Intern') {\n // pushes the intern card to the html array\n htmlArr.push(internCard(employee.name, employee.id, employee.email, employee.school));\n }\n }\n\n // joins the html array so that it can be inserted into the html template\n const employeeHtml = htmlArr.join('');\n\n // write the final html file to the dist folder\n writeFile(generateHtml(employeeHtml));\n\n console.log('Your team profile has been created in the dist folder!');\n}", "function generate_html_results(data) {\n var tdlist = $(\"#hud_hca_api_results_table tbody\");\n tdlist.html(\"\");\n\n if ( cfpb_hud_hca.check_hud_data(data) === true ) {\n // Hide the message div, show the table\n $(\"#hud_hca_api_message\").hide();\n $(\"#hud_hca_api_results_table\").show();\n\n // Iterate through each result, creating an TD and inserting the data\n var agencies = data.counseling_agencies;\n $.each(agencies, function(i, val) {\n // Clone template TR and append it\n $(\"#hud_hca_api_row_template tr\").clone().appendTo( tdlist );\n\n // Define listing so we can work on the right TD\n var listing = tdlist.find(\"tr\").last();\n var number = i + 1;\n if (number < 10) {\n number = \"0\" + number;\n }\n listing.attr(\"id\", \"hud-result-\" + number);\n\n var numlist = tdlist.find(\".hud_hca_api_num\").last();\n var listnumber = i + 1;\n numlist.prepend(listnumber + \".\");\n\n // Set and insert the agency name\n var name = val.nme;\n listing.find(\".hud_hca_api_counselor\").html(name);\n\n // Set and insert the street address\n var address = val.adr1;\n var address2 = val.adr2;\n if (address2 != null) {\n if ($.trim(address2) != \"\") {\n address += \"<br>\" + address2;\n }\n }\n listing.find(\".hud_hca_api_adr\").html(address);\n\n // Set and insert city, state and zip code\n var region = val.city + \", \" + val.statecd;\n region += \" \" + val.zipcd;\n listing.find(\".hud_hca_api_region\").html(region);\n\n // Insert distance in miles\n listing.find(\".hud_hca_api_miles\").html(val.distance);\n\n // Add link to valid web sites\n var weburl = val.weburl;\n if ( weburl != \"Not available\") {\n weburl = '<a href=\"' + weburl + '\">' + weburl + '</a>';\n }\n // Insert weburl\n listing.find(\".hud_hca_api_site\").html(weburl);\n\n // Determine phone number and insert result\n var phone = val.phone1;\n listing.find(\".hud_hca_api_tel\").html(phone); \n\n // Turn valid email addresses into links\n var email = val.email;\n if ( email != \"Not available\" ) {\n email = '<a href=\"mailto:' + email + '\">' + email + '</a>';\n }\n // Insert result\n listing.find(\".hud_hca_api_email\").html(email);\n\n // Determine languages and insert result\n var languages = val.languages;\n listing.find(\".hud_hca_api_lang\").html(languages); \n\n // Determine services and insert result\n var services = val.services;\n // Reformat services\n var serv = services.split(\",\");\n $.each(serv, function(i, v) {\n v = $.trim(v);\n listing.find(\".hud_hca_api_serv\").append('<span class=\"hud_hca_api_serv_item\">' + v + \"</span>\");\n });\n });\n // Show the search results meta container.\n $(\"#hud_hca_api_results_info\").show();\n }\n else {\n if ( cfpb_hud_hca.check_hud_data(data) == \"error\" ) {\n $(\"#hud_hca_api_message\").show().html(\"<p>Sorry, you have entered an invalid zip code.</p>\");\n $(\"#hud_hca_api_message\").append(\"<p>Please enter a valid five-digit ZIP code above.</p>\");\n }\n // Faulty/nonexistent data, hide the table\n $(\"#hud_hca_api_results_info\").hide();\n $(\"#hud_hca_api_results_table\").hide();\n }\n }", "function serveHTML(resource, sekiResponse, queryResponse) {\n\n\t// set up HTML builder\n\tvar viewTemplater = templater(htmlTemplates.viewTemplate);\n\t// verbosity(\"GOT RESPONSE \");\n\n\tvar saxer = require('./srx2map');\n\tvar stream = saxer.createStream();\n\n\tsekiResponse.pipe(stream);\n\n\tqueryResponse.on('data', function(chunk) {\n\t\tstream.write(chunk);\n\t});\n\n\tqueryResponse.on('end', function() {\n\n\t\tstream.end();\n\n\t\tvar bindings = stream.bindings;\n\t\tif (bindings.title) { // // this is ugly\n\t\t\tverbosity(\"GOT: \" + JSON.stringify(bindings));\n\t\t\t// verbosity(\"TITLE: \" + bindings.title);\n\t\t\tverbosity(\"WRITING HEADERS \" + JSON.stringify(sekiHeaders));\n\t\t\tsekiResponse.writeHead(200, sekiHeaders);\n\t\t\tvar html = viewTemplater.fillTemplate(bindings);\n\t\t} else {\n\t\t\tverbosity(\"404\");\n\t\t\tsekiResponse.writeHead(404, sekiHeaders);\n\t\t\t// /////////////////////////////// refactor\n\t\t\tvar creativeTemplater = templater(htmlTemplates.creativeTemplate);\n\t\t\tvar creativeMap = {\n\t\t\t\t\"uri\" : resource\n\t\t\t};\n\t\t\tvar html = creativeTemplater.fillTemplate(creativeMap);\n\t\t\t// ///////////////////////////////////////////\n\t\t\t// serveFile(sekiResponse, 404, files[\"404\"]);\n\t\t\t// return;\n\t\t}\n\t\t// sekiResponse.writeHead(200, {'Content-Type': 'text/plain'});\n\t\t// verbosity(\"HERE \"+html);\n\t\t// sekiResponse.write(html, 'binary');\n\t\tsekiResponse.end(html);\n\t});\n}", "function generateAllCvtHTML(data) {\n \n var list = $('.cvt-report .cvt-list');\n var templateScript = $('#cvt-template').html();\n\n // compile template\n var template = Handlebars.compile(templateScript);\n list.append(template(data));\n }", "function buildTeam() {\n\n //this function uses the file system to create an html file with the data collected from user prompts. It puts the file in the directory specified by the output\n //path argument. It uses the render function to inject the collected user data sitting in the teamArray into the template js file, and uses that to generate the html\n fs.writeFileSync(output_path, render(teamArray), \"utf-8\");\n}", "async function mainExport(report, project) {\n await Report.find({ _id: report._id })\n .populate(\"photos\")\n .exec(function (err, report) {\n\n //creating the outputs for the various arrays inside the report\n let purpose = report[0].purposeOfReview\n .map(note => `<li style=\"font-size:18px; margin-top:5px;\">${note}</li>`)\n .join(\"\");\n let deficiencies = report[0].deficienciesNoted\n .map(note => `<li style=\"font-size:18px; margin-top:5px;\">${note}</li>`)\n .join(\"\");\n let miscNotes = report[0].miscellaneousNotes\n .map(note => `<li style=\"font-size:18px; margin-top:5px;\">${note}</li>`)\n .join(\"\");\n let date = report[0].date;\n let time = report[0].time;\n let weather = report[0].weather;\n let reportNumber = report[0].reportNumber;\n let contractors = project.contractors;\n let projectNumber = project.projectNumber;\n let projectName = project.projectName;\n let location = project.location;\n\n let workCompleted = report[0].workCompleted\n .map(\n section =>\n `<li><h3 style='margin-bottom:5px;font-size:20px; text-transform: capitalize;'>${\n section.title\n }</h3><ul style='margin-top: 0; padding-left: 20px;'>${section.notes\n .map(\n note =>\n `<li style=\"font-size: 18px; font-weight:normal\">${note}</li>`\n )\n .join(\"\")}</ul></li>`\n )\n .join(\"\");\n\n const emailBody = `\n <section style='font-family: Arial, Helvetica, sans-serif; color:#202020'>\n <h1 style='margin-bottom: 0;font-size:25px;'>\n Site Visit Report ${reportNumber}\n </h1>\n <div>\n <table>\n <tbody>\n <tr>\n <td style='font-weight: 600; font-size:18px; text-align: right;'>Project:</td>\n <td style='font-size:18px;'>${projectName}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Location:</td>\n <td style='font-size:18px;'>${location}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Date:</td>\n <td style='font-size:18px;'>${date}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Time:</td>\n <td style='font-size:18px;'>${time}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Weather:</td>\n <td style='font-size:18px;'>${weather}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>File Number:</td>\n <td style='font-size:18px;'>${projectNumber}</td>\n </tr>\n <tr>\n <td style='font-weight: 600;font-size:18px; text-align: right;'>Contractors:</td>\n <td style='font-size:18px;'>${contractors.join(\", \") ||\n \"Dale Shlass\"}</td>\n </tr>\n </tbody>\n </table>\n\n <section>\n <h2 style='font-size:22px; margin-bottom: 0; text-decoration: underline'>Purpose of Review</h2>\n <ul style='margin-top: 0; padding-left: 20px;'>\n ${purpose ||\n '<li style=\"font-size:18px; margin-top:5px;\">None noted.</li>'}\n </ul>\n </section>\n\n <section>\n <h2 style='font-size:22px; margin-bottom: 0; text-decoration: underline'>Deficiencies Noted</h2>\n <ul style='margin-top: 0; padding-left: 20px;'>\n ${deficiencies ||\n '<li style=\"font-size:18px; margin-top: 5px;\">None noted.</li>'}\n </ul>\n </section>\n\n <section>\n <h2 style=' font-size:22px; margin-bottom: 0; text-decoration: underline'>\n Work Underway/Completed\n </h2>\n ${\n workCompleted\n ? `<ol style='font-weight: 600; font-size: 20px;'>${workCompleted}<ol>`\n : '<ul style=\"margin-top: 0; padding-left: 20px;\"><li style=\"font-size:18px; margin-top: 5px;\">No work in progress at the time of site visit.</li></ul>'\n }\n </section>\n\n <section>\n <h2 style=' font-size:22px; margin-bottom: 0; text-decoration: underline'>Miscellaneous Notes</h2>\n <ul style='margin-top: 0; padding-left: 20px;'>\n ${miscNotes ||\n '<li style=\"font-size:18px; margin-top: 5px;\">None noted.</li>'}\n </ul>\n </section>\n </div>\n <section>\n <h2 style=' font-size:22px; margin-bottom: 0; text-decoration: underline'>Photos</h2>\n <p style='margin-top: 5px; font-size:18px;'>Please see attachments.</p>\n </section>\n <section>\n <p style=\"font-size: 18px; margin-bottom: 20px;\">Should you have any questions, please contact the undersigned.</p>\n <p style=\"font-size: 18px; margin-bottom: 20px;\">Site Assistant Built By:</p>\n <p style=\"font-size: 18px; margin-bottom: 5px;\">Dale Shlass, EIT</p>\n <p style=\"font-size: 18px; margin-bottom: 5px;margin-top: 0px;\">Web Developer</p>\n <a style=\"display: block;font-size: 18px;text-decoration: none;color: rgba(32, 32, 32, 1); \" href='tel:+14169187713'>416-918-7713</a>\n <a style=\"display: block;font-size: 18px;text-decoration: none;color: rgba(32, 32, 32, 1); margin-bottom: 5px;\" href='mailto:[email protected]'>[email protected]</a>\n <a style=\"display: block;font-size: 18px;text-decoration: none; margin-top: 10px;float: left; background: #0077B5;color: white;padding: 5px 20px;border-radius: 20px;\" href='https://www.linkedin.com/in/dshlass/'>LinkedIn</a>\n <a style=\"display: block;font-size: 18px;text-decoration: none; margin-top: 10px;float: left; border: 1px solid #24292E; background: #fff; color: #24292E; padding: 5px 20px; border-radius: 20px; margin-left: 40px;\" href='https://www.github.com/dshlass/'>GitHub</a>\n </section>\n </div>\n </section>`;\n\n let photoSection = [];\n\n for (let image of report[0].photos) {\n var base64data = Buffer.from(image.image, \"binary\").toString(\"base64\");\n photoSection.push({\n filename: `ReportPhoto.png`,\n content: base64data,\n encoding: \"base64\"\n });\n }\n\n var transporter = nodemailer.createTransport({\n service: \"gmail\",\n auth: {\n user: process.env.NODEMAIL_USER,\n pass: process.env.NODEMAIL_PASS\n }\n });\n\n console.log(transporter);\n\n let info = transporter.sendMail({\n from: `\"Site Assistant ✅\" <${process.env.NODEMAIL_USER}>`, // sender address\n to: `${project.recipients}`, // list of receivers\n subject: `${project.projectName} Site Visit ${[\"#\"].toString()}${\n report[0].reportNumber\n }`, // Subject line\n text: \"Your site report\", // plain text body\n html: emailBody,\n attachments: photoSection\n });\n\n console.log(\"Message sent to\", project.recipients.join(\" \"));\n });\n}", "getResponseHtml(heading, errors, displayBack) {\n const styles = require(\"fs\").readFileSync(\n __dirname + \"/../css/main.css\",\n \"utf-8\"\n );\n const minifyOptions = {\n collapseWhitespace: true,\n removeComments: true,\n collapseInlineTagWhitespace: true,\n minifyCSS: true\n };\n\n return minify(\n `\n <!doctype html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <title></title>\n <style>${styles}</style>\n <meta name=\"robots\" content=\"noindex,nofollow\">\n </head>\n <body>\n <div class=\"wrapper\">\n <div class=\"little-box\">\n ${this.getHeadingMarkup(heading)}\n ${this.getErrorsMarkup(errors)}\n ${this.getBackMarkup(displayBack)}\n </div>\n </div>\n </body>\n </html>\n `,\n minifyOptions\n );\n }", "getHtmlTemplateString(employeesObjectArray) {\n let employeeDetails = \"\";\n let iconHtml = \"\";\n const returnedHtmlObjects = [];\n //iterate over each employee\n for (const employee of employeesObjectArray) {\n // https://stackoverflow.com/questions/10314338/get-name-of-object-or-class\n const currentObjectTypeName = employee.constructor.name;\n //different employee types get different HTML\n if (currentObjectTypeName == \"Manager\") {\n employeeDetails = this.getHtmlManagerDetails(employee.getId(), employee.getEmail(), employee.getOfficeNumber());\n iconHtml = \"<i class='fas fa-tasks'></i>\";\n } else if (currentObjectTypeName == \"Engineer\") {\n employeeDetails = this.getHtmlEngineerDetails(employee.getId(), employee.getEmail(), employee.getGitHub());\n iconHtml = \"<i class='fas fa-laptop-code'></i>\";\n } else if (currentObjectTypeName == \"Intern\") {\n employeeDetails = this.getHtmlInternDetails(employee.getId(), employee.getEmail(), employee.getSchool());\n iconHtml = \"<i class='fas fa-glasses'></i>\";\n }\n //add each iteration to an array\n returnedHtmlObjects.push(this.getHtmlEmployeeString(employee.getName(), employee.getDescription(), iconHtml, currentObjectTypeName, employee.getImageUrl(), employeeDetails));\n }\n //pass the array to be wrapped and return constructed and formatted HTML\n const innerHtml = this.wrapInParentHtml(returnedHtmlObjects);\n return `\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Our Software Team</title>\n <link rel=\"stylesheet\" href=\"https://unpkg.com/[email protected]/css/bulma.min.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"./hero.css\">\n <script src=\"https://kit.fontawesome.com/e6ff202c8b.js\" crossorigin=\"anonymous\"></script>\n </head>\n <body>\n <section class=\"hero is-info is-small\">\n <div class=\"hero-body\">\n <div class=\"container has-text-centered\">\n <p class=\"title\">\n Our Software Team\n </p>\n </div>\n </div>\n </section>\n <section class=\"container\">\n ${innerHtml}\n </section>\n </body>\n </html>`.replace(/\\s+/g, ' ');\n }", "function exportReport(exportType) {\r\n\tvar network_id = $('#selectbox_agency').val();\r\n\tvar title= $('#selectbox_agency option:selected').text();\r\n\tvar loadingUrl = rootUrl + '/GenerateJasperReport' + '?export_type='\r\n\t\t\t+ exportType + '&jrxml=daily_vlmo&p_end_date='\r\n\t\t\t+ selectEndDate.format('yyyy-mm-dd') + '&p_start_date='\r\n\t\t\t+ selectStartDate.format('yyyy-mm-dd') + '&path=vlmo'\r\n\t\t\t+ \"&p_network_id=\" + network_id+\"&p_title=\"+title;\r\n\twindow.open(loadingUrl);\r\n}", "function createDetailsReport(banDoc, startDate, endDate, cardToPrint) {\r\n\r\n\tvar report = Banana.Report.newReport(\"Details\");\r\n\tvar headerLeft = Banana.document.info(\"Base\",\"HeaderLeft\");\r\n var headerRight = Banana.document.info(\"Base\",\"HeaderRight\");\r\n\r\n\tvar printAssetsLiabilities = false;\r\n\tvar printIncomeExpenses = false;\r\n\tvar printAll = false; \r\n\r\n\tif (cardToPrint === \"Assets / Liabilities\") {\r\n\t\tprintAssetsLiabilities = true;\r\n\t}\r\n\telse if (cardToPrint === \"Income / Expenses\") {\r\n\t\tprintIncomeExpenses = true;\r\n\t}\r\n\telse if (cardToPrint === \"All\") {\r\n\t\tprintAll = true;\r\n\t}\r\n\r\n\r\n\tif (printAssetsLiabilities || printAll) {\r\n\r\n\t\t//-----------------------------------------------------------------------------//\r\n\t\t// ASSETS \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //\r\n\t\t//-----------------------------------------------------------------------------//\r\n\r\n\t\t//Title\r\n\t\treport.addParagraph(headerLeft, \"heading2\");\r\n\t\treport.addParagraph(\"Assets with transactions details\", \"heading1\");\r\n\t\treport.addParagraph(Banana.Converter.toLocaleDateFormat(startDate) + \" - \" + Banana.Converter.toLocaleDateFormat(endDate), \"heading3\");\r\n\t\treport.addParagraph(\" \");\r\n\t\treport.addParagraph(\" \");\r\n\r\n\t\t//Create the table\r\n\t\tvar assetsTable = report.addTable(\"assetsTable\");\r\n\r\n\t\t//Accounts assets data\r\n\t\tvar assetsAccountForm = [];\r\n\t\tassetsAccountForm = getAccountsAssets(banDoc, assetsAccountForm);\r\n\r\n\t\t//Transactions assets data\r\n\t\tvar assetsTransactionForm = [];\r\n\t\tfor (var i = 0; i < assetsAccountForm.length; i++) {\r\n\t\t\tif (assetsAccountForm[i][\"Account\"]) {\r\n\t\t\t\tgetTransactions(banDoc, assetsAccountForm[i][\"Account\"], startDate, endDate, assetsTransactionForm);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//ACCOUNTS ASSETS DETAILS\r\n\t\tfor (var i = 0; i < assetsAccountForm.length; i++) {\r\n\r\n\t\t\t//We take only accounts with a balance value\r\n\t\t\tif (assetsAccountForm[i][\"Balance\"]) {\r\n\t\t\r\n\t\t\t\t//Account\r\n\t\t\t\tif (assetsAccountForm[i][\"Account\"]) {\r\n\t\t\t\t \ttableRow = assetsTable.addRow();\r\n\t\t\t\t \ttableRow.addCell(assetsAccountForm[i][\"Account\"], \"\", 1),\r\n\t\t\t\t \ttableRow.addCell(assetsAccountForm[i][\"Description\"], \"\", 3);\r\n\t\t\t\t \ttableRow.addCell(\"\", \"\", 1);\r\n\t\t\t\t \ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(assetsAccountForm[i][\"Balance\"]), \"valueAmount1\", 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Group\r\n\t\t\t \tif (assetsAccountForm[i][\"Group\"]) {\r\n\t\t\t \t\ttableRow = assetsTable.addRow();\r\n\t\t\t \t\ttableRow.addCell(assetsAccountForm[i][\"Group\"], \"valueAmountText\", 1);\r\n\t\t\t \t\ttableRow.addCell(assetsAccountForm[i][\"Description\"], \"valueAmountText\", 3);\r\n\t\t\t \t\ttableRow.addCell(\"\", \"valueAmountText\", 1);\r\n\t\t\t \t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(assetsAccountForm[i][\"Balance\"]), \"valueTotal\", 1);\r\n\t\t\t \t}\r\n\r\n\t\t\t\t//TRANSACTIONS ASSETS DETAILS\r\n\t\t\t\tfor (var j = 0; j < assetsTransactionForm.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//We want only transactions of the current account \r\n\t\t\t\t\tif (assetsAccountForm[i][\"Account\"] && assetsTransactionForm[j][\"JAccount\"] === assetsAccountForm[i][\"Account\"]) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttableRow = assetsTable.addRow();\r\n\t\t\t\t\t\ttableRow.addCell(\"\", \"\", 1);\r\n\t\t\t\t\t\ttableRow.addCell(\" \", \"\", 1);\r\n\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleDateFormat(assetsTransactionForm[j][\"JDate\"]), \"horizontalLine italic\", 1); \r\n\t\t\t\t\t\ttableRow.addCell(assetsTransactionForm[j][\"JDescription\"], \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\tif (assetsTransactionForm[j][\"JDebitAmount\"]) {\r\n\t\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(assetsTransactionForm[j][\"JDebitAmount\"]), \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttableRow.addCell(\"\",\"horizontalLine italic\",1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (assetsTransactionForm[j][\"JCreditAmount\"]) {\r\n\t\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(assetsTransactionForm[j][\"JCreditAmount\"]), \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttableRow.addCell(\"\",\"horizontalLine italic\",1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treport.addPageBreak();\r\n\r\n\r\n\t\t//-----------------------------------------------------------------------------//\r\n\t\t// LIABILITIES \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //\r\n\t\t//-----------------------------------------------------------------------------//\r\n\r\n\t\t//Title\r\n\t\treport.addParagraph(headerLeft, \"heading2\");\r\n\t\treport.addParagraph(\"Liabilities with transactions details\", \"heading1\");\r\n\t\treport.addParagraph(Banana.Converter.toLocaleDateFormat(startDate) + \" - \" + Banana.Converter.toLocaleDateFormat(endDate), \"heading3\");\r\n\t\treport.addParagraph(\" \");\r\n\t\treport.addParagraph(\" \");\r\n\r\n\t\t//Create the table\r\n\t\tvar liabilitiesTable = report.addTable(\"liabilitiesTable\");\r\n\r\n\t\t//Liabilities assets data\r\n\t\tvar liabilitiesAccountForm = [];\r\n\t\tliabilitiesAccountForm = getAccountsLiabilites(banDoc, liabilitiesAccountForm);\r\n\r\n\t\t//Transactions liabilities data\r\n\t\tvar liabilitiesTransactionForm = [];\r\n\t\tfor (var i = 0; i < liabilitiesAccountForm.length; i++) {\r\n\t\t\tif (liabilitiesAccountForm[i][\"Account\"]) {\r\n\t\t\t\tgetTransactions(banDoc, liabilitiesAccountForm[i][\"Account\"], startDate, endDate, liabilitiesTransactionForm);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//ACCOUNTS LIABILITIES DETAILS\r\n\t\tfor (var i = 0; i < liabilitiesAccountForm.length; i++) {\r\n\r\n\t\t\t//We take only accounts with a balance value\r\n\t\t\tif (liabilitiesAccountForm[i][\"Balance\"]) {\r\n\t\t\r\n\t\t\t\t//Account\r\n\t\t\t\tif (liabilitiesAccountForm[i][\"Account\"]) {\r\n\t\t\t\t \ttableRow = liabilitiesTable.addRow();\r\n\t\t\t\t \ttableRow.addCell(liabilitiesAccountForm[i][\"Account\"], \"\", 1),\r\n\t\t\t\t \ttableRow.addCell(liabilitiesAccountForm[i][\"Description\"], \"\", 3);\r\n\t\t\t\t \ttableRow.addCell(\"\", \"\", 1);\r\n\t\t\t\t \ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(liabilitiesAccountForm[i][\"Balance\"]), \"valueAmount1\", 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Group\r\n\t\t\t \tif (liabilitiesAccountForm[i][\"Group\"]) {\r\n\t\t\t \t\ttableRow = liabilitiesTable.addRow();\r\n\t\t\t \t\ttableRow.addCell(liabilitiesAccountForm[i][\"Group\"], \"valueAmountText\", 1);\r\n\t\t\t \t\ttableRow.addCell(liabilitiesAccountForm[i][\"Description\"], \"valueAmountText\", 3);\r\n\t\t\t \t\ttableRow.addCell(\"\", \"valueAmountText\", 1);\r\n\t\t\t \t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(liabilitiesAccountForm[i][\"Balance\"]), \"valueTotal\", 1);\r\n\t\t\t \t}\r\n\r\n\t\t\t\t//TRANSACTIONS LIABILITIES DETAILS\r\n\t\t\t\tfor (var j = 0; j < liabilitiesTransactionForm.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//We want only transactions of the current account \r\n\t\t\t\t\tif (liabilitiesAccountForm[i][\"Account\"] && liabilitiesTransactionForm[j][\"JAccount\"] === liabilitiesAccountForm[i][\"Account\"]) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttableRow = liabilitiesTable.addRow();\r\n\t\t\t\t\t\ttableRow.addCell(\"\", \"\", 1);\r\n\t\t\t\t\t\ttableRow.addCell(\" \", \"\", 1);\r\n\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleDateFormat(liabilitiesTransactionForm[j][\"JDate\"]), \"horizontalLine italic\", 1); \r\n\t\t\t\t\t\ttableRow.addCell(liabilitiesTransactionForm[j][\"JDescription\"], \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\tif (liabilitiesTransactionForm[j][\"JDebitAmount\"]) {\r\n\t\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(liabilitiesTransactionForm[j][\"JDebitAmount\"]), \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttableRow.addCell(\"\",\"horizontalLine italic\",1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (liabilitiesTransactionForm[j][\"JCreditAmount\"]) {\r\n\t\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(liabilitiesTransactionForm[j][\"JCreditAmount\"]), \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttableRow.addCell(\"\",\"horizontalLine italic\",1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tif (printIncomeExpenses || printAll) {\r\n\r\n\t\tif (printAll) {\r\n\t\t\treport.addPageBreak();\r\n\t\t}\r\n\r\n\t\t//-----------------------------------------------------------------------------//\r\n\t\t// INCOME \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //\r\n\t\t//-----------------------------------------------------------------------------//\r\n\r\n\t\t//Title\r\n\t\treport.addParagraph(headerLeft, \"heading2\");\r\n\t\treport.addParagraph(\"Income with transactions details\", \"heading1\");\r\n\t\treport.addParagraph(Banana.Converter.toLocaleDateFormat(startDate) + \" - \" + Banana.Converter.toLocaleDateFormat(endDate), \"heading3\");\r\n\t\treport.addParagraph(\" \");\r\n\t\treport.addParagraph(\" \");\r\n\r\n\t\t//Create the table\r\n\t\tvar incomeTable = report.addTable(\"incomeTable\");\r\n\r\n\t\t//Accounts Income data\r\n\t\tvar incomeAccountForm = [];\r\n\t\tincomeAccountForm = getAccountsIncome(banDoc, incomeAccountForm);\r\n\r\n\t\t//Transactions Income data\r\n\t\tvar incomeTransactionForm = [];\r\n\t\tfor (var i = 0; i < incomeAccountForm.length; i++) {\r\n\t\t\tif (incomeAccountForm[i][\"Account\"]) {\r\n\t\t\t\tgetTransactions(banDoc, incomeAccountForm[i][\"Account\"], startDate, endDate, incomeTransactionForm);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//ACCOUNTS INCOME DETAILS\r\n\t\tfor (var i = 0; i < incomeAccountForm.length; i++) {\r\n\r\n\t\t\t//We take only accounts with a balance value\r\n\t\t\tif (incomeAccountForm[i][\"Balance\"]) {\r\n\t\t\r\n\t\t\t\t//Account\r\n\t\t\t\tif (incomeAccountForm[i][\"Account\"]) {\r\n\t\t\t\t \ttableRow = incomeTable.addRow();\r\n\t\t\t\t \ttableRow.addCell(incomeAccountForm[i][\"Account\"], \"\", 1),\r\n\t\t\t\t \ttableRow.addCell(incomeAccountForm[i][\"Description\"], \"\", 3);\r\n\t\t\t\t \ttableRow.addCell(\"\", \"\", 1);\r\n\t\t\t\t \ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(incomeAccountForm[i][\"Balance\"]), \"valueAmount1\", 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Group\r\n\t\t\t \tif (incomeAccountForm[i][\"Group\"]) {\r\n\t\t\t \t\ttableRow = incomeTable.addRow();\r\n\t\t\t \t\ttableRow.addCell(incomeAccountForm[i][\"Group\"], \"valueAmountText\", 1);\r\n\t\t\t \t\ttableRow.addCell(incomeAccountForm[i][\"Description\"], \"valueAmountText\", 3);\r\n\t\t\t \t\ttableRow.addCell(\"\", \"valueAmountText\", 1);\r\n\t\t\t \t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(incomeAccountForm[i][\"Balance\"]), \"valueTotal\", 1);\r\n\t\t\t \t}\r\n\r\n\t\t\t\t//TRANSACTIONS INCOME DETAILS\r\n\t\t\t\tfor (var j = 0; j < incomeTransactionForm.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//We want only transactions of the current account \r\n\t\t\t\t\tif (incomeAccountForm[i][\"Account\"] && incomeTransactionForm[j][\"JAccount\"] === incomeAccountForm[i][\"Account\"]) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\ttableRow = incomeTable.addRow();\r\n\t\t\t\t\t\ttableRow.addCell(\"\", \"\", 1);\r\n\t\t\t\t\t\ttableRow.addCell(\" \", \"\", 1);\r\n\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleDateFormat(incomeTransactionForm[j][\"JDate\"]), \"horizontalLine italic\", 1); \r\n\t\t\t\t\t\ttableRow.addCell(incomeTransactionForm[j][\"JDescription\"], \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\tif (incomeTransactionForm[j][\"JDebitAmount\"]) {\r\n\t\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(incomeTransactionForm[j][\"JDebitAmount\"]), \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttableRow.addCell(\"\",\"horizontalLine italic\",1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (incomeTransactionForm[j][\"JCreditAmount\"]) {\r\n\t\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(incomeTransactionForm[j][\"JCreditAmount\"]), \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttableRow.addCell(\"\",\"horizontalLine italic\",1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treport.addPageBreak();\r\n\r\n\r\n\t\t//-----------------------------------------------------------------------------//\r\n\t\t// EXPENSES \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //\r\n\t\t//-----------------------------------------------------------------------------//\r\n\r\n\t\t//Title\r\n\t\treport.addParagraph(headerLeft, \"heading2\");\r\n\t\treport.addParagraph(\"Expenses with transactions details\", \"heading1\");\r\n\t\treport.addParagraph(Banana.Converter.toLocaleDateFormat(startDate) + \" - \" + Banana.Converter.toLocaleDateFormat(endDate), \"heading3\");\r\n\t\treport.addParagraph(\" \");\r\n\t\treport.addParagraph(\" \");\r\n\r\n\t\t//Create table\r\n\t\tvar expensesTable = report.addTable(\"expensesTable\");\r\n\r\n\t\t//Accounts Expenses data\r\n\t\tvar expensesAccountForm = [];\r\n\t\texpensesAccountForm = getAccountsExpenses(banDoc, expensesAccountForm);\r\n\r\n\t\t//Transactions Expenses data\r\n\t\tvar expensesTransactionForm = [];\r\n\t\tfor (var i = 0; i < expensesAccountForm.length; i++) {\r\n\t\t\tif (expensesAccountForm[i][\"Account\"]) {\r\n\t\t\t\tgetTransactions(banDoc, expensesAccountForm[i][\"Account\"], startDate, endDate, expensesTransactionForm);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//ACCOUNTS EXPENSES DETAILS\r\n\t\tfor (var i = 0; i < expensesAccountForm.length; i++) {\r\n\r\n\t\t\t//We take only accounts with a balance value\r\n\t\t\tif (expensesAccountForm[i][\"Balance\"]) {\r\n\r\n\t\t\t\t//Account\r\n\t\t\t\tif (expensesAccountForm[i][\"Account\"]) {\r\n\t\t\t\t \ttableRow = expensesTable.addRow();\r\n\t\t\t\t \ttableRow.addCell(expensesAccountForm[i][\"Account\"], \"\", 1),\r\n\t\t\t\t \ttableRow.addCell(expensesAccountForm[i][\"Description\"], \"\", 3);\r\n\t\t\t\t \ttableRow.addCell(\" \", \"\", 1);\r\n\t\t\t\t \ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(expensesAccountForm[i][\"Balance\"]), \"valueAmount1\", 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Group\r\n\t\t\t \tif (expensesAccountForm[i][\"Group\"]) {\r\n\t\t\t \t\ttableRow = expensesTable.addRow();\r\n\t\t\t \t\ttableRow.addCell(expensesAccountForm[i][\"Group\"], \"valueAmountText\", 1);\r\n\t\t\t \t\ttableRow.addCell(expensesAccountForm[i][\"Description\"], \"valueAmountText\", 3);\r\n\t\t\t \t\ttableRow.addCell(\" \", \"valueAmountText\", 1);\r\n\t\t\t \t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(expensesAccountForm[i][\"Balance\"]), \"valueTotal\", 1);\r\n\t\t\t \t}\r\n\r\n\t\t\t\t//TRANSACTIONS EXPENSES DETAILS\r\n\t\t\t\tfor (var j = 0; j < expensesTransactionForm.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//We want only transactions of the current account \r\n\t\t\t\t\tif (expensesAccountForm[i][\"Account\"] && expensesTransactionForm[j][\"JAccount\"] === expensesAccountForm[i][\"Account\"]) {\r\n\t\t\t\t\t\ttableRow = expensesTable.addRow();\r\n\t\t\t\t\t\ttableRow.addCell(\" \", \"\", 1);\r\n\t\t\t\t\t\ttableRow.addCell(\" \", \"\", 1);\r\n\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleDateFormat(expensesTransactionForm[j][\"JDate\"]), \"horizontalLine italic\", 1); \r\n\t\t\t\t\t\ttableRow.addCell(expensesTransactionForm[j][\"JDescription\"], \"horizontalLine italic\", 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (expensesTransactionForm[j][\"JDebitAmount\"]) {\r\n\t\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(expensesTransactionForm[j][\"JDebitAmount\"]), \"horizontalLine italic right\", 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttableRow.addCell(\"\",\"horizontalLine italic\",1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (expensesTransactionForm[j][\"JCreditAmount\"]) {\r\n\t\t\t\t\t\t\ttableRow.addCell(Banana.Converter.toLocaleNumberFormat(expensesTransactionForm[j][\"JCreditAmount\"]), \"horizontalLine italic right\", 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttableRow.addCell(\"\",\"horizontalLine italic\",1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//Add a footer to the report\r\n\taddFooter(banDoc, report);\r\n\r\n\treturn report;\r\n}", "function buildPage() {\n\tvar navOutput = '<select id=\"sprintSelector\" style=\"width:100px;\" onchange=\"changeCurrentSprint()\">';\n\tvar contentOutput = '<table cellspacing=\"0\" width=\"100%\" class=\"ms-rteTable-0\"><tbody><tr class=\"ms-rteTableEvenRow-0\">';\n\tvar sProgress;\n\t\n\t//Build navigation output.\n\tfor (var i = 0; i < sprintsData.sprints.length; i++) {\n\t\tvar sprintId = sprintsData.sprints[i].id;\n\t\tvar sprintNumber = sprintsData.sprints[i].data.sprint;\n\t\t\n\t\tif (currentSprintId === sprintId) {\n\t\t\tsProgress = sprintsData.sprints[i].data;\n\t\t\tnavOutput += '<option value=\"'+ sprintId +'\" selected>Sprint '+ sprintNumber +'</option>';\n\t\t\n\t\t} else {\n\t\t\tnavOutput += '<option value=\"'+ sprintId +'\">Sprint '+ sprintNumber +'</option>';\n\t\t}\n\t}\n\tnavOutput += '</select>&#160 &#160;' + \n\t\t\t\t\t'<a href=\"javascript:buildNewSprintTemplate();\">'+\n\t\t\t\t\t'<font size=\"2\">+ Add new sprint​</font>'+\n\t\t\t\t\t'</a> | '+\n\t\t\t\t\t'<a href=\"/regression/SitePages/Notes.aspx?s='+ currentSprintId +'\">'+\n\t\t\t\t\t'<font size=\"2\">View sprint notes​</font>'+\n\t\t\t\t\t'</a>​';\n\t\n\t//Build sprint progress output.\n\tfor (var i = 0; i < sProgress.tools.length; i++) {\n\t\t\tcontentOutput += '<td class=\"ms-rteTableEvenCol-0\" style=\"width: 14.2857%;\">' +\n\t\t\t\t\t\t\t\t'<h1>' + sProgress.tools[i].name + '</h1>' +\n\t\t\t\t\t\t\t\t'<ul>';\n \n\t\t\tfor (var j = 0; j < sProgress.tools[i].features.length; j++) {\n\t\t\t\tvar featureStatusHtml;\n\t\t\t\tvar urlVariables = '?s=' + currentSprintId + '&t=' + i + '&f=' + j;\n\t\t\t\tvar featureUrl = sProgress.tools[i].features[j].url + urlVariables;\n\t\t\t\t\n\t\t\t\tswitch(sProgress.tools[i].features[j].status) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tfeatureStatusHtml = ' - <font color=\"#C0C0C0\" size=\"1\"><b>?</b></font>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tfeatureStatusHtml = ' - <font color=\"#008000\" size=\"3\"><b>v</b></font>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tfeatureStatusHtml = ' - <font color=\"#ff0000\" size=\"3\"><b>x</b></font>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcontentOutput += '<li>'+\n\t\t\t\t\t\t\t\t\t'<a href=\"' + featureUrl + '\">'+\n\t\t\t\t\t\t\t\t\tsProgress.tools[i].features[j].name+\n\t\t\t\t\t\t\t\t\t'</a>' + featureStatusHtml+\n\t\t\t\t\t\t\t\t\t'</li>';\n\t\t\t}\n\t\t\t\n\t\t\tcontentOutput += '</ul>'+\n\t\t\t\t\t\t\t\t'<a href=\"javascript:openNewFeatureDialog(' + i + ');\">'+\n\t\t\t\t\t\t\t\t'<font size=\"1\">+ Add feature​</font>'+\n\t\t\t\t\t\t\t\t'</a></td>';\n\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tcontentOutput += '</tr></tbody></table>';\t\n\t\n\t\n\tdocument.getElementById(\"SprintOptions\").innerHTML = navOutput;\n\tdocument.getElementById(\"innerContent\").innerHTML = contentOutput;\n\tdocument.getElementById(\"DeltaPlaceHolderPageTitleInTitleArea\").innerHTML = 'Regression - Sprint ' + sProgress.sprint;\n}", "function buildFile(array) {\n let cards = ''\n let pageData = pageTemplate;\n array.forEach(employee => {\n switch (employee.getRole()) {\n case 'Manager':\n cards += buildManager(employee.name, employee.id, employee.email, employee.officeNumber);\n break;\n case 'Engineer':\n cards += buildEngineer(employee.name, employee.id, employee.email, employee.github);\n break;\n case 'Intern':\n cards += buildIntern(employee.name, employee.id, employee.email, employee.school);\n break;\n default:\n break;\n }\n });\n pageData = pageData.replace('{{{Cards}}}', cards)\n fs.writeFile('index.html', pageData, (err) =>\n err ? console.error(err) : console.log('Your File has been succesfully created!, it is called index.html')\n )\n}", "function showJLOStats() {\n// get list of products from the API\n $.getJSON(\"/JudgeDatabase/api/shootrecords/JLOCalcs.php\", function (data) {\n// html for listing products\n var read_products_html = `\n<!-- when clicked, it will load the create shootrecords form -->\n \n<!-- start table -->\n<class=\"well\">Organisations</class>\n<table class='table table-bordered table-hover'>\n\n <!-- creating our table heading -->\n <tr>\n <th class='w-5-pct'>Organisation</th>\n <th class='w-5-pct'>Count</th>\n \n <!-- <th class='w-10-pct text-align-center'>Action</th> -->\n </tr>`;\n\n // loop through returned list of data\n $.each(data.records, function (key, val) {\n\n // creating new table row per record\n read_products_html += `\n <tr>\n <td>` + val.EvOrg + `</td>\n <td>` + val.OrgTotal + `</td>\n \n\n </tr>`;\n });\n // end table\n read_products_html += `</table>`;\n// inject to 'page-content' of our app\n $(\"#page-content1\").html(read_products_html);\n// chage page title\n\n\n });\n}", "function generateHtml(){\n const html = `<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css\">\n <link rel=\"stylesheet\" href=\"/assets/css/style.css\">\n <title>Team Profile Generator</title>\n </head>\n <body>\n <nav class=\"navbar is-link\" role=\"navigation\" aria-label=\"main-navigation\">\n <div>\n <p class=\"navbar-item\">\n Team Profile Generator\n </p>\n </div>\n </nav>`;\n\n fs.writeFile('index.html', html, function(err) {\n if(err) {\n console.log(err);\n } \n });\n}", "function generate_webpage(fact, animals_array, user_input, res){\n\tlet count = 0;\n\tlet display_animals = [];\n\tfor (let i = 0; i < animals_array.length; i++){\n\t\tcount++;\n\t\tdisplay_animals[i] = `<div>\n\t\t<h3>${count}: ${animals_array[i].name}</h3>\n\t\t<div>Id: ${animals_array[i].id}</div>\n\t\t<div>Breed: ${animals_array[i].breed}</div>\n\t\t<div>Gender: ${animals_array[i].gender}</div>\n\t\t<div>Status: ${animals_array[i].status}</div>\n\t\t</div>`;\n\t}\n\tres.writeHead(200, {'Content-Type':'text/html'});\n\tres.end(`<h1>A Random Cat Fact:</h1><div>${fact}</div>\n\t\t\t <h1>Search Results for ${user_input.animals}</h1>${display_animals.join(\"\")}`\n\t);// send all the information to the client \n}", "renderHTML() {\n fs.readFile('template/main.html', 'utf8', (err, htmlString) => {\n \n htmlString = htmlString.split(\"<script></script>\").join(this.getScript());\n\n fs.writeFile('output/index.html', htmlString, (err) => {\n // throws an error, you could also catch it here\n if (err) throw err;\n // success case, the file was saved\n \n });\n \n });\n\n }", "function createWebsite() {\n\n fs.writeFile('./dist/index.html', generateTeamHtml(allEmployees), (err) =>\n err ? console.error(err) : console.log('Team HTML File Generated!'));\n console.log('The file has been saved!')\n console.log(allEmployees[1].school);\n}", "async function mainHTML() {\n //waits til createTeam function is ready\n await createTeam();\n\n\n//check if file does not exist by checking with fs\n if (!fs.existsSync(\"./output\")) {\n console.log(\"outputting\");\n //if does not exit - create directory folder 'output'\n fs.mkdirSync(\"./output\");\n }\n //write to file\n //use parameters var outputPath, the render team function passing\n //the array team, and the anon callback function err\n fs.writeFile(outputPath, render(team), error => {\n if (error) throw error;\n console.log(\"You have successfully generated your new team\");\n console.log(\"---------------------------------------------\");\n });\n}" ]
[ "0.6794463", "0.66173285", "0.6382862", "0.6302422", "0.6292933", "0.62754923", "0.62583613", "0.62321824", "0.6148897", "0.6145369", "0.60203487", "0.6013818", "0.5989477", "0.59849805", "0.59810555", "0.59620833", "0.5927691", "0.5901185", "0.58981466", "0.58895123", "0.58887446", "0.58863384", "0.5863658", "0.5856929", "0.58292437", "0.57893604", "0.5788662", "0.57847244", "0.5783711", "0.5756215", "0.57546824", "0.575134", "0.5737919", "0.5679025", "0.5673755", "0.56679344", "0.56570333", "0.5640945", "0.56376827", "0.5634462", "0.563326", "0.56173444", "0.560805", "0.56011283", "0.5574805", "0.55592316", "0.55583256", "0.55404496", "0.55311793", "0.5527853", "0.5516358", "0.5516356", "0.5504247", "0.54895765", "0.5473741", "0.5459607", "0.5456092", "0.545487", "0.54542935", "0.54537934", "0.54497075", "0.5446989", "0.54408264", "0.5438818", "0.5429557", "0.54270875", "0.54224694", "0.54206944", "0.54198474", "0.54049927", "0.5404277", "0.5402697", "0.5398386", "0.5394224", "0.5385072", "0.53837883", "0.5379227", "0.5369174", "0.5358408", "0.5357267", "0.5352096", "0.5348037", "0.5347059", "0.53412867", "0.53405905", "0.5333522", "0.53287446", "0.5326912", "0.5323943", "0.53197616", "0.5318239", "0.53104264", "0.5309129", "0.53037703", "0.5297793", "0.5297202", "0.52956855", "0.52946824", "0.5291622", "0.52892137" ]
0.74107265
0
Sort Password Change Log GridBy krishna on 21082015
function SortPasswordLogGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var url = "/Reporting/SortPasswordLogGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); var isAll = $('#ShowAllRecords').prop('checked') ? true : false; //var userId = $("#ddlUsers").val(); if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) { url += "?fromDate=" + fromDate + "&tillDate=" + tillDate + "&isAll=" + isAll + "&" + event.data.msg; } $.ajax({ type: "POST", url: url, async: false, contentType: "application/json; charset=utf-8", dataType: "html", data: null, success: function (data) { $("#ReportingGrid").empty(); $("#ReportingGrid").html(data); //ReportingGrid }, error: function (msg) { } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reorderLogFiles(logs) {\n\tlet dig = [];\n\tlet lett = [];\n\tfor(let i = 0; i < logs.length; i++){\n\t\tlet lastCode = logs[i][logs[i].length - 1].charCodeAt();\n\t\tif (lastCode >= 97 && lastCode <= 122) {\n\t\t\tlett.push(logs[i]);\n\t\t}else {\n\t\t\tdig.push(logs[i]);\n\t\t}\n\t}\n\t//把前面貼到後面\n\tlett.sort((a, b) => {\n\t a = a.substring(a.indexOf(' ') + 1) + a.substring(0, a.indexOf(' '))\n\t b = b.substring(b.indexOf(' ') + 1) + b.substring(0, a.indexOf(' '))\n\t return a.localeCompare(b)\n })\n\tlet ans = lett.concat(dig);\n\treturn ans;\n}", "function orderBySecurity() {\n document.getElementById(\"list\").innerHTML = \"\";\n markers.sort(function(a, b){return a.security - b.security});\n orderList();\n clickList(markers[markers.length - 1].item);\n scroll(markers[markers.length - 1].item);\n}", "function sort(data, input, type) {\n var collection = []\n for (var a = 0; a < Object.keys(data).length; a++) {\n var user = Object.keys(data)[a]\n for (var b = 0; b < data[user].length; b++) {\n collection.push(data[user][b] + \" -@\" + user)\n }\n }\n if (input) {\n if (type) \n {\n if (type == \"user\") {\n input = input.slice(5)\n collection.sort(function (x, y)\n {\n xIndex = String(x.match(/-@(.+)/)).match(input) == null ? \n 256 : String(x.match(/-@(.+)/)).match(input).index\n yIndex = String(y.match(/-@(.+)/)).match(input) == null ? \n 256 : String(y.match(/-@(.+)/)).match(input).index\n return xIndex < yIndex ? -1 : 1\n })\n for (var i = 0; i < collection.length; i++) {\n if (String(collection[i].match(/-@(.+)/)).match(input) == null) {\n collection.splice(i)\n }\n }\n }\n } \n else \n {\n input = input.replace(/[-@:]/g,\"\")\n\n collection.sort(function (x, y)\n {\n xIndex = String(x.match(/(.+)?-@/)).match(input) == null ? \n 256 : String(x.match(/(.+)?-@/)).match(input).index\n yIndex = String(y.match(/(.+)?-@/)).match(input) == null ? \n 256 : String(y.match(/(.+)?-@/)).match(input).index\n return xIndex < yIndex ? -1 : 1\n })\n for (var i = 0; i < collection.length; i++) {\n if (String(collection[i].match(/(.+)?-@/)).match(input) == null) {\n collection.splice(i)\n }\n }\n }\n }\n \n return collection\n}", "sort() {\n if(this.data.length >= 2){\n for (var i = 0; i < this.data.length - 1; i++){\n for (var j = i + 1; j < this.data.length; j++){\n if (this.data[i].users.length < this.data[j].users.length){\n let tmp = this.data[i];\n this.data[i] = this.data[j];\n this.data[j] = tmp;\n \n }\n }\n \n }\n }\n }", "function organize_usernames(data) {\n\t\treturn sort_stamps(data);\n\t}", "function sort_usernames(temp) {\n\t\ttemp.sort(function (a, b) {\n\t\t\tvar entryA = a.company + a.username;\n\t\t\tvar entryB = b.company + b.username;\n\t\t\tif (entryA < entryB) return -1;\n\t\t\tif (entryA > entryB) return 1;\n\t\t\treturn 0;\n\t\t});\n\t\treturn temp;\n\t}", "function sort_usernames(temp) {\n\t\ttemp.sort(function (a, b) {\n\t\t\tvar entryA = a.company + a.username;\n\t\t\tvar entryB = b.company + b.username;\n\t\t\tif (entryA < entryB) return -1;\n\t\t\tif (entryA > entryB) return 1;\n\t\t\treturn 0;\n\t\t});\n\t\treturn temp;\n\t}", "function Cached_sortUser(beanObj) {\n\tif (beanObj != null) {\n\t\t// Get Active-only beans\n\t\tbeanObj.actionList = Cached_getActiveList(beanObj.actionList);\n\t\tbeanObj.sessionList = Cached_getActiveList(beanObj.sessionList);\n\t\tbeanObj.propertiesList = Cached_getActiveList(beanObj.propertiesList);\n\t\tbeanObj.calendarList = Cached_getActiveList(beanObj.calendarList);\n\t\t$.each(beanObj.calendarList, function(i, calendarObj) {\n\t\t\tcalendarObj.eventList = Cached_getActiveList(calendarObj.eventList);\n\t\t});\n\n\t\t// Sorting\n\t\tbeanObj.actionList.sort(function(a, b) {\n\t\t\treturn a.createdOn - b.createdOn;\n\t\t});\n\t\tbeanObj.sessionList.sort(function(a, b) {\n\t\t\treturn a.createdOn - b.createdOn;\n\t\t});\n\t\tbeanObj.propertiesList.sort(function(a, b) {\n\t\t\tif (a.propKey < b.propKey) return -1;\n\t\t\tif (a.propKey > b.propKey) return 1;\n\t\t\treturn 0;\n\t\t});\n\t\tbeanObj.calendarList.sort(function(a, b) {\n\t\t\tif (a.calendarName < b.calendarName) return -1;\n\t\t\tif (a.calendarName > b.calendarName) return 1;\n\t\t\treturn 0;\n\t\t});\n\t}\n} // .end of Cached_sortUser", "function sortEntriesMRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_desc = function (entry1, entry2) {\n\t\tvar date1 = Date.parse(entry1.dateAccessed);\n\t\tvar date2 = Date.parse(entry2.dateAccessed);\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n console.log(\"sort mru\");\n\tentries.sort(date_sort_desc);\n}", "handleSortUsers(event) {\n let { users, mappedLogs } = this.state;\n const sortBy = event.target.value;\n switch (sortBy) {\n case NAME_ASC:\n users.sort((a, b) => (a.name > b.name ? 1 : -1));\n break;\n case NAME_DESC:\n users.sort((a, b) => (a.name < b.name ? 1 : -1));\n break;\n case IMPRESSIONS_ASC:\n users.sort(\n (a, b) => mappedLogs[a.id].impressions - mappedLogs[b.id].impressions\n );\n break;\n case IMPRESSIONS_DESC:\n users.sort(\n (a, b) => mappedLogs[b.id].impressions - mappedLogs[a.id].impressions\n );\n break;\n case CONVERSIONS_ASC:\n users.sort(\n (a, b) => mappedLogs[a.id].conversions - mappedLogs[b.id].conversions\n );\n break;\n case CONVERSIONS_DESC:\n users.sort(\n (a, b) => mappedLogs[b.id].conversions - mappedLogs[a.id].conversions\n );\n break;\n case REVENUE_ASC:\n users.sort(\n (a, b) => mappedLogs[a.id].revenue - mappedLogs[b.id].revenue\n );\n break;\n case REVENUE_DESC:\n users.sort(\n (a, b) => mappedLogs[b.id].revenue - mappedLogs[a.id].revenue\n );\n break;\n default:\n users.sort((a, b) => (a.name > b.name ? 1 : -1));\n break;\n }\n this.setState((state, props) => ({\n users\n }));\n }", "function theQwertyGrid_sortString(key) {\n\t\t\tif(_theQwertyGrid_sortInAsc) {\n\t\t\t\t_theQwertyGrid_sortInAsc = false;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(a,b){\n\t\t\t\t\treturn a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_theQwertyGrid_sortInAsc = true;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(b,a){\n\t\t\t\t\treturn a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;\n\t\t\t\t});\n\t\t\t}\n\t\t\ttheQwertyGrid_reFillTable(_theQwertyGrid_displayData);\n\t\t}", "function toogleSort(){\r\n\t\tif(settings.sort_type=='desc'){\r\n\t\t\tsettings.sort_type='asc';\r\n\t\t }else{\r\n\t\t\t settings.sort_type='desc';\r\n\t\t }\r\n\t}", "function sort_stamps(temp) {\n\t\ttemp.sort(function (a, b) {\n\t\t\tvar entryA = a.instrument + a.state;\n\t\t\tvar entryB = b.instrument + b.state;\n\t\t\tif (entryA < entryB) return -1;\n\t\t\tif (entryA > entryB) return 1;\n\t\t\treturn 0;\n\t\t});\n return temp;\n\t}", "function sortChanged(){\n\tconst url2 = url+`&q=${name.val()}&t=${type.val()}&color=${color.val()}&s=${sort.val()}`;\n\tloadData(url2, displayData);\n}", "_sortMessagesForOutput(messages) {\n node_core_library_1.LegacyAdapters.sortStable(messages, (a, b) => {\n let diff;\n // First sort by file name\n diff = node_core_library_1.Sort.compareByValue(a.sourceFilePath, b.sourceFilePath);\n if (diff !== 0) {\n return diff;\n }\n // Then sort by line number\n diff = node_core_library_1.Sort.compareByValue(a.sourceFileLine, b.sourceFileLine);\n if (diff !== 0) {\n return diff;\n }\n // Then sort by messageId\n return node_core_library_1.Sort.compareByValue(a.messageId, b.messageId);\n });\n }", "function test(){\n var testData = POLogSheet.getRange(344, 1, 1, LOG_TO_INPUT_I).getValues();\n Logger.log(\"INPUT: \" + testData[0]);\n var result = sortLogRow(testData);\n Logger.log(\"RESULT: \" + result[0]);\n}", "function ewrpt_Sort(e, url) {\n\tvar newUrl = url\n\tif (e.ctrlKey)\n\t\tnewUrl += \"&ctrl=1\";\n\tlocation = newUrl;\n\treturn true;\n}", "function sortEntriesLRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_asc = function (entry1, entry2) {\n\t\tvar date1 = entry1.dateAccessed;\n\t\tvar date2 = entry2.dateAccessed;\n\t\tif (date1 > date2) return 1;\n\t\tif (date1 < date2) return -1;\n\t\treturn 0;\n\t};\n\n\tentries.sort(date_sort_asc);\t\n}", "static sortAscending() {\r\n const profiles = Store.getProfiles();\r\n profiles.sort(({ monthTime: a }, { monthTime: b }) => a - b);\r\n localStorage.setItem('profiles', JSON.stringify(profiles));\r\n }", "function sortEntriesMRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_desc = function (entry1, entry2) {\n\t\tvar date1 = entry1.dateAccessed;\n\t\tvar date2 = entry2.dateAccessed;\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n\n\tentries.sort(date_sort_desc);\t\n}", "function sortChangeOrderStatus(json) {\n console.log('JSONNNN == ', json);\n let tmp = json.slice(0);\n\n tmp[0] = json[0];\n tmp[1] = json[5];\n tmp[2] = json[1];\n tmp[3] = json[2];\n tmp[4] = json[3];\n tmp[5] = json[4];\n\n return tmp;\n}", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "sortData() {\n this.data.sort(($val1, $val2 ) => {\n const a = JSON.stringify($val1[this.sortBy]);\n const b = JSON.stringify($val2[this.sortBy]);\n if ( a < b ){\n return -this.sortDir;\n }\n if ( a > b ){\n return this.sortDir;\n }\n return 0;\n });\n }", "function sortLogRow(rowDataValues) {\n var sortedDataValues = rowDataValues;\n sortedDataValues[0][DATE_I] = new Date();\n sortedDataValues[0][SKU_I] = \"\";\n sortedDataValues[0][DESC_I] = rowDataValues[0][LOG_DESC_I]; \n sortedDataValues[0][COA_I] = \"\";\n sortedDataValues[0][EXP_I] = rowDataValues[0][LOG_EXP_I]; \n sortedDataValues[0][QTY_I] = rowDataValues[0][LOG_QTY_I]; \n sortedDataValues[0][PACK_I] = rowDataValues[0][LOG_PACK_I]; \n sortedDataValues[0][SECTION_I] = \"\";\n sortedDataValues[0][LOT_I] = rowDataValues[0][LOG_LOT_I];\n sortedDataValues[0][VENDOR_I] = rowDataValues[0][LOG_VENDOR_I]; \n sortedDataValues[0][PRICE_I] = rowDataValues[0][LOG_PRICE_I]; \n sortedDataValues[0][POJOB_I] = rowDataValues[0][LOG_PO_I]; \n sortedDataValues[0][COMMENT_I] = rowDataValues[0][LOG_COMMENT_I]; \n sortedDataValues[0][COMPONENT_I] = \"\";\n sortedDataValues[0].splice(15, 5);\n \n Logger.log(sortedDataValues[0]);\n return sortedDataValues;\n}", "sortTwitsByAuthor( ) {\n this.twits.sort( (a, b) => {\n \n if (this.switchPosition == \"normal\");\n if (a.user.name > b.user.name) {\n return 1;\n }\n if (a.user.name < b.user.name) {\n return -1;\n }\n if (this.switchPosition == \"reversed\"){\n if (a.user.name < b.user.name) {\n return 1;\n }\n if (a.user.name > b.user.name) {\n return -1;\n }\n }\n return 0;\n });\n }", "function changeSort() {\n window.location.href = loc.origin + '/?sk=h_chr';\n }", "sortTwitsByDate( ) {\n this.twits.sort( (a, b) => {\n \n if (this.switchPosition == \"normal\");\n if (this.dateCompare(a,b)) {\n return 1;\n }\n if (!this.dateCompare(a,b)) {\n return -1;\n }\n if (this.switchPosition == \"reversed\"){\n if (!this.dateCompare(a,b)) {\n return 1;\n }\n if (this.dateCompare(a,b)) {\n return -1;\n }\n }\n return 0;\n });\n }", "function sortUsersList() {\n let i, users, shouldSwitch;\n let list = document.getElementById(\"users-list\");\n let switching = true;\n\n while (switching) {\n switching = false;\n users = list.getElementsByClassName(\"list-group-item\");\n for (i = 0; i < (users.length - 1); ++i) {\n shouldSwitch = false;\n if (users[i].textContent.toLowerCase() > users[i + 1].textContent.toLowerCase()) {\n shouldSwitch = true;\n break;\n }\n }\n if (shouldSwitch) {\n users[i].parentNode.insertBefore(users[i + 1], users[i]);\n switching = true;\n }\n }\n }", "function SortUserData(dataToSort, PropertyToSort) {\n var sortedData = CommonFunctionsFactory.sortData($scope, dataToSort, PropertyToSort, $scope.IsAscending);\n if ($scope.IsAscending == true)\n $scope.IsAscending = false;\n else\n $scope.IsAscending = true;\n\n $scope.OriginalAllUsers = $scope.UserList;\n }", "_sortWkorkoutsBy(e) {\r\n workOutBox.innerHTML = \"\";\r\n workOutBox.innerHTML = FORM_out;\r\n const sortWith = e.target.innerText.split(\" \")[0].toLowerCase();\r\n if (sortWith === \"type\") {\r\n this.#workouts=this.#workouts.sort((a, b) => {\r\n if (a[sortWith] < b[sortWith]) return -1;\r\n if (a[sortWith] > b[sortWith]) return 1;\r\n else return 0;\r\n });\r\n this.#workouts.forEach(workout => this._renderWorkoutOnSideBar(workout));\r\n }\r\n else {\r\n this.#workouts = this.#workouts.sort((a, b) => b[sortWith] - a[sortWith]);\r\n this.#workouts.forEach(workout => this._renderWorkoutOnSideBar(workout));\r\n }\r\n \r\n\r\n }", "function list_set_sort(col)\n {\n if (settings.sort_col != col) {\n settings.sort_col = col;\n $('#notessortmenu a').removeClass('selected').filter('.by-' + col).addClass('selected');\n rcmail.save_pref({ name: 'kolab_notes_sort_col', value: col });\n\n // re-sort table in DOM\n $(noteslist.tbody).children().sortElements(function(la, lb){\n var a_id = String(la.id).replace(/^rcmrow/, ''),\n b_id = String(lb.id).replace(/^rcmrow/, ''),\n a = notesdata[a_id],\n b = notesdata[b_id];\n\n if (!a || !b) {\n return 0;\n }\n else if (settings.sort_col == 'title') {\n return String(a.title).toLowerCase() > String(b.title).toLowerCase() ? 1 : -1;\n }\n else {\n return b.changed_ - a.changed_;\n }\n });\n }\n }", "function sortRenderOrder() {\n \n var sortBy = function(field, reverse, primer){\n var key = primer ? function(x) {return primer(x[field])} : function(x) {return x[field]};\n reverse = [-1, 1][+!!reverse];\n return function (a, b) {\n\treturn a = key(a), b = key(b), reverse * ((a > b) - (b > a));\n } \n }\n \n gadgetRenderOrder.sort(sortBy(\"tabPos\", true, parseInt));\n gadgetRenderOrder.sort(sortBy(\"paneId\", true, parseInt));\n gadgetRenderOrder.sort(sortBy(\"parentColumnId\", true, parseInt));\n }", "function sortAvatarsByLoudness() {\n removeAllOverlays();\n var avatarList = settings.ui.searchWholeDomainForLoudestEnabled ? Object.keys(userStore) : getAvatarsInRadius(SEARCH_RADIUS_DEFAULT);\n settings.users = avatarList.map(function (uuid) { return userStore[uuid]; });\n settings.users = settings.users.sort(sortNumber).slice(0, 10);\n addAllOverlays();\n }", "function sortUsernames(rflEntries) {\n\tconst usernames = [...Object.keys(rflEntries)];\n\tusernames.sort((usernameA, usernameB) => { // a comes first if score is higher -> return negative if a is higher\n\t\treturn rflEntries[usernameB]['score'] - rflEntries[usernameA]['score'];\n\t});\n\treturn usernames;\n}", "function onSort() {\n\tvar items = {};\n\titems[ this.options.sortIdKey ] = this.sorTable.sortId;\n\titems[ this.options.sortAscKey ] = this.sorTable.sortAsc;\n\tchrome.storage.local.set( items );\n}", "function setPKeysAsSortDefaults(){\n\t var view = tabsFrame.newView;\n var numberOfTblgrps = Number(tabsFrame.tablegroupsRestriction);\n var viewType = tabsFrame.typeRestriction;\n var index = view.tableGroups.length - tabsFrame.selectedTableGroup - 1;\n \n \n var numberofSortFields = 0;\n if (view.tableGroups[index].hasOwnProperty('sortFields')){\n \tnumberOfSortFields = view.tableGroups[index].sortFields.length;\n \t}\n\n if(numberofSortFields == 0){ \n var summaryTable = $('sortOrderSummary');\n tBody = summaryTable.tBodies[0];\n var numOfRows = tBody.rows.length;\n \t \n // loop through the summary table\n for (var j = 1; j < numOfRows; j++) {\n var pKeyCell = summaryTable.rows[j].cells[2];\n var setButtonCell = summaryTable.rows[j].cells[8];\n \n // if there is a match, display the order and hide the \"Sort\" button\n //if (pKeyCell.innerHTML != '0') {\n if ((pKeyCell.innerHTML != '0') && setButtonCell.innerHTML.match(/button/gi)) {\n var rowID = setButtonCell.parentNode.id;\n setSortAndSave('', rowID);\n }\n }\n \t}\n}", "function sortNumericallyAscending() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utLinesUtility,\n }, function (up) {\n var keylines = up.inlines.map((function (line) {\n var match = line.match(/(\\d+)/);\n var key = match ? parseInt(match[0]) : 0;\n return [key, line];\n }));\n keylines.sort(function (a, b) { return a[0] - b[0]; });\n return keylines.map(function (keypair) { return keypair[1]; });\n });\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DESC' : 'ASC'\n\n let sort = fn && fn(key, sortOpts)\n\n if( !sort && sort !== false )\n sort = `${this.db.escapeId(key)} ${desc}`\n \n if( sort )\n orderBy.push(sort)\n })\n\n return orderBy.length > 0 ? 'ORDER BY '+orderBy.join(', ') : ''\n }", "sortDatabyViews(data) {\r\n data.sort((a,b) => {\r\n if (a.totalClicks > b.totalClicks) return -1;\r\n if (a.totalClicks < b.totalClicks) return 1;\r\n return 0;\r\n });\r\n return data;\r\n }", "sortColors(){\n let pixCount = this.pattern.width == 32 ? 1024 : 4096;\n let indexMap = [];\n let colorMap = [];\n //Check pixel counts\n for (let i = 0; i < 15; ++i){\n colorMap.push({color: this.getPalette(i), count: this.countPixelsWithColor(i), prev:i});\n }\n //Sort by pixel count\n colorMap.sort((a,b)=>(b.count-a.count));\n //Create mapping, update palette colors\n for (let i = 0; i < 15; ++i){\n indexMap[colorMap[i].prev] = i;\n this.setPalette(i, colorMap[i].color);\n }\n //Change pixels to their respective indexes\n for (let i = 0; i < pixCount; ++i){\n const c = this.pixels[i];\n if (c >= 15){continue;}\n this.pixels[i] = indexMap[c];\n }\n }", "onHandleSort(event) {\n const { fieldName: sortedBy, sortDirection } = event.detail;\n const cloneData = [...this.data];\n\n cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));\n this.data = cloneData;\n this.sortDirection = sortDirection;\n this.sortedBy = sortedBy;\n }", "__itemsSorted(event) {\n\n\t \thijackEvent(event);\n\n\t // An array of uid's ordered by user\n\t // by drag and drop reordering.\n\t const {sorted} = event.detail;\n\n\t const newIndexes = sorted.map(item => ({\n\t \tcoll: this.coll,\n \tdoc: item.uid,\n \tdata: {index: item.index}\n\t }));\n\n\t setBatch(newIndexes);\n\t }", "function sortUserName(userName) {\n return userName.toLowerCase().split(\"\").sort().join(\"\");\n }", "sort(key) {\n //used JavaScript sort method\n const sortedContacts = this.state.contacts.sort((contactA, contactB) => {\n return contactA[key] >= contactB[key] ? 1 : -1;\n });\n this.setState({ contacts: sortedContacts, reset: true })\n }", "function getPermLevels() {\n return [...config_1.config.permLevels].sort((a, b) => b.level - a.level);\n}", "function sortData () {\n for (var i = 0; i < 24; i++) {\n \n var temp = [];\n for (var index in data) {\n data[index].JavaScript.hours[i].z = index\n temp.push(data[index].JavaScript.hours[i]);\n };\n\n temp.sort(function (a,b) {\n if (a.commits < b.commits) {\n return 1;\n } else if (b.commits < a.commits) {\n return -1;\n }\n\n return 0;\n })\n\n for (var index in data) {\n data[index].JavaScript.hours[i] = temp[index]\n }\n }\n}", "getSortedUsers() {\n //clone a new array for users\n let users = [...this.props.users]\n if (this.state.sortDirection === 'asc') {\n users.sort(this.genSortAscendingByField(this.state.sortField))\n } else {\n users.sort(this.genSortDescendingByField(this.state.sortField))\n }\n\n return users\n }", "function sortTiles() {\n var sortedTiles = sort(tileHTMLElements);\n\n console.log('after sort:', sortedTiles);\n\n repopulateTiles(sortedTiles);\n }", "sortingFunction() {\n let records = this.get('content');\n if (isArray(records) && records.length > 1) {\n let sorting = this.get('sorting') || [];\n if (sorting.length === 0) {\n sorting = [{ propName: 'id', direction: 'asc' }];\n }\n\n for (let i = 0; i < sorting.length; i++) {\n let sort = sorting[i];\n if (i === 0) {\n records = this.sortRecords(records, sort, 0, records.length - 1);\n } else {\n let index = 0;\n for (let j = 1; j < records.length; j++) {\n for (let sortIndex = 0; sortIndex < i; sortIndex++) {\n if (records.objectAt(j).get(sorting[sortIndex].propName) !== records.objectAt(j - 1).get(sorting[sortIndex].propName)) {\n records = this.sortRecords(records, sort, index, j - 1);\n index = j;\n break;\n }\n }\n }\n\n records = this.sortRecords(records, sort, index, records.length - 1);\n }\n }\n\n this.set('content', records);\n }\n\n let componentName = this.get('componentName');\n this.get('_groupEditEventsService').geSortApplyTrigger(componentName, this.get('sorting'));\n }", "function sort_path()\n {\n var path=window.location+\"\";\n path= path.split('?')[0];\n a=path.split('#');\n b=a[0];\n if(a.length>0)\n b=path.split('#')[1];\n c=b.split('/');\n sec=b.split('/')[0];\n if(sec==\"project\")\n sec=c[0]+'/'+c[1];\n var sort_by=$('.sort.selected').text();\n //~ $('.starred starred_count').addClass('open'); \n var order=$('.asc-desc.selected').children('span').attr('class');\n window.location=\"#\"+sec+'?sort_by='+sort_by+'&order='+order;\n }", "function sorted(sheet){\n sheet.sort(masterCols.end_time+1).sort(masterCols.start_time+1).sort(masterCols.date+1);\n}", "function ascendentAlphabeticOder() {\n userOutput.sort(User.alphabeticOrder)\n}", "function currentUserSort(state,action){\n if(action.type === \"SET_CURRENT_USER_SORT\"){\n return action.value;\n }\n return state;\n}", "function laodPLMSortColumn(action, url, processHandler)\r\n{\r\n\t//alert('calling the new sort function');\r\n\tcloseMsgBox();\r\n\tvar htmlAreaObj = _getWorkAreaDefaultObj();\r\n var objAjax = htmlAreaObj.getHTMLAjax();\r\n var objHTMLData = htmlAreaObj.getHTMLDataObj();\r\n\tif(objAjax)\r\n {\r\n objAjax.setActionURL(action);\r\n objAjax.setActionMethod(url);\r\n objAjax.setProcessHandler(processHandler);\r\n objAjax.sendRequest();\r\n \r\n if(objAjax.isProcessComplete())\r\n \t{\r\n \tobjHTMLData.resetChangeFields();\r\n \t}\r\n }\r\n\t\r\n}", "function getKeys(fields)\n{\n return Object.keys(fields).sort(function(a, b)\n {\n if (a == 'login')\n {\n return 1;\n } else {\n return 0;\n }\n });\n}", "function sort_cert_email(){\r\r\n\t\r\r\n\tvar click_num = $('#email_click_num').val();\r\r\n\t\r\r\n\tif(click_num == 0 || click_num == 2){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(1);\r\r\n\t\t\r\r\n\t}else if(click_num == 1){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(2);\r\r\n\t\t\r\r\n\t}\r\r\n\t\r\r\n\tfilter = {\r\r\n\t\t\r\r\n\t\tclass_of: $('#get_year').val(),\r\r\n\t\t\r\r\n\t\tsort_by_email: $('#email_click_num').val()\r\r\n\t\t\r\r\n\t};\r\r\n\t\r\r\n\tload_cert_student();\r\r\n\t\r\r\n}", "function sortInfo() {\n info.sort((a, b) => {\n return (sortReverse ? -1 : 1) * compareTableItem(sortKey, a, b);\n });\n}", "function resort(){\n if(scope.sorting && scope.sorting.obj){\n var sortKey = scope.sorting.obj.field;\n sorter(sortKey,scope.sorting.direction);\n }\n }", "function resort(){\n if(scope.sorting && scope.sorting.obj){\n var sortKey = scope.sorting.obj.field;\n sorter(sortKey,scope.sorting.direction);\n }\n }", "sortByStatus (direction) {\n const newSortedUsers = this.state.liveUsers.sort(function (a, b) {\n const statusA = a.status.toUpperCase();\n const statusB = b.status.toUpperCase();\n\n if (direction === 'asc') {\n if (statusA < statusB) {\n return -1;\n }\n\n if (statusA > statusB) {\n return 1;\n }\n } else {\n if (statusA > statusB) {\n return -1;\n }\n\n if (statusA < statusB) {\n return 1;\n }\n }\n\n return 0;\n });\n\n return newSortedUsers;\n }", "sortShaderPassStack(passStack) {\n passStack.sort((a, b) => a.index - b.index);\n passStack.sort((a, b) => a.renderOrder - b.renderOrder);\n }", "sortedTasks(state){\n //criar uma variavel para ordernar nossas tarefas sem alterar o estado original(state)\n let sorted = state.tasks\n return sorted.sort((a,b) => {\n //se o a for menor então ele retorna para corrigir a ordenação\n if(a.name.toLowerCase() < b.name.toLowerCase()) return -1\n //mesma inversa se for o inverso da primeira situação\n if(a.name.toLowerCase() > b.name.toLowerCase()) return 1\n\n return 0\n }) \n }", "function sortKey(){\n let keys = [\"ID\", \"SNV_Chr\", \"SNV_Pos\", \"SNV_Ref\", \"SNV_Alt\", \"SNV_ID\", \"SNV_VT\", \"SAAV_Pos\", \"SAAV_Ref\", \"SAAV_Alt\", \"SAAV_RS\", \"SAAV_AS\", \"SAAV_filter\", \"SAAV_SDM\", \"PROTEIN_Nextprot\", \"Info\", \"Confirmed by LC-MS/MS\", \"SNV_1000G_OC\", \"SNV_1000G_T_MAF\", \"SNV_1000G_EAS_MAF\", \"SNV_1000G_AMR_MAF\", \"SNV_1000G_EUR_MAF\", \"SNV_1000G_AFR_MAF\", \"SNV_1000G_SAS_MAF\", \"SNV_ESP_OC\", \"SNV_ESP_AF_MAF\", \"SNV_ESP_EU_MAF\", \"SNV_ExAC_OC\", \"PTM\", \"PTM_Class\", \"VSC_Phenotype\", \"VSC_Source\", \"VSC_OID\", \"VSC_Phe_CLS\", \"VSC_Phe_CLS_ID\", \"PROTEIN_UniProt\", \"BRP_PDB\", \"BRP_Ensembl_Pro\", \"BRT_Ensembl_Tra\", \"BRG_Ensembl_Gen\", \"BRG_GF\", \"BRG_GD\", \"BRG_GS\", \"BRG_HGNC\", \"BRG_UCSC\", \"BRG_Entrez\", \"BRG_RefSeq\", \"BRG_ERA\", \"BRG_GCosmic\", \"BRPH_Omim\", \"BRDR_PharmGKB\", \"BRDR_CHEMBL\", \"BRL_PMID\", \"BRB_STRING\", \"BRB_Vega\", \"BRB_ENA\", \"VSD_DN\", \"VSD_DT\", \"VSD_PGT\", \"VSD_DB\", \"VSA_EC\", \"SNV_Strand\", \"VSC_Phe_Top_CLS\"];\n var newData = [];\n for (var i = 0; i<searchData.length; i++){\n var tmpData = {};\n for (var j = 0; j<keys.length; j++){\n tmpData[keys[j]] = searchData[i][keys[j]];\n }\n newData[i] = tmpData;\n }\n // console.log(newData);\n searchData = newData;\n}", "sortReports(r1, r2) {\n const latest1 = r1.history[r1.history.length - 1];\n const latest2 = r2.history[r2.history.length - 1];\n if (latest2.failed > 0 && latest1.failed <= 0) {\n return 1;\n }\n if (latest1.failed > 0 && latest2.failed <= 0) {\n return -1;\n }\n if (latest2.when > latest1.when) {\n return 1;\n }\n return -1;\n }", "function sortPlaylist() {\n playlistArr = Object.entries(livePlaylist);\n\n if (playlistArr.length > 2) {\n var sorted = false;\n while (!sorted) {\n sorted = true;\n for (var i = 1; i < playlistArr.length - 1; i++) {\n if ((playlistArr[i][1].upvote < playlistArr[i + 1][1].upvote)) {\n sorted = false;\n var temp = playlistArr[i];\n playlistArr[i] = playlistArr[i + 1];\n playlistArr[i + 1] = temp;\n // })\n }\n // playlistArr[i][1].index = i;\n }\n }\n }\n return playlistArr;\n}", "function sortChangedCallBack(grid, sortColumns) {\n if (sortColumns.length == 0) {\n console.log(\"removing sorting\");\n //remove sorting\n vm.searchParams.sort = '';\n vm.searchParams.order = '';\n } else {\n vm.searchParams.sort = sortColumns[0].name; //sort the column\n switch( sortColumns[0].sort.direction ) {\n case uiGridConstants.ASC:\n vm.searchParams.order = 'ASC';\n break;\n case uiGridConstants.DESC:\n vm.searchParams.order = 'DESC';\n break;\n case undefined:\n break;\n }\n }\n\n //do the search with the updated sorting\n vm.searchTrials();\n }", "function sortit(e)\n{\n var exp;\n if (typeof e == \"string\") {\n exp = e.split(\",\");\n last_sort = e;\n } else {\n exp = e.sortedlist.split(\",\");\n last_sort = e.sortedlist;\n }\n\n var sorter = [];\n var order=[];\n for(var i=0;i<exp.length;i++) {\n if (exp[i] === \"0\") continue;\n if (exp[i] === \"1\") {\n sorter.push(i);\n order.push(1);\n }\n else if (exp[i] == \"2\") {\n sorter.push(i);\n order.push(-1);\n }\n }\n\n var data;\n if (filtered_data == null) {\n data = raw_data.slice();\n } else {\n data = filtered_data.slice();\n }\n\n if (sorter.length == 0) {\n var dta = new async_emulator(data);\n views.view('table').data(dta);\n return;\n }\n\n // Do the Sort\n data.sort(function(a,b) {\n for(var i=0;i<sorter.length;i++) {\n var s = sorter[i];\n if ((a[s] == null && b[s] != null) || a[s] < b[s]) {\n if (order[i] > 0) return (-1)\n else return (1);\n } else if ((b[s] == null && a[s] != null) || a[s] > b[s]) {\n if (order[i] > 0) return (1);\n else return (-1);\n }\n }\n return (0);\n });\n\n var dta = new async_emulator(data);\n views.view('table').data(dta);\n}", "sort(){\n\n }", "sort() {\n\t}", "sort() {\n\t}", "function theQwertyGrid_sortInt(key) {\n\t\t\tif(_theQwertyGrid_sortInAsc) {\n\t\t\t\t_theQwertyGrid_sortInAsc = false;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(a,b) {\n\t\t\t\t\treturn a[key] - b[key];\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_theQwertyGrid_sortInAsc = true;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(b,a) {\n\t\t\t\t\treturn a[key] - b[key];\n\t\t\t\t});\n\t\t\t}\n\t\t\ttheQwertyGrid_reFillTable(_theQwertyGrid_displayData);\n\t\t\t\n\t\t}", "function onPrioritySortChange() {\n\t$(\"#newest\").css({'font-weight': 'normal', 'color': '#A00000'});\n\t$(\"#priority\").css({'font-weight': 'bold', 'color': 'black'});\n window.sort = \"Priority\";\n $sid = $.cookie('sid');\n getFeed($sid, window.filter, window.sort, printToScreen);\n}", "onSortChange(newSortSettings) {\n const comments = this.filterAndSort(this.state.comments,\n newSortSettings.comparator,\n this.state.commentFilter.filterFn);\n\n this.setState({\n comments: comments,\n sortSettings: newSortSettings\n });\n }", "onUparrow() {\n const ascendingOrder = this.state.columnList.sort((a, b) => a.order - b.order);\n console.log(\"Asc: \", ascendingOrder)\n this.setState({\n columnList: ascendingOrder\n })\n }", "sort(sort){\n\t\tthis.output3 = [];\n\t\t//order by date\n\t\tif(sort == 'dateCreated'){\n\t\t\tthis.output3 = this.output2.sort(function(a, b) {\n\t\t\t\treturn new Date(a.dateCreated) - new Date(b.dateCreated);\n\t\t\t});\n\t\t//order by id\n\t\t}else if(sort == 'id'){\n\t\t\tthis.output3 = this.output2.sort(function(a, b) {\n\t\t\t\treturn a.id - b.id;\n\t\t\t});\n\t\t//order by issueId\n\t\t}else if(sort == 'issueId'){\n\t\t\tthis.output3 = this.output2.sort(function(a, b) {\n\t\t\t\treturn a.issueId - b.issueId;\n\t\t\t});\n\t\t//order by high priority then low priority\n\t\t}else if(sort == 'highPriority'){\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.highPriority == 'TRUE'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.highPriority == 'FALSE'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t//order by high-med-low severity\n\t\t}else if(sort == 'severity'){\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.severity == 'HIGH'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.severity == 'MEDIUM'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.severity == 'LOW'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t//order by status, to do-in progress-in review-in test-in demo-done\n\t\t}else if(sort == 'status'){\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.status == 'TO DO'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.status == 'IN PROGRESS'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.status == 'IN REVIEW'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.status == 'IN TEST'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.status == 'IN DEMO'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tif(bug.status == 'DONE'){\n\t\t\t\t\tthis.output3.push(bug);\n\t\t\t\t}\n\t\t\t});\n\t\t//if no sort field is selected/passed in to method, leave array of bugs as it is\n\t\t}else{\n\t\t\tthis.output2.forEach((bug) => {\n\t\t\t\tthis.output3.push(bug);\n\t\t\t});\n\t\t}\n\t\t//emit signal for listeners\n\t\tthis.emit(\"DATA_FINISHED\");\n\t}", "function sortResults(){\n return sort.sortCustomerRecords(result);\n}", "updateSortColumns(currentFields, sortColumnList) {\n\n //converting all coulumns in array to string. ie [2244,2245] > [\"2244\", \"2245\"]\n currentFields = currentFields.toString().split(\",\");\n\n let firstColPersist = currentFields.indexOf(this.state.firstSortColumn.toString()) > -1, // flag for first sort column is present in result set\n secondColPersist = currentFields.indexOf(this.state.secondSortColumn.toString()) > -1, // flag for second sort column is present in result set\n thirdColPersist = currentFields.indexOf(this.state.thirdSortColumn.toString()) > -1, // flag for third sort column is present in result set\n validFirstColumn = this.state.firstSortColumn !== '', // flag for if first sort column is present if not return\n validSecondColumn = this.state.secondSortColumn !== '', // flag for if second sort column is present if not return\n validThirdColumn = this.state.thirdSortColumn !== ''; // flag for if third sort column is present if not return\n\n let FirstSortColumn = this.state.firstSortColumn,\n FirstColSortOrder = this.state.firstColSortOrder,\n //FirstColSortList = this.state.firstColSortList,\n\n SecondSortColumn = this.state.secondSortColumn,\n SecondColSortOrder = this.state.secondColSortOrder,\n //SecondColSortList = this.state.secondColSortList,\n\n ThirdSortColumn = this.state.thirdSortColumn,\n ThirdColSortOrder = this.state.thirdColSortOrder;\n //ThirdColSortList = this.state.thirdColSortList;\n\n let columnSortPrepare = [];\n if (firstColPersist) {\n columnSortPrepare.push({'col': FirstSortColumn, 'ord': FirstColSortOrder});\n }\n if (secondColPersist) {\n columnSortPrepare.push({'col': SecondSortColumn, 'ord': SecondColSortOrder});\n }\n if (thirdColPersist) {\n columnSortPrepare.push({'col': ThirdSortColumn, 'ord': ThirdColSortOrder});\n }\n\n let newFirstSortColumn = '',\n newFirstColSortOrder = 'asc',\n newFirstColSortList = Object.assign({}, sortColumnList),\n newSecondSortColumn = '',\n newSecondColSortOrder = 'asc',\n newSecondColSortList = {},\n newThirdSortColumn = '',\n newThirdColSortOrder = 'asc',\n newThirdColSortList = {};\n\n columnSortPrepare.map((t, i) => {\n switch (i) {\n case 0:\n newFirstSortColumn = t.col;\n newFirstColSortOrder = t.ord;\n newSecondColSortList = Object.assign({}, newFirstColSortList);\n delete newSecondColSortList[newFirstSortColumn];\n break;\n case 1:\n newSecondSortColumn = t.col;\n newSecondColSortOrder = t.ord;\n\n newThirdColSortList = Object.assign({}, newSecondColSortList);\n delete newThirdColSortList[newSecondSortColumn];\n break;\n case 2:\n newThirdSortColumn = t.col;\n newThirdColSortOrder = t.ord;\n\n break;\n }\n });\n\n let newColSortDir = [], newColumnSortData = {};\n if (newFirstSortColumn !== \"\") {\n newColSortDir.push({'ord': newFirstColSortOrder, 'col': newFirstSortColumn});\n\n newColumnSortData['s[0].sc'] = newFirstSortColumn;\n newColumnSortData['s[0].so'] = newFirstColSortOrder;\n\n if (newSecondSortColumn !== \"\") {\n newColSortDir.push({'ord': newSecondColSortOrder, 'col': newSecondSortColumn});\n\n newColumnSortData['s[1].sc'] = newSecondSortColumn;\n newColumnSortData['s[1].so'] = newSecondColSortOrder;\n\n if (newThirdSortColumn !== \"\") {\n newColSortDir.push({'ord': newThirdColSortOrder, 'col': newThirdSortColumn});\n\n newColumnSortData['s[2].sc'] = newThirdSortColumn;\n newColumnSortData['s[2].so'] = newThirdColSortOrder;\n }\n }\n }\n\n this.setState({\n firstSortColumn: newFirstSortColumn,\n firstColSortOrder: newFirstColSortOrder,\n firstColSortList: newFirstColSortList,\n secondSortColumn: newSecondSortColumn,\n secondColSortOrder: newSecondColSortOrder,\n secondColSortList: newSecondColSortList,\n thirdSortColumn: newThirdSortColumn,\n thirdColSortOrder: newThirdColSortOrder,\n thirdColSortList: newThirdColSortList,\n colSortDirs: newColSortDir,\n columnSortData: newColumnSortData,\n sortColumnList: sortColumnList\n });\n\n return newColumnSortData\n\n }", "function sortMessages(messages) {\n if (!messages) return;\n\n messages.sort(function(item1, item2) {\n return item2.timestamp - item1.timestamp;\n });\n}", "function sort(){\n var toSort = S('#sched-list').children;\n toSort = Array.prototype.slice.call(toSort, 0);\n\n toSort.sort(function(a, b) {\n var a_ord = +a.id.split('e')[1]; //id tags of the schedule items are timeINT the INT = the numeric time\n var b_ord = +b.id.split('e')[1]; //splitting at 'e' and getting the element at index 1 gives use the numeric time\n\n return (a_ord > b_ord) ? 1 : -1;\n });\n\n var parent = S('#sched-list');\n parent.innerHTML = \"\";\n\n for(var i = 0, l = toSort.length; i < l; i++) {\n parent.appendChild(toSort[i]);\n }\n }", "function sortListsByDate() {\r\n\t\treturn getItems().sort(function(a,b){\r\n \t\t\treturn new Date(`${a.date} ${a.time}`) - new Date(`${b.date} ${b.time}`);\r\n\t\t});\r\n\t}", "function dateSorting(column) {\n\n column.sortingAlgorithm = function(a, b) {\n var dt1 = new Date(a).getTime(),\n dt2 = new Date(b).getTime();\n return dt1 === dt2 ? 0 : (dt1 < dt2 ? -1 : 1);\n };\n }", "sort(type) {\n const { getSortBy, batmanListings, supermanListings} = this.props;\n getSortBy({ type, batmanListings, supermanListings });\n }", "sortColumn(event, args, isSortingAsc = true) {\n if (args && args.column) {\n // get previously sorted columns\n const sortedColsWithoutCurrent = this.sortService.getCurrentColumnSorts(args.column.id + '');\n let emitterType;\n // add to the column array, the column sorted by the header menu\n sortedColsWithoutCurrent.push({ sortCol: args.column, sortAsc: isSortingAsc });\n if (this.sharedService.gridOptions.backendServiceApi) {\n this.sortService.onBackendSortChanged(event, { multiColumnSort: true, sortCols: sortedColsWithoutCurrent, grid: this.sharedService.grid });\n emitterType = EmitterType.remote;\n }\n else if (this.sharedService.dataView) {\n this.sortService.onLocalSortChanged(this.sharedService.grid, this.sharedService.dataView, sortedColsWithoutCurrent);\n emitterType = EmitterType.local;\n }\n else {\n // when using customDataView, we will simply send it as a onSort event with notify\n const isMultiSort = this.sharedService && this.sharedService.gridOptions && this.sharedService.gridOptions.multiColumnSort || false;\n const sortOutput = isMultiSort ? sortedColsWithoutCurrent : sortedColsWithoutCurrent[0];\n args.grid.onSort.notify(sortOutput);\n }\n // update the this.sharedService.gridObj sortColumns array which will at the same add the visual sort icon(s) on the UI\n const newSortColumns = sortedColsWithoutCurrent.map((col) => {\n return {\n columnId: col && col.sortCol && col.sortCol.id,\n sortAsc: col && col.sortAsc,\n sortCol: col && col.sortCol,\n };\n });\n // add sort icon in UI\n this.sharedService.grid.setSortColumns(newSortColumns);\n // if we have an emitter type set, we will emit a sort changed\n // for the Grid State Service to see the change.\n // We also need to pass current sorters changed to the emitSortChanged method\n if (emitterType) {\n const currentLocalSorters = [];\n newSortColumns.forEach((sortCol) => {\n currentLocalSorters.push({\n columnId: sortCol.columnId + '',\n direction: sortCol.sortAsc ? 'ASC' : 'DESC'\n });\n });\n this.sortService.emitSortChanged(emitterType, currentLocalSorters);\n }\n }\n }", "function _getPasswordLevel(password, email) {\n var commonPasswordArray = [\"111111\", \"11111111\", \"112233\", \"121212\", \"123123\", \"123456\", \"1234567\", \"12345678\", \"131313\", \"232323\", \"654321\", \"666666\", \"696969\",\n \"777777\", \"7777777\", \"8675309\", \"987654\", \"aaaaaa\", \"abc123\", \"abcdef\", \"abgrtyu\", \"access\", \"access14\", \"action\", \"albert\", \"alexis\", \"amanda\", \"amateur\", \"andrea\", \"andrew\", \"angela\", \"angels\",\n \"animal\", \"anthony\", \"apollo\", \"apples\", \"arsenal\", \"arthur\", \"asdfgh\", \"ashley\", \"august\", \"austin\", \"badboy\", \"bailey\", \"banana\", \"barney\", \"baseball\", \"batman\", \"beaver\", \"beavis\", \"bigdaddy\", \"bigdog\", \"birdie\",\n \"bitches\", \"biteme\", \"blazer\", \"blonde\", \"blondes\", \"bond007\", \"bonnie\", \"booboo\", \"booger\", \"boomer\", \"boston\", \"brandon\", \"brandy\", \"braves\", \"brazil\", \"bronco\", \"broncos\", \"bulldog\", \"buster\", \"butter\", \"butthead\",\n \"calvin\", \"camaro\", \"cameron\", \"canada\", \"captain\", \"carlos\", \"carter\", \"casper\", \"charles\", \"charlie\", \"cheese\", \"chelsea\", \"chester\", \"chicago\", \"chicken\", \"cocacola\", \"coffee\", \"college\", \"compaq\", \"computer\",\n \"cookie\", \"cooper\", \"corvette\", \"cowboy\", \"cowboys\", \"crystal\", \"dakota\", \"dallas\", \"daniel\", \"danielle\", \"debbie\", \"dennis\", \"diablo\", \"diamond\", \"doctor\", \"doggie\", \"dolphin\", \"dolphins\", \"donald\", \"dragon\", \"dreams\",\n \"driver\", \"eagle1\", \"eagles\", \"edward\", \"einstein\", \"erotic\", \"extreme\", \"falcon\", \"fender\", \"ferrari\", \"firebird\", \"fishing\", \"florida\", \"flower\", \"flyers\", \"football\", \"forever\", \"freddy\", \"freedom\", \"gandalf\",\n \"gateway\", \"gators\", \"gemini\", \"george\", \"giants\", \"ginger\", \"golden\", \"golfer\", \"gordon\", \"gregory\", \"guitar\", \"gunner\", \"hammer\", \"hannah\", \"hardcore\", \"harley\", \"heather\", \"helpme\", \"hockey\", \"hooters\", \"horney\",\n \"hotdog\", \"hunter\", \"hunting\", \"iceman\", \"iloveyou\", \"internet\", \"iwantu\", \"jackie\", \"jackson\", \"jaguar\", \"jasmine\", \"jasper\", \"jennifer\", \"jeremy\", \"jessica\", \"johnny\", \"johnson\", \"jordan\", \"joseph\", \"joshua\", \"junior\",\n \"justin\", \"killer\", \"knight\", \"ladies\", \"lakers\", \"lauren\", \"leather\", \"legend\", \"letmein\", \"little\", \"london\", \"lovers\", \"maddog\", \"madison\", \"maggie\", \"magnum\", \"marine\", \"marlboro\", \"martin\", \"marvin\", \"master\", \"matrix\",\n \"matthew\", \"maverick\", \"maxwell\", \"melissa\", \"member\", \"mercedes\", \"merlin\", \"michael\", \"michelle\", \"mickey\", \"midnight\", \"miller\", \"mistress\", \"monica\", \"monkey\", \"monster\", \"morgan\", \"mother\", \"mountain\", \"muffin\",\n \"murphy\", \"mustang\", \"naked\", \"nascar\", \"nathan\", \"naughty\", \"ncc1701\", \"newyork\", \"nicholas\", \"nicole\", \"nipple\", \"nipples\", \"oliver\", \"orange\", \"packers\", \"panther\", \"panties\", \"parker\", \"password\", \"password1\",\n \"password12\", \"password123\", \"patrick\", \"peaches\", \"peanut\", \"pepper\", \"phantom\", \"phoenix\", \"player\", \"please\", \"pookie\", \"porsche\", \"prince\", \"princess\", \"private\", \"purple\", \"pussies\", \"qazwsx\", \"qwerty\",\n \"qwertyui\", \"rabbit\", \"rachel\", \"racing\", \"raiders\", \"rainbow\", \"ranger\", \"rangers\", \"rebecca\", \"redskins\", \"redsox\", \"redwings\", \"richard\", \"robert\", \"rocket\", \"rosebud\", \"runner\", \"rush2112\", \"russia\", \"samantha\",\n \"sammy\", \"samson\", \"sandra\", \"saturn\", \"scooby\", \"scooter\", \"scorpio\", \"scorpion\", \"secret\", \"sexsex\", \"shadow\", \"shannon\", \"shaved\", \"sierra\", \"silver\", \"skippy\", \"slayer\", \"smokey\", \"snoopy\", \"soccer\", \"sophie\", \"spanky\",\n \"sparky\", \"spider\", \"squirt\", \"srinivas\", \"startrek\", \"starwars\", \"steelers\", \"steven\", \"sticky\", \"stupid\", \"success\", \"summer\", \"sunshine\", \"superman\", \"surfer\", \"swimming\", \"sydney\", \"taylor\", \"tennis\", \"teresa\",\n \"tester\", \"testing\", \"theman\", \"thomas\", \"thunder\", \"thx1138\", \"tiffany\", \"tigers\", \"tigger\", \"tomcat\", \"topgun\", \"toyota\", \"travis\", \"trouble\", \"trustno1\", \"tucker\", \"turtle\", \"twitter\", \"united\", \"vagina\", \"victor\",\n \"victoria\", \"viking\", \"voodoo\", \"voyager\", \"walter\", \"warrior\", \"welcome\", \"whatever\", \"william\", \"willie\", \"wilson\", \"winner\", \"winston\", \"winter\", \"wizard\", \"xavier\", \"xxxxxx\", \"xxxxxxxx\", \"yamaha\", \"yankee\", \"yankees\",\n \"yellow\", \"zxcvbn\", \"zxcvbnm\", \"zzzzzz\", \"football\",\"77777777\",\"11111111\",\"12345678\",\"123123123\",\"123456789\",\"987654321\",\"1234567890\",\"1q2w3e4r\",\"1qaz2wsx\",\"aaaaaaaa\",\"abcd1234\",\"alexander\",\"asdfasdf\",\"asdfghjkl\",\"baseball\",\"chocolate\",\"computer\",\"66666666\",\"homedepot\",\"homedepot123\",\"iloveyou\",\"internet\",\"jennifer\",\"liverpool\",\"michelle\",\"password\",\"password1\",\"princess\",\"qwertyuiop\",\"sunshine\",\"superman\",\"testpassword\",\"trustno1\",\"welcome1\",\"whatever\",\"abcdefghi\",\"abcdefgh\"];\n \n var commonPasswordArrayWCS = [\"12345678\", \"123123123\", \"123456789\", \"987654321\", \"1234567890\", \"1q2w3e4r\", \"1qaz2wsx\", \"abcd1234\", \"alexander\", \"asdfasdf\", \"asdfghjkl\", \"baseball\", \"chocolate\", \"computer\", \"football\", \"homedepot\", \"homedepot123\", \"iloveyou\", \"internet\", \"jennifer\", \"liverpool\", \"michelle\", \"password\", \"password1\", \"princess\", \"qwertyuiop\", \"sunshine\", \"superman\", \"testpassword\", \"trustno1\", \"welcome1\", \"whatever\", \"abcdefghi\", \"abcdefgh\", \"12345678\"];\n\n\n email = email !== undefined ? email : \"\";\n\n var regexPat = /(.)\\1{4,}/;\n if(authHelper.isIAMThrottled()) {\n\t if ((password.length < 8) || ($.inArray(password.toLowerCase(), commonPasswordArray) > -1) ||\n\t ((password.toLowerCase().split(password[0].toLowerCase()).length - 1) == password.length) || password.toLowerCase() === $.trim(email.toLowerCase()) || regexPat.test(password)) {\n\t return 0;\n\t }\n } else {\n \tif ((password.length < 8) || ($.inArray(password.toLowerCase(), commonPasswordArrayWCS) > -1) ||\n ((password.toLowerCase().split(password[0].toLowerCase()).length - 1) == password.length) || password.toLowerCase() === $.trim(email.toLowerCase())) {\n return 0;\n }\n }\n \n \n var score = 0;\n if (/[a-z]/.test(password)) { //Check lowercase\n score++;\n }\n if (/[A-Z]/.test(password)) { //Check uppercase\n score++;\n }\n if (/\\d/.test(password)) { //Check Numbers\n score++;\n }\n if (/^[a-zA-Z0-9- ]*$/.test(password) == false) { //Check Special Characters\n score++;\n }\n if ((score > 1 && (password.length > 12)) || (score > 2 && (password.length > 8))) {\n return 2; //Strong Password\n }\n return 1; // Good Password\n }", "chronoSortRoomMessages(state, roomID) {\n let r = state.rooms[roomID]\n if (!r) {\n throw new Error('Room with ID ' + roomID + ' not found when calling' +\n ' chronoSortRoomMessages mutation.');\n }\n // Sort with regards to message timestamp\n r.messages.sort((a, b) => a.timestamp < b.timestamp ? -1 : 1)\n }", "function Sort() {}", "function prepareSortingAndOrders(container) {\n\n\t\t\tvar opt = getOptions(container);\n\n\t\t\t/************************************************\n\t\t\t\t-\tHANDLING OF SORTING ISSUES -\n\t\t\t*************************************************/\n\n\t\t\t// PREPARE THE DATE SRINGS AND MAKE A TIMESTAMP OF IT\n\t\t\tcontainer.find('.tp-esg-item').each(function() {\n\t\t\t\tvar dd = new Date(jQuery(this).data('date'));\n\t\t\t\tjQuery(this).data('date',dd.getTime()/1000);\n\t\t\t})\n\n\t\t\tjQuery(opt.filterGroupClass+'.esg-sortbutton-order,'+opt.filterGroupClass+' .esg-sortbutton-order').each(function() {\n\t\t\t\tvar eso = jQuery(this);\n\t\t\t\teso.removeClass(\"tp-desc\").addClass(\"tp-asc\");\n\t\t\t\teso.data('dir',\"asc\");\n\t\t\t})\n\t}", "sortData(field, order) {\n const arr = [...this.data];\n const columnToSort = this.headerConfig.find(item => item.id === field);\n const directions = {asc: 1, desc: -1};\n\n return arr.sort((a, b) => {\n\n const res = columnToSort.sortType === 'string' \n ? a[field].localeCompare(b[field], ['ru', 'en']) \n : (a[field] - b[field]);\n \n return directions[order] * res;\n\n });\n\n }", "function sortTree() {\n tree.sort(function(a, b) {\n // return b.name.toLowerCase() < a.name.toLowerCase() ? 1 : -1;\n return b.id < a.id ? 1 : -1;\n });\n }", "get orderList() {\n let orderList = this.env.pos.db.getQrCodeOrders()\n orderList = orderList.sort(this.env.pos.sort_by('created_time', true, function (a) {\n if (!a) {\n a = 'N/A';\n }\n return a.toUpperCase()\n }));\n return orderList\n }", "function onNewestSortChange() {\n\t$(\"#newest\").css({'font-weight': 'bold', 'color': 'black'});\n\t$(\"#priority\").css({'font-weight': 'normal', 'color': '#A00000'});\n window.sort = \"Newest\";\n $sid = $.cookie('sid');\n getFeed($sid, window.filter, window.sort, printToScreen);\n}", "onSorted(){\n if(!this.rows) return;\n\n var sorts = this.options.columns.filter((c) => {\n return c.sort;\n });\n\n if(sorts.length){\n this.onSort({ sorts: sorts });\n\n var clientSorts = [];\n for(var i=0, len=sorts.length; i < len; i++) {\n var c = sorts[i];\n if(c.comparator !== false){\n var dir = c.sort === 'asc' ? '' : '-';\n clientSorts.push(dir + c.prop);\n }\n }\n\n if(clientSorts.length){\n // todo: more ideal to just resort vs splice and repush\n // but wasn't responding to this change ...\n var sortedValues = this.$filter('orderBy')(this.rows, clientSorts);\n this.rows.splice(0, this.rows.length);\n this.rows.push(...sortedValues);\n }\n }\n\n this.options.internal.setYOffset(0);\n }", "function getFilterSortFunction(filter) {\n if (['severity'].includes(filter.name)) {\n return (a, b) => Number(a[0]) - Number(b[0]);\n } else {\n return (a, b) => String(a[1]).localeCompare(String(b[1]));\n }\n}", "sort(){\n \tconsole.log(this.state.lastIndex);\n \tif(this.state.participant.length > 1 && this.state.ordercheck){\n\t \t\tthis.state.participant.sort(function(a,b){\n\n\t\t \t\tif (a.fullname.toUpperCase() < b.fullname.toUpperCase()) {\n\t\t\t\t return -1;\n\t\t\t\t}\n\t\t\t\tif (a.fullname.toUpperCase() > b.fullname.toUpperCase()) {\n\t\t\t\t return 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t \t\t\n\t \t\t})\n\t\t \t//this.state.ordercheck = false;\n\t\t \tthis.setState({ordercheck: false,\n\t \t\t\t\t participant: this.state.participant})\n \t}\n\n \telse if(this.state.participant.length > 1 && !this.state.ordercheck){\n\t \t\tthis.state.participant.sort(function(a,b){\n\n\t\t \t\tif (b.fullname.toUpperCase() < a.fullname.toUpperCase()) {\n\t\t\t\t return -1;\n\t\t\t\t}\n\t\t\t\tif (b.fullname.toUpperCase() > a.fullname.toUpperCase()) {\n\t\t\t\t return 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t \t\t\n\t \t\t})\n\t\t \t//this.state.ordercheck = true;\n\t\t \tthis.setState({ordercheck: true,\n\t \t\t\t\t participant: this.state.participant})\n \t}\n \n }", "static sortDescending() {\r\n const profiles = Store.getProfiles();\r\n profiles.sort(({ monthTime: a }, { monthTime: b }) => b - a);\r\n localStorage.setItem('profiles', JSON.stringify(profiles));\r\n }", "function sortJson() {\r\n\t \r\n}", "function sortStickies() {\r\n\ttStickies.sort(sortStickyByTitle); //sort the array\r\n\tif (bIsLoggedIn){\r\n\t\tconsole.log('hi there');\r\n\t\t//also update the userData-table if the user is logged in (we want the same order for simplicity)\r\n\t\t(tUserData[\"user_\" + tUsers[iCurrentUser].user_username]).sort(sortStickyByTitle);\r\n\t\tconsole.log(JSON.parse(JSON.stringify(tUserData[\"user_\" + tUsers[iCurrentUser].user_username])));\r\n\t}\r\n\t\r\n\tfor (i = 0; i<tStickies.length; i++) {\r\n\t\tupdateStickynote(i);\r\n\t}\r\n\tconsole.log(\"SORTED: \");\r\n\tconsole.log(JSON.parse(JSON.stringify(tStickies)));\r\n}", "sortFunction(input) {\n input.sort((a, b) => {\n if (a.timestamp === b.timestamp) {\n return input.indexOf(a) - input.indexOf(b);\n } else {\n return b.timestamp - a.timestamp;\n }\n });\n }", "function sortEntries() {\n entries.sort((a, b) => (new Date(a.date).getTime() - new Date(b.date).getTime()));\n}", "clearColumnSort(event, args) {\n if (args && args.column && this.sharedService) {\n // get current sorted columns, prior to calling the new column sort\n const allSortedCols = this.sortService.getCurrentColumnSorts();\n const sortedColsWithoutCurrent = this.sortService.getCurrentColumnSorts(args.column.id + '');\n if (Array.isArray(allSortedCols) && Array.isArray(sortedColsWithoutCurrent) && allSortedCols.length !== sortedColsWithoutCurrent.length) {\n if (this.sharedService.gridOptions && this.sharedService.gridOptions.backendServiceApi) {\n this.sortService.onBackendSortChanged(event, { multiColumnSort: true, sortCols: sortedColsWithoutCurrent, grid: this.sharedService.grid });\n }\n else if (this.sharedService.dataView) {\n this.sortService.onLocalSortChanged(this.sharedService.grid, this.sharedService.dataView, sortedColsWithoutCurrent, true);\n }\n else {\n // when using customDataView, we will simply send it as a onSort event with notify\n const isMultiSort = this.sharedService.gridOptions && this.sharedService.gridOptions.multiColumnSort || false;\n const sortOutput = isMultiSort ? sortedColsWithoutCurrent : sortedColsWithoutCurrent[0];\n args.grid.onSort.notify(sortOutput);\n }\n // update the this.sharedService.gridObj sortColumns array which will at the same add the visual sort icon(s) on the UI\n const updatedSortColumns = sortedColsWithoutCurrent.map((col) => {\n return {\n columnId: col && col.sortCol && col.sortCol.id,\n sortAsc: col && col.sortAsc,\n sortCol: col && col.sortCol,\n };\n });\n this.sharedService.grid.setSortColumns(updatedSortColumns); // add sort icon in UI\n }\n }\n }" ]
[ "0.58694744", "0.5628748", "0.56030595", "0.550858", "0.5469627", "0.543787", "0.543787", "0.5412021", "0.5375251", "0.5368646", "0.5326117", "0.530929", "0.528575", "0.5276939", "0.5272496", "0.5270572", "0.52679026", "0.5251555", "0.523941", "0.5233764", "0.5230345", "0.5200972", "0.5200422", "0.5184726", "0.51827693", "0.5163881", "0.5155563", "0.5114301", "0.51086015", "0.51052797", "0.5103178", "0.50971913", "0.5088759", "0.5088365", "0.5087429", "0.5087359", "0.50812566", "0.5077126", "0.50610745", "0.5054743", "0.50473094", "0.5044297", "0.50437975", "0.5030735", "0.50260437", "0.5025261", "0.5004732", "0.500033", "0.4990528", "0.49858293", "0.497245", "0.49700153", "0.49678284", "0.49667203", "0.495705", "0.49558464", "0.49417865", "0.4935147", "0.4935147", "0.49218962", "0.49214756", "0.49079248", "0.49039736", "0.49038768", "0.48982707", "0.48965904", "0.48917794", "0.48856992", "0.48854965", "0.48854965", "0.48814246", "0.48740816", "0.48723316", "0.48638895", "0.48603833", "0.48597783", "0.48580226", "0.48554528", "0.48533276", "0.48455235", "0.48444095", "0.48410392", "0.48407426", "0.4835634", "0.483382", "0.48336938", "0.4833168", "0.48313862", "0.48307663", "0.48275995", "0.48275593", "0.48237643", "0.4823727", "0.4819427", "0.48156232", "0.48129225", "0.48116246", "0.48076013", "0.48066002", "0.47986984" ]
0.50169605
46
Sort Password Disable Log GridBy krishna on 21082015
function SortPasswordDisableLogGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var url = "/Reporting/SortPasswordDisableLogGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); var isAll = $('#ShowAllRecords').prop('checked') ? true : false; var userId = $("#ddlUsers").val(); if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) { url += "?fromDate=" + fromDate + "&tillDate=" + tillDate + "&isAll=" + isAll + "&userId=" + userId + "&" + event.data.msg; } $.ajax({ type: "POST", url: url, async: false, contentType: "application/json; charset=utf-8", dataType: "html", data: null, success: function (data) { $("#ReportingGrid").empty(); $("#ReportingGrid").html(data); //ReportingGrid }, error: function (msg) { } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toogleSort(){\r\n\t\tif(settings.sort_type=='desc'){\r\n\t\t\tsettings.sort_type='asc';\r\n\t\t }else{\r\n\t\t\t settings.sort_type='desc';\r\n\t\t }\r\n\t}", "function enableSortingBtn(){\r\n document.querySelector(\"#bubble\").disabled = false;\r\n document.querySelector(\"#insertion\").disabled = false;\r\n document.querySelector(\"#merge\").disabled = false;\r\n document.querySelector(\"#quick\").disabled = false;\r\n document.querySelector(\"#selection\").disabled = false;\r\n}", "function setPKeysAsSortDefaults(){\n\t var view = tabsFrame.newView;\n var numberOfTblgrps = Number(tabsFrame.tablegroupsRestriction);\n var viewType = tabsFrame.typeRestriction;\n var index = view.tableGroups.length - tabsFrame.selectedTableGroup - 1;\n \n \n var numberofSortFields = 0;\n if (view.tableGroups[index].hasOwnProperty('sortFields')){\n \tnumberOfSortFields = view.tableGroups[index].sortFields.length;\n \t}\n\n if(numberofSortFields == 0){ \n var summaryTable = $('sortOrderSummary');\n tBody = summaryTable.tBodies[0];\n var numOfRows = tBody.rows.length;\n \t \n // loop through the summary table\n for (var j = 1; j < numOfRows; j++) {\n var pKeyCell = summaryTable.rows[j].cells[2];\n var setButtonCell = summaryTable.rows[j].cells[8];\n \n // if there is a match, display the order and hide the \"Sort\" button\n //if (pKeyCell.innerHTML != '0') {\n if ((pKeyCell.innerHTML != '0') && setButtonCell.innerHTML.match(/button/gi)) {\n var rowID = setButtonCell.parentNode.id;\n setSortAndSave('', rowID);\n }\n }\n \t}\n}", "function orderBySecurity() {\n document.getElementById(\"list\").innerHTML = \"\";\n markers.sort(function(a, b){return a.security - b.security});\n orderList();\n clickList(markers[markers.length - 1].item);\n scroll(markers[markers.length - 1].item);\n}", "function disableSortingBtn(){\r\n document.querySelector(\".bubbleSort\").disabled = true;\r\n document.querySelector(\".insertionSort\").disabled = true;\r\n document.querySelector(\".selectionSort\").disabled = true;\r\n}", "function enableSortingBtn(){\n document.querySelector(\".bubbleSort\").disabled = false;\n document.querySelector(\".insertionSort\").disabled = false;\n document.querySelector(\".mergeSort\").disabled = false;\n document.querySelector(\".quickSort\").disabled = false;\n document.querySelector(\".selectionSort\").disabled = false;\n}", "function disableSortingBtn(){\r\n document.querySelector(\"#bubble\").disabled = true;\r\n document.querySelector(\"#insertion\").disabled = true;\r\n document.querySelector(\"#merge\").disabled = true;\r\n document.querySelector(\"#quick\").disabled = true;\r\n document.querySelector(\"#selection\").disabled = true;\r\n}", "function disableSortingBtn(){\n document.querySelector(\".bubbleSort\").disabled = true;\n document.querySelector(\".insertionSort\").disabled = true;\n document.querySelector(\".mergeSort\").disabled = true;\n document.querySelector(\".quickSort\").disabled = true;\n document.querySelector(\".selectionSort\").disabled = true;\n}", "function sortingOptions() {\n var doOrderBy = document.getElementById(\"chkOrderBy\").checked;\n if (doOrderBy !== null && doOrderBy === true) {\n document.getElementById(\"cmboFields\").disabled = false;\n document.getElementById(\"comboOrderByMode\").disabled = false;\n }\n else {\n document.getElementById(\"cmboFields\").disabled = true;\n document.getElementById(\"comboOrderByMode\").disabled = true;\n }\n}", "function _getPasswordLevel(password, email) {\n var commonPasswordArray = [\"111111\", \"11111111\", \"112233\", \"121212\", \"123123\", \"123456\", \"1234567\", \"12345678\", \"131313\", \"232323\", \"654321\", \"666666\", \"696969\",\n \"777777\", \"7777777\", \"8675309\", \"987654\", \"aaaaaa\", \"abc123\", \"abcdef\", \"abgrtyu\", \"access\", \"access14\", \"action\", \"albert\", \"alexis\", \"amanda\", \"amateur\", \"andrea\", \"andrew\", \"angela\", \"angels\",\n \"animal\", \"anthony\", \"apollo\", \"apples\", \"arsenal\", \"arthur\", \"asdfgh\", \"ashley\", \"august\", \"austin\", \"badboy\", \"bailey\", \"banana\", \"barney\", \"baseball\", \"batman\", \"beaver\", \"beavis\", \"bigdaddy\", \"bigdog\", \"birdie\",\n \"bitches\", \"biteme\", \"blazer\", \"blonde\", \"blondes\", \"bond007\", \"bonnie\", \"booboo\", \"booger\", \"boomer\", \"boston\", \"brandon\", \"brandy\", \"braves\", \"brazil\", \"bronco\", \"broncos\", \"bulldog\", \"buster\", \"butter\", \"butthead\",\n \"calvin\", \"camaro\", \"cameron\", \"canada\", \"captain\", \"carlos\", \"carter\", \"casper\", \"charles\", \"charlie\", \"cheese\", \"chelsea\", \"chester\", \"chicago\", \"chicken\", \"cocacola\", \"coffee\", \"college\", \"compaq\", \"computer\",\n \"cookie\", \"cooper\", \"corvette\", \"cowboy\", \"cowboys\", \"crystal\", \"dakota\", \"dallas\", \"daniel\", \"danielle\", \"debbie\", \"dennis\", \"diablo\", \"diamond\", \"doctor\", \"doggie\", \"dolphin\", \"dolphins\", \"donald\", \"dragon\", \"dreams\",\n \"driver\", \"eagle1\", \"eagles\", \"edward\", \"einstein\", \"erotic\", \"extreme\", \"falcon\", \"fender\", \"ferrari\", \"firebird\", \"fishing\", \"florida\", \"flower\", \"flyers\", \"football\", \"forever\", \"freddy\", \"freedom\", \"gandalf\",\n \"gateway\", \"gators\", \"gemini\", \"george\", \"giants\", \"ginger\", \"golden\", \"golfer\", \"gordon\", \"gregory\", \"guitar\", \"gunner\", \"hammer\", \"hannah\", \"hardcore\", \"harley\", \"heather\", \"helpme\", \"hockey\", \"hooters\", \"horney\",\n \"hotdog\", \"hunter\", \"hunting\", \"iceman\", \"iloveyou\", \"internet\", \"iwantu\", \"jackie\", \"jackson\", \"jaguar\", \"jasmine\", \"jasper\", \"jennifer\", \"jeremy\", \"jessica\", \"johnny\", \"johnson\", \"jordan\", \"joseph\", \"joshua\", \"junior\",\n \"justin\", \"killer\", \"knight\", \"ladies\", \"lakers\", \"lauren\", \"leather\", \"legend\", \"letmein\", \"little\", \"london\", \"lovers\", \"maddog\", \"madison\", \"maggie\", \"magnum\", \"marine\", \"marlboro\", \"martin\", \"marvin\", \"master\", \"matrix\",\n \"matthew\", \"maverick\", \"maxwell\", \"melissa\", \"member\", \"mercedes\", \"merlin\", \"michael\", \"michelle\", \"mickey\", \"midnight\", \"miller\", \"mistress\", \"monica\", \"monkey\", \"monster\", \"morgan\", \"mother\", \"mountain\", \"muffin\",\n \"murphy\", \"mustang\", \"naked\", \"nascar\", \"nathan\", \"naughty\", \"ncc1701\", \"newyork\", \"nicholas\", \"nicole\", \"nipple\", \"nipples\", \"oliver\", \"orange\", \"packers\", \"panther\", \"panties\", \"parker\", \"password\", \"password1\",\n \"password12\", \"password123\", \"patrick\", \"peaches\", \"peanut\", \"pepper\", \"phantom\", \"phoenix\", \"player\", \"please\", \"pookie\", \"porsche\", \"prince\", \"princess\", \"private\", \"purple\", \"pussies\", \"qazwsx\", \"qwerty\",\n \"qwertyui\", \"rabbit\", \"rachel\", \"racing\", \"raiders\", \"rainbow\", \"ranger\", \"rangers\", \"rebecca\", \"redskins\", \"redsox\", \"redwings\", \"richard\", \"robert\", \"rocket\", \"rosebud\", \"runner\", \"rush2112\", \"russia\", \"samantha\",\n \"sammy\", \"samson\", \"sandra\", \"saturn\", \"scooby\", \"scooter\", \"scorpio\", \"scorpion\", \"secret\", \"sexsex\", \"shadow\", \"shannon\", \"shaved\", \"sierra\", \"silver\", \"skippy\", \"slayer\", \"smokey\", \"snoopy\", \"soccer\", \"sophie\", \"spanky\",\n \"sparky\", \"spider\", \"squirt\", \"srinivas\", \"startrek\", \"starwars\", \"steelers\", \"steven\", \"sticky\", \"stupid\", \"success\", \"summer\", \"sunshine\", \"superman\", \"surfer\", \"swimming\", \"sydney\", \"taylor\", \"tennis\", \"teresa\",\n \"tester\", \"testing\", \"theman\", \"thomas\", \"thunder\", \"thx1138\", \"tiffany\", \"tigers\", \"tigger\", \"tomcat\", \"topgun\", \"toyota\", \"travis\", \"trouble\", \"trustno1\", \"tucker\", \"turtle\", \"twitter\", \"united\", \"vagina\", \"victor\",\n \"victoria\", \"viking\", \"voodoo\", \"voyager\", \"walter\", \"warrior\", \"welcome\", \"whatever\", \"william\", \"willie\", \"wilson\", \"winner\", \"winston\", \"winter\", \"wizard\", \"xavier\", \"xxxxxx\", \"xxxxxxxx\", \"yamaha\", \"yankee\", \"yankees\",\n \"yellow\", \"zxcvbn\", \"zxcvbnm\", \"zzzzzz\", \"football\",\"77777777\",\"11111111\",\"12345678\",\"123123123\",\"123456789\",\"987654321\",\"1234567890\",\"1q2w3e4r\",\"1qaz2wsx\",\"aaaaaaaa\",\"abcd1234\",\"alexander\",\"asdfasdf\",\"asdfghjkl\",\"baseball\",\"chocolate\",\"computer\",\"66666666\",\"homedepot\",\"homedepot123\",\"iloveyou\",\"internet\",\"jennifer\",\"liverpool\",\"michelle\",\"password\",\"password1\",\"princess\",\"qwertyuiop\",\"sunshine\",\"superman\",\"testpassword\",\"trustno1\",\"welcome1\",\"whatever\",\"abcdefghi\",\"abcdefgh\"];\n \n var commonPasswordArrayWCS = [\"12345678\", \"123123123\", \"123456789\", \"987654321\", \"1234567890\", \"1q2w3e4r\", \"1qaz2wsx\", \"abcd1234\", \"alexander\", \"asdfasdf\", \"asdfghjkl\", \"baseball\", \"chocolate\", \"computer\", \"football\", \"homedepot\", \"homedepot123\", \"iloveyou\", \"internet\", \"jennifer\", \"liverpool\", \"michelle\", \"password\", \"password1\", \"princess\", \"qwertyuiop\", \"sunshine\", \"superman\", \"testpassword\", \"trustno1\", \"welcome1\", \"whatever\", \"abcdefghi\", \"abcdefgh\", \"12345678\"];\n\n\n email = email !== undefined ? email : \"\";\n\n var regexPat = /(.)\\1{4,}/;\n if(authHelper.isIAMThrottled()) {\n\t if ((password.length < 8) || ($.inArray(password.toLowerCase(), commonPasswordArray) > -1) ||\n\t ((password.toLowerCase().split(password[0].toLowerCase()).length - 1) == password.length) || password.toLowerCase() === $.trim(email.toLowerCase()) || regexPat.test(password)) {\n\t return 0;\n\t }\n } else {\n \tif ((password.length < 8) || ($.inArray(password.toLowerCase(), commonPasswordArrayWCS) > -1) ||\n ((password.toLowerCase().split(password[0].toLowerCase()).length - 1) == password.length) || password.toLowerCase() === $.trim(email.toLowerCase())) {\n return 0;\n }\n }\n \n \n var score = 0;\n if (/[a-z]/.test(password)) { //Check lowercase\n score++;\n }\n if (/[A-Z]/.test(password)) { //Check uppercase\n score++;\n }\n if (/\\d/.test(password)) { //Check Numbers\n score++;\n }\n if (/^[a-zA-Z0-9- ]*$/.test(password) == false) { //Check Special Characters\n score++;\n }\n if ((score > 1 && (password.length > 12)) || (score > 2 && (password.length > 8))) {\n return 2; //Strong Password\n }\n return 1; // Good Password\n }", "function SortUserData(dataToSort, PropertyToSort) {\n var sortedData = CommonFunctionsFactory.sortData($scope, dataToSort, PropertyToSort, $scope.IsAscending);\n if ($scope.IsAscending == true)\n $scope.IsAscending = false;\n else\n $scope.IsAscending = true;\n\n $scope.OriginalAllUsers = $scope.UserList;\n }", "function SortPasswordLogGrid(event) {\n\n //var reportingType = $(\"#hdReportType\").val();\n //var corporateId = $(\"#CorporateId\").val();\n var url = \"/Reporting/SortPasswordLogGrid\";\n var fromDate = ($(\"#txtFromDate\").val());\n var tillDate = ($(\"#txtTillDate\").val());\n var isAll = $('#ShowAllRecords').prop('checked') ? true : false;\n\n //var userId = $(\"#ddlUsers\").val();\n\n if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) {\n url += \"?fromDate=\" + fromDate + \"&tillDate=\" + tillDate + \"&isAll=\" + isAll + \"&\" + event.data.msg;\n }\n $.ajax({\n type: \"POST\",\n url: url,\n async: false,\n contentType: \"application/json; charset=utf-8\",\n dataType: \"html\",\n data: null,\n success: function (data) {\n\n $(\"#ReportingGrid\").empty();\n $(\"#ReportingGrid\").html(data);\n //ReportingGrid\n\n },\n error: function (msg) {\n }\n });\n}", "function sortAvatarsByLoudness() {\n removeAllOverlays();\n var avatarList = settings.ui.searchWholeDomainForLoudestEnabled ? Object.keys(userStore) : getAvatarsInRadius(SEARCH_RADIUS_DEFAULT);\n settings.users = avatarList.map(function (uuid) { return userStore[uuid]; });\n settings.users = settings.users.sort(sortNumber).slice(0, 10);\n addAllOverlays();\n }", "function sort_cert_email(){\r\r\n\t\r\r\n\tvar click_num = $('#email_click_num').val();\r\r\n\t\r\r\n\tif(click_num == 0 || click_num == 2){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(1);\r\r\n\t\t\r\r\n\t}else if(click_num == 1){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(2);\r\r\n\t\t\r\r\n\t}\r\r\n\t\r\r\n\tfilter = {\r\r\n\t\t\r\r\n\t\tclass_of: $('#get_year').val(),\r\r\n\t\t\r\r\n\t\tsort_by_email: $('#email_click_num').val()\r\r\n\t\t\r\r\n\t};\r\r\n\t\r\r\n\tload_cert_student();\r\r\n\t\r\r\n}", "function disableSorting(columnId)\n\t {\n\t \t$( columnId ).sortable({ disabled: true });\n\t \treturn;\n\t }", "function ewrpt_Sort(e, url) {\n\tvar newUrl = url\n\tif (e.ctrlKey)\n\t\tnewUrl += \"&ctrl=1\";\n\tlocation = newUrl;\n\treturn true;\n}", "function sort(data, input, type) {\n var collection = []\n for (var a = 0; a < Object.keys(data).length; a++) {\n var user = Object.keys(data)[a]\n for (var b = 0; b < data[user].length; b++) {\n collection.push(data[user][b] + \" -@\" + user)\n }\n }\n if (input) {\n if (type) \n {\n if (type == \"user\") {\n input = input.slice(5)\n collection.sort(function (x, y)\n {\n xIndex = String(x.match(/-@(.+)/)).match(input) == null ? \n 256 : String(x.match(/-@(.+)/)).match(input).index\n yIndex = String(y.match(/-@(.+)/)).match(input) == null ? \n 256 : String(y.match(/-@(.+)/)).match(input).index\n return xIndex < yIndex ? -1 : 1\n })\n for (var i = 0; i < collection.length; i++) {\n if (String(collection[i].match(/-@(.+)/)).match(input) == null) {\n collection.splice(i)\n }\n }\n }\n } \n else \n {\n input = input.replace(/[-@:]/g,\"\")\n\n collection.sort(function (x, y)\n {\n xIndex = String(x.match(/(.+)?-@/)).match(input) == null ? \n 256 : String(x.match(/(.+)?-@/)).match(input).index\n yIndex = String(y.match(/(.+)?-@/)).match(input) == null ? \n 256 : String(y.match(/(.+)?-@/)).match(input).index\n return xIndex < yIndex ? -1 : 1\n })\n for (var i = 0; i < collection.length; i++) {\n if (String(collection[i].match(/(.+)?-@/)).match(input) == null) {\n collection.splice(i)\n }\n }\n }\n }\n \n return collection\n}", "function sort_ite_email(){\r\r\n\t\r\r\n\tvar click_num = $('#email_click_num').val();\r\r\n\t\r\r\n\tif(click_num == 0 || click_num == 2){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(1);\r\r\n\t\t\r\r\n\t}else if(click_num == 1){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(2);\r\r\n\t\t\r\r\n\t}\r\r\n\t\r\r\n\tfilter = {\r\r\n\t\t\r\r\n\t\tclass_of: $('#get_year').val(),\r\r\n\t\t\r\r\n\t\tsort_by_email: $('#email_click_num').val()\r\r\n\t\t\r\r\n\t};\r\r\n\t\r\r\n\tload_ite_student();\r\r\n\t\r\r\n}", "sort() {\n if(this.data.length >= 2){\n for (var i = 0; i < this.data.length - 1; i++){\n for (var j = i + 1; j < this.data.length; j++){\n if (this.data[i].users.length < this.data[j].users.length){\n let tmp = this.data[i];\n this.data[i] = this.data[j];\n this.data[j] = tmp;\n \n }\n }\n \n }\n }\n }", "orderBy(fn){\n let sorts = this.sorts\n let orderBy = []\n\n sorts.forEach((sortOpts,key)=>{\n \n let desc = sortOpts.desc && sortOpts.desc != 'false' ? 'DESC' : 'ASC'\n\n let sort = fn && fn(key, sortOpts)\n\n if( !sort && sort !== false )\n sort = `${this.db.escapeId(key)} ${desc}`\n \n if( sort )\n orderBy.push(sort)\n })\n\n return orderBy.length > 0 ? 'ORDER BY '+orderBy.join(', ') : ''\n }", "table_sorter_custom_ajax (table, url) {\n var obj = table.config.pager.ajaxObject;\n var page = table.config.pager.page;\n var pageLength = table.config.pager.size;\n var sort = [];\n var filter = [];\n var key, data, item;\n var dir=\"\";\n var titan_report=this.titan_report;\n var sortListTemp=table.config.sortList;\n var dataObj =this.titan_report.data_object;\n\n for (item in table.config.sortList) {\n\n key = table.config.sortList[item][0];\n data = table.config.sortList[item][1];\n if(this.titan_report.m.new_columns) { //columns may have changed use that set\n for(var index in this.titan_report.m.new_columns) {\n dir=\"\";\n if(data===1) dir=\"DESC\";\n if(data===0) dir=\"ASC\";\n if(key===parseInt(index)) sort.push([this.titan_report.m.new_columns[index].name, dir]);\n }\n } else { //use origonal column set\n for(index in method.columns) {\n dir=\"\";\n if(data===1) dir=\"DESC\";\n if(data===0) dir=\"ASC\";\n if(key===parseInt(index)) sort.push([this.titan_report.m.columns[index].name, dir]);\n }\n }\n }\n \n for (item in table.config.lastSearch) {\n key = item;\n data = table.config.lastSearch[item];\n if (data.trim() === \"\") continue;\n if(this.titan_report.m.new_columns) {\n for(index in this.titan_report.m.new_columns) {\n if(key===index) filter.push([this.titan_report.m.new_columns[index].name, data]);\n }\n }else {\n for(index in this.titan_report.m.columns) {\n if(key===index) filter.push([this.titan_report.m.columns[index].name, data]);\n }\n }\n }\n \n if(this.titan_report.data_object.parameterless === false) {\n this.titan_report.data_object.parameters = {};\n $('[id^='+this.titan_report.instance+'Titan_Parameter_]').each(function () {\n titan_report.data_object.parameters[this.id] = this.value;\n });\n }\n\n this.titan_report.data_object.aggregates = {};\n /*$('[id^=Titan_Aggregate_]').each(function () {\n if(this.checked) titan_report.data_object.aggregates[this.id] = this.checked;\n });*/\n \n this.titan_report.data_object.aggregates = {};\n this.titan_report.data_object.parameters['multi_search']=$(\"#\"+this.titan_report.instance+\"_\"+\"multi_search\").val();\n dataObj.page = page;\n dataObj.pageLength = pageLength;\n dataObj.sort = sort;\n dataObj.filters = filter;\n obj.data = JSON.stringify(dataObj);\n table.config.pager.ajaxObject = obj; //?\n return url;\n }", "set overrideSorting(value) {}", "function keywords_sort(sorting_method) {\n var checkbox = document.querySelector('.admin-panel-keywords-keywords-checkbox');\n //If it is an english localization, we don't need to show it, because it is a default localization.\n var current_sorting_method = document.querySelector('#'+sorting_method);\n //href equals to url.\n window.location.href = ((checkbox.dataset.localization === \"en\") ? \"\" : \n \"/ru\")+\"/admin/keywords/\"+current_sorting_method.id+\"_\"+current_sorting_method.dataset.sorting_mode;\n }", "function enableSorting() {\n $(\"#search-results ul\").sortable({connectWith: '#playlist ul'}).disableSelection();\n }", "function getPermLevels() {\n return [...config_1.config.permLevels].sort((a, b) => b.level - a.level);\n}", "function changeSort() {\n window.location.href = loc.origin + '/?sk=h_chr';\n }", "function reorderLogFiles(logs) {\n\tlet dig = [];\n\tlet lett = [];\n\tfor(let i = 0; i < logs.length; i++){\n\t\tlet lastCode = logs[i][logs[i].length - 1].charCodeAt();\n\t\tif (lastCode >= 97 && lastCode <= 122) {\n\t\t\tlett.push(logs[i]);\n\t\t}else {\n\t\t\tdig.push(logs[i]);\n\t\t}\n\t}\n\t//把前面貼到後面\n\tlett.sort((a, b) => {\n\t a = a.substring(a.indexOf(' ') + 1) + a.substring(0, a.indexOf(' '))\n\t b = b.substring(b.indexOf(' ') + 1) + b.substring(0, a.indexOf(' '))\n\t return a.localeCompare(b)\n })\n\tlet ans = lett.concat(dig);\n\treturn ans;\n}", "function sort_overview_email(){\r\r\n\t\r\r\n\tvar click_num = $('#email_click_num').val();\r\r\n\t\r\r\n\tif(click_num == 0 || click_num == 2){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(1);\r\r\n\t\t\r\r\n\t}else if(click_num == 1){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(2);\r\r\n\t\t\r\r\n\t}\r\r\n\t\r\r\n\tfilter = {\r\r\n\t\t\r\r\n\t\tclass_of: $('#get_year').val(),\r\r\n\t\t\r\r\n\t\tsort_by_email: $('#email_click_num').val()\r\r\n\t\t\r\r\n\t};\r\r\n\t\r\r\n\tload_overview_student();\r\r\n\t\r\r\n}", "function loginList(pageNo, orderType) {\n if (!pageNo) pageNo = 1;\n if (!orderType) {\n orderType = $('input[name=orderType]').val();\n } else {\n $('input[name=orderType]').val(orderType);\n }\n var gST=$('#log_Query input[name=startT]').val();\n var gEt=$('#log_Query input[name=endT]').val();\n if(gST==='' && gEt!==''){\n yunNotyError('请输入起始时间!');\n return;\n }\n if(gST!=='' && gEt===''){\n yunNotyError('请输入结束时间!');\n return;\n }\n var startgST = new Date(gST.replace(\"-\", \"/\").replace(\"-\", \"/\"));\n var endgEt = new Date(gEt.replace(\"-\", \"/\").replace(\"-\", \"/\"));\n if(endgEt<startgST){\n yunNotyError('起始时间不能小于结束时间!!');\n return;\n }\n $('#replayList').tableAjaxLoader2(7);\n $.ajax({\n type: 'post',\n datatype: 'json',\n cache: false,\n //不从缓存中去数据\n url: encodeURI('../../loginLog/list?pageSize=' + 20 + '&pageNo=' + pageNo + '&orderType=' + orderType),\n data: $(\"#log_Query\").serialize(),\n success: function(data) {\n if (data.status === 0) {\n var s = [];\n if (data.List.length > 0) {\n for (var i = 0; i < data.List.length; i++) {\n s.push('<tr>');\n s.push('<td>');\n s.push(data.List[i].Username === null ? '&nbsp;': data.List[i].Username);\n s.push('</td>');\n s.push('<td>');\n s.push(data.List[i].Name === null ? '&nbsp;': data.List[i].Name);\n s.push('</td>');\n s.push('<td>');\n s.push(data.List[i].Datetime === null ? '&nbsp;': data.List[i].Datetime);\n s.push('</td>');\n s.push('<td>');\n s.push(data.List[i].Ipaddress === null ? '&nbsp;': data.List[i].Iptddress);\n s.push('</td>');\n s.push('<td>');\n s.push(data.List[i].Address === null ? '&nbsp;': data.List[i].Address);\n s.push('</td>');\n s.push('<td>');\n s.push(data.List[i].Groupname === null ? '&nbsp;': data.List[i].Groupname);\n s.push('</td>');\n s.push('<td>第');\n s.push(data.List[i].Logintimes === null ? '&nbsp;': data.List[i].Logintimes);\n s.push('次登录</td>');\n s.push('</tr>');\n }\n $('#replayList').find('tbody').html(s.join(''));\n //下面开始处理分页\n var options = {\n data: [data, 'List', 'total'],\n currentPage: data.currentPage,\n totalPages: data.totlePages,\n onPageClicked: function(event, originalEvent, type, page) {\n loginList(page, orderType);\n }\n };\n setPage('userLoginPageList', options);\n } else {\n $('#replayList').find('tbody').html('<tr><td colspan=\"7\" style=\\\"text-align:center;\\\"><i class=\\\"glyphicon glyphicon-warning-sign\\\"></i>&nbsp;&nbsp;当前纪录为空</td></tr>');\n $('#userLoginPageList').html('');\n }\n } else {\n yunNoty(data);\n }\n }\n });\n}", "get overrideSorting() {}", "function getListGeneralUserAuthorized() {\n var ListGeneralUserAuthorized = [];\n var temp;\n var len=0;\n var leng=0;\n var found=false;\n \n // Recuperation de la liste des users Admin\n temp = Get_ADMIN().split(',');\n len = temp.length;\n for(n=1;n<len+1;++n){\n ListGeneralUserAuthorized.push(temp[n-1]);\n }\n // Recuperation de la liste des users Admin du Suivi\n temp = Get_ADMIN_SUIVI().split(',');\n len = temp.length;\n leng = ListGeneralUserAuthorized.length;\n for(n=1;n<len+1;++n){\n found=false;\n for (m=1;m<leng+1;++m) {\n if (ListGeneralUserAuthorized[m-1] == temp[n-1]) {\n found=true;\n break;\n }\n }\n if (found == false) {\n ListGeneralUserAuthorized.push(temp[n-1]);\n }\n }\n // Recuperation de la liste des users de la BU SQLi Entreprise Paris\n temp = (GetManagerBU(BU_ENTREPRISE_PARIS)).split(',');\n len = temp.length;\n leng = ListGeneralUserAuthorized.length;\n for(n=1;n<len+1;++n){\n found=false;\n for (m=1;m<leng+1;++m) {\n if (ListGeneralUserAuthorized[m-1] == temp[n-1]) {\n found=true;\n break;\n }\n }\n if (found == false) {\n ListGeneralUserAuthorized.push(temp[n-1]);\n }\n } \n // Recuperation de la liste des users de la BU Compta Fournisseur\n temp = (GetManagerBU(BU_COMPTA_FOURNISSEUR)).split(',');\n len = temp.length;\n leng = ListGeneralUserAuthorized.length;\n for(n=1;n<len+1;++n){\n found=false;\n for (m=1;m<leng+1;++m) {\n if (ListGeneralUserAuthorized[m-1] == temp[n-1]) {\n found=true;\n break;\n }\n }\n if (found == false) {\n ListGeneralUserAuthorized.push(temp[n-1]);\n }\n }\n // Recuperation de la liste des users de la BU Assistante\n temp = (GetManagerBU(BU_ASSISTANTE_ENTREPRISE_PARIS)).split(',');\n len = temp.length;\n leng = ListGeneralUserAuthorized.length;\n for(n=1;n<len+1;++n){\n found=false;\n for (m=1;m<leng+1;++m) {\n if (ListGeneralUserAuthorized[m-1] == temp[n-1]) {\n found=true;\n break;\n }\n }\n if (found == false) {\n ListGeneralUserAuthorized.push(temp[n-1]);\n }\n }\n return ListGeneralUserAuthorized;\n}", "_resetOldSorting() {\n const rowChildren = this.shadowRoot.querySelectorAll('.th[sorted]');\n rowChildren.forEach((el) => el.removeAttribute('sorted'));\n }", "function Cached_sortUser(beanObj) {\n\tif (beanObj != null) {\n\t\t// Get Active-only beans\n\t\tbeanObj.actionList = Cached_getActiveList(beanObj.actionList);\n\t\tbeanObj.sessionList = Cached_getActiveList(beanObj.sessionList);\n\t\tbeanObj.propertiesList = Cached_getActiveList(beanObj.propertiesList);\n\t\tbeanObj.calendarList = Cached_getActiveList(beanObj.calendarList);\n\t\t$.each(beanObj.calendarList, function(i, calendarObj) {\n\t\t\tcalendarObj.eventList = Cached_getActiveList(calendarObj.eventList);\n\t\t});\n\n\t\t// Sorting\n\t\tbeanObj.actionList.sort(function(a, b) {\n\t\t\treturn a.createdOn - b.createdOn;\n\t\t});\n\t\tbeanObj.sessionList.sort(function(a, b) {\n\t\t\treturn a.createdOn - b.createdOn;\n\t\t});\n\t\tbeanObj.propertiesList.sort(function(a, b) {\n\t\t\tif (a.propKey < b.propKey) return -1;\n\t\t\tif (a.propKey > b.propKey) return 1;\n\t\t\treturn 0;\n\t\t});\n\t\tbeanObj.calendarList.sort(function(a, b) {\n\t\t\tif (a.calendarName < b.calendarName) return -1;\n\t\t\tif (a.calendarName > b.calendarName) return 1;\n\t\t\treturn 0;\n\t\t});\n\t}\n} // .end of Cached_sortUser", "function theQwertyGrid_sortString(key) {\n\t\t\tif(_theQwertyGrid_sortInAsc) {\n\t\t\t\t_theQwertyGrid_sortInAsc = false;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(a,b){\n\t\t\t\t\treturn a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_theQwertyGrid_sortInAsc = true;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(b,a){\n\t\t\t\t\treturn a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;\n\t\t\t\t});\n\t\t\t}\n\t\t\ttheQwertyGrid_reFillTable(_theQwertyGrid_displayData);\n\t\t}", "function sort_graduation_email(){\r\r\n\t\r\r\n\tvar click_num = $('#email_click_num').val();\r\r\n\t\r\r\n\tif(click_num == 0 || click_num == 2){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(1);\r\r\n\t\t\r\r\n\t}else if(click_num == 1){\r\r\n\t\t\r\r\n\t\t$('#email_click_num').val(2);\r\r\n\t\t\r\r\n\t}\r\r\n\t\r\r\n\tfilter = {\r\r\n\t\t\r\r\n\t\tclass_of: $('#get_year').val(),\r\r\n\t\t\r\r\n\t\tsort_by_email: $('#email_click_num').val()\r\r\n\t\t\r\r\n\t};\r\r\n\t\r\r\n\tload_graduation_student();\r\r\n\t\r\r\n}", "fnAsc() {\n let sortData = this.state.data.sort((obj1, obj2) => {\n return obj1.createdDate > obj2.createdDate ? -1 : 1;\n });\n this.setState({\n data: sortData,\n tableData: sortData.slice(0, 5),\n totalPages: Math.ceil(sortData.length / 5),\n currPage: 1,\n });\n let AscButton = document.getElementById(\"Asc\");\n AscButton.disabled = true;\n let DecButton = document.getElementById(\"Dec\");\n DecButton.disabled = false;\n }", "function handleTogglePassVisibility(event) {\n const cell = event.target.parentElement.parentElement;\n const input = cell.getElementsByTagName(\"input\")[0];\n\n if (input.type === \"password\") {\n input.type = \"text\";\n event.target.innerText = \"Hide\";\n } else {\n input.type = \"password\";\n event.target.innerText = \"Show\";\n }\n }", "function sortUsersList() {\n let i, users, shouldSwitch;\n let list = document.getElementById(\"users-list\");\n let switching = true;\n\n while (switching) {\n switching = false;\n users = list.getElementsByClassName(\"list-group-item\");\n for (i = 0; i < (users.length - 1); ++i) {\n shouldSwitch = false;\n if (users[i].textContent.toLowerCase() > users[i + 1].textContent.toLowerCase()) {\n shouldSwitch = true;\n break;\n }\n }\n if (shouldSwitch) {\n users[i].parentNode.insertBefore(users[i + 1], users[i]);\n switching = true;\n }\n }\n }", "sortData() {\n this.data.sort(($val1, $val2 ) => {\n const a = JSON.stringify($val1[this.sortBy]);\n const b = JSON.stringify($val2[this.sortBy]);\n if ( a < b ){\n return -this.sortDir;\n }\n if ( a > b ){\n return this.sortDir;\n }\n return 0;\n });\n }", "function initSort() {\n table1.style.display = \"block\"\n table1.style.margin = \"auto\"\n for (let i = 0; i < 6; i++) {\n var t = Number(table.rows[0].cells[i].children[0].value);\n t = t || 1;\n\n var x = new key(t);\n\n arr[i] = x\n // x.rows[0].cells[i].children[0].disabled = true;\n }\n console.log(arr);\n let n = arr.length;\n if (arr.length > 1) {\n try {\n\n setup(500);\n\n setRelations();\n\n // changeButtonVisibility();\n sorting = true;\n\n last = arr[arr.length - 1].y;\n // timer that calls the heapSort function every 500 milSec. \n startTimer = setInterval(function () { heapSort(); }, milSec);\n\n } catch (error) {\n alert(error + \"\\n\" + error.stack);\n }\n }\n}", "_sortWkorkoutsBy(e) {\r\n workOutBox.innerHTML = \"\";\r\n workOutBox.innerHTML = FORM_out;\r\n const sortWith = e.target.innerText.split(\" \")[0].toLowerCase();\r\n if (sortWith === \"type\") {\r\n this.#workouts=this.#workouts.sort((a, b) => {\r\n if (a[sortWith] < b[sortWith]) return -1;\r\n if (a[sortWith] > b[sortWith]) return 1;\r\n else return 0;\r\n });\r\n this.#workouts.forEach(workout => this._renderWorkoutOnSideBar(workout));\r\n }\r\n else {\r\n this.#workouts = this.#workouts.sort((a, b) => b[sortWith] - a[sortWith]);\r\n this.#workouts.forEach(workout => this._renderWorkoutOnSideBar(workout));\r\n }\r\n \r\n\r\n }", "function send_pwd_group_row_to_reports(type, grp_name, sites, strength) {\n for (var i = 0; i < report_tab_ids.length; i++) {\n\tchrome.tabs.sendMessage(report_tab_ids[i], {\n\t\ttype: \"report-table-change-row\",\n\t\t table_name: \"pwd_groups\",\n\t\t mod_type: type,\n\t\t changed_row: [\n\t\t\t\t grp_name,\n\t\t\t\t sites.sort().join(\", \"),\n\t\t\t\t strength.join(\", \"),\n\t\t\t\t strength.join(\", \"),\n\t\t\t\t ],\n\t\t });\n }\n}", "function manageExportSorts() {\n\n var disabledOptions = [];\n\n for (var i = 0; i < sortBys.length; i++) {\n var sortByVal = $(\"#\" + sortBys[i]).val();\n var sortByVal2 = document.getElementById(sortBys[i]);\n var value = sortByVal2.options[sortByVal2.selectedIndex].value;\n if (sortByVal !== \"\") {\n $('.' + sortByVal).prop(\"disabled\", \"true\");\n $(\".\" + sortByVal).css(\"background-color\", \"#e6e6e6\");\n if (disabledOptions.indexOf(sortByVal) === -1) {\n disabledOptions[disabledOptions.length] = value;\n }\n }\n else {\n for (var j = 0; j < optionClasses.length; j++) {\n if (disabledOptions.indexOf(optionClasses[j]) == -1) {\n $(\".\" + optionClasses[j]).removeAttr(\"disabled\");\n $(\".\" + optionClasses[j]).css(\"background-color\", \"white\");\n }\n }\n }\n }\n}", "function orderUsers(name){\n\t\t\tvar charCode = name.PartnerName.toUpperCase().charCodeAt(0);\n\t\t\tif(charCode >= 65 && charCode<=122){\n\t\t\t\treturn name.PartnerName;\n\t\t\t}else{\n\t\t\t\treturn \"zzzzz\"+(charCode + 122);\n\t\t\t}\n\t\t}", "function laodPLMSortColumn(action, url, processHandler)\r\n{\r\n\t//alert('calling the new sort function');\r\n\tcloseMsgBox();\r\n\tvar htmlAreaObj = _getWorkAreaDefaultObj();\r\n var objAjax = htmlAreaObj.getHTMLAjax();\r\n var objHTMLData = htmlAreaObj.getHTMLDataObj();\r\n\tif(objAjax)\r\n {\r\n objAjax.setActionURL(action);\r\n objAjax.setActionMethod(url);\r\n objAjax.setProcessHandler(processHandler);\r\n objAjax.sendRequest();\r\n \r\n if(objAjax.isProcessComplete())\r\n \t{\r\n \tobjHTMLData.resetChangeFields();\r\n \t}\r\n }\r\n\t\r\n}", "function getKeys(fields)\n{\n return Object.keys(fields).sort(function(a, b)\n {\n if (a == 'login')\n {\n return 1;\n } else {\n return 0;\n }\n });\n}", "function onSort() {\n\tvar items = {};\n\titems[ this.options.sortIdKey ] = this.sorTable.sortId;\n\titems[ this.options.sortAscKey ] = this.sorTable.sortAsc;\n\tchrome.storage.local.set( items );\n}", "function sort_usernames(temp) {\n\t\ttemp.sort(function (a, b) {\n\t\t\tvar entryA = a.company + a.username;\n\t\t\tvar entryB = b.company + b.username;\n\t\t\tif (entryA < entryB) return -1;\n\t\t\tif (entryA > entryB) return 1;\n\t\t\treturn 0;\n\t\t});\n\t\treturn temp;\n\t}", "function sort_usernames(temp) {\n\t\ttemp.sort(function (a, b) {\n\t\t\tvar entryA = a.company + a.username;\n\t\t\tvar entryB = b.company + b.username;\n\t\t\tif (entryA < entryB) return -1;\n\t\t\tif (entryA > entryB) return 1;\n\t\t\treturn 0;\n\t\t});\n\t\treturn temp;\n\t}", "getSortedUsers() {\n //clone a new array for users\n let users = [...this.props.users]\n if (this.state.sortDirection === 'asc') {\n users.sort(this.genSortAscendingByField(this.state.sortField))\n } else {\n users.sort(this.genSortDescendingByField(this.state.sortField))\n }\n\n return users\n }", "function enableSortBys() {\n for (var i = 0; i < sortBys.length; i++) {\n $(\"#\" + sortBys[i] + \" option\").each(function () {\n $(this).removeAttr(\"disabled\");\n })\n }\n}", "function noSort(inSortInfo){\n \n if(inSortInfo == 5){\n return false;\n }else{\n return true;\n }\n }", "function sortFromOption(){\n // console.log(\"sortFromOption\");\n getSortMethod(nowArray);\n pageNumber = 1;\n changeDisplayAmount(displayType,1);\n}", "function sortNumericallyAscending() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utLinesUtility,\n }, function (up) {\n var keylines = up.inlines.map((function (line) {\n var match = line.match(/(\\d+)/);\n var key = match ? parseInt(match[0]) : 0;\n return [key, line];\n }));\n keylines.sort(function (a, b) { return a[0] - b[0]; });\n return keylines.map(function (keypair) { return keypair[1]; });\n });\n }", "function sortUserName(userName) {\n return userName.toLowerCase().split(\"\").sort().join(\"\");\n }", "function list_set_sort(col)\n {\n if (settings.sort_col != col) {\n settings.sort_col = col;\n $('#notessortmenu a').removeClass('selected').filter('.by-' + col).addClass('selected');\n rcmail.save_pref({ name: 'kolab_notes_sort_col', value: col });\n\n // re-sort table in DOM\n $(noteslist.tbody).children().sortElements(function(la, lb){\n var a_id = String(la.id).replace(/^rcmrow/, ''),\n b_id = String(lb.id).replace(/^rcmrow/, ''),\n a = notesdata[a_id],\n b = notesdata[b_id];\n\n if (!a || !b) {\n return 0;\n }\n else if (settings.sort_col == 'title') {\n return String(a.title).toLowerCase() > String(b.title).toLowerCase() ? 1 : -1;\n }\n else {\n return b.changed_ - a.changed_;\n }\n });\n }\n }", "function initializeSortingState() {\n let datasetFields = Object.values(classNameToKeyMap);\n datasetFields.forEach(function(field) {\n ascendingOrder[field] = false;\n });\n}", "applyFiltersAndSorts() {\n var list = this.props.list.filter(this.matchesFilterEnergyLevel);\n list = list.filter(this.matchesFilterFunLevel)\n var sort_type = this.getSortFunction()\n if(sort_type != null){\n list = list.sort(sort_type)\n }\n return list\n\n }", "function resetAscending(field)\n {\n date_ascending = false;\n location_ascending = false;\n artifact_ascending = false;\n description_ascending = false;\n gps_ascending = false;\n if (field == 'date')\n {\n date_ascending = true;\n }\n if (field == 'location')\n {\n location_ascending = true;\n }\n if (field == 'artifact')\n {\n artifact_ascending = true;\n }\n if (field == 'description')\n {\n description_ascending = true;\n }\n if (field == 'gps')\n {\n gps_ascending = true;\n }\n }", "function ascendentAlphabeticOder() {\n userOutput.sort(User.alphabeticOrder)\n}", "static sortAscending() {\r\n const profiles = Store.getProfiles();\r\n profiles.sort(({ monthTime: a }, { monthTime: b }) => a - b);\r\n localStorage.setItem('profiles', JSON.stringify(profiles));\r\n }", "function saveSortParams(event) {\n var table = jQuery(event.target);\n var selected = table.find(\".headerSortDown\");\n var direction = \"down\";\n if (selected.length == 0) {\n\tselected = table.find(\".headerSortUp\");\n\tdirection = \"up\";\n }\n\n selected = jQuery.trim(selected.text());\n jQuery.post(\"/filter/set_single_task_filter\", {\n \tname : \"sort\",\n \tvalue : (selected + \"_\" + direction)\n });\n}", "function sort_path()\n {\n var path=window.location+\"\";\n path= path.split('?')[0];\n a=path.split('#');\n b=a[0];\n if(a.length>0)\n b=path.split('#')[1];\n c=b.split('/');\n sec=b.split('/')[0];\n if(sec==\"project\")\n sec=c[0]+'/'+c[1];\n var sort_by=$('.sort.selected').text();\n //~ $('.starred starred_count').addClass('open'); \n var order=$('.asc-desc.selected').children('span').attr('class');\n window.location=\"#\"+sec+'?sort_by='+sort_by+'&order='+order;\n }", "function custom_sort(table, column, direction){\n\tvar index;\n\tvar oSettings = this.tables[table_id].oTable[table_id].fnSettings();\n\tvar table_id = table.attr('id');\n\t$.each(table.dataTableSettings,function(key,val){\n\t\tif (this.sInstance == table_id){\n\t\t\tindex = key;\n\t\t}\n\t});\n\t// Only show alert if not all values are preloaded\n\tif (table.dataTableSettings[index].aoData.length != table.dataTableSettings[index]._iRecordsTotal){\n\t\talert('Attention!\\nOnly visible values are sorted!');\n\t}\n\t// Set bServerSide to false to prevent table from getting new records from database\n\toSettings.oFeatures.bServerSide = false;\n\t// Sort loaded values based on direction\n\tif (direction == 'desc'){\n\t\ttable.fnSort( [ [column,'desc'] ] );\n\t}\n\telse if (direction == 'asc'){\n\t\ttable.fnSort( [ [column,'asc'] ] );\n\t}\n\t// Set bServerSide to true again to make sure table is working properly as before\n\toSettings.oFeatures.bServerSide = true;\n}", "function SortUserLogActivityGrid(event) {\n\n //var reportingType = $(\"#hdReportType\").val();\n //var corporateId = $(\"#CorporateId\").val();\n var url = \"/Reporting/SortUserLogActivityGrid\";\n var fromDate = ($(\"#txtFromDate\").val());\n var tillDate = ($(\"#txtTillDate\").val());\n //var isAll = $('#ShowAllRecords').prop('checked') ? true : false;\n var isAll = $('#ShowAllRecords').prop('checked') ? true : false;\n var userId = $(\"#ddlUsers\").val();\n if (userId == \"\") {\n userId = 0;\n }\n if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) {\n url += \"?fromDate=\" + fromDate + \"&tillDate=\" + tillDate + \"&isAll=\" + isAll + \"&userId=\" + userId + \"&\" + event.data.msg;\n }\n $.ajax({\n type: \"POST\",\n url: url,\n async: false,\n contentType: \"application/json; charset=utf-8\",\n dataType: \"html\",\n data: null,\n success: function (data) {\n ;\n $(\"#ReportingGrid\").empty();\n $(\"#ReportingGrid\").html(data);\n //ReportingGrid\n\n },\n error: function (msg) {\n }\n });\n}", "function pOrdenacionGridPedidosAnteriores(NombreColumna,imagen,formato) {\n\t\n\tvar aux = localStorage.getItem('sortgrid');\n\tvar grid = $(\"#pGridPedidosAnteriores\").data(\"kendoGrid\");\n\tconsole.log(\"ORDENADO LA COMUNA \" + NombreColumna +\" \"+ imagen +\" \"+ formato ); \t\n\t\tswitch (aux) {\n\t\t\t case \"0\":\n\t\t\t\t\t\tgrid.dataSource.sort({\n\t\t\t\t\t\t\tfield: NombreColumna, \n\t\t\t\t\t\t\tformat: formato,\n\t\t\t\t\t\t\ttype: \"date\",\n\t\t\t\t\t\t\tdir: \"desc\" \n\t\t\t\t\t});\n\t\t\t\t\tgrid.refresh();\n\t\t\t\t\tlocalStorage.setItem('sortgrid',\"1\");\n\t\t\t\t\t$('#'+imagen).attr(\"src\",\"./images/sort_desc.png\");\n\t\t\t break;\n\t\t\t case \"1\":\n\t\t\t\t\t\tgrid.dataSource.sort({\n\t\t\t\t\t\t\tfield: NombreColumna,\n\t\t\t\t\t\t\tformat: formato, \n\t\t\t\t\t\t\ttype: \"date\",\n\t\t\t\t\t\t\tdir: \"asc\" \n\t\t\t\t\t});\n\t\t\t\t\tgrid.refresh();\n\t\t\t\t\tlocalStorage.setItem('sortgrid',\"2\");\n\t\t\t\t\t$('#'+imagen).attr(\"src\",\"./images/sort_asc.png\");\n\t\t\t break;\n\t\t\t case \"2\":\n\t\t\t $(\"#pGridPedidosAnteriores\").data(\"kendoGrid\").dataSource.sort({});\n\t\t\t console.log(\"ORDENADO LA COMUNA \" + NombreColumna +\" \"+ imagen +\" \"+ formato ); \n\t\t\t localStorage.setItem('sortgrid',\"0\");\n\t\t\t $('#'+imagen).attr(\"src\",\"./images/sort_both.png\");\n\t\t\t break;\n\t\t}\n}", "onHandleSort(event) {\n const { fieldName: sortedBy, sortDirection } = event.detail;\n const cloneData = [...this.data];\n\n cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));\n this.data = cloneData;\n this.sortDirection = sortDirection;\n this.sortedBy = sortedBy;\n }", "function clearSortOrder(){\n var view = tabsFrame.newView;\n var index = view.tableGroups.length - tabsFrame.selectedTableGroup - 1;\n var curTgrp = view.tableGroups[index];\n \n curTgrp.sortFields = \"\";\n /*\n if (hasGroupByDate(curTgrp)){\n var groupByDate = curTgrp.sortFields[0].groupByDate;\n if ((groupByDate == 'year') || (groupByDate == 'month') || (groupByDate == 'quarter') || (groupByDate == 'day') || (groupByDate == 'week')){\n curTgrp.sortFields = new Array();\n }\n }\n */\n resetTable('sortOrderSummary');\n onLoadSortSummary();\n \t\n tabsFrame.newView = view;\n myTabsFrame.selectTab('page4c');\n \n}", "function setSort(e, rowID){\n\t var view = tabsFrame.newView;\n var index = view.tableGroups.length - tabsFrame.selectedTableGroup - 1;\n var sortFields = view.tableGroups[index].sortFields;\n var numberSortFields = 0;\n if(valueExistsNotEmpty(sortFields)){\n \tnumberSortFields = sortFields.length;\n }\n var bDataTgrp = (index == numberOfTblgrps - 1) ? true : false;\n\n var table = $('sortOrderSummary');\n var ssArray = table.name;\n var selectedRow = $(rowID);\n var pattern = tabsFrame.patternRestriction;\t\n \n // selectedRow.cells[6].innerHTML = '<font color=\"navy\"><b>' + ssArray.pop() + '</b></font>';\n selectedRow.cells[7].innerHTML = ssArray.pop();\n var selectedButtonCell = selectedRow.cells[8];\n selectedRow.cells[8].innerHTML = \"\";\n table.name = ssArray;\n\n if ( (pattern.match(/summary-report/) && bDataTgrp && (numberSortFields >= 1)) || (pattern.match(/chart-2d/gi)) || (pattern.match(/chart/gi) && bDataTgrp) ) {\n var rows = table.tBodies[0].rows;\n // hide the set buttons \n for (var i = 0; i < rows.length; i++) {\n rows[i].cells[8].innerHTML = \"\";\n }\n\n \n var selectBoxes = document.getElementsByTagName('select');\n \tvar groupByBox = selectedRow.cells[9].getElementsByTagName('select');\n\t\tvar data_type = selectedRow.cells[3].innerHTML;\n\t\n\n for (var j = 0; j < selectBoxes.length; j++) {\n selectBoxes[j].disabled = true;\n }\n\n\n if (groupByBox.length > 0) {\n groupByBox[0].disabled = false;\n }\n \n }\n \n /* \n if (pattern.match(/summary/)) {\n var rows = table.tBodies[0].rows;\n // hide the set buttons \n for (var i = 0; i < rows.length; i++) {\n rows[i].cells[8].innerHTML = \"\";\n }\n\n \n var selectBoxes = document.getElementsByTagName('select');\n \tvar groupByBox = selectedRow.cells[9].getElementsByTagName('select');\n\t\tvar data_type = selectedRow.cells[3].innerHTML;\n\t\n\n for (var j = 0; j < selectBoxes.length; j++) {\n selectBoxes[j].disabled = true;\n }\n\n\n if (groupByBox.length > 0) {\n groupByBox[0].disabled = false;\n }\n \n }\n */\n}", "function initialSort() {\n var column, direction;\n column = $j('#paginationSort').val() || '';\n column = column.match(/none/) ? '' : column;\n direction = ($j('#paginationSortOrder').val() || '').match(/desc|false/) ? desc : asc\n return { column: column, direction: direction };\n }", "function prepareSortingAndOrders(container) {\n\n\t\t\tvar opt = getOptions(container);\n\n\t\t\t/************************************************\n\t\t\t\t-\tHANDLING OF SORTING ISSUES -\n\t\t\t*************************************************/\n\n\t\t\t// PREPARE THE DATE SRINGS AND MAKE A TIMESTAMP OF IT\n\t\t\tcontainer.find('.tp-esg-item').each(function() {\n\t\t\t\tvar dd = new Date(jQuery(this).data('date'));\n\t\t\t\tjQuery(this).data('date',dd.getTime()/1000);\n\t\t\t})\n\n\t\t\tjQuery(opt.filterGroupClass+'.esg-sortbutton-order,'+opt.filterGroupClass+' .esg-sortbutton-order').each(function() {\n\t\t\t\tvar eso = jQuery(this);\n\t\t\t\teso.removeClass(\"tp-desc\").addClass(\"tp-asc\");\n\t\t\t\teso.data('dir',\"asc\");\n\t\t\t})\n\t}", "sort(type) {\n const { getSortBy, batmanListings, supermanListings} = this.props;\n getSortBy({ type, batmanListings, supermanListings });\n }", "repeaterOnSort() {\n }", "sortTwitsByAuthor( ) {\n this.twits.sort( (a, b) => {\n \n if (this.switchPosition == \"normal\");\n if (a.user.name > b.user.name) {\n return 1;\n }\n if (a.user.name < b.user.name) {\n return -1;\n }\n if (this.switchPosition == \"reversed\"){\n if (a.user.name < b.user.name) {\n return 1;\n }\n if (a.user.name > b.user.name) {\n return -1;\n }\n }\n return 0;\n });\n }", "lockPrivateKeys() {\n var filterPrivateKeys = _.filter(this.context.portfolioKeys.privateKeys, {tabName: this.props.tabName})\n var filterRemovePrivateKeys = _.filter(this.context.portfolioKeys.removePrivateKeys, {tabName: this.props.tabName})\n var finalKeys = _.unionBy(filterPrivateKeys, this.state.privateValues, 'booleanKey')\n var keys = _.differenceBy(finalKeys, filterRemovePrivateKeys, 'booleanKey')\n console.log('keysssssssssssssssss', keys)\n _.each(keys, function (pf) {\n $(\"#\" + pf.booleanKey).removeClass('un_lock fa-unlock').addClass('fa-lock')\n })\n }", "function organize_usernames(data) {\n\t\treturn sort_stamps(data);\n\t}", "isSortingRequired() {\n const entriesType = this.getEntriesType();\n const { isSortingRequired = false } = this.props.state.entries[entriesType];\n\n return isSortingRequired;\n }", "__itemsSorted(event) {\n\n\t \thijackEvent(event);\n\n\t // An array of uid's ordered by user\n\t // by drag and drop reordering.\n\t const {sorted} = event.detail;\n\n\t const newIndexes = sorted.map(item => ({\n\t \tcoll: this.coll,\n \tdoc: item.uid,\n \tdata: {index: item.index}\n\t }));\n\n\t setBatch(newIndexes);\n\t }", "function resort(){\n if(scope.sorting && scope.sorting.obj){\n var sortKey = scope.sorting.obj.field;\n sorter(sortKey,scope.sorting.direction);\n }\n }", "function resort(){\n if(scope.sorting && scope.sorting.obj){\n var sortKey = scope.sorting.obj.field;\n sorter(sortKey,scope.sorting.direction);\n }\n }", "fnDec() {\n debugger;\n let sortData = this.state.data.sort((obj1, obj2) => {\n return obj1.createdDate > obj2.createdDate ? 1 : -1;\n });\n this.setState({\n data: sortData,\n tableData: sortData.slice(0, 5),\n totalPages: Math.ceil(sortData.length / 5),\n currPage: 1,\n });\n let AscButton = document.getElementById(\"Asc\");\n AscButton.disabled = false;\n let DecButton = document.getElementById(\"Dec\");\n DecButton.disabled = true;\n }", "function sorting($event) {\n //get all thead td \n var tds = $($($event.currentTarget).parents('thead')).find('td');\n\n //check sorting or desc \n if ($($event.currentTarget).hasClass(\"sorting\") == true || $($event.currentTarget).hasClass(\"sorting_desc\") == true) {\n\n $(tds).attr(\"class\", \"sorting\"); // add sorting class to every td in thead\n $(tds[0]).attr(\"class\", \"\"); //remove class sorting from action coloumn \n $(tds[1]).attr(\"class\", \"\"); //remove class sorting from action coloumn \n\n $($event.currentTarget).attr(\"class\", \"sorting_asc\"); //add asc class in current tag\n\n vmab120.sortExp = $($event.currentTarget).attr(\"data-colname\") + \" asc\"; //update soring column in sorting exp\n\n } else {\n\n $(tds).attr(\"class\", \"sorting\"); // add sorting class to every td in thead\n $(tds[0]).attr(\"class\", \"\"); //remove class sorting from action coloumn \n $(tds[1]).attr(\"class\", \"\"); //remove class sorting from action coloumn \n\n $($event.currentTarget).attr(\"class\", \"sorting_desc\"); //add asc class in current tag\n vmab120.sortExp = $($event.currentTarget).attr(\"data-colname\") + \" desc\"; //update soring column in sorting exp\n }\n\n getab120();\n }", "function dashboardSortbyStatus(change,from){\n if(change != 'All'){\n changeSortbyStatus(change,from);\n }\n $(\"#ordtab\").trigger('click');\n}", "function sortChanged(){\n\tconst url2 = url+`&q=${name.val()}&t=${type.val()}&color=${color.val()}&s=${sort.val()}`;\n\tloadData(url2, displayData);\n}", "resetSorting() {\n this.sortBy = undefined;\n this.sortDir = 0;\n }", "function passwordMatched($idpassword, $idrepeatpassword) {\n let valeurduchampspasswd = document.getElementById($idpassword).value;\n let valeurduchampsrepeatpasswd = document.getElementById($idrepeatpassword).value;\n if (valeurduchampsrepeatpasswd !== \"\" && valeurduchampspasswd !== \"\" && valeurduchampspasswd.localeCompare(valeurduchampsrepeatpasswd) === 0) {\n toggleMessageError('matchpasswd');\n return true;\n }\n toggleMessageError('matchpasswd', 'les deux mots de passe doivent être identiques');\n return false;\n\n}", "handleOnSort(event) {\n const { appliedFilters } = this.state;\n const { value } = event.target;\n window.scrollTo({ top: 0, behavior: \"smooth\" });\n this.setState({ sortBy: value, hasMore: true });\n const filteredSortedList = this.getFilterProductList(appliedFilters, value);\n this.setState({ products: filteredSortedList });\n this.handleOnCloseDialog();\n }", "function sortChangedCallBack(grid, sortColumns) {\n if (sortColumns.length == 0) {\n console.log(\"removing sorting\");\n //remove sorting\n vm.searchParams.sort = '';\n vm.searchParams.order = '';\n } else {\n vm.searchParams.sort = sortColumns[0].name; //sort the column\n switch( sortColumns[0].sort.direction ) {\n case uiGridConstants.ASC:\n vm.searchParams.order = 'ASC';\n break;\n case uiGridConstants.DESC:\n vm.searchParams.order = 'DESC';\n break;\n case undefined:\n break;\n }\n }\n\n //do the search with the updated sorting\n vm.searchTrials();\n }", "function generatePass() {\n // initiate amount of elements in password (according to password range data)\n const passMin = Number(document.querySelector('.noUi-handle-lower').getAttribute('aria-valuenow'));\n const passMax = Number(document.querySelector('.noUi-handle-upper').getAttribute('aria-valuenow'));\n const symbolsPass = Math.floor(Math.random()*(passMax - passMin + 1)) + passMin;\n // initiate empty arrays for checked characters\n const lowercaseArrChecked = [];\n const uppercaseArrChecked = [];\n const numberArrChecked = [];\n const asciiArrChecked = [];\n \n // create new character arrays from only checked\n characters.forEach((arr) => {\n arr.checkedArr(lowercaseArrChecked, uppercaseArrChecked, numberArrChecked, asciiArrChecked);\n })\n \n // generate password\n const passArr = [];\n const arr = [...lowercaseArrChecked, ...uppercaseArrChecked, ...numberArrChecked, ...asciiArrChecked];\n // console.log(arr);\n\n for (let i = 1; i <= symbolsPass; i++) {\n const randomItem = arr[Math.floor(Math.random()*arr.length)];\n passArr.push(randomItem);\n }\n\n // check if there are elements from each array (lowercaseArrChecked, uppercaseArrChecked, numberArrChecked, asciiArrChecked) in generated password\n if (lowercaseArrChecked.length > 0) {\n checkLower = false;\n passArr.forEach( elem => {\n let checkTrue = lowercaseArrChecked.indexOf(elem);\n if (checkTrue > -1) {\n return checkLower = true;\n }\n } )\n }\n if (uppercaseArrChecked.length > 0) {\n checkUpper = false;\n passArr.forEach( elem => {\n let checkTrue = uppercaseArrChecked.indexOf(elem);\n if (checkTrue > -1) {\n return checkUpper = true;\n }\n } )\n }\n if (numberArrChecked.length > 0) {\n checkNumber = false;\n passArr.forEach( elem => {\n let checkTrue = numberArrChecked.indexOf(elem);\n if (checkTrue > -1) {\n return checkNumber = true;\n }\n } )\n }\n if (asciiArrChecked.length > 0) {\n checkAscii = false;\n passArr.forEach( elem => {\n let checkTrue = asciiArrChecked.indexOf(elem);\n if (checkTrue > -1) {\n return checkAscii = true;\n }\n } )\n }\n\n if ( (checkLower === false) || (checkUpper === false) || (checkNumber === false) || (checkAscii === false) ) {\n generatePass();\n } else {\n let pass = passArr.join('');\n \n document.querySelector('#pass-result').value = pass;\n }\n\n}", "function usUsers(arr) {\n return arr.filter(n => n.us === true).sort((a, b) => a - b ? -1 : 1 )\n}", "_changeSortMode(e) {\n if (this.sortColumn === e.detail.columnNumber && this.sortMode === \"asc\") {\n this.sortMode = \"desc\";\n } else if (\n this.sortColumn === e.detail.columnNumber &&\n this.sortMode === \"desc\"\n ) {\n this.sortMode = \"none\";\n } else {\n this.sortMode = \"asc\";\n this.sortColumn = e.detail.columnNumber;\n }\n e.detail.setSortMode(this.sortMode);\n this.sortData(this.sortMode, e.detail.columnNumber);\n }", "function bindEventsForSort(){$(EventManager).bind(\"set-added\",function(event,data){UpSetState.logicGroups.forEach(function(lg){lg.orClauses.forEach(function(orClause){orClause[data.set.id]={state:ctx.logicStates.DONTCARE};});});UpSetState.logicGroupChanged=true;});$(EventManager).bind(\"set-removed\",function(event,data){UpSetState.logicGroups.forEach(function(lg){lg.orClauses.forEach(function(orClause){delete orClause[data.set.id];});});UpSetState.logicGroupChanged=true;});}", "hideSortCapsule() {\n this.props.dispatch(couponsActions.toggleSort(true, 4, 'hidden'));\n this.props.dispatch(couponsActions.requestCouponsByCategory(this.props.coupons.filter, 4));\n }", "function getNames(passwordentered, ligue) {\n\n // Use data from spreadsheet. Enter spreadsheet I here\n var ss = SpreadsheetApp.openById(CONTACTS_SS);\n \n var SHEETNAME = CONTACTS_SHEET1;\n if (ligue == \"Ligue de double\") SHEETNAME = CONTACTS_SHEET2;\n var sheet = ss.getSheetByName(SHEETNAME);\n\n var data = sheet.getRange(3,1,sheet.getLastRow()-1,6).getValues();\n\n // http://stackoverflow.com/questions/6490343/sorting-2-dimensional-javascript-array NOTE: [x] is column to sort on\n // Sort standard\n // data.sort(function(a, b) { return ( a[0] < b[0] ? -1 : (a[0] > b[0] ? 1 : 0)); });\n\n // Sort colonne 4 inverse, ensuite colonne 0 \n data.sort( function(a,b) { return ( a[4] == b[4] ? ( a[0] < b[0] ? -1 \n : (a[0] > b[0] ? 1 \n : 0) ) \n : (a[4] > b[4] ? -1 \n : 1 ) ); });\n\n // Get id and name in arrays (column A = ID, column B = name)\n var record = {};\n var list = [];\n var j = 0;\n for (var i = 0; i < data.length; i++) {\n\n if (data[i][1].substr(0,1) != \" \") {\n record = {name: data[i][0], tel: data[i][1], cell: data[i][2], email: data[i][3], categ: data[i][4], niveau: data[i][5]};\n list[j] = record;\n j++;\n }\n }\n\n // Get password from spreadsheet and verify if it is correct\n // NOTE: password must be in cell B1 \n var passwordinfile = sheet.getRange(\"B1:B1\").getValue(); \n \n if (passwordentered == passwordinfile) {\n return list;\n } else {\n return null;\n }\n \n}", "function authEnable() {\n\tvar enableObj = document.getElementById('tf1_ripAuthentication');\n\tif (!enableObj || enableObj.disabled)\n\t\treturn;\n\n\tvar imgObj = document.getElementById('tf1_ripAuthentication').className;\n\tvar imageName = imgObj.substring(imgObj.lastIndexOf('/') + 1);\n\tif (imageName == ON_ANCHOR) {\n\t\tfieldStateChangeWr('', '', 'tf1_ripFirstMd5KeyId tf1_ripFirstMd5AuthKey tf1_ripSecMd5KeyId tf1_ripSecMd5AuthKey tf1_dateTimePickerFirstStartValue tf1_dateTimePickerFirstEndValue tf1_dateTimePickerSecondStartValue tf1_dateTimePickerFirstEndValue', '');\n\t\tvidualDisplay('tf1_ripFirstMd5KeyId tf1_ripFirstMd5AuthKey tf1_ripSecMd5KeyId tf1_ripSecMd5AuthKey authenticationFirstKey authenticationSecondKey', 'configRow');\n\t\tvidualDisplay('break4 break5 break6 break7 break8 break9 break10 break11', 'break');\n\t} else {\n\t\tfieldStateChangeWr('tf1_ripFirstMd5KeyId tf1_ripFirstMd5AuthKey tf1_ripSecMd5KeyId tf1_ripSecMd5AuthKey tf1_dateTimePickerFirstStartValue tf1_dateTimePickerFirstEndValue tf1_dateTimePickerSecondStartValue tf1_dateTimePickerFirstEndValue', '', '', '');\n\t\tvidualDisplay('tf1_ripFirstMd5KeyId tf1_ripFirstMd5AuthKey tf1_ripSecMd5KeyId tf1_ripSecMd5AuthKey authenticationFirstKey authenticationSecondKey', 'hide');\n\t\tvidualDisplay('break4 break5 break6 break7 break8 break9 break10 break11', 'hide');\n\t}\n}", "function setSortOrder() {\n\tif (sortOrder == \"high to low\") {\n\t\tsortOrder = \"low to high\";\n\t} else {\n\t\tsortOrder = \"high to low\";\n\t}\n}", "function sort_cert_firstname(){\r\r\n\t\r\r\n\tvar click_num = $('#name_click_num').val();\r\r\n\t\r\r\n\tif(click_num == 0 || click_num == 2){\r\r\n\t\t\r\r\n\t\t$('#name_click_num').val(1);\r\r\n\t\t\r\r\n\t}else if(click_num == 1){\r\r\n\t\t\r\r\n\t\t$('#name_click_num').val(2);\r\r\n\t\t\r\r\n\t}\r\r\n\t\r\r\n\tfilter = {\r\r\n\t\t\r\r\n\t\tclass_of: $('#get_year').val(),\r\r\n\t\t\r\r\n\t\tsort_by_firstname: $('#name_click_num').val()\r\r\n\t\t\r\r\n\t};\r\r\n\t\r\r\n\tload_cert_student();\r\r\n\t\r\r\n}", "function checkSorts() {\n if (numberOfSorts == 0) {\n $(\"#removeSortButton\").hide(\"fast\");\n }\n if (numberOfSorts == 7) {\n $(\"#addSortButton\").prop(\"disabled\", \"true\");\n }\n else {\n $(\"#addSortButton\").removeProp(\"disabled\");\n }\n}", "function sortAlt(sfield)\n {\n document.designateDEForm.sortColumn.value = sfield;\n submitDesignate(\"sortAlt\");\n }", "function sortData(field, direction) {\n if (!$scope.allData) {\n return;\n }\n $scope.allData.sort(function(a, b) {\n if (direction === 'asc') {\n return a[field] > b[field] ? 1 : -1;\n } else {\n return a[field] > b[field] ? -1 : 1;\n }\n })\n }" ]
[ "0.5633179", "0.5468326", "0.54259646", "0.53695476", "0.53389585", "0.53231835", "0.53129697", "0.52924436", "0.52732754", "0.5264437", "0.5213561", "0.5211993", "0.5208002", "0.51733595", "0.51582164", "0.5131508", "0.5127855", "0.5127671", "0.5125064", "0.508045", "0.50798255", "0.5077946", "0.50743276", "0.50607544", "0.5052075", "0.50321484", "0.5026184", "0.49984953", "0.49894303", "0.49775702", "0.4965006", "0.49632007", "0.49515474", "0.4917513", "0.4910416", "0.48897526", "0.48861802", "0.48792794", "0.48723277", "0.48687705", "0.48670268", "0.48658738", "0.48619005", "0.48612058", "0.4857418", "0.48557195", "0.4832707", "0.48317316", "0.48317316", "0.4829897", "0.48182452", "0.48171145", "0.48054075", "0.4804273", "0.48039165", "0.48032215", "0.47939676", "0.47726005", "0.4770973", "0.4770969", "0.47645926", "0.4762951", "0.4762935", "0.4761371", "0.47592407", "0.4755403", "0.47509906", "0.47490665", "0.47480303", "0.47457325", "0.47437078", "0.47433507", "0.4737379", "0.47325775", "0.4717919", "0.47170407", "0.47124475", "0.47112587", "0.4703413", "0.4703413", "0.47018406", "0.4699466", "0.46967304", "0.46966606", "0.46959814", "0.46932763", "0.46873254", "0.4681064", "0.46786648", "0.466964", "0.46692094", "0.46689078", "0.46669534", "0.4663556", "0.46625182", "0.4653843", "0.4653485", "0.4647593", "0.4638024", "0.46347186" ]
0.5329112
5
Sort User Log Activity GridBy krishna on 21082015
function SortUserLogActivityGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var url = "/Reporting/SortUserLogActivityGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); //var isAll = $('#ShowAllRecords').prop('checked') ? true : false; var isAll = $('#ShowAllRecords').prop('checked') ? true : false; var userId = $("#ddlUsers").val(); if (userId == "") { userId = 0; } if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) { url += "?fromDate=" + fromDate + "&tillDate=" + tillDate + "&isAll=" + isAll + "&userId=" + userId + "&" + event.data.msg; } $.ajax({ type: "POST", url: url, async: false, contentType: "application/json; charset=utf-8", dataType: "html", data: null, success: function (data) { ; $("#ReportingGrid").empty(); $("#ReportingGrid").html(data); //ReportingGrid }, error: function (msg) { } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortEntriesMRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_desc = function (entry1, entry2) {\n\t\tvar date1 = Date.parse(entry1.dateAccessed);\n\t\tvar date2 = Date.parse(entry2.dateAccessed);\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n console.log(\"sort mru\");\n\tentries.sort(date_sort_desc);\n}", "function sortActivity() {\n for (let i = 0; i < test.length; i++) {\n if (test[i].type === MeasurementsTypes.Activity) {\n sortedData.push(test[i]);\n }\n }\n }", "function sortEntriesMRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_desc = function (entry1, entry2) {\n\t\tvar date1 = entry1.dateAccessed;\n\t\tvar date2 = entry2.dateAccessed;\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n\n\tentries.sort(date_sort_desc);\t\n}", "function sortByTime()\n {\n newsItems.sort(function(a,b) {return a.created_at<b.created_at});\n console.log(newsItems);\n\n addNewsListItems(); \n }", "handleSortUsers(event) {\n let { users, mappedLogs } = this.state;\n const sortBy = event.target.value;\n switch (sortBy) {\n case NAME_ASC:\n users.sort((a, b) => (a.name > b.name ? 1 : -1));\n break;\n case NAME_DESC:\n users.sort((a, b) => (a.name < b.name ? 1 : -1));\n break;\n case IMPRESSIONS_ASC:\n users.sort(\n (a, b) => mappedLogs[a.id].impressions - mappedLogs[b.id].impressions\n );\n break;\n case IMPRESSIONS_DESC:\n users.sort(\n (a, b) => mappedLogs[b.id].impressions - mappedLogs[a.id].impressions\n );\n break;\n case CONVERSIONS_ASC:\n users.sort(\n (a, b) => mappedLogs[a.id].conversions - mappedLogs[b.id].conversions\n );\n break;\n case CONVERSIONS_DESC:\n users.sort(\n (a, b) => mappedLogs[b.id].conversions - mappedLogs[a.id].conversions\n );\n break;\n case REVENUE_ASC:\n users.sort(\n (a, b) => mappedLogs[a.id].revenue - mappedLogs[b.id].revenue\n );\n break;\n case REVENUE_DESC:\n users.sort(\n (a, b) => mappedLogs[b.id].revenue - mappedLogs[a.id].revenue\n );\n break;\n default:\n users.sort((a, b) => (a.name > b.name ? 1 : -1));\n break;\n }\n this.setState((state, props) => ({\n users\n }));\n }", "sortTwitsByDate( ) {\n this.twits.sort( (a, b) => {\n \n if (this.switchPosition == \"normal\");\n if (this.dateCompare(a,b)) {\n return 1;\n }\n if (!this.dateCompare(a,b)) {\n return -1;\n }\n if (this.switchPosition == \"reversed\"){\n if (!this.dateCompare(a,b)) {\n return 1;\n }\n if (this.dateCompare(a,b)) {\n return -1;\n }\n }\n return 0;\n });\n }", "function dateSorting(column) {\n\n column.sortingAlgorithm = function(a, b) {\n var dt1 = new Date(a).getTime(),\n dt2 = new Date(b).getTime();\n return dt1 === dt2 ? 0 : (dt1 < dt2 ? -1 : 1);\n };\n }", "function sortListsByDate() {\r\n\t\treturn getItems().sort(function(a,b){\r\n \t\t\treturn new Date(`${a.date} ${a.time}`) - new Date(`${b.date} ${b.time}`);\r\n\t\t});\r\n\t}", "function sorted(sheet){\n sheet.sort(masterCols.end_time+1).sort(masterCols.start_time+1).sort(masterCols.date+1);\n}", "_sortDataByDate() {\n this.data.sort(function(a, b) {\n let aa = a.Year * 12 + a.Month;\n let bb = b.Year * 12 + b.Month;\n return aa - bb;\n });\n }", "function sortByTime() {\n for (let i = 0; i < sortedData.length; i++) {\n var x = sortedData[i].time;\n \n if (x < 12) {\n sortedByTime.push(sortedData[i]);\n \n } \n }\n }", "sortDatabyViews(data) {\r\n data.sort((a,b) => {\r\n if (a.totalClicks > b.totalClicks) return -1;\r\n if (a.totalClicks < b.totalClicks) return 1;\r\n return 0;\r\n });\r\n return data;\r\n }", "sortDataByUrgentDateTime(data, deadlineHourDifference) {\n\n // function for add hours in Date() object\n Date.prototype.addHours = function (h) {\n this.setTime(this.getTime() + (h * 60 * 60 * 1000));\n return this;\n }\n\n var allActivities = data; // all activities\n var urgent = [];\n var notUrgent = [];\n var total = [];\n\n // endTime == time right now + 12hours(which is, 'deadlineHourFromCurrentTime')\n var endTime = new Date().addHours(deadlineHourDifference);\n\n for (var i in allActivities) {\n\n switch(allActivities[i].status) {\n case 1:\n this.state.doingMatch.push(allActivities[i]);\n break;\n case 2:\n this.state.finishedMatch.push(allActivities[i]);\n break;\n case 3:\n this.state.doingActivity.push(allActivities[i]);\n break;\n case 4:\n this.state.finishedActivity.push(allActivities[i]);\n break;\n default:\n this.state.cancledActivity.push(allActivities[i]);\n break;\n }\n\n var deadline = new Date(allActivities[i].deadline); // deadline of activity\n\n // difference between 'deadline' and '12 hours from right now' in hours\n var diff = (deadline - endTime) / (60 * 60 * 1000); // divide by milliseconds, since it is expressed as hours\n\n if (diff <= 12 && diff >= 0 && allActivities[i].status == 1) {\n allActivities[i]['isUrgent'] = 1;\n urgent.push(allActivities[i]);\n } else {\n allActivities[i]['isUrgent'] = 0;\n notUrgent.push(allActivities[i]);\n }\n }\n\n // sorted as urgent activities first, then not-urgent activities later\n for (var i = 0; i < urgent.length; i++) total.push(urgent[i]);\n for (var i = 0; i < notUrgent.length; i++) total.push(notUrgent[i]);\n\n this.setState({ data: total });\n this.setList(this.state.filterStatus, this.state.search);\n }", "function sortLogRow(rowDataValues) {\n var sortedDataValues = rowDataValues;\n sortedDataValues[0][DATE_I] = new Date();\n sortedDataValues[0][SKU_I] = \"\";\n sortedDataValues[0][DESC_I] = rowDataValues[0][LOG_DESC_I]; \n sortedDataValues[0][COA_I] = \"\";\n sortedDataValues[0][EXP_I] = rowDataValues[0][LOG_EXP_I]; \n sortedDataValues[0][QTY_I] = rowDataValues[0][LOG_QTY_I]; \n sortedDataValues[0][PACK_I] = rowDataValues[0][LOG_PACK_I]; \n sortedDataValues[0][SECTION_I] = \"\";\n sortedDataValues[0][LOT_I] = rowDataValues[0][LOG_LOT_I];\n sortedDataValues[0][VENDOR_I] = rowDataValues[0][LOG_VENDOR_I]; \n sortedDataValues[0][PRICE_I] = rowDataValues[0][LOG_PRICE_I]; \n sortedDataValues[0][POJOB_I] = rowDataValues[0][LOG_PO_I]; \n sortedDataValues[0][COMMENT_I] = rowDataValues[0][LOG_COMMENT_I]; \n sortedDataValues[0][COMPONENT_I] = \"\";\n sortedDataValues[0].splice(15, 5);\n \n Logger.log(sortedDataValues[0]);\n return sortedDataValues;\n}", "function sortData() {\n\tattractions.sort((a,b) => a[\"Visitors\"] - b[\"Visitors\"]);\n\n\t// creates bar chart with the top five attractions\n\tlet data = attractions.slice(-5);\n\trenderBarChart(data);\n}", "function sortTable()\n{\n // snippet of code from https://stackoverflow.com/questions/8231310/convert-table-to-an-array\n // store table data into array\n var array = [];\n var headers = [];\n var i;\n \n // get table headers into array\n $('#activityTable th').each(function(index, item) {\n headers[index] = $(item).html();\n });\n\n // store table body by correct column\n $('#activityTable tr').has('td').each(function() {\n var arrayItem = {};\n $('td', $(this)).each(function(index, item) {\n arrayItem[headers[index]] = $(item).html();\n });\n array.push(arrayItem);\n });\n\n // sort array by date desc\n array.sort(function(a,b){\n return new Date(b.date) - new Date(a.date);\n });\n\n // console.log(array);\n \n // display array as table sorted by date if entries exist\n if (array[0] != null)\n {\n // only show the 10 latest activities\n if (array.length > 10)\n {\n var activityArray = [];\n for (i = 0; i < 10; i++)\n {\n activityArray[i] = array[i];\n }\n\n document.getElementById(\"sortedActivities\").style.display = \"block\";\n var sortedTable = document.getElementById(\"sortedTable\");\n generateTable(sortedTable, activityArray);\n }\n else\n {\n document.getElementById(\"sortedActivities\").style.display = \"block\";\n var sortedTable = document.getElementById(\"sortedTable\");\n generateTable(sortedTable, array);\n }\n }\n}", "function organize_usernames(data) {\n\t\treturn sort_stamps(data);\n\t}", "function Cached_sortUser(beanObj) {\n\tif (beanObj != null) {\n\t\t// Get Active-only beans\n\t\tbeanObj.actionList = Cached_getActiveList(beanObj.actionList);\n\t\tbeanObj.sessionList = Cached_getActiveList(beanObj.sessionList);\n\t\tbeanObj.propertiesList = Cached_getActiveList(beanObj.propertiesList);\n\t\tbeanObj.calendarList = Cached_getActiveList(beanObj.calendarList);\n\t\t$.each(beanObj.calendarList, function(i, calendarObj) {\n\t\t\tcalendarObj.eventList = Cached_getActiveList(calendarObj.eventList);\n\t\t});\n\n\t\t// Sorting\n\t\tbeanObj.actionList.sort(function(a, b) {\n\t\t\treturn a.createdOn - b.createdOn;\n\t\t});\n\t\tbeanObj.sessionList.sort(function(a, b) {\n\t\t\treturn a.createdOn - b.createdOn;\n\t\t});\n\t\tbeanObj.propertiesList.sort(function(a, b) {\n\t\t\tif (a.propKey < b.propKey) return -1;\n\t\t\tif (a.propKey > b.propKey) return 1;\n\t\t\treturn 0;\n\t\t});\n\t\tbeanObj.calendarList.sort(function(a, b) {\n\t\t\tif (a.calendarName < b.calendarName) return -1;\n\t\t\tif (a.calendarName > b.calendarName) return 1;\n\t\t\treturn 0;\n\t\t});\n\t}\n} // .end of Cached_sortUser", "function sortEntriesLRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_asc = function (entry1, entry2) {\n\t\tvar date1 = entry1.dateAccessed;\n\t\tvar date2 = entry2.dateAccessed;\n\t\tif (date1 > date2) return 1;\n\t\tif (date1 < date2) return -1;\n\t\treturn 0;\n\t};\n\n\tentries.sort(date_sort_asc);\t\n}", "function clickedColumnSorter(aTableRow, bTableRow, type) {\n\t\tvar aContent = getFirstTextFromCell(aTableRow, columnIndex).toLowerCase();\n\t\tvar bContent = getFirstTextFromCell(bTableRow, columnIndex).toLowerCase();\n\n\t\tvar aExtractedContent = numericStringTools.extractNumbersIfPresent(aContent);\n\t\tvar bExtractedContent = numericStringTools.extractNumbersIfPresent(bContent);\n\n\t\tif (type === 'time') {\n\t\t\tvar now = new Date();\n\n\t\t\tvar aFullDate = now.toDateString() + ' ' + aContent.slice(0, 5) + ' ' + aContent.slice(-2);\n\t\t\tvar bFullDate = now.toDateString() + ' ' + bContent.slice(0, 5) + ' ' + bContent.slice(-2);\n\n\t\t\taExtractedContent = Date.parse(aFullDate);\n\t\t\tbExtractedContent = Date.parse(bFullDate);\n\t\t}\n\t\tvar directionComparer = shouldSortAscending ? ascendingComparer : descendingComparer;\n\n\t\treturn comparer(directionComparer, aExtractedContent, bExtractedContent);\n\t}", "function sortDate()\n{\n\tevents.sort( function(a,b) { if (a.startDate < b.startDate) return -1; else return 1; } );\n\tclearTable();\n\tfillEventsTable();\n}", "function sort(){\n var toSort = S('#sched-list').children;\n toSort = Array.prototype.slice.call(toSort, 0);\n\n toSort.sort(function(a, b) {\n var a_ord = +a.id.split('e')[1]; //id tags of the schedule items are timeINT the INT = the numeric time\n var b_ord = +b.id.split('e')[1]; //splitting at 'e' and getting the element at index 1 gives use the numeric time\n\n return (a_ord > b_ord) ? 1 : -1;\n });\n\n var parent = S('#sched-list');\n parent.innerHTML = \"\";\n\n for(var i = 0, l = toSort.length; i < l; i++) {\n parent.appendChild(toSort[i]);\n }\n }", "function sortByTime() {\n onLoadFunctionForForumPosts();\n}", "sortData(data) {\n return data.sort((a, b) => {\n let aa = typeof a.date === \"string\" ? Date.parse(a.date) : a.date,\n bb = typeof b.date === \"string\" ? Date.parse(b.date) : b.date;\n return this.latest ? bb - aa : aa - bb;\n });\n }", "function sortEntries() {\n entries.sort((a, b) => (new Date(a.date).getTime() - new Date(b.date).getTime()));\n}", "function sort_events(a,b) {\n if (a.recorded_at < b.recorded_at)\n return -1;\n if (a.recorded_at > b.recorded_at)\n return 1;\n return 0;\n }", "function sort(annotations, sortByColumn) {\n\n //console.log(\"sortByColumn: \" + sortByColumn);\n // console.log($(\"#tb-annotation-list\"));\n // className = $(\"#tb-annotation-list\").find('#' + sortByColumn).attr('class');\n // console.log(\"className: \" + className);\n\n // if (className == \"tb-list-unsorted\"){\n \n // $('#' + sortByColumn).attr('class','tb-list-asc');\n // annotations.sort(function(a, b){\n // return a[sortByColumn].localeCompare(b[sortByColumn]);\n // });\n // } else if (className == \"tb-list-asc\"){\n // annotations.sort(function(a, b){\n // return a[sortByColumn].localeCompare(b[sortByColumn]);\n // }).reverse();\n // }\n\n $('#' + sortByColumn).attr('class','tb-list-asc');\n annotations.sort(function(a, b){\n return a[sortByColumn].localeCompare(b[sortByColumn]);\n });\n}", "function sortEntriesNewest(entries){\n\t// Comparison function for sort\n\tvar date_sort = function (entry1, entry2) {\n\t\tvar date1 = Date.parse(entry1.dateAdded);\n\t\tvar date2 = Date.parse(entry2.dateAdded);\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n console.log(\"sort newest\");\n\tentries.sort(date_sort);\n}", "function sortMsg(a,b){\n let comparison = 0;\n return comparison = (a.created_at > b.created_at)?1:-1;\n \n }", "function sortByDate(a, b){\nvar aDate = a.date;\nvar bDate = b.date; \nreturn ((aDate > bDate) ? -1 : ((aDate < bDate) ? 1 : 0));\n}", "sortByDate(selection = \"timed\"){\n return this.dataFromSelectionName(selection).sort((a, b) => a.date - b.date);\n }", "function sortingActivities(detailArray) {\n for (var j = 0; j < detailArray.length; j++) {\n var currentDetail = detailArray[j];\n for (var k = 0; k < self.currentTrip.dateArray.length; k++) {\n if (currentDetail.when === (self.currentTrip.dateArray[k].date).toISOString()) {\n self.currentTrip.dateArray[k].activities.push(currentDetail);\n }\n }\n }\n }", "sortTwitsByAuthor( ) {\n this.twits.sort( (a, b) => {\n \n if (this.switchPosition == \"normal\");\n if (a.user.name > b.user.name) {\n return 1;\n }\n if (a.user.name < b.user.name) {\n return -1;\n }\n if (this.switchPosition == \"reversed\"){\n if (a.user.name < b.user.name) {\n return 1;\n }\n if (a.user.name > b.user.name) {\n return -1;\n }\n }\n return 0;\n });\n }", "sort() {\n if(this.data.length >= 2){\n for (var i = 0; i < this.data.length - 1; i++){\n for (var j = i + 1; j < this.data.length; j++){\n if (this.data[i].users.length < this.data[j].users.length){\n let tmp = this.data[i];\n this.data[i] = this.data[j];\n this.data[j] = tmp;\n \n }\n }\n \n }\n }\n }", "function sortEntriesOldest(entries){\n\t// Comparison function for sort\n\tvar date_sort = function (entry1, entry2) {\n\t\tvar date1 = Date.parse(entry1.dateAdded);\n\t\tvar date2 = Date.parse(entry2.dateAdded);\n\t\tif (date1 > date2) return 1;\n\t\tif (date1 < date2) return -1;\n\t\treturn 0;\n\t};\n console.log(\"sort oldest!\");\n\tentries.sort(date_sort);\n}", "function sortedCustom(param) {\n setFlag(flag + 1);\n let a = request;\n\n if (param == \"Date\") {\n a.sort(comparisonByDate);\n setRequests(a);\n } else if (param == \"Priority\") {\n a.sort(comparisonByPriority);\n setRequests(a);\n } else if (param == \"Distance\") {\n a.sort(comparisonByDistance);\n setRequests(a);\n }\n }", "function sortByReleaseDateUp() {\n arrayLivros.sort((a, b) => Date.parse(a._releaseDate) - Date.parse(b._releaseDate));\n}", "sortData() {\n this.data.sort(($val1, $val2 ) => {\n const a = JSON.stringify($val1[this.sortBy]);\n const b = JSON.stringify($val2[this.sortBy]);\n if ( a < b ){\n return -this.sortDir;\n }\n if ( a > b ){\n return this.sortDir;\n }\n return 0;\n });\n }", "function sortByDate(tid) {\n kiddos = []\n var t = document.getElementById(\"thread_\" + tid)\n var h = document.getElementById(\"helper_\" + tid)\n if (t) {\n // fetch all elements called 'thread*' inside t\n traverseThread(t, 'thread')\n \n // sort the node array:\n // forward\n if (prefs.sortOrder == 'forward') {\n kiddos.sort(function(a, b) {\n return parseInt(b.getAttribute('epoch') - a.getAttribute('epoch'));\n })\n // backward\n } else {\n kiddos.sort(function(a, b) {\n return parseInt(a.getAttribute('epoch') - b.getAttribute('epoch'));\n })\n }\n \n // do some DOM magic, repositioning according to sort order\n for (var i in kiddos) {\n t.insertBefore(kiddos[i], t.firstChild)\n }\n }\n}", "function dateSort(arr) {\n return arr.sort(function(a, b) {\n return moment(b.date.published).unix() - moment(a.date.published).unix();\n })\n}", "sortColumns(columns) {\n return Object.keys(columns).sort((a, b) => {\n const aName = columns[a].column.name,\n bName = columns[b].column.name;\n if (aName.slice(0, 4) === bName.slice(0, 4)) {\n return seasonMap[aName.slice(5)] > seasonMap[bName.slice(5)]? 1:-1;\n }\n return aName > bName? 1:-1;\n });\n }", "function sortUserIssues(user) {\n var numberOfRedIssues = 0;\n var numberOfGreenIssues = 0;\n for (let i = 0; i < issuesOfProject.length; i++) {\n if (issuesOfProject[i].assignee == user) {\n if (issuesOfProject[i].category == \"red\") {\n numberOfRedIssues++;\n } else {\n numberOfGreenIssues++;\n }\n }\n }\n var totalIssues = numberOfGreenIssues + numberOfRedIssues;\n var successRate = Math.round(numberOfGreenIssues / totalIssues * 100) + \"%\";\n return {\n user: user,\n numberOfRedIssues: numberOfRedIssues,\n numberOfGreenIssues: numberOfGreenIssues,\n successRate: successRate\n };\n}", "function getActivities(data) {\n var activities = [];\n var activitiesArray = [];\n\n for (item in data) {\n activitiesArray.push(data[item]);\n }\n\n activitiesArray.sort(function(a,b) { \n return new Date(a.date).getTime() - new Date(b.date).getTime() \n });\n\n for (object in activitiesArray) {\n activities.push(activitiesArray[object].activities)\n }\n\n return activities;\n }", "static sortAscending() {\r\n const profiles = Store.getProfiles();\r\n profiles.sort(({ monthTime: a }, { monthTime: b }) => a - b);\r\n localStorage.setItem('profiles', JSON.stringify(profiles));\r\n }", "function sortByDonationDateUp() {\n arrayLivros.sort((a, b) => Date.parse(a._releaseDate) - Date.parse(b._releaseDate));\n}", "function test(){\n var testData = POLogSheet.getRange(344, 1, 1, LOG_TO_INPUT_I).getValues();\n Logger.log(\"INPUT: \" + testData[0]);\n var result = sortLogRow(testData);\n Logger.log(\"RESULT: \" + result[0]);\n}", "function SortByDate(array) {\n return _.sortBy(array, function (item) {\n return moment(item.endDate, 'YYYY-MM-DD HH:mm:ss').format('x');\n });\n }", "function sortEvents(events) {\n events.sort(function(a,b) { \n return parseFloat(a.start) - parseFloat(b.start);\n });\n }", "function fcnSortByStatus() {\n \n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var actSht = ss.getActiveSheet();\n var actShtName = actSht.getName();\n var MaxRows = actSht.getMaxRows();\n var MaxCols = actSht.getMaxColumns();\n var NumCols = MaxCols - 1;\n var SectRange;\n var SectFirstRow = actSht.getActiveCell().getRow();\n var SectNumRows;\n var EndValue;\n\n if (actShtName == 'Wish'){ \n // Finds the End of the Section to determine the number or rows in the section\n for (var Row = SectFirstRow; Row <= MaxRows; Row++){\n EndValue = actSht.getRange(Row, 2).getValue();\n if (EndValue == 'End'){\n SectNumRows = Row - SectFirstRow - 1;\n Row = MaxRows + 1;\n }\n }\n \n SectRange = actSht.getRange(SectFirstRow+1, 2, SectNumRows, NumCols);\n SectRange.sort(6);\n } \n}", "eventSort(a, b) {\n return a.date_moment().isAfter(b.date_moment()) ? 1 : -1 \n }", "function sortByDate() {\n return articles.sort(function(a, b) {\n let x = new Date(a.published_at).getTime();\n let y = new Date(b.published_at).getTime();\n if (x < y){\n return -1; \n } else if (y > x){\n return 1;\n } else {\n return 0\n }\n });\n}", "function resort(events){\n //Iterate over the events to fix Javscript Time objecs and such (also removing past events)\n for(var i = 0; i < events.length; i++){\n //Time type event\n if(events[i].type == \"time\"){\n //If the event end time is less than the current time\n if(events[i].startTime < Date.now()){\n //Remove the event\n events.splice(i,1);\n i--;\n }\n }\n //Day type event\n else if(events[i].type == \"day\"){\n //If the event's time is less than the current time and the event isn't today\n if(events[i].time < Date.now() && dateToDayString(parseStringForDate(events[i].time)) != dateToDayString(new Date())){\n //Remove the event\n events.splice(i,1);\n i--;\n }\n else{\n //Set the start time to be the time (makes for easier sorting and display)\n events[i].startTime = events[i].time;\n }\n }\n }\n\n //Sorts the event by time, then by title, then by description\n events.sort(\n function(a,b){\n if(a.startTime==b.startTime){\n if(a.title == b.title){\n return a.location.localeCompare(b.location);\n }else{\n return a.title.localeCompare(b.title);\n }\n }\n else{\n return a.startTime>b.startTime?1:-1;\n }\n }\n );\n\n //Only take the first 15 events\n if(events.length > 25){\n events = events.slice(0,25);\n }\n //Update local storage\n localStorage.setItem(\"clubEvents\", JSON.stringify(events));\n localStorage.setItem(\"clubEventsRefreshTime\", Date.now());\n $scope.events = events;\n $ionicLoading.hide();\n $scope.$broadcast('scroll.refreshComplete');\n }", "function sortData (data) {\n ...\n}", "sortFunction(input) {\n input.sort((a, b) => {\n if (a.timestamp === b.timestamp) {\n return input.indexOf(a) - input.indexOf(b);\n } else {\n return b.timestamp - a.timestamp;\n }\n });\n }", "sortColumn(event, args, isSortingAsc = true) {\n if (args && args.column) {\n // get previously sorted columns\n const sortedColsWithoutCurrent = this.sortService.getCurrentColumnSorts(args.column.id + '');\n let emitterType;\n // add to the column array, the column sorted by the header menu\n sortedColsWithoutCurrent.push({ sortCol: args.column, sortAsc: isSortingAsc });\n if (this.sharedService.gridOptions.backendServiceApi) {\n this.sortService.onBackendSortChanged(event, { multiColumnSort: true, sortCols: sortedColsWithoutCurrent, grid: this.sharedService.grid });\n emitterType = EmitterType.remote;\n }\n else if (this.sharedService.dataView) {\n this.sortService.onLocalSortChanged(this.sharedService.grid, this.sharedService.dataView, sortedColsWithoutCurrent);\n emitterType = EmitterType.local;\n }\n else {\n // when using customDataView, we will simply send it as a onSort event with notify\n const isMultiSort = this.sharedService && this.sharedService.gridOptions && this.sharedService.gridOptions.multiColumnSort || false;\n const sortOutput = isMultiSort ? sortedColsWithoutCurrent : sortedColsWithoutCurrent[0];\n args.grid.onSort.notify(sortOutput);\n }\n // update the this.sharedService.gridObj sortColumns array which will at the same add the visual sort icon(s) on the UI\n const newSortColumns = sortedColsWithoutCurrent.map((col) => {\n return {\n columnId: col && col.sortCol && col.sortCol.id,\n sortAsc: col && col.sortAsc,\n sortCol: col && col.sortCol,\n };\n });\n // add sort icon in UI\n this.sharedService.grid.setSortColumns(newSortColumns);\n // if we have an emitter type set, we will emit a sort changed\n // for the Grid State Service to see the change.\n // We also need to pass current sorters changed to the emitSortChanged method\n if (emitterType) {\n const currentLocalSorters = [];\n newSortColumns.forEach((sortCol) => {\n currentLocalSorters.push({\n columnId: sortCol.columnId + '',\n direction: sortCol.sortAsc ? 'ASC' : 'DESC'\n });\n });\n this.sortService.emitSortChanged(emitterType, currentLocalSorters);\n }\n }\n }", "loadedTalks(state) {\n return state.loadedTalks.sort((talkA, talkB) => {\n return talkA.date > talkB.date\n })\n }", "sortPosts() {\n const orderBy = this.state.postsOrder;\n this.props.posts.sort((post1, post2) => {\n switch (orderBy) {\n case 'timestamp' : return post1.timestamp - post2.timestamp;\n case 'voteScore' : return post2.voteScore - post1.voteScore;\n case 'category' : return post1.category.localeCompare(post2.category);\n default : return post2.voteScore - post1.voteScore;\n }\n });\n }", "function usUsers(arr) {\n return arr.filter(n => n.us === true).sort((a, b) => a - b ? -1 : 1 )\n}", "function sortByDate(){\n\t\t holiday.sort(function(a,b){\n\t if( parseInt(a[\"month\"],10) > parseInt(b[\"month\"],10)){\n\t return 1;\n\t }\n\t\t\t\telse if( parseInt(a[\"month\"],10) < parseInt(b[\"month\"],10) ){\n\t return -1;\n\t }\n\t\t\t\telse if( parseInt(a[\"month\"],10) == parseInt(b[\"month\"],10)){\n\t\t\t\t\t\tif( parseInt(a[\"day\"],10) > parseInt(b[\"day\"],10)){\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( parseInt(a[\"day\"],10) < parseInt(b[\"day\"],10) ){\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t return 0;\n\t });\n\t}", "function sortUsersByStatusAndDisplayName(users, statusesByUserId) {\n function compareUsers(a, b) {\n const aStatus = a.is_bot ? 'bot' : statusesByUserId[a.id] || utils_constants_jsx__WEBPACK_IMPORTED_MODULE_26__[\"UserStatuses\"].OFFLINE;\n const bStatus = b.is_bot ? 'bot' : statusesByUserId[b.id] || utils_constants_jsx__WEBPACK_IMPORTED_MODULE_26__[\"UserStatuses\"].OFFLINE;\n\n if (UserStatusesWeight[aStatus] !== UserStatusesWeight[bStatus]) {\n return UserStatusesWeight[aStatus] - UserStatusesWeight[bStatus];\n }\n\n const aName = getDisplayNameByUser(a);\n const bName = getDisplayNameByUser(b);\n return aName.localeCompare(bName);\n }\n\n return users.sort(compareUsers);\n}", "sortByStatus (direction) {\n const newSortedUsers = this.state.liveUsers.sort(function (a, b) {\n const statusA = a.status.toUpperCase();\n const statusB = b.status.toUpperCase();\n\n if (direction === 'asc') {\n if (statusA < statusB) {\n return -1;\n }\n\n if (statusA > statusB) {\n return 1;\n }\n } else {\n if (statusA > statusB) {\n return -1;\n }\n\n if (statusA < statusB) {\n return 1;\n }\n }\n\n return 0;\n });\n\n return newSortedUsers;\n }", "function toogleSort(){\r\n\t\tif(settings.sort_type=='desc'){\r\n\t\t\tsettings.sort_type='asc';\r\n\t\t }else{\r\n\t\t\t settings.sort_type='desc';\r\n\t\t }\r\n\t}", "function sortFilterData(d){\n var sample_values = d['sample_values']\n var otu_ids = d['otu_ids']\n var otu_labels= d['otu_labels']\n\n sample_values = sample_values.sort((a, b) => b - a).slice(0,10);\n otu_ids = otu_ids.sort((a, b) => b - a).slice(0,10);\n otu_labels = otu_labels.sort((a, b) => b - a).slice(0,10);\n\n buildHBar(sample_values, otu_ids, otu_labels)\n buildBubble(sample_values, otu_ids, otu_labels)\n}", "function sortColumns(columns) {\n function sortFunction(a, b) {\n return (a.useCount < b.useCount) - (a.useCount > b.useCount);\n }\n\n columns.sort(sortFunction);\n }", "function orderByDuration(arr){\n\n let newArray = turnHoursToMinutes(arr)\n // console.log(newArray);\n newArray.sort(function(a,b) { \n var result = a.duration - b.duration\n if(result != 0) {\n return result;\n }\n if(a.title < b.title) {\n return -1;\n }\n if(a.title > b.title) {\n return 1;\n }\n return 0\n });\n // console.log(newArray);\n return newArray;\n \n}", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "function sortByStatistic(data, statisticReported, statisticSorted) {\n sortedArray = [];\n //creating your own little array of objects with only the information you need to display\n for (i = 0; i < data.length; i++) {\n sortedArray.push({\n name: data[i].first_name,\n lname: data[i].last_name,\n statisticReported: data[i][statisticReported],\n statisticSorted: data[i][statisticSorted]\n })\n }\n sortedArray.sort(function(a,b) {\n return a[\"statisticSorted\"] - b[\"statisticSorted\"];\n });\n return sortedArray;\n }", "async function TopologicalSort(){}", "function sort_li(a, b) {\n console.log('in');\n an = Date.parse($(a).find('.col1').text());\n bn = Date.parse($(b).find('.col1').text());\n\n return bn < an ? 1 : -1;\n }", "function sortit(e)\n{\n var exp;\n if (typeof e == \"string\") {\n exp = e.split(\",\");\n last_sort = e;\n } else {\n exp = e.sortedlist.split(\",\");\n last_sort = e.sortedlist;\n }\n\n var sorter = [];\n var order=[];\n for(var i=0;i<exp.length;i++) {\n if (exp[i] === \"0\") continue;\n if (exp[i] === \"1\") {\n sorter.push(i);\n order.push(1);\n }\n else if (exp[i] == \"2\") {\n sorter.push(i);\n order.push(-1);\n }\n }\n\n var data;\n if (filtered_data == null) {\n data = raw_data.slice();\n } else {\n data = filtered_data.slice();\n }\n\n if (sorter.length == 0) {\n var dta = new async_emulator(data);\n views.view('table').data(dta);\n return;\n }\n\n // Do the Sort\n data.sort(function(a,b) {\n for(var i=0;i<sorter.length;i++) {\n var s = sorter[i];\n if ((a[s] == null && b[s] != null) || a[s] < b[s]) {\n if (order[i] > 0) return (-1)\n else return (1);\n } else if ((b[s] == null && a[s] != null) || a[s] > b[s]) {\n if (order[i] > 0) return (1);\n else return (-1);\n }\n }\n return (0);\n });\n\n var dta = new async_emulator(data);\n views.view('table').data(dta);\n}", "function sortMessagesByDate(conversation) {\n conversation.messages.sort(function (a, b) {\n return (new Date(a.timestamp) - new Date(b.timestamp));\n })\n}", "function sortByDateTime\n(\n arr\n)\n{\n return arr.sort(function(a,b)\n {\n var secondDate = new Date(b.dt);\n var currentDate = new Date();\n return currentDate - secondDate ; \n });\n}", "function transformSortDate(arr) {\n const sortedArray = arr.sort((a, b) => {\n return b.timestamp + a.timestamp;\n });\n return sortedArray;\n}", "sortData(data){\n\t\tif(!this.dtInstance)\n\t\t\treturn;\n\n\t\tlet _self = this;\n\t\tlet order = this.dtInstance.order()[0];\n\t\tlet col = order[0], dir = order[1];\n\t\tif(this.sortFns[col]) {\n\t\t\tlet sortFn = this.sortFns[col];\n\t\t\tdata.sort(function(a, b){\n\t\t\t\tlet aa = sortFn(a, col),\n\t\t\t\t\tbb = sortFn(b, col);\n\n\t\t\t\tif(dir == \"asc\")\n\t\t\t\t\treturn ((aa < bb) ? -1 : ((aa > bb) ? 1 : 0));\n\t\t\t\tif(dir == \"desc\")\n\t\t\t\t\treturn ((bb < aa) ? -1 : ((bb > aa) ? 1 : 0));\n\t\t\t});\n\t\t}\n\n\t\treturn data;\n\t}", "function sortData () {\n for (var i = 0; i < 24; i++) {\n \n var temp = [];\n for (var index in data) {\n data[index].JavaScript.hours[i].z = index\n temp.push(data[index].JavaScript.hours[i]);\n };\n\n temp.sort(function (a,b) {\n if (a.commits < b.commits) {\n return 1;\n } else if (b.commits < a.commits) {\n return -1;\n }\n\n return 0;\n })\n\n for (var index in data) {\n data[index].JavaScript.hours[i] = temp[index]\n }\n }\n}", "function sortActivities(dataObject) {\n for (var i = 0; i < dataObject.activities.length; i++) {\n if (dataObject.activities[i].confirmed === true) {\n self.currentTrip.activity.push(dataObject.activities[i]);\n\n }\n }\n }", "function sortbylabel(rORc,i,sortOrder){\n var t = svg.transition().duration(3000);\n var log2r=[];\n var sorted; // sorted is zero-based index\n d3.selectAll(\".c\"+rORc+i) \n .filter(function(ce){\n log2r.push(ce.value);\n })\n ;\n if(rORc==\"r\"){ // sort log2ratio of a gene\n sorted=d3.range(cols.length).sort(function(a,b){ if(sortOrder){ return log2r[b]-log2r[a];}else{ return log2r[a]-log2r[b];}});\n t.selectAll(\".cell\")\n .attr(\"x\", function(d) { return sorted.indexOf(d.col) * vm.options.col.cellwidth; })\n ;\n t.selectAll(\".colLabel\")\n .attr(\"y\", function (d, i) { return sorted.indexOf(i) * vm.options.row.cellheight; })\n ;\n }else{ // sort log2ratio of a contrast\n sorted=d3.range(rows.length).sort(function(a,b){if(sortOrder){ return log2r[b]-log2r[a];}else{ return log2r[a]-log2r[b];}});\n t.selectAll(\".cell\")\n .attr(\"y\", function(d) { return sorted.indexOf(d.row) * vm.options.row.cellheight; })\n ;\n t.selectAll(\".rowLabel\")\n .attr(\"y\", function (d, i) { return sorted.indexOf(i) * vm.options.row.cellheight; })\n ;\n }\n }", "sortData(field, order) {\n const arr = [...this.data];\n const columnToSort = this.headerConfig.find(item => item.id === field);\n const directions = {asc: 1, desc: -1};\n\n return arr.sort((a, b) => {\n\n const res = columnToSort.sortType === 'string' \n ? a[field].localeCompare(b[field], ['ru', 'en']) \n : (a[field] - b[field]);\n \n return directions[order] * res;\n\n });\n\n }", "function sortByReleaseDateDown() {\n arrayLivros.sort((a, b) => Date.parse(b._releaseDate) - Date.parse(a._releaseDate));\n}", "function sortByArrival(arr){\n clock = 0;\n arr.sort((a, b) =>{\n return a.arrival - b.arrival\n })\n}", "function sortUsernames(rflEntries) {\n\tconst usernames = [...Object.keys(rflEntries)];\n\tusernames.sort((usernameA, usernameB) => { // a comes first if score is higher -> return negative if a is higher\n\t\treturn rflEntries[usernameB]['score'] - rflEntries[usernameA]['score'];\n\t});\n\treturn usernames;\n}", "function _UltraGrid_Sort_Rows_Time(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Parse_Time(a.Value, 0xffffffff);\n\t\tvar valueB = Parse_Time(b.Value, 0xffffffff);\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}", "function sortJSON() {\n filteredObjects.sort(function(a, b) {\n var valueA, valueB;\n\n switch (sortParam) {\n // ascending by project name\n case 'asc':\n valueA = a.title.toLowerCase();\n valueB = b.title.toLowerCase();\n break;\n // newest by creation date (b and a is changed on purpose)\n case 'newest':\n valueA = new Date(b.updatedAt);\n valueB = new Date(a.updatedAt);\n break;\n }\n\n if (valueA < valueB) {\n return -1;\n } else if (valueA > valueB) {\n return 1;\n } else {\n return 0;\n }\n });\n\n //set the URL accordingly\n setURLParameter();\n}", "function sort_li(a, b) {\n an = Date.parse($(a).find('.col2').text());\n bn = Date.parse($(b).find('.col2').text());\n\n return bn < an ? 1 : -1;\n }", "function sortDates(){\n\n\n function swap(x,y){\n let tx=dates[x];\n dates[x]=dates[y];\n dates[y]=tx;\n }\n\n for (let i=0;i<dates.length;i++){\n let m1=parseInt(dates[i].date.slice(0,dates[i].date.indexOf('.')));\n let d1=parseInt(dates[i].date.slice(dates[i].date.indexOf('.')+1,dates[i].date.indexOf('.',dates[i].date.indexOf('.')+1)));\n for (let j=i;j<dates.length;j++){\n let m2=parseInt(dates[j].date.slice(0,dates[j].date.indexOf('.')));\n let d2=parseInt(dates[j].date.slice(dates[j].date.indexOf('.')+1,dates[j].date.indexOf('.',dates[j].date.indexOf('.')+1)));\n if ((m2<m1)||m1==m2&&d2<d1){\n swap(i,j);\n m1=parseInt(dates[i].date.slice(0,dates[i].date.indexOf('.')));\n d1=parseInt(dates[i].date.slice(dates[i].date.indexOf('.')+1,dates[i].date.indexOf('.',dates[i].date.indexOf('.')+1)));\n }\n }\n }\n injectData();\n\n }", "sortedTasks(state){\n //criar uma variavel para ordernar nossas tarefas sem alterar o estado original(state)\n let sorted = state.tasks\n return sorted.sort((a,b) => {\n //se o a for menor então ele retorna para corrigir a ordenação\n if(a.name.toLowerCase() < b.name.toLowerCase()) return -1\n //mesma inversa se for o inverso da primeira situação\n if(a.name.toLowerCase() > b.name.toLowerCase()) return 1\n\n return 0\n }) \n }", "function sortByProcName(a, b) {//sort by name(display_as) ascending only\n\t\tif (a.DISPLAY_AS.toUpperCase() > b.DISPLAY_AS.toUpperCase()) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (a.DISPLAY_AS.toUpperCase() < b.DISPLAY_AS.toUpperCase()) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t}", "function sortAvatarsByLoudness() {\n removeAllOverlays();\n var avatarList = settings.ui.searchWholeDomainForLoudestEnabled ? Object.keys(userStore) : getAvatarsInRadius(SEARCH_RADIUS_DEFAULT);\n settings.users = avatarList.map(function (uuid) { return userStore[uuid]; });\n settings.users = settings.users.sort(sortNumber).slice(0, 10);\n addAllOverlays();\n }", "function resort(events){\n //Iterate over the events to fix Javscript Time objecs and such (also removing past events)\n for(var i = 0; i < events.length; i++){\n //Time type event\n if(events[i].type == \"time\"){\n //If the event end time is less than the current time\n if(events[i].startTime < Date.now()){\n //Remove the event\n events.splice(i,1);\n i--;\n }\n }\n //Day type event\n else if(events[i].type == \"day\"){\n //If the event's time is less than the current time and the event isn't today\n if(events[i].time < Date.now() && dateToDayString(parseStringForDate(events[i].time)) != dateToDayString(new Date())){\n //Remove the event\n events.splice(i,1);\n i--;\n }\n else{\n //Set the start time to be the time (makes for easier sorting and display)\n events[i].startTime = events[i].time;\n }\n }\n }\n\n //Add descriptions for each event and fix titles\n for(var i = 0; i < events.length; i++){\n if(events[i].desc == undefined){\n var title = events[i].title;\n var desc = title.substring(title.indexOf(\" - \")+3);\n var title = title.substring(0, title.indexOf(\" - \"));\n events[i].title = title;\n events[i].desc = desc;\n }\n }\n\n //Sorts the event by time, then by title, then by description\n events.sort(\n function(a,b){\n if(a.startTime==b.startTime){\n if(a.title == b.title){\n return a.desc.localeCompare(b.desc);\n }else{\n return a.title.localeCompare(b.title);\n }\n }\n else{\n return a.startTime>b.startTime?1:-1;\n }\n }\n );\n\n //Only take the first 15 events\n if(events.length > 25){\n events = events.slice(0,25);\n }\n //Update local storage\n localStorage.setItem(\"athleticEvents\", JSON.stringify(events));\n localStorage.setItem(\"athleticEventsRefreshTime\", Date.now());\n $scope.events = events;\n $ionicLoading.hide();\n $scope.$broadcast('scroll.refreshComplete');\n }", "filterAndSortDataByYear () {\n }", "function sortRows(){\n sortRowsAlphabeticallyUpwards();\n}", "function sortByDateAsc(a,b)\n{\n return new Date(a.createdAt) - new Date(b.createdAt)\n}", "function sort_stamps(temp) {\n\t\ttemp.sort(function (a, b) {\n\t\t\tvar entryA = a.instrument + a.state;\n\t\t\tvar entryB = b.instrument + b.state;\n\t\t\tif (entryA < entryB) return -1;\n\t\t\tif (entryA > entryB) return 1;\n\t\t\treturn 0;\n\t\t});\n return temp;\n\t}", "function sortByName(c1,c2) {\n var c1Label = data.maps.columnIdToLabel[c1],\n c2Label = data.maps.columnIdToLabel[c2];\n\n return d3.ascending(c1Label, c2Label);\n //return d3.ascending(data.labels.columns[c1],data.labels.columns[c2]);\n }", "function sortbylabel(rORc,i,sortOrder){\n var t = svg.transition().duration(3000);\n var log2r=[];\n var sorted; // sorted is zero-based index\n d3.selectAll(\".c\"+rORc+i) \n .filter(function(ce){\n log2r.push(ce.value);\n })\n ;\n if(rORc==\"r\"){ // sort log2ratio of a gene\n sorted=d3.range(col_number).sort(function(a,b){ if(sortOrder){ return log2r[b]-log2r[a];}else{ return log2r[a]-log2r[b];}});\n t.selectAll(\".cell\")\n .attr(\"x\", function(d) { return sorted.indexOf(d.col-1) * cellSize; })\n ;\n t.selectAll(\".colLabel\")\n .attr(\"y\", function (d, i) { return sorted.indexOf(i) * cellSize; })\n ;\n }else{ // sort log2ratio of a contrast\n sorted=d3.range(row_number).sort(function(a,b){if(sortOrder){ return log2r[b]-log2r[a];}else{ return log2r[a]-log2r[b];}});\n t.selectAll(\".cell\")\n .attr(\"y\", function(d) { return sorted.indexOf(d.row-1) * cellSize; })\n ;\n t.selectAll(\".rowLabel\")\n .attr(\"y\", function (d, i) { return sorted.indexOf(i) * cellSize; })\n ;\n }\n }", "sort_by(by){\n\n if(by == \"category\"){\n //its a special case where we can't use value sort..\n this.agents.sort(function(a,b){\n return category_sort(a,b);\n })\n }else{\n //we can use value_sort as a comparator.\n this.agents.sort(function(a,b){\n return value_sort(a,b,by);\n })\n }\n\n //update agent list.\n\n this.div.selectAll(\"p\")\n .data(this.agents)\n .transition()\n .text(function(d,i){\n return d.behavior+d.ID;\n })\n\t .style(\"background-color\",(d,i)=>{\n\t\t return color_back[AGENT_BEHAVIORS.indexOf(d.behavior)];\n\t });\n\n }", "function sortData(query) {\n // if there is a sort order query passed in\n if (angular.isNumber(query.sort)) {\n currentSortOrder = query.sort;\n }\n database = $filter('orderBy')(database, sortOrders[currentSortOrder].value);\n $rootScope.$broadcast(dataEvents.dataChanged);\n }", "function sortFunc(a, b) {\n var aDate = new Date(a.time);\n var bDate = new Date(b.time);\n\n if (aDate > bDate) {\n return -1;\n } else if (aDate < bDate) {\n return 1;\n } else {\n return 0;\n }\n }", "applySorting(by, type) {\n this.projectController.applySorting(by, type);\n }", "function sortArrByTime(pArr, pFormat) {\n\n function customeSort(pFirstValue, pSecondValue) {\n var parseTime = d3.timeParse(pFormat);\n var fD = parseTime(pFirstValue.x);\n var sD = parseTime(pSecondValue.x);\n return new Date(fD).getTime() - new Date(sD).getTime();\n }\n\n try {\n return pArr.sort(customeSort);\n }\n catch (e) {\n apex.debug.error({\n \"fct\": util.featureDetails.name + \" - \" + \"drawChart\",\n \"msg\": \"Error while try sort JSON Array by Time Value\",\n \"err\": e,\n \"featureDetails\": util.featureDetails\n });\n }\n }" ]
[ "0.6543412", "0.6395627", "0.6367838", "0.6333604", "0.6103069", "0.60980606", "0.6069885", "0.60545176", "0.6046345", "0.6039842", "0.60212874", "0.5987934", "0.5971773", "0.59702843", "0.59563315", "0.5880812", "0.58712864", "0.58670044", "0.5864401", "0.5862018", "0.58613634", "0.58597726", "0.58405685", "0.58259517", "0.5764844", "0.5750636", "0.57390785", "0.5732615", "0.5716819", "0.57157844", "0.5683873", "0.56749105", "0.56722814", "0.56651706", "0.5652541", "0.56518805", "0.56468433", "0.5646769", "0.5630585", "0.5609925", "0.5570639", "0.5569863", "0.5562207", "0.5560781", "0.5555005", "0.5543337", "0.55297446", "0.55274177", "0.55248445", "0.5509087", "0.54996556", "0.54937935", "0.54887515", "0.54885566", "0.54840267", "0.5482235", "0.5479012", "0.5476196", "0.54730076", "0.5466218", "0.5458987", "0.5456902", "0.54481244", "0.5446921", "0.544352", "0.54381466", "0.54366183", "0.54333293", "0.5429091", "0.5428939", "0.54250604", "0.54138434", "0.5406711", "0.5405831", "0.5405058", "0.539872", "0.53933275", "0.5387242", "0.5384381", "0.53836644", "0.5382306", "0.5377053", "0.5373503", "0.5370315", "0.536825", "0.53465784", "0.5346113", "0.5345062", "0.53426254", "0.53398794", "0.5335106", "0.5334234", "0.53315604", "0.5330665", "0.5326094", "0.5325721", "0.53250164", "0.53233564", "0.53206724", "0.5317232" ]
0.5835192
23
Sort Daily Charge Report GridBy krishna on 21082015
function SortDailyChargeReportGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var departmenttype = $('#ddlDepartment').val(); var url = "/Reporting/SortDailyChargeReportGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); departmentNumber: departmenttype != null ? departmenttype : '0'; //var isAll = $('#ShowAllRecords').prop('checked') ? true : false; //var userId = $("#ddlUsers").val(); if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) { url += "?fromDate=" + fromDate + "&tillDate=" + tillDate + "&departmentNumber=" + departmenttype + "&" + event.data.msg; } $.ajax({ type: "POST", url: url, async: false, contentType: "application/json; charset=utf-8", dataType: "html", data: null, success: function (data) { $("#gridContentIPChargesDetailReport").empty(); $("#gridContentIPChargesDetailReport").html(data); //ReportingGrid }, error: function (msg) { } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_sortDataByDate() {\n this.data.sort(function(a, b) {\n let aa = a.Year * 12 + a.Month;\n let bb = b.Year * 12 + b.Month;\n return aa - bb;\n });\n }", "function sorted(sheet){\n sheet.sort(masterCols.end_time+1).sort(masterCols.start_time+1).sort(masterCols.date+1);\n}", "function SortTerritorySalesNumbers() {\n\n //sort the territories in descending order based on percent\n if (vm.chartType == 'month') {\n vm.territorySalesNumbers.sort(function (a, b) { return b.percent - a.percent }); //descending order\n }\n //sort the territories in ascending order based on month -- 1 = january to 12 = december\n else {\n vm.territorySalesNumbers.sort(function (a, b) { return a.month - b.month }); //ascending order\n }\n }", "function sortDates(){\n\n\n function swap(x,y){\n let tx=dates[x];\n dates[x]=dates[y];\n dates[y]=tx;\n }\n\n for (let i=0;i<dates.length;i++){\n let m1=parseInt(dates[i].date.slice(0,dates[i].date.indexOf('.')));\n let d1=parseInt(dates[i].date.slice(dates[i].date.indexOf('.')+1,dates[i].date.indexOf('.',dates[i].date.indexOf('.')+1)));\n for (let j=i;j<dates.length;j++){\n let m2=parseInt(dates[j].date.slice(0,dates[j].date.indexOf('.')));\n let d2=parseInt(dates[j].date.slice(dates[j].date.indexOf('.')+1,dates[j].date.indexOf('.',dates[j].date.indexOf('.')+1)));\n if ((m2<m1)||m1==m2&&d2<d1){\n swap(i,j);\n m1=parseInt(dates[i].date.slice(0,dates[i].date.indexOf('.')));\n d1=parseInt(dates[i].date.slice(dates[i].date.indexOf('.')+1,dates[i].date.indexOf('.',dates[i].date.indexOf('.')+1)));\n }\n }\n }\n injectData();\n\n }", "filterAndSortDataByYear () {\n }", "sortData(monthData, lowPriceFilter = true) {\n let sortData = [];\n let max = monthData[0];\n monthData.forEach(e => {\n max = parseInt(e.date.split('/')[2]) > parseInt(max.date.split('/')[2]) ? e : max\n });\n for(var i =0; i < monthData.length; i++) {\n let first = max;\n monthData.filter(e => !sortData.includes(e)).forEach(e => {first = parseInt(first.date.split('/')[2]) < parseInt(e.date.split('/')[2]) ? first : e;})\n sortData.push(first)\n }\n return(lowPriceFilter ? this.filterData(sortData) : sortData)\n }", "function sortDate(data) {\r\n const sortedDate = data.sort((a, b) => {\r\n if (sortBool)\r\n return a.date < b.date ? -1 : 1;\r\n else\r\n return a.date > b.date ? -1 : 1;\r\n });\r\n swapBool();\r\n createStockTable(sortedDate);\r\n }", "function dateSorting(column) {\n\n column.sortingAlgorithm = function(a, b) {\n var dt1 = new Date(a).getTime(),\n dt2 = new Date(b).getTime();\n return dt1 === dt2 ? 0 : (dt1 < dt2 ? -1 : 1);\n };\n }", "function sortByDate(){\n\t\t holiday.sort(function(a,b){\n\t if( parseInt(a[\"month\"],10) > parseInt(b[\"month\"],10)){\n\t return 1;\n\t }\n\t\t\t\telse if( parseInt(a[\"month\"],10) < parseInt(b[\"month\"],10) ){\n\t return -1;\n\t }\n\t\t\t\telse if( parseInt(a[\"month\"],10) == parseInt(b[\"month\"],10)){\n\t\t\t\t\t\tif( parseInt(a[\"day\"],10) > parseInt(b[\"day\"],10)){\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( parseInt(a[\"day\"],10) < parseInt(b[\"day\"],10) ){\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t return 0;\n\t });\n\t}", "function sortEntriesMRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_desc = function (entry1, entry2) {\n\t\tvar date1 = Date.parse(entry1.dateAccessed);\n\t\tvar date2 = Date.parse(entry2.dateAccessed);\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n console.log(\"sort mru\");\n\tentries.sort(date_sort_desc);\n}", "function theQwertyGrid_sortInt(key) {\n\t\t\tif(_theQwertyGrid_sortInAsc) {\n\t\t\t\t_theQwertyGrid_sortInAsc = false;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(a,b) {\n\t\t\t\t\treturn a[key] - b[key];\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_theQwertyGrid_sortInAsc = true;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(b,a) {\n\t\t\t\t\treturn a[key] - b[key];\n\t\t\t\t});\n\t\t\t}\n\t\t\ttheQwertyGrid_reFillTable(_theQwertyGrid_displayData);\n\t\t\t\n\t\t}", "function sortByDonationDateUp() {\n arrayLivros.sort((a, b) => Date.parse(a._releaseDate) - Date.parse(b._releaseDate));\n}", "function sortByTime() {\n for (let i = 0; i < sortedData.length; i++) {\n var x = sortedData[i].time;\n \n if (x < 12) {\n sortedByTime.push(sortedData[i]);\n \n } \n }\n }", "sortData(field, order) {\n const arr = [...this.data];\n const columnToSort = this.headerConfig.find(item => item.id === field);\n const directions = {asc: 1, desc: -1};\n\n return arr.sort((a, b) => {\n\n const res = columnToSort.sortType === 'string' \n ? a[field].localeCompare(b[field], ['ru', 'en']) \n : (a[field] - b[field]);\n \n return directions[order] * res;\n\n });\n\n }", "sortTwitsByDate( ) {\n this.twits.sort( (a, b) => {\n \n if (this.switchPosition == \"normal\");\n if (this.dateCompare(a,b)) {\n return 1;\n }\n if (!this.dateCompare(a,b)) {\n return -1;\n }\n if (this.switchPosition == \"reversed\"){\n if (!this.dateCompare(a,b)) {\n return 1;\n }\n if (this.dateCompare(a,b)) {\n return -1;\n }\n }\n return 0;\n });\n }", "function alphabetique(){\n entrepreneurs.sort.year\n }", "sortByDate(selection = \"timed\"){\n return this.dataFromSelectionName(selection).sort((a, b) => a.date - b.date);\n }", "function sort_contributions(sort_by) {\n if (sort_by == 'historical') {\n contributions.sort(function(a, b) {\n return a.serialised_hist_date - b.serialised_hist_date;\n });\n } else if (sort_by == 'contribution') {\n contributions.sort(function(a, b) {\n return a.serialised_cont_date - b.serialised_cont_date;\n });\n }\n}", "function sortByDonationDateDown() {\n arrayLivros.sort((a, b) => Date.parse(b._releaseDate) - Date.parse(a._releaseDate));\n}", "function sortData(sheet) {\n var lastRow = sheet.getLastRow();\n var lastColumn = sheet.getLastColumn();\n var range = sheet.getRange(2,1,lastRow,lastColumn);\n range.sort({column: 1, ascending: true});\n}", "sortFitness(response, dates) {\n let startJ = 1;\n for (var i = 0; i < response.data.length; i++) {\n let currentRide = response.data[i];\n let currentKj = response.data[i].kilojoules;\n let d = response.data[i].start_date_local.slice(0,10)+'T07:00:00Z';\n let currentRideDate = new Date(d).toString().slice(4,15);\n\n for (var j = startJ-1; j < dates.length; j++) {\n let currentDate = dates[j].formattedDate;\n if (currentRideDate === currentDate) {\n currentRide.formattedDate = currentRideDate;\n dates[j] = currentRide;\n dates[j].kilojoules = currentKj;\n break;\n }\n ++startJ;\n }\n }\n return dates;\n }", "function sortByDate(filesArray) {\n filesArray.forEach(function(elem, index) {\n var months = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'];\n var splitt = elem.date.split('');\n elem.numDate = {\n \"day\": parseInt(splitt.slice(0,2).join('')),\n \"month\": months.indexOf(splitt.slice(2,5).join('')) + 1,\n \"year\": parseInt(splitt.slice(-4).join(''))\n\n }\n });\n filesArray.sort(function(a,b){\n var listOfCriteria = ['year', 'month', 'day'];\n var index = 0;\n return comparisonWrapper(a.numDate,b.numDate,listOfCriteria, index)\n });\n return filesArray\n}", "function sortTable(f,n){\r\n\tvar rows = $('#SPapprvergrid tbody tr').get();\r\n\r\n\trows.sort(function(a, b) {\r\n\r\n\t\tvar A = getVal(a);\r\n\t\tvar B = getVal(b);\r\n\r\n\t\tif(A < B) {\r\n\t\t\treturn -1*f;\r\n\t\t}\r\n\t\tif(A > B) {\r\n\t\t\treturn 1*f;\r\n\t\t}\r\n\t\treturn 0;\r\n\t});\r\n\r\n\tfunction getVal(elm){\r\n\t\tvar v = $(elm).children('td').eq(n).text().toUpperCase();\r\n\t\tif($.isNumeric(v)){\r\n\t\t\tv = parseInt(v,10);\r\n\t\t}\r\n\t\treturn v;\r\n\t}\r\n\r\n\t$.each(rows, function(index, row) {\r\n\t\t$('#SPapprvergrid').children('tbody').append(row);\r\n\t});\r\n}", "function sortDate()\n{\n\tevents.sort( function(a,b) { if (a.startDate < b.startDate) return -1; else return 1; } );\n\tclearTable();\n\tfillEventsTable();\n}", "function sorterenyear(a, b) {\r\n return d3.ascending(year(a), year(b));\r\n}", "function sortListsByDate() {\r\n\t\treturn getItems().sort(function(a,b){\r\n \t\t\treturn new Date(`${a.date} ${a.time}`) - new Date(`${b.date} ${b.time}`);\r\n\t\t});\r\n\t}", "function sort(){\n var toSort = S('#sched-list').children;\n toSort = Array.prototype.slice.call(toSort, 0);\n\n toSort.sort(function(a, b) {\n var a_ord = +a.id.split('e')[1]; //id tags of the schedule items are timeINT the INT = the numeric time\n var b_ord = +b.id.split('e')[1]; //splitting at 'e' and getting the element at index 1 gives use the numeric time\n\n return (a_ord > b_ord) ? 1 : -1;\n });\n\n var parent = S('#sched-list');\n parent.innerHTML = \"\";\n\n for(var i = 0, l = toSort.length; i < l; i++) {\n parent.appendChild(toSort[i]);\n }\n }", "function sortArrayAsc(index){\n console.log(\"Display before sort: \", displayArray);\n // switch/case based on asc button index\n switch (index) {\n case 0:\n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyName.toLowerCase();\n var y = b.property[1].propertyName.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 1: \n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyAddress.toLowerCase();\n var y = b.property[1].propertyAddress.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 2: \n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyNeighborhood.toLowerCase();\n var y = b.property[1].propertyNeighborhood.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 3: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.property[1].propertySquareFoot);\n var y = parseInt(b.property[1].propertySquareFoot);\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 4: \n displayArray.sort(function (a,b) { \n var x = a.workspaceType.toLowerCase();\n var y = b.workspaceType.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 5: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.dateAvailable.replace(/[-,]+/g, \"\"));\n var y = parseInt(b.dateAvailable.replace(/[-,]+/g, \"\"));\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 6: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.price.replace(/[$,]+/g, \"\"));\n var y = parseInt(b.price.replace(/[$,]+/g, \"\"));\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 7: \n displayArray.sort(function (a,b) {\n function leaseConvert(value){\n switch (value){\n case \"day\":\n return 1;\n case \"week\":\n return 7;\n case \"month\":\n return 30;\n }\n } \n var x = leaseConvert(a.leaseLength.toLowerCase());\n var y = leaseConvert(b.leaseLength.toLowerCase());\n \n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 8: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.numberOfSeats);\n var y = parseInt(b.numberOfSeats);\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n };\n \n \n console.log(\"Display after sort: \", displayArray)\n }", "sortData(data) {\n return data.sort((a, b) => {\n let aa = typeof a.date === \"string\" ? Date.parse(a.date) : a.date,\n bb = typeof b.date === \"string\" ? Date.parse(b.date) : b.date;\n return this.latest ? bb - aa : aa - bb;\n });\n }", "sortColumns(columns) {\n return Object.keys(columns).sort((a, b) => {\n const aName = columns[a].column.name,\n bName = columns[b].column.name;\n if (aName.slice(0, 4) === bName.slice(0, 4)) {\n return seasonMap[aName.slice(5)] > seasonMap[bName.slice(5)]? 1:-1;\n }\n return aName > bName? 1:-1;\n });\n }", "function sortByDate(a, b){\nvar aDate = a.date;\nvar bDate = b.date; \nreturn ((aDate > bDate) ? -1 : ((aDate < bDate) ? 1 : 0));\n}", "function sortByReleaseDateDown() {\n arrayLivros.sort((a, b) => Date.parse(b._releaseDate) - Date.parse(a._releaseDate));\n}", "function sortData () {\n for (var i = 0; i < 24; i++) {\n \n var temp = [];\n for (var index in data) {\n data[index].JavaScript.hours[i].z = index\n temp.push(data[index].JavaScript.hours[i]);\n };\n\n temp.sort(function (a,b) {\n if (a.commits < b.commits) {\n return 1;\n } else if (b.commits < a.commits) {\n return -1;\n }\n\n return 0;\n })\n\n for (var index in data) {\n data[index].JavaScript.hours[i] = temp[index]\n }\n }\n}", "function loadByDate(sortcol) {\r\nvar sort_by = sortcol;\r\nfor (var i=0; i < data_array.length; i+=1) {\r\nvar j_var = [];\r\nfor (var j=0; j <= total_col_count; j+=1) {\r\n\r\n\r\nif (sort_by === 9) { // If sorting by date stamp\r\nif (j === sort_by) {\r\nj_var.unshift(data_array[i][j]);\r\n} else {\r\nj_var.push(data_array[i][j]);\r\n}\r\n} else { // If not sorting by date stamp\r\nj_var.push(data_array[i][j]);\r\n}\r\n\r\n} // end for j\r\nworking_array.push(j_var);\r\n} // end for i\r\nworking_array.sort();\r\nworking_array.reverse();\r\n\r\nvar tableHTML = '<table class=\"table table-hover\"><thead><tr>';\r\n\r\nvar tableHTML = '<table class=\"table table-hover table-bordered\"><thead><tr>';\r\nfor (var i=0; i < cell_title_array.length; i+=1) { // Populate table headers\r\ntableHTML += '<th>' + cell_title_array[i] + '</th>';\r\n}\r\ntableHTML += '</tr></thead><tbody>';\r\n\r\nfor (var i=0; i < working_array.length; i+=1) { // Populate default table body\r\ntableHTML += '<tr>';\r\nfor (var j=0; j < 10; j+=1) {\r\n\r\nif (sort_by === 9) { // If sorting by date stamp\r\nif (j > 0) { // excludes the time stamp from the table\r\ntableHTML += '<td>';\r\ntableHTML += working_array[i][j];\r\ntableHTML += '</td>';\r\n}\r\n} else { // If not sorting by date stamp\r\ntableHTML += '<td>';\r\ntableHTML += working_array[i][j];\r\ntableHTML += '</td>';\r\n}\r\n\r\n\r\n} // end for j\r\ntableHTML += '</tr>';\r\n}\r\ntableHTML += '</tbody></table>';\r\n\r\ndocument.getElementById('infoDiv').innerHTML = tableHTML;\r\ndocument.getElementById('description_jumbotron').style.display = 'none';\r\n\r\n\r\n} // end load by date function", "function sortByReleaseDateUp() {\n arrayLivros.sort((a, b) => Date.parse(a._releaseDate) - Date.parse(b._releaseDate));\n}", "sortAlbumsYear() {\n this.albumsList.sort((album1, album2)=>{\n if(album1.year < album2.year){\n return -1\n } else if (album1.year > album2.year) {\n return 1\n } else {\n return 0\n }\n })\n }", "function pOrdenacionGridPedidosAnteriores(NombreColumna,imagen,formato) {\n\t\n\tvar aux = localStorage.getItem('sortgrid');\n\tvar grid = $(\"#pGridPedidosAnteriores\").data(\"kendoGrid\");\n\tconsole.log(\"ORDENADO LA COMUNA \" + NombreColumna +\" \"+ imagen +\" \"+ formato ); \t\n\t\tswitch (aux) {\n\t\t\t case \"0\":\n\t\t\t\t\t\tgrid.dataSource.sort({\n\t\t\t\t\t\t\tfield: NombreColumna, \n\t\t\t\t\t\t\tformat: formato,\n\t\t\t\t\t\t\ttype: \"date\",\n\t\t\t\t\t\t\tdir: \"desc\" \n\t\t\t\t\t});\n\t\t\t\t\tgrid.refresh();\n\t\t\t\t\tlocalStorage.setItem('sortgrid',\"1\");\n\t\t\t\t\t$('#'+imagen).attr(\"src\",\"./images/sort_desc.png\");\n\t\t\t break;\n\t\t\t case \"1\":\n\t\t\t\t\t\tgrid.dataSource.sort({\n\t\t\t\t\t\t\tfield: NombreColumna,\n\t\t\t\t\t\t\tformat: formato, \n\t\t\t\t\t\t\ttype: \"date\",\n\t\t\t\t\t\t\tdir: \"asc\" \n\t\t\t\t\t});\n\t\t\t\t\tgrid.refresh();\n\t\t\t\t\tlocalStorage.setItem('sortgrid',\"2\");\n\t\t\t\t\t$('#'+imagen).attr(\"src\",\"./images/sort_asc.png\");\n\t\t\t break;\n\t\t\t case \"2\":\n\t\t\t $(\"#pGridPedidosAnteriores\").data(\"kendoGrid\").dataSource.sort({});\n\t\t\t console.log(\"ORDENADO LA COMUNA \" + NombreColumna +\" \"+ imagen +\" \"+ formato ); \n\t\t\t localStorage.setItem('sortgrid',\"0\");\n\t\t\t $('#'+imagen).attr(\"src\",\"./images/sort_both.png\");\n\t\t\t break;\n\t\t}\n}", "function sortTable_by_jan(table_bodys, jan_code, coll_num) {\n var rows = $('.' + table_bodys + ' tr').get();\n rows.sort(function(a, b) {\n\n var A = $(a).children('td').eq(coll_num).text();\n A = A.substr(A.length - 13);\n if (A == jan_code) {\n return -1;\n }\n return 0;\n\n });\n $.each(rows, function(index, row) {\n $('.' + table_bodys).append(row);\n });\n}", "function sortDates() {\n sortUsingNestedDate($('#projectIndexBig'), \"span\", $(\"button.btnSortDate\").data(\"sortKey\"));\n\n //ADDING UNDERLINE CLASSES\n if ($(\"#name\").hasClass(\"underline\")) {\n $(\"#name\").removeClass(\"underline\");\n $(\"#date\").addClass(\"underline\");\n } else {\n $(\"#date\").addClass(\"underline\");\n }\n }", "function theQwertyGrid_sortString(key) {\n\t\t\tif(_theQwertyGrid_sortInAsc) {\n\t\t\t\t_theQwertyGrid_sortInAsc = false;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(a,b){\n\t\t\t\t\treturn a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_theQwertyGrid_sortInAsc = true;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(b,a){\n\t\t\t\t\treturn a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;\n\t\t\t\t});\n\t\t\t}\n\t\t\ttheQwertyGrid_reFillTable(_theQwertyGrid_displayData);\n\t\t}", "function sortMe() {\n var ss = SpreadsheetApp.getActiveSpreadsheet(); \n var cList = ss.getSheetByName('Card List');\n var range = cList.getRange(2,1,cList.getMaxRows()-1,cList.getMaxColumns());\n // sort by sort and name\n range.sort([findColumn('Sort')+1,findColumn('Name')+1]);\n}", "function SP_SortDates()\n{\n Sign = new Array();\n\tSign[\"ASC\"] = \">\";\n\tSign[\"DESC\"] = \"<\";\n\t\n\tvar How = arguments[0];\n\tvar datesArry = arguments[1];\n\t\n\tfor (z=0;z<datesArry.length-1;z++) \n\t{\n\t\tfor (y=0;y<(datesArry.length-(z+1));y++) \n\t\t{\n\t\t\t\n\t\t\tif ( eval(SP_ConvertDate(datesArry[y+1])+ Sign[How] +SP_ConvertDate(datesArry[y])) ) \n\t\t\t{\n\t\t\t\ttemp=datesArry[y+1]; \n\t\t\t\tdatesArry[y+1] = datesArry[y]; \n\t\t\t\tdatesArry[y] = temp;\n\t\t\t}\n\t\t}\n\t}\n\tvar latestDate = SP_ConvertToDMY(datesArry[0]);\n\treturn latestDate;\n}", "function sortValue(sel) {\n if(sel==\"0\"){\n if(archive.isArchiveAR) {\n arrayRow=archive.arrayRow.slice();\n }\n }\n else {\n let idCol = parseInt(sel);\n //selectColumn=idCol;\n if (!archive.isArchiveAR) {\n console.log(\"zapisywnie archiwum\");\n archive.arrayRow = arrayRow.slice();\n archive.isArchiveAR = true;\n }\n arrayRow.sort(function (a, b) {\n return a.arrayCell[idCol] - b.arrayCell[idCol];\n });\n }\n showData();\n}", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "sortData() {\n this.data.sort(($val1, $val2 ) => {\n const a = JSON.stringify($val1[this.sortBy]);\n const b = JSON.stringify($val2[this.sortBy]);\n if ( a < b ){\n return -this.sortDir;\n }\n if ( a > b ){\n return this.sortDir;\n }\n return 0;\n });\n }", "function sortData(data) {\n displayComic(data.comics);\n //displayManga(data.manga);\n //displayGNovel(data.graphicNovels);\n readyComicFunctions();\n}", "function sortCollectionByDate(collection){\n\treturn collection.sort(function(a, b){\n\t\tif(a[year] < b[year]) return -1;\n\t\tif(a[year] > b[year]) return 1;\n\t\treturn 0;\n\t});\n}", "function initDataTables() {\n $.extend($.fn.dataTableExt.oSort['date-de-asc'] = function(a, b) {\n a = parseDate(a);\n b = parseDate(b);\n return ((a < b) ? -1 : ((a > b) ? 1 : 0));\n },\n\n $.fn.dataTableExt.oSort['date-de-desc'] = function(a, b) {\n a = parseDate(a);\n b = parseDate(b);\n return ((a < b) ? 1 : ((a > b) ? -1 : 0));\n });\n }", "function sortByRichestAsc() {\n data.sort((a, b) => a.money - b.money);\n updateDOM();\n}", "function sortHSJudging() {\n var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();\n var rankingSheet = spreadsheet.getSheetByName('Rankings');\n var hsSheet = spreadsheet.getSheetByName('HSRanking');\n\n rankTeams(rankingSheet, hsSheet, 20, 56);\n}", "function sortDates(dates, monthOuputPreference){//monthOuputPreference can be num or text [Referring to the month]\n\n\tvar monthNumericalToString={ 1:\"janurary\",2:\"feburary\",3:\"march\",4:\"april\",5:\"may\",6:\"june\",\n 7:\"july\",8:\"august\",9:\"september\",10:\"october\",11:\"november\",12:\"december\"};\n\nvar stringToMonthNumerical={\"janurary\":1,\"feburary\":2,\"march\":3,\"april\":4,\"may\":5,\"june\":6,\"july\":7,\n \"august\":8,\"september\":9,\"october\":10,\"november\":11,\"december\":12};\n\n var sortedDates=[];\n\n\tif(dates==null||dates==undefined||dates.length==0){\n \t\treturn;\n }\n\n dates.forEach( (date,dateIndex)=>{//Break dates array into 2-d array of date components\n sortedDates[dateIndex]=[];\n date.split('/').forEach( (dateComp,index)=>{\n\n \t\tif(isNaN(dateComp)){\n\n \t\tsortedDates[dateIndex].push(stringToMonthNumerical[dateComp]);\n }else{\n \tsortedDates[dateIndex].push(parseInt(dateComp));\n }\n\n\n\n });\n });\n\n\n if(sortedDates[0].length==1){//Sort YEAR\n \t\tsortedDates.sort((a,b)=>{return a-b;})\n\n }else if(sortedDates[0].length==2){//Sort YEAR/MONTH\n sortedDates.sort((a,b)=>{return a[0]-b[0];});//sort month\n sortedDates.sort((a,b)=>{return a[1]-b[1];});//sort year\n\n }else if(sortedDates[0].length==3){//SORT YEAR/MONTH/DAY\n \t\t sortedDates.sort((a,b)=>{return a[1]-b[1];});//sort day\n sortedDates.sort((a,b)=>{return a[0]-b[0];});//sort month\n sortedDates.sort((a,b)=>{return a[2]-b[2];});//sort year\n }\n\n\tsortedDates.forEach( (dateArray, arrIndex)=>{//Turing 2-d array into 1-d string array\n\n if(dateArray.length!=1 && monthOuputPreference=='text' ){\n\n \tdateArray[0]=monthNumericalToString[ dateArray[0] ];\n }\n\n dates[arrIndex]=dateArray.join('/');\n });\n\n return dates;\n\n}", "function sortByName(c1,c2) {\n var c1Label = data.maps.columnIdToLabel[c1],\n c2Label = data.maps.columnIdToLabel[c2];\n\n return d3.ascending(c1Label, c2Label);\n //return d3.ascending(data.labels.columns[c1],data.labels.columns[c2]);\n }", "sortData(data){\n\t\tif(!this.dtInstance)\n\t\t\treturn;\n\n\t\tlet _self = this;\n\t\tlet order = this.dtInstance.order()[0];\n\t\tlet col = order[0], dir = order[1];\n\t\tif(this.sortFns[col]) {\n\t\t\tlet sortFn = this.sortFns[col];\n\t\t\tdata.sort(function(a, b){\n\t\t\t\tlet aa = sortFn(a, col),\n\t\t\t\t\tbb = sortFn(b, col);\n\n\t\t\t\tif(dir == \"asc\")\n\t\t\t\t\treturn ((aa < bb) ? -1 : ((aa > bb) ? 1 : 0));\n\t\t\t\tif(dir == \"desc\")\n\t\t\t\t\treturn ((bb < aa) ? -1 : ((bb > aa) ? 1 : 0));\n\t\t\t});\n\t\t}\n\n\t\treturn data;\n\t}", "function orderByYear(arr){\n let myArr = JSON.parse(JSON.stringify(arr))\n let pelisOrdenadas=myArr.sort(function(a,b){\n if(a.year===b.year){\n return a.title.localeCompare(b.title);\n }\n return a.year - b.year});\n return pelisOrdenadas\n }", "function sortEntriesMRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_desc = function (entry1, entry2) {\n\t\tvar date1 = entry1.dateAccessed;\n\t\tvar date2 = entry2.dateAccessed;\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n\n\tentries.sort(date_sort_desc);\t\n}", "function sortData (data) {\n ...\n}", "function SortByDate(array) {\n return _.sortBy(array, function (item) {\n return moment(item.endDate, 'YYYY-MM-DD HH:mm:ss').format('x');\n });\n }", "function changeSort(sortOn) {\n var sortedBy = portfolioGrid.getSortField();\n if (sortOn == sortedBy) {\n if (direction == false) {\n direction = true;\n document.getElementById(\"img_\" + sortOn).src = \"images/down.gif\";\n } else if (direction == true) {\n direction = null;\n document.getElementById(\"img_\" + sortOn).src = \"images/spacer.gif\";\n document.getElementById(\"col_\" + sortOn).className = \"tableTitle\";\n } else {\n direction = false;\n document.getElementById(\"img_\" + sortOn).src = \"images/up.gif\";\n }\n } else {\n direction = false;\n if (sortedBy != null) {\n document.getElementById(\"img_\" + sortedBy).src = \"images/spacer.gif\";\n document.getElementById(\"col_\" + sortedBy).className = \"tableTitle\";\n }\n document.getElementById(\"img_\" + sortOn).src = \"images/up.gif\";\n document.getElementById(\"col_\" + sortOn).className = \"tableTitleSorted\";\n }\n\n if (direction == null) {\n portfolioGrid.setSort(null);\n } else {\n if (sortOn == \"qty\" || sortOn == \"last_price\" || sortOn == \"c_value\") {\n portfolioGrid.setSort(sortOn, direction, true, false);\n } else {\n portfolioGrid.setSort(sortOn, direction);\n }\n }\n}", "function dt_add_type_uk_date() {\n jQuery.fn.dataTableExt.aTypes.unshift(\n function ( sData )\n {\n if (sData.match(/(0[1-9]|[12][0-9]|3[01])\\/(0[1-9]|1[012])\\/(19|20|21)\\d\\d/))\n {\n return 'uk_date';\n }\n return null;\n }\n );\n\n jQuery.fn.dataTableExt.oSort['uk_date-asc'] = function(a,b) {\n var re = /(\\d{2}\\/\\d{2}\\/\\d{4})/;\n a.match(re);\n var ukDatea = RegExp.$1.split(\"/\");\n b.match(re);\n var ukDateb = RegExp.$1.split(\"/\");\n\n var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;\n var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1;\n\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n };\n\n jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) {\n var re = /(\\d{2}\\/\\d{2}\\/\\d{4})/;\n a.match(re);\n var ukDatea = RegExp.$1.split(\"/\");\n b.match(re);\n var ukDateb = RegExp.$1.split(\"/\");\n\n var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;\n var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1;\n\n return ((x < y) ? 1 : ((x > y) ? -1 : 0));\n };\n}", "function UltraGrid_Sort_Rows(header, sortData)\n{\n\t//first change the header icons\n\tvar bAscending = UltraGrid_Sort_Rows_SetHeaderSort(header);\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_CaseSensitive(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = a.Value;\n\t\tvar valueB = b.Value;\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_CaseSensitive_Descending(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = a.Value;\n\t\tvar valueB = b.Value;\n\t\t//return direct comparison\n\t\treturn valueA > valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_CaseInsensitive(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = a.Value.toLowerCase();\n\t\tvar valueB = b.Value.toLowerCase();\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_CaseInsensitive_Descending(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = a.Value.toLowerCase();\n\t\tvar valueB = b.Value.toLowerCase();\n\t\t//return direct comparison\n\t\treturn valueA > valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_Numeric(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Get_Number(a.Value, 0);\n\t\tvar valueB = Get_Number(b.Value, 0);\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_Numeric_Descending(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Get_Number(a.Value, 0);\n\t\tvar valueB = Get_Number(b.Value, 0);\n\t\t//return direct comparison\n\t\treturn valueA > valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_Time(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Parse_Time(a.Value, 0xffffffff);\n\t\tvar valueB = Parse_Time(b.Value, 0xffffffff);\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_Time_Descending(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Parse_Time(a.Value, 0xffffffff);\n\t\tvar valueB = Parse_Time(b.Value, 0xffffffff);\n\t\t//return direct comparison\n\t\treturn valueA > valueB ? -1 : 1;\n\t}\n\n\t//retrieve the object (ultragrid)\n\tvar theObject = header.UltraGrid;\n\t//initialise the cells we will use in the sort\n\tvar cellsToSort = [];\n\t//get our panel\n\tvar panel = header.Panel;\n\t//create our position \n\tvar nLeft = panel.Left + header.Rect.left;\n\tvar nRight = nLeft + header.Rect.width;\n\t//now we need to loop through all cells\n\tfor (var rows = theObject.Data.Cells.Rows, iRow = 0, cRow = rows.length; iRow < cRow; iRow++)\n\t{\n\t\t//marker for indicating we added for this row (some rows might not have a cell under this header)\n\t\tvar bAdd = true;\n\t\t//loop through all cells in the row\n\t\tfor (var cells = rows[iRow].Columns, iCell = 0, cCell = cells.length; iCell < cCell; iCell++)\n\t\t{\n\t\t\t//get the cell\n\t\t\tvar cell = cells[iCell];\n\t\t\t//get its panel\n\t\t\tvar cellPanel = cell.Panel;\n\t\t\t//create cell position \n\t\t\tvar nCellLeft = cellPanel.Left + cell.Rect.left;\n\t\t\tvar nCellRight = nCellLeft + cell.Rect.width;\n\t\t\t//is this cell under the header?\n\t\t\tif (nCellLeft <= nRight && nCellRight >= nLeft)\n\t\t\t{\n\t\t\t\t//we need the current value of the cell\n\t\t\t\tvar value;\n\t\t\t\t//we want text here, not data so check the class\n\t\t\t\tswitch (cell.DataObject.Class)\n\t\t\t\t{\n\t\t\t\t\tcase __NEMESIS_CLASS_EDIT:\n\t\t\t\t\tcase __NEMESIS_CLASS_COMBO_BOX:\n\t\t\t\t\t\t//use cell get data\n\t\t\t\t\t\tvalue = cell.GetData()[0];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t//get its caption\n\t\t\t\t\t\tvalue = Get_String(cell.Properties[__NEMESIS_PROPERTY_CAPTION], \"\").ToPlainText(cell.DataObject.Id);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//add this to the cells to sort\n\t\t\t\tcellsToSort.push({ Row: iRow, Value: value });\n\t\t\t\t//only one cell per row\n\t\t\t\tbAdd = false;\n\t\t\t\t//no need to proceed\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//still want to add?\n\t\tif (bAdd)\n\t\t{\n\t\t\t//add a fake entry to ensure all rows have been added\n\t\t\tcellsToSort.push({ Row: iRow, Value: \"\" });\n\t\t}\n\t}\n\t//now we need to sort the cells to sort\n\tswitch (sortData.SortType)\n\t{\n\t\tcase __ULTRAGRID_SORT_TYPE_STRING_SENSITIVE:\n\t\t\t//sort it\n\t\t\tcellsToSort.sort(bAscending ? _UltraGrid_Sort_Rows_CaseSensitive : _UltraGrid_Sort_Rows_CaseSensitive_Descending);\n\t\t\tbreak;\n\t\tcase __ULTRAGRID_SORT_TYPE_STRING_INSENSITIVE:\n\t\t\t//sort it\n\t\t\tcellsToSort.sort(bAscending ? _UltraGrid_Sort_Rows_CaseInsensitive : _UltraGrid_Sort_Rows_CaseInsensitive_Descending);\n\t\t\tbreak;\n\t\tcase __ULTRAGRID_SORT_TYPE_NUMBER:\n\t\t\t//sort it\n\t\t\tcellsToSort.sort(bAscending ? _UltraGrid_Sort_Rows_Numeric : _UltraGrid_Sort_Rows_Numeric_Descending);\n\t\t\tbreak;\n\t\tcase __ULTRAGRID_SORT_TYPE_DATE:\n\t\t\t//sort it\n\t\t\tcellsToSort.sort(bAscending ? _UltraGrid_Sort_Rows_Time : _UltraGrid_Sort_Rows_Time_Descending);\n\t\t\tbreak;\n\t}\n\t//now create a sort array\n\tvar sortedRows = [];\n\t//and fill it in\n\tfor (var i = 0, c = cellsToSort.length; i < c; i++)\n\t{\n\t\t//set the row\n\t\tsortedRows.push(cellsToSort[i].Row);\n\t}\n\t//and repaint the rows\n\tUltraGrid_Paint_SortedRows(theObject, sortedRows);\n}", "function sortByOnlineSales(){\n var sortColumn = 4;\n var tableData = document.getElementById(\"bookdata\").getElementsByTagName('tbody').item(0);\n var rowData = tableData.getElementsByTagName('tr'); \n for(var i = 0; i < rowData.length - 1; i++){\n for(var j = 0; j < rowData.length - (i + 1); j++){\n if(Number(rowData.item(j).getElementsByTagName('td').item(sortColumn).innerHTML === 'N')){\n tableData.insertBefore(rowData.item(j+1),rowData.item(j));\n }\n }\n }\n }", "function sortLessMoney() {\r\n data.sort((a, b) => a.money - b.money);\r\n updateDOM();\r\n}", "function sort_li(a, b) {\n console.log('in');\n an = Date.parse($(a).find('.col1').text());\n bn = Date.parse($(b).find('.col1').text());\n\n return bn < an ? 1 : -1;\n }", "function SortRecancilationReportGrid(event) {\n\n var url = \"/Reporting/ReconciliationReport\";\n var reportingTypeId = $(\"#hdReportType\").val();\n var date = ($(\"#txtFromDate\").val());\n var viewtype = $('#ddlViewType').val();\n if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) {\n url += \"?reportingTypeId=\" + reportingTypeId + \"&date=\" + date + \"&viewtype=\" + viewtype + \"&\" + event.data.msg;\n }\n $.ajax({\n type: \"POST\",\n url: url,\n async: false,\n contentType: \"application/json; charset=utf-8\",\n dataType: \"html\",\n data: null,\n success: function (data) {\n $(\"#ReportingGrid\").empty();\n $(\"#ReportingGrid\").html(data);\n\n },\n error: function (msg) {\n }\n });\n}", "function resort(){\n if(scope.sorting && scope.sorting.obj){\n var sortKey = scope.sorting.obj.field;\n sorter(sortKey,scope.sorting.direction);\n }\n }", "function resort(){\n if(scope.sorting && scope.sorting.obj){\n var sortKey = scope.sorting.obj.field;\n sorter(sortKey,scope.sorting.direction);\n }\n }", "function sortData(){\n setUpDefects();\n\n //initialise the packhouse data arrays\n packhouse1_Data = new Array(defects.length+1).join('0').split('').map(parseFloat);\n packhouse2_Data = new Array(defects.length+1).join('0').split('').map(parseFloat);\n packhouse3_Data = new Array(defects.length+1).join('0').split('').map(parseFloat);\n\n for (var i = 0; i < currentData.Items.length; i++) {\n var currentItem = currentData.Items[i];\n\n var fruitVariety = currentItem.payload.Data.PackRun.FruitVariety;\n var packhouse = currentItem.payload.Data.PackRun.Packhouse;\n var defect = currentItem.payload.Data.Defects[0];\n var fruitDate = currentItem.payload.Data.PackRun.StartTime;\n\n\n\n dateStr = fruitDate.split(\"T\");\n dateArr = dateStr[0].split(\"-\");\n yy = parseInt(dateArr[0]);\n mm = parseInt(dateArr[1]);\n dd = parseInt(dateArr[2]);\n\n if (withinDate(dd, mm, yy) && (selectedFruitVariety == fruitVariety)){\n\n if (packhouse == packhouse1_Name) {\n currTally = packhouse1_Data;\n } else if (packhouse == packhouse2_Name) {\n currTally = packhouse2_Data;\n } else if (packhouse == packhouse3_Name) {\n currTally = packhouse3_Data;\n } else {\n currTally = null;\n }\n\n if ((currTally != null) && (defects.length != 0)) {\n for (var j = 0; j < defects.length; j++) {\n if(defects[j] == defect){\n currTally[j] = currTally[j] + 1;\n }\n }\n }\n }\n }\n\n if (isPercentageData){\n makePercentage([packhouse1_Data, packhouse2_Data, packhouse3_Data]);\n }\n\n drawGraph();\n }", "function orderByYear(data){\n return data.slice(0).sort(function(a,b){\n if(a.year - b.year == 0 ){\n if (a.title.toLowerCase() > b.title.toLowerCase()){\n return 1\n }else if (a.title.toLowerCase() < b.title.toLowerCase()){\n return -1\n }else{\n return 0\n }\n }else{\n return a.year - b.year\n }\n })\n}", "function sortTable() {\n const col = this.dataset.colname;\n const order = this.dataset.order;\n const nameCapi = col.charAt(0).toUpperCase() + col.slice(1);\n\n if (col == 'birthdate') {\n // for date sorting\n\n if (order == 'desc') {\n this.dataset.order = 'asc';\n this.innerHTML = `${nameCapi} &#9660`;\n tableData = tableData.sort((a, b) =>\n new Date(a[col]) > new Date(b[col]) ? 1 : -1\n );\n } else {\n this.dataset.order = 'desc';\n this.innerHTML = `${nameCapi} &#9650`;\n tableData = tableData.sort((a, b) =>\n new Date(a[col]) < new Date(b[col]) ? 1 : -1\n );\n }\n }\n // string & number sorting\n else if (order == 'desc') {\n this.dataset.order = 'asc';\n this.innerHTML = `${nameCapi} &#9660`;\n tableData = tableData.sort((a, b) => (a[col] > b[col] ? 1 : -1));\n } else {\n this.dataset.order = 'desc';\n this.innerHTML = `${nameCapi} &#9650`;\n tableData = tableData.sort((a, b) => (a[col] < b[col] ? 1 : -1));\n }\n\n buildTable(tableData);\n}", "function sortTable(column){\n\n}", "function sortMapByDate(){\n let aMap1 = sortedGames;\n aMap1.sort( compareReleaseDate );\n}", "get sortedData() {\n // server-side sorting\n if (this.hasPager) return this.data;\n\n // client-side sorting\n let data = this.data\n\n let col_index = this.formattedColumns.findIndex(col => col.isSorted)\n if (col_index >= 0) {\n let re = /^[0-9.]+$/;\n data.sort(function(a, b) {\n a = a.data[col_index].value;\n b = b.data[col_index].value;\n if (re.test(a) && re.test(b)) {\n a = parseFloat(a, 10);\n b = parseFloat(b, 10);\n }\n return (a > b) ? 1 : -1;\n });\n if (this.pager.reverse) data.reverse()\n }\n return data;\n }", "function sortCovid(records){\n records.sort( (fel, sel)=> {\n let fprio = (fel.infeccion && fel.infeccion.fets_confirma) || (fel.sisaevent && fel.sisaevent.fets_reportado) || fel.fenotif_tsa || fel.fecomp_tsa;\n let sprio = (sel.infeccion && sel.infeccion.fets_confirma) || (sel.sisaevent && sel.sisaevent.fets_reportado) || sel.fenotif_tsa || sel.fecomp_tsa;\n\n if(fprio < sprio ) return -1;\n\n else if(fprio > sprio ) return 1;\n\n else{\n return 0;\n }\n })\n}", "sortData(type, column) {\n if (type !== \"none\" && type !== false) {\n let temp = this.tbody.slice();\n for (let i = 0; i < temp.length; i++) {\n temp[i].unshift(temp[i][column]);\n }\n if (type === \"asc\") {\n temp.sort();\n } else {\n temp.reverse();\n }\n for (let i = 0; i < temp.length; i++) {\n this.set(\"tbody.\" + i, []);\n this.set(\"tbody.\" + i, temp[i].slice(1));\n }\n } else {\n let temp = this.tbody.slice();\n for (let i = 0; i < temp.length; i++) {\n this.set(\"data.\" + (i + 1), []);\n this.set(\"data.\" + (i + 1), temp[i].slice());\n }\n }\n }", "function orderByYear(peliculas) {\n const sortedPeliculas = [...peliculas];\n sortedPeliculas.sort((a, b) => {\n if (a.year - b.year)\n return a.year - b.year\n else {\n if (a.title < b.title) return -1\n else if (a.title > b.title) return 1\n else return 0\n }\n })\n return sortedPeliculas\n}", "function sortColumn1_step4() {\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = ss.getSheets()[2];\n var lastRow = sheet.getLastRow();\n var lastCol = sheet.getLastColumn();\n var range = sheet.getRange(2, 1, lastRow, lastCol);\n range.sort({column: 1, ascending: true});\n}", "function orderByYear() {\n \n}", "function sortBySales(){\n var sortColumn = 3;\n var tableData = document.getElementById(\"bookdata\").getElementsByTagName('tbody').item(0);\n var rowData = tableData.getElementsByTagName('tr'); \n for(var i = 0; i < rowData.length - 1; i++){\n for(var j = 0; j < rowData.length - (i + 1); j++){\n if(Number(rowData.item(j).getElementsByTagName('td').item(sortColumn).innerHTML.replace(/[^0-9\\.]+/g, \"\")) < Number(rowData.item(j+1).getElementsByTagName('td').item(sortColumn).innerHTML.replace(/[^0-9\\.]+/g, \"\"))){\n tableData.insertBefore(rowData.item(j+1),rowData.item(j));\n }\n }\n }\n }", "static Sorting(plotData,filteredData,chosenMetric) {\n let array = filteredData.map(e=>[e,plotData[e].metrics[chosenMetric]]);\n array.sort((a,b)=>b[1]-a[1]);\n return array.map(e => e[0]);\n }", "function UltraGrid_InitialseHeaderSortsRows(theObject)\n{\n\t//create an empty map\n\tvar map = {};\n\t//retrieve the property\n\tvar stringProperty = theObject.Properties[__NEMESIS_PROPERTY_SORTEABLE_COLUMNS];\n\t//valid?\n\tif (!String_IsNullOrWhiteSpace(stringProperty))\n\t{\n\t\tvar data = false;\n\t\t//parse it into json\n\t\ttry { data = JSON.parse(stringProperty); } catch (error) { Common_Error(error.message); }\n\t\t//valid templates?\n\t\tif (data)\n\t\t{\n\t\t\t//get the initial sort\n\t\t\tvar initialSort = data.InitialSort;\n\t\t\t//get sorteables from this\n\t\t\tdata = data.Sorteables;\n\t\t\t//valid?\n\t\t\tif (data)\n\t\t\t{\n\t\t\t\t//loop through them\n\t\t\t\tfor (var iSelects = 0, cSelects = data.length; iSelects < cSelects; iSelects++)\n\t\t\t\t{\n\t\t\t\t\t//get the sort data\n\t\t\t\t\tvar sortData =\n\t\t\t\t\t{\n\t\t\t\t\t\tSortType: data[iSelects].SortType,\n\t\t\t\t\t\tTriggerOnIcon: data[iSelects].TriggerType,\n\t\t\t\t\t\tSortedIcon: null,\n\t\t\t\t\t\tUnsortedIcon: null,\n\t\t\t\t\t\tAscendingIcon: null,\n\t\t\t\t\t\tDescendingIcon: null\n\t\t\t\t\t};\n\t\t\t\t\t//validate sort type\n\t\t\t\t\tswitch (sortData.SortType)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"StrCmp\":\n\t\t\t\t\t\t\t//use string compare type\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_STRING_SENSITIVE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"StrICmp\":\n\t\t\t\t\t\t\t//use string insensitive\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_STRING_INSENSITIVE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"Number\":\n\t\t\t\t\t\t\t//use number\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_NUMBER;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"DateTime\":\n\t\t\t\t\t\t\t//use date\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_DATE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//fail this (will just show the icon, if any, for decorative purposes)\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_NONE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//validate trigger type\n\t\t\t\t\tswitch (sortData.TriggerOnIcon)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"Icon\":\n\t\t\t\t\t\t\t//set only on icon\n\t\t\t\t\t\t\tsortData.TriggerOnIcon = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//set all header\n\t\t\t\t\t\t\tsortData.TriggerOnIcon = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//get icons\n\t\t\t\t\tvar icons = data[iSelects].Icons;\n\t\t\t\t\t//has icons?\n\t\t\t\t\tif (icons)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get sorted icon\n\t\t\t\t\t\tvar icon = icons.SortedIcon;\n\t\t\t\t\t\t//validate icon\n\t\t\t\t\t\tif (icon && !/^none$/i.test(icon.Icon))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the icon\n\t\t\t\t\t\t\tsortData.SortedIcon = { Icon: icon.Icon, Position: null };\n\t\t\t\t\t\t\t//we have an icon, check its position\n\t\t\t\t\t\t\tif (/^-?\\d+,-?\\d+,\\d+,\\d+$/.test(icon.Position))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//break this into numbers\n\t\t\t\t\t\t\t\tvar numbers = icon.Position.split(\",\");\n\t\t\t\t\t\t\t\t//convert them\n\t\t\t\t\t\t\t\tsortData.SortedIcon.Position = new Position_Rect(Get_Number(numbers[0]), Get_Number(numbers[1]), Get_Number(numbers[2]), Get_Number(numbers[3]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//get unsorted icon\n\t\t\t\t\t\ticon = icons.UnsortedIcon;\n\t\t\t\t\t\t//validate icon\n\t\t\t\t\t\tif (icon && !/^none$/i.test(icon.Icon))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the icon\n\t\t\t\t\t\t\tsortData.UnsortedIcon = { Icon: icon.Icon, Position: null };\n\t\t\t\t\t\t\t//we have an icon, check its position\n\t\t\t\t\t\t\tif (/^-?\\d+,-?\\d+,\\d+,\\d+$/.test(icon.Position))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//break this into numbers\n\t\t\t\t\t\t\t\tnumbers = icon.Position.split(\",\");\n\t\t\t\t\t\t\t\t//convert them\n\t\t\t\t\t\t\t\tsortData.UnsortedIcon.Position = new Position_Rect(Get_Number(numbers[0]), Get_Number(numbers[1]), Get_Number(numbers[2]), Get_Number(numbers[3]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//get ascending icon\n\t\t\t\t\t\ticon = icons.AscendingIcon;\n\t\t\t\t\t\t//validate icon\n\t\t\t\t\t\tif (icon && !/^none$/i.test(icon.Icon))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the icon\n\t\t\t\t\t\t\tsortData.AscendingIcon = { Icon: icon.Icon, Position: null, ShowAlways: icon.ShowAlways };\n\t\t\t\t\t\t\t//we have an icon, check its position\n\t\t\t\t\t\t\tif (/^-?\\d+,-?\\d+,\\d+,\\d+$/.test(icon.Position))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//break this into numbers\n\t\t\t\t\t\t\t\tnumbers = icon.Position.split(\",\");\n\t\t\t\t\t\t\t\t//convert them\n\t\t\t\t\t\t\t\tsortData.AscendingIcon.Position = new Position_Rect(Get_Number(numbers[0]), Get_Number(numbers[1]), Get_Number(numbers[2]), Get_Number(numbers[3]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//get descending icon\n\t\t\t\t\t\ticon = icons.DescendingIcon;\n\t\t\t\t\t\t//validate icon\n\t\t\t\t\t\tif (icon && !/^none$/i.test(icon.Icon))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the icon\n\t\t\t\t\t\t\tsortData.DescendingIcon = { Icon: icon.Icon, Position: null, ShowAlways: icon.ShowAlways };\n\t\t\t\t\t\t\t//we have an icon, check its position\n\t\t\t\t\t\t\tif (/^-?\\d+,-?\\d+,\\d+,\\d+$/.test(icon.Position))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//break this into numbers\n\t\t\t\t\t\t\t\tnumbers = icon.Position.split(\",\");\n\t\t\t\t\t\t\t\t//convert them\n\t\t\t\t\t\t\t\tsortData.DescendingIcon.Position = new Position_Rect(Get_Number(numbers[0]), Get_Number(numbers[1]), Get_Number(numbers[2]), Get_Number(numbers[3]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//get header id\n\t\t\t\t\tvar headerId = data[iSelects].HeaderId;\n\t\t\t\t\t//we need to get the headers for this\n\t\t\t\t\tvar headers = headerId == \"-1\" ? theObject.Data.Headers.Cells : UltraGrid_GetCellsFromSetIds(theObject, headerId);\n\t\t\t\t\t//loop through the headers\n\t\t\t\t\tfor (var iHeader = 0, cHeader = headers.length; iHeader < cHeader; iHeader++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//retrieve the real header\n\t\t\t\t\t\tvar header = headers[iHeader];\n\t\t\t\t\t\t//create a specific data for this one (we need to also store its state)\n\t\t\t\t\t\tvar headerData =\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSortType: sortData.SortType,\n\t\t\t\t\t\t\tTriggerOnIcon: sortData.TriggerType,\n\t\t\t\t\t\t\tSortedIcon: sortData.SortedIcon,\n\t\t\t\t\t\t\tUnsortedIcon: sortData.UnsortedIcon,\n\t\t\t\t\t\t\tAscendingIcon: sortData.AscendingIcon,\n\t\t\t\t\t\t\tDescendingIcon: sortData.DescendingIcon,\n\t\t\t\t\t\t\tSorted: false,\n\t\t\t\t\t\t\tAscending: false\n\t\t\t\t\t\t};\n\t\t\t\t\t\t//put it in the map\n\t\t\t\t\t\tmap[header.UltraGridId] = headerData;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//has initial sort?\n\t\t\tif (initialSort && initialSort.HeaderId)\n\t\t\t{\n\t\t\t\t//we need to get the headers for this\n\t\t\t\theaders = initialSort.HeaderId == \"-1\" ? theObject.Data.Headers.Cells : UltraGrid_GetCellsFromSetIds(theObject, initialSort.HeaderId);\n\t\t\t\t//we only care about one\n\t\t\t\tif (headers && headers.length > 0)\n\t\t\t\t{\n\t\t\t\t\t//get the header\n\t\t\t\t\theader = headers[0];\n\t\t\t\t\t//mark it as selected\n\t\t\t\t\tmap[header.UltraGridId].Sorted = true;\n\t\t\t\t\t//set ascending\n\t\t\t\t\tmap[header.UltraGridId].Ascending = Get_Bool(initialSort.Ascending, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//return the result\n\treturn map;\n}", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "function clickedColumnSorter(aTableRow, bTableRow, type) {\n\t\tvar aContent = getFirstTextFromCell(aTableRow, columnIndex).toLowerCase();\n\t\tvar bContent = getFirstTextFromCell(bTableRow, columnIndex).toLowerCase();\n\n\t\tvar aExtractedContent = numericStringTools.extractNumbersIfPresent(aContent);\n\t\tvar bExtractedContent = numericStringTools.extractNumbersIfPresent(bContent);\n\n\t\tif (type === 'time') {\n\t\t\tvar now = new Date();\n\n\t\t\tvar aFullDate = now.toDateString() + ' ' + aContent.slice(0, 5) + ' ' + aContent.slice(-2);\n\t\t\tvar bFullDate = now.toDateString() + ' ' + bContent.slice(0, 5) + ' ' + bContent.slice(-2);\n\n\t\t\taExtractedContent = Date.parse(aFullDate);\n\t\t\tbExtractedContent = Date.parse(bFullDate);\n\t\t}\n\t\tvar directionComparer = shouldSortAscending ? ascendingComparer : descendingComparer;\n\n\t\treturn comparer(directionComparer, aExtractedContent, bExtractedContent);\n\t}", "get sortedData() {\n // server-side sorting\n if (this.hasPager) return this.data;\n\n // client-side sorting\n let data = this.data.toArray()\n\n let col_index = this.formattedColumns.findIndex(col => col.isSorted)\n if (col_index >= 0) {\n let re = /^[0-9.]+$/;\n data.sort(function(a, b) {\n a = a.data[col_index].value;\n b = b.data[col_index].value;\n if (re.test(a) && re.test(b)) {\n a = parseFloat(a, 10);\n b = parseFloat(b, 10);\n }\n return (a > b) ? 1 : -1;\n });\n if (this.pager.reverse) {\n data.reverseObjects();\n }\n }\n return data;\n }", "function sortEntries() {\n entries.sort((a, b) => (new Date(a.date).getTime() - new Date(b.date).getTime()));\n}", "function sortBar(a, b) {\r\n return x0(year(a)) - x0(year(b));\r\n}", "sorting(e) {\n const selected = e.target.value.split(' ');\n switch (selected[0]) {\n case 'Premium': let sort = [];\n if (selected[1] === 'High') {\n sort = this.state.originalData.sort(function (a, b) {\n // subtract the two amountValue \n // to get a value that is either negative, positive, or zero.\n return b.totalAmount.amountValue - a.totalAmount.amountValue;\n });\n } else {\n sort = this.state.originalData.sort(function (a, b) {\n // subtract the two amountValue \n // to get a value that is either negative, positive, or zero.\n return a.totalAmount.amountValue - b.totalAmount.amountValue;\n });\n }\n this.setState({ originalData: sort })\n break;\n case 'Created': if (selected[1] === 'High') {\n sort = this.state.originalData.sort(function (a, b) {\n // Turn your strings into dates, and then subtract them\n // to get a value that is either negative, positive, or zero.\n return new Date(b.plan.createdAt) - new Date(a.plan.createdAt);\n });\n } else {\n sort = this.state.originalData.sort(function (a, b) {\n // Turn your strings into dates, and then subtract them\n // to get a value that is either negative, positive, or zero.\n return new Date(a.plan.createdAt) - new Date(b.plan.createdAt);\n });\n }\n this.setState({ originalData: sort })\n break;\n }\n }", "filterByDate(type) {\n if (this.order === \"ASC\" && type === \"DESC\") {\n this.list = this.list.sort(this._dateDifDESC.bind(this));\n } else if (this.order === \"DESC\" && type === \"ASC\") {\n this.list = this.list.sort(this._dateDifASC.bind(this));\n }\n }", "sort(column) {\n this.sortColumn = column.header;\n switch (this.sortClass) {\n case 'descending':\n this.sortClass = 'ascending';\n this.criteria.order = '-' + column.field;\n break;\n\n default:\n this.sortClass = 'descending';\n this.criteria.order = column.field;\n break;\n }\n\n return this.updateData();\n }", "function sortByDate() {\n return articles.sort(function(a, b) {\n let x = new Date(a.published_at).getTime();\n let y = new Date(b.published_at).getTime();\n if (x < y){\n return -1; \n } else if (y > x){\n return 1;\n } else {\n return 0\n }\n });\n}", "function filterRank() {\n\n // sort by d.salesTotal, highest to lowest\n var sortedData = filteredData.sort(function(a,b){\n return parseInt(b.salesTotal) - parseInt(a.salesTotal);\n });\n //console.log(sortedData);\n\n var rankData = sortedData.filter(function(d,i){\n return i < parseInt(numDisp);\n });\n return rankData;\n}", "function sortByCreationDate() {\n let nodes = document.querySelectorAll('.bookCard')\n nodes.forEach((node) => {\n node.style.order = 'initial'\n })\n}", "function sortFunction(arrTemp,orderAsc,sortElementType){\r\n var temp ;\r\n var value1;\r\n var value2;\r\n \r\n // alert(\"in sortFunction\");\r\n \r\n for(i=0;i<arrTemp.length;i++){\r\n\t\t for(j=0;j<arrTemp.length-1;j++){\r\n\t\t\t \r\n\t\t\t //extract value depedning on data type\r\n\t\t\t if(sortElementType=='N'){\r\n\r\n\t\t\t\t \tif(arrTemp[j][0] == \"\"){\r\n\t\t\t\t\t\tvalue1 = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t {\r\n\t\t\t\t\t\tvalue1 = eval(arrTemp[j][0]);\r\n\t\t\t\t }\r\n\t\t\t\t\tif(arrTemp[j+1][0] == \"\"){\r\n\t\t\t\t\t\tvalue2 = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t {\r\n\t\t\t\t\t\tvalue2 = eval(arrTemp[j+1][0]);\r\n\t\t\t\t }\r\n\r\n\t\t\t\t \r\n\r\n\t\t\t }\r\n\t\t\t else if (sortElementType == 'D'){\r\n\t\t\t\t\tdataVal1 = convertDateFormat(arrTemp[j][0])\r\n\t\t\t\t\tdataVal2 = convertDateFormat(arrTemp[j+1][0])\r\n\t\t\t\t\tif(dataVal1 == \"\"){\r\n\t\t\t\t\t\tdataVal1 = \"01/01/1900\"\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(dataVal2 == \"\"){\r\n\t\t\t\t\t\tdataVal2 = \"01/01/1900\"\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvalue1 = new Date(dataVal1);\r\n\t\t\t\t\tvalue2 = new Date(dataVal2);\r\n\t\t\t }\r\n\t\t\t else if (sortElementType == 'A'){\r\n\t\t\t\t // alert('proper call to sort A Function');\r\n\t\t\t\t value1 = arrTemp[j][0];\r\n\t\t\t\t // alert(value1);\r\n\t\t\t\t value2 = arrTemp[j+1][0];\r\n\t\t\t\t value1 = value1.toUpperCase();\r\n\t\t\t\t value2 = value2.toUpperCase();\r\n\t\t\t\t if(value1 == \"\"){\r\n\t\t\t\t\t value1 = \"zzzzzzzzzzzzzzzzzzzz\";\r\n\t\t\t\t }\r\n\t\t\t\t if(value2 == \"\"){\r\n\t\t\t\t\t value2 = \"zzzzzzzzzzzzzzzzzzzz\";\r\n\t\t\t\t }\r\n\t\t\t\t // alert(value2);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t//\t alert('Improper call to sort Function');\r\n\t\t\t\t return false;\r\n\t\t\t }\r\n\r\n\t\t\tif(sortElementType=='N'){\r\n\t\t\t\tif(value1!=value2){\r\n\t\t\t\t\tif(orderAsc && (value1 < value2)){\r\n\t\t\t\t\t\ttemp = arrTemp[j];\r\n\t\t\t\t\t\tarrTemp[j] = arrTemp[j+1];\r\n\t\t\t\t\t\tarrTemp[j+1] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!orderAsc && (value1 > value2)){\r\n\t\t\t\t\t\ttemp = arrTemp[j];\r\n\t\t\t\t\t\tarrTemp[j] = arrTemp[j+1];\r\n\t\t\t\t\t\tarrTemp[j+1] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//return;\r\n\t\t\t}\r\n\r\n\t\t\t //apply interchange of data elements to sort in order\r\n\t\t\t if(value1!=value2 && sortElementType!='N')\r\n\t\t\t\t {\r\n\t\t\t\t\t\t//alert(value1 + ':::' + value2);\r\n\t\t\t\t\t if(orderAsc && ((value1 < value2)||((value1=='')&&(value2!=''))))\r\n\t\t\t\t\t{\r\n\t\t\t//\t\t\t alert('interchanging');\r\n\r\n\t\t\t///\t\t\t alert('j b4 changing' + arrTemp[j]);\r\n\t\t\t//\t\t\t alert('j + 1 b4 changing' + arrTemp[j + 1]);\r\n\t\t\t\t\t\ttemp = arrTemp[j];\r\n\t\t\t\t\t\tarrTemp[j] = arrTemp[j+1];\r\n\t\t\t\t\t\tarrTemp[j+1] = temp;\r\n\t\t\t\t//\t\talert('j after changing' + arrTemp[j]);\r\n\t\t\t\t//\t\talert('j + 1 after changing' +arrTemp[j + 1]);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t if(!orderAsc && ((value1 > value2)||(value1=='')&&(value2!='')))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttemp = arrTemp[j];\r\n\t\t\t\t\t\tarrTemp[j] = arrTemp[j+1]\r\n\t\t\t\t\t\tarrTemp[j+1] = temp;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t}\r\n\r\n//\talert('Leaving sort Function');\r\n\r\n}", "sortDatabyViews(data) {\r\n data.sort((a,b) => {\r\n if (a.totalClicks > b.totalClicks) return -1;\r\n if (a.totalClicks < b.totalClicks) return 1;\r\n return 0;\r\n });\r\n return data;\r\n }", "function sortArrayByDate(array){\n let arrSort = array.sort(function(a, b){ if(a.Data > b.Data){ return -1 } return 1 });\n return arrSort;\n}", "sortedRankings ({ rankings, sortBy }) {\n const { field, order } = sortBy\n const sortComparator = (a, b) => {\n if (order === 'asc') {\n return a.stats[field] - b.stats[field]\n }\n return b.stats[field] - a.stats[field]\n }\n return rankings.sort(sortComparator)\n }", "function sortByYear\n(\n array\n) \n{\n return array.sort(function(a,b)\n {\n var x = parseInt(a.number.split('-')[1]);\n var y = parseInt(b.number.split('-')[1]);\n return ((x < y) ? -1 : ((x > y) ? 0 : 1));\n }).reverse();\n}", "function sort_li(a, b) {\n an = Date.parse($(a).find('.col2').text());\n bn = Date.parse($(b).find('.col2').text());\n\n return bn < an ? 1 : -1;\n }", "function sortLogRow(rowDataValues) {\n var sortedDataValues = rowDataValues;\n sortedDataValues[0][DATE_I] = new Date();\n sortedDataValues[0][SKU_I] = \"\";\n sortedDataValues[0][DESC_I] = rowDataValues[0][LOG_DESC_I]; \n sortedDataValues[0][COA_I] = \"\";\n sortedDataValues[0][EXP_I] = rowDataValues[0][LOG_EXP_I]; \n sortedDataValues[0][QTY_I] = rowDataValues[0][LOG_QTY_I]; \n sortedDataValues[0][PACK_I] = rowDataValues[0][LOG_PACK_I]; \n sortedDataValues[0][SECTION_I] = \"\";\n sortedDataValues[0][LOT_I] = rowDataValues[0][LOG_LOT_I];\n sortedDataValues[0][VENDOR_I] = rowDataValues[0][LOG_VENDOR_I]; \n sortedDataValues[0][PRICE_I] = rowDataValues[0][LOG_PRICE_I]; \n sortedDataValues[0][POJOB_I] = rowDataValues[0][LOG_PO_I]; \n sortedDataValues[0][COMMENT_I] = rowDataValues[0][LOG_COMMENT_I]; \n sortedDataValues[0][COMPONENT_I] = \"\";\n sortedDataValues[0].splice(15, 5);\n \n Logger.log(sortedDataValues[0]);\n return sortedDataValues;\n}", "function sortJudging() {\n var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();\n var rankingSheet = spreadsheet.getSheetByName('Rankings');\n var middleSheet = spreadsheet.getSheetByName('MiddleRanking');\n var hsSheet = spreadsheet.getSheetByName('HSRanking');\n\n rankTeams(rankingSheet, middleSheet, 5, 19)\n rankTeams(rankingSheet, hsSheet, 20, 56)\n}", "function sortbylabel(rORc,i,sortOrder){\n var t = svg.transition().duration(3000);\n var log2r=[];\n var sorted; // sorted is zero-based index\n d3.selectAll(\".c\"+rORc+i) \n .filter(function(ce){\n log2r.push(ce.value);\n })\n ;\n if(rORc==\"r\"){ // sort log2ratio of a gene\n sorted=d3.range(col_number).sort(function(a,b){ if(sortOrder){ return log2r[b]-log2r[a];}else{ return log2r[a]-log2r[b];}});\n t.selectAll(\".cell\")\n .attr(\"x\", function(d) { return sorted.indexOf(d.col-1) * cellSize; })\n ;\n t.selectAll(\".colLabel\")\n .attr(\"y\", function (d, i) { return sorted.indexOf(i) * cellSize; })\n ;\n }else{ // sort log2ratio of a contrast\n sorted=d3.range(row_number).sort(function(a,b){if(sortOrder){ return log2r[b]-log2r[a];}else{ return log2r[a]-log2r[b];}});\n t.selectAll(\".cell\")\n .attr(\"y\", function(d) { return sorted.indexOf(d.row-1) * cellSize; })\n ;\n t.selectAll(\".rowLabel\")\n .attr(\"y\", function (d, i) { return sorted.indexOf(i) * cellSize; })\n ;\n }\n }" ]
[ "0.680611", "0.67671496", "0.6370093", "0.6266206", "0.6251742", "0.6240144", "0.6144035", "0.61390495", "0.6072873", "0.59748936", "0.5972378", "0.5967003", "0.59616387", "0.594454", "0.59426844", "0.59377426", "0.5931969", "0.5925862", "0.59247744", "0.5923642", "0.5889181", "0.5879893", "0.5867066", "0.5861218", "0.5852328", "0.5829888", "0.5803883", "0.57801026", "0.57769454", "0.5765373", "0.5764297", "0.5763852", "0.57566506", "0.5740182", "0.57303613", "0.57003933", "0.569369", "0.5686799", "0.5680152", "0.5673051", "0.56629217", "0.56520826", "0.56269294", "0.5626416", "0.5626416", "0.5622421", "0.56183237", "0.5617021", "0.5611953", "0.5606517", "0.56032664", "0.56022286", "0.5596157", "0.5594787", "0.5580688", "0.55725825", "0.5565892", "0.5547437", "0.55430394", "0.55410117", "0.5536427", "0.55305225", "0.5513893", "0.55134314", "0.5512581", "0.5510994", "0.5510994", "0.5506815", "0.55032605", "0.54825425", "0.5481162", "0.5480735", "0.547726", "0.5473901", "0.5470909", "0.5469292", "0.54672897", "0.5462044", "0.5461329", "0.5441773", "0.5440645", "0.54398525", "0.54320914", "0.540194", "0.53963304", "0.5390542", "0.5388876", "0.5386198", "0.5383184", "0.5380986", "0.53718495", "0.5367025", "0.5360801", "0.5352527", "0.5350098", "0.53406733", "0.5340559", "0.53402865", "0.5337244", "0.53336394", "0.53287554" ]
0.0
-1
Sort Collection Report Report GridBy krishna on 21082015
function SortCollectionLogtGrid(event) { //var reportingType = $("#hdReportType").val(); //var corporateId = $("#CorporateId").val(); var url = "/Reporting/SortCollectionLogtGrid"; var fromDate = ($("#txtFromDate").val()); var tillDate = ($("#txtTillDate").val()); var isAll = $('#ShowAllRecords').prop('checked') ? true : false; //var userId = $("#ddlUsers").val(); if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) { url += "?fromDate=" + fromDate + "&tillDate=" + tillDate + "&isAll=" + isAll + "&" + event.data.msg; } $.ajax({ type: "POST", url: url, async: false, contentType: "application/json; charset=utf-8", dataType: "html", data: null, success: function (data) { ; $("#ReportingGrid").empty(); $("#ReportingGrid").html(data); //ReportingGrid }, error: function (msg) { } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sorted(sheet){\n sheet.sort(masterCols.end_time+1).sort(masterCols.start_time+1).sort(masterCols.date+1);\n}", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "function sorte ( i ){\n return function(){\n if(scope.sorting.obj){\n //var index = _.findIndex(scope.viewer, scope.sorting.obj);\n }\n var key = scope.headers[i].field;\n if(scope.sorting.field === key){\n scope.sorting.direction = scope.sorting.direction * -1;\n }else{\n scope.sorting.field = key;\n scope.sorting.direction = 1;\n }\n sorter(key,scope.sorting.direction);\n scope.sorting.obj = scope.headers[i];\n scope.buildTable();\n\n };\n }", "repeaterOnSort() {\n }", "function sortRenderOrder() {\n \n var sortBy = function(field, reverse, primer){\n var key = primer ? function(x) {return primer(x[field])} : function(x) {return x[field]};\n reverse = [-1, 1][+!!reverse];\n return function (a, b) {\n\treturn a = key(a), b = key(b), reverse * ((a > b) - (b > a));\n } \n }\n \n gadgetRenderOrder.sort(sortBy(\"tabPos\", true, parseInt));\n gadgetRenderOrder.sort(sortBy(\"paneId\", true, parseInt));\n gadgetRenderOrder.sort(sortBy(\"parentColumnId\", true, parseInt));\n }", "function theQwertyGrid_sortInt(key) {\n\t\t\tif(_theQwertyGrid_sortInAsc) {\n\t\t\t\t_theQwertyGrid_sortInAsc = false;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(a,b) {\n\t\t\t\t\treturn a[key] - b[key];\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_theQwertyGrid_sortInAsc = true;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(b,a) {\n\t\t\t\t\treturn a[key] - b[key];\n\t\t\t\t});\n\t\t\t}\n\t\t\ttheQwertyGrid_reFillTable(_theQwertyGrid_displayData);\n\t\t\t\n\t\t}", "sortData() {\n this.data.sort(($val1, $val2 ) => {\n const a = JSON.stringify($val1[this.sortBy]);\n const b = JSON.stringify($val2[this.sortBy]);\n if ( a < b ){\n return -this.sortDir;\n }\n if ( a > b ){\n return this.sortDir;\n }\n return 0;\n });\n }", "function sortArrayAsc(index){\n console.log(\"Display before sort: \", displayArray);\n // switch/case based on asc button index\n switch (index) {\n case 0:\n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyName.toLowerCase();\n var y = b.property[1].propertyName.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 1: \n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyAddress.toLowerCase();\n var y = b.property[1].propertyAddress.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 2: \n displayArray.sort(function (a,b) { \n var x = a.property[1].propertyNeighborhood.toLowerCase();\n var y = b.property[1].propertyNeighborhood.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 3: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.property[1].propertySquareFoot);\n var y = parseInt(b.property[1].propertySquareFoot);\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 4: \n displayArray.sort(function (a,b) { \n var x = a.workspaceType.toLowerCase();\n var y = b.workspaceType.toLowerCase();\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 5: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.dateAvailable.replace(/[-,]+/g, \"\"));\n var y = parseInt(b.dateAvailable.replace(/[-,]+/g, \"\"));\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 6: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.price.replace(/[$,]+/g, \"\"));\n var y = parseInt(b.price.replace(/[$,]+/g, \"\"));\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 7: \n displayArray.sort(function (a,b) {\n function leaseConvert(value){\n switch (value){\n case \"day\":\n return 1;\n case \"week\":\n return 7;\n case \"month\":\n return 30;\n }\n } \n var x = leaseConvert(a.leaseLength.toLowerCase());\n var y = leaseConvert(b.leaseLength.toLowerCase());\n \n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n case 8: \n displayArray.sort(function (a,b) { \n var x = parseInt(a.numberOfSeats);\n var y = parseInt(b.numberOfSeats);\n if (x < y) return -1;\n if (x > y) return 1;\n return 0; \n });\n break;\n };\n \n \n console.log(\"Display after sort: \", displayArray)\n }", "function Sort() {}", "function sortCollectionByDate(collection){\n\treturn collection.sort(function(a, b){\n\t\tif(a[year] < b[year]) return -1;\n\t\tif(a[year] > b[year]) return 1;\n\t\treturn 0;\n\t});\n}", "render(table) {\n console.log('Applying 3rd partys better sort.');\n }", "function sort(){\n var toSort = S('#sched-list').children;\n toSort = Array.prototype.slice.call(toSort, 0);\n\n toSort.sort(function(a, b) {\n var a_ord = +a.id.split('e')[1]; //id tags of the schedule items are timeINT the INT = the numeric time\n var b_ord = +b.id.split('e')[1]; //splitting at 'e' and getting the element at index 1 gives use the numeric time\n\n return (a_ord > b_ord) ? 1 : -1;\n });\n\n var parent = S('#sched-list');\n parent.innerHTML = \"\";\n\n for(var i = 0, l = toSort.length; i < l; i++) {\n parent.appendChild(toSort[i]);\n }\n }", "function changeSort(sortOn) {\n var sortedBy = portfolioGrid.getSortField();\n if (sortOn == sortedBy) {\n if (direction == false) {\n direction = true;\n document.getElementById(\"img_\" + sortOn).src = \"images/down.gif\";\n } else if (direction == true) {\n direction = null;\n document.getElementById(\"img_\" + sortOn).src = \"images/spacer.gif\";\n document.getElementById(\"col_\" + sortOn).className = \"tableTitle\";\n } else {\n direction = false;\n document.getElementById(\"img_\" + sortOn).src = \"images/up.gif\";\n }\n } else {\n direction = false;\n if (sortedBy != null) {\n document.getElementById(\"img_\" + sortedBy).src = \"images/spacer.gif\";\n document.getElementById(\"col_\" + sortedBy).className = \"tableTitle\";\n }\n document.getElementById(\"img_\" + sortOn).src = \"images/up.gif\";\n document.getElementById(\"col_\" + sortOn).className = \"tableTitleSorted\";\n }\n\n if (direction == null) {\n portfolioGrid.setSort(null);\n } else {\n if (sortOn == \"qty\" || sortOn == \"last_price\" || sortOn == \"c_value\") {\n portfolioGrid.setSort(sortOn, direction, true, false);\n } else {\n portfolioGrid.setSort(sortOn, direction);\n }\n }\n}", "function theQwertyGrid_sortString(key) {\n\t\t\tif(_theQwertyGrid_sortInAsc) {\n\t\t\t\t_theQwertyGrid_sortInAsc = false;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(a,b){\n\t\t\t\t\treturn a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;\n\t\t\t\t});\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_theQwertyGrid_sortInAsc = true;\n\t\t\t\t_theQwertyGrid_displayData.sort(function(b,a){\n\t\t\t\t\treturn a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;\n\t\t\t\t});\n\t\t\t}\n\t\t\ttheQwertyGrid_reFillTable(_theQwertyGrid_displayData);\n\t\t}", "sort () {\r\n this._data.sort((a, b) => a.sortOrder !== b.sortOrder ? b.sortOrder - a.sortOrder : a.value.localeCompare(b.value))\r\n }", "sortCollection(columnDef, collection, sortByOptions, enableTranslateLabel) {\n if (enableTranslateLabel && (!this.translate || !this.translate.instant)) {\n throw new Error('[Angular-Slickgrid] requires \"ngx-translate\" to be installed and configured when the grid option \"enableTranslate\" is enabled.');\n }\n let sortedCollection = [];\n if (sortByOptions) {\n if (Array.isArray(sortByOptions)) {\n // multi-sort\n sortedCollection = collection.sort((dataRow1, dataRow2) => {\n for (let i = 0, l = sortByOptions.length; i < l; i++) {\n const sortBy = sortByOptions[i];\n if (sortBy && sortBy.property) {\n // collection of objects with a property name provided\n const sortDirection = sortBy.sortDesc ? SortDirectionNumber.desc : SortDirectionNumber.asc;\n const objectProperty = sortBy.property;\n const fieldType = sortBy.fieldType || FieldType.string;\n const value1 = (enableTranslateLabel) ? this.translate && this.translate.currentLang && this.translate.instant(dataRow1[objectProperty] || ' ') : dataRow1[objectProperty];\n const value2 = (enableTranslateLabel) ? this.translate && this.translate.currentLang && this.translate.instant(dataRow2[objectProperty] || ' ') : dataRow2[objectProperty];\n const sortResult = sortByFieldType(fieldType, value1, value2, sortDirection, columnDef);\n if (sortResult !== SortDirectionNumber.neutral) {\n return sortResult;\n }\n }\n }\n return SortDirectionNumber.neutral;\n });\n }\n else if (sortByOptions && sortByOptions.property) {\n // single sort\n // collection of objects with a property name provided\n const objectProperty = sortByOptions.property;\n const sortDirection = sortByOptions.sortDesc ? SortDirectionNumber.desc : SortDirectionNumber.asc;\n const fieldType = sortByOptions.fieldType || FieldType.string;\n if (objectProperty) {\n sortedCollection = collection.sort((dataRow1, dataRow2) => {\n const value1 = (enableTranslateLabel) ? this.translate && this.translate.currentLang && this.translate.instant(dataRow1[objectProperty] || ' ') : dataRow1[objectProperty];\n const value2 = (enableTranslateLabel) ? this.translate && this.translate.currentLang && this.translate.instant(dataRow2[objectProperty] || ' ') : dataRow2[objectProperty];\n const sortResult = sortByFieldType(fieldType, value1, value2, sortDirection, columnDef);\n if (sortResult !== SortDirectionNumber.neutral) {\n return sortResult;\n }\n return SortDirectionNumber.neutral;\n });\n }\n }\n else if (sortByOptions && !sortByOptions.property) {\n const sortDirection = sortByOptions.sortDesc ? SortDirectionNumber.desc : SortDirectionNumber.asc;\n const fieldType = sortByOptions.fieldType || FieldType.string;\n sortedCollection = collection.sort((dataRow1, dataRow2) => {\n const value1 = (enableTranslateLabel) ? this.translate && this.translate.currentLang && this.translate.instant(dataRow1 || ' ') : dataRow1;\n const value2 = (enableTranslateLabel) ? this.translate && this.translate.currentLang && this.translate.instant(dataRow2 || ' ') : dataRow2;\n const sortResult = sortByFieldType(fieldType, value1, value2, sortDirection, columnDef);\n if (sortResult !== SortDirectionNumber.neutral) {\n return sortResult;\n }\n return SortDirectionNumber.neutral;\n });\n }\n }\n return sortedCollection;\n }", "function pOrdenacionGridPedidosAnteriores(NombreColumna,imagen,formato) {\n\t\n\tvar aux = localStorage.getItem('sortgrid');\n\tvar grid = $(\"#pGridPedidosAnteriores\").data(\"kendoGrid\");\n\tconsole.log(\"ORDENADO LA COMUNA \" + NombreColumna +\" \"+ imagen +\" \"+ formato ); \t\n\t\tswitch (aux) {\n\t\t\t case \"0\":\n\t\t\t\t\t\tgrid.dataSource.sort({\n\t\t\t\t\t\t\tfield: NombreColumna, \n\t\t\t\t\t\t\tformat: formato,\n\t\t\t\t\t\t\ttype: \"date\",\n\t\t\t\t\t\t\tdir: \"desc\" \n\t\t\t\t\t});\n\t\t\t\t\tgrid.refresh();\n\t\t\t\t\tlocalStorage.setItem('sortgrid',\"1\");\n\t\t\t\t\t$('#'+imagen).attr(\"src\",\"./images/sort_desc.png\");\n\t\t\t break;\n\t\t\t case \"1\":\n\t\t\t\t\t\tgrid.dataSource.sort({\n\t\t\t\t\t\t\tfield: NombreColumna,\n\t\t\t\t\t\t\tformat: formato, \n\t\t\t\t\t\t\ttype: \"date\",\n\t\t\t\t\t\t\tdir: \"asc\" \n\t\t\t\t\t});\n\t\t\t\t\tgrid.refresh();\n\t\t\t\t\tlocalStorage.setItem('sortgrid',\"2\");\n\t\t\t\t\t$('#'+imagen).attr(\"src\",\"./images/sort_asc.png\");\n\t\t\t break;\n\t\t\t case \"2\":\n\t\t\t $(\"#pGridPedidosAnteriores\").data(\"kendoGrid\").dataSource.sort({});\n\t\t\t console.log(\"ORDENADO LA COMUNA \" + NombreColumna +\" \"+ imagen +\" \"+ formato ); \n\t\t\t localStorage.setItem('sortgrid',\"0\");\n\t\t\t $('#'+imagen).attr(\"src\",\"./images/sort_both.png\");\n\t\t\t break;\n\t\t}\n}", "function sort_li(a, b) {\n console.log('in');\n an = Date.parse($(a).find('.col1').text());\n bn = Date.parse($(b).find('.col1').text());\n\n return bn < an ? 1 : -1;\n }", "sort(){\n\n }", "function sortButtonClick() {\n\tvar id = $(this).attr(\"data-col\");\n\t// console.log('id discovered was'+ id);\n\n\tvar f = Filters[id];\n\n\tswitch (f.Direction) {\n\t\tcase SortOptions.None:\n\t\t\tf.Direction = SortOptions.Ascending;\n\t\t\tf.Priority = getMaxPriority() + 1;\n\t\t\tbreak;\n\n\t\tcase SortOptions.Ascending:\n\t\t\tFilters[id].Direction = SortOptions.Descending;\n\t\t\tbreak;\n\n\t\tcase SortOptions.Descending:\n\t\t\tFilters[id].Direction = SortOptions.None;\n\t\t\tremoveOrderPriorityById(id);\n\t\t\tbreak;\n\t}\n\n\tsetButtonsFromFilters(f);\n\trefreshSortPriorities();\n\tResort();\n\tsetGrid(globData);\n}", "sortingFunction() {\n let records = this.get('content');\n if (isArray(records) && records.length > 1) {\n let sorting = this.get('sorting') || [];\n if (sorting.length === 0) {\n sorting = [{ propName: 'id', direction: 'asc' }];\n }\n\n for (let i = 0; i < sorting.length; i++) {\n let sort = sorting[i];\n if (i === 0) {\n records = this.sortRecords(records, sort, 0, records.length - 1);\n } else {\n let index = 0;\n for (let j = 1; j < records.length; j++) {\n for (let sortIndex = 0; sortIndex < i; sortIndex++) {\n if (records.objectAt(j).get(sorting[sortIndex].propName) !== records.objectAt(j - 1).get(sorting[sortIndex].propName)) {\n records = this.sortRecords(records, sort, index, j - 1);\n index = j;\n break;\n }\n }\n }\n\n records = this.sortRecords(records, sort, index, records.length - 1);\n }\n }\n\n this.set('content', records);\n }\n\n let componentName = this.get('componentName');\n this.get('_groupEditEventsService').geSortApplyTrigger(componentName, this.get('sorting'));\n }", "function prepareSortingAndOrders(container) {\n\n\t\t\tvar opt = getOptions(container);\n\n\t\t\t/************************************************\n\t\t\t\t-\tHANDLING OF SORTING ISSUES -\n\t\t\t*************************************************/\n\n\t\t\t// PREPARE THE DATE SRINGS AND MAKE A TIMESTAMP OF IT\n\t\t\tcontainer.find('.tp-esg-item').each(function() {\n\t\t\t\tvar dd = new Date(jQuery(this).data('date'));\n\t\t\t\tjQuery(this).data('date',dd.getTime()/1000);\n\t\t\t})\n\n\t\t\tjQuery(opt.filterGroupClass+'.esg-sortbutton-order,'+opt.filterGroupClass+' .esg-sortbutton-order').each(function() {\n\t\t\t\tvar eso = jQuery(this);\n\t\t\t\teso.removeClass(\"tp-desc\").addClass(\"tp-asc\");\n\t\t\t\teso.data('dir',\"asc\");\n\t\t\t})\n\t}", "sortBy() {\n // YOUR CODE HERE\n }", "function sort(annotations, sortByColumn) {\n\n //console.log(\"sortByColumn: \" + sortByColumn);\n // console.log($(\"#tb-annotation-list\"));\n // className = $(\"#tb-annotation-list\").find('#' + sortByColumn).attr('class');\n // console.log(\"className: \" + className);\n\n // if (className == \"tb-list-unsorted\"){\n \n // $('#' + sortByColumn).attr('class','tb-list-asc');\n // annotations.sort(function(a, b){\n // return a[sortByColumn].localeCompare(b[sortByColumn]);\n // });\n // } else if (className == \"tb-list-asc\"){\n // annotations.sort(function(a, b){\n // return a[sortByColumn].localeCompare(b[sortByColumn]);\n // }).reverse();\n // }\n\n $('#' + sortByColumn).attr('class','tb-list-asc');\n annotations.sort(function(a, b){\n return a[sortByColumn].localeCompare(b[sortByColumn]);\n });\n}", "function sortData(data) {\n displayComic(data.comics);\n //displayManga(data.manga);\n //displayGNovel(data.graphicNovels);\n readyComicFunctions();\n}", "sort(column) {\n this.sortColumn = column.header;\n switch (this.sortClass) {\n case 'descending':\n this.sortClass = 'ascending';\n this.criteria.order = '-' + column.field;\n break;\n\n default:\n this.sortClass = 'descending';\n this.criteria.order = column.field;\n break;\n }\n\n return this.updateData();\n }", "function resort(){\n if(scope.sorting && scope.sorting.obj){\n var sortKey = scope.sorting.obj.field;\n sorter(sortKey,scope.sorting.direction);\n }\n }", "function resort(){\n if(scope.sorting && scope.sorting.obj){\n var sortKey = scope.sorting.obj.field;\n sorter(sortKey,scope.sorting.direction);\n }\n }", "function list_set_sort(col)\n {\n if (settings.sort_col != col) {\n settings.sort_col = col;\n $('#notessortmenu a').removeClass('selected').filter('.by-' + col).addClass('selected');\n rcmail.save_pref({ name: 'kolab_notes_sort_col', value: col });\n\n // re-sort table in DOM\n $(noteslist.tbody).children().sortElements(function(la, lb){\n var a_id = String(la.id).replace(/^rcmrow/, ''),\n b_id = String(lb.id).replace(/^rcmrow/, ''),\n a = notesdata[a_id],\n b = notesdata[b_id];\n\n if (!a || !b) {\n return 0;\n }\n else if (settings.sort_col == 'title') {\n return String(a.title).toLowerCase() > String(b.title).toLowerCase() ? 1 : -1;\n }\n else {\n return b.changed_ - a.changed_;\n }\n });\n }\n }", "_sortDataByDate() {\n this.data.sort(function(a, b) {\n let aa = a.Year * 12 + a.Month;\n let bb = b.Year * 12 + b.Month;\n return aa - bb;\n });\n }", "function toogleSort(){\r\n\t\tif(settings.sort_type=='desc'){\r\n\t\t\tsettings.sort_type='asc';\r\n\t\t }else{\r\n\t\t\t settings.sort_type='desc';\r\n\t\t }\r\n\t}", "sortDatabyViews(data) {\r\n data.sort((a,b) => {\r\n if (a.totalClicks > b.totalClicks) return -1;\r\n if (a.totalClicks < b.totalClicks) return 1;\r\n return 0;\r\n });\r\n return data;\r\n }", "function sortData (data) {\n ...\n}", "function dateSorting(column) {\n\n column.sortingAlgorithm = function(a, b) {\n var dt1 = new Date(a).getTime(),\n dt2 = new Date(b).getTime();\n return dt1 === dt2 ? 0 : (dt1 < dt2 ? -1 : 1);\n };\n }", "function sortTable(f,n){\r\n\tvar rows = $('#SPapprvergrid tbody tr').get();\r\n\r\n\trows.sort(function(a, b) {\r\n\r\n\t\tvar A = getVal(a);\r\n\t\tvar B = getVal(b);\r\n\r\n\t\tif(A < B) {\r\n\t\t\treturn -1*f;\r\n\t\t}\r\n\t\tif(A > B) {\r\n\t\t\treturn 1*f;\r\n\t\t}\r\n\t\treturn 0;\r\n\t});\r\n\r\n\tfunction getVal(elm){\r\n\t\tvar v = $(elm).children('td').eq(n).text().toUpperCase();\r\n\t\tif($.isNumeric(v)){\r\n\t\t\tv = parseInt(v,10);\r\n\t\t}\r\n\t\treturn v;\r\n\t}\r\n\r\n\t$.each(rows, function(index, row) {\r\n\t\t$('#SPapprvergrid').children('tbody').append(row);\r\n\t});\r\n}", "function doSorting(isAscending,orderByColumn)\n{\n if(orderByColumn != document.pagexform.orderByColumn.value )\n {\n\t document.pagexform.isAscending.value = \"true\";\n\t document.pagexform.orderByColumn.value = orderByColumn;\n }\n else\n {\n if(isAscending == \"true\")\n {\n isAscending=\"false\";\n } \n else if(isAscending == \"false\")\n {\n isAscending=\"true\";\n }\n\t document.pagexform.isAscending.value = isAscending;\n\t document.pagexform.orderByColumn.value = orderByColumn;\n \n }\n document.pagexform.FROM_INDEX.value=\"1\";\n document.pagexform.TO_INDEX.value = parseInt(document.pagexform.FROM_INDEX.value) + parseInt(document.pagexform.viewLength.value)-1;\n document.pagexform.PAGE_NUMBER.value=\"1\";\n\tdocument.pagexform.submit();\n}", "function sortTable()\r\n\t{\r\n\t\tvar\t\tj;\r\n\r\n\t\tvar\t\tcolumn = 1;\r\n\t\tvar\t\tcolumnFound = false;\r\n\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tchangeSort = false;\r\n\r\n\t\t\tfor ( j = 0; j < class_columnDefinitionArray.length; j++ )\r\n\t\t\t{\r\n\t\t\t\tif ( undefined !== class_sortColumn.match( class_columnDefinitionArray[j].GetColName() ) )\r\n\t\t\t\t{\r\n\t\t\t\t\tclass_columnDefinitionArray[j].class_sortTableCol( false );\r\n\t\t\t\t\tcolumnFound = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( !columnFound )\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// We were given an invalid column to sort on, sort on what is in column 2,\r\n\t\t\t\t// which is the name column in a standard browse view\r\n\t\t\t\t//\r\n\t\t\t\tif ( class_columnDefinitionArray.length >= 2 )\r\n\t\t\t\t{\r\n\t\t\t\t\tcolumn = 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tclass_sortColumn = class_columnDefinitionArray[column].GetColName();\r\n\t\t\t\tclass_columnDefinitionArray[column].class_sortTableCol( false );\r\n\t\t\t}\r\n\r\n\t\t\tchangeSort = true;\r\n\t\t}\r\n\t\tcatch(e)\r\n\t\t{\r\n\t\t\texceptionAlert( e, \"Issue occured in classbrowse.js/sortTable. An issue has occured in sorting the browse table. sort - \" + class_sortColumn );\r\n\t\t}\r\n\t}", "function sortFromOption(){\n // console.log(\"sortFromOption\");\n getSortMethod(nowArray);\n pageNumber = 1;\n changeDisplayAmount(displayType,1);\n}", "function organizeProducts() {\n var $grid = $(\".grid\").isotope({\n itemSelector: \".product-item\",\n getSortData: {\n id: \".id parseInt\",\n season: \".season parseInt\",\n category: \".category\",\n },\n percentPosition: true,\n masonry: {\n columnWidth: \".col-sm-2\"\n },\n sortBy: [\"season\",\"category\" ,\"id\"]\n });\n $grid.isotope(\"updateSortData\").isotope();\n }", "function UltraGrid_Sort_Rows(header, sortData)\n{\n\t//first change the header icons\n\tvar bAscending = UltraGrid_Sort_Rows_SetHeaderSort(header);\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_CaseSensitive(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = a.Value;\n\t\tvar valueB = b.Value;\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_CaseSensitive_Descending(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = a.Value;\n\t\tvar valueB = b.Value;\n\t\t//return direct comparison\n\t\treturn valueA > valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_CaseInsensitive(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = a.Value.toLowerCase();\n\t\tvar valueB = b.Value.toLowerCase();\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_CaseInsensitive_Descending(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = a.Value.toLowerCase();\n\t\tvar valueB = b.Value.toLowerCase();\n\t\t//return direct comparison\n\t\treturn valueA > valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_Numeric(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Get_Number(a.Value, 0);\n\t\tvar valueB = Get_Number(b.Value, 0);\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_Numeric_Descending(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Get_Number(a.Value, 0);\n\t\tvar valueB = Get_Number(b.Value, 0);\n\t\t//return direct comparison\n\t\treturn valueA > valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_Time(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Parse_Time(a.Value, 0xffffffff);\n\t\tvar valueB = Parse_Time(b.Value, 0xffffffff);\n\t\t//return direct comparison\n\t\treturn valueA < valueB ? -1 : 1;\n\t}\n\t//sort function for case sensitive text\n\tfunction _UltraGrid_Sort_Rows_Time_Descending(a, b)\n\t{\n\t\t//retrieve values\n\t\tvar valueA = Parse_Time(a.Value, 0xffffffff);\n\t\tvar valueB = Parse_Time(b.Value, 0xffffffff);\n\t\t//return direct comparison\n\t\treturn valueA > valueB ? -1 : 1;\n\t}\n\n\t//retrieve the object (ultragrid)\n\tvar theObject = header.UltraGrid;\n\t//initialise the cells we will use in the sort\n\tvar cellsToSort = [];\n\t//get our panel\n\tvar panel = header.Panel;\n\t//create our position \n\tvar nLeft = panel.Left + header.Rect.left;\n\tvar nRight = nLeft + header.Rect.width;\n\t//now we need to loop through all cells\n\tfor (var rows = theObject.Data.Cells.Rows, iRow = 0, cRow = rows.length; iRow < cRow; iRow++)\n\t{\n\t\t//marker for indicating we added for this row (some rows might not have a cell under this header)\n\t\tvar bAdd = true;\n\t\t//loop through all cells in the row\n\t\tfor (var cells = rows[iRow].Columns, iCell = 0, cCell = cells.length; iCell < cCell; iCell++)\n\t\t{\n\t\t\t//get the cell\n\t\t\tvar cell = cells[iCell];\n\t\t\t//get its panel\n\t\t\tvar cellPanel = cell.Panel;\n\t\t\t//create cell position \n\t\t\tvar nCellLeft = cellPanel.Left + cell.Rect.left;\n\t\t\tvar nCellRight = nCellLeft + cell.Rect.width;\n\t\t\t//is this cell under the header?\n\t\t\tif (nCellLeft <= nRight && nCellRight >= nLeft)\n\t\t\t{\n\t\t\t\t//we need the current value of the cell\n\t\t\t\tvar value;\n\t\t\t\t//we want text here, not data so check the class\n\t\t\t\tswitch (cell.DataObject.Class)\n\t\t\t\t{\n\t\t\t\t\tcase __NEMESIS_CLASS_EDIT:\n\t\t\t\t\tcase __NEMESIS_CLASS_COMBO_BOX:\n\t\t\t\t\t\t//use cell get data\n\t\t\t\t\t\tvalue = cell.GetData()[0];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t//get its caption\n\t\t\t\t\t\tvalue = Get_String(cell.Properties[__NEMESIS_PROPERTY_CAPTION], \"\").ToPlainText(cell.DataObject.Id);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//add this to the cells to sort\n\t\t\t\tcellsToSort.push({ Row: iRow, Value: value });\n\t\t\t\t//only one cell per row\n\t\t\t\tbAdd = false;\n\t\t\t\t//no need to proceed\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//still want to add?\n\t\tif (bAdd)\n\t\t{\n\t\t\t//add a fake entry to ensure all rows have been added\n\t\t\tcellsToSort.push({ Row: iRow, Value: \"\" });\n\t\t}\n\t}\n\t//now we need to sort the cells to sort\n\tswitch (sortData.SortType)\n\t{\n\t\tcase __ULTRAGRID_SORT_TYPE_STRING_SENSITIVE:\n\t\t\t//sort it\n\t\t\tcellsToSort.sort(bAscending ? _UltraGrid_Sort_Rows_CaseSensitive : _UltraGrid_Sort_Rows_CaseSensitive_Descending);\n\t\t\tbreak;\n\t\tcase __ULTRAGRID_SORT_TYPE_STRING_INSENSITIVE:\n\t\t\t//sort it\n\t\t\tcellsToSort.sort(bAscending ? _UltraGrid_Sort_Rows_CaseInsensitive : _UltraGrid_Sort_Rows_CaseInsensitive_Descending);\n\t\t\tbreak;\n\t\tcase __ULTRAGRID_SORT_TYPE_NUMBER:\n\t\t\t//sort it\n\t\t\tcellsToSort.sort(bAscending ? _UltraGrid_Sort_Rows_Numeric : _UltraGrid_Sort_Rows_Numeric_Descending);\n\t\t\tbreak;\n\t\tcase __ULTRAGRID_SORT_TYPE_DATE:\n\t\t\t//sort it\n\t\t\tcellsToSort.sort(bAscending ? _UltraGrid_Sort_Rows_Time : _UltraGrid_Sort_Rows_Time_Descending);\n\t\t\tbreak;\n\t}\n\t//now create a sort array\n\tvar sortedRows = [];\n\t//and fill it in\n\tfor (var i = 0, c = cellsToSort.length; i < c; i++)\n\t{\n\t\t//set the row\n\t\tsortedRows.push(cellsToSort[i].Row);\n\t}\n\t//and repaint the rows\n\tUltraGrid_Paint_SortedRows(theObject, sortedRows);\n}", "get sortedData() {\n // server-side sorting\n if (this.hasPager) return this.data;\n\n // client-side sorting\n let data = this.data.toArray()\n\n let col_index = this.formattedColumns.findIndex(col => col.isSorted)\n if (col_index >= 0) {\n let re = /^[0-9.]+$/;\n data.sort(function(a, b) {\n a = a.data[col_index].value;\n b = b.data[col_index].value;\n if (re.test(a) && re.test(b)) {\n a = parseFloat(a, 10);\n b = parseFloat(b, 10);\n }\n return (a > b) ? 1 : -1;\n });\n if (this.pager.reverse) {\n data.reverseObjects();\n }\n }\n return data;\n }", "function sort_li(a, b) {\n an = Date.parse($(a).find('.col2').text());\n bn = Date.parse($(b).find('.col2').text());\n\n return bn < an ? 1 : -1;\n }", "function sortListsByDate() {\r\n\t\treturn getItems().sort(function(a,b){\r\n \t\t\treturn new Date(`${a.date} ${a.time}`) - new Date(`${b.date} ${b.time}`);\r\n\t\t});\r\n\t}", "function sort(value , column, obj, tableId)\r\n {\r\n //fix for eQ :: 530156 - IE loses document after we do save on reports\r\n var docObj;\r\n \r\n if ( obj != null )\r\n {\r\n docObj = obj.document;\r\n }\r\n else\r\n {\r\n docObj = document;\r\n }\r\n \r\n docObj.sortByClient = 'false';\r\n docObj.form.reset();\r\n\r\n var sortByElementName = \"SORT_BY\";\r\n \r\n if ( tableId != null && tableId != \"\" ) \r\n {\r\n sortByElementName = tableId + \"_SORT_BY\";\r\n gSortOrderElemName = tableId + \"_SORT_ORDER\";\r\n gStartCountElemName = tableId + \"_START_COUNT\";\r\n }\r\n \r\n var sortByElement = docObj.getElementById(sortByElementName);\r\n if (sortByElement != null) \r\n {\r\n sortByElement.value = value;\r\n }\r\n else\r\n {\r\n docObj.form.SORT_BY.value = value;\r\n }\r\n\r\n var sortOrderPopUpObj = docObj.getElementById('sortOrder');\r\n gSortTableId = tableId;\r\n\r\n i2uiShowMenu('sortOrder',sortOrderPopUpObj);\r\n }", "get sortedData() {\n // server-side sorting\n if (this.hasPager) return this.data;\n\n // client-side sorting\n let data = this.data\n\n let col_index = this.formattedColumns.findIndex(col => col.isSorted)\n if (col_index >= 0) {\n let re = /^[0-9.]+$/;\n data.sort(function(a, b) {\n a = a.data[col_index].value;\n b = b.data[col_index].value;\n if (re.test(a) && re.test(b)) {\n a = parseFloat(a, 10);\n b = parseFloat(b, 10);\n }\n return (a > b) ? 1 : -1;\n });\n if (this.pager.reverse) data.reverse()\n }\n return data;\n }", "function sortTable(column){\n\n}", "function sortTableview(type,index){\r\n var rows=$('#result_2 #'+type).find('tr').has('td').get();\r\n //alert(rows);\r\n rows.sort(function(a,b){\r\n var key_a=$(a).children('td').eq(index-1).text();\r\n key_a=$.trim(key_a);\r\n var key_b=$(b).children('td').eq(index-1).text();\r\n key_b=$.trim(key_b);\r\n if(key_a > key_b) return 1;\r\n if(key_a < key_b) return -1;\r\n return 0\r\n });\r\n $.each(rows,function(i,e){\r\n $('#result_2 #'+type).append(e);\r\n // if(i%2==1){\r\n // $(e).css('background','#ECECEC');\r\n // }else{\r\n // $(e).css('background','#FFFFFF'); \r\n // }\r\n });\r\n //setStyle(type); \r\n var page=$('#'+type).attr('index');\r\n $('#'+type+' tr').show();\r\n $('#'+type+' tr:lt('+parseInt((page-1)*50+1)+')').hide();\r\n $('#'+type+' tr:gt('+parseInt(page*50)+')').hide();\r\n $('#'+type+' tr:eq(0)').show();\r\n}", "sort() {\n\t}", "sort() {\n\t}", "function compare( a, b ) { //for sorting elements block in builded sidebar by num field\n if ( a.num < b.num ){\n return -1;\n }\n if ( a.num > b.num ){\n return 1;\n }\n return 0;\n }", "Sort() {\n\n }", "function SortMediaList() {\n self.MediaColList.col_1.length = 0;\n self.MediaColList.col_2.length = 0;\n self.MediaColList.col_3.length = 0;\n if (!MediaService.myGalleryList) {\n self.noResult = true;\n } else {\n var total = MediaService.myGalleryList.length;\n if (total == 0) {self.noResult = true;} else {self.noResult = false;}\n var rest = total % 3;\n for (var i = 0; i < total; i++) {\n if ($rootScope.sinceDate > parseDateTime(MediaService.myGalleryList[i].userDate).unix && $rootScope.untilDate < parseDateTime(MediaService.myGalleryList[i].userDate).unix) {\n if ((i % 3) === 0) {\n MediaObjSet(MediaService.myGalleryList[i] , self.MediaColList.col_1);\n } else if ((i % 3) === 1) {\n MediaObjSet(MediaService.myGalleryList[i] , self.MediaColList.col_2);\n } else if ((i % 3) === 2) {\n MediaObjSet(MediaService.myGalleryList[i] , self.MediaColList.col_3);\n }\n }\n }\n }\n }", "sortData(type, column) {\n if (type !== \"none\" && type !== false) {\n let temp = this.tbody.slice();\n for (let i = 0; i < temp.length; i++) {\n temp[i].unshift(temp[i][column]);\n }\n if (type === \"asc\") {\n temp.sort();\n } else {\n temp.reverse();\n }\n for (let i = 0; i < temp.length; i++) {\n this.set(\"tbody.\" + i, []);\n this.set(\"tbody.\" + i, temp[i].slice(1));\n }\n } else {\n let temp = this.tbody.slice();\n for (let i = 0; i < temp.length; i++) {\n this.set(\"data.\" + (i + 1), []);\n this.set(\"data.\" + (i + 1), temp[i].slice());\n }\n }\n }", "function sort() {\n renderContent(numArray.sort());\n}", "get overrideSorting() {}", "function sortByProcName(a, b) {//sort by name(display_as) ascending only\n\t\tif (a.DISPLAY_AS.toUpperCase() > b.DISPLAY_AS.toUpperCase()) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (a.DISPLAY_AS.toUpperCase() < b.DISPLAY_AS.toUpperCase()) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t}", "function sortEntriesMRU(entries){\n\t// Comparison function for sort\n\tvar date_sort_desc = function (entry1, entry2) {\n\t\tvar date1 = Date.parse(entry1.dateAccessed);\n\t\tvar date2 = Date.parse(entry2.dateAccessed);\n\t\tif (date1 > date2) return -1;\n\t\tif (date1 < date2) return 1;\n\t\treturn 0;\n\t};\n console.log(\"sort mru\");\n\tentries.sort(date_sort_desc);\n}", "function sort () {\n index++;\n predicate = ng.isFunction(getter(scope)) ? getter(scope) : attr.stSort;\n if (index % 3 === 0 && attr.stSkipNatural === undefined) {\n //manual reset\n index = 0;\n ctrl.tableState().sort = {};\n ctrl.tableState().pagination.start = 0;\n ctrl.pipe();\n } else {\n ctrl.sortBy(predicate, index % 2 === 0);\n }\n }", "function sortDates(){\n\n\n function swap(x,y){\n let tx=dates[x];\n dates[x]=dates[y];\n dates[y]=tx;\n }\n\n for (let i=0;i<dates.length;i++){\n let m1=parseInt(dates[i].date.slice(0,dates[i].date.indexOf('.')));\n let d1=parseInt(dates[i].date.slice(dates[i].date.indexOf('.')+1,dates[i].date.indexOf('.',dates[i].date.indexOf('.')+1)));\n for (let j=i;j<dates.length;j++){\n let m2=parseInt(dates[j].date.slice(0,dates[j].date.indexOf('.')));\n let d2=parseInt(dates[j].date.slice(dates[j].date.indexOf('.')+1,dates[j].date.indexOf('.',dates[j].date.indexOf('.')+1)));\n if ((m2<m1)||m1==m2&&d2<d1){\n swap(i,j);\n m1=parseInt(dates[i].date.slice(0,dates[i].date.indexOf('.')));\n d1=parseInt(dates[i].date.slice(dates[i].date.indexOf('.')+1,dates[i].date.indexOf('.',dates[i].date.indexOf('.')+1)));\n }\n }\n }\n injectData();\n\n }", "_sortPathCollection(collection) {\n collection.sort(function (a, b) {\n const aSplit = a.split('.'),\n bSplit = b.split('.'),\n maxLength = Math.max(aSplit.length, bSplit.length);\n\n for (let i = 0; i < maxLength; i++) {\n const aCurrent = parseFloat(aSplit[i]),\n bCurrent = parseFloat(bSplit[i]);\n\n if (isNaN(aCurrent)) {\n return -1;\n }\n\n if (isNaN(bCurrent)) {\n return 1;\n }\n\n if (aCurrent < bCurrent) {\n return -1;\n }\n\n if (aCurrent > bCurrent) {\n return 1;\n }\n }\n });\n }", "function SortTerritorySalesNumbers() {\n\n //sort the territories in descending order based on percent\n if (vm.chartType == 'month') {\n vm.territorySalesNumbers.sort(function (a, b) { return b.percent - a.percent }); //descending order\n }\n //sort the territories in ascending order based on month -- 1 = january to 12 = december\n else {\n vm.territorySalesNumbers.sort(function (a, b) { return a.month - b.month }); //ascending order\n }\n }", "onSorted(){\n if(!this.rows) return;\n\n var sorts = this.options.columns.filter((c) => {\n return c.sort;\n });\n\n if(sorts.length){\n this.onSort({ sorts: sorts });\n\n var clientSorts = [];\n for(var i=0, len=sorts.length; i < len; i++) {\n var c = sorts[i];\n if(c.comparator !== false){\n var dir = c.sort === 'asc' ? '' : '-';\n clientSorts.push(dir + c.prop);\n }\n }\n\n if(clientSorts.length){\n // todo: more ideal to just resort vs splice and repush\n // but wasn't responding to this change ...\n var sortedValues = this.$filter('orderBy')(this.rows, clientSorts);\n this.rows.splice(0, this.rows.length);\n this.rows.push(...sortedValues);\n }\n }\n\n this.options.internal.setYOffset(0);\n }", "function sortJson() {\r\n\t \r\n}", "applySorting(by, type) {\n this.projectController.applySorting(by, type);\n }", "function sortMultiBattleResults(e){\n\t\t\t\tmultiBattleWorstToBest = ! multiBattleWorstToBest;\n\n\t\t\t\tif(multiBattleWorstToBest){\n\t\t\t\t\t$(\".multi-battle-sort\").html(\"Sort: Worst to best &#9650;\");\n\t\t\t\t} else{\n\t\t\t\t\t$(\".multi-battle-sort\").html(\"Sort: Best to worst &#9660;\");\n\t\t\t\t}\n\n\t\t\t\t// Reorganize child elements\n\n\t\t\t\t$(\".battle-results.multi .rankings-container\").children().each(function(i,li){$(\".battle-results.multi .rankings-container\").prepend(li)})\n\t\t\t}", "function sortDate()\n{\n\tevents.sort( function(a,b) { if (a.startDate < b.startDate) return -1; else return 1; } );\n\tclearTable();\n\tfillEventsTable();\n}", "onCollectionSort() {\n let me = this;\n\n if (me.configsApplied) {\n // console.log('onCollectionSort', me.collection.items);\n // me.fire('load', me.items);\n }\n }", "onCollectionSort() {\n let me = this;\n\n if (me.configsApplied) {\n // console.log('onCollectionSort', me.collection.items);\n // me.fire('load', me.items);\n }\n }", "function laodPLMSortColumn(action, url, processHandler)\r\n{\r\n\t//alert('calling the new sort function');\r\n\tcloseMsgBox();\r\n\tvar htmlAreaObj = _getWorkAreaDefaultObj();\r\n var objAjax = htmlAreaObj.getHTMLAjax();\r\n var objHTMLData = htmlAreaObj.getHTMLDataObj();\r\n\tif(objAjax)\r\n {\r\n objAjax.setActionURL(action);\r\n objAjax.setActionMethod(url);\r\n objAjax.setProcessHandler(processHandler);\r\n objAjax.sendRequest();\r\n \r\n if(objAjax.isProcessComplete())\r\n \t{\r\n \tobjHTMLData.resetChangeFields();\r\n \t}\r\n }\r\n\t\r\n}", "syncHeaderSortState() {\n const me = this,\n sorterMap = {};\n\n if (!me.grid.isConfiguring) {\n const storeSorters = me.store.sorters,\n sorterCount = storeSorters.length,\n classList = new DomClassList();\n let sorter; // Key sorters object by field name so we can find them.\n\n for (let sortIndex = 0; sortIndex < sorterCount; sortIndex++) {\n const sorter = storeSorters[sortIndex];\n\n if (sorter.field) {\n sorterMap[sorter.field] = {\n ascending: sorter.ascending,\n sortIndex: sortIndex + 1\n };\n }\n } // Sync the sortable, sorted, and sortIndex state of each leaf header element\n\n for (const leafColumn of me.grid.columns.bottomColumns) {\n const leafHeader = leafColumn.element;\n\n if (leafHeader) {\n // TimeAxisColumn in Scheduler has no textWrapper, since it has custom rendering,\n // but since it cannot be sorted by anyway lets just ignore it\n const dataset = leafColumn.textWrapper && leafColumn.textWrapper.dataset; // data-sortIndex is 1-based, and only set if there is > 1 sorter.\n // iOS Safari throws a JS error if the requested delete property is not present.\n\n dataset && dataset.sortIndex && delete dataset.sortIndex;\n classList.value = leafHeader.classList;\n\n if (leafColumn.sortable !== false) {\n classList.add(me.sortableCls);\n sorter = sorterMap[leafColumn.field];\n\n if (sorter) {\n if (sorterCount > 1 && dataset) {\n dataset.sortIndex = sorter.sortIndex;\n }\n\n classList.add(me.sortedCls);\n\n if (sorter.ascending) {\n classList.add(me.sortedAscCls);\n classList.remove(me.sortedDescCls);\n } else {\n classList.add(me.sortedDescCls);\n classList.remove(me.sortedAscCls);\n }\n } else {\n classList.remove(me.sortedCls); // Not optimal, but easiest way to make sure sort feature does not remove needed classes.\n // Better solution would be to use different names for sorting and grouping\n\n if (!classList['b-group']) {\n classList.remove(me.sortedAscCls);\n classList.remove(me.sortedDescCls);\n }\n }\n } else {\n classList.remove(me.sortableCls);\n } // Update the element's classList\n\n DomHelper.syncClassList(leafHeader, classList);\n }\n }\n }\n }", "sortColumn(event, args, isSortingAsc = true) {\n if (args && args.column) {\n // get previously sorted columns\n const sortedColsWithoutCurrent = this.sortService.getCurrentColumnSorts(args.column.id + '');\n let emitterType;\n // add to the column array, the column sorted by the header menu\n sortedColsWithoutCurrent.push({ sortCol: args.column, sortAsc: isSortingAsc });\n if (this.sharedService.gridOptions.backendServiceApi) {\n this.sortService.onBackendSortChanged(event, { multiColumnSort: true, sortCols: sortedColsWithoutCurrent, grid: this.sharedService.grid });\n emitterType = EmitterType.remote;\n }\n else if (this.sharedService.dataView) {\n this.sortService.onLocalSortChanged(this.sharedService.grid, this.sharedService.dataView, sortedColsWithoutCurrent);\n emitterType = EmitterType.local;\n }\n else {\n // when using customDataView, we will simply send it as a onSort event with notify\n const isMultiSort = this.sharedService && this.sharedService.gridOptions && this.sharedService.gridOptions.multiColumnSort || false;\n const sortOutput = isMultiSort ? sortedColsWithoutCurrent : sortedColsWithoutCurrent[0];\n args.grid.onSort.notify(sortOutput);\n }\n // update the this.sharedService.gridObj sortColumns array which will at the same add the visual sort icon(s) on the UI\n const newSortColumns = sortedColsWithoutCurrent.map((col) => {\n return {\n columnId: col && col.sortCol && col.sortCol.id,\n sortAsc: col && col.sortAsc,\n sortCol: col && col.sortCol,\n };\n });\n // add sort icon in UI\n this.sharedService.grid.setSortColumns(newSortColumns);\n // if we have an emitter type set, we will emit a sort changed\n // for the Grid State Service to see the change.\n // We also need to pass current sorters changed to the emitSortChanged method\n if (emitterType) {\n const currentLocalSorters = [];\n newSortColumns.forEach((sortCol) => {\n currentLocalSorters.push({\n columnId: sortCol.columnId + '',\n direction: sortCol.sortAsc ? 'ASC' : 'DESC'\n });\n });\n this.sortService.emitSortChanged(emitterType, currentLocalSorters);\n }\n }\n }", "function sortResults(){\n return sort.sortCustomerRecords(result);\n}", "function UltraGrid_InitialseHeaderSortsRows(theObject)\n{\n\t//create an empty map\n\tvar map = {};\n\t//retrieve the property\n\tvar stringProperty = theObject.Properties[__NEMESIS_PROPERTY_SORTEABLE_COLUMNS];\n\t//valid?\n\tif (!String_IsNullOrWhiteSpace(stringProperty))\n\t{\n\t\tvar data = false;\n\t\t//parse it into json\n\t\ttry { data = JSON.parse(stringProperty); } catch (error) { Common_Error(error.message); }\n\t\t//valid templates?\n\t\tif (data)\n\t\t{\n\t\t\t//get the initial sort\n\t\t\tvar initialSort = data.InitialSort;\n\t\t\t//get sorteables from this\n\t\t\tdata = data.Sorteables;\n\t\t\t//valid?\n\t\t\tif (data)\n\t\t\t{\n\t\t\t\t//loop through them\n\t\t\t\tfor (var iSelects = 0, cSelects = data.length; iSelects < cSelects; iSelects++)\n\t\t\t\t{\n\t\t\t\t\t//get the sort data\n\t\t\t\t\tvar sortData =\n\t\t\t\t\t{\n\t\t\t\t\t\tSortType: data[iSelects].SortType,\n\t\t\t\t\t\tTriggerOnIcon: data[iSelects].TriggerType,\n\t\t\t\t\t\tSortedIcon: null,\n\t\t\t\t\t\tUnsortedIcon: null,\n\t\t\t\t\t\tAscendingIcon: null,\n\t\t\t\t\t\tDescendingIcon: null\n\t\t\t\t\t};\n\t\t\t\t\t//validate sort type\n\t\t\t\t\tswitch (sortData.SortType)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"StrCmp\":\n\t\t\t\t\t\t\t//use string compare type\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_STRING_SENSITIVE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"StrICmp\":\n\t\t\t\t\t\t\t//use string insensitive\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_STRING_INSENSITIVE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"Number\":\n\t\t\t\t\t\t\t//use number\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_NUMBER;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"DateTime\":\n\t\t\t\t\t\t\t//use date\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_DATE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//fail this (will just show the icon, if any, for decorative purposes)\n\t\t\t\t\t\t\tsortData.SortType = __ULTRAGRID_SORT_TYPE_NONE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//validate trigger type\n\t\t\t\t\tswitch (sortData.TriggerOnIcon)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"Icon\":\n\t\t\t\t\t\t\t//set only on icon\n\t\t\t\t\t\t\tsortData.TriggerOnIcon = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t//set all header\n\t\t\t\t\t\t\tsortData.TriggerOnIcon = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//get icons\n\t\t\t\t\tvar icons = data[iSelects].Icons;\n\t\t\t\t\t//has icons?\n\t\t\t\t\tif (icons)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get sorted icon\n\t\t\t\t\t\tvar icon = icons.SortedIcon;\n\t\t\t\t\t\t//validate icon\n\t\t\t\t\t\tif (icon && !/^none$/i.test(icon.Icon))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the icon\n\t\t\t\t\t\t\tsortData.SortedIcon = { Icon: icon.Icon, Position: null };\n\t\t\t\t\t\t\t//we have an icon, check its position\n\t\t\t\t\t\t\tif (/^-?\\d+,-?\\d+,\\d+,\\d+$/.test(icon.Position))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//break this into numbers\n\t\t\t\t\t\t\t\tvar numbers = icon.Position.split(\",\");\n\t\t\t\t\t\t\t\t//convert them\n\t\t\t\t\t\t\t\tsortData.SortedIcon.Position = new Position_Rect(Get_Number(numbers[0]), Get_Number(numbers[1]), Get_Number(numbers[2]), Get_Number(numbers[3]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//get unsorted icon\n\t\t\t\t\t\ticon = icons.UnsortedIcon;\n\t\t\t\t\t\t//validate icon\n\t\t\t\t\t\tif (icon && !/^none$/i.test(icon.Icon))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the icon\n\t\t\t\t\t\t\tsortData.UnsortedIcon = { Icon: icon.Icon, Position: null };\n\t\t\t\t\t\t\t//we have an icon, check its position\n\t\t\t\t\t\t\tif (/^-?\\d+,-?\\d+,\\d+,\\d+$/.test(icon.Position))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//break this into numbers\n\t\t\t\t\t\t\t\tnumbers = icon.Position.split(\",\");\n\t\t\t\t\t\t\t\t//convert them\n\t\t\t\t\t\t\t\tsortData.UnsortedIcon.Position = new Position_Rect(Get_Number(numbers[0]), Get_Number(numbers[1]), Get_Number(numbers[2]), Get_Number(numbers[3]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//get ascending icon\n\t\t\t\t\t\ticon = icons.AscendingIcon;\n\t\t\t\t\t\t//validate icon\n\t\t\t\t\t\tif (icon && !/^none$/i.test(icon.Icon))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the icon\n\t\t\t\t\t\t\tsortData.AscendingIcon = { Icon: icon.Icon, Position: null, ShowAlways: icon.ShowAlways };\n\t\t\t\t\t\t\t//we have an icon, check its position\n\t\t\t\t\t\t\tif (/^-?\\d+,-?\\d+,\\d+,\\d+$/.test(icon.Position))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//break this into numbers\n\t\t\t\t\t\t\t\tnumbers = icon.Position.split(\",\");\n\t\t\t\t\t\t\t\t//convert them\n\t\t\t\t\t\t\t\tsortData.AscendingIcon.Position = new Position_Rect(Get_Number(numbers[0]), Get_Number(numbers[1]), Get_Number(numbers[2]), Get_Number(numbers[3]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//get descending icon\n\t\t\t\t\t\ticon = icons.DescendingIcon;\n\t\t\t\t\t\t//validate icon\n\t\t\t\t\t\tif (icon && !/^none$/i.test(icon.Icon))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set the icon\n\t\t\t\t\t\t\tsortData.DescendingIcon = { Icon: icon.Icon, Position: null, ShowAlways: icon.ShowAlways };\n\t\t\t\t\t\t\t//we have an icon, check its position\n\t\t\t\t\t\t\tif (/^-?\\d+,-?\\d+,\\d+,\\d+$/.test(icon.Position))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//break this into numbers\n\t\t\t\t\t\t\t\tnumbers = icon.Position.split(\",\");\n\t\t\t\t\t\t\t\t//convert them\n\t\t\t\t\t\t\t\tsortData.DescendingIcon.Position = new Position_Rect(Get_Number(numbers[0]), Get_Number(numbers[1]), Get_Number(numbers[2]), Get_Number(numbers[3]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//get header id\n\t\t\t\t\tvar headerId = data[iSelects].HeaderId;\n\t\t\t\t\t//we need to get the headers for this\n\t\t\t\t\tvar headers = headerId == \"-1\" ? theObject.Data.Headers.Cells : UltraGrid_GetCellsFromSetIds(theObject, headerId);\n\t\t\t\t\t//loop through the headers\n\t\t\t\t\tfor (var iHeader = 0, cHeader = headers.length; iHeader < cHeader; iHeader++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//retrieve the real header\n\t\t\t\t\t\tvar header = headers[iHeader];\n\t\t\t\t\t\t//create a specific data for this one (we need to also store its state)\n\t\t\t\t\t\tvar headerData =\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSortType: sortData.SortType,\n\t\t\t\t\t\t\tTriggerOnIcon: sortData.TriggerType,\n\t\t\t\t\t\t\tSortedIcon: sortData.SortedIcon,\n\t\t\t\t\t\t\tUnsortedIcon: sortData.UnsortedIcon,\n\t\t\t\t\t\t\tAscendingIcon: sortData.AscendingIcon,\n\t\t\t\t\t\t\tDescendingIcon: sortData.DescendingIcon,\n\t\t\t\t\t\t\tSorted: false,\n\t\t\t\t\t\t\tAscending: false\n\t\t\t\t\t\t};\n\t\t\t\t\t\t//put it in the map\n\t\t\t\t\t\tmap[header.UltraGridId] = headerData;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//has initial sort?\n\t\t\tif (initialSort && initialSort.HeaderId)\n\t\t\t{\n\t\t\t\t//we need to get the headers for this\n\t\t\t\theaders = initialSort.HeaderId == \"-1\" ? theObject.Data.Headers.Cells : UltraGrid_GetCellsFromSetIds(theObject, initialSort.HeaderId);\n\t\t\t\t//we only care about one\n\t\t\t\tif (headers && headers.length > 0)\n\t\t\t\t{\n\t\t\t\t\t//get the header\n\t\t\t\t\theader = headers[0];\n\t\t\t\t\t//mark it as selected\n\t\t\t\t\tmap[header.UltraGridId].Sorted = true;\n\t\t\t\t\t//set ascending\n\t\t\t\t\tmap[header.UltraGridId].Ascending = Get_Bool(initialSort.Ascending, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//return the result\n\treturn map;\n}", "function sortByMathAsc()\n{\n let tBody = document.getElementById(\"tBody\");\n tBody.innerHTML = \"\"\n sortBySubjectAsc(dataBase, \"maths\")\n // sortBySubjectDsc(dataBase, \"maths\")\n createTable(dataBase)\n}", "function sortRows(){\n sortRowsAlphabeticallyUpwards();\n}", "function SortRecancilationReportGrid(event) {\n\n var url = \"/Reporting/ReconciliationReport\";\n var reportingTypeId = $(\"#hdReportType\").val();\n var date = ($(\"#txtFromDate\").val());\n var viewtype = $('#ddlViewType').val();\n if (event.data != null && (event.data.msg != null || event.data.msg != undefined || event.data.msg != '')) {\n url += \"?reportingTypeId=\" + reportingTypeId + \"&date=\" + date + \"&viewtype=\" + viewtype + \"&\" + event.data.msg;\n }\n $.ajax({\n type: \"POST\",\n url: url,\n async: false,\n contentType: \"application/json; charset=utf-8\",\n dataType: \"html\",\n data: null,\n success: function (data) {\n $(\"#ReportingGrid\").empty();\n $(\"#ReportingGrid\").html(data);\n\n },\n error: function (msg) {\n }\n });\n}", "sortByDate(selection = \"timed\"){\n return this.dataFromSelectionName(selection).sort((a, b) => a.date - b.date);\n }", "function sortDates() {\n sortUsingNestedDate($('#projectIndexBig'), \"span\", $(\"button.btnSortDate\").data(\"sortKey\"));\n\n //ADDING UNDERLINE CLASSES\n if ($(\"#name\").hasClass(\"underline\")) {\n $(\"#name\").removeClass(\"underline\");\n $(\"#date\").addClass(\"underline\");\n } else {\n $(\"#date\").addClass(\"underline\");\n }\n }", "sortData(field, order) {\n const arr = [...this.data];\n const columnToSort = this.headerConfig.find(item => item.id === field);\n const directions = {asc: 1, desc: -1};\n\n return arr.sort((a, b) => {\n\n const res = columnToSort.sortType === 'string' \n ? a[field].localeCompare(b[field], ['ru', 'en']) \n : (a[field] - b[field]);\n \n return directions[order] * res;\n\n });\n\n }", "function sortColumns(columns) {\n function sortFunction(a, b) {\n return (a.useCount < b.useCount) - (a.useCount > b.useCount);\n }\n\n columns.sort(sortFunction);\n }", "function changeSort(columnName) {\n for (let item of sortList) {\n\n if (item.name === columnName) {\n\n /* Set new sort */\n if (item.sort === undefined) {\n item.sort = true;\n } else {\n item.sort = !item.sort;\n }\n\n if (item.sort) {\n item.element.innerText = item.name + \" ▼\";\n } else {\n item.element.innerText = item.name + \" ▲\";\n }\n\n } else {\n /* Reset sort in all another field */\n item.sort = undefined;\n item.element.innerText = item.name + \" ▼▲\";\n }\n }\n\n filter();\n}", "sortByColumn(column) {\n if (column.sorted) {\n this.setProperties({\n dir: column.ascending ? 'asc' : 'desc',\n sort: column.get('valuePath'),\n });\n this.fetchNewRecords();\n }\n }", "function sortByMe(e) {\n // (1) This function is a click handler which coordinates sorting a column\n\n var arrow = e.toElement; // Which element received this event?\n var heading = arrow.id.split('-')[1]; // Find out which heading is ours\n\n var ascending = null;\n if (arrow.classList.contains('up')) {\n ascending = 'ascending';\n } else {\n ascending = 'descending';\n }\n\n sortTableBy(tracklist, sortBy(heading, ascending));\n}", "function sortHeader(colName,sortDir,sortType){\r\n\r\n//\talert(\"In sortHeader \" + \" col \" + colName + \" dir \" + sortDir + \" type \" + sortType);\r\n\t//check for column with no data\r\n\tif (!colName )\treturn false;\r\n\tif (colName.value)\treturn false;\r\n\t\r\n\t//alert(\"post\")\r\n\r\n\tvar obj = MM_findObj(sortDir,document);\r\n\r\n\tif(obj.value==\"ASCENDING\"){\r\n\t\tascending=true;\r\n\t\tobj.value=\"DESCENDING\";\r\n\r\n//\t\talert(obj.value)\r\n\t}\t\r\n\telse{\r\n\t\tascending=false;\r\n\t\tobj.value=\"ASCENDING\";\r\n\r\n\t//\talert(obj.value)\r\n\t}\r\n\r\n\t//copy column data into temp array\r\n\tvar arrTemp = new Array();\r\n\tfor(i=0;i<colName.length;i++){\r\n\t\tarrTemp[arrTemp.length] = [colName[i].value,i];\r\n\t}\r\n\t\r\n//\talert('b4 callingsortFunction ')\r\n//\talert(arrTemp);\r\n\r\n\tsortFunction(arrTemp,ascending,sortType);\r\n\r\n//\talert('after callingsortFunction ')\r\n\t//\t\talert(arrTemp);\r\n\tchmPrintColumn(arrTemp);\r\n\r\n\t\t\r\n\treturn false;\r\n}", "sortColumns(columns) {\n return Object.keys(columns).sort((a, b) => {\n const aName = columns[a].column.name,\n bName = columns[b].column.name;\n if (aName.slice(0, 4) === bName.slice(0, 4)) {\n return seasonMap[aName.slice(5)] > seasonMap[bName.slice(5)]? 1:-1;\n }\n return aName > bName? 1:-1;\n });\n }", "function clearSortOrder(){\n var view = tabsFrame.newView;\n var index = view.tableGroups.length - tabsFrame.selectedTableGroup - 1;\n var curTgrp = view.tableGroups[index];\n \n curTgrp.sortFields = \"\";\n /*\n if (hasGroupByDate(curTgrp)){\n var groupByDate = curTgrp.sortFields[0].groupByDate;\n if ((groupByDate == 'year') || (groupByDate == 'month') || (groupByDate == 'quarter') || (groupByDate == 'day') || (groupByDate == 'week')){\n curTgrp.sortFields = new Array();\n }\n }\n */\n resetTable('sortOrderSummary');\n onLoadSortSummary();\n \t\n tabsFrame.newView = view;\n myTabsFrame.selectTab('page4c');\n \n}", "function ascendente(col){ // uso de slice() para que no cambie el array original\n Equipos_sort= CpyEquipos_array.slice().sort(function(a,b){\n if (a.puntos[col] > b.puntos[col]) { // > ordena de mayor a menor\n return 1;\n }\n if (a.puntos[col] < b.puntos[col]) {\n return -1;\n }\n // a must be equal to b\n return 0;\n });\n}", "set sortingOrder(value) {}", "sortByPrice() {\r\n get('#app > div > div.MrQ4g > div > div._3pSVv._19-Sz.F0sHG._1eAL0 > div > div > div._1V_Pj > div.izVGc').contains('Sort by').click();\r\n get('[id^=price_asc]').click({ multiple: true, force: true });\r\n }", "syncHeaderSortState() {\n const me = this,\n sorterMap = {};\n\n if (!me.grid.isConfiguring) {\n let storeSorters = me.store.sorters,\n sorterCount = storeSorters.length,\n classList = new DomClassList(),\n sorter;\n\n // Key sorters object by field name so we can find them.\n for (let sortIndex = 0; sortIndex < sorterCount; sortIndex++) {\n const sorter = storeSorters[sortIndex];\n if (sorter.field) {\n sorterMap[sorter.field] = {\n ascending: sorter.ascending,\n sortIndex: sortIndex + 1\n };\n }\n }\n\n // Sync the sortable, sorted, and sortIndex state of each leaf header element\n for (const leafColumn of me.grid.columns.bottomColumns) {\n const leafHeader = leafColumn.element;\n\n if (leafHeader) {\n // TimeAxisColumn in Scheduler has no textWrapper, since it has custom rendering,\n // but since it cannot be sorted by anyway lets just ignore it\n const dataset = leafColumn.textWrapper && leafColumn.textWrapper.dataset;\n\n // data-sortIndex is 1-based, and only set if there is > 1 sorter.\n // iOS Safari throws a JS error if the requested delete property is not present.\n dataset && dataset.sortIndex && delete dataset.sortIndex;\n\n classList.value = leafHeader.classList;\n\n if (leafColumn.sortable !== false) {\n classList.add(me.sortableCls);\n sorter = sorterMap[leafColumn.field];\n if (sorter) {\n if (sorterCount > 1 && dataset) {\n dataset.sortIndex = sorter.sortIndex;\n }\n classList.add(me.sortedCls);\n if (sorter.ascending) {\n classList.add(me.sortedAscCls);\n classList.remove(me.sortedDescCls);\n } else {\n classList.add(me.sortedDescCls);\n classList.remove(me.sortedAscCls);\n }\n } else {\n classList.remove(me.sortedCls);\n // Not optimal, but easiest way to make sure sort feature does not remove needed classes.\n // Better solution would be to use different names for sorting and grouping\n if (!classList['b-group']) {\n classList.remove(me.sortedAscCls);\n classList.remove(me.sortedDescCls);\n }\n }\n } else {\n classList.remove(me.sortableCls);\n }\n\n // Update the element's classList\n DomHelper.syncClassList(leafHeader, classList);\n }\n }\n }\n }", "function clickedColumnSorter(aTableRow, bTableRow, type) {\n\t\tvar aContent = getFirstTextFromCell(aTableRow, columnIndex).toLowerCase();\n\t\tvar bContent = getFirstTextFromCell(bTableRow, columnIndex).toLowerCase();\n\n\t\tvar aExtractedContent = numericStringTools.extractNumbersIfPresent(aContent);\n\t\tvar bExtractedContent = numericStringTools.extractNumbersIfPresent(bContent);\n\n\t\tif (type === 'time') {\n\t\t\tvar now = new Date();\n\n\t\t\tvar aFullDate = now.toDateString() + ' ' + aContent.slice(0, 5) + ' ' + aContent.slice(-2);\n\t\t\tvar bFullDate = now.toDateString() + ' ' + bContent.slice(0, 5) + ' ' + bContent.slice(-2);\n\n\t\t\taExtractedContent = Date.parse(aFullDate);\n\t\t\tbExtractedContent = Date.parse(bFullDate);\n\t\t}\n\t\tvar directionComparer = shouldSortAscending ? ascendingComparer : descendingComparer;\n\n\t\treturn comparer(directionComparer, aExtractedContent, bExtractedContent);\n\t}", "function sortFunc() {\n let table = container.querySelector('.table');\n let headers = table.querySelectorAll('th');\n let tableBody = table.querySelector('tbody');\n let rows = tableBody.querySelectorAll('.table__row_visible');\n\n // Sort direction.\n let directions = Array.from(headers).map(function (header) {\n return '';\n });\n\n // Changing td contents in the approptiate column.\n let transform = function (index, content) {\n // Getting the data-type of the column.\n let type = headers[index].getAttribute('data-type');\n switch (type) {\n case 'number':\n return parseFloat(content);\n case 'string':\n default:\n return content;\n }\n };\n\n function sortColumn(index) {\n\n // Get the current diretion.\n let direction = directions[index] || 'asc';\n\n // Direction.\n let multiplier = (direction === 'asc') ? 1 : -1;\n let rows = tableBody.querySelectorAll('.table__row_visible');\n let newRows = Array.from(rows);\n newRows.sort(function (rowA, rowB) {\n\n let cellA = rowA.querySelectorAll('td')[index].innerHTML;\n let cellB = rowB.querySelectorAll('td')[index].innerHTML;\n\n let a = transform(index, cellA);\n let b = transform(index, cellB);\n\n switch (true) {\n case a > b: return 1 * multiplier;\n case a < b: return -1 * multiplier;\n case a === b: return 0;\n }\n });\n\n // Delete old rows.\n [].forEach.call(rows, function (row) {\n tableBody.removeChild(row);\n });\n\n // Change the direction.\n directions[index] = direction === 'asc' ? 'desc' : 'asc';\n\n // Add new rows.\n newRows.forEach(function (newRow) {\n tableBody.appendChild(newRow);\n });\n\n let allArrows = container.querySelectorAll(\".table__arrow\");\n let currArrow = event.currentTarget.querySelector(\".table__arrow\");\n for (let arrow of allArrows) {\n if (arrow !== currArrow) {\n arrow.classList = \"\";\n arrow.classList.add(\"table__arrow\");\n arrow.classList.add(\"table__arrow_default\");\n }\n }\n if (currArrow.classList.contains(\"table__arrow_default\")) {\n currArrow.classList.remove(\"table__arrow_default\");\n currArrow.classList.add(\"table__arrow_asc\");\n } else if (currArrow.classList.contains(\"table__arrow_asc\")) {\n currArrow.classList.remove(\"table__arrow_asc\");\n currArrow.classList.add(\"table__arrow_desc\");\n } else if (currArrow.classList.contains(\"table__arrow_desc\")) {\n currArrow.classList.remove(\"table__arrow_desc\");\n currArrow.classList.add(\"table__arrow_asc\");\n }\n };\n\n [].forEach.call(headers, function (header, index) {\n header.addEventListener('click', function () {\n sortColumn(index);\n });\n });\n }", "function organize(grid, options) {\n let elements = sort(grid);\n for (let element of elements) {\n grid.removeChild(element);\n }\n for (let element of elements) {\n grid.appendChild(element);\n }\n }", "function refreshSortPriorities() {\n\tfor (filterId in Filters) {\n\t\tvar f = Filters[filterId];\n\n\t\tif (f.Priority > 0) {\n\t\t\t$(\"#\" + f.Column.OrderButtonName).text(f.Priority);\n\t\t}\n\t}\n}", "updateSorters(sortColumns, presetSorters) {\n let currentSorters = [];\n const odataSorters = [];\n if (!sortColumns && presetSorters) {\n // make the presets the current sorters, also make sure that all direction are in lowercase for OData\n currentSorters = presetSorters;\n currentSorters.forEach((sorter) => sorter.direction = sorter.direction.toLowerCase());\n // display the correct sorting icons on the UI, for that it requires (columnId, sortAsc) properties\n const tmpSorterArray = currentSorters.map((sorter) => {\n const columnDef = this._columnDefinitions.find((column) => column.id === sorter.columnId);\n odataSorters.push({\n field: columnDef ? ((columnDef.queryFieldSorter || columnDef.queryField || columnDef.field) + '') : (sorter.columnId + ''),\n direction: sorter.direction\n });\n // return only the column(s) found in the Column Definitions ELSE null\n if (columnDef) {\n return {\n columnId: sorter.columnId,\n sortAsc: sorter.direction.toUpperCase() === SortDirection.ASC\n };\n }\n return null;\n });\n // set the sort icons, but also make sure to filter out null values (that happens when columnDef is not found)\n if (Array.isArray(tmpSorterArray)) {\n this._grid.setSortColumns(tmpSorterArray);\n }\n }\n else if (sortColumns && !presetSorters) {\n // build the SortBy string, it could be multisort, example: customerNo asc, purchaserName desc\n if (sortColumns && sortColumns.length === 0) ;\n else {\n if (sortColumns) {\n for (const columnDef of sortColumns) {\n if (columnDef.sortCol) {\n let fieldName = (columnDef.sortCol.queryFieldSorter || columnDef.sortCol.queryField || columnDef.sortCol.field) + '';\n let columnFieldName = (columnDef.sortCol.field || columnDef.sortCol.id) + '';\n let queryField = (columnDef.sortCol.queryFieldSorter || columnDef.sortCol.queryField || columnDef.sortCol.field || '') + '';\n if (this._odataService.options.caseType === CaseType.pascalCase) {\n fieldName = titleCase(fieldName);\n columnFieldName = titleCase(columnFieldName);\n queryField = titleCase(queryField);\n }\n if (columnFieldName !== '') {\n currentSorters.push({\n columnId: columnFieldName,\n direction: columnDef.sortAsc ? 'asc' : 'desc'\n });\n }\n if (queryField !== '') {\n odataSorters.push({\n field: queryField,\n direction: columnDef.sortAsc ? SortDirection.ASC : SortDirection.DESC\n });\n }\n }\n }\n }\n }\n }\n // transform the sortby array into a CSV string for OData\n currentSorters = currentSorters || [];\n const csvString = odataSorters.map((sorter) => {\n let str = '';\n if (sorter && sorter.field) {\n const sortField = (this._odataService.options.caseType === CaseType.pascalCase) ? titleCase(sorter.field) : sorter.field;\n str = `${sortField} ${sorter && sorter.direction && sorter.direction.toLowerCase() || ''}`;\n }\n return str;\n }).join(',');\n this._odataService.updateOptions({\n orderBy: csvString\n });\n // keep current Sorters and update the service options with the new sorting\n this._currentSorters = currentSorters;\n // build the OData query which we will use in the WebAPI callback\n return this._odataService.buildQuery();\n }", "function askaron_sort(){\n\t$(\".sort__abc, sort__cba\").click(function(){\n\t\tvar ths = $(this);\n\t\tvar c = ths.closest(\".sort\");\n\t\tvar inx_col = ths.index();\n\t\tvar list = c.find(\".sort__list > td:nth-child(\"+(inx_col+1)+\")\").get();\n\t\t\n\t\t// Arrows\n\t\tths.toggleClass(\"sort__abc\").toggleClass(\"sort__cba\");\n\t\t\n\t\t// Sort\n\t\tlist.sort(function(a, b) {\n\t\t var compA = $(a).text().toUpperCase();\n\t\t var compB = $(b).text().toUpperCase();\n\t\t \n\t\t if(ths.hasClass(\"sort__abc\")){\n\t\t\t\treturn (compA < compB) ? -1 : (compA > compB) ? 1 : 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (compA > compB) ? -1 : (compA < compB) ? 1 : 0;\n\t\t\t}\n\t\t \n\t\t});\n\t\t\n\t\t// Output\n\t\tvar prev_tr = false;\n\t\t$.each(list, function(idx, itm){\n\t\t\tvar tr_n = c.find(\".sort__list\").length;\n\t\t\tvar q = 0;\n\t\t\twhile(tr_n >= q){\n\t\t\t\tvar tr_c = c.find(\".sort__list:nth-child(\"+(q+2)+\")\");\n\t\t\t\tif(itm == tr_c.find(\"td\").get(inx_col)){\n\t\t\t\t\tif (prev_tr.length>0) {\n\t\t\t\t\t\tprev_tr.after(tr_c); \n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tc.find(\"th:last\").closest(\"tr\").after(tr_c); \n\t\t\t\t\t}\n\t\t\t\t\tprev_tr = tr_c;\n\t\t\t\t}\n\t\t\t\tq++;\n\t\t\t}\n\t\t});\n\t});\n}", "function sortTable_by_jan(table_bodys, jan_code, coll_num) {\n var rows = $('.' + table_bodys + ' tr').get();\n rows.sort(function(a, b) {\n\n var A = $(a).children('td').eq(coll_num).text();\n A = A.substr(A.length - 13);\n if (A == jan_code) {\n return -1;\n }\n return 0;\n\n });\n $.each(rows, function(index, row) {\n $('.' + table_bodys).append(row);\n });\n}", "function renderSorted(sortedData){\n table.innerHTML = \"\"\n sortedData.forEach((group) => {\n const newGroup = new aCappellaGroup(group)\n table.innerHTML += newGroup.render()\n })\n console.log('sorted the table');\n }", "function sortBySales(){\n var sortColumn = 3;\n var tableData = document.getElementById(\"bookdata\").getElementsByTagName('tbody').item(0);\n var rowData = tableData.getElementsByTagName('tr'); \n for(var i = 0; i < rowData.length - 1; i++){\n for(var j = 0; j < rowData.length - (i + 1); j++){\n if(Number(rowData.item(j).getElementsByTagName('td').item(sortColumn).innerHTML.replace(/[^0-9\\.]+/g, \"\")) < Number(rowData.item(j+1).getElementsByTagName('td').item(sortColumn).innerHTML.replace(/[^0-9\\.]+/g, \"\"))){\n tableData.insertBefore(rowData.item(j+1),rowData.item(j));\n }\n }\n }\n }", "function sortValue(sel) {\n if(sel==\"0\"){\n if(archive.isArchiveAR) {\n arrayRow=archive.arrayRow.slice();\n }\n }\n else {\n let idCol = parseInt(sel);\n //selectColumn=idCol;\n if (!archive.isArchiveAR) {\n console.log(\"zapisywnie archiwum\");\n archive.arrayRow = arrayRow.slice();\n archive.isArchiveAR = true;\n }\n arrayRow.sort(function (a, b) {\n return a.arrayCell[idCol] - b.arrayCell[idCol];\n });\n }\n showData();\n}", "sortData(data){\n\t\tif(!this.dtInstance)\n\t\t\treturn;\n\n\t\tlet _self = this;\n\t\tlet order = this.dtInstance.order()[0];\n\t\tlet col = order[0], dir = order[1];\n\t\tif(this.sortFns[col]) {\n\t\t\tlet sortFn = this.sortFns[col];\n\t\t\tdata.sort(function(a, b){\n\t\t\t\tlet aa = sortFn(a, col),\n\t\t\t\t\tbb = sortFn(b, col);\n\n\t\t\t\tif(dir == \"asc\")\n\t\t\t\t\treturn ((aa < bb) ? -1 : ((aa > bb) ? 1 : 0));\n\t\t\t\tif(dir == \"desc\")\n\t\t\t\t\treturn ((bb < aa) ? -1 : ((bb > aa) ? 1 : 0));\n\t\t\t});\n\t\t}\n\n\t\treturn data;\n\t}" ]
[ "0.67517096", "0.6634672", "0.6634672", "0.65874153", "0.6571248", "0.6562572", "0.6497997", "0.6473892", "0.64595795", "0.6450784", "0.64372116", "0.64096856", "0.6399269", "0.6382355", "0.63754743", "0.63303363", "0.63284194", "0.63193995", "0.6312161", "0.6297437", "0.629604", "0.6287691", "0.6286877", "0.62796354", "0.6277739", "0.6272703", "0.62672985", "0.62672985", "0.62663084", "0.626239", "0.6261904", "0.6253989", "0.6241535", "0.6235078", "0.6228149", "0.6226392", "0.6220728", "0.62073135", "0.62045205", "0.62005097", "0.6194077", "0.6193111", "0.61903065", "0.61856383", "0.61856025", "0.6184136", "0.6177438", "0.61718845", "0.61718845", "0.6163255", "0.6156726", "0.61515707", "0.61405617", "0.6135686", "0.6134259", "0.6133182", "0.61290896", "0.61290014", "0.61196214", "0.6107334", "0.610154", "0.60912573", "0.6090745", "0.6088921", "0.60877466", "0.6080569", "0.6077714", "0.6077714", "0.6054809", "0.6043515", "0.6040714", "0.6035657", "0.6034448", "0.6030096", "0.60235536", "0.60200053", "0.6015243", "0.60152406", "0.6010349", "0.601004", "0.6001227", "0.59908235", "0.5989206", "0.5980226", "0.5979858", "0.5970225", "0.5968161", "0.5966967", "0.5966154", "0.5964048", "0.59593105", "0.5957908", "0.595702", "0.59554684", "0.5952216", "0.5951212", "0.5947441", "0.59413254", "0.5939221", "0.5930504", "0.59303105" ]
0.0
-1