Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Retrieve data from store as props
function mapStateToProps(state) { return { auth: state.auth }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStoreProps(state) {\n return state\n}", "renderStore() {\n MainStore = <AgentStore props={this.props} />;\n return MainStore;\n }", "get data() {\n return this.state.data;\n }", "getData(data) {\n this.props.getData(data)\n }", "static fetchData({ store }) {\n return st...
[ "0.6582575", "0.6538625", "0.65070605", "0.6483092", "0.64438194", "0.6410951", "0.6410951", "0.6410951", "0.62186867", "0.61372715", "0.61282164", "0.6117908", "0.6095128", "0.6070708", "0.6065644", "0.6043876", "0.6032766", "0.6022891", "0.60128844", "0.5988257", "0.5984155...
0.0
-1
Retrieve data from store as props
function mapStateToProps(state) { return { auth: state.auth, user: state.user }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStoreProps(state) {\n return state\n}", "renderStore() {\n MainStore = <AgentStore props={this.props} />;\n return MainStore;\n }", "get data() {\n return this.state.data;\n }", "getData(data) {\n this.props.getData(data)\n }", "static fetchData({ store }) {\n return st...
[ "0.6582575", "0.6538625", "0.65070605", "0.6483092", "0.64438194", "0.6410951", "0.6410951", "0.6410951", "0.62186867", "0.61372715", "0.61282164", "0.6117908", "0.6095128", "0.6070708", "0.6065644", "0.6043876", "0.6032766", "0.6022891", "0.60128844", "0.5988257", "0.5984155...
0.0
-1
Retrieve data from store as props
function mapStateToProps(store) { return { intl: store.intl }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStoreProps(state) {\n return state\n}", "renderStore() {\n MainStore = <AgentStore props={this.props} />;\n return MainStore;\n }", "get data() {\n return this.state.data;\n }", "getData(data) {\n this.props.getData(data)\n }", "static fetchData({ store }) {\n return st...
[ "0.6582575", "0.6538625", "0.65070605", "0.6483092", "0.64438194", "0.6410951", "0.6410951", "0.6410951", "0.62186867", "0.61372715", "0.61282164", "0.6117908", "0.6095128", "0.6070708", "0.6065644", "0.6043876", "0.6032766", "0.6022891", "0.60128844", "0.5988257", "0.5984155...
0.0
-1
Retrieve data from store as props
function mapStateToProps(store) { return { intl: store.intl, auth: store.auth }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStoreProps(state) {\n return state\n}", "renderStore() {\n MainStore = <AgentStore props={this.props} />;\n return MainStore;\n }", "get data() {\n return this.state.data;\n }", "getData(data) {\n this.props.getData(data)\n }", "static fetchData({ store }) {\n return st...
[ "0.6582575", "0.6538625", "0.65070605", "0.6483092", "0.64438194", "0.6410951", "0.6410951", "0.6410951", "0.62186867", "0.61372715", "0.61282164", "0.6117908", "0.6095128", "0.6070708", "0.6065644", "0.6043876", "0.6032766", "0.6022891", "0.60128844", "0.5988257", "0.5984155...
0.0
-1
Retrieve data from store as props
function mapStateToProps(state) { return { showAddPost: (0, _AppReducer.getShowAddPost)(state), posts: (0, _PostReducer.getPosts)(state) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStoreProps(state) {\n return state\n}", "renderStore() {\n MainStore = <AgentStore props={this.props} />;\n return MainStore;\n }", "get data() {\n return this.state.data;\n }", "getData(data) {\n this.props.getData(data)\n }", "static fetchData({ store }) {\n return st...
[ "0.6582575", "0.6538625", "0.65070605", "0.6483092", "0.64438194", "0.6410951", "0.6410951", "0.6410951", "0.62186867", "0.61372715", "0.61282164", "0.6117908", "0.6095128", "0.6070708", "0.6065644", "0.6043876", "0.6032766", "0.6022891", "0.60128844", "0.5988257", "0.5984155...
0.0
-1
Import Selectors Import Style
function PostDetailPage(props) { return (0, _jsx3.default)("div", {}, void 0, (0, _jsx3.default)(_reactHelmet2.default, { title: props.post.title }), (0, _jsx3.default)("div", { className: _PostListItem2.default["single-post"] + " " + _PostListItem2.default["post-detail"] }, void 0, (0, _jsx3.default)("h3...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "import() {\n }", "expandImport(term) {\n\t let path = term.moduleSpecifier.val();\n\t let mod;\n\t if (term.forSyntax) {\n\t mod = this.context.modules.getAtPhase(path, this.context.phase + 1, this.context.cwd);\n\t this.context.store = this.context.modules.visit(mod, this.context.phase + 1...
[ "0.65952086", "0.651855", "0.63988847", "0.6384903", "0.6310916", "0.6310916", "0.6230563", "0.6158134", "0.6157735", "0.61066586", "0.60867923", "0.60105693", "0.5971951", "0.5883977", "0.5883977", "0.58679336", "0.5857748", "0.5853312", "0.5841471", "0.58336604", "0.5816423...
0.0
-1
Retrieve data from store as props
function mapStateToProps(state, props) { return { post: (0, _PostReducer.getPost)(state, props.params.cuid) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStoreProps(state) {\n return state\n}", "renderStore() {\n MainStore = <AgentStore props={this.props} />;\n return MainStore;\n }", "get data() {\n return this.state.data;\n }", "getData(data) {\n this.props.getData(data)\n }", "static fetchData({ store }) {\n return st...
[ "0.6582575", "0.6538625", "0.65070605", "0.6483092", "0.64438194", "0.6410951", "0.6410951", "0.6410951", "0.62186867", "0.61372715", "0.61282164", "0.6117908", "0.6095128", "0.6070708", "0.6065644", "0.6043876", "0.6032766", "0.6022891", "0.60128844", "0.5988257", "0.5984155...
0.0
-1
Throw an array to it and a function which can generate promises and it will call them sequentially, one after another
function sequence(items, consumer) { var results = []; var runner = function runner() { var item = items.shift(); if (item) { return consumer(item).then(function (result) { results.push(result); }).then(runner); } return Promise.resolve(results); }; return runner(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static race(iterable) {\n return CustomPromise.handleArray(iterable, { resolveAny:1, rejectAny:1 });\n }", "function All(promiseArray) {\n return new Promise(function(resolve,reject) {\n var args = Array.prototype.slice.call(promiseArray);\n var results = []\n if(args.length === 0)\n ...
[ "0.7105644", "0.6888901", "0.68040794", "0.6553797", "0.6366061", "0.63643897", "0.6322551", "0.6313096", "0.6259405", "0.62583965", "0.6248793", "0.62232304", "0.62119806", "0.6200014", "0.61920357", "0.61692905", "0.6167819", "0.6167819", "0.6167819", "0.6151476", "0.613981...
0.57796764
55
Get a single post
function getPost(req, res) { _post2.default.findOne({ cuid: req.params.cuid }).exec(function (err, post) { if (err) { res.status(500).send(err); } res.json({ post: post }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async getPost () {\n\t\tconst postId = this.model.get('postId');\n\t\tif (!postId) { return; }\n\t\tconst post = await this.data.posts.getById(postId);\n\t\tif (!post) {\n\t\t\tthrow this.errorHandler.error('notFound', { info: 'post' });\n\t\t}\n\t\tthis.responseData.post = post.getSanitizedObject({ request: this ...
[ "0.8037308", "0.8037308", "0.79800445", "0.7816693", "0.7794409", "0.7774089", "0.7755417", "0.77519125", "0.7381717", "0.73703784", "0.72839683", "0.72414213", "0.7232072", "0.7231593", "0.72238564", "0.72192496", "0.7209571", "0.71848696", "0.7152599", "0.71311253", "0.7083...
0.7154254
19
Setup webpack compiler and server for the renderer process
function startRenderer () { return new Promise((resolve) => { const compiler = webpack(rendererConfig); const serverOptions = { host: "localhost", port: devPort, hot: true, onListening: function (devServer) { const port = devServer.server.address().port; console.log("Li...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compile() {\n\tconst configItems = [\n\t\tEasyWebpack.getNodeWebpackConfig(merge(server, extend)),\n\t\tEasyWebpack.getWebWebpackConfig(merge(client, extend))\n\t];\n\treturn new Promise((resove, reject) => {\n\t\twebpack(configItems, (err, stats) => {\n\t\t\tif (err) {\n\t\t\t\treject(err);\n\t\t\t\tretu...
[ "0.7089234", "0.70180315", "0.7000937", "0.69160086", "0.68953294", "0.68344134", "0.6610129", "0.65493464", "0.65199363", "0.6439416", "0.6429075", "0.6387784", "0.6365654", "0.63368845", "0.6317276", "0.62393236", "0.6219697", "0.619671", "0.619591", "0.61026824", "0.608704...
0.7169634
0
Setup webpack compiler and watcher for the main process
function startMain () { return new Promise((resolve) => { const mainCompiler = webpack(mainConfig); mainCompiler.run(() => { mainCompiler.watch({}, (err) => { if (err) { console.log(err); return; } // skip the first watch event if ( skipMainRestart ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run() {\n const adaptedConfig = utils.adaptWebpackConfig(config);\n const compiler = webpack(adaptedConfig);\n if (isWatch) {\n return compiler.watch(\n {\n aggregateTimeout: 300,\n watchOptions: {\n ignored: /node_modules/,\n ...
[ "0.71514684", "0.69958484", "0.6821841", "0.6794896", "0.6654285", "0.65815973", "0.6580455", "0.65594697", "0.6493169", "0.6454361", "0.64299524", "0.6310432", "0.6230515", "0.61937803", "0.619359", "0.6170855", "0.6158694", "0.61487734", "0.60947245", "0.60614794", "0.60529...
0.63856936
11
Gets the type of file uploaded
getFileType() { const [fileType] = this.state.file.type.split("/"); return fileType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFileType() {\n\n\t//reg for image/video\n\tvar imageType = /image.*/;\n\tvar videoType = /video.*/;\n\t\n\t//check the file type\n\tif (file.type.match(imageType)) {\n\t\treturn(\"IMAGE\");\n\t} else if (file.type.match(videoType)){\n\t\treturn(\"VIDEO\");\n\t} else {\n\t\treturn(\"NONE\");\n\t}\n\t\n}...
[ "0.75460917", "0.7191704", "0.7075889", "0.68116844", "0.6793763", "0.67190427", "0.67190427", "0.67027515", "0.6689909", "0.66544664", "0.6642217", "0.661775", "0.65916777", "0.65042806", "0.64711493", "0.6435059", "0.62780124", "0.6267686", "0.6267366", "0.6236587", "0.6229...
0.77763325
0
richiama il servizio di carico delle versioni come parametro gli passa il metodo da richiamare in caso di success
getAllDataJQ() { this.service.all(this.creaTabella) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setVersion(arg) {\n\t\t// this.setState(function(prevState){\n\t\t// \tlet copy = JSON.parse(JSON.stringify(prevState));\n\t\t// \tlet newVer = {\n\t\t// \t\tr_version: arg.minor + ' \"' + arg.nickname + '\"'\n\t\t// \t};\n\t\t//\n\t\t// \tcopy = _.assign(copy, newVer);\n\t\t//\n\t\t// \treturn copy;\n\t\t// });\n...
[ "0.6099554", "0.5968646", "0.584116", "0.57763374", "0.5775809", "0.5768946", "0.5737458", "0.5723349", "0.57166606", "0.5620863", "0.56204766", "0.55897796", "0.5583957", "0.5580851", "0.5541145", "0.55389833", "0.5529906", "0.54808897", "0.5476975", "0.5472216", "0.5472216"...
0.0
-1
i due metodi seguenti prendono l'array di json restituito dal servizio get contentente un json come campo flusso e sostituisce il json con un campo contenente il nome tabella
ricreaArrJson(arrJson){ arrJson.map(json => { this.newData.push(this.ricreaJson(json)); }); return this.newData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get(_, res) { \n let = pedidos =[\n {'idPedido': 1 ,'dataPedido': '10/01/2019','valorTotal': 7000.00,'estadoPedido':'Ativo'},\n {'idPedido': 2 ,'dataPedido': '03/06/2019','valorTotal': 2500.00,'estadoPedido':'Cancelado'},\n {'idPedido': 3 ,'dataPedido': '10/05/2019','valo...
[ "0.6638524", "0.64406186", "0.641787", "0.6414238", "0.6171545", "0.6144266", "0.6061609", "0.59920037", "0.5981856", "0.5929601", "0.5904671", "0.590061", "0.5896302", "0.58784956", "0.58629376", "0.5858212", "0.5846548", "0.58337843", "0.58177257", "0.5815146", "0.5812958",...
0.0
-1
legge i flussi da servizio rest e crea un array per la select
caricaFlussi() { this.serviceFlussi.all(this.riempiFlussi) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function arrayCliente(id,name,ape,cor,dui){\r\n var data = {id: id,name: name,ape: ape,cor: cor,dui: dui};\r\n return data;\r\n}", "selectProcessing(data) {\n if (data.length === 0) {\n return []\n } else {\n let selectData = []\n\n data.forEach(element => {\n...
[ "0.65815187", "0.63625234", "0.622346", "0.61982536", "0.61535734", "0.60389745", "0.6032753", "0.59856623", "0.59839517", "0.59226143", "0.5889377", "0.5883846", "0.58818376", "0.58719915", "0.5853558", "0.58491474", "0.5833025", "0.57826203", "0.5750989", "0.5747908", "0.57...
0.0
-1
crea le colonne da passare a datatable
createColumn() { const first = this.data[0]; this.fields = Reflect.ownKeys(first); this.caricaFlussi(); this.fields.map((col) => { switch (col) { case "id": this.myJson = { data: col, title: col, type: "rea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function creaColonne(arrayIntestazioni, urlNodo){\n var max = arrayIntestazioni.length;\n var colonneCreate = [];\n var obj;\n var i;\n for(i = 0; i < max; i++){\n obj = generaColonna(i, arrayIntestazioni);\n colonneCreate.push(obj);\n }\n obj ...
[ "0.6797524", "0.6475316", "0.64443463", "0.6105943", "0.60936975", "0.60635984", "0.60559493", "0.6054115", "0.60167384", "0.6011774", "0.5999289", "0.5987214", "0.5975803", "0.59516305", "0.59429", "0.59243643", "0.588797", "0.5879185", "0.58731693", "0.5872737", "0.58510214...
0.5810141
25
richiama datatable come parametro gli viene passato l'array di json restituito dal servizio rest di GET
creaTabella(result){ this.data = this.ricreaArrJson(result); this.createColumn(); this.myTable = $('#flussi').DataTable({ "sPaginationType": "full_numbers", data: this.data, columns: this.ArrCol, dom: 'Bfrtip', // Needs button container select: 'single', responsive: true, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCombustivelTable() {\n //Populates Table with Json\n tableCombustivel = $('table#table-combustivel').DataTable({\n ajax: {\n url: urlApi + \"combustivel\",\n contentType: 'application/json; charset=UTF-8',\n dataType: 'json'\n },\n columns: [{...
[ "0.63793015", "0.6359899", "0.6323384", "0.62872577", "0.6275376", "0.62465733", "0.6219271", "0.6171117", "0.6149536", "0.61492145", "0.614587", "0.61301416", "0.61199737", "0.61120903", "0.60920995", "0.60783833", "0.6044793", "0.6036379", "0.6033811", "0.603324", "0.603174...
0.0
-1
metodo richiamato da data table in caso di cancellazione di un record richiama il servizio rest di DELETE
deleteRow(datatable, rowdata, success, error) { this.service.delete(rowdata.id, success, error); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function success(obj){\n var dataRow = td.parentNode;\n var rowIndex = dataRow.rowIndex - 1; // adjust for oolumn header row?\n var dataTable = dataRow.parentNode;\n dataTable.deleteRow(rowIndex);\n }", "function eliminaFilas(){\n //$(\"#t...
[ "0.6863121", "0.6705217", "0.66742384", "0.665913", "0.6619463", "0.661677", "0.6582774", "0.65643847", "0.6559904", "0.65166545", "0.64944714", "0.6486648", "0.6474149", "0.6454582", "0.6417285", "0.64168936", "0.6385181", "0.63614297", "0.63310623", "0.63281786", "0.6320154...
0.63132864
21
metodo richiamato da data table in caso di aggiunta di un record richiama il servizio rest di POST
addRow(datatable, rowdata, success, error) { this.service.add(this.creaJsonRes(rowdata), success, error, this.ricreaJson); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadTable() {\n $.ajax({\n url: 'http://localhost:9000/api/inventarios',\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\"\n }\n }).done(function (items) {\n var registros = \"\";\n items.forEach(function (item, index, array...
[ "0.6451946", "0.6413107", "0.63920176", "0.63873273", "0.63500446", "0.63324916", "0.632995", "0.63079846", "0.6276247", "0.6258009", "0.623924", "0.6235391", "0.6232015", "0.6208195", "0.6205805", "0.6187576", "0.61713225", "0.61666244", "0.6161554", "0.61593145", "0.6153591...
0.0
-1
metodo richiamato da data table in caso di modifica di un record richiama il servizio rest di PUT
editRow(datatable, rowdata, success, error) { this.service.update(rowdata.id, this.creaJsonRes(rowdata), success, error, this.ricreaJson); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateRow(row) {\n const id = notifyInfo(\"Update läuft\");\n axios.put(row._links.self.href, row ,{headers: {'Content-Type': 'application/json'}})\n .then(results => {\n console.log(results);\n notifyUpdateSuccess(id, \"Update erfolgreich\");\n this.getTableData(false)\n ...
[ "0.6512785", "0.6449596", "0.63895214", "0.6358853", "0.6344592", "0.6269623", "0.62658334", "0.6260853", "0.6196666", "0.61958456", "0.6188071", "0.61851597", "0.61756015", "0.61633444", "0.6142108", "0.6139693", "0.6121185", "0.6088271", "0.6085169", "0.60806394", "0.607483...
0.6437439
2
fa il bind dei metodi
bindingAll() { this.getAllDataJQ = this.getAllDataJQ.bind(this); this.creaTabella = this.creaTabella.bind(this); this.deleteRow = this.deleteRow .bind(this); this.addRow = this.addRow.bind(this); this.editRow = this.editRow.bind(this); this.ricreaJson = this.ricre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_bind() {\n\t\tthis._bindCaption();\n\t\tthis._bindChoices();\n\t}", "bindVariable() {\n if (Object(_placeos_ts_client__WEBPACK_IMPORTED_MODULE_1__[\"authority\"])() && this.bind && this.sys && this.mod) {\n const module = Object(_placeos_ts_client__WEBPACK_IMPORTED_MODULE_1__[\"getModule\"])(t...
[ "0.6392791", "0.5937459", "0.59113383", "0.57186794", "0.5709681", "0.5687978", "0.566399", "0.5641014", "0.563308", "0.5599038", "0.55967903", "0.55805826", "0.5571055", "0.55276406", "0.55255616", "0.5514726", "0.5480329", "0.5471387", "0.54487723", "0.54458505", "0.5444005...
0.6395404
0
Version 1 Version 2:
function getHome() { function hello(name) { return (name) } const homes = ["Daybreak Town", "Traverse Town", "Twilight Town", "Halloween Town", hello("Teriyaki Land")]; console.log(bob([homes.length, hello("Midgar")])) return homes[bob(homes.length, hello("Midgar"))] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private public function m246() {}", "transient private protected internal function m182() {}", "private internal function m248() {}", "transient protected internal function m189() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient final protected i...
[ "0.6852865", "0.65084714", "0.64717305", "0.6409167", "0.6408154", "0.63885283", "0.62735033", "0.6176985", "0.6141062", "0.603086", "0.5999758", "0.5946723", "0.5928173", "0.58926994", "0.5865411", "0.58171237", "0.58031744", "0.5766133", "0.576426", "0.57623225", "0.5742493...
0.0
-1
creates buttons for each of these
function makeButtons() { // deletes the shows prior to adding new shows so there are no repeat buttons $('#show-buttons').empty(); // loops through the shows array for (var i = 0; i < animals.length; i++) { // dynamically makes buttons for every show in the array var a = $('<button>') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createButtons () {\n // first we need to empty the current giphs if any...\n $(\"#button-view\").empty();\n\n // now loop through 'topics' array and make a button for each\n for (i =0; i < topics.length; i++) {\n //now create a new button element, assign it a css cla...
[ "0.78794175", "0.77702034", "0.775127", "0.76753837", "0.76658326", "0.7625843", "0.7618754", "0.76130503", "0.76033354", "0.76020235", "0.7594993", "0.75807166", "0.758071", "0.75613976", "0.75462925", "0.7540169", "0.75337076", "0.7532256", "0.75270724", "0.7522138", "0.750...
0.7256418
82
function to display gifs
function displayGifs() { // var animal = $(this).attr("data-name"); var queryURL = "https://api.giphy.com/v1/gifs/search?q=" + animal + "&limit=9&api_key=G7lZulXleGoWc2fLuJmZxrCOuUtx13YN"; // creates ajax call $.ajax({ url: queryURL, method: "GET" }).done(function (response) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function outputGifs(gif) {\n const img = document.createElement(\"img\");\n img.src = gif.images.downsized.url;\n img.setAttribute(\"alt\", gif.title);\n img.setAttribute(\"class\", \"graphics-container-item\");\n img.onclick = () => {\n const message = `<img src=\"${gif.images.downsized.url}\" alt=\"${gif...
[ "0.7675445", "0.7475177", "0.7434631", "0.7353032", "0.7322227", "0.7258998", "0.72489804", "0.72232085", "0.7206568", "0.71363187", "0.71087265", "0.7043809", "0.7043137", "0.70375377", "0.6996891", "0.69760466", "0.69745386", "0.69665873", "0.69640356", "0.69628376", "0.696...
0.66783774
52
XXX: refactor to upgrade performance of 'updateListboxSelection' function
function updateListboxSelection() { var data_params = $('form#main_form').serializeArray(); $('input[name="knowledge_pad_module_ung_knowledge_pad_ung_docs_listbox_content_listbox_uid:list"]').each(function() { data_params.push({ 'name': 'listbox_uid:list', 'value': this.value }); });...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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//spli...
[ "0.7238855", "0.7203931", "0.6847997", "0.68347055", "0.68002284", "0.66344553", "0.66236275", "0.6454628", "0.6451585", "0.6428563", "0.6428563", "0.6428563", "0.6428563", "0.6384632", "0.6384632", "0.6346347", "0.6304672", "0.6275596", "0.6268505", "0.6227195", "0.6214782",...
0.7289875
0
Write your code below:
function generateTarget() { return Math.floor(Math.random() * 10) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comportement (){\n\t }", "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 \...
[ "0.62877107", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044", "0.61352044"...
0.0
-1
Intro narrative for POI
function Profile({ name, title, avatar, profileUrl, size, orientation, type }) { const style = { base: [styles.base], anchor: [styles.element.anchor.base], avatar: [styles.element.avatar.base], details: [styles.element.details.base], name: [styles.element.name.base], title: [styles.element.tit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function POI(x, y, type, sketch, branch) {\n this.x = x;\n this.y = y;\n this.type = type;\n this.sketch = sketch;\n this.branch = branch;\n}", "function displayIntroTitle(){\n push();\n textFont(`Blenny`);\n textAlign(CENTER,CENTER);\n textSize(140);\n fill(breadFill.r, breadFill.g, breadFill.b);\n t...
[ "0.592181", "0.5604543", "0.5512784", "0.53204477", "0.53204477", "0.53173846", "0.5286254", "0.52785736", "0.5230685", "0.5228082", "0.52133346", "0.5175879", "0.5153307", "0.50574076", "0.503481", "0.50277066", "0.5022717", "0.49851242", "0.4977697", "0.49704883", "0.496909...
0.0
-1
Update session upon receive/send
async function logUserConversation (event, type) { if (event.type == "message" && event.text) { // console.log(event); var params = { fb_id: event.address.user.id, message_body: { message: event.text,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_sendSessionUpdate() {\n\t const { scope, client } = this.getStackTop();\n\t if (!scope) return;\n\n\t const session = scope.getSession();\n\t if (session) {\n\t if (client && client.captureSession) {\n\t client.captureSession(session);\n\t }\n\t }\n\t }", "_sendSessionUpdate() {...
[ "0.7395957", "0.73747826", "0.7342688", "0.65666574", "0.6513898", "0.6338005", "0.62160283", "0.6175095", "0.6118091", "0.61137444", "0.60972404", "0.6091913", "0.6090575", "0.60847974", "0.60817486", "0.60439384", "0.60287404", "0.6005984", "0.5994605", "0.5969085", "0.5963...
0.0
-1
create splash screen from the html string and add event listeners to it to start game
function createSplashScreen(splashString) { splashScreen = buildDom(splashString); document.body.appendChild(splashScreen) const startBtn = splashScreen.querySelector("button"); startBtn.addEventListener("click", startGame); const hardBtn = document.getElementById("hard"); hardBtn.addEventListe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildSplash() {\n splashMain = buildDom(`\n <main>\n <h1>Up or Down<h1>\n <button>Start</button>\n </main>\n `);\n document.body.appendChild(splashMain);\n splashMain.querySelector('button').addEventListener('click',startGame)\n }", "fun...
[ "0.752635", "0.66018796", "0.6352737", "0.633394", "0.63169986", "0.62589616", "0.6224413", "0.60682553", "0.59678644", "0.5914836", "0.5892109", "0.5880041", "0.5840419", "0.57997996", "0.57987475", "0.579027", "0.5775054", "0.5772513", "0.5755013", "0.56705624", "0.5669635"...
0.7593016
0
create game over screen
function endGame(score) { // import score from game // bug/feature when player clicks end game from game window; gameover doesn't get the score // EITHER REMOVE THE QUIT GAME BUTTON FROM GAME WINDOW OR MAKE IT AN ACTUAL FEATURE removeScreen(); createGameOver(gameOverStr, score); //console.log(`I got...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GameOverGraphic(){\n gameOverScreen.appendChild(pikaSad)\n wrap.appendChild(gameOverScreen)\n }", "function winScreen() {\n image(introScreenBackground, 0, 0);\n\n push();\n noFill();\n noStroke();\n rect(285, 300, 335, 100);\n pop();\n\n rainRun();\n\n lightningGenerator();\n\n animatio...
[ "0.77455497", "0.73094", "0.7302278", "0.7106585", "0.71056986", "0.7036084", "0.7031919", "0.69755197", "0.69332445", "0.6932679", "0.6908073", "0.6899642", "0.68864554", "0.686275", "0.68584436", "0.68522936", "0.68376523", "0.68336135", "0.68157274", "0.6789203", "0.676826...
0.0
-1
e.g. notifications = [1, 2, 3]
function clear() { appworks.notifications.clear(); notifications = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "processNotifications() {\n const { notifications } = this.props;\n if (!notifications) {\n return [];\n }\n return notifications.map(notification => ({\n title: notification.title,\n description: notification.description,\n metadata: this.generateMetadataString(notification),\n ...
[ "0.73347676", "0.7159927", "0.70903194", "0.6612226", "0.65602994", "0.64738697", "0.6446539", "0.6362631", "0.6350442", "0.6323242", "0.6268343", "0.62557226", "0.62423", "0.62179816", "0.62155026", "0.6193551", "0.61916095", "0.61741936", "0.6158338", "0.6156093", "0.614718...
0.5566764
81
Render data source (API) feature add,delete,update new data source (API)
render() { if (this.state.candidates) { return ( <div> <Link to={"/newcandidate/"}>Create new candidate's profile </Link> </div> <h1> List of candidates </h1> <Row> {this.state.candidates.map(c => { return <Col sx="3" sm="3" md="3" lg="3" xl="3"> <Link to={`/candidates/${c.id}`}> {c.f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderData(data) {\n cachedData = data;\n\t\tlet self_links;\n\t\tconsole.log(data)\n\t\t\n\t\ttry{\n\t\t\tself_links = apiUrl + data[\"_links\"]['add'].href;\n\t\t}catch(e){\n\t\t\t//getResource( getCurrentHash() );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tvar title = getCurrentHash();\n\n if (!dat...
[ "0.6245099", "0.6238944", "0.6238944", "0.5882815", "0.5836245", "0.56579816", "0.5654975", "0.56312466", "0.5626231", "0.5597379", "0.55958235", "0.55738485", "0.55674875", "0.5534921", "0.5530044", "0.55296445", "0.55075675", "0.54993546", "0.54944324", "0.5479495", "0.5479...
0.0
-1
list all dancers on page
function renderAllDancers(dancer) { const li = document.createElement("li") const btn = document.createElement("button") btn.innerText = dancer.name btn.dataset.id = dancer.id li.append(btn) dancerList.append(li) btn.addEventListener("click", e => { getSingleDancer(e.target.dataset...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDaburgers() {\n $.get(\"/api/daburgers\", function(data) {\n daburgers = data;\n initializeRows();\n });\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.6175453", "0.59997636", "0.59719753", "0.5960297", "0.58170086", "0.57587254", "0.56619644", "0.5657888", "0.5648538", "0.56413853", "0.5641134", "0.55192727", "0.5496321", "0.5461569", "0.54455656", "0.5411627", "0.5394157", "0.53931123", "0.5387371", "0.5370048", "0.5352...
0.51498777
60
event listner for feedback Li
function delteFeedback(e) { const id = e.target.parentElement.dataset.id getSingleDancer(id).then(dancer => { let feed = dancer.feedback const newFeed = feed.filter(element => !element.includes(e.target.innerText)) newFeedback(id, newFeed) }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleFeedback() {\n $('body').on('click', '#next-button', (e) => {\n console.log('clicked!')\n if (store.questionNumber === store.questions.length-1) {\n\n store.view = 'results'\n }\n else {\n store.view = 'question'\n store.questionNumber+=1;\n\n }\n render()\n })\n ...
[ "0.6205591", "0.6181361", "0.6087595", "0.6060027", "0.6018531", "0.5986498", "0.5923774", "0.58395815", "0.58144593", "0.57967514", "0.57703733", "0.5767492", "0.57586944", "0.5745386", "0.572091", "0.5711309", "0.57021034", "0.5671161", "0.56656396", "0.56573313", "0.565286...
0.5519492
41
grabs feedback array and push new value into it pass in id argument
function pushNewFeedback(e) { e.preventDefault() const id = e.target.dataset.id getSingleDancer(id).then(dancer => { let newFeed = dancer.feedback const feedbackValue = e.target[0].value newFeed.push(feedbackValue) newFeedback(id, newFeed) e.target.reset() }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateFeedback(id) {\n var $post = $(\"[data-post-id='\" + id + \"']\");\n if (!$post.length) return;\n\n $.ajax({\n url: wvy.url.resolve(\"/posts/\" + id + \"/feedback\"),\n method: \"GET\",\n contentType: \"application/json\"\n }).then(functio...
[ "0.62021726", "0.61506385", "0.6146102", "0.5954822", "0.5937359", "0.5827003", "0.5719806", "0.5706344", "0.56658983", "0.5659676", "0.5593928", "0.55918723", "0.558923", "0.5585652", "0.5567404", "0.5560045", "0.5539477", "0.55232704", "0.55100757", "0.54852724", "0.5468739...
0.706369
0
puts Feeback on the page in Lis
function renderFeedback(feedbackArray) { const li = document.createElement("li") li.innerText = feedbackArray feedbackUl.append(li) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showBillerFeedBackUrl() {\n\tshowFooterPopup(messages['biller.findMyBiller']);\n\treturn false;\n}", "function showFeedBackUrl() {\n\tremoveMessageFromDivId();\n\tremoveSuccessOrFailureStrip();\n\tvar userId = getCookie(\"userId\");\n\tvar registerUser = parseBoolean(localStorage.getItem(\"registerUser\...
[ "0.55710423", "0.5495944", "0.54318136", "0.5419173", "0.53365993", "0.5278297", "0.52723277", "0.52644295", "0.525735", "0.52438253", "0.5233586", "0.52050745", "0.5189965", "0.5157559", "0.51562524", "0.5144859", "0.5132326", "0.5126456", "0.51012313", "0.50925213", "0.5087...
0.0
-1
puts Individual dancer on the page
function renderDancer(dancer) { const image = dancerDetails.querySelector("#dancer-img") const name = dancerDetails.querySelector("#dancer-name") const likeCount = dancerDetails.querySelector("#like-count") likeCount.dataset.id = dancer.id const desc = dancerDetails.querySelector("#dancer-descriptio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showPerson() {\n $('body').find('.name').text(\"Name: \" + muArray[number].name);\n $('body').find('.git').text(\"github: \" + muArray[number].git_username);\n $('body').find('.shoutout').text(\"Shoutout: \" + muArray[number].shoutout);\n }", "function printAlliance(character){...
[ "0.66705525", "0.5842217", "0.579286", "0.5751319", "0.571343", "0.57027084", "0.5674017", "0.5649594", "0.5648436", "0.5646094", "0.5644682", "0.5636216", "0.5613546", "0.5613546", "0.5591586", "0.5588385", "0.5549594", "0.5549591", "0.5536324", "0.5534312", "0.5533856", "...
0.5261939
67
Fetches a single dancer need to pass in id argument
function getSingleDancer(id) { return fetch(danceURL + `/${id}`) .then(res => res.json()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "fetch(id) {\n return this._callApi('get', id);\n }", "static fetchById(id) {\n const result = DummyDataHelpers.findById(dummyEntries, id); \n if (!result) {\n return this.badRequest(`no entry for id ${id}`);\n }\n return this.success(`An entry with ${id} has been fetched successfully`,...
[ "0.7304613", "0.7162434", "0.7140188", "0.6965177", "0.69128025", "0.6813811", "0.6795153", "0.67940676", "0.6760027", "0.67566997", "0.67566997", "0.6744208", "0.67338336", "0.670036", "0.66708726", "0.6611949", "0.6599749", "0.65891653", "0.655293", "0.654293", "0.6535128",...
0.82787323
0
udpates dancer json with a new like
function updateDancer(id, newLikes) { const options = { method: "PATCH", headers: { "Content-Type": "application/json", "Accept": "application/json" }, body: JSON.stringify({ "likes": newLikes }) }; fetch(danceURL + `/${id}`, o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function like(id,old_likes){\n let params = {\n mehtod: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\"\n },\n \n body: JSON.stringify({\n id: id,\n \"likes\": 1 \n })\n }\n\n fetch(`http...
[ "0.5768835", "0.56652826", "0.551845", "0.5390701", "0.52794236", "0.52071625", "0.5185064", "0.51433766", "0.5134338", "0.51308316", "0.51221013", "0.5111658", "0.5099689", "0.5085732", "0.5066017", "0.5065425", "0.5059122", "0.5052313", "0.50423104", "0.5036189", "0.500684"...
0.5568297
2
increments page with a new like
function likeDancer() { const likeCount = dancerDetails.querySelector("#like-count") likeCount.innerText++ const id = likeCount.dataset.id updateDancer(id, Number(likeCount.innerText)) // updateDancer(Number(likeCount.innerText), likeCount.dataset.id) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function increaseLikesOnPage(e) {\n const oldLikes = parseInt(e.target.previousSibling.innerText)\n const newLikes = oldLikes + 1\n e.target.previousSibling.innerText = `${newLikes} likes`\n updateToyLikes(e);\n}", "function incrementLikesCount() {\n likesCount+=1;\n getMainBody(false);\n }", "function...
[ "0.77392346", "0.6736488", "0.6700819", "0.66539645", "0.65164626", "0.6431249", "0.6303905", "0.62544245", "0.62370753", "0.6199061", "0.6186752", "0.61786366", "0.61717623", "0.6164598", "0.6147658", "0.61349106", "0.6101212", "0.6074799", "0.6057323", "0.6054139", "0.60318...
0.5705741
50
decrements likes on page
function unlikeDancer() { const likeCount = dancerDetails.querySelector("#like-count") const id = likeCount.dataset.id if (likeCount.innerText > 0) { likeCount.innerText-- } updateDancer(id, Number(likeCount.innerText)) // updateDancer(likeCount.dataset.id) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function like() {\n\t\tvar likes = this;\n\t\tvar likes_count = likes.parentNode.childNodes[5];\n\t\tlikes.innerHTML = \"Unlike\";\n\t\ttest = likes_count.textContent.split(' ');\n\t\ttest1 = test.shift();\n\t\ttest1 = parseInt(test1);\n\t\ttest1 = test1 + 1;\n\t\ttest1 = test1.toString();\n\t\ttest = test1 + \" \...
[ "0.6583836", "0.6516105", "0.6506272", "0.6450788", "0.6369378", "0.62705976", "0.62702537", "0.6227262", "0.6220948", "0.6172465", "0.60712314", "0.60411894", "0.59862936", "0.5977645", "0.59543437", "0.5943995", "0.58791804", "0.5817923", "0.5804801", "0.57208294", "0.56672...
0.61757594
9
event listner for like and unlike button
function likeUnlike() { const like = dancerDetails.querySelector("#like") const unlike = dancerDetails.querySelector("#unlike") like.addEventListener("click", () => likeDancer()) unlike.addEventListener("click", () => unlikeDancer()) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleLikebtn() {\n setIsLike( !isLiked )\n \n }", "function handleLike(event) {\n $(this).preventDefault();\n likeTweet(this.attr('id'));\n }", "function likeEvent() {\n const likeInfo = {};\n if ($('#user-exists').length <= 0) return;\n\n const like = $(this);\n let l...
[ "0.78074557", "0.73325455", "0.71410257", "0.71379393", "0.70694286", "0.70062053", "0.69566584", "0.6941968", "0.69289726", "0.68331057", "0.68226504", "0.6821055", "0.68150055", "0.68116665", "0.67932683", "0.6790812", "0.676583", "0.6754259", "0.6741084", "0.67297834", "0....
0.6720582
21
event listner for feedback form
function feedbackForm() { form.addEventListener("submit", e => pushNewFeedback(e)) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function feedback() {\n alert(\"Your feedback is submitted.\");\n}", "formChanged() {}", "async function handleSubmit(e, data,) {\n e.preventDefault();\n alert(`Thank you for your message from ${form.email}`)\n const templateId = 'template_q2f0g8w';\n const serviceID = 'my_gmail';\n sendFeedbac...
[ "0.66121066", "0.648612", "0.6461592", "0.64307594", "0.6383772", "0.63751185", "0.6357032", "0.6318407", "0.6312478", "0.630353", "0.62859595", "0.6284295", "0.62811434", "0.62754744", "0.62409747", "0.6221437", "0.61859757", "0.61614794", "0.6133071", "0.61110526", "0.60986...
0.75805485
0
needed to call all functions together
function main() { getAllDancers() getSingleDancer(1).then(renderDancer) likeUnlike() feedbackForm() }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function callAllFunctions (){\n for (var i = 0; i < allStores.length; i++){\n allStores[i].hourlySalesCalculator();\n allStores[i].render();\n }\n}", "function doAll(/* args */){\n\t\tvar fn = Array.prototype.shift.call(arguments);\n\t\tif(!arguments.length) {\n\t\t\treturn fn();\n\t\t} else {\n\t\t\tfn(...
[ "0.65922487", "0.6564167", "0.64006853", "0.6352819", "0.6284887", "0.6251969", "0.59804755", "0.59699494", "0.5944573", "0.59268886", "0.5880203", "0.58384293", "0.58190274", "0.5818658", "0.5810996", "0.58057946", "0.5776947", "0.577252", "0.57714057", "0.5764204", "0.57120...
0.5315511
98
morgan assign an id to logs
function assignId(req, res, next) { req.id = uuid.v4(); next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logMyId() {\n\t// log some stuff to the dev tools\n\tconsole.log(this.id);\n\tdebugger;\n\t}", "function logMyId() {\n\tconsole.log(this.id);\n\n\tthis.style.opacity = 0.5;\n}", "set id(id) {\n idMap.set(this, id);\n }", "function uiLog_log(event, target, id) {\n // creates an entry\n var ...
[ "0.5937482", "0.5880422", "0.56828153", "0.5656917", "0.56331664", "0.5556873", "0.55495304", "0.55280715", "0.5513677", "0.5513677", "0.5513677", "0.5511705", "0.54626167", "0.54434246", "0.54290706", "0.54290706", "0.54290706", "0.54134566", "0.5325027", "0.53112954", "0.52...
0.4924052
44
Sample JavaScript code for photoslibrary.mediaItems.list See instructions for running APIs Explorer code samples locally:
function authenticate() { return gapi.auth2 .getAuthInstance() .signIn({ scope: "https://www.googleapis.com/auth/photoslibrary https://www.googleapis.com/auth/photoslibrary.readonly https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata" }) .then( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function execute() {\n return gapi.client.photoslibrary.mediaItems.list({}).then(\n function(response) {\n // Handle the results here (response.result has the parsed body).\n console.log(\"Response\", response);\n },\n function(err) {\n console.error(\"Execu...
[ "0.77718467", "0.72390896", "0.63175184", "0.6192429", "0.618877", "0.61756545", "0.611381", "0.60851794", "0.5852571", "0.5847404", "0.58251846", "0.5821159", "0.578986", "0.5678943", "0.5664433", "0.56605834", "0.565181", "0.5641033", "0.56403655", "0.5625254", "0.55946344"...
0.0
-1
Make sure the client is loaded and signin is complete before calling this method.
function execute() { return gapi.client.photoslibrary.mediaItems.list({}).then( function(response) { // Handle the results here (response.result has the parsed body). console.log("Response", response); }, function(err) { console.error("Execute error", err)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleClientLoad() {\n\t\t console.log(\"handle login\") \n gapi.client.setApiKey(apiKey);\n window.setTimeout(checkAuth,1);\n }", "function handleClientLoadLogin() {\n gapi.load('client:auth2', initClient);\n}", "function handleClientLoad() {\n loadAuth2()\n .then(in...
[ "0.72118515", "0.71926564", "0.708601", "0.7030448", "0.7030448", "0.7030448", "0.7010192", "0.7006774", "0.69645596", "0.6963629", "0.6960677", "0.69554806", "0.6945798", "0.6945798", "0.6945798", "0.6912597", "0.69072366", "0.68917704", "0.68917704", "0.6880108", "0.6880108...
0.0
-1
Assign handlers for each log level defined above. example: slanglog.wtf("app is unexpected!");
function assignHandlersToLogLevels(object) { for ( var level in app.Levels ) { if ( app.Levels.hasOwnProperty(level) ) { object[level.toLowerCase()] = getLogLevelHandler(level); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initializeLogHandlers() {\n this.removeAllListeners();\n this[logHandlersSymbol].forEach((handler) => {\n this.on('log', handler);\n });\n }", "static level(l) {\n let handlerName = `handler${l}`\n\n if (CGIError.handler) {\n process.removeListener('uncaughtException', CGIError.handler)...
[ "0.6452065", "0.63927686", "0.6392088", "0.62256855", "0.6139059", "0.6060921", "0.5985138", "0.5941517", "0.5924035", "0.5886269", "0.5874392", "0.58694726", "0.58694726", "0.58694726", "0.58241844", "0.5812456", "0.5812456", "0.5812456", "0.5812456", "0.5812456", "0.5812456...
0.7323814
0
Genera un objeto Blob con los datos en un archivo TXT
function generarTexto(datos) { var texto = []; texto.push(datos.contenido); texto.push('\n'); //El constructor de Blob requiere un Array en el primer //parámetro así que no es necesario usar toString. El //segundo parámetro es el tipo MIME del archivo return new Blob(texto, { type: 'text/plain' })...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeTextFile(text) {\r\n var data = new Blob([text], { type: 'text/plain' });\r\n\r\n textFile = window.URL.createObjectURL(data);\r\n\r\n return textFile;\r\n}", "function generarTexto(datos) {\r\n var texto = [];\r\n texto.push('Datos del Registro \\t\\n');\r\n texto.push('Nombre: ')...
[ "0.6956872", "0.6529179", "0.6436182", "0.62471646", "0.6194643", "0.6186143", "0.61504227", "0.60250413", "0.59637403", "0.59475166", "0.5927818", "0.590924", "0.59029067", "0.58888847", "0.58284175", "0.57741165", "0.5770419", "0.57008016", "0.56996477", "0.56956697", "0.56...
0.7153118
0
Source for `ask` function:
function ask(question, format, callback) { var stdin = process.stdin, stdout = process.stdout; stdin.resume(); stdout.write(question + ": "); stdin.once('data', function(data) { data = data.toString().trim(); if (format.test(data)) { callback(data); } else { stdout.write("It should match: "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ask(question) { this.io.emit('questionAsked', question); }", "function ask(question){\n return prompt(question);\n }", "function ask(question){\n return prompt(question);\n }", "function ask() {\n inquirer.prompt(questions).then(function(answers) {\n output.push(answers.userSe...
[ "0.7254274", "0.7213854", "0.7213854", "0.70064014", "0.6836477", "0.6747462", "0.6704553", "0.66634655", "0.6650905", "0.65623176", "0.6554675", "0.65456986", "0.6538118", "0.6535511", "0.6531798", "0.65144265", "0.64988035", "0.64892817", "0.647656", "0.6412489", "0.6390424...
0.5958989
86
Lifecycle methods Call action to retrieve specific story from API Note: CWM should be replaced with CDM
componentWillMount() { const {id} = this.props.match.params; this.props.fetchingStories(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async read(){\n this.core.logger.debug(\"I'm gonna tell you a Story about... \" + this.protocol.href);\n this.info.started_at = new Date();\n this.core.logger.debug(\"started_at: \" + this.info.started_at.toString());\n /* handles all situations from story. */\n this.result = await this.story.read(...
[ "0.62372047", "0.6201469", "0.6139255", "0.61009294", "0.5904301", "0.57767", "0.5739108", "0.5690758", "0.5690758", "0.5690758", "0.5690758", "0.5690758", "0.5690758", "0.5690758", "0.5690758", "0.5690758", "0.5657615", "0.56317985", "0.55940765", "0.5593388", "0.55349123", ...
0.50809264
79
Updates component once story is received Note: CWRP should be replaced with CDU
componentWillReceiveProps(nextProps) { const {initialText, segments} = nextProps.currentStory; //Create pages array that will contain story pages - first page contains initialText and 2 segments //Keep only the segments that were accepted in voting let pagesArray = []; let segmentsCopy = segments.f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _update() {\r\n this.component[this.prop] = this.control[this.prop];\r\n }", "update() {\n const state = this.store.getState();\n\n if (this.isPresenting !== state.webvr.isPresenting) {\n this.vrEffect.setFullScreen(state.webvr.isPresenting);\n this.isPresenting = state...
[ "0.62612545", "0.59874225", "0.5939735", "0.5880725", "0.5879512", "0.5839228", "0.57876074", "0.5726454", "0.5690201", "0.5635823", "0.5620441", "0.5586199", "0.5542804", "0.5488784", "0.5469534", "0.5466178", "0.5464972", "0.54634833", "0.54634833", "0.54634833", "0.5454168...
0.0
-1
! The buffer module from node.js, for the browser.
function i(t,e){if(t===e)return 0;for(var n=t.length,i=e.length,r=0,a=Math.min(n,i);r<a;++r)if(t[r]!==e[r]){n=t[r],i=e[r];break}return n<i?-1:i<n?1:0}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function typedBuffer() {\n}", "function createBuffer() {\n var ptr = exports.hb_buffer_create();\n return {\n ptr: ptr,\n /**\n ...
[ "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7284428", "0.7242275", "0.72009933", "0.71086955", "0.7015804", "0.68968946", "0.68760246", "0.6799534", "0.67715156", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67568755", "0.67...
0.0
-1
vuex v3.1.0 (c) 2019 Evan You
function Nt(t){function e(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFieldVuex() {\n return store.getters.dataField;\n }", "function vuexInit(){var options=this.$options;// store injection\n\tif(options.store){this.$store=options.store;}else if(options.parent&&options.parent.$store){this.$store=options.parent.$store;}}", "function U(He){Le&&(He._devtoolHook=Le,Le.emit('v...
[ "0.7099391", "0.6994619", "0.6737532", "0.6719945", "0.6624335", "0.6617637", "0.6617637", "0.6617637", "0.6586612", "0.6484872", "0.6355465", "0.6347838", "0.63409585", "0.63409585", "0.63409585", "0.63409585", "0.63409585", "0.63299984", "0.6301392", "0.62959933", "0.628171...
0.0
-1
A bunch of aliases
function create_basic_button_alias(prettyName, objectName, functionName, functionLabel) { mcCreateBlocklyBlock({ "type": objectName + "_constructor", "colour": "%{BKY_LOGIC_HUE}", "fields": [ { "name": objectName + "_variable", "label": "Set " + prettyName + " ", "type": "obj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static get aliases() {\n return [\n // <<-- Creer-Merge: aliases -->>\n \"MegaMinerAI-18-Saloon\",\n \"MegaMiner-AI-18-Saloon\",\n ];\n }", "function normalizeAliases () {\n var demanded = yargs.getDemanded()\n var options = yargs.getOptions()\n ...
[ "0.73312765", "0.69803864", "0.6921427", "0.6921427", "0.6921427", "0.6921427", "0.6899028", "0.6813502", "0.67136645", "0.67136645", "0.66517186", "0.66517186", "0.66249305", "0.65126216", "0.6441176", "0.6430544", "0.63462853", "0.63414294", "0.63269067", "0.6267741", "0.62...
0.0
-1
TODO: ADD SKILL FUNC cardList[hand[i]].defense
function shuffleDeck(deck) { let shufflingDeck = []; let number = deck.length; let randIndex = 0; for (let i = 0; i < number; i++) { randIndex = Math.floor(Math.random() * (number - i)); shufflingDeck.push(deck[randIndex]); deck.splice(randIndex, 1); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Ability(name, defense, cost) {\r\n this.name = name;\r\n this.defense = defense;\r\n this.cost = cost;\r\n}", "function getOffense(getKicker) {\r\n\tvar cOffense = 1 - getKicker.defense;\r\n\tif (getKicker.position == KEEPER){\r\n\t\tcOffense*=0.2;\r\n\t} else if (getKicker.position == DEFENCE){\r\n\...
[ "0.616502", "0.6038667", "0.60105914", "0.5991547", "0.592742", "0.5915817", "0.59044594", "0.5851303", "0.5850788", "0.5828098", "0.5783508", "0.5752287", "0.57468307", "0.5731402", "0.5722878", "0.5719337", "0.56933016", "0.56695044", "0.5646804", "0.5645639", "0.5636855", ...
0.0
-1
TODO: make this when rolling monsters works
function activatePhase() { currentPhase = "Activate"; turns++; alert("Turn " + turns + "!"); monstersHaveEvolved = [0,0,0,0,0]; if (monstersRolled.indexOf(1) === -1) { for (let i = 0; i < 5; i++) { if (monstersRolled[i] === 1) { con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function spawnMonsters(){\n\n if (frameCount % 60 === 0 ){\n var monsters = createSprite(600,170,10,40);\n\n monsters.velocityX = -12\n\n\n var rand = Math.round(random(1,2));\n switch(rand) {\n case 1: monsters.addImage(turtleImg);\n break;\n case 2: monsters.addImage(vectorImg);\n ...
[ "0.6085962", "0.60344476", "0.5972085", "0.5881815", "0.5715985", "0.5682564", "0.565306", "0.5611646", "0.5608409", "0.55924594", "0.5589664", "0.55790037", "0.5574116", "0.5571285", "0.55497664", "0.55444396", "0.5537497", "0.55363685", "0.5524822", "0.55205387", "0.5510848...
0.0
-1
Check if the specified jquery object is a graph
function isGraph(object){ return object.data('plot') !== undefined; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isGraph(object){\r\n return object.data('plot') !== undefined;\r\n}", "function isGraph(object){\r\n return object.data('plot') !== undefined;\r\n}", "function isGraph(object){\r\n return object.data('plot') !== undefined;\r\n}", "function isGraph(object){\r\n return object.data('plot') ...
[ "0.8175447", "0.8175447", "0.8175447", "0.8175447", "0.8175447", "0.8175447", "0.8175447", "0.8175447", "0.8175447", "0.6338133", "0.59091204", "0.5801085", "0.57210726", "0.5612005", "0.5564004", "0.5553985", "0.55411243", "0.55033004", "0.5489286", "0.5466731", "0.5466731",...
0.8163096
40
Export graph to a PNG
function exportToPNG(graphName, target) { var plot = $("#"+graphName).data('plot'); var flotCanvas = plot.getCanvas(); var image = flotCanvas.toDataURL(); image = image.replace("image/png", "image/octet-stream"); var downloadAttrSupported = ("download" in document.createElement("a")); if(do...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exportToPNG(graphName, target) {\r\n var plot = $(\"#\"+graphName).data('plot');\r\n var flotCanvas = plot.getCanvas();\r\n var image = flotCanvas.toDataURL();\r\n image = image.replace(\"image/png\", \"image/octet-stream\");\r\n \r\n var downloadAttrSupported = (\"download\" in document...
[ "0.7849067", "0.7849067", "0.7849067", "0.7849067", "0.7849067", "0.7849067", "0.7849067", "0.7849067", "0.7849067", "0.7753123", "0.75312555", "0.71433365", "0.7092544", "0.70352703", "0.6867685", "0.67768943", "0.67442304", "0.67023414", "0.6686984", "0.667032", "0.6656517"...
0.784196
40
Override the specified graph options to fit the requirements of an overview
function prepareOverviewOptions(graphOptions){ var overviewOptions = { series: { shadowSize: 0, lines: { lineWidth: 1 }, points: { // Show points on overview only when linked graph does not show // lines ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareOverviewOptions(graphOptions){\r\n var overviewOptions = {\r\n series: {\r\n shadowSize: 0,\r\n lines: {\r\n lineWidth: 1\r\n },\r\n points: {\r\n // Show points on overview only when linked graph does not show\r\n ...
[ "0.73779", "0.73779", "0.73779", "0.73779", "0.73779", "0.73779", "0.73779", "0.73779", "0.73779", "0.62092674", "0.5967795", "0.59612674", "0.5951707", "0.59486896", "0.59181345", "0.5797771", "0.5662106", "0.56536156", "0.56536156", "0.56536156", "0.56536156", "0.56536156...
0.73094785
40
Force axes boundaries using graph extra options
function prepareOptions(options, data) { options.canvas = true; var extraOptions = data.extraOptions; if(extraOptions !== undefined){ var xOffset = options.xaxis.mode === "time" ? 19800000 : 0; var yOffset = options.yaxis.mode === "time" ? 19800000 : 0; if(!isNaN(extraOptions.minX))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function plotGraph(){\n createAxis();\n // zoom.x(x).y(y);\n // console.log('setting scales');\n // console.log(x);\n // console.log(y);\n updateBoundaryGraph.setScales(x,y);\n }", "function zoomedxy(){\n if(x_scaling_on) zoomedx();\n ...
[ "0.65032744", "0.5890169", "0.586218", "0.5856265", "0.58495635", "0.58413315", "0.5802204", "0.57746273", "0.57746273", "0.57746273", "0.57746273", "0.5763253", "0.575023", "0.57310784", "0.5697724", "0.56942075", "0.5681799", "0.5667105", "0.5654072", "0.5598027", "0.558288...
0.0
-1
Filter, mark series and sort data
function prepareSeries(data, noMatchColor){ var result = data.result; // Keep only series when needed if(seriesFilter && (!filtersOnlySampleSeries || result.supportsControllersDiscrimination)){ // Insensitive case matching var regexp = new RegExp(seriesFilter, 'i'); result.series = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepareSeries(data){\n var result = data.result;\n\n // Keep only series when needed\n if(seriesFilter && (!filtersOnlySampleSeries || result.supportsControllersDiscrimination)){\n // Insensitive case matching\n var regexp = new RegExp(seriesFilter, 'i');\n result.series = $....
[ "0.7043811", "0.6555816", "0.6555816", "0.6555816", "0.6555816", "0.6555816", "0.6555816", "0.6555816", "0.6555816", "0.6555816", "0.63154864", "0.6274492", "0.62530506", "0.6248969", "0.61605895", "0.6149566", "0.6009977", "0.6001364", "0.5887727", "0.58291364", "0.5755083",...
0.6492654
40
Set the zoom on the specified plot object
function zoomPlot(plot, xmin, xmax, ymin, ymax){ var axes = plot.getAxes(); // Override axes min and max options $.extend(true, axes, { xaxis: { options : { min: xmin, max: xmax } }, yaxis: { options : { min: ymin, max: ymax } } }); // Redraw ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function zoomPlot(plot, xmin, xmax, ymin, ymax){\r\n var axes = plot.getAxes();\r\n // Override axes min and max options\r\n $.extend(true, axes, {\r\n xaxis: {\r\n options : { min: xmin, max: xmax }\r\n },\r\n yaxis: {\r\n options : { min: ymin, max: ymax }\r\n ...
[ "0.7632512", "0.7632512", "0.7632512", "0.7632512", "0.7632512", "0.7632512", "0.7632512", "0.7632512", "0.7632512", "0.7313368", "0.7313368", "0.7276658", "0.7141236", "0.6956535", "0.67885655", "0.67125636", "0.6707608", "0.6707608", "0.66667044", "0.66282934", "0.65982395"...
0.75938404
40
Prepares DOM items to add zoom function on the specified graph
function setGraphZoomable(graphSelector, overviewSelector){ var graph = $(graphSelector); var overview = $(overviewSelector); // Ignore mouse down event graph.bind("mousedown", function() { return false; }); overview.bind("mousedown", function() { return false; }); // Zoom on selection gra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initTransformElements(){ \n\n\ttranslateX = 0\n\ttranslateY = 0 \n\tscale = 1\n\n\t// used to manually pan\n\tsvgPan = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg:g\"); \n\tsvgPan.setAttribute('transform', 'translate(0,0)'); \n\n\t// used to manually zoom\n\tsvgScale = document.cr...
[ "0.6358099", "0.6252392", "0.6233621", "0.61969846", "0.600733", "0.5983027", "0.5962402", "0.59271544", "0.5927104", "0.59033644", "0.5897082", "0.57459104", "0.57447946", "0.5697514", "0.5688222", "0.5649307", "0.56079876", "0.55992675", "0.5595959", "0.55954057", "0.5587",...
0.5428209
77
Active Threads Over Time
function refreshActiveThreadsOverTime(fixTimestamps) { var infos = activeThreadsOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 19800000); } if(isGraph($("#flotActiveThreadsOverTime"))) { infos.createGraph(); }else{ va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "sendActiveThreadCountRes() {\n \n }", "function inc_busy()\n{\n background_jobs++;\n update_busy_indicator();\n}", "get threads() {\r\n return new Threads(this);\r\n }", "scheduler() {\n const {busyApps, appPriorities, ticks} = this;\n this.__apps.map((app, appId) => {\n return...
[ "0.6576497", "0.59847337", "0.58223873", "0.5718862", "0.55958724", "0.5595724", "0.55418223", "0.55237967", "0.5521639", "0.5500782", "0.54795545", "0.54381746", "0.54291314", "0.5426496", "0.54111665", "0.5372322", "0.53668267", "0.5361897", "0.53617936", "0.5358493", "0.53...
0.0
-1
Bytes throughput Over Time
function refreshBytesThroughputOverTime(fixTimestamps) { var infos = bytesThroughputOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 19800000); } if(isGraph($("#flotBytesThroughputOverTime"))){ infos.createGraph(); }else{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _calculateDownloadTime(sizeInBytes) {\n return Math$floor(sizeInBytes / _throughput); \n }", "_measureSpeed() {\n\t\tif(!this._socket) return;\n\t\tif(!this._connected) {\n\t\t\tthis._upspeed = 0;\n\t\t\tthis._downspeed = 0;\n\t\t}\n\t\tconst dt = new Date();\n\t\tconst dtime = (dt - this._mea...
[ "0.6508586", "0.6091145", "0.5925868", "0.591433", "0.5827529", "0.5751863", "0.57444245", "0.57324314", "0.56583023", "0.56513727", "0.5635747", "0.5610187", "0.56025785", "0.5594923", "0.55727565", "0.5547173", "0.5543636", "0.55419546", "0.5533669", "0.5532342", "0.5529149...
0.0
-1
Response Times Over Time
function refreshResponseTimeOverTime(fixTimestamps) { var infos = responseTimesOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 19800000); } if(isGraph($("#flotResponseTimesOverTime"))){ infos.createGraph(); }else{ var ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseTime (req, res) {\n if (!res._header || !req._startAt) {\n return ''\n }\n\n var tdiff = process.hrtime(req._startAt)\n , ms = tdiff[0] * 1e3 + tdiff[1] * 1e-6\n\n return ms.toFixed(3)\n}", "function getServerTime(request, response) {\r\n\tvar time = new Date();\r\n\t\r\n\tvar result =...
[ "0.7092822", "0.6836103", "0.639537", "0.63374466", "0.6251988", "0.61462384", "0.6100139", "0.6068924", "0.6020777", "0.60106874", "0.60009605", "0.59932894", "0.59754544", "0.597369", "0.59192896", "0.5914399", "0.5872192", "0.5872192", "0.5872192", "0.5850241", "0.5811009"...
0.0
-1
Connect Time Over Time
function refreshConnectTimeOverTime(fixTimestamps) { var infos = connectTimeOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 19800000); } if(isGraph($("#flotConnectTimeOverTime"))) { infos.createGraph(); }else { var cho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "connectTimeout() {\n var worker = cluster.workers[this.worker_key]\n if ( worker !== undefined ) {\n if ( !(worker.isConnected()) ) {\n var onset = this.trackingStartTime\n var diff = Date.now() - onset\n //\n //if ( diff > MAX_CONNECT_FAIL_TIME ) writeConsoleLog('log',{com...
[ "0.57900476", "0.5770421", "0.5753667", "0.5660272", "0.55595124", "0.553363", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5530261", "0.5528221", "0.55238473", "0.55238473", "0.55238473", "0.55238473", "0.55238473", "0.5523847...
0.0
-1
Response Time Percentiles Over Time
function refreshResponseTimePercentilesOverTime(fixTimestamps) { var infos = responseTimePercentilesOverTimeInfos; prepareSeries(infos.data); if(fixTimestamps) { fixTimeStamps(infos.data.result.series, 19800000); } if(isGraph($("#flotResponseTimePercentilesOverTime"))) { infos.create...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getReqPerTime() {\n let sum_time = 0.0\n let dif = 0.0\n for (let d = 0; d < this.state.data.length; d++) {\n dif = new Date(this.state.data[d].dt_end_log).getTime() - new Date(this.state.data[d].dt_Start_Log).getTime()\n sum_time += dif / 1000\n }\n \n return (sum_time / this.state.data....
[ "0.6469232", "0.59043026", "0.57266444", "0.55641556", "0.55416846", "0.55416846", "0.55416846", "0.55416846", "0.55416846", "0.5537933", "0.5534539", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", "0.55343693", ...
0.0
-1
Response Time vs Request
function refreshResponseTimeVsRequest() { var infos = responseTimeVsRequestInfos; prepareSeries(infos.data); if (isGraph($("#flotResponseTimeVsRequest"))){ infos.create(); }else{ var choiceContainer = $("#choicesResponseTimeVsRequest"); createLegend(choiceContainer, infos); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function responseTime (req, res) {\n if (!res._header || !req._startAt) {\n return ''\n }\n\n var tdiff = process.hrtime(req._startAt)\n , ms = tdiff[0] * 1e3 + tdiff[1] * 1e-6\n\n return ms.toFixed(3)\n}", "function getServerTime(request, response) {\r\n\tvar time = new Date();\r\n\t\r\n\tvar result =...
[ "0.75744617", "0.7416566", "0.6893877", "0.68084794", "0.6781717", "0.6561443", "0.652187", "0.65142745", "0.6462254", "0.6462254", "0.6462254", "0.6245028", "0.6245028", "0.62287295", "0.6191165", "0.61851764", "0.61500037", "0.61434627", "0.6104452", "0.60714453", "0.594592...
0.0
-1
Collapse the graph matching the specified DOM element depending the collapsed status
function collapse(elem, collapsed){ if(collapsed){ $(elem).parent().find(".fa-chevron-up").removeClass("fa-chevron-up").addClass("fa-chevron-down"); } else { $(elem).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-up"); if (elem.id == "bodyBytesThrou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collapse_unload(d,svg_dom)\n\t\t{\n\n\t\t\t//get all nodes\n\t\t\tvar nodes = d3.select(svg_dom).selectAll(\"g.node\").data();\n\t\t\tvar idx = nodes.findIndex( //find node that is already opened\n\t\t\t\t\tfunction(element)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn ( element.depth === d.depth && element.children ...
[ "0.6733574", "0.66582936", "0.6610769", "0.6518608", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", "0.6457594", ...
0.0
-1
Activates or deactivates all series of the specified graph (represented by id parameter) depending on checked argument.
function toggleAll(id, checked){ var placeholder = document.getElementById(id); var cases = $(placeholder).find(':checkbox'); cases.prop('checked', checked); $(cases).parent().children().children().toggleClass("legend-disabled", !checked); var choiceContainer; if ( id == "choicesBytesThroughpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function checkAll(id){\r\n toggleAll(id, true);\r\n}", "function c...
[ "0.5350751", "0.5350751", "0.5350751", "0.5350751", "0.5350751", "0.5350751", "0.5350751", "0.5350751", "0.5350751", "0.5349856", "0.53086656", "0.53086656", "0.53086656", "0.53086656", "0.53086656", "0.53086656", "0.53086656", "0.53086656", "0.53086656", "0.53086656", "0.530...
0.0
-1
Unchecks all boxes for "Hide all samples" functionality
function uncheckAll(id){ toggleAll(id, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hideAllCompareCheckboxes() {\n $(\".tabCompare\").children().hide().attr(\"checked\", false);\n }", "function hideAll() {\n standardBox.hide();\n imageBox.hide();\n galleryBox.hide();\n linkBox.hide();\n videoBox.hide();\n audioBox.hide();\n cha...
[ "0.73735034", "0.7109595", "0.70407724", "0.67941874", "0.67941874", "0.67941874", "0.67941874", "0.67941874", "0.67941874", "0.67941874", "0.67941874", "0.67941874", "0.6793761", "0.6736878", "0.67232853", "0.66981256", "0.6687469", "0.66822064", "0.6667903", "0.6663702", "0...
0.6752261
47
Checks all boxes for "Show all samples" functionality
function checkAll(id){ toggleAll(id, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showAll() {\n setAll(true)\n setObtained(false)\n setNotObtained(false)\n setSoft(false)\n setTech(false)\n }", "function showAll() {\n searchForSongs();\n displayAudioBookInformation();\n }", "function showALL() {\n\tshowEP();\n\t showStatics();\n}", "function hideAll() {\n ...
[ "0.65383095", "0.64155793", "0.6320195", "0.628058", "0.6256181", "0.62036693", "0.61933434", "0.6124063", "0.607787", "0.5965464", "0.59293544", "0.58966696", "0.58155423", "0.581098", "0.5780628", "0.57772005", "0.57167", "0.57102334", "0.5706709", "0.56940645", "0.569317",...
0.0
-1
Prepares data to be consumed by plot plugins
function prepareData(series, choiceContainer, customizeSeries){ var datasets = []; // Add only selected series to the data set choiceContainer.find("input:checked").each(function (index, item) { var key = $(item).attr("name"); var i = 0; var size = series.length; while(i < s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dataPrepare() {\n this.data = this.data.map(d => ({\n year: +d.year,\n numFires: +d.numFires.replaceAll(\",\", \"\"),\n totalAcres: +d.totalAcres.replaceAll(\",\", \"\"),\n }));\n }", "function myPlottingData(){\n\tthis['ResQTL'] = \"\", \n\tthis['ResRel'] = \"\"...
[ "0.65026766", "0.64606965", "0.64015836", "0.63966566", "0.63888216", "0.63803244", "0.626018", "0.61893857", "0.60438573", "0.6037035", "0.6032022", "0.5929968", "0.58311343", "0.5825605", "0.58024156", "0.5798956", "0.57841074", "0.5768615", "0.57676464", "0.57676464", "0.5...
0.57229435
88
Creates a legend in the specified element with graph information
function createLegend(choiceContainer, infos) { // Sort series by name var keys = []; $.each(infos.data.result.series, function(index, series){ keys.push(series.label); }); keys.sort(sortAlphaCaseless); // Create list of series with support of activation/deactivation $.each(keys, fu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawLegend(legend, options, element) {\n\n // extracts needed information from options\n var chartWidth = options.width;\n var chartHeight = options.height;\n\n // creates the legend area that the legend keys are rendered to\n var legendArea = $(\"<div>\").attr(\"id\", \"legendArea\");\n $(element)....
[ "0.70897", "0.69226307", "0.69047964", "0.69022197", "0.69022197", "0.69022197", "0.69022197", "0.69022197", "0.69022197", "0.69022197", "0.69022197", "0.69022197", "0.68828607", "0.68196434", "0.6776484", "0.6755833", "0.67309785", "0.66655225", "0.66655225", "0.66655225", "...
0.6915831
32
The squares that make up the initial grid are drawn. The fill style of the square is set to the designated color of the piece. The stroke style of each square is set to the color assigned to the STROKE_STYLE constant.
function initialDrawSquare(x, y, color) { CONTEXT.fillStyle = color; CONTEXT.fillRect(x * SQUARE_SIZE, y * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE); CONTEXT.strokeStyle = STROKE_STYLE; CONTEXT.strokeRect(x * SQUARE_SIZE, y * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawGridSquares(){\n\tcontext.globalCompositeOperation = 'destination-over';\n\tcontext.fillStyle = gridSquareColor;\n\tfor(let i = 0; i < rows; i++){\n\t\tfor(let j = 0; j < columns; j++){\n\t\t\tcontext.fillRect(outerBorder + innerBorder + j * squareSize, outerBorder + innerBorder + i * squareSize, squa...
[ "0.7051687", "0.684991", "0.67865324", "0.67512536", "0.6750336", "0.67141116", "0.6649118", "0.6639936", "0.6636195", "0.6614978", "0.6553248", "0.65421075", "0.6540261", "0.65398586", "0.65050614", "0.649173", "0.64900154", "0.6489399", "0.6482288", "0.6458693", "0.64504856...
0.61599356
56
The grid is displayed on the page by drawing each square based on the colors stored in the grid array.
function initialDrawGrid() { for (r = 0; r < ROW; r++) { for (c = 0; c < COLUMN; c++) { initialDrawSquare(c, r, grid[r][c]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawGrid() {\n for (r = 0; r < ROW; r++) {\n for (c = 0; c < COLUMN; c++) {\n drawSquare(c, r, grid[r][c]);\n }\n }\n }", "function drawGridSquares(){\n\tcontext.globalCompositeOperation = 'destination-over';\n\tcontext.fillStyle = gridSquareColor;\n...
[ "0.83033204", "0.78694075", "0.78515846", "0.77725744", "0.7712342", "0.7696912", "0.766731", "0.76554775", "0.7623034", "0.76176816", "0.76024914", "0.75798345", "0.75261563", "0.7446244", "0.74351907", "0.7434005", "0.74154747", "0.7397706", "0.7389492", "0.7365479", "0.730...
0.76829934
6
This function controls the game.
function play() { // The initial score for the game is set to 0. let score = 0; SCORE_ELEMENT.innerHTML = score; // The contents of the game grid are stored in an array of arrays. // The colors of the squares in each respective row are contained // in their own array. // Initially all of th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "runGame() {\r\n this.resetGame();\r\n this.setMouseListener();\r\n }", "function gameStart() {\r\n newgame.disabled = true;\r\n holdHand.disabled = false;\r\n hit.disabled = false;\r\n }", "startGame() {\n if (this.tick <= 50) {\n this.tutorial.alpha -...
[ "0.72265995", "0.71770644", "0.7115634", "0.7024736", "0.7023685", "0.69718623", "0.69651425", "0.6957778", "0.69313526", "0.6928362", "0.6921468", "0.69194734", "0.6897285", "0.68896854", "0.688669", "0.68541026", "0.6854098", "0.6831198", "0.6825733", "0.67932343", "0.67876...
0.0
-1
The squares that make up the initial grid are drawn. The fill style of the square is set to the designated color of the piece. The stroke style of each square is set to the color assigned to the STROKE_STYLE constant.
function drawSquare(x, y, color) { CONTEXT.fillStyle = color; CONTEXT.fillRect(x * SQUARE_SIZE, y * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE); CONTEXT.strokeStyle = STROKE_STYLE; CONTEXT.strokeRect(x * SQUARE_SIZE, y * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawGridSquares(){\n\tcontext.globalCompositeOperation = 'destination-over';\n\tcontext.fillStyle = gridSquareColor;\n\tfor(let i = 0; i < rows; i++){\n\t\tfor(let j = 0; j < columns; j++){\n\t\t\tcontext.fillRect(outerBorder + innerBorder + j * squareSize, outerBorder + innerBorder + i * squareSize, squa...
[ "0.7050566", "0.6849565", "0.67858416", "0.6750722", "0.67499095", "0.6713191", "0.6649307", "0.66384304", "0.66362286", "0.66147363", "0.6551829", "0.65418833", "0.65393853", "0.6538365", "0.65033793", "0.64906573", "0.64885473", "0.64884084", "0.648155", "0.6457875", "0.644...
0.0
-1
The grid is displayed on the page by drawing each square based on the colors stored stored in the grid array.
function drawGrid() { for (r = 0; r < ROW; r++) { for (c = 0; c < COLUMN; c++) { drawSquare(c, r, grid[r][c]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawGridSquares(){\n\tcontext.globalCompositeOperation = 'destination-over';\n\tcontext.fillStyle = gridSquareColor;\n\tfor(let i = 0; i < rows; i++){\n\t\tfor(let j = 0; j < columns; j++){\n\t\t\tcontext.fillRect(outerBorder + innerBorder + j * squareSize, outerBorder + innerBorder + i * squareSize, squa...
[ "0.7889315", "0.7848441", "0.7784405", "0.7717196", "0.7695827", "0.7693608", "0.7664694", "0.76501167", "0.76188165", "0.76170397", "0.75985897", "0.7573653", "0.752785", "0.7459096", "0.74524057", "0.74313515", "0.7410698", "0.7406189", "0.7387349", "0.73587954", "0.7294009...
0.8306204
0
Pieces can be controlled using the arrow keys on the keypad.
function keyControl(event) { if (event.keyCode == 37 && buttonPressed != true && gameOver != true) { keyPressed = true; p.moveLeft(); } else if (event.keyCode == 38 && buttonPressed != true && gameOver != true) { keyPressed = true; p.rotate(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function keyPressed () {\n if (activePiece.x <= 25 && key === 'ArrowLeft') {\n activePiece.boundary();\n }\n if (activePiece.x > 25 && key === 'ArrowLeft') {\n activePiece.shiftLeft();\n }\n if (activePiece.x >= 225 && key === 'ArrowRight') {\n activePiece.boundary();\n }\n if (activePiece.x < 225 ...
[ "0.74266034", "0.67042947", "0.66455823", "0.65516496", "0.6528048", "0.65195054", "0.6517027", "0.6500596", "0.6492984", "0.6476972", "0.64538705", "0.6449576", "0.64494896", "0.6437404", "0.6416731", "0.6415651", "0.64064807", "0.6393024", "0.6389212", "0.63758767", "0.6360...
0.6346846
21
Pieces can be controlled using the onscreen buttons.
function buttons(button) { if (button == "left-button" && keyPressed != true && gameOver != true) { buttonPressed = true; p.moveLeft(); } else if (button == "rotate-button" && keyPressed != true && gameOver != true) { buttonPressed = true; p.rotate(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "showPieces(){\n this.showPiecesSide(this.view.gamoraPieces);\n this.showPiecesSide(this.view.thanosPieces);\n\n }", "makePickingPieces() {\n this.makePickingPiecesSide(this.view.gamoraPieces);\n this.makePickingPiecesSide(this.view.thanosPieces);\n }", "function selectPiece(){...
[ "0.6940747", "0.6899415", "0.6601262", "0.6489281", "0.64257646", "0.6347425", "0.6345898", "0.6325999", "0.6238579", "0.6238184", "0.61729044", "0.61543447", "0.6120716", "0.61202484", "0.6065501", "0.6036521", "0.59848905", "0.59772176", "0.59736925", "0.59579784", "0.59213...
0.0
-1
A random piece is selected from the PIECES array.
function randomPiece() { let r = (randomN = Math.floor(Math.random() * PIECES.length)); return new Piece(PIECES[r][0], PIECES[r][1]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomPiece(){\n let r = randomN = Math.floor(Math.random() * PIECES.length) //math.floor rounds the number to an integer\n return new Piece( PIECES[r][0],PIECES[r][1]); //math.raandom generates numbers between 0 and 1 \n} //to generate numbers between 0 and 7, multiply math.random by the length o...
[ "0.7730141", "0.74511737", "0.7121357", "0.7038559", "0.6746676", "0.6742536", "0.6645256", "0.66376185", "0.6616658", "0.66144204", "0.66131616", "0.65025914", "0.64585626", "0.6458381", "0.6415457", "0.64089036", "0.63552827", "0.63465554", "0.62734514", "0.62621766", "0.62...
0.7872804
0
Creates a new instance for a given TraceablePeerConnection
constructor(peerconnection) { this.pc = peerconnection; const bitrateSettings = this.pc.options?.videoQuality?.maxBitratesVideo; const standardBitrates = { low: LD_BITRATE, standard: SD_BITRATE, high: HD_BITRATE, ssHigh: HD_BITRATE }; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createPeerConnection() {\n\ttry {\n\t\tpc = new RTCPeerConnection(null);\n\t\tpc.onicecandidate = handleIceCandidate;\n\t\tpc.onaddstream = handleRemoteStreamAdded;\n\t\tpc.onremovestream = handleRemoteStreamRemoved;\n\t\tconsole.log('Created RTCPeerConnnection');\n\t} catch(e) {\n\t\tconsole.log('Failed ...
[ "0.5895744", "0.58282775", "0.58175236", "0.5271131", "0.526039", "0.5143171", "0.511781", "0.51168424", "0.5116278", "0.5097087", "0.5080545", "0.50505054", "0.5040513", "0.4981092", "0.4971017", "0.49463406", "0.4936365", "0.4897085", "0.4886339", "0.4878321", "0.4869243", ...
0.47708553
28
Called to create Enemies
function spawnEnemy(){ if(enemies.length < enemyLimit){ let enemy = new Enemy(scene, player, bullets); enemies.push(enemy); clearInterval(enemyInterval); enemyInterval = window.setInterval(spawnEnemy, (15000 + Math.random()) * 2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createEnemies() {\n //\n // Create 10 enemies at varying velocities and\n // positions\n //\n for (var i = 1; i < 11; i++) {\n\tvar newEnemy = new Enemy();\n\t//newEnemy.x = getRandomInt(0,ctx.canvas.width - \n\tnewEnemy.x = getRandomInt(0,505 - \n\t newEnemy.width);\n\t// Center enemy o...
[ "0.84626347", "0.8047647", "0.8008858", "0.7990942", "0.7980941", "0.7962821", "0.79204017", "0.790223", "0.7855182", "0.7799095", "0.77821296", "0.7698997", "0.76750356", "0.7672893", "0.7623646", "0.7584746", "0.7583012", "0.7582091", "0.75609434", "0.75492346", "0.75453115...
0.6999748
60
Called to create asteroids
function spawnAsteroid(size, position, rotation){ let asteroid; let transform = makeNewTransform(); if(size != null){ asteroid = new Asteroid(scene, player, size, position, rotation); } else{ asteroid = new Asteroid(scene, player, (1 + Math.floor( Math.random() * 3) ), transfo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "create () {\n let asteroidsGroup = this.gameObjects['asteroids-group'] = new AsteroidsGroup(this.game);\n\n this.spawnAsteroids(25);\n this.setupUI();\n }", "function createAsteroids() {\n\n\n var rdn = Math.floor(Math.random()*4)+1;\n var otherAsteroid;\n\n if (isChoque==false &...
[ "0.7490284", "0.73667514", "0.7199101", "0.71784633", "0.7157025", "0.7108708", "0.7054249", "0.68899524", "0.68616104", "0.6808735", "0.6801411", "0.6716019", "0.6703822", "0.6614965", "0.6590728", "0.6400692", "0.6389192", "0.6369657", "0.63581413", "0.6351482", "0.6347443"...
0.62697273
26
Use the supplied metadata parameters to create a new page.
function create_new_page( path, params, k, err ) { if (!$.perc_fakes.page_service.create_page) { $.perc_pathmanager.get_folder_path(path, function(fp){ createPage(fp, params, k, err); }, err); } else { if (false) err(I18N.messa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static create(web, pageName, title, pageLayoutType = \"Article\") {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n // patched because previously we used the full page name with the .aspx at the end\r\n // this allows folk's existing code to work after the re-write to the...
[ "0.6405617", "0.6236765", "0.6220943", "0.5948792", "0.59264827", "0.5885102", "0.58520806", "0.56906945", "0.56636536", "0.5659652", "0.5639217", "0.56233007", "0.5594853", "0.55797887", "0.551591", "0.5499635", "0.54934555", "0.547001", "0.54488236", "0.54224265", "0.542242...
0.6556623
0
Renders an individual region of a page. Called by PercPageModel.render()
function render_region(regionId, pageObject, callback ) { $.ajax({ url : $.perc_paths.PAGE_PREVIEW + regionId, type : "POST", contentType : "application/xml", dataType : "xml", data : pageObject, processData ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onPageLoad() { \n drawRegions();\n}", "renderPage() {}", "renderPage(page, x, y, width, height) {\n this.render.renderWidgets(page, x - this.containerLeft, y - this.containerTop, width, height);\n }", "onHighlight() {\n if (this.isHighlightEditRegion) {\n this.highligh...
[ "0.6868209", "0.6615493", "0.63745904", "0.6172678", "0.5995099", "0.59705544", "0.58953846", "0.57780075", "0.57318467", "0.5666416", "0.5645543", "0.5642336", "0.5601137", "0.5563173", "0.55376494", "0.55376494", "0.55211127", "0.55208063", "0.55208063", "0.5510084", "0.542...
0.68827105
0
Binary search Can be used in sorted array
function binarySearch(arr, target) { let startIdx = 0, endIdx = arr.length - 1; while (startIdx < endIdx) { let midIdx = Math.floor((startIdx + endIdx) / 2); if (target === arr[midIdx]) { return midIdx; } else if (target > arr[midIdx]) { startIdx = midIdx; } else { endIdx = mi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function binarySearch(arr, val) {\n\n}", "function binarySearch(arr, value) {\n\n}", "function binarySearch(sortedNums, searchNum) {}", "function binarySearch(searchElement, array) {\n var currentElement;\n var minIndex = 0;\n var maxIndex = array.length - 1;\n while (minIndex <= maxIndex) {\n ...
[ "0.82354236", "0.8229153", "0.80730635", "0.80407053", "0.80005056", "0.79800254", "0.79248583", "0.79109186", "0.78663284", "0.784495", "0.7841242", "0.7837952", "0.77768505", "0.7763153", "0.77350754", "0.77295196", "0.7701975", "0.77008945", "0.76997644", "0.7675651", "0.7...
0.75406075
42
3 Other algorythms squre root for integer with binary search.
function sqrtInt(num) { if (num === 0 || num === 1) return num; var start = 0, end = num, result; while (start <= end) { let midPoint = parseInt((start + end) / 2); if (midPoint * midPoint == num) { return midPoint; } else if (midPoint * midPoint > num) { end = midPoint - 1; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sqRoot(num, first = 0, last = Math.floor(num / 2)) {\n let mid = Math.floor((last - first) / 2) + first;\n let sqrMid = mid * mid;\n if (sqrMid === num) {\n return mid;\n } else if ( sqrMid < num ) {\n return sqRoot(num,mid, last);\n } else {\n return sqRoot(num, first, mid);\n }\n}", "fu...
[ "0.6760185", "0.66190493", "0.6290938", "0.6236165", "0.6102946", "0.60989463", "0.6063817", "0.60614586", "0.59686625", "0.5948725", "0.59291345", "0.5887005", "0.5856464", "0.58134407", "0.578019", "0.5776663", "0.5717159", "0.5704919", "0.56918335", "0.5685874", "0.5678407...
0.6382654
2
Web component lifecycle hook to update changed properties
attributeChangedCallback(name, oldValue, newValue) { // Update the attribute internally this[name] = newValue; // Update the component this.updateComponent(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onCustomWidgetBeforeUpdate(changedProperties) {\r\n\r\n\t\t}", "_propertiesChanged(...args) {\n super._propertiesChanged(...args);\n render(this.render(), this.shadowRoot);\n }", "update(_changedProperties) {\n super.update();\n }", "updated(changedProperties) {\n super.updated(change...
[ "0.6871256", "0.6717561", "0.66994363", "0.66225123", "0.65901166", "0.6586902", "0.6561013", "0.6561013", "0.6547535", "0.65301615", "0.6528828", "0.6528828", "0.6528828", "0.64749026", "0.6457974", "0.63994336", "0.63959605", "0.6393688", "0.6393688", "0.6393688", "0.639368...
0.0
-1
When component is first attached to the DOM, get its defined attributes and set up listeners
connectedCallback() { // Get all attributes this['app-context'] = this.getAttribute('app-context'); this['url'] = this.getAttribute('url'); this.$link = this.shadowRoot.getElementById('help-link'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init () {\n this.classList.add('is-ui-component');\n\n const elReady = el => el._isReady || Promise.resolve(el);\n const children = [...[...this.children].map(elReady)];\n if (this.shadowRoot) children.push.apply(children, [...this.shadowRoot.children].map(elReady));\n\n [...this.attributes].forEach...
[ "0.6935358", "0.61902326", "0.61902326", "0.61664987", "0.6137729", "0.61129713", "0.60673624", "0.60486263", "0.6012603", "0.6002122", "0.6001327", "0.5992742", "0.59679145", "0.5963474", "0.5953864", "0.5889969", "0.5886793", "0.58768547", "0.58763784", "0.58757156", "0.585...
0.5920936
15
Update the component state
updateComponent() { const materialLaunchIcon = this.shadowRoot.getElementById('launch-icon'); this.helpLinkElement.innerHTML = this['app-context'] + " help and resources "; this.helpLinkElement.appendChild(materialLaunchIcon); this.helpLinkElement.setAttribute("href", this['url']); if (this['url'] &...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateState() {\n\t\tthis.trigger(this.state);\n\t}", "update() {\n BaseState.update.call(this);\n }", "update(data={}) {\n this.state = Object.assign(this.state, data);\n\n // notify all the Listeners of updated state\n this.notifyObervers(this.state);\n }", "update() {\n cons...
[ "0.758089", "0.7373245", "0.73216915", "0.7259343", "0.72478694", "0.72215575", "0.7218436", "0.71151507", "0.70241773", "0.7013728", "0.6971171", "0.69351995", "0.69212717", "0.6915723", "0.69022864", "0.6879385", "0.68724734", "0.6871152", "0.6862854", "0.683684", "0.682841...
0.0
-1
Funktion der hent tekstfont
function preload() { fontFlameFetish = loadFont("https://firebasestorage.googleapis.com/v0/b/test-454bb.appspot.com/o/FlameFetish.ttf?alt=media&token=61d214fd-b336-4673-b4a8-d5ca09eabbee"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get fontStyle() {}", "function textStyle() {\n return { font: \"9pt Segoe UI,sans-serif\", stroke: \"white\" };\n }", "get textStyle() {\n if (this.i.o == null) {\n return null;\n }\n return this.i.o.fontString;\n }", "function formatText() {\n stroke(25...
[ "0.64834887", "0.6208256", "0.6188712", "0.6177196", "0.6164457", "0.6140814", "0.61362815", "0.61219627", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", "0.6096556", ...
0.0
-1
Funktion bliver musen sluppet?
function mouseReleased() { if (backbutton.register()) { site = 'main'; } for (let i = 0; i < flowers.length; i++) { if (flowers[i].register() && site == 'main') { site = flowers[i].name; print(flowers[i].name); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function mostraNotas(){}", "private public function m246() {}", "protected internal function m252() {}", "transient private internal function m185() {}", "transient private protected internal function m182() {}", "function wa(){}", "transient protected internal ...
[ "0.6223973", "0.61997664", "0.619183", "0.61433744", "0.5998979", "0.5961992", "0.59344834", "0.58613956", "0.57694507", "0.56271243", "0.559916", "0.5586822", "0.5586822", "0.5586822", "0.55812764", "0.5578597", "0.55764157", "0.5541511", "0.5531768", "0.55211174", "0.550568...
0.0
-1
Clears the timers for the animations. This is so that if a person clicks the start/reset button during an animation, they will stop...
function clearAnimationTimers() { for(var i = 0; i < animationTimers.length; i++) { var timer = animationTimers.pop(); if(timer) { try{ clearTimout(timer); }catch(e){ //really can't do anything} } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear_animation_timer() {\n\n clearTimeout(window.animationTimer1);\n clearTimeout(window.animationTimer2);\n clearTimeout(window.animationTimer3);\n clearTimeout(window.animationTimer4);\n\n }", "function clearAllTimers() {\n clearInterval(intervalI...
[ "0.82685405", "0.74281377", "0.73543197", "0.7308153", "0.7303631", "0.72852075", "0.72555035", "0.72555035", "0.7178236", "0.7177879", "0.71353304", "0.71042985", "0.70644474", "0.7040149", "0.702235", "0.7021661", "0.70128965", "0.6978981", "0.6974211", "0.6967145", "0.6951...
0.7771542
1
5 files, no aggregation.
function test2() { const data = cloneData('test2') .slice(0, 5) .map((rec, i) => updateRecord(rec, 1, Math.pow(2, i))); updateDb(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async normalizeFilesCount() {\n let files = await fse.readdir(this.options.folder);\n\n if(!files.length) {\n return await this.addNewFile();\n }\n\n if(files.length <= this.options.filesCount) {\n return;\n }\n\n const diff = files.length - this.options.filesCount;\n ...
[ "0.6012779", "0.5854225", "0.58489954", "0.5762943", "0.5431782", "0.5413596", "0.54057014", "0.5317222", "0.5298655", "0.5284057", "0.5268044", "0.5262119", "0.5260202", "0.5260202", "0.5255608", "0.52429885", "0.5223837", "0.52179736", "0.51702386", "0.5166182", "0.5163684"...
0.0
-1
10 files, aggregation of 2 consecutive bins.
function test3() { const data = cloneData('test3') .slice(0, 10) .map((rec, i) => updateRecord(rec, 1, Math.pow(2, i))); updateDb(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compress_long_tail_bins(bins) {\n var new_bins = [\n {bin: \"0\", count: 0},\n {bin: \"1\", count: 0},\n {bin: \"2 - 4\", count: 0},\n {bin: \"5 - 10\", count: 0},\n {bin: \"11 - 30\", count: 0},\n {bin: \"31 - 50\", count: 0},\n {bin: \"51 - 70\", count: 0},\n {bin: \"71 - 90\", ...
[ "0.5505053", "0.5299052", "0.51722956", "0.5154488", "0.495673", "0.49553874", "0.49318928", "0.48837936", "0.48811638", "0.48731545", "0.48374355", "0.47663623", "0.47297758", "0.47277853", "0.47144383", "0.4659598", "0.46595687", "0.45675826", "0.4555198", "0.4551765", "0.4...
0.0
-1
12 files, aggregation of 3 consecutive bins + projection into non existing bins.
function test4() { const data = cloneData('test4') .slice(0, 13) .map((rec, i) => updateRecord(rec, 1, Math.pow(2, i))); updateDb(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function binSortForBar(obj, colNum) {\n // console.log(obj, colNum);\n\n let tempArray = [];\n obj.csvArray.map((item) => {\n if (item[colNum]) {\n tempArray.push(item[colNum]);\n }\n })\n tempArray.shift();\n //looping through our header-less array to determine how many different types of qual da...
[ "0.56308156", "0.5535207", "0.5531571", "0.5505166", "0.53058827", "0.5225971", "0.51665324", "0.51656985", "0.502054", "0.48618403", "0.47926998", "0.4752511", "0.4719233", "0.46172392", "0.4601268", "0.4584785", "0.45101914", "0.45095322", "0.4471297", "0.44460076", "0.4427...
0.0
-1