text
stringlengths
7
3.69M
const mongoose = require('mongoose'); // connection à la base de donnée (le serveur mongo doit être lancé et la base doit avoir ét créée) mongoose.connect("mongodb://localhost/mydb"); const models = require('./models'); User = models.User; Todo = models.Todo; // crée un User avec un name et un email User.create( {name: "Nicolas", email: "xxx@xxx.com"}, (err, user) => { // user créé ! }) // recherche un user avec le name Nicolas et modifie son email User.findOneAndUpdate( {name: "Nicolas"}, {email: "yyy@yyy.xxx"}, (err, user) => { // user mis à jour ! }) // récupère tous les utilisateurs User.find( {}, (err, users) => { console.log(users); }) // récupère un utilisateur selon le filtre User.findOne( {name: "Nicolas"}, (err, users) => { console.log(users); }) // supprime un utilisateur selon le filtre User.deleteOne( {name: "Nicolas"}, (err) => { // users supprimés ! } )
import React, { useEffect, useState } from 'react'; import './style.css'; import Header from '../../components/UI/homePageLayout/header'; import BodyContainer from '../../components/UI/homePageLayout/bodyContainer'; import Navbar from '../../components/UI/homePageLayout/navbar'; import { useDispatch, useSelector } from 'react-redux'; import AddPostForm from '../../components/UI/homePageLayout/AddPostForm'; import { getPosts } from '../../Redux/Store'; const HomePage = (props) => { const auth = useSelector(state => state.auth); if(auth.authenticate){ localStorage.setItem('theme', 'dark'); } const postRefresh = useSelector(state=>state.post.postRefresh); const dispatch = useDispatch(); useEffect(()=>{ dispatch(getPosts()); },[postRefresh]) return ( <> <Header /> <BodyContainer /> < AddPostForm /> <br/> <br/> <Navbar/> </> ) } export default HomePage;
import React from "react"; import { ApolloClient, InMemoryCache } from "@apollo/client"; import { ApolloProvider } from "@apollo/client/react"; import { SchemaLink } from "@apollo/client/link/schema"; import { makeExecutableSchema } from "@graphql-tools/schema"; import { addMocksToSchema } from "@graphql-tools/mock"; import { typeDefs, resolvers } from "./pet"; const commonMocks = { Int: () => 1, String: () => "Pet", }; const schema = makeExecutableSchema({ typeDefs, }); const schemaWithMocks = addMocksToSchema({ schema, resolvers, mocks: commonMocks, preserveResolvers: false, }); const client = new ApolloClient({ link: new SchemaLink({ schema: schemaWithMocks }), cache: new InMemoryCache(), }); const MockProvider = ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ); export default MockProvider;
import {useEffect, useState} from "react"; import {client} from '../utils'; import {createContext} from "react"; export function useMocks() { const [mocks, setMocks] = useState(null); const [error, setError] = useState(null); const isLoading = mocks === null && error === null; const hasError = Boolean(error); const loadMocks = async () => { setMocks(null); setError(null); try { const { data } = await client.get('/mocks'); setMocks(data); } catch(e) { setError(e); } }; const createMock = async (mock) => { await client.post('/mocks', mock); await loadMocks(); }; const updateMock = async(id, mock) => { await client.put(`/mocks/${id}`, mock); await loadMocks(); }; const removeMock = async (id) => { await client.delete(`/mocks/${id}`); await loadMocks(); }; const enableMock = async (id) => { await client.put(`/mocks/${id}/enable`); await loadMocks(); }; const disableMock = async (id) => { await client.put(`/mocks/${id}/disable`); await loadMocks(); }; useEffect(() => { loadMocks(); }, []); return { mocks, isLoading, hasError, removeMock, createMock, updateMock, enableMock, disableMock, }; } export const Mocks = createContext(null);
/* GAME RULES: - The game has 2 players, playing in rounds - In each turn, a player rolls a dice as many times as he whishes. Each result get added to his ROUND score - BUT, if the player rolls a 1, all his ROUND score gets lost. After that, it's the next player's turn - The player can choose to 'Hold', which means that his ROUND score gets added to his GLBAL score. After that, it's the next player's turn - The first player to reach 100 points on GLOBAL score wins the game */ /********************************************** *** VARIABLES **********************************************/ let globalScore = 0; let roundScore = 0; let currentPlayer = 0; let dicePNG = document.querySelector("body > div > img.dice"); let playerOneScore = document.querySelector("#score-0"); let playerTwoScore = document.querySelector("#score-1"); let playerOneRoundScore = document.querySelector("#current-0"); let playerTwoRoundScore = document.querySelector("#current-1"); let diceObject = document.querySelector(".dice"); let rollBtn = document.querySelector("body > div > button.btn-roll"); let holdBtn = document.querySelector("body > div > button.btn-hold"); let player1Panel = document.querySelector("body > div > div.player-0-panel"); let player2Panel = document.querySelector("body > div > div.player-1-panel"); let modal = document.getElementById("popup1"); let winnerName; let playerName; /********************************************** *** APP **********************************************/ //Initialize Game newGame(); //New Game Button document.querySelector('.btn-new').addEventListener('click', newGame); //Roll Dice Button rollBtn.addEventListener( 'click', function() { let DiceArr = [1, 2, 3, 4, 5, 6]; let randomDice = DiceArr[Math.floor(Math.random() * DiceArr.length)]; diceObject.src = "dice-" + randomDice + ".png"; if (randomDice !== 1) { roundScore += randomDice; document.querySelector('#score-' + currentPlayer).innerHTML = roundScore; } else { nextPlayer(); } } ); //Hold Score Button holdBtn.addEventListener( 'click', function() { globalScore[currentPlayer] += roundScore; document.querySelector('#current-' + currentPlayer).innerHTML = globalScore[currentPlayer]; playerName = document.querySelector('#name-' + currentPlayer).innerHTML; if (globalScore[currentPlayer] >= 100) { congratulations(playerName); } else { nextPlayer(); } } ); /********************************************** *** FUNCTIONS **********************************************/ function newGame() { globalScore = [0, 0]; roundScore = 0; currentPlayer = 0; dicePNG.src = "dice-1.png"; playerOneScore.innerHTML = "0"; playerTwoScore.innerHTML = "0"; playerOneRoundScore.innerHTML = "0"; playerTwoRoundScore.innerHTML = "0"; } function nextPlayer() { if (currentPlayer === 0) { currentPlayer = 1; } else { currentPlayer = 0; } roundScore = 0; playerOneScore.innerHTML = "0"; playerTwoScore.innerHTML = "0"; document.querySelector('.player-0-panel').classList.toggle('active'); document.querySelector('.player-1-panel').classList.toggle('active'); } function congratulations(playerName) { document.getElementById("winner").innerHTML = playerName; // show congratulations modal modal.classList.add("show"); //closeicon on modal closeModal(); } // @desciption for user to play Again function playAgain() { modal.classList.remove("show"); newGame(); }
"use strict"; const modFs = require("fs"), modPath = require("path"), modMime = require("./mime.js"), modVfs = require("./vfs.js"); /* Creates a hierarchy of directories recursively. */ function mkdirs(path, callback) { var dir = modPath.dirname(path); var name = modPath.basename(path); modVfs.stat(dir, function (err, stat) { console.debug("mkdir " + path); if (! err) { modVfs.mkdir(path, function (err) { callback(err); }); } else { mkdirs(dir, function (err) { callback(err); }); } }); } exports.mkdirs = mkdirs; function uriToPath(uri, contentRoot) { return modPath.join(contentRoot, decodeURIComponent(uri).replace(/\//g, modPath.sep)); } exports.uriToPath = uriToPath; /* Limits the files in the given directory to a certain amount by removing * the oldest files. */ function limitFiles(path, amount) { modFs.readdir(path, function (err, files) { if (err) { return; } var result = []; for (var i = 0; i < files.length; ++i) { var filePath = modPath.join(path, files[i]); modFs.stat(filePath, function (file) { return function (err, stat) { result.push([file, stat]); if (result.length === files.length) { result.sort(function (a, b) { if (! a[1] || ! b[1]) { return 0; } else { return a[1].mtime - b[1].mtime; } }); while (result.length > amount) { var path = result[0][0]; console.debug("Clearing old file: " + path + " (" + result[0][1].mtime + ")"); result.shift(); modFs.unlink(path, function (err) { }); } } }; } (filePath)); } }); } exports.limitFiles = limitFiles; /* Retrieves the given file via HTTP. */ function getFile(response, path) { modVfs.readFile(path, function (err, data) { if (err) { response.writeHeadLogged(404, "Not found"); response.end(); } else { response.setHeader("Content-Length", Buffer.byteLength(data, "utf-8")); response.setHeader("Content-Type", modMime.mimeType(path)); response.writeHeadLogged(200, "OK"); response.write(data); response.end(); } }); } exports.getFile = getFile;
import Vue from "vue"; import Vuex from "vuex"; import localforage from "localforage"; import VuexPersistence from "vuex-persist"; import shuffle from "../helpers/shuffle"; Vue.use(Vuex); const vuexLocal = new VuexPersistence({ storage: localforage }); const state = { veggies: [], months: [], favorites: {}, randomVeggieIndexes: [] }; const mutations = { setVeggies(state, veggies) { state.veggies = [...veggies]; if (state.randomVeggieIndexes.length !== veggies.length) { state.randomVeggieIndexes = [...Array(veggies.length).keys()]; } }, setMonths(state, months) { state.months = [...months]; }, addToFavorites(state, foodID) { state.favorites = { ...state.favorites, [foodID]: true }; }, removeFromFavorites(state, foodID) { state.favorites = { ...state.favorites, [foodID]: false }; }, shuffle(state) { state.randomVeggieIndexes = [...shuffle(state.randomVeggieIndexes)]; } }; const actions = { setVeggies({ commit }, veggies) { commit("setVeggies", veggies); }, setMonths({ commit }, months) { commit("setMonths", months); }, addToFavorites({ commit }, foodID) { commit("addToFavorites", foodID); }, removeFromFavorites({ commit }, foodID) { commit("removeFromFavorites", foodID); }, shuffle({ commit }) { commit("shuffle"); } }; const getters = { randVeggies: state => state.randomVeggieIndexes.map(index => state.veggies[index]), fruits: (state, getters) => getters.randVeggies.filter(food => food.type === "fruit"), favFruits: (state, getters) => getters.fruits.filter(food => !!state.favorites[food.name]), notFavFruits: (state, getters) => getters.fruits.filter(food => !state.favorites[food.name]), vegetables: (state, getters) => getters.randVeggies.filter(food => food.type === "vegetable"), favVegetables: (state, getters) => getters.vegetables.filter(food => !!state.favorites[food.name]), notFavVegetables: (state, getters) => getters.vegetables.filter(food => !state.favorites[food.name]), cereals: (state, getters) => getters.randVeggies.filter(food => food.type === "cereal"), favCereals: (state, getters) => getters.cereals.filter(food => !!state.favorites[food.name]), notFavCereals: (state, getters) => getters.cereals.filter(food => !state.favorites[food.name]) }; export default new Vuex.Store({ state, mutations, getters, actions, plugins: [vuexLocal.plugin] });
import React, {Component} from "react"; import Home from "./screens/Home"; import SideBar from "./SideBar"; import About from "./About"; import {DrawerNavigator} from "react-navigation"; const DrawerScreenRouter = DrawerNavigator( { Home: {screen: Home}, About: {screen: About} }, { contentComponent: props => <SideBar {...props} /> } ); export default DrawerScreenRouter;
exports.help = { name: "emoji", description: "Get some info on a emoji", usage: "emoji <:emoji:>", type: "general" }; const Discord = require("discord.js") exports.run = async(client, message, args) => { let emoji = args[0] let regex = /<?(a)?:?(\w{2,32}):(\d{17,19})>?/ let unicoderegex = /(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g if (!emoji) return; if (regex.test(emoji)) { let emojiurl; if (regex.exec(emoji)[1] == undefined) { emojiurl = `https://cdn.discordapp.com/emojis/${regex.exec(emoji)[3]}.png` } else { emojiurl = `https://cdn.discordapp.com/emojis/${regex.exec(emoji)[3]}.gif` } const Canvas = require("canvas") const canvas = Canvas.createCanvas(1000, 1000); const ctx = canvas.getContext('2d'); const name = regex.exec(emoji)[2] const background = await Canvas.loadImage(emojiurl); ctx.drawImage(background, 0, 0, canvas.width, canvas.height); const attachment = new Discord.MessageAttachment(canvas.toBuffer(), "emoji.png") const embed = new Discord.MessageEmbed() .setColor("GREEN") .setTitle(`Info about ${name} (ID: ${regex.exec(emoji)[3]})`) .addField("**> Info**", `• Name: ${name}\n• Identifier: \`${emoji}\`\n• URL: [Click me](${emojiurl})`) .setThumbnail(emojiurl) message.channel.send({ embed: embed }) } else if (unicoderegex.test(emoji)) { function emojiToUnicode(s) { return s.match(unicoderegex) .map(e => "\\u" + e.charCodeAt(0).toString(16) + "\\u" + e.charCodeAt(1).toString(16)) } const emoj = require("emoji-dictionary"); const embed = new Discord.MessageEmbed() .setColor("GREEN") .setTitle(`Info about ${emoj.getName(emoji)}`) .addField("**> Info**", `• Name: \`${emoj.getName(emoji)}\`\n• Unicode: \`${emojiToUnicode(emoji)}\`\n• Raw: \`${emoji}\``) message.channel.send(embed) } else message.reply("that's not a valid emoji") }
/* * @Author: baby * @Date: 2016-07-12 09:53:05 * @Last Modified by: mikey.zhaopeng * @Last Modified time: 2016-09-01 09:47:05 */ 'use strict'; require("babel-core/register"); // function testable(target) { // target.isTestable = true // } // @testable // class MyTestableClass {} // // console.log(MyTestableClass.isTestable) // true // function testable(isTestable) { // return (target) => { // target.isTestable = isTestable // } // } // @testable(true) // class MyTestableClass {} // console.log(MyTestableClass.isTestable) // true // // @testable(false) // class MyClass {} // console.log(MyClass.isTestable); // false /* function testable(target) { target.prototype.isTestable = true } @testable class MyTestableClass {} let obj = new MyTestableClass() console.log(obj.isTestable) */ /*class Person{ @readonly name() { return `${this.first} ${this.last}` } } function readonly(target, name, descriptor) { descriptor.writable = false return descriptor } let obj = new Person() obj.first = '张三' obj.last = '李四' console.log(obj.name())*/ /*@log修饰器*/ /*class Math { @log add(a,b){ return a+b } } function log(target, name, descriptor) { var oldValue = descriptor.value console.log(`oldValue`, oldValue) descriptor.value = function() { console.log(`Calling ${name} with`, arguments ) return oldValue.apply(null, arguments) } return descriptor } const math = new Math() console.log(math.add(2, 4)) */ /*function dec(id) { console.log('evaluated', id) return (target, property, descriptor) => console.log('executed', id) } class Example { @dec(1) @dec(2) method(){} } let obj = new Example() obj.method()*/ let counter = 0 let add = (target) => { counter++ } @add function foo() { } foo() console.log(counter)
import test from 'ava'; import request from 'supertest-as-promised'; import server from '../build/server'; test('role:GetAll', async t => { t.plan(2); const res = await request(server(5000)) .get('/role') .send(); const roles = res.body; t.is(res.status, 200, 'gets a 200 response'); t.true(Object.keys(roles).length > 0, 'returns roles'); });
import React, { Component } from 'react'; import { List, ListItem, ListItemContent, ListItemAction, Icon} from 'react-mdl'; class Contact extends Component{ render(){ const icons = { phone: 'url(https://img.icons8.com/carbon-copy/2x/phone.png) center / cover', email: 'url(http://cdn.onlinewebfonts.com/svg/img_489898.png) center / cover', } return( <div> <h1 className="page-title">Contact</h1> <List style={{width: '100vh', backgroundColor: 'white', margin: 'auto'}}> <ListItem threeLine> <ListItemContent avatar="person" href="nathan.pedroza@ccc.ufcg.edu.br" subtitle="nathan.pedroza@ccc.ufcg.edu.br">Email</ListItemContent> <ListItemAction> <a href="nathan.pedroza@ccc.ufcg.edu.br"></a> </ListItemAction> </ListItem> <ListItem threeLine> <ListItemContent avatar="person" subtitle="+55 83 991363063">Phone</ListItemContent> <ListItemAction> <a href="#"></a> </ListItemAction> </ListItem> <ListItem threeLine> <ListItemContent avatar="person" subtitle="https://www.linkedin.com/in/nathan-fernandes98">LinkedIn</ListItemContent> <ListItemAction> <a href="https://www.linkedin.com/in/nathan-fernandes98"><Icon name="send" /></a> </ListItemAction> </ListItem> <ListItem threeLine> <ListItemContent avatar="person" subtitle="https://web.facebook.com/nathanfpedroza">Facebook</ListItemContent> <ListItemAction> <a href="https://web.facebook.com/nathanfpedroza"><Icon name="send" /></a> </ListItemAction> </ListItem> </List> </div> ); } }; export default Contact;
import React from "react"; import { pages } from "./navigation"; export const createLoadBeerList = (actions, router) => ({ view: model => ( <div> <a href={router.getLink(pages.breweryBeerList.id, {breweryId: model.brewery.id})} >Load beer list</a> {" "} <button className="btn btn-default btn-xs" onClick={actions.loadBeerList({ breweryId: model.brewery.id })}>Load beer list</button> </div> ) });
'use strict'; const chai = require('chai'); const should = chai.should(); // eslint-disable-line const expect = chai.expect; // eslint-disable-line const chaiHttp = require('chai-http'); chai.use(chaiHttp); const ApiServer = require('../../../src/ApiServer'); const TEST_NAME = 'Test ApiServer and ResponseHelper'; let apiServer = undefined; describe(TEST_NAME, () => { before(()=>{ apiServer = new ApiServer({ services: [ ], serviceLocations: [ './src/**/*.service.js', __dirname + '/Test.service.js' ], injectableLocations: [ __dirname + '/Test.injectable.js' ], middlewareLocations: [ __dirname + '/Test.middleware.js' ] }); return apiServer.start(); }); it('should normalize a openAPI path to an express path',function(){ let path = apiServer._normalizeRoutePath('/foo'); path.should.be.eql('/foo'); path = apiServer._normalizeRoutePath('/foo/bar'); path.should.be.eql('/foo/bar'); path = apiServer._normalizeRoutePath('/foo/:id'); path.should.be.eql('/foo/:id'); path = apiServer._normalizeRoutePath('/foo/{id}'); path.should.be.eql('/foo/:id'); }); it('should Pass health-check',function () { this.timeout(300000); //make /health-check request let appRequester = chai.request(apiServer._expressApp); return appRequester.get('/health-check') .then((response)=>{ response.should.exist; expect(response).to.have.status(200); }); }); it('should pass validation when the response is invalid',function () { //The validation library is not designed to validate the responses, we should still be providing the structure for documentation purposes. this.timeout(300000); let appRequester = chai.request(apiServer._expressApp); return appRequester.get('/test-500-response') .then((response)=>{ response.should.exist; expect(response).to.have.status(500); }); }); it('should not validate bad params',function () { this.timeout(300000); let appRequester = chai.request(apiServer._expressApp); return appRequester.get('/test-query') .then((response)=>{ response.should.exist; expect(response).to.be.json; expect(response).to.have.status(400); response.body.should.exist; response.body.errorCode.should.be.eql('ValidationError'); response.body.errorMsg.should.be.eql('Error while validating request: request.query should have required property \'id\''); response.body.validationErrors.should.be.eql([{'keyword':'required','dataPath':'.query','schemaPath':'#/properties/query/required','params':{'missingProperty':'id'},'message':'should have required property \'id\''}]); }); }); it('should respond with 400 on thrown error',function () { this.timeout(300000); let appRequester = chai.request(apiServer._expressApp); return appRequester.get('/test-throw') .then((response)=>{ response.should.exist; expect(response).to.be.json; expect(response).to.have.status(400); response.body.errorCode.should.be.eql('ThrownError'); response.body.errorMsg.should.be.eql('Another way to send a 400'); }); }); it('should handle posts with payloads',function () { this.timeout(300000); let appRequester = chai.request(apiServer._expressApp); return appRequester.post('/test-post') .send({ 'foo': 'string' }) .then((response)=>{ response.should.exist; expect(response).to.be.json; expect(response).to.have.status(200); response.body.hi.should.be.eql('Mom'); response.body.data.should.be.eql({ 'foo': 'string' }); }); }); it('should handle path params',function () { this.timeout(300000); let appRequester = chai.request(apiServer._expressApp); return appRequester.get('/test-param/1234') .then((response)=>{ response.should.exist; expect(response).to.be.json; expect(response).to.have.status(200); response.body.should.exist; response.body.id.should.be.eql('1234'); }); }); it('should handle middleware',function () { this.timeout(300000); let appRequester = chai.request(apiServer._expressApp); return appRequester.get('/test-middleware') .then((response)=>{ response.should.exist; expect(response).to.be.json; response.body.should.exist; expect(response).to.have.status(200); expect(response.body.oldRequest).to.exist; expect(response.body.newRequest).to.exist; expect(response.body.oldRequest).to.not.be.eql(response.body.newRequest); }); }); after(()=>{ return apiServer.shutdown(); }); });
import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import moxios from 'moxios'; import expect from 'expect'; import { editComment } from '../comment'; const middlewares = [thunk]; const mockStore = configureMockStore(middlewares); describe('comment actions', () => { beforeEach(function () { moxios.install(); }); afterEach(function () { moxios.uninstall(); }); it('edit comment action', async () => { const store = mockStore(); await store.dispatch(editComment(1,{})); const actions = store.getActions(); expect(actions[0]).toEqual({ type: "EDIT_COMMENT", commentId: 1, values: {}}); }); });
var box = document.getElementById('box'); var screen = box.children[0]; var ul = screen.children[0]; var ol = screen.children[1]; var arr = document.getElementById('arr'); var arrLeft = document.getElementById('left'); var arrRight = document.getElementById('right'); var imgWidth = screen.offsetWidth; //1. 动态生成li var count = ul.children.length; for (var i = 0; i < count; i++) { // 创建一个新的元素 var li = document.createElement('li'); // 往ol里面添加子元素li ol.appendChild(li); if (i === 0) { li.className = 'current'; } // 2 点击序号 动画的方式 切换图片 li.onclick = liClick; // 创建自定义属性记录索引 li.setAttribute('index', i); // 因为在循环里面所以直接写函数影响内存性能 } function liClick () { // 2.1 取消其它li的高亮显示,让当前li高亮显示 for (var i = 0; i < ol.children.length; i++) { var li = ol.children[i]; li.className = ''; } this.className = 'current'; // 2.2 点击序号,动画的方式切换到当前点击的图片位置 // 图片的宽度 // 获取自定义属性 // 转换字符串成整数类型 var liIndex = parseInt(this.getAttribute('index')); animate (ul, -liIndex*imgWidth); // 定义全局变量和li的index保持一致 // 如果没有定义则会产生bug index = liIndex } // 4 实现上一张和下一张的功能 // 下一张图片 var index = 0; arrRight.onclick = function () { // 判断是否是克隆的第一张图片,如果是克隆的第一张图片,此时修改ul的坐标,显示真正的第一张图片 index++; if (index === count) { ul.style.left = '0px'; index = 0; } if (index < count) { ol.children[index].click(); }else { animate (ul, -index*imgWidth); for (var i = 0; i < ol.children.length; i++) { var li = ol.children[i]; li.className = ''; } ol.children[0].className = 'current'; } } // 上一张图片 arrLeft.onclick = function () { if (index == 0) { index = count; ul.style.left = -index*imgWidth + 'px'; } index--; ol.children[index].click(); } // 无缝滚动 // 首先克隆第一个图片 var firstLi = ul.children[0]; // 克隆li cloneNode 复制节点 // 参数为true 复制内容 // 参数为false 复制节点,不复制内容 var cloneLi = firstLi.cloneNode(true); ul.appendChild(cloneLi); // 5 自动切换图片 var timerId = setInterval (function () { arrRight.click(); }, 2000); box.onmouseenter = function () { clearInterval(timerId); } box.onmouseleave = function () { timerId = setInterval (function () { arrRight.click(); },2000) } // 获取元素 var newsT = document.getElementById('newsT'); var flag = document.getElementById('flag'); var newsContainer = document.getElementById('newsContainer'); // 获取到a标签注册事件 for (var i = 0; i < 2; i++) { var link = newsT.children[i]; link.onmouseover = linkMouseover; // 自定义索引 link.setAttribute('index', i); } function linkMouseover() { var offsetLeft = this.offsetLeft; animate(flag, offsetLeft - 2); // 显示对应的详细内容 // 让所有的详细内容隐藏 for (var i = 0, len = newsContainer.children.length; i < len; i++) { var div = newsContainer.children[i]; if (div.className.indexOf('hide') === -1) { div.className = 'news-b hide'; } } var index = parseInt(this.getAttribute('index')); newsContainer.children[index].className = 'news-b show'; } window.onscroll = function() { var top = document.documentElement.scrollTop; var nav = document.getElementsByClassName('nav')[0]; // console.log(top); if (top >= 200) { nav.style.position = 'fixed'; nav.style.top = '0'; nav.style.height = '48px'; nav.style.display = 'block'; nav.style.zIndex = '1000'; } else { nav.style.display = 'none'; nav.style.height = '0'; } }
$(document).ready(function(){ $('p').hide(2000); });
var MongoDB = require('mongodb').Db; var Server = require('mongodb').Server; var mongoose = require('mongoose'); var assert = require('assert'); var isDev = process.env.OPENSHIFT_MONGODB_DB_URL ? false:true; if (!isDev) { var dbPort = process.env.OPENSHIFT_MONGODB_DB_PORT; var dbHost = process.env.OPENSHIFT_MONGODB_DB_HOST; var dbName = process.env.OPENSHIFT_APP_NAME; var dbUserName = process.env.OPENSHIFT_MONGODB_DB_USERNAME; var dbPassword = process.env.OPENSHIFT_MONGODB_DB_PASSWORD; var dbUrl = process.env.OPENSHIFT_MONGODB_DB_URL; } else{ var dbPort = 27017; var dbHost = 'localhost'; var dbName = 'revina'; // var dbName = 'solusidijam7'; var dbUserName = ""; var dbPassword = ""; var dbUrl = "127.0.0.1:27017/"; } console.log("dbPort: "+dbPort); console.log("dbHost: "+dbHost); console.log("dbName: "+dbName); console.log("dbUserName: "+dbUserName); console.log("dbPassword: "+dbPassword); var url = dbUrl + dbName; // Connect to mongodb var connect = function () { mongoose.connect(url); }; connect(); /* establish the database connection */ // var db = monk('localhost:27017/nodetest1'); var db = new MongoDB(dbName, new Server(dbHost, dbPort, {auto_reconnect: true}), {w: 1}); // Establish connection to db db.open(function(err, db) { if(err) console.log("error waktu konek db "+err); else console.log("tidak ada error waktu konek db"); // assert.equal(null, err); // Add a user to the database // db.addUser('user2', 'name', function(err, result) { // assert.equal(null, err); // Authenticate //kalo di local ini di remark if(!isDev){ db.authenticate(dbUserName, dbPassword, function(err, result) { if(err) console.log(err); else console.log('success connected to database :: ' + dbName); }); } // }); }); exports.db = db; var db_mongoose = mongoose.connection; exports.db_mongoose = db_mongoose; db_mongoose.on('error', console.error.bind(console, 'connection error:')); db_mongoose.once('open', function (callback) { // yay! console.log('mongoose success connect'); }); var datadir = process.env.OPENSHIFT_DATA_DIR; if (typeof process.env.OPENSHIFT_DATA_DIR === "undefined") { datadir = './../assets/images/'; }else{ datadir = process.env.OPENSHIFT_DATA_DIR; // datadir = datadir+'assets/images'; } exports.datadir = datadir; exports.users_model = require('./models/users'); var err = []; err['000'] = {msg:'Success',notif:'Transaksi berhasil diproses.'}; err['001'] = {msg:'Internal error',notif:'Maaf, terjadi kesalahan teknis. Cobalah beberapa saat lagi. Terim kasih.'}; err['002'] = {msg:'Account has active',notif:'Maaf, akun telah terpakai. Cobalah dengan email yg lain. Terima kasih.'}; err['003'] = {msg:'Invalid Verrification Code',notif:'Maaf, kode verifikasi salah.'}; err['004'] = {msg:'Data not found',notif:'Maaf, akun yang anda maksud, tidak ditemukan.'}; err['005'] = {msg:'Invalid user or password',notif:'Gagal login, akun tidak ditemukan.'}; exports.err = err;
function completeCampaign( id ) { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); var url = "/api/campaigns/"+id+"/complete"; $.post(url, function (response) { console.log( response.msg ); location.reload(); }); }
const router=require("koa-router")(); const mysql=require("../utils/mysql"); router.get("/cate",async ctx=>{ const sql="SELECT a.YPLB AS cate,COUNT(b.YPBM) AS count,a.LBMC AS cate_name FROM base_ypxx_yplb a LEFT JOIN base_ypxx b ON a.YPLB=b.YPLB WHERE a.STATUS=1 AND a.LBMC <> '其他' AND a.YPLB_GRADE=? AND a.PORGID=? GROUP BY a.YPLB"; ctx.body=await mysql.query(sql,[2,2]); }); router.get("/goods",async ctx=>{ const {cate,start=0}=ctx.query; const sql="SELECT YPBM AS ypbm,YPMC AS ypmc,GG AS gg,DW,XSJG AS price FROM base_ypxx WHERE YPLB=? LIMIT ?,10"; ctx.body=await mysql.query(sql,[cate,+start]); }); module.exports=router;
import React from 'react' export default function QuanLyNguoiDungModal() { return ( <div> mo dal </div> ) }
/** * [serialize 序列化表单] * @parts {[Array]} form [保存将要创建的字符串的各个部分] * @field {[HTMLCOLLECTION]} form [表单的子元素集合] * @param {[type]} form [description] * @param {[type]} form [description] * @return {[type]} [description] */ function serialize(form) { var parts = [], field = null, i, len, j, optLen, option, optValue; for(i = 0,len = form.elements.length;i<len;i++){ field = form.elements[i]; switch(field.type){ case "select-one": case "select-multiple": if(field.name.length){ for(j = 0,optLen = field.options.length;j<optLen;j++){ option = field.options[j]; if(option.selected){ optValue = ""; if(option.hasAttribute){ optValue = (option.hasAttribute("value")??option.value:option.text); }else{ optValue = (option.attributes["value"].specified?option.value:option.text); } parts.push(encodeURIComponent(field.name)+"="+encodeURIComponent(optValue)); } } } break; case undefined://字段集 case "file"://文件输入 case "submit"://提交按钮 case "reset"://重置按钮 case "button"://自定义按钮 break; case "radio"://单选按钮 case "checkbox"://复选框 if (!field.checked) { break; } // z执行默认操作 default: // 不包含没有名字的表单字段 if (field.name.length) { parts.push(encodeURIComponent(field.name)+"="+encodeURIComponent(field.optValue)); } } } return parts.join("&"); }
import React, { useState } from "react"; import PropTypes from "prop-types"; import cn from "classnames"; import styles from "./Tabs.module.css"; const Tabs = ({ tabs }) => { const [activeTabIndex, setActiveTabIndex] = useState(0); const tabHandler = (index) => setActiveTabIndex(index); const { Content, props } = tabs[activeTabIndex]; return ( <> <div className={styles.tabs}> <ul className={styles.tabList}> {tabs.map(({ title }, index) => ( <li key={index} className={styles.tabItem}> <button className={cn(styles.tabButton, { [styles["tabButton--active"]]: activeTabIndex === index, })} type="button" onClick={() => tabHandler(index)} > {title} </button> </li> ))} </ul> <Content {...props} /> </div> </> ); }; Tabs.propTypes = { tabs: PropTypes.arrayOf( PropTypes.shape({ title: PropTypes.string.isRequired, Content: PropTypes.elementType.isRequired, props: PropTypes.objectOf(PropTypes.any), }) ).isRequired, }; export default Tabs;
import { Skeleton } from 'antd'; function SkeletonLoading(props) { const { loading, children } = props; return ( <Skeleton active loading={loading || true} > { children ? '' : children } </Skeleton> ); } export default SkeletonLoading;
import {combineReducers} from 'redux'; import {restaurantReducer} from "./restaurantReducer"; export default combineReducers({ restaurant: restaurantReducer, });
import React from 'react'; import{ AppRegistry, StyleSheet, View, Text, TouchableHighlight, TouchableOpacity } from 'react-native'; export default class Comp1 extends React.Component{ onPress3(item){ switch (item){ case 1: console.log('Area1 Pressed'); break; case 2: console.log('Area2 Pressed'); break; case 3: console.log('Area3 Pressed'); break; } } render(){ return ( <View> <Text style={styles.Heading}>ABB</Text> <View style={styles.container}> <TouchableHighlight style={styles.v1} onPress={()=>this.onPress3(1)} underlayColor = "blue"> <View> <Text>View 1</Text> </View> </TouchableHighlight> <TouchableOpacity onPress={()=>this.onPress3(2)} style={styles.v2} > <View> <Text>View 2</Text> </View> </TouchableOpacity> <TouchableOpacity onPress={()=>this.onPress3(3)} style={styles.v3} > <View style={styles.v3}> <Text>View 3 </Text> </View> </TouchableOpacity> </View> </View> ) } } const styles = StyleSheet.create({ Heading: { color: 'red', fontSize: 56, textAlign: 'center' }, container: { flexDirection: 'row', height: 100 }, v1: { flex:1, backgroundColor: 'red', padding:10 }, v2: { flex:1, backgroundColor: 'green', padding:10 }, v3: { flex:1, backgroundColor: 'yellow', padding:10 } }); //AppRegistry.registerComponent('component1',() => component1);
const dotenv = require("dotenv"); const line = require('@line/bot-sdk'); dotenv.config() const TOKEN = process.env.LINE_ACCESS_TOKEN const CHANNEL_ID = process.env.CHANNEL_ID const client = new line.Client({ channelAccessToken: TOKEN }); module.exports = { TOKEN, CHANNEL_ID, client }
import React from 'react' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import { push } from 'react-router-redux' import omit from '../../util/omit' import TextInput from '../../components/TextInput' import Button from '../../components/Button' import Tag from '../../components/Tag' import Panel from '../../components/Panel' import Label from '../../components/Label' import Form from '../../components/Form' import { createGame } from '../../store/game/actions' class NewGame extends React.Component { constructor(props) { super(props) this.state = { words: [], name: '', newWord: '', timeToDraw: '', numberOfUsers: '', } this.handleFieldChange = this.handleFieldChange.bind(this) this.handleWordAdition = this.handleWordAdition.bind(this) this.handleSubmit = this.handleSubmit.bind(this) } handleFieldChange(target) { this.setState({ [target.name]: target.value }) } handleWordAdition(target) { const { words, newWord, } = this.state this.setState({ newWord: '', words: newWord.length ? [...words, newWord] : words }) } handleSubmit() { this.props.createGame(omit(['newWord'], this.state)).then( () => this.props.goToGame(this.state.name) ) } render() { const { words, timeToDraw, numberOfUsers, newWord, name, } = this.state return ( <Panel column> <Form primaryAction={<Button onClick={this.handleSubmit} primary>create room</Button>} secondaryAction={<Button>cancel</Button>} > <Label> Game name <TextInput name="name" onChange={this.handleFieldChange} autoFocus value={name} /> </Label> <Label> Time to draw <TextInput name="timeToDraw" onChange={this.handleFieldChange} autoFocus value={timeToDraw} /> </Label> <Label> Number of users <TextInput name="numberOfUsers" onChange={this.handleFieldChange} value={numberOfUsers} /> </Label> <Label info="press enter to add"> Word list <TextInput name="newWord" onChange={this.handleFieldChange} onPressEnter={this.handleWordAdition} value={newWord} /> </Label> <Panel wrap>{words.map(word => <Tag key={word}>{word}</Tag>)}</Panel> </Form> </Panel> ) } } export default connect( null, dispatch => bindActionCreators({ createGame, goToGame: name => push(`/game/${name}`) }, dispatch) )(NewGame)
import styles from "./Table.module.css"; import React, { Component, Fragment } from "react"; import Table from "../antd/Table"; import Pagination from "../antd/Pagination"; const PAGE_SIZE_OPTIONS = ["10", "20", "50", "100"]; class CBTable extends Component { handleTableChange = (pagination, filters, sorter) => { const { onChange } = this.props; if (sorter) { const { columnKey: sort, order: sortOrder } = sorter; if (onChange) { onChange({ sort, sortOrder }); } } }; handlePaginationChange = (page, pageSize) => { const { onChange } = this.props; if (onChange) { onChange({ page, pageSize }); } }; render() { const { onChange, pagination, sumary, dataSource, ...tableProps } = this.props; let data = dataSource || []; if (sumary) { if (tableProps.rowKey) { sumary[tableProps.rowKey] = "0"; } data = data.concat(sumary); } return ( <Fragment> <Table size="middle" bordered scroll={{ x: true }} {...tableProps} dataSource={data} pagination={false} onChange={this.handleTableChange} /> {pagination && ( <div className={styles.pagination}> <Pagination showQuickJumper showSizeChanger showTotal={total => `共 ${total} 条`} pageSizeOptions={PAGE_SIZE_OPTIONS} {...pagination} onChange={this.handlePaginationChange} onShowSizeChange={this.handlePaginationChange} /> </div> )} </Fragment> ); } } let localPageSize = localStorage.getItem("PAGE_SIZE"); CBTable.parse = (query = {}, dict = {}) => { dict = { page: "page", pageSize: "pageSize", sort: "sort", sortOrder: "sortOrder", ...dict }; let ret = {}; const page = query[dict.page]; const pageSize = query[dict.pageSize]; const sort = query[dict.sort]; const sortOrder = query[dict.sortOrder]; ret[dict.page] = +page || 1; if ( typeof pageSize === "string" && PAGE_SIZE_OPTIONS.indexOf(pageSize) !== -1 ) { ret[dict.pageSize] = +pageSize; if (localPageSize !== pageSize) { localPageSize = pageSize; localStorage.setItem("PAGE_SIZE", pageSize); } } else if (typeof localPageSize === "string") { ret[dict.pageSize] = +localPageSize; } else { ret[dict.pageSize] = 10; } if (typeof sort === "string") { ret[dict.sort] = sort; } if ( typeof sortOrder === "string" && ["ascend", "descend"].indexOf(sortOrder) !== -1 ) { ret[dict.sortOrder] = sortOrder; } return ret; }; CBTable.format = (data = {}, dict = {}) => { dict = { page: "page", pageSize: "pageSize", sort: "sort", sortOrder: "sortOrder", ...dict }; let ret = {}; const page = data[dict.page]; const pageSize = data[dict.pageSize]; const sort = data[dict.sort]; const sortOrder = data[dict.sortOrder]; if (typeof page === "number") { ret[dict.page] = "" + page; } if (typeof pageSize === "number") { ret[dict.pageSize] = "" + pageSize; } if (typeof sort === "string") { ret[dict.sort] = sort; } if (typeof sortOrder === "string") { ret[dict.sortOrder] = sortOrder; } return ret; }; export default CBTable;
// import React from 'react' // import SVG from 'react-svg-inline' // // import Logo from 'img/recipelist/branding.svg' // const Recipelist = () => // <div> // <section className="container full"> // <div className="col-12-of-12"> // {/* <img // src={require('img/recipelist/macbook.jpg')} // alt="Recipelist For Web" // /> */} // </div> // </section> // <section className="container"> // <div className="client-quote"> // <blockquote> // Recipelist was initially built entirely on Rails but was later written // in React.js, using the Rails rest API. Later on, the method for // querying data was transitioned to GraphQL to improve performance. // </blockquote> // </div> // </section> // <section className="container"> // <div className="col-12-of-12"> // {/* <img // src={require('img/recipelist/iphones.png')} // alt="Recipelist Phones" // /> */} // </div> // </section> // <section className="container"> // <div className="client-quote"> // <blockquote> // The mobile app is built on React Native. Because the front end was // written in React, many areas of the code base could shared, including // all of the networking and state management. // </blockquote> // </div> // </section> // <section className="container full"> // <div className="col-12-of-12"> // {/* <img // src={require('img/recipelist/ads.png')} // alt="Recipelist Branding" // /> */} // </div> // </section> // <section className="container"> // <div className="client-quote"> // <blockquote> // With Pinterest users being the target audience for the project, a // Pinterest ad campaign with bold, bright imagery captured the attention // of many potential users. // </blockquote> // </div> // </section> // <section className="container full"> // <div className="col-12-of-12"> // <SVG svg={Logo} width="100%" /> // </div> // </section> // <section className="container"> // <div className="client-quote"> // <blockquote> // The end result was a web/mobile app that solved a personal problem of // mine. It also ended up being a great opportunity to learn new // javascript frameworks, creating back-end APIs, and introducing myself // to mobile app development. // </blockquote> // </div> // </section> // </div> import React from 'react' // import Logo from 'img/recipelist/branding.svg' const Portfolio = () => <div> <section className="container"> <div className="client-quote"> <blockquote> Recipelist was initially built entirely on Rails but was later written in React.js, using the Rails rest API. Later on, the method for querying data was transitioned to GraphQL to improve performance. </blockquote> </div> </section> </div> export default Portfolio
var bannedIpAddress = { init: function (validationErrorIcon, deleteUrl) { $.validator.addMethod( 'validIpAddress', function (value, element) { return this.optional(element) || /^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$/.test(value); }, 'Ip address is not valid.' ); var rules = { ipAddress: { required: true, validIpAddress: true} }; var messages = { ipAddress: { required: 'Ip address cannot be blank.'} }; var newItem = function (model) { return '<tr>' + '<td scope=\"col\">' + model.iPAddress + '</td>' + '<td scope=\"col\">' + '<form method=\"post\" class=\"delete\" action=\"' + deleteUrl + '\">' + '<div>' + ' <input type=\"hidden\" id=\"id-' + model.id + '\" name=\"id\" value=\"' + model.id + '\"/>' + ' <input type=\"submit\" class=\"smallButton\" value=\"remove\"/>' + '</div>' + '</form>' + '</td>' + '</tr>'; }; new administrativeItem(validationErrorIcon, rules, messages, newItem); } }
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__LowPoly__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__DOM__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Application__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Application___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Application__); let DOMObject = new __WEBPACK_IMPORTED_MODULE_1__DOM__["a" /* default */]().initialize(); let App = new __WEBPACK_IMPORTED_MODULE_2__Application__["default"](DOMObject); let lowPoly = new __WEBPACK_IMPORTED_MODULE_0__LowPoly__["a" /* default */](DOMObject.get('origin'), DOMObject.get('render')); DOMObject.get('import').addEventListener("change", lowPoly.importImage.bind(lowPoly)); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_CanvasUtil__ = __webpack_require__(2); class LowPoly { constructor(canvasElement, lowpolifyCanvas, config) { this._canvas = canvasElement; this._lowpolifyCanvas = lowpolifyCanvas; this._context = canvasElement.getContext('2d'); this._lowpolifyContext = lowpolifyCanvas.getContext('2d'); } readerLoad(evt) { this.originalImg = new Image(); this.originalImg.onload = this.imgLoad.bind(this); this.originalImg.src = evt.target.result; } imgLoad(evt) { this._canvas.width = this.originalImg.width; this._canvas.height = this.originalImg.height; this._lowpolifyCanvas.width = this.originalImg.width; this._lowpolifyCanvas.height = this.originalImg.height; this._context.drawImage(this.originalImg, 0, 0); this.pixelsOriginal = this._context.getImageData(0, 0, this.originalImg.width, this.originalImg.height); this.pixelsCopy = __WEBPACK_IMPORTED_MODULE_0__utils_CanvasUtil__["a" /* default */].copyImageData(this._context, this.pixelsOriginal); // for (let i = 0; i < this.pixelsCopy.data.length; i += 4) { // this.pixelsCopy.data[i] = 255 - this.pixelsCopy.data[i]; // this.pixelsCopy.data[i+1] = 255 - this.pixelsCopy.data[i+1]; // this.pixelsCopy.data[i+2] = 255 - this.pixelsCopy.data[i+2]; // this.pixelsCopy.data[i+3] = 255; // } for (let i = 0; i < this.pixelsCopy.data.length; i += 4) { let grayscale = this.getGreyScale(this.pixelsCopy.data[i], this.pixelsCopy.data[i + 1], this.pixelsCopy.data[i + 2]); this.pixelsCopy.data[i] = grayscale; this.pixelsCopy.data[i + 1] = grayscale; this.pixelsCopy.data[i + 2] = grayscale; this.pixelsCopy.data[i + 3] = 255; } this._lowpolifyContext.putImageData(this.pixelsCopy, 0, 0); } importImage(evt) { this._reader = new FileReader(); this._reader.onload = this.readerLoad.bind(this); this._reader.readAsDataURL(evt.target.files[0]); } getGreyScale(red, green, blue) { return 0.21 * red + 0.72 * green + 0.07 * blue; } } /* harmony export (immutable) */ __webpack_exports__["a"] = LowPoly; /***/ }), /* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; class CanvasUtil { static copyImageData(ctx, src) { let dst = ctx.createImageData(src.width, src.height); dst.data.set(src.data); return dst; } } /* harmony export (immutable) */ __webpack_exports__["a"] = CanvasUtil; /***/ }), /* 3 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; class DOM extends Map { constructor() { super(); } initialize() { this.set('origin', document.querySelector('#origin')); this.set('render', document.querySelector('#render')); this.set('import', document.querySelector('#import')); return this; } } /* harmony export (immutable) */ __webpack_exports__["a"] = DOM; /***/ }), /* 4 */ /***/ (function(module, exports) { throw new Error("Module build failed: SyntaxError: Unexpected token, expected { (6:16)\n\n\u001b[0m \u001b[90m 4 | \u001b[39m }\n \u001b[90m 5 | \u001b[39m\n\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 6 | \u001b[39m initialize()\u001b[33m;\u001b[39m\n \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[22m\u001b[39m\n \u001b[90m 7 | \u001b[39m}\u001b[0m\n"); /***/ }) /******/ ]);
define([ 'jquery', 'underscore', 'backbone', 'domReady', 'router', 'models/login', 'models/post', 'models/comment', 'collections/user', 'collections/post', 'collections/comment', 'views/home', 'views/navbar', 'views/search', 'views/login', 'views/user/list', 'views/post/list', 'views/comment/list', 'views/post/form', 'views/comment/form', 'cookie', 'bootstrapDropdown', 'bootstrapModal', 'backboneRelational', ], function($, _, Backbone, domReady, Router, LoginModel, PostModel, CommentModel, UserCollection, PostCollection, CommentCollection, HomeView, NavbarView, SearchView, LoginView, UserListView, PostListView, CommentListView, PostFormView, CommentFormView) { var App = Backbone.View.extend({ initialize: function() { _.bindAll(this,'initSearch','initViews','initRouter','initMisc','checkAuth'); // declare main custom event object this.vent = _.extend({}, Backbone.Events); this.users = new UserCollection; this.users.fetch(); this.posts = new PostCollection; this.comments = new CommentCollection; // Initialize login view this.loginModel = new LoginModel; this.initViews(); this.initSearch(); this.initMisc(); this.initRouter(); this.checkAuth(); }, checkAuth: function() { self = this; // Check user authentication var params = this.getCookieParams(); if (params) { self.loginModel.set('username', params.username); self.loginModel.set('token', params.token); self.loginModel.set('authenticated', true); } }, initSearch: function() { // Initialize main search var self = this; domReady(function() { var searchView = new SearchView({ posts : self.posts, comments : self.comments, vent : self.vent, }); }); }, initViews: function() { // Login view var loginView = new LoginView({model:this.loginModel, vent:this.vent}); loginView.render(); // Navbar view var navbarView = new NavbarView({vent:this.vent}); // List views var userListView = new UserListView({collection:this.users, vent:this.vent}); var postListView = new PostListView({ collection : this.posts, user : this.loginModel, vent : this.vent, }); var commentListView = new CommentListView({collection:this.comments, vent:this.vent}); // Form views var postFormView = new PostFormView({ model : new PostModel, user : this.loginModel, vent : this.vent, }); var commentFormView = new CommentFormView({model: new CommentModel, vent:this.vent}); }, initRelationalModels: function() { // you can put dummy model initialization to fix a flaw in relations (new Model()); }, initRouter: function() { // Initialize router this.router = new Router({vent:this.vent}); Backbone.history.start(); }, initMisc: function() { // JS sugar for all dropdowns with this class $('.dropdown-toggle').dropdown(); }, getCookieParams: function() { if ($.cookie('_yiibackbone')) { var data = $.cookie('_yiibackbone').split(','); var params = { username: data[0], token: data[1], } return params; } }, }); return new App; });
import React, { Component } from 'react'; import { BrowserRouter, Route, Switch } from 'react-router-dom'; import NavBar from './components/NavBar' import Header from './components/Header' import Main from './components/Main' import Travel from './components/Travel' import TechEvents from './components/TechEvents' import Footer from './components/Footer' import InfoPage from './components/InfoPage' import EastCoast from './components/EastCoast' import Contact from './components/Contact' import AwsBanner from './components/AwsBanner' import ContactBanner from './components/ContactBanner' import './App.css'; class App extends Component { render() { return ( <BrowserRouter> <div className="App"> <NavBar /> <Header /> <main> <Switch> <Route exact path="/" render={() => <div> <Main/> <Travel/> <TechEvents /> </div> } /> </Switch> <Switch> <Route exact path="/Home" render={() => <div> <Main/> <Travel/> <TechEvents /> </div> } /> </Switch> <Switch> <Route exact path="/InfoPage" render={() => <div> <AwsBanner/> <InfoPage/> </div> } /> </Switch> <Switch> <Route exact path="/Contact" render={() => <div> <ContactBanner/> <Contact/> </div> } /> </Switch> <Switch> <Route exact path="/EastCoast" render={() => <div> <br /> <EastCoast/> <br /> </div> } /> </Switch> </main> <Footer /> </div> </BrowserRouter> ); } } export default App;
import React , {Component} from 'react'; import {Button} from 'reactstrap'; import {MAIN_API} from '../../service/apiService.js'; import {NotificationContainer, NotificationManager} from 'react-notifications'; class DeleteCellRender extends Component { /** * */ constructor(props) { super(props); this.action = this.props.action; this.state ={ deleting:false }; } delete = () =>{ console.log("Delete function"); console.log(this.action); this.setState({ deleting:true }); MAIN_API({ url: "/product/delete", method: "POST", data: this.action.data, headers: { "Content-Type":"application/json" } }) .then(res => { console.log(res); NotificationManager.success('Xóa dữ liệu thành công', 'Thông báo',2000); var selectedRowNodes = this.action.api.getSelectedRows(); console.log(selectedRowNodes); this.action.api.updateRowData({remove: selectedRowNodes}); }).catch( res => { this.setState({ deleting:false }); NotificationManager.warning('Xóa dữ liệu thất bại', 'Thông báo', 2000); }); } render() { return ( <div> <Button color="danger" disabled={this.state.deleting} onClick={() => this.delete()}>Delete</Button> </div> ); } } export default DeleteCellRender;
function even_group_calculate_average(arr) { var res = []; var even = []; for(var i = 1; i < arr.length; i += 2 ){ if(arr[i] % 2 == 0){ even.push(arr[i]); } } var param = 10; for(var i = 0; i < 10; i++ ){ var tmp = 0; var count = 0; for(var j = 0; j < even.length; j++ ){ if(Math.floor(even[j] / param) == 0){ tmp += even[j]; count++; even[j] = 123e8; } } if(count != 0){ res.push(tmp/count); } param = param * 10; } if(res.length == 0){ res.push(0); } return res; }
/** * Export all helpers * @type {Object} */ module.exports = { hashString: require('./lib/hashString'), isFile: require('./lib/isFile'), readJsonFile: require('./lib/readJsonFile'), removeFile: require('./lib/removeFile'), writeFile: require('./lib/writeFile'), /** * All classes */ Request: require('./classes/Request') };
$(function(){ //pop 視窗控制 $.fn.extend({ //重新給定搜尋窗的值 setSearchBox: function(list) { _parents=$(this).closest("[alt=popWindow]") popWindow_SearchBox=$(_parents).find("[alt=popWindow_SearchBox]"); $(popWindow_SearchBox).html(""); searchList=""; if($(list).length>0){ $(list).each(function(){ searchList+="<li val='" + $(this)[1] + "'>"+ $(this)[0] +"</li>" }) $(popWindow_SearchBox).html("<ul>" + searchList + "</ul>"); $(popWindow_SearchBox).find("li").click( function(){ $(this).addSel($(this).text(),$(this).attr("val")); $(this).searchBoxHide(); } ) } else{ $(popWindow_SearchBox).html("<ul><li>查無資料</li></ul>"); $(popWindow_SearchBox).find("li").click( function(){ $(this).searchBoxHide(); } ) } $(popWindow_SearchBox).show() }, //隱藏搜尋窗 searchBoxHide:function(){ $(this).closest("[alt=popWindow]").find("[alt=popWindow_SearchBox]").hide(); }, //移除所選 removeSel: function () { _parent=$(this).closest('.Links').parent(); $(this).closest('.Links').remove() if(_parent.find('.Links').length==0){ $(_parent).find("[alt=popWindow_NoItem]").show(); } $(this).filter(':checkbox').prop('checked', false); }, //新增所選 addSel: function(text,val){ _parents=$(this).closest("[alt=popWindow]") if($(_parents).find("[alt=popWindow_SelectedBox]").find(".Links-n").find("[val='"+val+"']").length > 0) return false; addSelDiv='<div class="Links"><div class="Links-n"><span class="file-text" val="'+ val +'">'+ text +'</span>' +'<div class="XX01" onclick="$(this).removeSel()"><i class="glyphicon glyphicon-remove"></i></div></div> </div> ' $(_parents).find("[alt=popWindow_NoItem]").hide(); limit=parseInt($(_parents).find("[alt=popWindow_SelectedBox]").attr("limit")); if(limit==1){ $(_parents).find("[alt=popWindow_SelectedBox]").html(addSelDiv); } else if(limit > 1){ if($(_parents).find("[alt=popWindow_SelectedBox]").find(".Links-n").length>=limit) alert("超過數量限制") else $(_parents).find("[alt=popWindow_SelectedBox]").append(addSelDiv); } else{//無數量限制 $(_parents).find("[alt=popWindow_SelectedBox]").append(addSelDiv); } }, //新增所選 特定控制器 addSelTotarget: function(target,text,val){ if($(target).find(".Links-n").find("[val="+val+"]").length > 0) return false; addSelDiv='<div class="Links"><div class="Links-n"><span class="file-text" val="'+ val +'">'+ text +'</span>' +'<div class="XX01" onclick="$(this).removeSel()"><i class="glyphicon glyphicon-remove"></i></div></div> </div> ' $(target).find("[alt=popWindow_NoItem]").hide(); limit=parseInt($(target).attr("limit")); if(limit==1){ $(target).html(addSelDiv); } else if(limit > 1){ if($(target).find(".Links-n").length>=limit) alert("超過數量限制") else $(target).append(addSelDiv); } else{//無數量限制 $(target).append(addSelDiv); } }, //帶入選取值 target:帶入的目標 sendSelected:function(target){ _parents=$(this).closest("[alt=popWindow]") $(target).find('.Links').remove(); if($(_parents).find("[alt=popWindow_SelectedBox]").find('.Links').length>0){ $(target).find("[alt=popWindow_NoItem]").hide(); $(_parents).find("[alt=popWindow_SelectedBox]").find('.Links').each( function(){ $(target).append($(this).clone()) } ) } else{ $(target).find("[alt=popWindow_NoItem]").show(); } }, //設定select 控制器 target:select 控制器,動作,值(text,value) setSelectOption:function(target,action,valueList){ if(action=="set"){ $(target).children().remove(); $(valueList).each(function(){ $(target).append($("<option></option>").attr("value", $(this)[1]).text($(this)[0])); }) } $(target).selectpicker('refresh');//selectpicker 不更新顯示不會改變 } }); })
/* * @Author: xr * @Date: 2021-04-10 21:48:08 * @LastEditors: xr * @LastEditTime: 2021-04-19 17:20:56 * @version: v1.0.0 * @Descripttion: 功能说明 * @FilePath: \api\apis\private\admin.js */ const express = require('express'); const router = express.Router(); const { getAdminPage, deleteAdmin, updateAdmin, addAdmin } = require('../../services/admin'); const { getPower, addPower, delPower } = require('../../services/power'); const config = require('../../config') const adminAuth = require('../../auth/adminAuth') const md5 = require('md5-node'); //管理员分页 router.get('/page', adminAuth, function (req, res, next) { const { p = 1, ps = 10, username = '', sort = 'id desc' } = req.query; getAdminPage({ p: +p, ps: +ps, username, sort }).then((data) => { res.send({ code: 0, data: { p: +p, ps: +ps, ...data }, msg: '' }); }) }); //删除管理员 router.post('/delete', adminAuth, function (req, res, next) { const id = Number(req.query.id); if (id === config.superadmin) { res.send({ code: -1, msg: '超级管理员不可删除' }); } else { deleteAdmin(id).then(() => { res.send({ code: 0 }); }) } }) //修改管理员信息 router.post('/update', adminAuth, function (req, res, next) { const { id, username, avatar } = req.body; updateAdmin(+id, username, avatar).then(() => { res.send({ code: 0 }) }) }) //新增管理员 router.post('/add', adminAuth, function (req, res, next) { const { username, password, avatar } = req.body; addAdmin(username, md5(password), avatar).then(() => { res.send({ code: 0 }) }) }) //获取权限 router.get('/power', adminAuth, async function (req, res, next) { const { adminid = 0 } = req.query; getPower(adminid).then((data) => { res.send({ code: 0, data: data, msg: '' }) }) }) //更新权限 router.post('/power', adminAuth, async function (req, res, next) { const { adminid = 0, rids = '' } = req.body; //删除之前的权限, await delPower(adminid); //增加新的权限 rids.split(',').forEach(async (rid) => { await addPower(adminid, rid); }); res.send({ code: 0, msg: '' }) }) module.exports = router;
export default ({ 'G': [{src:'videos/ga-met.mp4',type:'video/mp4'},{src:'videos/ga-met.webm',type:'video/webm'}], 'M': [{src:'videos/mien-tron.mp4',type:'video/mp4'},{src:'videos/mien-tron.webm',type:'video/webm'}], 'B': [{src:'videos/banh-canh-ghe.mp4',type:'video/mp4'},{src:'videos/banh-canh-ghe.webm',type:'video/webm'}], 'C': [{src:'videos/chim-quay-mac-mat.mp4',type:'video/mp4'},{src:'videos/chim-quay-mac-mat.webm',type:'video/webm'}], 'L': [{src:'videos/lau-hai-san.mp4',type:'video/mp4'},{src:'videos/lau-hai-san.webm',type:'video/webm'}], 'X': [{src:'videos/xoi-ca-ro-dong.mp4',type:'video/mp4'},{src:'videos/xoi-ca-ro-dong.webm',type:'video/webm'}], 'T': [{src:'videos/tao-pho.mp4',type:'video/mp4'},{src:'videos/tao-pho.webm',type:'video/webm'}], //'TEST': [{src:'videos/test.mp4',type:'video/mp4'},{src:'videos/test.webm',type:'video/webm'}] });
const checkStats=(NodeStats)=>{ NodeStats.on('update',(stats)=> { console.log('Lastest Stats:%j',stats); const snapshot = stats.snapshot console.log('stats: %j', snapshot) }); } module.exports.Stats=checkStats;
// 加载 require('../css/chatScreen.css') require('../css/icons.css') var Recorder = require('./recorder.js') // 文件下标计数 var fileId = 0; // 文件数组容器 var fileArray = []; // 视频文件发送 var videoFile; // 长按录音 var luyin; //文件消息初始 var fileInitial = () => { fileId = 0; fileArray = []; }; var EmojiSourcePeople = [ "\u263a", "\ud83d\ude0a", "\ud83d\ude00", "\ud83d\ude01", "\ud83d\ude02", "\ud83d\ude03", "\ud83d\ude04", "\ud83d\ude05", "\ud83d\ude06", "\ud83d\ude07", "\ud83d\ude08", "\ud83d\ude09", "\ud83d\ude2f", "\ud83d\ude10", "\ud83d\ude11", "\ud83d\ude15", "\ud83d\ude20", "\ud83d\ude2c", "\ud83d\ude21", "\ud83d\ude22", "\ud83d\ude34", "\ud83d\ude2e", "\ud83d\ude23", "\ud83d\ude24", "\ud83d\ude25", "\ud83d\ude26", "\ud83d\ude27", "\ud83d\ude28", "\ud83d\ude29", "\ud83d\ude30", "\ud83d\ude1f", "\ud83d\ude31", "\ud83d\ude32", "\ud83d\ude33", "\ud83d\ude35", "\ud83d\ude36", "\ud83d\ude37", "\ud83d\ude1e", "\ud83d\ude12", "\ud83d\ude0d", "\ud83d\ude1b", "\ud83d\ude1c", "\ud83d\ude1d", "\ud83d\ude0b", "\ud83d\ude17", "\ud83d\ude19", "\ud83d\ude18", "\ud83d\ude1a", "\ud83d\ude0e", "\ud83d\ude2d", "\ud83d\ude0c", "\ud83d\ude16", "\ud83d\ude14", "\ud83d\ude2a", "\ud83d\ude0f", "\ud83d\ude13", "\ud83d\ude2b", "\ud83d\ude4b", "\ud83d\ude4c", "\ud83d\ude4d", "\ud83d\ude45", "\ud83d\ude46", "\ud83d\ude47", "\ud83d\ude4e", "\ud83d\ude4f", "\ud83d\ude3a", "\ud83d\ude3c", "\ud83d\ude38", "\ud83d\ude39", "\ud83d\ude3b", "\ud83d\ude3d", "\ud83d\ude3f", "\ud83d\ude3e", "\ud83d\ude40", "\ud83d\ude48", "\ud83d\ude49", "\ud83d\ude4a", "\ud83d\udca9", "\ud83d\udc76", "\ud83d\udc66", "\ud83d\udc67", "\ud83d\udc68", "\ud83d\udc69", "\ud83d\udc74", "\ud83d\udc75", "\ud83d\udc8f", "\ud83d\udc91", "\ud83d\udc6a", "\ud83d\udc6b", "\ud83d\udc6c", "\ud83d\udc6d", "\ud83d\udc64", "\ud83d\udc65", "\ud83d\udc6e", "\ud83d\udc77", "\ud83d\udc81", "\ud83d\udc82", "\ud83d\udc6f", "\ud83d\udc70", "\ud83d\udc78", "\ud83c\udf85", "\ud83d\udc7c", "\ud83d\udc71", "\ud83d\udc72", "\ud83d\udc73", "\ud83d\udc83", "\ud83d\udc86", "\ud83d\udc87", "\ud83d\udc85", "\ud83d\udc7b", "\ud83d\udc79", "\ud83d\udc7a", "\ud83d\udc7d", "\ud83d\udc7e", "\ud83d\udc7f", "\ud83d\udc80", "\ud83d\udcaa", "\ud83d\udc40", "\ud83d\udc42", "\ud83d\udc43", "\ud83d\udc63", "\ud83d\udc44", "\ud83d\udc45", "\ud83d\udc8b", "\u2764", "\ud83d\udc99", "\ud83d\udc9a", "\ud83d\udc9b", "\ud83d\udc9c", "\ud83d\udc93", "\ud83d\udc94", "\ud83d\udc95", "\ud83d\udc96", "\ud83d\udc97", "\ud83d\udc98", "\ud83d\udc9d", "\ud83d\udc9e", "\ud83d\udc9f", "\ud83d\udc4d", "\ud83d\udc4e", "\ud83d\udc4c", "\u270a", "\u270c", "\u270b", "\ud83d\udc4a", "\u261d", "\ud83d\udc46", "\ud83d\udc47", "\ud83d\udc48", "\ud83d\udc49", "\ud83d\udc4b", "\ud83d\udc4f", "\ud83d\udc50" ]; //输入框获取光标位置 function getCursortPosition(textDom) { var cursorPos = 0; if (document.selection) { textDom.focus(); var selectRange = document.selection.createRange(); selectRange.moveStart('character', -textDom.value.length); cursorPos = selectRange.text.length; } else if (textDom.selectionStart || textDom.selectionStart == '0') { cursorPos = textDom.selectionStart; } return cursorPos; }; //设置光标所在位置 function setCaretPosition(element, pos) { var range, selection; if (document.createRange) { range = document.createRange(); //创建一个选中区域 range.selectNodeContents(element); //选中节点的内容 if (element.innerHTML.length > 0) { range.setStart(element.childNodes[0], pos); //设置光标起始为指定位置 } range.collapse(true); //设置选中区域为一个点 selection = window.getSelection(); //获取当前选中区域 selection.removeAllRanges(); //移出所有的选中范围 selection.addRange(range); //添加新建的范围 }; }; //光标前插入节点函数 function insertPositionNode(nodeId, doc) { var range, selection; //记录光标位置对象 selection = window.getSelection(); //获取当前选中区域 //判断选中区域为某个节点id时才能触发 if (selection.baseNode && (selection.baseNode.id == nodeId || selection.baseNode.parentElement.id == nodeId)) { var node = selection.anchorNode; // 这里判断是做是否有光标判断,因为弹出框默认是没有的 if (node != null) { range = selection.getRangeAt(0); // 获取光标起始位置 } else { range = undefined; } range.insertNode(doc); // 在光标位置插入该对象 selection.collapseToEnd(); //光标移动至末尾 }; }; //dom主动获取焦点并且移动到末尾 function getFocus() { var selection = window.getSelection(); //获取当前选中区域 //判断选中区域为某个节点id时才能触发 if (!(selection.baseNode && (selection.baseNode.id == 'preId' || selection.baseNode.parentElement.id == 'preId'))) { var obj = document.getElementById('preId'); if (window.getSelection) { obj.focus(); selection.selectAllChildren(obj); //range 选择obj下所有子内容 selection.collapseToEnd(); //光标移至最后 } else if (document.selection) { var range = document.selection.createRange(); //创建选择对象 range.moveToElementText(obj); //range定位到obj range.collapse(false); //光标移至最后 range.select(); }; }; }; //设置按键发送与换行 function keydownFun(cbok) { return function (event) { // 发送操作 if (!event.ctrlKey && event.keyCode == 13) { event.preventDefault(); send(cbok)(); } else //换行操作 if (event.ctrlKey && event.keyCode == 13) { event.preventDefault(); newlineFun(); boxScroll(); }; } }; //换行函数 function newlineFun() { var br_ = document.createElement("br"); insertPositionNode('preId', br_); }; //滚动条始终保持最下方 function boxScroll() { var doc = document.getElementById('preId'); doc.scrollTop = doc.scrollHeight; }; //编辑框添加文件信息 function pushFile(file) { // console.log(file.name); var doc_img = document.createElement("img"); doc_img.setAttribute("src", require('./文件icon.png')); doc_img.setAttribute("data-fileid", fileId++); doc_img.setAttribute("style", 'width:40px;height:40px;'); insertPositionNode('preId', doc_img); }; // 视频发送 function pushVideo(cbok) { return function () { fileId++; if (cbok) { cbok(videoFile) } }; }; //编辑框添加图片信息 function pushImage(src_) { var doc = document.createElement("img"); doc.setAttribute("src", src_); doc.setAttribute("data-imageid", fileId++); doc.setAttribute('style', 'vertical-align:bottom;'); insertPositionNode('preId', doc); }; //编辑框添加表情信息 function pushExpression(data) { var doc = document.createElement("img"); doc.setAttribute("src", "../../../../../static/img-apple-64/" + EmojiSourcePeople[data.index_].codePointAt(0).toString(16) + ".png"); doc.setAttribute("class", "emojiImg"); doc.setAttribute("emojisourcepeoplenum", data.index_); expressionOperation().hideExpression(); insertPositionNode('preId', doc); }; //获取并操作文件信息 function obtainFile() { // var fileVal = document.getElementById('uploadFile').files; // for (var i = 0; i < fileVal.length; i++) { // //判断文件类型并操作 // judgeFileType(fileVal[i]); // }; // document.getElementById('uploadFile').value = ''; var fileVal = document.getElementById('uploadFile').files; var newfileVal = Object.assign({}, fileVal); document.getElementById('uploadFile').value = ''; return newfileVal; }; //获取文件绝对路径 function getObjectURL(file) { var url = null; if (window.createObjcectURL != undefined) { url = window.createOjcectURL(file); } else if (window.URL != undefined) { url = window.URL.createObjectURL(file); } else if (window.webkitURL != undefined) { url = window.webkitURL.createObjectURL(file); } return url; }; //判断文件类型 function judgeFileType(file_) { var type = file_.type; // 图片类型文件处理 if (type.indexOf('image') > -1) { //追加文件 fileArray.push(file_); pushImage(getObjectURL(file_)); } else // 视频类型文件处理 if ( type.indexOf('audio') > -1 || type.indexOf('video') > -1 ) { videoFile = file_; document.getElementById('sendVideo').click(); } else // 其它文件类型 { fileArray.push(file_); pushFile(file_); } }; //文件拖拽至输入框 function dropFile() { //获取拖拽区域 var dropPre = document.querySelector("#preId"); //绑定拖动释放事件 dropPre.ondrop = function (e) { e.preventDefault(); getFocus(); //获取文件对象 var fileVal = e.dataTransfer.files; for (var i = 0; i < fileVal.length; i++) { //判断文件类型并操作 judgeFileType(fileVal[i]); }; }; }; // 切割发送消息 function cutSend(preVal) { // 替换表情图片为文字 var preDom = document.getElementById('preId'); var cNode = preDom.cloneNode(true); var atWhoList = []; cNode.childNodes.forEach((item, index, array) => { // @ if (item.className == 'atwho-inserted') { atWhoList.push(item.firstChild.getAttribute('userid')); } // 图片 if (item.nodeName == 'IMG') { var spanIMG = document.createElement("span"); if (item.getAttribute('emojisourcepeoplenum')) { spanIMG.innerText = EmojiSourcePeople[item.getAttribute('emojisourcepeoplenum')]; } cNode.replaceChild(spanIMG, item) } // 换行符 if (item.nodeName == 'BR') { var spanBR = document.createElement("span"); spanBR.innerText = "\\n"; cNode.replaceChild(spanBR, item) } }) var messageArr_ = [cNode.innerText.replace(/\\n/g, "\n")]; messageArr_.push(atWhoList); var bool = false; var str = ''; preVal.forEach((item, index, array) => { // 文本 if (item.nodeName == '#text') { if (item.data !== '') { str += item.data } } else // 图标 if (item.nodeName == 'IMG') { // 表情 if (item.dataset.id) { str += EmojiSourcePeople[item.dataset.id] } else // 图片文件 if (item.dataset.imageid) { if (str !== '') { messageArr_.push({ type: 'text', msg: str }) } messageArr_.push({ type: 'file', fileIndex: item.dataset.imageid }) bool = true; } // 其它文件 if (item.dataset.fileid) { if (str !== '') { messageArr_.push({ type: 'text', msg: str }) } messageArr_.push({ type: 'file', fileIndex: item.dataset.fileid }) bool = true; } } else // 换行符 if (item.nodeName == 'BR') { str += '\n' } if (bool) { str = ''; bool = false; } }); if (str !== '') { messageArr_.push({ type: 'text', msg: str }) } return messageArr_ }; //发送消息 function send(cbok) { return function () { //获取输入框数据信息 var preVal = document.getElementById('preId').childNodes; if (cbok) { cbok(cutSend(preVal), fileArray) } }; }; /************************************ 设置 *************************************** */ //表情包操作 function expressionOperation(cbok) { //显示表情窗 function showExpression() { var height_ = 0; var opacity_ = -0.12; var doc = document.getElementById('expression_'); var mask = document.getElementById('expression_mask'); mask.style.display = 'block'; doc.style.display = 'block'; //第一帧渲染 window.requestAnimationFrame(render); function render() { height_ += 10; opacity_ += 0.04; if (height_ <= 280) { doc.style.height = height_ + 'px'; doc.style.top = (height_ + 5) * -1 + 'px'; doc.style.opacity = opacity_; //递归渲染 window.requestAnimationFrame(render); }; }; switchExpression(); mask.onclick = function () { hideExpression() }; getFocus(); }; //隐藏表情窗 function hideExpression() { var height_ = 280; var opacity_ = 10; var doc = document.getElementById('expression_'); var mask = document.getElementById('expression_mask'); mask.style.display = 'none'; //第一帧渲染 window.requestAnimationFrame(render); function render() { height_ -= 100; opacity_ -= 0.04; if (height_ >= 0) { doc.style.height = height_ + 'px'; doc.style.top = (height_ + 5) * -1 + 'px'; doc.style.opacity = opacity_; //递归渲染 window.requestAnimationFrame(render); } else { doc.style.display = 'none'; }; }; mask.removeEventListener("click", hideExpression, false); }; //切换表情 function switchExpression() { document.getElementById('bqShow_k').innerHTML = qqemoji(); function qqemoji() { var str = ''; for (let i = 0; i < EmojiSourcePeople.length; i++) { const element = EmojiSourcePeople[i]; str += `<button class="Iclick qq_bqsize" ><i class="EmojiSourcePeople" EmojiSourcePeopleNum="` + i + `" style="background-image: url(../../../../../static/img-apple-64/` + element.codePointAt(0).toString(16) + `.png);"></i></button>` } return str; }; if (cbok) { var emojiSourcePeopleArr = document.getElementsByClassName('EmojiSourcePeople'); for (var i = 0; i < emojiSourcePeopleArr.length; i++) { emojiSourcePeopleArr[i].onclick = function () { var index_ = this.getAttribute('emojisourcepeoplenum'); cbok({ type: EmojiSourcePeople, index_ }); }; }; }; }; return { showExpression, hideExpression, switchExpression, } }; //长按录音 function webRecording() { //new一个音频 var audio_context = new AudioContext; var recorder; navigator.getUserMedia({ audio: true }, startUserMedia, function (e) { console.log('使用媒体设备请求被用户或者系统拒绝'); }); function startUserMedia(stream) { var input = audio_context.createMediaStreamSource(stream); recorder = new Recorder(input); } function startRecording() { recorder && recorder.record(); } function stopRecording(cbok) { recorder && recorder.stop(); createDownloadLink(cbok); recorder.clear(); } function createDownloadLink(cbok) { recorder && recorder.exportWAV(function (blob) { cbok(blob) }); }; return { startRecording, stopRecording } }; export default { // 输入框初始 initializeEmpty() { document.getElementById('preId').innerHTML = ''; fileInitial() }, // 视频文件初始 initiaVideo() { videoFile = {} }, // 表情包点击 expressionClick: function () { expressionOperation(pushExpression).showExpression() }, // 打开文件夹 webWechatPicClick() { getFocus() videoFile = {} document.getElementById('uploadFile').click() }, // 选中文件夹 uploadFile: obtainFile, // enter键发送 preIdKeydown(sendFun) { return keydownFun(sendFun) }, // 点击发送按钮 sendMsgClick(sendFun) { return send(sendFun) }, // 发送视频 sendVideo(sendVideoFun) { return pushVideo(sendVideoFun) }, // 启动录音 webRecord() { luyin = webRecording(); return { startRecording: luyin.startRecording, stopRecording: luyin.stopRecording } }, // 启动文件拖拽 dropFile, // 发送文本消息 sendmsg: function () {}, // 发送视频消息 sendvideo: function () {}, // 发送语音消息 sendaudio: function () {}, // 修改发送文本消息函数 setSendMsg: function (cbok) { this.sendmsg = cbok; }, // 修改发送视频消息函数 setSendVideo: function (cbok) { this.sendvideo = cbok; }, // 修改发送语音消息函数 setSendAudio: function (cbok) { this.sendaudio = cbok; }, /** * 光标 */ getFocus:getFocus };
var interface_c1_connector_register_user_response_public = [ [ "C1ConnectorRegisterUserPublicBlock", "interface_c1_connector_register_user_response_public.html#a519c491976ebc6e0663582450fe1c458", null ], [ "user", "interface_c1_connector_register_user_response_public.html#ab7ba93623fb10f4914d957b763812aca", null ] ];
// Given a binary tree t, determine whether it is symmetric around its center, i.e.each side mirrors the other. // build a binary tree. *currently unused.* function Tree(x) { this.value; this.left = null; this.right = null; } // recursive check symmetry helper function const checksymm = (left, right) => { if(left === null && right === null) { return true; } if(left === null || right === null || left.value !== right.value) { return false; } return checksymm(left.left, right.right) && checksymm(right.right, left.left) } // base(non recursive) function for checking symmetry function is_tree_symmetric(t) { console.log(checksymm(t, t)) return checksymm(t, t) } // COMPLETED, PASSES! // TESTS // 'false' symm binary tree t={ "value": 1, "left" : { "value": 2, "left" : null, "right": { "value": 3, "left" : null, "right": null, } }, "right" : { "value": 2, "left" : null, "right": { "value": 3, "left" : null, "right": null, } } } // 'true' symm binary tree // t={ // "value": 1, // "left" : { // "value": 2, // "left" : { // "value": 3, // "left" : null, // "right": null, // }, // "right": { // "value": 4, // "left" : null, // "right": null, // } // }, // "right" : { // "value": 2, // "left" : { // "value": 4, // "left" : null, // "right": null, // }, // "right": { // "value": 3, // "left" : null, // "right": null, // } // } // } is_tree_symmetric(t)
let mongoose=require('mongoose'); let Schema=mongoose.Schema; let userSchema=new Schema({ email:{ type:String, required:true, unique:true }, user_name:{ type:String, required:true, unique:true }, password:{ type:String, required:true }, date:{ type:Date, default:Date.now() }, enable_flag:{ type:String, default:'Y' } }); module.exports=mongoose.model('users',userSchema);
// function SocketCollectedPriceInfo(){ // // } class SocketCollectedPriceInfo{ constructor(protocol, exchange, quoteA, quoteB, price, height) { this.protocol = protocol; this.exchange = exchange; this.quoteA = quoteA; this.quoteB = quoteB; this.price = price; this.height = height || 0; } } exports.SocketCollectedPriceInfo = SocketCollectedPriceInfo;
import React from 'react'; import Social from './Social'; import Body from './Body'; function Card(props) { return ( <div className="card"> <div className="body"> <Body /> </div> <div className="social"> <Social /> </div> </div> ); } export default Card;
const functions = require('firebase-functions'); const admin = require('firebase-admin'); const { repos } = require('./repos'); const cogs = require('./cogs'); const mocks = require('./mocks'); const { parser } = require('./parser'); const github = require('./github'); const users = require('./users'); const panel = require('./panel'); const reports = require('./reports'); const { rotate } = require('./auth0'); admin.initializeApp(); exports.repos = functions.https.onRequest(repos); exports.parser = functions.https.onRequest(parser); exports.cogs = functions.https.onRequest(cogs); exports.github = functions.https.onRequest(github); exports.users = functions.https.onRequest(users); exports.panel = functions.https.onRequest(panel); exports.reports = functions.https.onRequest(reports); exports.rotate = functions.pubsub.schedule('every 12 hours').onRun(rotate);
// require("babel/polyfill"); let foo = (a, b) => a + b var x = 4; var u = "ustun"; if (u.endsWith == "un") { console.log("ok ends with"); } console.log(`Hello ${1+3}`); let calculate = () => { let j = 10; for (let i = 0; i < 10; i++) { let j = i + 5; console.log("i", j); } } let j = 11; console.log("0", j, foo(3,4)); var name = "Ustun"; var age = 30; var Animal = function () {}; Object.assign(Animal.prototype, {havla: () => "havliyor"}); var human = {name, ["first" + "name" + (Math.random() * 100).toFixed(0)]: "Ustun", age, hello() { console.log("hello there"); }, toString() { return `Hello my name is ${this.name} and my age is ${this.age}`; } }; console.log(String(human), human); var takimlar = new Set(); takimlar.add("Besiktas").add("Fenerbahce").add("Galatasaray").add("Besiktas"); console.log(takimlar.size) var sehirler = new Map(); sehirler.set("06", "Ankara"); sehirler.set("34", "Istanbul"); sehirler.set(human, human.toString()) console.log(sehirler.get("34"), sehirler.get("35", "foo"), sehirler.get(human))
import React from 'react' import { connect } from 'react-redux' import { StyleSheet } from 'quantum' import Swipeable from 'react-swipeable' import { openMobileMenu, closeMobileMenu } from '../actions' import { RowLayout, Layout, AutoSizer } from 'bypass/ui/layout' import Header from './Header' import Footer from './Footer' import MobileMenu from './MobileMenu' const styles = StyleSheet.create({ self: { background: '#f5f5f5', width: '100%', height: '100%', position: 'relative', zIndex: 1, }, push: { left: '245px', transition: 'left 0.2s', }, }) const Workspace = ({ children }) => ( <RowLayout> <Layout> <Header /> </Layout> <Layout grow={1} shrink={1} scrollY> <AutoSizer> {children} </AutoSizer> </Layout> <Layout> <Footer /> </Layout> </RowLayout> ) const Container = ({ viewport: { type, orientation } = {}, push, onOpenMenu, onCloseMenu, ...props }) => { if (type === 'Desktop' || (type === 'Tablet' && orientation === 'Landscape')) { return ( <div className={styles()}> <Workspace {...props} /> </div> ) } return ( <Swipeable onSwipingRight={onOpenMenu} onSwipingLeft={onCloseMenu} > <div className={styles({ push })}> <MobileMenu /> <Workspace {...props} /> </div> </Swipeable> ) } export default connect( state => ({ viewport: state.viewport, push: state.workspace.mobileMenu, }), dispatch => ({ onOpenMenu: () => { dispatch(openMobileMenu()) }, onCloseMenu: () => { dispatch(closeMobileMenu()) }, }) )(Container)
module.exports = { logging: function() { return require('./log'); }, config: function() { return require('./config'); }, wxs: function() { return require('./wxs'); } };
//libraries let dictionary = [ 'phlegm', 'deciduous', 'conscientious', 'daiquiri', 'exhilarate', 'hierarchy', 'mischievous', 'questionnaire', 'diarrhea', 'awkward', 'bagpipes', 'fjord', 'haphazard', 'jukebox', 'memento', 'numbskull', 'ostracize', 'rhythmic', 'wildebeest' ]; //other global lets let key = document.getElementsByClassName("key"); let currentWord; let currentWordArray; let makeListeners = function() {clickButton(this.getAttribute("id"));}; let canvas = document.getElementById('canvas'); let ctx = canvas.getContext('2d'); let numWrong = 0; (function () { //create new game on site load newGame(); })(); document.onkeypress = function(e) { //keyboard press listener clickButton(e.key); toggleActive(e.code, 'keyDown'); //adds active class to keys } document.onkeyup = function(e) { //removes active class from keys toggleActive(e.code, 'keyUp'); } for (let i = 0; i < key.length; i++) { //put a click listener on each key key[i].addEventListener('click', makeListeners, false); key[i].addEventListener('mousedown', function(){ this.classList.add('active'); }); key[i].addEventListener('mouseup', function(){ this.classList.remove('active'); }); } function toggleActive(whichKey, upOrDown) { //show onscreen which keys are being pressed if (document.getElementById(whichKey) != null && upOrDown == 'keyDown'){ document.getElementById(whichKey).classList.add('active'); } else if (document.getElementById(whichKey) != null && upOrDown == 'keyUp') { document.getElementById(whichKey).classList.remove('active'); } } function clickButton(buttonId) { //converts clicks and keypresses into letters if (buttonId != 'newGame' && (document.getElementById('win').className).indexOf('hidden') != -1 && (document.getElementById('lose').className).indexOf('hidden') != -1) { checkAnswer(buttonId.substr(buttonId.length-1).toLowerCase()); } else if (buttonId == 'newGame') { newGame(); } } function drawHangman(wrongNum) { switch (wrongNum) { case 1: ctx.beginPath(); ctx.arc(100, 50, 25, 0, Math.PI * 2, false); ctx.stroke(); break; case 2: ctx.beginPath(); ctx.moveTo(100, 75); ctx.lineTo(100, 175); ctx.stroke(); break; case 3: ctx.beginPath(); ctx.moveTo(100, 175); ctx.lineTo(75, 225); ctx.stroke(); break; case 4: ctx.beginPath(); ctx.moveTo(100, 175); ctx.lineTo(125, 225); ctx.stroke(); break; case 5: ctx.beginPath(); ctx.moveTo(100, 115); ctx.lineTo(75, 135); ctx.stroke(); break; case 6: ctx.beginPath(); ctx.moveTo(100, 115); ctx.lineTo(125, 135); ctx.stroke(); break; case 7: ctx.beginPath(); ctx.arc(90, 40, 1, 0, Math.PI * 2, false); ctx.moveTo(110, 40); ctx.arc(110, 40, 1, 0, Math.PI * 2, false); ctx.moveTo(110, 60); ctx.arc(100, 60, 10, 0, Math.PI, true); ctx.stroke(); for (let i = 0; i < currentWord.length; i++) { document.getElementById(currentWord+i).classList.remove('secret'); } document.getElementById('lose').classList.remove('hidden'); break; }; } function newGame(){ currentWord = dictionary[Math.floor(Math.random()*(dictionary.length-1))]; currentWordArray = []; document.getElementById('lose').classList.add('hidden'); document.getElementById('win').classList.add('hidden'); document.getElementById('letterDisplay').innerHTML = ''; let htmlToInsert = ''; for (let i = 0; i < currentWord.length; i++) { htmlToInsert += '<div class="underline"><span class="letter secret" id="'+currentWord+i+'">'+currentWord[i]+'</span></div>'; currentWordArray.push(currentWord[i]); } document.getElementById('letterDisplay').innerHTML = htmlToInsert; numWrong = 0; ctx.clearRect(0, 0, canvas.width, canvas.height); //create game stage ctx.lineWidth = 2; ctx.strokeStyle = '#B2B5B3'; ctx.beginPath(); ctx.moveTo(175, 250); ctx.lineTo(25, 250); ctx.moveTo(35, 250); ctx.lineTo(35, 0); ctx.moveTo(35, 5); ctx.lineTo(100, 5); ctx.lineTo(100, 25); ctx.stroke(); ctx.strokeStyle = 'Black'; } function checkAnswer(answer){ if (currentWordArray.indexOf(answer) != -1) { let indices = []; for (let i = 0; i < currentWord.length; i++) { if (currentWord[i] === answer) { indices.push(i); } } for (let i = 0; i < indices.length; i++) { document.getElementById(currentWord+indices[i]).classList.remove('secret'); } checkSolution(); } else { numWrong++; drawHangman(numWrong); } } function checkSolution() { if (document.getElementsByClassName('secret').length == 0) { document.getElementById('win').classList.remove('hidden'); } }
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' // 'starter.controllers' is found in controllers.js angular.module('starter', ['ionic', 'angularMoment','starter.controllers']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) if (window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { // org.apache.cordova.statusbar required StatusBar.styleDefault(); } }); }) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('app', { url: '/app', abstract: true, templateUrl: 'templates/menu.html', controller: 'AppCtrl' }) //vacunarlo-ya .state('app.vacunarlo-ya', { cache:false, url: '/vacunarlo-ya', views: { 'menuContent': { templateUrl: 'templates/vacunarlo-ya.html', controller: 'VacunarloYaController' } } }) .state('app.adicional', { cache:false, url: '/adicional', views: { 'menuContent': { templateUrl: 'templates/adicional.html', controller: 'AdicionalController' } } }) .state('app.resultados', { url: '/resultados', cache: false, views: { 'menuContent': { templateUrl: 'templates/resultados.html', controller: 'ResultadosController' } } }) .state('app.alertas', { url: '/alertas', views: { 'menuContent': { templateUrl: 'templates/alertas.html' } } }) .state('app.profesional-vacunar', { url: '/profesional-vacunar', cache: false, views: { 'menuContent': { templateUrl: 'templates/profesional-vacunar.html', controller: 'ProfesionalVacunarController' } } }) .state('app.profesional-buscar', { url: '/profesional-buscar', cache: false, views: { 'menuContent': { templateUrl: 'templates/profesional-buscar.html', controller: 'ProfesionalBuscarController' } } }) .state('app.buscar', { url: '/buscar', views: { 'menuContent': { templateUrl: 'templates/buscar.html', controller: 'BuscarController' } } }) .state('app.vacunas', { url: '/vacunas', cache: false, views: { 'menuContent': { templateUrl: 'templates/vacunas.html', controller: 'VacunasController' } } }) .state('app.vacuna', { url: '/vacuna/:vacunaID', views: { 'menuContent': { templateUrl: 'templates/vacuna.html', controller: 'VacunaController' } } }) .state('app.centros', { url: '/centros', views: { 'menuContent': { templateUrl: 'templates/centros.html' } } }) .state('app.logeo', { url: '/logeo', cache:false, views: { 'menuContent': { templateUrl: 'templates/logeo.html', controller: 'LogeoController' } } }) .state('app.principal', { url: '/principal', views: { 'menuContent': { templateUrl: 'templates/principal.html', controller: 'PrincipalController' } } }); // if none of the above states are matched, use this as the fallback $urlRouterProvider.otherwise('/app/principal'); });
var user = prompt("Which one do you want to enter (NAME || AGE)?"); function user(name, age) { document.write (name + " is " + age + " years old."); } (user == "name") ? alert("your name is " + prompt("please enter your name.") + "your name is"): alert("your age is " + prompt("please enter your age.") + " years old"); console.log(user);
var myUserId = "jNDvvE3w8Hh9EEW0yIwp2ogO2Hl1" module.exports = matchesMap = { "06zLPWzLrKYQZCjYQV9v": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Busan", "newSR": 3648, "heroes": [ "Winston", "Reinhardt" ], "localTime": { "_seconds": 1539104207, "_nanoseconds": 835000000 }, "currentSR": 3672, "firebaseTime": { "_seconds": 1539104207, "_nanoseconds": 541000000 }, "lastSR": 3672, "season": "13" }, "09Frpjg9cf8oBprsnTCY": { "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1540586835, "_nanoseconds": 657000000 }, "currentSR": 3428, "firebaseTime": { "_seconds": 1540586834, "_nanoseconds": 194000000 }, "lastSR": 3428, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Dorado", "newSR": 3453 }, "0DJ9VlopzxBuRKSW8rbO": { "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Junkertown", "newSR": 3568, "heroes": [ "Orisa", "Zenyatta" ], "localTime": { "_seconds": 1537463531, "_nanoseconds": 654000000 }, "currentSR": 3594, "firebaseTime": { "_seconds": 1537463531, "_nanoseconds": 186000000 }, "lastSR": 3594 }, "0LhCidWvbkuMu7owaGvK": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Junkertown", "newSR": 3649, "heroes": [ "Zenyatta", "Lucio", "Moira" ], "localTime": { "_seconds": 1539818472, "_nanoseconds": 955000000 }, "currentSR": 3674, "firebaseTime": { "_seconds": 1539818472, "_nanoseconds": 401000000 }, "lastSR": 3674, "season": "12" }, "0WHaVrtWC8IOWq0CR64n": { "firebaseTime": { "_seconds": 1540512060, "_nanoseconds": 299000000 }, "lastSR": 3501, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3477, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540512061, "_nanoseconds": 456000000 }, "currentSR": 3501 }, "0uq0J3Lzu9095Qo4xCQ9": { "firebaseTime": { "_seconds": 1539796997, "_nanoseconds": 785000000 }, "lastSR": 3622, "season": "12", "userId": myUserId, "result": "draw", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3622, "heroes": [ "Moira", "Brigitte" ], "localTime": { "_seconds": 1539796998, "_nanoseconds": 417000000 }, "currentSR": 3622 }, "1TD1tgNCLeuFYUZ5Ln1o": { "userId": myUserId, "result": "draw", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3531, "heroes": [ "Brigitte", "Moira", "Lucio" ], "localTime": { "_seconds": 1539974831, "_nanoseconds": 621000000 }, "currentSR": 3531, "firebaseTime": { "_seconds": 1539974828, "_nanoseconds": 936000000 }, "lastSR": 3531, "season": "12" }, "1WdGWaQ6OHVd9s0933lQ": { "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3650, "heroes": [ "Brigitte", "Zenyatta", "Lucio" ], "localTime": { "_seconds": 1539800051, "_nanoseconds": 930000000 }, "currentSR": 3622, "firebaseTime": { "_seconds": 1539800051, "_nanoseconds": 447000000 }, "lastSR": 3622, "season": "12", "userId": myUserId, "result": "win" }, "1tq0ige5OI1buCD8baDP": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Blizzard World", "lastSR": 3565, "placementMatch": false, "season": "13", "result": "win", "newSR": 3590, "heroes": [ "Moira", "Brigitte" ], "currentSR": 3565, "localTime": { "_seconds": 1542828157, "_nanoseconds": 246000000 }, "firebaseTime": { "_seconds": 1542828154, "_nanoseconds": 409000000 } }, "1vHZBvee9r2bY2KH2yJP": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Route 66", "lastSR": 3506, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3481, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3506, "localTime": { "_seconds": 1542389179, "_nanoseconds": 825000000 }, "firebaseTime": { "_seconds": 1542389180, "_nanoseconds": 128000000 } }, "2F688oHAV1z8yGjFa0gH": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3646, "heroes": [ "Ana", "Moira" ], "localTime": { "_seconds": 1539366613, "_nanoseconds": 734000000 }, "currentSR": 3623, "firebaseTime": { "_seconds": 1539366612, "_nanoseconds": 688000000 }, "lastSR": 3623, "season": "12" }, "2QgfWI4sw6aRimTlEVPm": { "result": "loss", "isCurrentSRChanged": false, "map": "Rialto", "newSR": 3671, "heroes": [ "Reinhardt", "Orisa" ], "localTime": { "_seconds": 1538769685, "_nanoseconds": 818000000 }, "currentSR": 3695, "firebaseTime": { "_seconds": 1538769685, "_nanoseconds": 999000000 }, "lastSR": 3695, "season": "12", "userId": myUserId }, "2bMFBHgkjeWFn9cWuCS3": { "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3515, "localTime": { "_seconds": 1543262227, "_nanoseconds": 175000000 }, "firebaseTime": { "_seconds": 1543262227, "_nanoseconds": 322000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hollywood", "lastSR": 3515, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3491 }, "2eTokvAWSW2qi0eejbCb": { "result": "win", "newSR": 3584, "heroes": [ "Brigitte", "Lucio" ], "currentSR": 3559, "localTime": { "_seconds": 1542654231, "_nanoseconds": 107000000 }, "firebaseTime": { "_seconds": 1542654230, "_nanoseconds": 997000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Ilios", "lastSR": 3559, "placementMatch": false, "season": "13" }, "2vzYR4RkMwXFOXjwgHfT": { "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3696, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1537975453, "_nanoseconds": 238000000 }, "currentSR": 3717, "firebaseTime": { "_seconds": 1537975451, "_nanoseconds": 872000000 }, "lastSR": 3717, "season": "12", "userId": myUserId, "result": "loss" }, "3Jh40gTEg93ECNrUQEIz": { "firebaseTime": { "_seconds": 1542906278, "_nanoseconds": 32000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Nepal", "lastSR": 3567, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3542, "heroes": [ "Lucio", "Brigitte" ], "currentSR": 3567, "localTime": { "_seconds": 1542906278, "_nanoseconds": 7000000 } }, "3WDvaq0sF83wAkWTksHe": { "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3717, "heroes": [ "Reinhardt", "Orisa" ], "localTime": { "_seconds": 1537910031, "_nanoseconds": 826000000 }, "currentSR": 3694, "firebaseTime": { "_seconds": 1537910031, "_nanoseconds": 167000000 }, "lastSR": 3694, "season": "12", "userId": myUserId, "result": "win" }, "3ZEGhatqqH3PT9JzkjRi": { "heroes": [ "Ana", "Moira" ], "localTime": { "_seconds": 1536761565, "_nanoseconds": 835000000 }, "currentSR": 3450, "firebaseTime": { "_seconds": 1536761564, "_nanoseconds": 447000000 }, "lastSR": 3379, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": true, "map": "Dorado", "newSR": 3427 }, "3b6mHfWyrUOZr85IGA9l": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": true, "map": "Dorado", "newSR": 3507, "heroes": [ "Reinhardt", "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540158863, "_nanoseconds": 434000000 }, "currentSR": 3530, "firebaseTime": { "_seconds": 1540158862, "_nanoseconds": 742000000 }, "lastSR": 3555, "season": "12" }, "3uo9uMhYsb3Ki6LDgeH3": { "isCurrentSRChanged": false, "map": "Junkertown", "newSR": 3580, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1540171295, "_nanoseconds": 856000000 }, "currentSR": 3555, "firebaseTime": { "_seconds": 1540171295, "_nanoseconds": 218000000 }, "lastSR": 3555, "season": "12", "userId": myUserId, "result": "win" }, "49HBxaUc1AzcZw39eYwm": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3718, "heroes": [ "Reinhardt" ], "localTime": { "_seconds": 1538595873, "_nanoseconds": 464000000 }, "currentSR": 3744, "firebaseTime": { "_seconds": 1538595872, "_nanoseconds": 236000000 }, "lastSR": 3744, "season": "12" }, "4CqjzJPnRsLV4EGHRInK": { "isCurrentSRChanged": false, "map": "Route 66", "lastSR": 3517, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3492, "heroes": [ "Zenyatta" ], "currentSR": 3517, "localTime": { "_seconds": 1543251801, "_nanoseconds": 409000000 }, "firebaseTime": { "_seconds": 1543251799, "_nanoseconds": 353000000 }, "userId": myUserId }, "4Ff2mm2h7daTrdDtsMML": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Dorado", "lastSR": 3378, "placementMatch": false, "season": "13", "result": "win", "newSR": 3405, "heroes": [ "Zenyatta" ], "currentSR": 3378, "localTime": { "_seconds": 1543423836, "_nanoseconds": 720000000 }, "firebaseTime": { "_seconds": 1543423833, "_nanoseconds": 795000000 } }, "4ZhNM8u2Ht5g20sOdR5k": { "lastSR": 3531, "placementMatch": false, "season": "13", "result": "win", "newSR": 3556, "heroes": [ "Zenyatta", "Lucio" ], "currentSR": 3531, "localTime": { "_seconds": 1541891010, "_nanoseconds": 724000000 }, "firebaseTime": { "_seconds": 1541891010, "_nanoseconds": 865000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Temple of Anubis" }, "4rTDNwiHTAJPbeVo1paX": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3428, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540664568, "_nanoseconds": 460000000 }, "currentSR": 3404, "firebaseTime": { "_seconds": 1540664566, "_nanoseconds": 164000000 }, "lastSR": 3404, "season": "12" }, "4xWEOGMzHTZdhoOH69df": { "currentSR": 3457, "localTime": { "_seconds": 1541777302, "_nanoseconds": 710000000 }, "firebaseTime": { "_seconds": 1541777300, "_nanoseconds": 423000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower", "lastSR": 3457, "placementMatch": false, "season": "13", "result": "win", "newSR": 3481, "heroes": [ "Winston" ] }, "52rIlo4Izs2OeZINTmXB": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Blizzard World", "lastSR": 3384, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3359, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3384, "localTime": { "_seconds": 1543434357, "_nanoseconds": 613000000 }, "firebaseTime": { "_seconds": 1543434354, "_nanoseconds": 716000000 } }, "53ZObTMm4nFDKNhYZ4TE": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3550, "heroes": [ "Reinhardt" ], "localTime": { "_seconds": 1537286817, "_nanoseconds": 445000000 }, "currentSR": 3574, "firebaseTime": { "_seconds": 1537286816, "_nanoseconds": 616000000 }, "lastSR": 3574, "season": "12" }, "5EyMa5o60uObu1cH8ifd": { "result": "loss", "newSR": 3586, "heroes": [ "Lucio", "Brigitte" ], "currentSR": 3610, "localTime": { "_seconds": 1542678440, "_nanoseconds": 69000000 }, "firebaseTime": { "_seconds": 1542678439, "_nanoseconds": 995000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Blizzard World", "lastSR": 3610, "placementMatch": false, "season": "13" }, "5a3nkIDprG0usTABTj0c": { "map": "Watchpoint: Gibraltar", "lastSR": 3509, "placementMatch": false, "season": "13", "result": "win", "newSR": 3534, "heroes": [ "Lucio", "Brigitte", "Ana", "Zenyatta" ], "currentSR": 3509, "localTime": { "_seconds": 1542049882, "_nanoseconds": 634000000 }, "firebaseTime": { "_seconds": 1542049882, "_nanoseconds": 867000000 }, "userId": myUserId, "isCurrentSRChanged": false }, "5oLS3R2ELRX6yC9OlQnu": { "lastSR": 3532, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3507, "heroes": [ "Reinhardt", "Winston" ], "currentSR": 3532, "localTime": { "_seconds": 1542309322, "_nanoseconds": 565000000 }, "firebaseTime": { "_seconds": 1542309321, "_nanoseconds": 58000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower" }, "6Ec4zZr4msF9lIXOKG2F": { "result": "win", "newSR": null, "heroes": [ "Brigitte" ], "currentSR": null, "localTime": { "_seconds": 1541114853, "_nanoseconds": 581000000 }, "firebaseTime": { "_seconds": 1541114850, "_nanoseconds": 785000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower", "lastSR": null, "placementMatch": true, "season": "13" }, "6HfZlk8Hj3j2RDgKVZzI": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Busan", "lastSR": null, "placementMatch": true, "season": "13", "result": "win", "newSR": null, "heroes": [ "Brigitte" ], "currentSR": null, "localTime": { "_seconds": 1541114317, "_nanoseconds": 869000000 }, "firebaseTime": { "_seconds": 1541114314, "_nanoseconds": 990000000 } }, "6OkdthMOcP9mLSi4b2bF": { "isCurrentSRChanged": false, "map": "Ilios", "lastSR": 3542, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3517, "heroes": [ "Brigitte", "Lucio" ], "currentSR": 3542, "localTime": { "_seconds": 1543251788, "_nanoseconds": 602000000 }, "firebaseTime": { "_seconds": 1543251786, "_nanoseconds": 616000000 }, "userId": myUserId }, "6lfxcXLm6CQfg9U5zuIK": { "isCurrentSRChanged": false, "map": "Nepal", "lastSR": 3563, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3539, "heroes": [ "Zenyatta", "Lucio" ], "currentSR": 3563, "localTime": { "_seconds": 1542733301, "_nanoseconds": 908000000 }, "firebaseTime": { "_seconds": 1542733299, "_nanoseconds": 938000000 }, "userId": myUserId }, "6vwOSoH9YUpDQDvOR7P1": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Blizzard World", "newSR": 3477, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540507437, "_nanoseconds": 441000000 }, "currentSR": 3453, "firebaseTime": { "_seconds": 1540507436, "_nanoseconds": 286000000 }, "lastSR": 3453, "season": "12" }, "6zaTXj63vyCexcgC5mzc": { "placementMatch": false, "season": "13", "result": "win", "newSR": 3515, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3492, "localTime": { "_seconds": 1543259721, "_nanoseconds": 459000000 }, "firebaseTime": { "_seconds": 1543259721, "_nanoseconds": 596000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Junkertown", "lastSR": 3492 }, "78JMqNcmbrJbedu59J9E": { "isCurrentSRChanged": false, "map": "Eichenwalde", "lastSR": null, "placementMatch": true, "season": "13", "result": "loss", "newSR": null, "heroes": [ "Zenyatta", "Moira", "Brigitte" ], "currentSR": null, "localTime": { "_seconds": 1541126374, "_nanoseconds": 822000000 }, "firebaseTime": { "_seconds": 1541126374, "_nanoseconds": 985000000 }, "userId": myUserId }, "7AzGsuV5NW4B0SYHa65v": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Oasis", "lastSR": 3541, "placementMatch": false, "season": "13", "result": "win", "newSR": 3566, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3541, "localTime": { "_seconds": 1542740571, "_nanoseconds": 590000000 }, "firebaseTime": { "_seconds": 1542740569, "_nanoseconds": 681000000 } }, "7CF8LMeJTvstfuIvdZwG": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Volskaya Industries", "lastSR": 3482, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3458, "heroes": [ "Lucio", "Zenyatta" ], "currentSR": 3482, "localTime": { "_seconds": 1541443132, "_nanoseconds": 827000000 }, "firebaseTime": { "_seconds": 1541443131, "_nanoseconds": 750000000 } }, "7SpkLaIA7MaekQ4MRnlV": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "newSR": 3428, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1540584040, "_nanoseconds": 248000000 }, "currentSR": 3453, "firebaseTime": { "_seconds": 1540584038, "_nanoseconds": 747000000 }, "lastSR": 3453, "season": "12" }, "7ZPbPuvcvzkGd0qSSkcT": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "newSR": 3531, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540162523, "_nanoseconds": 770000000 }, "currentSR": 3507, "firebaseTime": { "_seconds": 1540162523, "_nanoseconds": 91000000 }, "lastSR": 3507, "season": "12" }, "7dAqZysOy4a9rJ5gDZC0": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "King's Row", "newSR": 3476, "heroes": [ "Reinhardt" ], "localTime": { "_seconds": 1540563438, "_nanoseconds": 314000000 }, "currentSR": 3502, "firebaseTime": { "_seconds": 1540563436, "_nanoseconds": 724000000 }, "lastSR": 3502, "season": "12" }, "7exxilKP192vNQ7pkM2W": { "map": "Hollywood", "newSR": 3428, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540588507, "_nanoseconds": 630000000 }, "currentSR": 3453, "firebaseTime": { "_seconds": 1540588506, "_nanoseconds": 156000000 }, "lastSR": 3453, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false }, "7sXs5gWjjyICBPJITXhL": { "result": "win", "newSR": 3457, "heroes": [ "Moira" ], "currentSR": 3433, "localTime": { "_seconds": 1541478517, "_nanoseconds": 150000000 }, "firebaseTime": { "_seconds": 1541478516, "_nanoseconds": 172000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower", "lastSR": 3433, "placementMatch": false, "season": "13" }, "8clstS7JqgsiP8QAs5tM": { "heroes": [ "Zenyatta", "Brigitte", "Reinhardt" ], "currentSR": 3508, "localTime": { "_seconds": 1542129692, "_nanoseconds": 230000000 }, "firebaseTime": { "_seconds": 1542129690, "_nanoseconds": 179000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Route 66", "lastSR": 3508, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3483 }, "8sSjZYGoTa6NXMrk9ANh": { "localTime": { "_seconds": 1540226510, "_nanoseconds": 825000000 }, "currentSR": 3557, "firebaseTime": { "_seconds": 1540226510, "_nanoseconds": 977000000 }, "lastSR": 3557, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3532, "heroes": [ "Brigitte", "Zenyatta" ] }, "973AmgBjnMrxGdXVaBPB": { "newSR": 3556, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1540235324, "_nanoseconds": 694000000 }, "currentSR": 3580, "firebaseTime": { "_seconds": 1540235324, "_nanoseconds": 899000000 }, "lastSR": 3580, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Eichenwalde" }, "9y7M0fu1XiIWqPcjgUAi": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Dorado", "newSR": 3580, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540230327, "_nanoseconds": 682000000 }, "currentSR": 3556, "firebaseTime": { "_seconds": 1540230327, "_nanoseconds": 882000000 }, "lastSR": 3556, "season": "12" }, "ADaVSOrLKQLuru4UrBDz": { "lastSR": 3433, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3409, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3433, "localTime": { "_seconds": 1541453113, "_nanoseconds": 206000000 }, "firebaseTime": { "_seconds": 1541453112, "_nanoseconds": 142000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hollywood" }, "ASTz3YT026EgDTEmuIJQ": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3528, "heroes": [ "Moira" ], "localTime": { "_seconds": 1540402450, "_nanoseconds": 82000000 }, "currentSR": 3504, "firebaseTime": { "_seconds": 1540402449, "_nanoseconds": 140000000 }, "lastSR": 3504, "season": "12" }, "Ablrkaz5nDLRZYruJnix": { "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3595, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1537801821, "_nanoseconds": 671000000 }, "currentSR": 3569, "firebaseTime": { "_seconds": 1537801821, "_nanoseconds": 832000000 }, "lastSR": 3569 }, "Bxe6qPyQOaUwf2JNtEv7": { "result": "win", "newSR": 3532, "heroes": [ "Reinhardt", "Orisa", "Winston" ], "currentSR": 3508, "localTime": { "_seconds": 1542308680, "_nanoseconds": 70000000 }, "firebaseTime": { "_seconds": 1542308678, "_nanoseconds": 600000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Ilios", "lastSR": 3508, "placementMatch": false, "season": "13" }, "C0asuZ8MMhpXB1i35nX8": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3508, "placementMatch": false, "season": "13", "result": "draw", "newSR": 3508, "heroes": [ "Zenyatta", "Moira" ], "currentSR": 3508, "localTime": { "_seconds": 1542304367, "_nanoseconds": 800000000 }, "firebaseTime": { "_seconds": 1542304366, "_nanoseconds": 307000000 } }, "C9tlbGukLwamVoqYnpE0": { "map": "Busan", "newSR": 3597, "heroes": [ "Moira" ], "localTime": { "_seconds": 1539560509, "_nanoseconds": 926000000 }, "currentSR": 3621, "firebaseTime": { "_seconds": 1539560510, "_nanoseconds": 29000000 }, "lastSR": 3621, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false }, "CHsTOwrrBApeuC8nQ4sa": { "firebaseTime": { "_seconds": 1540228143, "_nanoseconds": 638000000 }, "lastSR": 3532, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Hollywood", "newSR": 3556, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1540228143, "_nanoseconds": 478000000 }, "currentSR": 3532 }, "CNrFWU21eMyTDIYfcaFA": { "heroes": [ "Ana" ], "localTime": { "_seconds": 1538075147, "_nanoseconds": 151000000 }, "currentSR": 3698, "firebaseTime": { "_seconds": 1538075145, "_nanoseconds": 2000000 }, "lastSR": 3698, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3673 }, "CVP4WLbfWQRdlbizKLft": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3650, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1539811867, "_nanoseconds": 377000000 }, "currentSR": 3626, "firebaseTime": { "_seconds": 1539811866, "_nanoseconds": 771000000 }, "lastSR": 3626, "season": "12" }, "CvjOrWatQEANYdqieYIN": { "isCurrentSRChanged": true, "map": "Rialto", "newSR": 3594, "heroes": [ "Reinhardt" ], "localTime": { "_seconds": 1537460184, "_nanoseconds": 551000000 }, "currentSR": 3571, "firebaseTime": { "_seconds": 1537460184, "_nanoseconds": 56000000 }, "lastSR": 3575, "season": "12", "userId": myUserId, "result": "win" }, "DQxRONqw9sfrD5LinGBG": { "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3579, "heroes": [ "Brigitte", "Zenyatta", "Ana" ], "localTime": { "_seconds": 1539987421, "_nanoseconds": 697000000 }, "currentSR": 3555, "firebaseTime": { "_seconds": 1539987419, "_nanoseconds": 67000000 }, "lastSR": 3555 }, "DVndiET63MLCm8x1iK72": { "result": "win", "newSR": 3559, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3533, "localTime": { "_seconds": 1542644629, "_nanoseconds": 308000000 }, "firebaseTime": { "_seconds": 1542644629, "_nanoseconds": 177000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3533, "placementMatch": false, "season": "13" }, "Dh49l03LS8HXQ1ackSUn": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Hollywood", "newSR": 3719, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1538587205, "_nanoseconds": 644000000 }, "currentSR": 3696, "firebaseTime": { "_seconds": 1538587204, "_nanoseconds": 393000000 }, "lastSR": 3696, "season": "12" }, "DjBLVx7SIYpDrDzNSHUz": { "isCurrentSRChanged": false, "map": "Hanamura", "newSR": 3476, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540569057, "_nanoseconds": 888000000 }, "currentSR": 3500, "firebaseTime": { "_seconds": 1540569056, "_nanoseconds": 337000000 }, "lastSR": 3500, "season": "12", "userId": myUserId, "result": "loss" }, "Dt2pdiqLqb3NE7iJrhMN": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Hanamura", "newSR": 3554, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1539900024, "_nanoseconds": 847000000 }, "currentSR": 3578, "firebaseTime": { "_seconds": 1539900023, "_nanoseconds": 259000000 }, "lastSR": 3578, "season": "12" }, "EC6YfyQSEHz2t8ZOJ0oy": { "newSR": 3459, "heroes": [ "Lucio", "Brigitte", "Mercy" ], "currentSR": 3482, "localTime": { "_seconds": 1541694401, "_nanoseconds": 673000000 }, "firebaseTime": { "_seconds": 1541694401, "_nanoseconds": 181000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Eichenwalde", "lastSR": 3482, "placementMatch": false, "season": "13", "result": "loss" }, "EI5jcTndzvIyiygOwa85": { "firebaseTime": { "_seconds": 1541720981, "_nanoseconds": 875000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Temple of Anubis", "lastSR": 3433, "placementMatch": false, "season": "13", "result": "win", "newSR": 3457, "heroes": [ "Moira" ], "currentSR": 3433, "localTime": { "_seconds": 1541720982, "_nanoseconds": 951000000 } }, "EIOhUogz9QsIPuuktFAP": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": true, "map": "Eichenwalde", "newSR": 3525, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1537198740, "_nanoseconds": 420000000 }, "currentSR": 3547, "firebaseTime": { "_seconds": 1537198740, "_nanoseconds": 527000000 }, "lastSR": 3523, "season": "12" }, "Ee7yqXDAQooKW5D9V18m": { "map": "Nepal", "newSR": 3646, "heroes": [ "Moira" ], "localTime": { "_seconds": 1539376217, "_nanoseconds": 993000000 }, "currentSR": 3671, "firebaseTime": { "_seconds": 1539376216, "_nanoseconds": 989000000 }, "lastSR": 3671, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false }, "EfI9V8QmWwsUYCDVRI7l": { "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3428, "heroes": [ "Moira", "Ana", "Zenyatta" ], "localTime": { "_seconds": 1540761194, "_nanoseconds": 704000000 }, "currentSR": 3403, "firebaseTime": { "_seconds": 1540761191, "_nanoseconds": 278000000 }, "lastSR": 3403, "season": "12", "userId": myUserId, "result": "win" }, "EmjU9LlQmi8aU66xq9rQ": { "newSR": 3477, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1536937891, "_nanoseconds": 220000000 }, "currentSR": 3453, "firebaseTime": { "_seconds": 1536937890, "_nanoseconds": 309000000 }, "lastSR": 3453, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Junkertown" }, "FWbrb6AdGLFdtar1hLGz": { "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "newSR": 3644, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537813824, "_nanoseconds": 868000000 }, "currentSR": 3619, "firebaseTime": { "_seconds": 1537813824, "_nanoseconds": 686000000 }, "lastSR": 3619 }, "Fc8N2QfuR8BWPFuHGD12": { "result": "win", "newSR": 3555, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3530, "localTime": { "_seconds": 1541795840, "_nanoseconds": 849000000 }, "firebaseTime": { "_seconds": 1541795838, "_nanoseconds": 505000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3530, "placementMatch": false, "season": "13" }, "FrmgC9GlrxxcUkfqb3nc": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Ilios", "lastSR": 3480, "placementMatch": false, "season": "13", "result": "win", "newSR": 3505, "heroes": [ "Moira" ], "currentSR": 3480, "localTime": { "_seconds": 1541612271, "_nanoseconds": 668000000 }, "firebaseTime": { "_seconds": 1541612269, "_nanoseconds": 705000000 } }, "G3WwdEPvMqtumepANFa2": { "firebaseTime": { "_seconds": 1536788226, "_nanoseconds": 595000000 }, "lastSR": 3430, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3406, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1536788227, "_nanoseconds": 987000000 }, "currentSR": 3430 }, "H1OKIalgGAonazrtOWeR": { "newSR": 3507, "heroes": [ "Zenyatta" ], "currentSR": 3531, "localTime": { "_seconds": 1542221499, "_nanoseconds": 543000000 }, "firebaseTime": { "_seconds": 1542221499, "_nanoseconds": 811000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Volskaya Industries", "lastSR": 3531, "placementMatch": false, "season": "13", "result": "loss" }, "H3FMbTpxmaTmn277yQKW": { "lastSR": 3533, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3508, "heroes": [ "Moira" ], "currentSR": 3533, "localTime": { "_seconds": 1542124148, "_nanoseconds": 380000000 }, "firebaseTime": { "_seconds": 1542124146, "_nanoseconds": 509000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Nepal" }, "H3Jdvk22qYquKNumhl0n": { "newSR": 3567, "heroes": [ "Zenyatta", "Brigitte", "Moira" ], "currentSR": 3590, "localTime": { "_seconds": 1542905232, "_nanoseconds": 343000000 }, "firebaseTime": { "_seconds": 1542905232, "_nanoseconds": 348000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Volskaya Industries", "lastSR": 3590, "placementMatch": false, "season": "13", "result": "loss" }, "HCX4bwzZQxbHsh7kOBK3": { "userId": myUserId, "result": "", "isCurrentSRChanged": false, "map": "Numbani", "newSR": "", "heroes": [ "Reinhardt", "Winston", "Orisa" ], "localTime": { "_seconds": 1539791467, "_nanoseconds": 437000000 }, "currentSR": 3647, "firebaseTime": { "_seconds": 1539791466, "_nanoseconds": 750000000 }, "lastSR": 3647, "season": "12" }, "HN2RKylPw6FUBK4qKWoq": { "userId": myUserId, "isCurrentSRChanged": false, "map": "King's Row", "lastSR": 3361, "placementMatch": false, "season": "13", "result": "win", "newSR": 3386, "heroes": [ "Reinhardt" ], "currentSR": 3361, "localTime": { "_seconds": 1543511507, "_nanoseconds": 281000000 }, "firebaseTime": { "_seconds": 1543511507, "_nanoseconds": 411000000 } }, "HYBYHHpXpsmyY6TKlMrD": { "lastSR": 3563, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3541, "heroes": [ "Ana", "Brigitte", "Zenyatta" ], "currentSR": 3563, "localTime": { "_seconds": 1542735631, "_nanoseconds": 337000000 }, "firebaseTime": { "_seconds": 1542735629, "_nanoseconds": 384000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Horizon Lunar Colony" }, "HYMYPLE2UfOz8JZ30fRG": { "newSR": 3504, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1540400442, "_nanoseconds": 670000000 }, "currentSR": 3481, "firebaseTime": { "_seconds": 1540400441, "_nanoseconds": 749000000 }, "lastSR": 3481, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Eichenwalde" }, "HrH7YdWwYwkpOMp7HKgf": { "isCurrentSRChanged": false, "map": "Lijiang Tower", "newSR": 3647, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1539729072, "_nanoseconds": 582000000 }, "currentSR": 3623, "firebaseTime": { "_seconds": 1539729072, "_nanoseconds": 784000000 }, "lastSR": 3623, "season": "12", "userId": myUserId, "result": "win" }, "HrlmL1T5WU0znkOh3j6A": { "newSR": 3719, "heroes": [ "Ana", "Moira" ], "localTime": { "_seconds": 1538601610, "_nanoseconds": 660000000 }, "currentSR": 3744, "firebaseTime": { "_seconds": 1538601609, "_nanoseconds": 452000000 }, "lastSR": 3744, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Route 66" }, "I30Em8tEL6IiqhIJiE71": { "isCurrentSRChanged": false, "map": "Busan", "lastSR": 3505, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3482, "heroes": [ "Brigitte" ], "currentSR": 3505, "localTime": { "_seconds": 1541693244, "_nanoseconds": 601000000 }, "firebaseTime": { "_seconds": 1541693244, "_nanoseconds": 105000000 }, "userId": myUserId }, "IKHnoxJrkFePmENjNcSl": { "placementMatch": false, "season": "13", "result": "win", "newSR": 3433, "heroes": [ "Moira", "Zenyatta" ], "currentSR": 3409, "localTime": { "_seconds": 1541460770, "_nanoseconds": 185000000 }, "firebaseTime": { "_seconds": 1541460769, "_nanoseconds": 151000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Route 66", "lastSR": 3409 }, "IWUtrk9N9xJ80c4APHkN": { "isCurrentSRChanged": false, "map": "King's Row", "lastSR": 3586, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3562, "heroes": [ "Brigitte", "Lucio" ], "currentSR": 3586, "localTime": { "_seconds": 1542680367, "_nanoseconds": 362000000 }, "firebaseTime": { "_seconds": 1542680367, "_nanoseconds": 284000000 }, "userId": myUserId }, "IgluBpaACxLsqRb4v1Qc": { "result": "win", "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3544, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1537644536, "_nanoseconds": 654000000 }, "currentSR": 3521, "firebaseTime": { "_seconds": 1537644536, "_nanoseconds": 120000000 }, "lastSR": 3521, "season": "12", "userId": myUserId }, "IlMreI8WlNgWVO6hJPLM": { "newSR": 3508, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540248861, "_nanoseconds": 850000000 }, "currentSR": 3483, "firebaseTime": { "_seconds": 1540248862, "_nanoseconds": 121000000 }, "lastSR": 3483, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Oasis" }, "J4vR9TIPyCmm0Y25bDQx": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3481, "heroes": [ "Ana", "Moira" ], "localTime": { "_seconds": 1540423078, "_nanoseconds": 318000000 }, "currentSR": 3505, "firebaseTime": { "_seconds": 1540423077, "_nanoseconds": 458000000 }, "lastSR": 3505, "season": "12" }, "JNQNouK1Sf97gHckeDrs": { "newSR": 3433, "heroes": [ "Moira", "Zenyatta" ], "currentSR": 3457, "localTime": { "_seconds": 1541610151, "_nanoseconds": 714000000 }, "firebaseTime": { "_seconds": 1541610149, "_nanoseconds": 749000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Temple of Anubis", "lastSR": 3457, "placementMatch": false, "season": "13", "result": "loss" }, "JVlgYFoPEaEKZkoPEwpa": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3582, "heroes": [ "Reinhardt", "Winston", "Brigitte" ], "localTime": { "_seconds": 1540219937, "_nanoseconds": 439000000 }, "currentSR": 3556, "firebaseTime": { "_seconds": 1540219937, "_nanoseconds": 655000000 }, "lastSR": 3556, "season": "12" }, "KFLkUKQo1s9q5AhHKs4S": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Route 66", "lastSR": 3505, "placementMatch": false, "season": "13", "result": "win", "newSR": 3530, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3505, "localTime": { "_seconds": 1541793257, "_nanoseconds": 31000000 }, "firebaseTime": { "_seconds": 1541793254, "_nanoseconds": 715000000 } }, "KKeztIAx4ueLJ4ALBg27": { "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3484, "heroes": [ "Brigitte", "Winston" ], "localTime": { "_seconds": 1540305564, "_nanoseconds": 769000000 }, "currentSR": 3507, "firebaseTime": { "_seconds": 1540305564, "_nanoseconds": 258000000 }, "lastSR": 3507 }, "KPVnajUJVPLcK3fvczN1": { "isCurrentSRChanged": false, "map": "Eichenwalde", "newSR": 3545, "heroes": [ "Ana", "Brigitte" ], "localTime": { "_seconds": 1537569753, "_nanoseconds": 273000000 }, "currentSR": 3568, "firebaseTime": { "_seconds": 1537569753, "_nanoseconds": 135000000 }, "lastSR": 3568, "season": "12", "userId": myUserId, "result": "loss" }, "KWLtA8QOJ5c6uY9FgPRC": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3428, "heroes": [ "Moira", "Zenyatta" ], "localTime": { "_seconds": 1536864985, "_nanoseconds": 99000000 }, "currentSR": 3405, "firebaseTime": { "_seconds": 1536864985, "_nanoseconds": 358000000 }, "lastSR": 3405, "season": "12" }, "Ka2KJ9rSKuUW1t6IzuSd": { "newSR": 3597, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1539645019, "_nanoseconds": 133000000 }, "currentSR": 3622, "firebaseTime": { "_seconds": 1539645018, "_nanoseconds": 490000000 }, "lastSR": 3622, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "King's Row" }, "KsPSnmcEJSxXhSJ7VPSI": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "lastSR": 3457, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3433, "heroes": [ "Zenyatta", "Moira" ], "currentSR": 3457, "localTime": { "_seconds": 1541451998, "_nanoseconds": 550000000 }, "firebaseTime": { "_seconds": 1541451997, "_nanoseconds": 484000000 } }, "KzDNUwSa4ihulCMFmkV4": { "firebaseTime": { "_seconds": 1537567920, "_nanoseconds": 533000000 }, "lastSR": 3593, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Hollywood", "newSR": 3568, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1537567920, "_nanoseconds": 682000000 }, "currentSR": 3593 }, "L7LSZWVOzp2vSvp0Bnzu": { "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3619, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1537807067, "_nanoseconds": 720000000 }, "currentSR": 3595, "firebaseTime": { "_seconds": 1537807068, "_nanoseconds": 101000000 }, "lastSR": 3595, "season": "12", "userId": myUserId, "result": "win" }, "LaQZIiCgbRMP7TSj54MB": { "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Lijiang Tower", "newSR": 3648, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1539033186, "_nanoseconds": 539000000 }, "currentSR": 3624, "firebaseTime": { "_seconds": 1539033186, "_nanoseconds": 742000000 }, "lastSR": 3624 }, "LaeXPPWVZ4GvJXkNOFmV": { "isCurrentSRChanged": false, "map": "Eichenwalde", "newSR": 3523, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1536944850, "_nanoseconds": 405000000 }, "currentSR": 3499, "firebaseTime": { "_seconds": 1536944849, "_nanoseconds": 505000000 }, "lastSR": 3499, "season": "12", "userId": myUserId, "result": "win" }, "Lo26rCL82AjXSTmQUVsD": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Busan", "newSR": 3647, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1538770656, "_nanoseconds": 3000000 }, "currentSR": 3671, "firebaseTime": { "_seconds": 1538770656, "_nanoseconds": 174000000 }, "lastSR": 3671, "season": "12" }, "M5pkneG4YPtMsm3MKJbV": { "isCurrentSRChanged": false, "map": "Temple of Anubis", "lastSR": 3467, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3441, "heroes": [ "Reinhardt", "Brigitte" ], "currentSR": 3467, "localTime": { "_seconds": 1543285212, "_nanoseconds": 443000000 }, "firebaseTime": { "_seconds": 1543285212, "_nanoseconds": 616000000 }, "userId": myUserId }, "M6j88gnvaLLORwoIvnVx": { "newSR": 3384, "heroes": [ "Zenyatta" ], "currentSR": 3409, "localTime": { "_seconds": 1541716228, "_nanoseconds": 244000000 }, "firebaseTime": { "_seconds": 1541716227, "_nanoseconds": 151000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Ilios", "lastSR": 3409, "placementMatch": false, "season": "13", "result": "loss" }, "MLki2PGDhkVxyoM3F2dE": { "firebaseTime": { "_seconds": 1542224560, "_nanoseconds": 411000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Dorado", "lastSR": 3507, "placementMatch": false, "season": "13", "result": "win", "newSR": 3531, "heroes": [ "Zenyatta", "Zarya" ], "currentSR": 3507, "localTime": { "_seconds": 1542224560, "_nanoseconds": 127000000 } }, "MeoWPHtwubXxgjEjXmls": { "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3555, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1539959564, "_nanoseconds": 965000000 }, "currentSR": 3579, "firebaseTime": { "_seconds": 1539959562, "_nanoseconds": 211000000 }, "lastSR": 3579, "season": "12", "userId": myUserId, "result": "loss" }, "MhajAlVsTAqbTz2L8ujz": { "newSR": 3452, "heroes": [ "Moira", "Ana" ], "localTime": { "_seconds": 1536938796, "_nanoseconds": 939000000 }, "currentSR": 3477, "firebaseTime": { "_seconds": 1536938796, "_nanoseconds": 8000000 }, "lastSR": 3477, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony" }, "N6NsJbO5plpFSo3YTiHh": { "isCurrentSRChanged": false, "map": "Eichenwalde", "lastSR": 3441, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3420, "heroes": [ "Reinhardt", "Winston" ], "currentSR": 3441, "localTime": { "_seconds": 1543335590, "_nanoseconds": 737000000 }, "firebaseTime": { "_seconds": 1543335588, "_nanoseconds": 967000000 }, "userId": myUserId }, "NMpfTqLK9QdFbUuuGCy6": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3623, "heroes": [ "Zenyatta", "Moira" ], "localTime": { "_seconds": 1538775765, "_nanoseconds": 959000000 }, "currentSR": 3647, "firebaseTime": { "_seconds": 1538775766, "_nanoseconds": 153000000 }, "lastSR": 3647, "season": "12" }, "NytNJTQ8r92wWHu8tgli": { "map": "Watchpoint: Gibraltar", "newSR": 3453, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1536937051, "_nanoseconds": 77000000 }, "currentSR": 3428, "firebaseTime": { "_seconds": 1536937050, "_nanoseconds": 144000000 }, "lastSR": 3428, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false }, "ONySA6APRgfMeNPbAj6F": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Hanamura", "newSR": 3621, "heroes": [ "Moira" ], "localTime": { "_seconds": 1539465437, "_nanoseconds": 201000000 }, "currentSR": 3645, "firebaseTime": { "_seconds": 1539465434, "_nanoseconds": 621000000 }, "lastSR": 3645, "season": "12" }, "ORSbC0YmAcla5j3mc6YM": { "newSR": 3556, "heroes": [ "Moira", "Brigitte" ], "currentSR": 3581, "localTime": { "_seconds": 1541960495, "_nanoseconds": 394000000 }, "firebaseTime": { "_seconds": 1541960494, "_nanoseconds": 340000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3581, "placementMatch": false, "season": "13", "result": "loss" }, "Oq3od5QImr4HQO1fZ96L": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "newSR": 3453, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540571732, "_nanoseconds": 818000000 }, "currentSR": 3476, "firebaseTime": { "_seconds": 1540571731, "_nanoseconds": 267000000 }, "lastSR": 3476, "season": "12" }, "OrSUzEmeEWVWKRps0eAL": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Rialto", "lastSR": 3507, "placementMatch": false, "season": "13", "result": "win", "newSR": 3533, "heroes": [ "Reinhardt" ], "currentSR": 3507, "localTime": { "_seconds": 1542641931, "_nanoseconds": 958000000 }, "firebaseTime": { "_seconds": 1542641931, "_nanoseconds": 787000000 } }, "P0UNyRRHMMLc1ZFT42fe": { "result": "loss", "newSR": 3409, "heroes": [ "Reinhardt", "Zenyatta", "Brigitte" ], "currentSR": 3434, "localTime": { "_seconds": 1541707229, "_nanoseconds": 753000000 }, "firebaseTime": { "_seconds": 1541707228, "_nanoseconds": 681000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Oasis", "lastSR": 3434, "placementMatch": false, "season": "13" }, "PNNpANsL7Jvq3qXTAPov": { "firebaseTime": { "_seconds": 1540488679, "_nanoseconds": 280000000 }, "lastSR": 3455, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3430, "heroes": [ "Ana" ], "localTime": { "_seconds": 1540488680, "_nanoseconds": 419000000 }, "currentSR": 3455 }, "PSM3Zqmv6K4jd9nUtEcQ": { "isCurrentSRChanged": false, "map": "Numbani", "lastSR": 3505, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3481, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3505, "localTime": { "_seconds": 1541626167, "_nanoseconds": 164000000 }, "firebaseTime": { "_seconds": 1541626167, "_nanoseconds": 309000000 }, "userId": myUserId }, "Pa57urQIAGy2dNT7Mo0R": { "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3532, "heroes": [ "Ana", "Moira" ], "localTime": { "_seconds": 1540248879, "_nanoseconds": 282000000 }, "currentSR": 3508, "firebaseTime": { "_seconds": 1540248879, "_nanoseconds": 464000000 }, "lastSR": 3508 }, "Ppvkck48FdZL9hvFJWeu": { "newSR": 3508, "heroes": [ "Brigitte", "Mercy", "Moira" ], "currentSR": 3531, "localTime": { "_seconds": 1542239027, "_nanoseconds": 103000000 }, "firebaseTime": { "_seconds": 1542239027, "_nanoseconds": 419000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Route 66", "lastSR": 3531, "placementMatch": false, "season": "13", "result": "loss" }, "Q6LZNPivXcUnVkSfXbVK": { "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1538074113, "_nanoseconds": 294000000 }, "currentSR": 3722, "firebaseTime": { "_seconds": 1538074111, "_nanoseconds": 136000000 }, "lastSR": 3722, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3698 }, "Q8KnLmUnpPu4enznsSxO": { "newSR": 3589, "heroes": [ "Reinhardt" ], "currentSR": 3562, "localTime": { "_seconds": 1542725532, "_nanoseconds": 827000000 }, "firebaseTime": { "_seconds": 1542725530, "_nanoseconds": 855000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3562, "placementMatch": false, "season": "13", "result": "win" }, "Qbj29UEiDIN50sA8bluN": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Rialto", "newSR": 3480, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540487023, "_nanoseconds": 542000000 }, "currentSR": 3457, "firebaseTime": { "_seconds": 1540487022, "_nanoseconds": 262000000 }, "lastSR": 3457, "season": "12" }, "QpCxRyb8TdcV3Vno3TQk": { "heroes": [ "Brigitte", "Zenyatta", "Lucio" ], "localTime": { "_seconds": 1540503100, "_nanoseconds": 916000000 }, "currentSR": 3453, "firebaseTime": { "_seconds": 1540503099, "_nanoseconds": 666000000 }, "lastSR": 3453, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "newSR": 3429 }, "QtLlxHHNE42ightTiSHZ": { "newSR": null, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": null, "localTime": { "_seconds": 1541118972, "_nanoseconds": 94000000 }, "firebaseTime": { "_seconds": 1541118969, "_nanoseconds": 196000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Numbani", "lastSR": null, "placementMatch": true, "season": "13", "result": "win" }, "QwLiNDFY4Si4YFeoWMsh": { "newSR": 3563, "heroes": [ "Moira" ], "currentSR": 3589, "localTime": { "_seconds": 1542727104, "_nanoseconds": 690000000 }, "firebaseTime": { "_seconds": 1542727102, "_nanoseconds": 721000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower", "lastSR": 3589, "placementMatch": false, "season": "13", "result": "loss" }, "Qz7vzRyoRRHdzJdwrKib": { "lastSR": 3484, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3459, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3484, "localTime": { "_seconds": 1541696693, "_nanoseconds": 410000000 }, "firebaseTime": { "_seconds": 1541696692, "_nanoseconds": 931000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower" }, "RU6jJ0NbWZCVUmnlTITr": { "newSR": 3672, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1538170320, "_nanoseconds": 632000000 }, "currentSR": 3648, "firebaseTime": { "_seconds": 1538170317, "_nanoseconds": 638000000 }, "lastSR": 3648, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Oasis" }, "Ra7i6PPMH6kK07YH0YFY": { "newSR": 3647, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1539711745, "_nanoseconds": 301000000 }, "currentSR": 3622, "firebaseTime": { "_seconds": 1539711742, "_nanoseconds": 601000000 }, "lastSR": 3622, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Temple of Anubis" }, "RfMdFVIhDtguUXb0F9lI": { "result": "win", "newSR": 3409, "heroes": [ "Zenyatta" ], "currentSR": 3384, "localTime": { "_seconds": 1541716233, "_nanoseconds": 860000000 }, "firebaseTime": { "_seconds": 1541716232, "_nanoseconds": 757000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "King's Row", "lastSR": 3384, "placementMatch": false, "season": "13" }, "RzRgjgk292hKM1P8ansD": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Hollywood", "newSR": 3501, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1537311544, "_nanoseconds": 918000000 }, "currentSR": 3525, "firebaseTime": { "_seconds": 1537311544, "_nanoseconds": 177000000 }, "lastSR": 3525, "season": "12" }, "S25QHJL0ScuCIWfv9aUc": { "result": "loss", "newSR": 3483, "heroes": [ "Ana" ], "currentSR": 3507, "localTime": { "_seconds": 1542310531, "_nanoseconds": 539000000 }, "firebaseTime": { "_seconds": 1542310530, "_nanoseconds": 51000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "King's Row", "lastSR": 3507, "placementMatch": false, "season": "13" }, "SIjTKPO7nVDiD2cbQgyn": { "firebaseTime": { "_seconds": 1538583888, "_nanoseconds": 45000000 }, "lastSR": 3647, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3671, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1538583889, "_nanoseconds": 306000000 }, "currentSR": 3647 }, "SMcdZSase0lKV0jrhhJp": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Volskaya Industries", "lastSR": 3456, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3431, "heroes": [ "Brigitte", "Zarya" ], "currentSR": 3456, "localTime": { "_seconds": 1541637309, "_nanoseconds": 606000000 }, "firebaseTime": { "_seconds": 1541637309, "_nanoseconds": 771000000 } }, "SSLxNitWEAhbSDfSeqVe": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3575, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1537227318, "_nanoseconds": 411000000 }, "currentSR": 3550, "firebaseTime": { "_seconds": 1537227318, "_nanoseconds": 603000000 }, "lastSR": 3550, "season": "12" }, "SYa3yl3oEJ1cMkjXBJOx": { "newSR": 3433, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3409, "localTime": { "_seconds": 1541717274, "_nanoseconds": 806000000 }, "firebaseTime": { "_seconds": 1541717273, "_nanoseconds": 707000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Dorado", "lastSR": 3409, "placementMatch": false, "season": "13", "result": "win" }, "Sm9i6wWKh0qly9USkeIz": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3555, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540163289, "_nanoseconds": 194000000 }, "currentSR": 3531, "firebaseTime": { "_seconds": 1540163288, "_nanoseconds": 509000000 }, "lastSR": 3531, "season": "12" }, "SsDVHzihLwIbDQhqvktR": { "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3602, "heroes": [ "Moira", "Ana" ], "localTime": { "_seconds": 1539879909, "_nanoseconds": 242000000 }, "currentSR": 3627, "firebaseTime": { "_seconds": 1539879907, "_nanoseconds": 544000000 }, "lastSR": 3627, "season": "12", "userId": myUserId, "result": "loss" }, "SzvG8saJVSeIDJnDQDDg": { "firebaseTime": { "_seconds": 1540310728, "_nanoseconds": 140000000 }, "lastSR": 3484, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3507, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540310728, "_nanoseconds": 653000000 }, "currentSR": 3484 }, "U53bA2YDvD5smlUaRW2M": { "heroes": [ "Moira", "Ana" ], "localTime": { "_seconds": 1539023286, "_nanoseconds": 364000000 }, "currentSR": 3599, "firebaseTime": { "_seconds": 1539023286, "_nanoseconds": 542000000 }, "lastSR": 3599, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Rialto", "newSR": 3624 }, "UHkScmurfwa8sww47MeH": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3429, "heroes": [ "Winston", "Roadhog", "Reinhardt" ], "localTime": { "_seconds": 1536766105, "_nanoseconds": 758000000 }, "currentSR": 3452, "firebaseTime": { "_seconds": 1536766104, "_nanoseconds": 310000000 }, "lastSR": 3452, "season": "12" }, "UVsP4BY41mYM0BC8JUdi": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3453, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540590217, "_nanoseconds": 666000000 }, "currentSR": 3428, "firebaseTime": { "_seconds": 1540590216, "_nanoseconds": 243000000 }, "lastSR": 3428, "season": "12" }, "UemY8u8g8fKhZkgl4HLg": { "localTime": { "_seconds": 1539033825, "_nanoseconds": 684000000 }, "currentSR": 3648, "firebaseTime": { "_seconds": 1539033825, "_nanoseconds": 903000000 }, "lastSR": 3648, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Rialto", "newSR": 3672, "heroes": [ "Moira" ] }, "Uj55i21NMh9DxspBfF33": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Route 66", "lastSR": 3398, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3374, "heroes": [ "Mercy", "Moira", "Ana" ], "currentSR": 3398, "localTime": { "_seconds": 1543350185, "_nanoseconds": 770000000 }, "firebaseTime": { "_seconds": 1543350184, "_nanoseconds": 11000000 } }, "Ux9mLc3XXW9CdVaQlSHk": { "map": null, "lastSR": 3541, "placementMatch": false, "season": "13", "result": "win", "newSR": 3565, "heroes": [ "Moira" ], "currentSR": 3541, "localTime": { "_seconds": 1542819023, "_nanoseconds": 646000000 }, "firebaseTime": { "_seconds": 1542819020, "_nanoseconds": 782000000 }, "userId": myUserId, "isCurrentSRChanged": false }, "UyyR6OhQut0SBA0bvm5p": { "lastSR": null, "placementMatch": true, "season": "13", "result": "loss", "newSR": null, "heroes": [ "Moira", "Ana", "Brigitte" ], "currentSR": null, "localTime": { "_seconds": 1541090720, "_nanoseconds": 325000000 }, "firebaseTime": { "_seconds": 1541090717, "_nanoseconds": 327000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Horizon Lunar Colony" }, "V5h72eza6yFnvoJZyRTv": { "lastSR": 3374, "placementMatch": false, "season": "13", "result": "win", "newSR": 3398, "heroes": [ "Brigitte" ], "currentSR": 3374, "localTime": { "_seconds": 1543341322, "_nanoseconds": 183000000 }, "firebaseTime": { "_seconds": 1543341320, "_nanoseconds": 432000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower" }, "V7M8YmZ6AIE9DyacOyN7": { "isCurrentSRChanged": false, "map": "Ilios", "lastSR": 3507, "placementMatch": false, "season": "13", "result": "win", "newSR": 3531, "heroes": [ "Lucio", "Zenyatta" ], "currentSR": 3507, "localTime": { "_seconds": 1542134960, "_nanoseconds": 978000000 }, "firebaseTime": { "_seconds": 1542134958, "_nanoseconds": 952000000 }, "userId": myUserId }, "VBJW5MIiIeZKgu3Jlizz": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Dorado", "newSR": 3597, "heroes": [ "Moira" ], "localTime": { "_seconds": 1537827968, "_nanoseconds": 222000000 }, "currentSR": 3622, "firebaseTime": { "_seconds": 1537827968, "_nanoseconds": 446000000 }, "lastSR": 3622, "season": "12" }, "VFn8mPUv5q73FY4JVAU1": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Blizzard World", "newSR": 3427, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1540755071, "_nanoseconds": 694000000 }, "currentSR": 3452, "firebaseTime": { "_seconds": 1540755068, "_nanoseconds": 248000000 }, "lastSR": 3452, "season": "12" }, "VNpx0psCAhKjIDgoSY1n": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3623, "heroes": [ "Moira" ], "localTime": { "_seconds": 1539722619, "_nanoseconds": 219000000 }, "currentSR": 3647, "firebaseTime": { "_seconds": 1539722619, "_nanoseconds": 383000000 }, "lastSR": 3647, "season": "12" }, "VrcAsdurnXCgq1RTqo2K": { "newSR": 3541, "heroes": [ "Brigitte" ], "currentSR": 3566, "localTime": { "_seconds": 1542814594, "_nanoseconds": 515000000 }, "firebaseTime": { "_seconds": 1542814591, "_nanoseconds": 661000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Ilios", "lastSR": 3566, "placementMatch": false, "season": "13", "result": "loss" }, "W3dPp7YnCTVLFa1jn1tv": { "newSR": 3525, "heroes": [ "Brigitte", "Winston", "D.Va", "Zarya" ], "localTime": { "_seconds": 1537304290, "_nanoseconds": 920000000 }, "currentSR": 3550, "firebaseTime": { "_seconds": 1537304290, "_nanoseconds": 132000000 }, "lastSR": 3550, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Rialto" }, "WK5oUJB4AzNcSL2ah1k6": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3645, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1537892360, "_nanoseconds": 863000000 }, "currentSR": 3622, "firebaseTime": { "_seconds": 1537892360, "_nanoseconds": 175000000 }, "lastSR": 3622, "season": "12" }, "WN3Hi4P8XzeEtJP3gsF4": { "localTime": { "_seconds": 1536618541, "_nanoseconds": 727000000 }, "firebaseTime": { "_seconds": 1536618539, "_nanoseconds": 658000000 }, "userId": myUserId, "map": "Ilios", "newSR": 3402, "heroes": [ "Brigitte" ] }, "WNrHWDNDHTM2HpLgWDnS": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Junkertown", "newSR": 3404, "heroes": [ "Zenyatta", "Moira" ], "localTime": { "_seconds": 1540663596, "_nanoseconds": 141000000 }, "currentSR": 3428, "firebaseTime": { "_seconds": 1540663593, "_nanoseconds": 822000000 }, "lastSR": 3428, "season": "12" }, "WykXGnQNMd0VVnrRPkk3": { "map": "Ilios", "newSR": 3622, "heroes": [ "Moira", "Brigitte" ], "localTime": { "_seconds": 1539636454, "_nanoseconds": 191000000 }, "currentSR": 3597, "firebaseTime": { "_seconds": 1539636453, "_nanoseconds": 508000000 }, "lastSR": 3597, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false }, "XEeyRrayrDFxeZKXs5SN": { "firebaseTime": { "_seconds": 1537200386, "_nanoseconds": 194000000 }, "lastSR": 3525, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3549, "heroes": [ "D.Va" ], "localTime": { "_seconds": 1537200386, "_nanoseconds": 91000000 }, "currentSR": 3525 }, "XNrHPS1UyLT2nLIxYkyj": { "isCurrentSRChanged": false, "map": "Busan", "newSR": 3508, "heroes": [ "Reinhardt" ], "localTime": { "_seconds": 1540246011, "_nanoseconds": 727000000 }, "currentSR": 3531, "firebaseTime": { "_seconds": 1540246011, "_nanoseconds": 992000000 }, "lastSR": 3531, "season": "12", "userId": myUserId, "result": "loss" }, "Xh7VXhxuIAyaG3voKCf1": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3525, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537373336, "_nanoseconds": 377000000 }, "currentSR": 3501, "firebaseTime": { "_seconds": 1537373334, "_nanoseconds": 298000000 }, "lastSR": 3501, "season": "12" }, "XrIaqfh4yUDmtbdVOxQw": { "newSR": 3457, "heroes": [ "Zenyatta", "Lucio", "Moira", "Pharah" ], "localTime": { "_seconds": 1540487013, "_nanoseconds": 999000000 }, "currentSR": 3480, "firebaseTime": { "_seconds": 1540487012, "_nanoseconds": 696000000 }, "lastSR": 3480, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Lijiang Tower" }, "Xypa47sD4eexCuKw58s1": { "newSR": 3617, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1537549532, "_nanoseconds": 739000000 }, "currentSR": 3593, "firebaseTime": { "_seconds": 1537549532, "_nanoseconds": 330000000 }, "lastSR": 3593, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Temple of Anubis" }, "YCYsKoip3q3yFfZGIKuc": { "firebaseTime": { "_seconds": 1538501001, "_nanoseconds": 610000000 }, "lastSR": 3647, "season": "12", "userId": myUserId, "result": "draw", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "newSR": 3647, "heroes": [ "Moira", "Ana" ], "localTime": { "_seconds": 1538501002, "_nanoseconds": 187000000 }, "currentSR": 3647 }, "YTkIJnYNw9XwD3zmEHj6": { "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3578, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1539896674, "_nanoseconds": 582000000 }, "currentSR": 3552, "firebaseTime": { "_seconds": 1539896672, "_nanoseconds": 971000000 }, "lastSR": 3552, "season": "12", "userId": myUserId, "result": "win" }, "YhvSZW60QZfW9h1wvALI": { "firebaseTime": { "_seconds": 1543425543, "_nanoseconds": 615000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Junkertown", "lastSR": 3405, "placementMatch": false, "season": "13", "result": "win", "newSR": 3431, "heroes": [ "Zenyatta" ], "currentSR": 3405, "localTime": { "_seconds": 1543425546, "_nanoseconds": 516000000 } }, "YkAFnr2Rvr9x6BOHh9so": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "newSR": 3695, "heroes": [ "Brigitte", "Zenyatta", "Lucio" ], "localTime": { "_seconds": 1538692123, "_nanoseconds": 530000000 }, "currentSR": 3719, "firebaseTime": { "_seconds": 1538692120, "_nanoseconds": 897000000 }, "lastSR": 3719, "season": "12" }, "YkinfD7YvWJQcK1Imtue": { "map": "Numbani", "newSR": 3500, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540564710, "_nanoseconds": 952000000 }, "currentSR": 3476, "firebaseTime": { "_seconds": 1540564709, "_nanoseconds": 378000000 }, "lastSR": 3476, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false }, "Z9kUzag5TfYCxqlHAJvG": { "lastSR": 3480, "placementMatch": false, "season": "13", "result": "win", "newSR": 3505, "heroes": [ "Reinhardt", "Winston" ], "currentSR": 3480, "localTime": { "_seconds": 1541691034, "_nanoseconds": 624000000 }, "firebaseTime": { "_seconds": 1541691034, "_nanoseconds": 123000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar" }, "ZGYJ0GIZaZZCG4n0wJzq": { "firebaseTime": { "_seconds": 1537294705, "_nanoseconds": 716000000 }, "lastSR": 3551, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3575, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537294706, "_nanoseconds": 515000000 }, "currentSR": 3551 }, "ZniLPW19nG3XoyNY2Yws": { "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3506, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1540414710, "_nanoseconds": 656000000 }, "currentSR": 3481, "firebaseTime": { "_seconds": 1540414709, "_nanoseconds": 782000000 }, "lastSR": 3481, "season": "12", "userId": myUserId, "result": "win" }, "aBMYUNeVMdmyGC2NgzyM": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3430, "heroes": [ "Reinhardt", "Winston", "Orisa" ], "localTime": { "_seconds": 1536773119, "_nanoseconds": 953000000 }, "currentSR": 3406, "firebaseTime": { "_seconds": 1536773118, "_nanoseconds": 520000000 }, "lastSR": 3406, "season": "12" }, "afrHcKPZ13UXJRq9D3q7": { "placementMatch": false, "season": "13", "result": "win", "newSR": 3507, "heroes": [ "Zenyatta" ], "currentSR": 3483, "localTime": { "_seconds": 1542130655, "_nanoseconds": 727000000 }, "firebaseTime": { "_seconds": 1542130653, "_nanoseconds": 701000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "lastSR": 3483 }, "b7O6nlCEiaJjaNjwaCvz": { "localTime": { "_seconds": 1539808845, "_nanoseconds": 535000000 }, "currentSR": 3651, "firebaseTime": { "_seconds": 1539808844, "_nanoseconds": 922000000 }, "lastSR": 3651, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "King's Row", "newSR": 3626, "heroes": [ "Moira", "Reinhardt" ] }, "b9Gu8cadUNQGyZOHdOmg": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Lijiang Tower", "newSR": 3647, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1538499464, "_nanoseconds": 578000000 }, "currentSR": 3672, "firebaseTime": { "_seconds": 1538499463, "_nanoseconds": 993000000 }, "lastSR": 3672, "season": "12" }, "bRlGFTJYn4oNYfXcKPLg": { "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Eichenwalde", "newSR": 3452, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1540748061, "_nanoseconds": 469000000 }, "currentSR": 3428, "firebaseTime": { "_seconds": 1540748058, "_nanoseconds": 150000000 }, "lastSR": 3428 }, "baeVZrQUj8b9T1uVZTvF": { "result": "draw", "isCurrentSRChanged": false, "map": "Blizzard World", "newSR": 3624, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1539029145, "_nanoseconds": 644000000 }, "currentSR": 3624, "firebaseTime": { "_seconds": 1539029145, "_nanoseconds": 862000000 }, "lastSR": 3624, "season": "12", "userId": myUserId }, "bkGjR4K4N0nU04neZ5th": { "map": "Horizon Lunar Colony", "lastSR": 3459, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3434, "heroes": [ "Reinhardt", "Hanzo", "Pharah", "Tracer", "D.Va" ], "currentSR": 3459, "localTime": { "_seconds": 1541699964, "_nanoseconds": 835000000 }, "firebaseTime": { "_seconds": 1541699964, "_nanoseconds": 343000000 }, "userId": myUserId, "isCurrentSRChanged": false }, "bohrp0xeDdAgGlK2KUuK": { "isCurrentSRChanged": false, "map": "Route 66", "newSR": 3429, "heroes": [ "D.Va", "Orisa" ], "localTime": { "_seconds": 1536854103, "_nanoseconds": 654000000 }, "currentSR": 3454, "firebaseTime": { "_seconds": 1536854101, "_nanoseconds": 46000000 }, "lastSR": 3454, "season": "12", "userId": myUserId, "result": "loss" }, "bueQsExeqo8BjjOarxq9": { "firebaseTime": { "_seconds": 1537906085, "_nanoseconds": 303000000 }, "lastSR": 3669, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "King's Row", "newSR": 3694, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1537906085, "_nanoseconds": 982000000 }, "currentSR": 3669 }, "c6KCV6DDH8GnfJXFNb1G": { "result": "win", "newSR": 3482, "heroes": [ "Brigitte" ], "currentSR": 3458, "localTime": { "_seconds": 1541443821, "_nanoseconds": 243000000 }, "firebaseTime": { "_seconds": 1541443820, "_nanoseconds": 232000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Busan", "lastSR": 3458, "placementMatch": false, "season": "13" }, "c85C97LPNWUAK3QZrmsU": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Eichenwalde", "newSR": 3602, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1539884586, "_nanoseconds": 401000000 }, "currentSR": 3578, "firebaseTime": { "_seconds": 1539884584, "_nanoseconds": 747000000 }, "lastSR": 3578, "season": "12" }, "cAI1CoBxPInvPFa1HQNp": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Rialto", "newSR": 3674, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1539815986, "_nanoseconds": 833000000 }, "currentSR": 3650, "firebaseTime": { "_seconds": 1539815986, "_nanoseconds": 232000000 }, "lastSR": 3650, "season": "12" }, "cEPWBenYG3hbJoS2NzBs": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3577, "heroes": [ "Moira" ], "localTime": { "_seconds": 1539886696, "_nanoseconds": 588000000 }, "currentSR": 3602, "firebaseTime": { "_seconds": 1539886694, "_nanoseconds": 936000000 }, "lastSR": 3602, "season": "12" }, "cEwmdwihplL8bCaBb8Qx": { "result": "win", "newSR": 3422, "heroes": [ "Zenyatta" ], "currentSR": 3398, "localTime": { "_seconds": 1543365082, "_nanoseconds": 749000000 }, "firebaseTime": { "_seconds": 1543365080, "_nanoseconds": 985000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Numbani", "lastSR": 3398, "placementMatch": false, "season": "13" }, "cPyXLyNEuI7PvXrl9IIl": { "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3552, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1539888264, "_nanoseconds": 825000000 }, "currentSR": 3577, "firebaseTime": { "_seconds": 1539888263, "_nanoseconds": 171000000 }, "lastSR": 3577 }, "ceUUGxipEOF6GxMAEonT": { "isCurrentSRChanged": false, "map": "Dorado", "newSR": 3627, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1539802370, "_nanoseconds": 412000000 }, "currentSR": 3650, "firebaseTime": { "_seconds": 1539802369, "_nanoseconds": 793000000 }, "lastSR": 3650, "season": "12", "userId": myUserId, "result": "loss" }, "cmNrmHY8PvTAoRiAYnti": { "result": "win", "isCurrentSRChanged": false, "map": "Lijiang Tower", "newSR": 3502, "heroes": [ "Moira", "Brigitte" ], "localTime": { "_seconds": 1540521199, "_nanoseconds": 113000000 }, "currentSR": 3477, "firebaseTime": { "_seconds": 1540521197, "_nanoseconds": 304000000 }, "lastSR": 3477, "season": "12", "userId": myUserId }, "cvLd4vrrnRpdUiDJ3Bxr": { "newSR": 3398, "heroes": [ "Mercy" ], "currentSR": 3374, "localTime": { "_seconds": 1543351140, "_nanoseconds": 884000000 }, "firebaseTime": { "_seconds": 1543351139, "_nanoseconds": 131000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Temple of Anubis", "lastSR": 3374, "placementMatch": false, "season": "13", "result": "win" }, "cwvgBV4UzU2aizTxejrt": { "newSR": 3550, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537218320, "_nanoseconds": 774000000 }, "currentSR": 3525, "firebaseTime": { "_seconds": 1537218320, "_nanoseconds": 908000000 }, "lastSR": 3525, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Blizzard World" }, "dDSnyTh4xbmvZPnibS1f": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3531, "heroes": [ "Winston", "Reinhardt", "Orisa" ], "localTime": { "_seconds": 1539960633, "_nanoseconds": 146000000 }, "currentSR": 3555, "firebaseTime": { "_seconds": 1539960630, "_nanoseconds": 412000000 }, "lastSR": 3555, "season": "12" }, "dKqwuqfCDZnIdYRRYVLl": { "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "newSR": 3504, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1540403446, "_nanoseconds": 688000000 }, "currentSR": 3528, "firebaseTime": { "_seconds": 1540403445, "_nanoseconds": 757000000 }, "lastSR": 3528 }, "dPjFz6N1ymS7TDdxzw72": { "map": "Dorado", "newSR": 3379, "heroes": [ "Moira", "Brigitte" ], "localTime": { "_seconds": 1536620555, "_nanoseconds": 969000000 }, "firebaseTime": { "_seconds": 1536620553, "_nanoseconds": 900000000 }, "userId": myUserId }, "dpO1anLfXzvizb2OmF1N": { "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Hollywood", "newSR": 3481, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1540407494, "_nanoseconds": 136000000 }, "currentSR": 3504, "firebaseTime": { "_seconds": 1540407493, "_nanoseconds": 224000000 }, "lastSR": 3504 }, "ehHgZkqijwrPbF2B3Bg6": { "isCurrentSRChanged": false, "map": "Blizzard World", "newSR": 3505, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540417174, "_nanoseconds": 867000000 }, "currentSR": 3529, "firebaseTime": { "_seconds": 1540417173, "_nanoseconds": 973000000 }, "lastSR": 3529, "season": "12", "userId": myUserId, "result": "loss" }, "f7O2GAqhmLLnbcxXXTA1": { "firebaseTime": { "_seconds": 1542054300, "_nanoseconds": 348000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Eichenwalde", "lastSR": 3557, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3533, "heroes": [ "Zenyatta", "Brigitte", "Reinhardt" ], "currentSR": 3557, "localTime": { "_seconds": 1542054300, "_nanoseconds": 180000000 } }, "fejUrsN3PBOZyZcZWCRa": { "newSR": 3403, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540759190, "_nanoseconds": 294000000 }, "currentSR": 3427, "firebaseTime": { "_seconds": 1540759186, "_nanoseconds": 884000000 }, "lastSR": 3427, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Oasis" }, "g5S2ai2Orrgt3mtAm7jK": { "heroes": [ "Brigitte", "Moira", "Ana", "Junkrat" ], "localTime": { "_seconds": 1539107643, "_nanoseconds": 194000000 }, "currentSR": 3648, "firebaseTime": { "_seconds": 1539107642, "_nanoseconds": 925000000 }, "lastSR": 3648, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "King's Row", "newSR": 3623 }, "gKc1gCXNvFn2J9d4bdOr": { "placementMatch": false, "season": "13", "result": "win", "newSR": 3507, "heroes": [ "Brigitte" ], "currentSR": 3481, "localTime": { "_seconds": 1542641819, "_nanoseconds": 742000000 }, "firebaseTime": { "_seconds": 1542641819, "_nanoseconds": 711000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower", "lastSR": 3481 }, "gT0FO05Kv1clUJBXorCN": { "isCurrentSRChanged": false, "map": "Dorado", "newSR": 3481, "heroes": [ "Winston", "Reinhardt", "Orisa" ], "localTime": { "_seconds": 1540335744, "_nanoseconds": 494000000 }, "currentSR": 3458, "firebaseTime": { "_seconds": 1540335744, "_nanoseconds": 76000000 }, "lastSR": 3458, "season": "12", "userId": myUserId, "result": "win" }, "gXVmB2zbFt5AE2pdRdQy": { "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3430, "heroes": [ "Moira" ], "localTime": { "_seconds": 1536794185, "_nanoseconds": 406000000 }, "currentSR": 3454, "firebaseTime": { "_seconds": 1536794184, "_nanoseconds": 26000000 }, "lastSR": 3454, "season": "12", "userId": myUserId, "result": "loss" }, "h2795hmx51plA671jEtJ": { "isCurrentSRChanged": false, "map": "Busan", "newSR": 3579, "heroes": [ "Zenyatta", "Moira" ], "localTime": { "_seconds": 1539905457, "_nanoseconds": 388000000 }, "currentSR": 3554, "firebaseTime": { "_seconds": 1539905455, "_nanoseconds": 834000000 }, "lastSR": 3554, "season": "12", "userId": myUserId, "result": "win" }, "hTKTNrlSbTogELNoX8qX": { "firebaseTime": { "_seconds": 1540424778, "_nanoseconds": 643000000 }, "lastSR": 3481, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3456, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1540424779, "_nanoseconds": 500000000 }, "currentSR": 3481 }, "hWE9nLzuw1ZKYhb9fY4O": { "isCurrentSRChanged": false, "map": "Hanamura", "newSR": 3555, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1540068380, "_nanoseconds": 338000000 }, "currentSR": 3579, "firebaseTime": { "_seconds": 1540068380, "_nanoseconds": 96000000 }, "lastSR": 3579, "season": "12", "userId": myUserId, "result": "loss" }, "i7tCuIZFggNvsjlWdegD": { "placementMatch": false, "season": "13", "result": "win", "newSR": 3563, "heroes": [ "Zenyatta", "Brigitte", "Lucio" ], "currentSR": 3539, "localTime": { "_seconds": 1542734450, "_nanoseconds": 442000000 }, "firebaseTime": { "_seconds": 1542734448, "_nanoseconds": 526000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "lastSR": 3539 }, "iEowzCooIWQdIdjIXsq6": { "firebaseTime": { "_seconds": 1537978224, "_nanoseconds": 252000000 }, "lastSR": 3696, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Busan", "newSR": 3722, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537978225, "_nanoseconds": 552000000 }, "currentSR": 3696 }, "iH1aO9dN7R81qd2GgtIC": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Rialto", "newSR": 3454, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1536848981, "_nanoseconds": 561000000 }, "currentSR": 3430, "firebaseTime": { "_seconds": 1536848978, "_nanoseconds": 938000000 }, "lastSR": 3430, "season": "12" }, "iZpA9au2wnRdySYZd8wh": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "newSR": 3648, "heroes": [ "Zenyatta", "Ana" ], "localTime": { "_seconds": 1538169775, "_nanoseconds": 432000000 }, "currentSR": 3673, "firebaseTime": { "_seconds": 1538169772, "_nanoseconds": 454000000 }, "lastSR": 3673, "season": "12" }, "jNsnUCk7kQo6ubNStVco": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Ilios", "lastSR": null, "placementMatch": true, "season": "13", "result": "loss", "newSR": 3482, "heroes": [ "Lucio", "Brigitte", "Zenyatta" ], "currentSR": null, "localTime": { "_seconds": 1541128326, "_nanoseconds": 449000000 }, "firebaseTime": { "_seconds": 1541128326, "_nanoseconds": 615000000 } }, "jcjXmtnReTdA5VQCM7z9": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Hanamura", "newSR": 3482, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1540315289, "_nanoseconds": 306000000 }, "currentSR": 3507, "firebaseTime": { "_seconds": 1540315288, "_nanoseconds": 792000000 }, "lastSR": 3507, "season": "12" }, "jkKWDIorEVhSxuDi6Iib": { "result": "loss", "newSR": 3586, "heroes": [ "Moira", "Brigitte", "Ana" ], "currentSR": 3610, "localTime": { "_seconds": 1542656823, "_nanoseconds": 816000000 }, "firebaseTime": { "_seconds": 1542656823, "_nanoseconds": 713000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Numbani", "lastSR": 3610, "placementMatch": false, "season": "13" }, "jpcFTy2RSMXqfhyAaaUU": { "localTime": { "_seconds": 1537890823, "_nanoseconds": 239000000 }, "currentSR": 3597, "firebaseTime": { "_seconds": 1537890822, "_nanoseconds": 553000000 }, "lastSR": 3597, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3622, "heroes": [ "Moira" ] }, "kIhBO9XRjlmFqFzvuRtg": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3593, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537464502, "_nanoseconds": 357000000 }, "currentSR": 3568, "firebaseTime": { "_seconds": 1537464501, "_nanoseconds": 879000000 }, "lastSR": 3568, "season": "12" }, "kOaKlU5mhOkwO7lYPckI": { "lastSR": 3555, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3530, "heroes": [ "Zenyatta", "Brigitte", "Lucio" ], "currentSR": 3555, "localTime": { "_seconds": 1542211364, "_nanoseconds": 672000000 }, "firebaseTime": { "_seconds": 1542211364, "_nanoseconds": 930000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Busan" }, "kZNNy8ULyyBI1hAKPxvf": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3574, "heroes": [ "Moira" ], "localTime": { "_seconds": 1537286710, "_nanoseconds": 701000000 }, "currentSR": 3551, "firebaseTime": { "_seconds": 1537286709, "_nanoseconds": 893000000 }, "lastSR": 3551, "season": "12" }, "kcvuCcPNcxN3tIl8XE9M": { "placementMatch": false, "season": "13", "result": "loss", "newSR": 3491, "heroes": [ "Brigitte", "Lucio" ], "currentSR": 3516, "localTime": { "_seconds": 1543283656, "_nanoseconds": 259000000 }, "firebaseTime": { "_seconds": 1543283656, "_nanoseconds": 399000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Busan", "lastSR": 3516 }, "lLCtHgMdkVNQ4oe5Dn58": { "map": "Rialto", "newSR": 3531, "heroes": [ "Winston", "Reinhardt" ], "localTime": { "_seconds": 1540245509, "_nanoseconds": 714000000 }, "currentSR": 3556, "firebaseTime": { "_seconds": 1540245510, "_nanoseconds": 98000000 }, "lastSR": 3556, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false }, "lORGDzTN58TKVlLfGAoV": { "newSR": 3363, "heroes": [ "Brigitte", "Lucio", "Zenyatta" ], "currentSR": 3386, "localTime": { "_seconds": 1543595627, "_nanoseconds": 433000000 }, "firebaseTime": { "_seconds": 1543595626, "_nanoseconds": 326000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Numbani", "lastSR": 3386, "placementMatch": false, "season": "13", "result": "loss" }, "lSwAovhUWD7aqGc5NS7h": { "heroes": [ "Reinhardt" ], "currentSR": 3422, "localTime": { "_seconds": 1543417303, "_nanoseconds": 632000000 }, "firebaseTime": { "_seconds": 1543417300, "_nanoseconds": 729000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3422, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3397 }, "lZZiSocldPGdbXPh6nKD": { "newSR": 3499, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1536943377, "_nanoseconds": 679000000 }, "currentSR": 3476, "firebaseTime": { "_seconds": 1536943376, "_nanoseconds": 795000000 }, "lastSR": 3476, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Volskaya Industries" }, "lfAcHjc1I35r1AcRdpHu": { "firebaseTime": { "_seconds": 1537552346, "_nanoseconds": 624000000 }, "lastSR": 3617, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Rialto", "newSR": 3593, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1537552347, "_nanoseconds": 7000000 }, "currentSR": 3617 }, "lkqgR82373cZod0vFGER": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "newSR": 3453, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1540494705, "_nanoseconds": 47000000 }, "currentSR": 3430, "firebaseTime": { "_seconds": 1540494703, "_nanoseconds": 785000000 }, "lastSR": 3430, "season": "12" }, "lnfO6TPXpGBXzYEZjkt6": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Rialto", "newSR": 3578, "heroes": [ "Moira", "Ana" ], "localTime": { "_seconds": 1539881220, "_nanoseconds": 32000000 }, "currentSR": 3602, "firebaseTime": { "_seconds": 1539881218, "_nanoseconds": 357000000 }, "lastSR": 3602, "season": "12" }, "ltGUgpbUfmhheamDYb4O": { "result": "loss", "isCurrentSRChanged": false, "map": "Junkertown", "newSR": 3621, "heroes": [ "Winston", "Reinhardt", "Orisa" ], "localTime": { "_seconds": 1539377665, "_nanoseconds": 687000000 }, "currentSR": 3646, "firebaseTime": { "_seconds": 1539377664, "_nanoseconds": 704000000 }, "lastSR": 3646, "season": "12", "userId": myUserId }, "m4C1cxPYQZYhyg4a7jYv": { "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3428, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540594222, "_nanoseconds": 154000000 }, "currentSR": 3453, "firebaseTime": { "_seconds": 1540594220, "_nanoseconds": 738000000 }, "lastSR": 3453, "season": "12", "userId": myUserId, "result": "loss" }, "m4t5l4fNisHLhBuI3i2l": { "heroes": [ "Lucio", "Moira" ], "currentSR": 3534, "localTime": { "_seconds": 1542052330, "_nanoseconds": 11000000 }, "firebaseTime": { "_seconds": 1542052330, "_nanoseconds": 171000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Temple of Anubis", "lastSR": 3534, "placementMatch": false, "season": "13", "result": "win", "newSR": 3557 }, "mSJnEhQfo4rWKIL66JRp": { "newSR": 3457, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3482, "localTime": { "_seconds": 1541444494, "_nanoseconds": 651000000 }, "firebaseTime": { "_seconds": 1541444493, "_nanoseconds": 557000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "lastSR": 3482, "placementMatch": false, "season": "13", "result": "loss" }, "mgYbQ2E9Erq9VTMl8I2I": { "newSR": 3361, "heroes": [ "Zenyatta", "Lucio" ], "currentSR": 3385, "localTime": { "_seconds": 1543509238, "_nanoseconds": 901000000 }, "firebaseTime": { "_seconds": 1543509239, "_nanoseconds": 35000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3385, "placementMatch": false, "season": "13", "result": "loss" }, "mibc6mtD5AhK41KjxpPH": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Busan", "newSR": 3458, "heroes": [ "Ana", "Winston", "Reinhardt" ], "localTime": { "_seconds": 1540316457, "_nanoseconds": 256000000 }, "currentSR": 3482, "firebaseTime": { "_seconds": 1540316456, "_nanoseconds": 767000000 }, "lastSR": 3482, "season": "12" }, "mtBu4aZPD1J1TUXSxla5": { "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3556, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540172344, "_nanoseconds": 598000000 }, "currentSR": 3580, "firebaseTime": { "_seconds": 1540172343, "_nanoseconds": 958000000 }, "lastSR": 3580, "season": "12", "userId": myUserId, "result": "loss" }, "mvB3JlBLXVr6b3hQ1Ap7": { "result": "win", "newSR": 3581, "heroes": [ "Zenyatta", "Lucio" ], "currentSR": 3556, "localTime": { "_seconds": 1541893288, "_nanoseconds": 445000000 }, "firebaseTime": { "_seconds": 1541893288, "_nanoseconds": 589000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Lijiang Tower", "lastSR": 3556, "placementMatch": false, "season": "13" }, "nL4S6FEYrX8fjd4a0Di9": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Blizzard World", "newSR": 3575, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1537457566, "_nanoseconds": 128000000 }, "currentSR": 3549, "firebaseTime": { "_seconds": 1537457565, "_nanoseconds": 625000000 }, "lastSR": 3549, "season": "12" }, "nS6ERkforAhVQaUdNg1m": { "isCurrentSRChanged": false, "map": "King's Row", "lastSR": 3506, "placementMatch": false, "season": "13", "result": "win", "newSR": 3531, "heroes": [ "Zenyatta" ], "currentSR": 3506, "localTime": { "_seconds": 1542217560, "_nanoseconds": 607000000 }, "firebaseTime": { "_seconds": 1542217560, "_nanoseconds": 881000000 }, "userId": myUserId }, "nnWPDv2hvsCYxgOdScm4": { "result": "win", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "newSR": 3454, "heroes": [ "Moira" ], "localTime": { "_seconds": 1536791572, "_nanoseconds": 37000000 }, "currentSR": 3430, "firebaseTime": { "_seconds": 1536791570, "_nanoseconds": 652000000 }, "lastSR": 3430, "season": "12", "userId": myUserId }, "nrnH0MJtWCxIofjqNu6N": { "localTime": { "_seconds": 1536789516, "_nanoseconds": 236000000 }, "currentSR": 3406, "firebaseTime": { "_seconds": 1536789514, "_nanoseconds": 845000000 }, "lastSR": 3406, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "King's Row", "newSR": 3430, "heroes": [ "Moira" ] }, "ntnjIzITryz7VFBCiNTG": { "map": "Numbani", "newSR": 3622, "heroes": [ "Orisa", "Reinhardt", "Winston" ], "localTime": { "_seconds": 1539791558, "_nanoseconds": 815000000 }, "currentSR": 3647, "firebaseTime": { "_seconds": 1539791558, "_nanoseconds": 124000000 }, "lastSR": "", "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": true }, "o0VS1CKWKrj9Vo9aYrmt": { "lastSR": 3586, "placementMatch": false, "season": "13", "result": "win", "newSR": 3610, "heroes": [ "Brigitte", "Lucio" ], "currentSR": 3586, "localTime": { "_seconds": 1542675748, "_nanoseconds": 511000000 }, "firebaseTime": { "_seconds": 1542675748, "_nanoseconds": 463000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Ilios" }, "oB5fXVxvmjZXWB2RG0AT": { "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "King's Row", "newSR": 3507, "heroes": [ "Zenyatta", "Lucio" ], "localTime": { "_seconds": 1540252198, "_nanoseconds": 825000000 }, "currentSR": 3532, "firebaseTime": { "_seconds": 1540252199, "_nanoseconds": 93000000 }, "lastSR": 3532 }, "oDGBjYmNj5gaUtVAz5tw": { "isCurrentSRChanged": false, "map": "Nepal", "newSR": 3501, "heroes": [ "Brigitte", "Zenyatta", "Lucio" ], "localTime": { "_seconds": 1540509514, "_nanoseconds": 100000000 }, "currentSR": 3477, "firebaseTime": { "_seconds": 1540509512, "_nanoseconds": 886000000 }, "lastSR": 3477, "season": "12", "userId": myUserId, "result": "win" }, "oEJMH6t0tH77WVeO0BKU": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Blizzard World", "newSR": 3622, "heroes": [ "Moira" ], "localTime": { "_seconds": 1539710182, "_nanoseconds": 24000000 }, "currentSR": 3597, "firebaseTime": { "_seconds": 1539710179, "_nanoseconds": 279000000 }, "lastSR": 3597, "season": "12" }, "oIRfpfLZuxj0XOYqfRNo": { "isCurrentSRChanged": true, "map": "Volskaya Industries", "lastSR": 3397, "placementMatch": false, "season": "13", "result": "win", "newSR": 3400, "heroes": [ "Moira" ], "currentSR": 3375, "localTime": { "_seconds": 1543418796, "_nanoseconds": 410000000 }, "firebaseTime": { "_seconds": 1543418793, "_nanoseconds": 526000000 }, "userId": myUserId }, "oaYIOrLzXxfRUq6ODFdE": { "placementMatch": false, "season": "13", "result": "loss", "newSR": 3531, "heroes": [ "Ana" ], "currentSR": 3555, "localTime": { "_seconds": 1541802488, "_nanoseconds": 405000000 }, "firebaseTime": { "_seconds": 1541802486, "_nanoseconds": 94000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Junkertown", "lastSR": 3555 }, "otfnsvwGVyxnhpKx5RgL": { "result": "win", "newSR": 3556, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3531, "localTime": { "_seconds": 1541804011, "_nanoseconds": 78000000 }, "firebaseTime": { "_seconds": 1541804008, "_nanoseconds": 764000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "lastSR": 3531, "placementMatch": false, "season": "13" }, "p32mjUyPxB5liPZRjAaV": { "map": "Volskaya Industries", "lastSR": null, "placementMatch": true, "season": "13", "result": "win", "newSR": null, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": null, "localTime": { "_seconds": 1541118944, "_nanoseconds": 662000000 }, "firebaseTime": { "_seconds": 1541118941, "_nanoseconds": 744000000 }, "userId": myUserId, "isCurrentSRChanged": false }, "p50hwea3GoH4IkOajkAt": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Junkertown", "lastSR": 3431, "placementMatch": false, "season": "13", "result": "win", "newSR": 3456, "heroes": [ "Reinhardt", "Winston" ], "currentSR": 3431, "localTime": { "_seconds": 1541643344, "_nanoseconds": 161000000 }, "firebaseTime": { "_seconds": 1541643344, "_nanoseconds": 355000000 } }, "p71UysDGuakFiVtnt75j": { "firebaseTime": { "_seconds": 1537282611, "_nanoseconds": 675000000 }, "lastSR": 3575, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "newSR": 3551, "heroes": [ "Ana", "Moira" ], "localTime": { "_seconds": 1537282612, "_nanoseconds": 488000000 }, "currentSR": 3575 }, "p824mntmoTPlMbuQ7SKR": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3744, "heroes": [ "Reinhardt" ], "localTime": { "_seconds": 1538589118, "_nanoseconds": 365000000 }, "currentSR": 3719, "firebaseTime": { "_seconds": 1538589117, "_nanoseconds": 140000000 }, "lastSR": 3719, "season": "12" }, "pMdUmPYxljb35xRiTu0k": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Eichenwalde", "newSR": 3406, "heroes": [ "Moira" ], "localTime": { "_seconds": 1536770343, "_nanoseconds": 769000000 }, "currentSR": 3429, "firebaseTime": { "_seconds": 1536770342, "_nanoseconds": 349000000 }, "lastSR": 3429, "season": "12" }, "pYS3awGIepyva4jOrG4X": { "lastSR": 3491, "placementMatch": false, "season": "13", "result": "win", "newSR": 3516, "heroes": [ "Reinhardt", "Orisa" ], "currentSR": 3491, "localTime": { "_seconds": 1543279758, "_nanoseconds": 940000000 }, "firebaseTime": { "_seconds": 1543279759, "_nanoseconds": 199000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Rialto" }, "pd2MqJxRXzSlhmlLnwFv": { "map": "Oasis", "lastSR": 3456, "placementMatch": false, "season": "13", "result": "win", "newSR": 3480, "heroes": [ "Moira" ], "currentSR": 3456, "localTime": { "_seconds": 1541644286, "_nanoseconds": 985000000 }, "firebaseTime": { "_seconds": 1541644287, "_nanoseconds": 163000000 }, "userId": myUserId, "isCurrentSRChanged": false }, "pj9fERb9nYkK3iWfStcF": { "result": "win", "isCurrentSRChanged": false, "map": "King's Row", "newSR": 3722, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1538000685, "_nanoseconds": 118000000 }, "currentSR": 3698, "firebaseTime": { "_seconds": 1538000683, "_nanoseconds": 819000000 }, "lastSR": 3698, "season": "12", "userId": myUserId }, "q7oTYRvdaDeWpIo9R0Cv": { "map": "Lijiang Tower", "newSR": 3524, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1537378893, "_nanoseconds": 296000000 }, "currentSR": 3525, "firebaseTime": { "_seconds": 1537378893, "_nanoseconds": 428000000 }, "lastSR": 3525, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false }, "qIRD4duJV6dB8aNpVWiZ": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3521, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537570612, "_nanoseconds": 768000000 }, "currentSR": 3545, "firebaseTime": { "_seconds": 1537570612, "_nanoseconds": 631000000 }, "lastSR": 3545, "season": "12" }, "qNP3AW8C6x6JgciVe81U": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Dorado", "newSR": 3671, "heroes": [ "Winston" ], "localTime": { "_seconds": 1539374271, "_nanoseconds": 343000000 }, "currentSR": 3646, "firebaseTime": { "_seconds": 1539374270, "_nanoseconds": 342000000 }, "lastSR": 3646, "season": "12" }, "qNj4On8Vmg3etjFJeVTy": { "placementMatch": false, "season": "13", "result": "loss", "newSR": 3384, "heroes": [ "Reinhardt" ], "currentSR": 3406, "localTime": { "_seconds": 1543428027, "_nanoseconds": 389000000 }, "firebaseTime": { "_seconds": 1543428024, "_nanoseconds": 485000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3406 }, "qTrk7zXUOhDOXAl0kFp3": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Busan", "newSR": 3455, "heroes": [ "Reinhardt", "Soldier: 76" ], "localTime": { "_seconds": 1540487598, "_nanoseconds": 229000000 }, "currentSR": 3480, "firebaseTime": { "_seconds": 1540487596, "_nanoseconds": 910000000 }, "lastSR": 3480, "season": "12" }, "qcDbnRAIvyTYqjhhle3E": { "userId": myUserId, "result": "draw", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3582, "heroes": [ "Reinhardt" ], "localTime": { "_seconds": 1540219946, "_nanoseconds": 649000000 }, "currentSR": 3582, "firebaseTime": { "_seconds": 1540219946, "_nanoseconds": 706000000 }, "lastSR": 3582, "season": "12" }, "qd1lATiBfilAJbRpzBif": { "lastSR": 3491, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3467, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3491, "localTime": { "_seconds": 1543283665, "_nanoseconds": 58000000 }, "firebaseTime": { "_seconds": 1543283665, "_nanoseconds": 137000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura" }, "rC59pspIiFakanBVLrIL": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "newSR": 3557, "heroes": [ "Winston", "Reinhardt", "Brigitte" ], "localTime": { "_seconds": 1540221870, "_nanoseconds": 980000000 }, "currentSR": 3582, "firebaseTime": { "_seconds": 1540221871, "_nanoseconds": 110000000 }, "lastSR": 3582, "season": "12" }, "rCRilOS01eTnAZlhhWUp": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Volskaya Industries", "newSR": 3549, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1537393139, "_nanoseconds": 339000000 }, "currentSR": 3524, "firebaseTime": { "_seconds": 1537393139, "_nanoseconds": 503000000 }, "lastSR": 3524, "season": "12" }, "rM8PABwK4Nwal2Mu9WNA": { "isCurrentSRChanged": false, "map": "Blizzard World", "newSR": 3627, "heroes": [ "Moira" ], "localTime": { "_seconds": 1539876208, "_nanoseconds": 804000000 }, "currentSR": 3649, "firebaseTime": { "_seconds": 1539876207, "_nanoseconds": 104000000 }, "lastSR": 3649, "season": "12", "userId": myUserId, "result": "loss" }, "ritRVuZwzrA7zcrdw0Yh": { "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "lastSR": 3433, "placementMatch": false, "season": "13", "result": "win", "newSR": 3456, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3433, "localTime": { "_seconds": 1541610685, "_nanoseconds": 50000000 }, "firebaseTime": { "_seconds": 1541610683, "_nanoseconds": 76000000 }, "userId": myUserId }, "roPFAuXhKKrKOG4ncxXn": { "localTime": { "_seconds": 1539464201, "_nanoseconds": 634000000 }, "currentSR": 3621, "firebaseTime": { "_seconds": 1539464199, "_nanoseconds": 61000000 }, "lastSR": 3621, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3645, "heroes": [ "Brigitte", "Zenyatta" ] }, "s55jBm6UQVGE3kbHFBp2": { "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3569, "heroes": [ "Moira" ], "localTime": { "_seconds": 1537728628, "_nanoseconds": 742000000 }, "currentSR": 3544, "firebaseTime": { "_seconds": 1537728627, "_nanoseconds": 317000000 }, "lastSR": 3544, "season": "12", "userId": myUserId, "result": "win" }, "sNwXGB4h19CnxTCIoyZj": { "firebaseTime": { "_seconds": 1541627936, "_nanoseconds": 239000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hanamura", "lastSR": 3481, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3456, "heroes": [ "Reinhardt", "Winston" ], "currentSR": 3481, "localTime": { "_seconds": 1541627936, "_nanoseconds": 91000000 } }, "sUTzoyoZ0v1kiMZwjlzT": { "lastSR": 3559, "placementMatch": false, "season": "13", "result": "draw", "newSR": 3559, "heroes": [ "Zenyatta", "Brigitte", "Lucio" ], "currentSR": 3559, "localTime": { "_seconds": 1542646445, "_nanoseconds": 522000000 }, "firebaseTime": { "_seconds": 1542646445, "_nanoseconds": 369000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Horizon Lunar Colony" }, "siE9DKeJ9C8NrdNPt4Vn": { "placementMatch": false, "season": "13", "result": "win", "newSR": 3506, "heroes": [ "Brigitte" ], "currentSR": 3483, "localTime": { "_seconds": 1542388307, "_nanoseconds": 97000000 }, "firebaseTime": { "_seconds": 1542388307, "_nanoseconds": 255000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Busan", "lastSR": 3483 }, "srn7g1QF0xJWElsAA67U": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Hollywood", "lastSR": 3532, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3509, "heroes": [ "Reinhardt", "Winston" ], "currentSR": 3532, "localTime": { "_seconds": 1542045523, "_nanoseconds": 917000000 }, "firebaseTime": { "_seconds": 1542045521, "_nanoseconds": 190000000 } }, "ssdvvcjyQwDGMOcpHEZH": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Junkertown", "lastSR": 3530, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3506, "heroes": [ "Zenyatta" ], "currentSR": 3530, "localTime": { "_seconds": 1542213045, "_nanoseconds": 679000000 }, "firebaseTime": { "_seconds": 1542213045, "_nanoseconds": 926000000 } }, "t7klg1RPPmGoHK7vnyD2": { "result": "win", "newSR": 3410, "heroes": [ "Zenyatta" ], "currentSR": 3386, "localTime": { "_seconds": 1543593399, "_nanoseconds": 422000000 }, "firebaseTime": { "_seconds": 1543593398, "_nanoseconds": 307000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Hollywood", "lastSR": 3386, "placementMatch": false, "season": "13" }, "tTWOqYXksc1k1wWwMMkO": { "newSR": 3698, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537981869, "_nanoseconds": 194000000 }, "currentSR": 3722, "firebaseTime": { "_seconds": 1537981867, "_nanoseconds": 895000000 }, "lastSR": 3722, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Blizzard World" }, "tg8amGZJEds1f6bRtvDD": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Busan", "newSR": 3651, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1539807525, "_nanoseconds": 130000000 }, "currentSR": 3627, "firebaseTime": { "_seconds": 1539807524, "_nanoseconds": 513000000 }, "lastSR": 3627, "season": "12" }, "thEkKQvwtzDeh0QgsOqC": { "isCurrentSRChanged": false, "map": "Oasis", "lastSR": 3400, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3378, "heroes": [ "Moira" ], "currentSR": 3400, "localTime": { "_seconds": 1543420388, "_nanoseconds": 604000000 }, "firebaseTime": { "_seconds": 1543420385, "_nanoseconds": 680000000 }, "userId": myUserId }, "tqG7LhMlFXIoA6VGChnA": { "isCurrentSRChanged": false, "map": "Eichenwalde", "newSR": 3744, "heroes": [ "Reinhardt" ], "localTime": { "_seconds": 1538597085, "_nanoseconds": 504000000 }, "currentSR": 3718, "firebaseTime": { "_seconds": 1538597084, "_nanoseconds": 271000000 }, "lastSR": 3718, "season": "12", "userId": myUserId, "result": "win" }, "u2g8TlGpmguyF88yoD4v": { "newSR": 3480, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3456, "localTime": { "_seconds": 1541611315, "_nanoseconds": 27000000 }, "firebaseTime": { "_seconds": 1541611313, "_nanoseconds": 60000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Rialto", "lastSR": 3456, "placementMatch": false, "season": "13", "result": "win" }, "uPihrP8UOAJZAgEU6fhW": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Nepal", "lastSR": null, "placementMatch": true, "season": "13", "result": "win", "newSR": null, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": null, "localTime": { "_seconds": 1541100008, "_nanoseconds": 143000000 }, "firebaseTime": { "_seconds": 1541100005, "_nanoseconds": 168000000 } }, "uneGaN0Wl74cP4XX22Ro": { "result": "win", "newSR": 3555, "heroes": [ "Zenyatta" ], "currentSR": 3531, "localTime": { "_seconds": 1542136708, "_nanoseconds": 931000000 }, "firebaseTime": { "_seconds": 1542136706, "_nanoseconds": 944000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Temple of Anubis", "lastSR": 3531, "placementMatch": false, "season": "13" }, "v3BvpCRN9GNJSk6ct1Vi": { "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3453, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540503840, "_nanoseconds": 540000000 }, "currentSR": 3429, "firebaseTime": { "_seconds": 1540503839, "_nanoseconds": 410000000 }, "lastSR": 3429, "season": "12", "userId": myUserId, "result": "win" }, "vWSZkPPDXwSA6xuJW0TL": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3550, "heroes": [ "Brigitte", "Moira" ], "localTime": { "_seconds": 1537300893, "_nanoseconds": 408000000 }, "currentSR": 3575, "firebaseTime": { "_seconds": 1537300892, "_nanoseconds": 670000000 }, "lastSR": 3575, "season": "12" }, "vZuZVhDFsKtC6YlUq1R9": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Oasis", "newSR": 3483, "heroes": [ "Brigitte", "Tracer" ], "localTime": { "_seconds": 1540246786, "_nanoseconds": 854000000 }, "currentSR": 3508, "firebaseTime": { "_seconds": 1540246787, "_nanoseconds": 109000000 }, "lastSR": 3508, "season": "12" }, "vnclzABhpND1u28c8yRH": { "result": "win", "isCurrentSRChanged": false, "map": "Numbani", "newSR": 3529, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540415534, "_nanoseconds": 53000000 }, "currentSR": 3506, "firebaseTime": { "_seconds": 1540415533, "_nanoseconds": 143000000 }, "lastSR": 3506, "season": "12", "userId": myUserId }, "vrpaYy1ioWoPjIj5KXoo": { "newSR": 3525, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1537205557, "_nanoseconds": 298000000 }, "currentSR": 3549, "firebaseTime": { "_seconds": 1537205557, "_nanoseconds": 412000000 }, "lastSR": 3549, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Hollywood" }, "vusKffiGfJDTyYEuzPzr": { "newSR": 3374, "heroes": [ "Lucio", "Winston", "Brigitte" ], "currentSR": 3398, "localTime": { "_seconds": 1543339014, "_nanoseconds": 204000000 }, "firebaseTime": { "_seconds": 1543339012, "_nanoseconds": 439000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Nepal", "lastSR": 3398, "placementMatch": false, "season": "13", "result": "loss" }, "w8ZPsjPGAOn6eDUE2YFe": { "currentSR": 3556, "localTime": { "_seconds": 1542038987, "_nanoseconds": 977000000 }, "firebaseTime": { "_seconds": 1542038985, "_nanoseconds": 215000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Junkertown", "lastSR": 3556, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3532, "heroes": [ "Moira", "Ana" ] }, "wEZkixuLJ6Sa6IXNYuM0": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3599, "heroes": [ "Reinhardt", "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1539016174, "_nanoseconds": 516000000 }, "currentSR": 3623, "firebaseTime": { "_seconds": 1539016174, "_nanoseconds": 681000000 }, "lastSR": 3623, "season": "12" }, "wYnXZ7OjAFiFyPc727Ke": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Junkertown", "newSR": 3622, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537820106, "_nanoseconds": 17000000 }, "currentSR": 3644, "firebaseTime": { "_seconds": 1537820105, "_nanoseconds": 819000000 }, "lastSR": 3644, "season": "12" }, "wdZE84026Un7NEm0IIkO": { "map": "Watchpoint: Gibraltar", "newSR": 3527, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1537289228, "_nanoseconds": 836000000 }, "currentSR": 3550, "firebaseTime": { "_seconds": 1537289228, "_nanoseconds": 12000000 }, "lastSR": 3550, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false }, "wgRRrgK6G7GfQ771O236": { "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Dorado", "newSR": 3405, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1536863951, "_nanoseconds": 130000000 }, "currentSR": 3429, "firebaseTime": { "_seconds": 1536863951, "_nanoseconds": 279000000 }, "lastSR": 3429, "season": "12" }, "xKF7GsRAqej1C2vdE7K2": { "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3719, "heroes": [ "Zenyatta", "Brigitte" ], "localTime": { "_seconds": 1538690694, "_nanoseconds": 234000000 }, "currentSR": 3719, "firebaseTime": { "_seconds": 1538690691, "_nanoseconds": 609000000 }, "lastSR": 3719, "season": "12", "userId": myUserId, "result": "draw" }, "xMoHq5e16hG9i0ngvWle": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Nepal", "lastSR": 3556, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3531, "heroes": [ "Zenyatta" ], "currentSR": 3556, "localTime": { "_seconds": 1541808368, "_nanoseconds": 336000000 }, "firebaseTime": { "_seconds": 1541808366, "_nanoseconds": 40000000 } }, "xVsiNKwjXHNA6qKS9Uaz": { "firebaseTime": { "_seconds": 1540478024, "_nanoseconds": 191000000 }, "lastSR": 3456, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Junkertown", "newSR": 3480, "heroes": [ "Ana" ], "localTime": { "_seconds": 1540478025, "_nanoseconds": 522000000 }, "currentSR": 3456 }, "xXWo0NwiBPOHQHqCU1kX": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Blizzard World", "newSR": 3452, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1536764097, "_nanoseconds": 524000000 }, "currentSR": 3427, "firebaseTime": { "_seconds": 1536764096, "_nanoseconds": 83000000 }, "lastSR": 3427, "season": "12" }, "xiAWNIE9k39RF9Eh566c": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Horizon Lunar Colony", "newSR": 3669, "heroes": [ "Moira" ], "localTime": { "_seconds": 1537904935, "_nanoseconds": 582000000 }, "currentSR": 3645, "firebaseTime": { "_seconds": 1537904934, "_nanoseconds": 930000000 }, "lastSR": 3645, "season": "12" }, "xnoIeN1gM3V84OSKFtq7": { "userId": myUserId, "result": "win", "isCurrentSRChanged": false, "map": "Watchpoint: Gibraltar", "newSR": 3696, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1538584944, "_nanoseconds": 91000000 }, "currentSR": 3671, "firebaseTime": { "_seconds": 1538584942, "_nanoseconds": 857000000 }, "lastSR": 3671, "season": "12" }, "xrl9REbvZEOzi5Qmj4Ve": { "isCurrentSRChanged": false, "map": "Rialto", "lastSR": 3420, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3398, "heroes": [ "Winston", "Brigitte" ], "currentSR": 3420, "localTime": { "_seconds": 1543337812, "_nanoseconds": 83000000 }, "firebaseTime": { "_seconds": 1543337810, "_nanoseconds": 303000000 }, "userId": myUserId }, "yp230N3XlMC0LXjfVGN5": { "isCurrentSRChanged": false, "map": "King's Row", "newSR": 3476, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1536942139, "_nanoseconds": 287000000 }, "currentSR": 3452, "firebaseTime": { "_seconds": 1536942138, "_nanoseconds": 394000000 }, "lastSR": 3452, "season": "12", "userId": myUserId, "result": "win" }, "z0KOjyD1RYzAskiDDIvF": { "lastSR": 3410, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3386, "heroes": [ "Zenyatta", "Lucio" ], "currentSR": 3410, "localTime": { "_seconds": 1543594386, "_nanoseconds": 167000000 }, "firebaseTime": { "_seconds": 1543594385, "_nanoseconds": 92000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Ilios" }, "z8JtIrKHlEQEhjlIN3iy": { "lastSR": 3359, "placementMatch": false, "season": "13", "result": "win", "newSR": 3385, "heroes": [ "Zenyatta", "Brigitte" ], "currentSR": 3359, "localTime": { "_seconds": 1543507694, "_nanoseconds": 844000000 }, "firebaseTime": { "_seconds": 1543507694, "_nanoseconds": 965000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Numbani" }, "zIKQO7J7xFJBm7G6F97s": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Busan", "lastSR": 3431, "placementMatch": false, "season": "13", "result": "loss", "newSR": 3406, "heroes": [ "Brigitte" ], "currentSR": 3431, "localTime": { "_seconds": 1543426607, "_nanoseconds": 292000000 }, "firebaseTime": { "_seconds": 1543426604, "_nanoseconds": 381000000 } }, "zOydjRbcXj868rVuJEMp": { "newSR": 3505, "heroes": [ "Moira", "Zenyatta" ], "currentSR": 3481, "localTime": { "_seconds": 1541778869, "_nanoseconds": 870000000 }, "firebaseTime": { "_seconds": 1541778867, "_nanoseconds": 514000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "King's Row", "lastSR": 3481, "placementMatch": false, "season": "13", "result": "win" }, "zPZhBWrDGjhuNuDFzOjR": { "newSR": 3610, "heroes": [ "Brigitte" ], "currentSR": 3584, "localTime": { "_seconds": 1542654905, "_nanoseconds": 330000000 }, "firebaseTime": { "_seconds": 1542654905, "_nanoseconds": 312000000 }, "userId": myUserId, "isCurrentSRChanged": false, "map": "Busan", "lastSR": 3584, "placementMatch": false, "season": "13", "result": "win" }, "zVDQDGGhf2Flh8FBFYlW": { "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1540337556, "_nanoseconds": 715000000 }, "currentSR": 3481, "firebaseTime": { "_seconds": 1540337556, "_nanoseconds": 301000000 }, "lastSR": 3481, "season": "12", "userId": myUserId, "result": "loss", "isCurrentSRChanged": false, "map": "Temple of Anubis", "newSR": 3457 }, "zWowGUtbagg5bdjrCdRv": { "isCurrentSRChanged": false, "map": "Junkertown", "newSR": 3481, "heroes": [ "Zenyatta" ], "localTime": { "_seconds": 1540399158, "_nanoseconds": 929000000 }, "currentSR": 3457, "firebaseTime": { "_seconds": 1540399157, "_nanoseconds": 994000000 }, "lastSR": 3457, "season": "12", "userId": myUserId, "result": "win" }, "zXL4dux2RxAIxExZVQf2": { "isCurrentSRChanged": false, "map": "Ilios", "newSR": 3551, "heroes": [ "Brigitte" ], "localTime": { "_seconds": 1537293818, "_nanoseconds": 172000000 }, "currentSR": 3527, "firebaseTime": { "_seconds": 1537293817, "_nanoseconds": 359000000 }, "lastSR": 3527, "season": "12", "userId": myUserId, "result": "win" }, "zZuA3r4JI4wGiuFJyAG3": { "userId": myUserId, "isCurrentSRChanged": false, "map": "Nepal", "lastSR": 3459, "placementMatch": false, "season": "13", "result": "win", "newSR": 3484, "heroes": [ "Brigitte", "Zenyatta" ], "currentSR": 3459, "localTime": { "_seconds": 1541695133, "_nanoseconds": 561000000 }, "firebaseTime": { "_seconds": 1541695133, "_nanoseconds": 128000000 } }, "zptnN48gIjJwoDE91aU3": { "newSR": 3454, "heroes": [ "Reinhardt", "Winston" ], "localTime": { "_seconds": 1536851370, "_nanoseconds": 899000000 }, "currentSR": 3454, "firebaseTime": { "_seconds": 1536851368, "_nanoseconds": 416000000 }, "lastSR": 3454, "season": "12", "userId": myUserId, "result": "draw", "isCurrentSRChanged": false, "map": "Blizzard World" }, "zvgkReu2ybcueCSOKph0": { "map": "Junkertown", "newSR": 3555, "heroes": [ "Brigitte", "Zenyatta" ], "localTime": { "_seconds": 1539985882, "_nanoseconds": 307000000 }, "currentSR": 3531, "firebaseTime": { "_seconds": 1539985879, "_nanoseconds": 661000000 }, "lastSR": 3531, "season": "12", "userId": myUserId, "result": "win", "isCurrentSRChanged": false } }
import React from 'react' const heroIconSize = 32 const mapCenter = 200 - (heroIconSize / 2) export const mapScale = 400 export default (player, k) => <i key={k} className={`d2mh hero-${player.hero_id}`} style={{ position: 'absolute', transition: '0.8s', left: `${(player.x * mapScale) + mapCenter}px`, bottom: `${(player.y * mapScale) + mapCenter}px` }} />
export default { baseUrl: "https://kitapunya.setakarim.xyz/api/v1" // baseUrl: "http://192.168.1.12:8000/api/v1" }
import React, { Component } from 'react'; import Header from './header'; import OnlineList from './onlineList'; import UsersAPI from '../api/users'; export default class App extends Component { state = { shouldUpdateList: false, username: '' } componentDidMount() { if (localStorage.username && localStorage.username !== '') { this.setState({username: localStorage.username}); } } clickJoin() { const username = this.usernameInput.value this.setState({username: username}); localStorage.username = username; UsersAPI.pushOnlineUser.body = JSON.stringify({username: username}); UsersAPI.pushOnlineUser.headers.append('Content-Type', 'application/json'); console.log(UsersAPI.pushOnlineUser); fetch(UsersAPI.baseUrl, UsersAPI.pushOnlineUser) .then(response => response.json()) .then(data => console.log(data.message)) .catch(error => console.error(error)); } render() { return( <div className="appContainer"> <Header currentUser={this.state.username} shouldUpdateList={this.state.shouldUpdateList} /> { this.state.username !== '' ? null : <div className="joinInput"> <h3>Enter username</h3> <input type="text" name="username" ref={input => this.usernameInput = input} /> <button onClick={::this.clickJoin}>Join</button> </div> } </div> ); } }
const test = require('tape'); const btoa = require('./btoa.js'); test('Testing btoa', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof btoa === 'function', 'btoa is a Function'); t.equals(btoa('foobar'), 'Zm9vYmFy', 'btoa("foobar") equals "Zm9vYmFy"'); //t.deepEqual(btoa(args..), 'Expected'); //t.equal(btoa(args..), 'Expected'); //t.false(btoa(args..), 'Expected'); //t.throws(btoa(args..), 'Expected'); t.end(); });
const url = require('url'); const spawn = require('child_process').spawn; module.exports = function (params) { const snmp_client = spawn('python3.6', [__dirname + '/snmp_V3.py', '-host', params.relay.uri, '-user', params.relay.username, '-password', params.relay.password]); snmp_client.stdout.on('data', (data) => { console.log(`stdout: ${data}`); }); snmp_client.stderr.on('data', (data) => { console.log(`stderr: ${data}`); }); }
// const tampilNama = function (nama) { // return `Hallo, ${nama}` // } // console.log(tampilNama('Juang')) // const tampilNama = (nama) => { return `Hallo, ${nama}` } // console.log(tampilNama('Juang')) // const mahasiswa = ['Bangkit Juang Raharjo', 'Muhammad Mujahid Muslim', 'Rahmat Bagus Latami'] // const jumlahHuruf = mahasiswa.map( nama => ({nama, jumlahHuruf: nama.length})) // console.table(jumlahHuruf) // const Mahasiswa = function () { // this.nama = "Juang" // this.umur = 23 // this.sayHello = function () { // console.log(`hello nama saya ${this.nama}, dan saya ${this.umur} tahun`) // } // console.log(this) // } // const Juang = new Mahasiswa() const Mahasiswa = function () { this.nama = "Juang" this.umur = 23 this.sayHello = function () { console.log(`hello nama saya ${this.nama}, dan saya ${this.umur} tahun`) } console.log(this) } const Juang = new Mahasiswa()
// Source: https://leetcode.com/problems/shuffle-the-array/ // nums = array; n = first el post x, and start el of y // i.e. x[],y[n] const shuffle = (nums, n) => { // This check isn't necessary for this challenge. // if(n === nums.length || n===0) { // return nums; // }; let result_array = []; for(let i = 0; i < n; i++) { result_array.push(nums[i], nums[n+i]) } console.log(result_array) return result_array } // COMPLETED, PASSES. // TIME COMPLEXITY: n(log n) // SPACE COMPLEXITY: 0(n) // LEETCODE FEEDBACK: // Runtime: 76 ms, faster than 88.21% of JavaScript online submissions for Shuffle the Array. // Memory Usage: 38.4 MB, less than 100.00% of JavaScript online submissions for Shuffle the Array. // TESTS const arr = [2,5,1,3,4,7], split = 3 // const arr = [1,2,3,4,4,3,2,1], split = 4 // const arr = [1,1,2,2], split = 2 shuffle(arr, split)
//https://stackoverflow.com/questions/28440262/web-audio-api-for-live-streaming/62870119#62870119 //https://sonoport.github.io/web-audio-clock.html (muy buena explicacion) //https://www.html5rocks.com/en/tutorials/audio/scheduling/ (no entendi mucho) /* Schedule e interfaz grafica */ const durSamp = 512.0; const durTiempo = durSamp/sr; const callInterval = 2000.0* durTiempo;//ms //let buffTemp = []; //for (var i = 0; i < durSamp; i++) buffTemp.push(0.); //const nbuffers = Math.floor(callInterval/1000.0/durTiempo) +1; //La cantidad de buffers que necesito console.log('Duración de un buffer:' + durTiempo.toString() + 's'); console.log('Sample Rate:' + sr.toString()); //console.log('Buffers por stream:' +nbuffers.toString()); console.log('Stream Period:' + callInterval.toString() + 'ms'); /* Variables globales */ let processId=""; ti=0.; let ultimoTiempo =0.; /* Scheduler!! */ /*La joda acá es que tengo osciladores con KPS La forma izi pizi que decidí ahora es solo generar buffers del tamaño de un periodo de nota y reproducirlos uno atrás de otro. No me parece conveniente generar "la misma cantidad de buffers" a la vez para cada oscilador. O sea, me parece mejor que los bufsizes de cada KPS contengan un numero entero de ciclos Lo que cambiaria entonces es que de una sola llamada genere, digamos 10 ciclos de la nota Seria preferible eso */ function stream(){ if(!reproduciendo) return; if(Fuente3.on) while(Fuente3.queuedBufs < 1 || context.currentTime +0.1 > Fuente3.finUltimo){ Fuente3.siguienteCiclo(); Fuente3.start(Fuente3.finUltimo); Fuente3.finUltimo+=Fuente3.p/sr; } //Si tengo más de un oscilador, esto lo hago con un for if(Fuente1.on) while(Fuente1.queuedBufs < 3 || context.currentTime + 0.125 > Fuente1.finUltimo) { //crearBuffer(Fuente1); Fuente1.crearBufferSenoidal(1); Fuente1.start(Fuente1.finUltimo); Fuente1.finUltimo += Fuente1.bufsize/sr; } if(Fuente2.on) while(Fuente2.queuedBufs < 3 || context.currentTime +0.125 > Fuente2.finUltimo){ Fuente2.crearBufferSenoidal(2); Fuente2.start(Fuente2.finUltimo); Fuente2.finUltimo +=Fuente2.bufsize/sr; //esto tambien puede ir aparte } //console.log('Ultimo buffer scheduled para t=' + (finUltimo).toString() +'s' ); }
import * as types from './userActionTypes'; import codeClanApi from '../../api/apiUtils'; export const getUserProfileApi = () => { return dispatch => { dispatch({ type: types.USER_START }); return codeClanApi .get('profile') .then(res => { dispatch({ type: types.USER_SUCCESS, payload: res.data }); }) .catch(err => { const error_msg = err.response.data.message || 'An error occured'; dispatch({ type: types.USER_FAILURE, payload: error_msg, }); }); }; }; export const getUserMentorProfileApi = () => { return dispatch => { dispatch({ type: types.USER_START }); return codeClanApi .get('profile/mentors') .then(res => { dispatch({ type: types.GET_MENTOR, payload: res.data }); }) .catch(err => { const error_msg = err.response.data.message || 'An error occured'; dispatch({ type: types.USER_FAILURE, payload: error_msg, }); }); }; }; export const getUserMenteesProfileApi = () => { return dispatch => { dispatch({ type: types.USER_START }); return codeClanApi .get('profile/mentees') .then(res => { dispatch({ type: types.GET_MENTEES, payload: res.data }); }) .catch(err => { const error_msg = err.response.data.message || 'An error occured'; dispatch({ type: types.USER_FAILURE, payload: error_msg, }); }); }; }; export const editUserProfileApi = userData => { return dispatch => { dispatch({ type: types.USER_START }); return codeClanApi .put('profile', userData) .then(res => { dispatch({ type: types.EDIT_USER, payload: res.data }); }) .catch(err => { const error_msg = err.response.data.message || 'An error occured'; dispatch({ type: types.USER_FAILURE, payload: error_msg, }); }); }; };
/** * Function to check if datatype of a given value is of reference type * @param {*} value - value to be checked * @returns {Boolean} - true if the given value is reference type; false otherwise */ const checkReferenceType = (value) => { if (value) { return typeof value === "object" || typeof value === "function"; } return false; }; /** * Function to get formatted date as: April 20, 2021 from an ISO date string * @param {String} isoDate - ISO date string to be formatted * @returns {String} - formatted date string */ export const getFormattedDate = (isoDate) => { if (isoDate) { const options = { day: "numeric", month: "long", year: "numeric", }; return new Date(isoDate).toLocaleDateString("en-US", options); } return ""; }; /** * Function to check if given email is valid * @param {String} email - email to be checked * @returns {Boolean} - true if email is valid; false otherwise */ export const checkValidEmail = (email) => { if (email) { // Credits - https://stackoverflow.com/a/46181/7452548 const regex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return regex.test(email.toString().toLowerCase()); } return false; }; /** * Function to check if given value contains only numbers * @param {String} value - value to be checked * @returns {Boolean} - true if value is numerical; false otherwise */ export const checkIsNumerical = (value) => { if (value) { const regex = /^[0-9]*$/; return regex.test(value.toString()); } return false; }; /** * Function to set local storage with given key-value pair * @param {*} key - unique identifier (datatype is not reference type) * @param {*} value - value corresponding to the key */ export const setInLocalStorage = (key, value) => { if (!checkReferenceType(key) && value) { if (checkReferenceType(value)) { localStorage.setItem(key.toString(), JSON.stringify(value)); } else { localStorage.setItem(key.toString(), value.toString()); } } }; /** * Function to remove given key from local storage * @param {*} key - unique identifier */ export const removeFromLocalStorage = (key) => { if (key) { localStorage.removeItem(key); } }; /** * Function to get formatted time represented in hours and minutes * @param {number} minutes - unique identifier (datatype is not reference type) * @returns {String} formatted time if minutes exist; "NA" otherwise * Example: 2h 30m */ export const getFormattedTimeInHoursAndMinutes = (minutes) => { if (minutes) { minutes = +minutes; // convert string to number (type safe for further calculations) const hours = Math.floor(minutes / 60); const mins = minutes % 60; if (hours === 0) { return `${mins}m`; } if (mins === 0) { return `${hours}h`; } return `${hours}h ${mins}m`; } return "NA"; };
// actions 提交的是 mutation, 而不是直接变更状态 // Action 通过 store.dispatch('setEmpirical') 方法触发 export default { setEmpiricalAsync: (context) => { setTimeout(() => { context.commit('setEmpirical', 10); // context提交 }, 2000); } };
import React from "react"; import "../../../grid.css"; import "./dinner.css"; import img1 from "../../../img/Eating/dinner/1b____horizontal.jpg"; import img2 from "../../../img/Eating/dinner/20200504_165630____horizontal.jpg"; import img3 from "../../../img/Eating/dinner/detailtietkiem____horizontal.png"; const Dinner = () => { return ( <div> <div className="grid wide"> <h1>Đậm đà nhiều đạm</h1> <p>Giàu năng lượng, cân bằng dinh dưỡng</p> <div className="row no-gutters"> <div className="col l-4 m-6 c-12 dinnerinfo"> <h3 className="dinner-title">Bữa tối đậm đà tiết kiệm</h3> <p className="dinner-rating"> <span>9.8</span> <span>Tuyệt vời</span> <span>| 72 đánh giá</span> </p> <p className="dinner-description"> Bữa tối đầy đủ được chọn từ các loại nguyên liệu, thực phẩm phổ biến như thịt heo, thịt gà, các loại cá và rau xanh tươi ngon như rau cải, rau muống, bí xanh,… Sẵn sàng cho bữa ăn gia đình nhẹ nhàng, đơn giản và dinh dưỡng đảm bảo </p> <div className="dinner-pricebtn"> <p>1 tuần chỉ</p> <p className="dinner-price"> <span>99.000</span> <span> đ</span> </p> <button className="dinner-btn">Xem ngay</button> </div> </div> <div className="col l-8 m-6 c-12"> <img src={img1} alt="Bữa tối đậm đà tiết kiệm" className="dinner-img" /> </div> </div> <div className="row no-gutters"> <div className="col l-8 m-6 c-12"> <img src={img2} alt="Bữa tối đậm đà tiêu chuẩn" className="dinner-img" /> </div> <div className="col l-4 m-6 c-12 dinnerinfo"> <h3 className="dinner-title">Bữa tối đậm đà tiêu chuẩn</h3> <p className="dinner-rating"> <span>9.7</span> <span>Tuyệt vời</span> <span>| 46 đánh giá</span> </p> <p className="dinner-description"> Là sự kết hợp của những loại nguyên liệu, thực phẩm chất lượng cao như các loại nấm, sườn non, thịt bò, cá hồi, tôm sú, gà ta thả vườn… cùng những loại củ quả, rau xanh đặc sản như bông thiên lý, bông bí, măng tây, rau cải bina,… Với gói nguyên liệu tiêu chuẩn, mỗi bữa tối đều là một bữa ăn ngon miệng tuyệt vời. </p> <div className="dinner-pricebtn"> <p>1 tuần chỉ</p> <p className="dinner-price"> <span>199.000</span> <span> đ</span> </p> <button className="dinner-btn">Xem ngay</button> </div> </div> </div> <div className="row no-gutters"> <div className="col l-4 m-6 c-12 dinnerinfo"> <h3 className="dinner-title">Bữa tối đậm đà cao cấp</h3> <p className="dinner-rating"> <span>9.9</span> <span>Tuyệt vời</span> <span>| 16 đánh giá</span> </p> <p className="dinner-description"> Mỗi bữa tối sẽ là một đại tiệc thưởng thức tinh hoa ẩm thực với gói nguyên liệu bữa tối cao cấp. Các loại thực phẩm hảo hạng như cá hồi Na Uy, tôm càng, vẹm xanh, các loại nấm cao cấp như nấm hương, nấm đùi gà, rau xanh cao cấp,… Nguyên liệu, thực phẩm ngon nhất được kết hợp với nhau một cách hợp lý để bữa ăn của bạn vừa ngon mắt, vừa bổ dưỡng lại cân bằng dinh dưỡng. </p> <div className="dinner-pricebtn"> <p>1 tuần chỉ</p> <p className="dinner-price"> <span>299.000</span> <span> đ</span> </p> <button className="dinner-btn">Xem ngay</button> </div> </div> <div className="col l-8 m-6 c-12"> <img src={img3} alt="Bữa tối đậm đà cao cấp" className="dinner-img" /> </div> </div> </div> </div> ); }; export default Dinner;
define([ 'models/BaseCollection', 'models/ImageModel' ], function(BaseCollection, ImageModel) { 'use strict'; var ImageCollection = BaseCollection.extend({ model: ImageModel }); return ImageCollection; });
import React from 'react'; import {YMaps, Map, Placemark, ZoomControl} from 'react-yandex-maps'; import './location.css'; const Location = ({x, y, zoom, conf}) => { return ( <div className={"location"}> <YMaps > <Map defaultState={{center: [x, y], zoom: zoom, behaviors: ['drag', 'multiTouch']}} width={"100%"} height={"100%"}> <Placemark geometry={[x, y]} properties={{iconContent: conf.logoText + ' ' + conf.address.address}} options={{preset:'islands#blackStretchyIcon', draggable: false}}/> <ZoomControl /> </Map> </YMaps> </div> ); }; export default Location;
function CGame(bChallengeMode){ var _bChallengeMode; var _fGravityIncrease; var _iScore = 0; var _iHiScore = 0; var _iTimeElaps; var _oBall; var _oInterface; var _oPlayer; var _oEndPanel; this._init = function(bChallengeMode){ _bChallengeMode = bChallengeMode; _iTimeElaps = TIME_GAME; _oPlayer = new CPlayer(); if (_bChallengeMode) { _oInterface = new CInterface(this,_bChallengeMode); _oBall = new CBallChallenge(this); var scoringData = _oBall.getInitialScoringdata(); _iScore = scoringData.initGravity; _fGravityIncrease = scoringData.tick; } else { _oInterface = new CInterface(this,_bChallengeMode); _oBall = new CBall(this); }; _oEndPanel = new CEndPanel(s_oSpriteLibrary.getSprite('panel')); $(s_oMain).trigger("start_level",1); }; this.unload = function(){ $(s_oMain).trigger("end_level",1); _oBall.unload(); s_oGame = null; s_oStage.removeAllChildren(); s_oMain.gotoMenu(); }; this.update = function(){ if(s_bClickBall === false){ return; } if(_oBall.checkEdges()){ if (_iScore !== 0) { _oInterface.updateScore(0, Math.floor(_iHiScore*100)/100); }; if (_bChallengeMode) { _iScore = _oBall.getInitialScoringdata().initGravity; if(DISABLE_SOUND_MOBILE === false || s_bMobile === false){ createjs.Sound.play("reset_kickup"); } } else { if(_iScore > 0){ _iScore = 0; if(DISABLE_SOUND_MOBILE === false || s_bMobile === false){ createjs.Sound.play("reset_kickup"); } } } } if(s_bClickBall){ _iTimeElaps -= s_iTimeElaps; if(_iTimeElaps < 0){ s_bClickBall = false; _oEndPanel.show(Math.floor(_iHiScore*100)/100,_bChallengeMode); $(s_oMain).trigger("end_level",1); }else{ _oInterface.refreshTime(formatTime(_iTimeElaps)); } }else{ _oInterface.refreshTime(formatTime(0)); } _oBall.update(); s_oStage.update(); }; this.increaseScore = function(){ if (_bChallengeMode) { _iScore += _fGravityIncrease; } else { _iScore++; }; var fRand = Math.random(); if (fRand <= 0.25 && _iScore > _iHiScore) { _oInterface.newTopScore(); } else if (fRand <= 0.7) { _oInterface.encouragement(); }; if (_iScore > _iHiScore) { _iHiScore = _iScore; }; _oInterface.updateScore(Math.floor(_iScore*100)/100, Math.floor(_iHiScore*100)/100); }; this.playerAnim = function(posX,posY){ _oPlayer.display(posX,posY); }; s_oGame = this; s_bClickBall = true; this._init(bChallengeMode); } var s_bClickBall = true; var s_oGame = null;
import React, { useEffect, useState } from 'react' import CourseNavbar from '../Navbars/CourseNavbar' import { useDispatch, useSelector } from 'react-redux' import { clearCurrentCourse, setCurrentCourse } from '../../store/courses/reducer' import { clearLessons, setLessons } from '../../store/lesson/reducer' import { getLessons } from '../../store/lesson/selectors' import { getCurrentCourse } from '../../store/courses/selectors' import LessonCard from '../LessonPage/LessonCard' import LessonAPI from '../../api/api.lesson' import { useRouter } from 'next/router' import { useTranslation } from 'next-i18next' const CourseManager = ({ course, lessons }) => { const { t } = useTranslation('navbar') const dispatch = useDispatch() const router = useRouter() const currentLessons = useSelector(getLessons) const currentCourse = useSelector(getCurrentCourse) const [loading, setIsLoading] = useState(false) useEffect(() => { dispatch(setCurrentCourse(course)) dispatch(setLessons(lessons)) return () => { dispatch(clearCurrentCourse()) dispatch(clearLessons()) } }, []) const onCreateLesson = async () => { if (currentCourse) { setIsLoading(true) const data = await LessonAPI.create(currentCourse._id) await router.push(`/editlesson/${data.lesson._id}`) } } const lessonBlock = currentLessons.map((lesson, index) => { return <LessonCard lesson={lesson} key={lesson._id} lessonIndex={index}/> }) return ( <div> <div className="container my-5"> <div className="row"> <div className="col-sm-3 col-md-2"> <CourseNavbar/> </div> <div className="col-sm-9 col-md-10"> <div className="col-12 сol-sm-6 profile-welcome" style={{ backgroundColor: 'rgb(240, 196, 215)' }}> <div className="profile-welcome-block"> <h3 className="profile-welcome-title">{course.title}</h3> <p className="profile-welcome-subtitle">{t('teachSubtitle')}</p> </div> <div className="col-12 col-sm-6"> <img className="profile-welcome-course-img" src={course.coursePreview.url} alt="upgrade"/> </div> </div> <div className="profile-courses"> <h3 className="profile-courses-title">{t('content')}({currentLessons.length})</h3> {lessonBlock} <a style={{ textDecoration: 'none' }}> <div className="profile-courses-one justify-content-center d-flex my-3" style={{ alignItems: 'center' }}> <div className="mr-3"> <button disabled={loading} className="lesson-btn d-flex" onClick={onCreateLesson}> <i className="fas fa-plus"/> </button> </div> <h3 className="profile-courses-one-title m-0">{t('createLesson')}</h3> </div> </a> </div> </div> </div> </div> </div> ) } export default CourseManager
// some logics are learned from linkedin Learning JavaScript Essential Training //global constant variables(some were given) const testWrapper = document.querySelector(".test-wrapper"); const testArea = document.querySelector("#test-area"); const originText = document.querySelector("#origin-text p"); //had to remove inner.html, otherwise everytime it will take the text from the html const resetButton = document.querySelector("#reset"); const theTimer = document.querySelector(".timer"); const textArray = document.querySelector(".text"); const randomText= document.querySelector("#randomText"); const totalErrors = document.querySelector("#errors"); const topfivenum = document.querySelector("#topFive"); //Array of texts const texts = [ "Checking.", "testing", "Hi", "Text to test." ]; // This is the timer var currentTime; // I need this variable to assign value var topFiveNumbers; // In this array I will store the top 5 times var topScores = new Array(); // let allows to declare variables that are limited to the scope of a block statement, or expression on which it is used //we need the array if timer as we will show the timw as min sec and mili sec let timer = [0, 0, 0, 0]; //it ensures that when we start, the timer is off let timerIsOn = false; // we will assign numbers to errors. let errors = 0; // we will need interval let interval; // This function is adding leading zeroes for 1 digit values. for example, 1:1:10 will show 01:01:10 function leadingZero(time) { if (time <= 9) { // we are adding string to a int value. Javascript is flexiable. Later, if we need to use it as int, it will work as int as it is still a number time = "0" + time; } return time; } // It will start the timer. function startTimer() { // now we are calling leading zero function with the min sec and mil sec and getting the whole time in the formet we want currentTime = leadingZero(timer[0]) + ":" + leadingZero(timer[1]) + ":" + leadingZero(timer[2]); // display current time theTimer.innerHTML = currentTime; //update the value timer[3]++; // display the different values // math object to find floor is used to avoid decimals // to get the minute timer[0] = Math.floor((timer[3] / 100) / 60); // to get the second timer[1] = Math.floor((timer[3] / 100) - (timer[0] * 60)); // to get the milisecond timer[2] = Math.floor(timer[3] - timer[1] * 100 - timer[0] * 6000); } function topFiveScores(currentTime) { // we need to push the times first topScores.push(currentTime); // Now we will sort the array topScores.sort(); //Now selecting the top five times and it will be stored in topFives topFiveNumbers = topScores.slice(0, 5); } // This function is checking the spelling of the input function checkSpelling() { // it will get the strings let textEntered = testArea.value; // the sub string will treat the array as sub string // we will start from zero, and will return as text entered // it will ensure two equal length string let originTextMatch = originText.innerHTML.substring(0, textEntered.length); // check if the two string is equal if (textEntered == originText.innerHTML) { // if the given text and the inout is same, change the border color to green testWrapper.style.borderColor = "green"; // call the topFiveScore function to store the time topFiveScores(currentTime); clearInterval(interval); // update the topFives value in the html to show topfivenum.innerHTML = topFiveNumbers; } else { // if the texts are not equal if (textEntered == originTextMatch) { // now if the substrings are equal, the border will be blue testWrapper.style.borderColor = "blue"; } else { //if not equal, the border will be red testWrapper.style.borderColor = "red"; // whenever it will be wrong, we will increase the errors var errors++; // then we will put that in the html totalErrors.innerHTML = errors; } } } // Start the timer: function start() { // first key strock will be 0 in the console let textEnteredLength = testArea.value.length; // we need to add the timerIsOn condition as well, otherwise it will not be able to handle if we start with wrong string. The timer will not stop if (textEnteredLength === 0 && timerIsOn === false) { timerIsOn = true; // when it starts, set an interval, start the timer and run it for every thousand of seconds interval = setInterval(startTimer, 10); } } // Reset everything: function reset() { // reset the interval clearInterval(interval); interval = null; // need to reset the time timer = [0, 0, 0, 0]; // stop the timer timerIsOn = false; testArea.value = ""; // reset the html theTimer.innerHTML = "00:00:00"; // reset the error number errors = 0; // reset errors in the html totalErrors.innerHTML = 0; // after resetting, the border color will be gray again testWrapper.style.borderColor = "gray"; } // This function is for new text. It will select random texts from the given array of texts function clickedRandomText() { originText.innerHTML = texts[Math.floor(Math.random() * texts.length)]; // It will also call the reset function to reset evrything reset(); } // Event listeners for keyboard input and the reset button: // testarea is the box that we need to work with // we need "keypress". whenever the user will press anything, the start function will start the timer testArea.addEventListener("keypress", start, false); // when the user will press the randomText button, it will call the function randomText.addEventListener("click", clickedRandomText, false); // whenever the user will stype anything, it will start checking the speeling testArea.addEventListener("keyup", checkSpelling, false); // the reset button will call the reset function resetButton.addEventListener("click", reset, false);
const express = require('express'); const router = express.Router(); const is_admin = require("../../middleware/admin/is-admin") const controller = require("../../controllers/admin/users") const userModel = require("../../models/users") const globalModel = require("../../models/globalModel") const multer = require("multer") const { check } = require('express-validator') const constant = require("../../functions/constant"); router.get('/users/withdraw/:page?',is_admin, controller.withdraws); router.get('/users/withdraw/approved/:id',is_admin, controller.withdrawsApprove); router.get('/users/withdraw/reject/:id',is_admin, controller.withdrawsReject); router.get('/users/withdraw/delete/:id',is_admin, controller.withdrawsDelete); router.get('/users/settings',is_admin, controller.settings); router.post('/users/settings',is_admin, controller.settings); router.get("/users/delete/:id",is_admin,controller.delete) router.get("/users/login/:id",is_admin,controller.login) router.post("/users/verified/:id",is_admin,controller.verified) router.post("/users/featured/:id",is_admin,controller.featured) router.post("/users/sponsored/:id",is_admin,controller.sponsored) router.post("/users/hot/:id",is_admin,controller.hot) router.post("/users/popular/:id",is_admin,controller.popular) router.post("/users/approve/:id",is_admin,controller.approve) router.post("/users/active/:id",is_admin,controller.active) router.post('/users/edit/:id', is_admin,multer().none(), async (req, res, next) => { const id = req.params.id req.allowAll = true await userModel.findById(id, req, res,true).then(result => { if (result) { req.item = result } }) req.allowAll = false next() }, [ check('email') .isEmail() .trim() .withMessage('Please enter a valid email.') .custom((value, { req }) => { // return true; if (req.item.email != value) { return globalModel.custom(req, "SELECT users.user_id FROM users LEFT JOIN userdetails ON userdetails.user_id = users.user_id WHERE users.user_id != ? AND email = ?", [req.params.id, value]).then(result => { if (result && result.length > 0) { return Promise.reject( constant.member.EMAILTAKEN) }else{ return Promise.resolve(true) } }) }else{ return Promise.resolve(true) } }), check('username') .optional({ checkFalsy:true }) .custom((value, { req }) => { if (req.item.username != value ) { if(req.levelPermissions['member.username'] == 1){ if (value.length < 4 || value.length > 40){ return Promise.reject("'Username must be at least 4 characters long'") } return globalModel.custom(req, "SELECT users.user_id FROM users LEFT JOIN userdetails ON userdetails.user_id = users.user_id WHERE users.user_id != ? AND username = ?", [req.params.id, value]).then(result => { if (result && result.length > 0) { return Promise.reject( constant.member.USERNAMETAKEN) }else{ const banword = require("../../models/banwords") return banword.find(req,{text:value}).then(result => { if (result) { return Promise.reject( constant.member.USERNAMETAKEN ); } }) } }) }else{ return Promise.resolve(true) } } else{ return Promise.resolve(true) } }), check('password') .trim() .custom(password => { if (password && password.trim().length < 7) { return Promise.reject( "Password must be at least 6 chars long" ); } else { return Promise.resolve(true) } }), check('first_name') .trim() .not() .isEmpty() .withMessage('First Name should not be empty.'), check('level_id') .not() .isEmpty() .withMessage('Member Role should not be empty.') .trim() ], controller.edit) router.get('/users/invite',is_admin, controller.invite); router.post('/users/invite',is_admin, controller.invite); router.get('/users/verification/:page?',is_admin, controller.verification); router.get('/users/verification/delete/:id',is_admin, controller.deleteVerification); router.get('/users/verification/approve/:id',is_admin, controller.approveVerification); router.get('/users/monetization/:page?',is_admin, controller.monetization); router.get('/users/monetization/delete/:id',is_admin, controller.deleteMonetization); router.get('/users/monetization/approve/:id',is_admin, controller.approveMonetization); router.get('/users/:page?',is_admin, controller.index); router.post('/users',is_admin, controller.index); router.get("/levels/create/:id?",is_admin,controller.createLevel); router.post("/levels/create/:id?",is_admin,controller.createLevel); router.get("/levels/default/:level_id",is_admin,controller.defaultLevel) router.get(`/levels/delete/:level_id`, is_admin,controller.deleteLevel) router.get(`/levels/edit/:level_id`, is_admin,controller.editLevel) router.post(`/levels/edit/:level_id`, is_admin,controller.editLevel) router.get(`/levels/:page?`, is_admin,controller.levels); module.exports = router;
import React from 'react' export default function ChildComponent(props) { const {changeMes} = props; return ( <div> <button onClick = {() => {changeMes('child')}}>Send message to parent component</button> </div> ) }
var logger = require("../utils/logger"); var SuperDappCall = require("../utils/SuperDappCall"); var locker = require("../utils/locker"); // inputs: limit, offset app.route.post('/issuers', async function(req, cb){ logger.info("Entered /issuers API"); var total = await app.model.Issuer.count({ deleted: '0' }); var result = await app.model.Issuer.findAll({ condition: { deleted: '0' }, limit: req.query.limit, offset: req.query.offset }); return { total: total, issuers: result }; }); app.route.post('/issuers/data', async function(req, cb){ logger.info("Entered /issuers/data API"); var result = await app.model.Issuer.findOne({ condition: { email: req.query.email } }); if(!result) return "Invalid Issuer"; return result; }); // inputs: limit, offset app.route.post('/authorizers', async function(req, cb){ logger.info("Entered /authorizers API"); var total = await app.model.Authorizer.count({ deleted: '0' }); var result = await app.model.Authorizer.findAll({ condition: { deleted: '0' }, limit: req.query.limit, offset: req.query.offset }); return { total: total, authorizer: result }; }); app.route.post('/authorizers/data', async function(req, cb){ logger.info("Entered /authoirzers/data"); var result = await app.model.Authorizer.findOne({ condition: { email: req.query.email } }); if(!result) return "Invalid Authorizer"; return result; }); app.route.post('/authorizers/getId', async function(req, cb){ var result = await app.model.Authorizer.findOne({ condition:{ email: req.query.email } }); if(result){ return { isSuccess: true, result: result } } return { isSuccess: false, message: "Authorizer not found" } }) app.route.post('/employees/getId', async function(req, cb){ var result = await app.model.Employee.findOne({ condition:{ email: req.query.email } }); if(result){ return { isSuccess: true, result: result } } return { isSuccess: false, message: "Employee not found" } }) app.route.post('/issuers/getId', async function(req, cb){ var result = await app.model.Issuer.findOne({ condition:{ email: req.query.email } }); if(result){ return { isSuccess: true, result: result } } return { isSuccess: false, message: "Issuer not found" } }) app.route.post('/authorizers/remove', async function(req, cb){ logger.info("Entered /authorizers/remove API"); await locker("/authorizers/remove"); var check = await app.model.Authorizer.findOne({ condition:{ aid:req.query.aid, deleted: '0' } }); if(!check) return { message: "Not found", isSuccess: false } var removeObj = { email: check.email, } var removeInSuperDapp = await SuperDappCall.call('POST', '/removeUsers', removeObj); if(!removeInSuperDapp) return { message: "No response from superdapp", isSuccess: false } if(!removeInSuperDapp.isSuccess) return { message: "Failed to delete", err: removeInSuperDapp, isSuccess: false } var pendingIssues = await app.model.Issue.findAll({ condition: { status: { $in: ['pending', 'authorized'] }, category: check.category }, fields: ['pid', 'count'] }); var countOfAuths = await app.model.Authorizer.count({ category: check.category, deleted: '0' }); for(i in pendingIssues){ var signed = await app.model.Cs.exists({ aid: req.query.aid, pid: pendingIssues[i].pid }) if(signed) app.sdb.update('issue', {count: pendingIssues[i].count - 1}, {pid: pendingIssues[i].pid}); else if(pendingIssues[i].count === countOfAuths - 1) app.sdb.update('issue', {status: 'authorized'}, {pid: pendingIssues[i].pid}) } app.sdb.update('authorizer', {deleted: '1'}, {aid: check.aid}); return { isSuccess: true }; }); app.route.post('/issuers/remove', async function(req, cb){ logger.info("Entered /issuers/remove API"); await locker("/issuers/remove"); var check = await app.model.Issuer.findOne({ condition:{ iid:req.query.iid, deleted: '0' } }); if(!check) return { message: "Not found", isSuccess: false } var removeObj = { email: check.email } var removeInSuperDapp = await SuperDappCall.call('POST', '/removeUsers', removeObj); if(!removeInSuperDapp) return { message: "No response from superdapp", isSuccess: false } if(!removeInSuperDapp.isSuccess) return { message: "Failed to delete", err: removeInSuperDapp, isSuccess: false } app.sdb.update('issuer', {deleted: '1'}, {iid: check.iid}); return { isSuccess: true }; }); app.route.post('/category/define', async function(req, cb){ await locker('/category/define'); var defined = await app.model.Category.findAll({}); if(defined.length) return { message: 'Categories already defined', isSuccess: false } var timestamp = new Date().getTime().toString(); for(i in req.query.categories){ app.sdb.create('category', { name: req.query.categories[i], deleted: '0', timestampp: timestamp }) }; return { isSuccess: true } }) app.route.post('/category/add', async function(req, cb){ await locker('/category/add'); var exists = await app.model.Category.exists({ name: req.query.name, deleted: '0' }); if(exists) return { message: "The provided category already exists", isSuccess: false } app.sdb.create('category', { name: req.query.name, deleted: '0', timestampp: new Date().getTime().toString() }) return { isSuccess: true } }); app.route.post('/category/remove', async function(req, cb){ await locker('/category/remove'); var exists = await app.model.Category.exists({ name: req.query.name, deleted: '0' }); if(!exists) return { message: "The provided category does not exist", isSuccess: false } app.sdb.update('category', {deleted: '1'}, {name: req.query.name}); return { isSuccess: true } }); app.route.post('/category/get', async function(req, cb){ await locker('/category/get'); var categories = await app.model.Category.findAll({ condition: { deleted: '0' }, fields: ['name', 'timestampp'] }); return { categories: categories, isSuccess: true } }) app.route.post('/customFields/define', async function(req, cb){ await locker('/customFields/define'); var setting = await app.model.Setting.findOne({ condition: { id: '0' } }) try{ var earnings = Buffer.from(JSON.stringify(req.query.earnings)).toString('base64'); var deductions = Buffer.from(JSON.stringify(req.query.deductions)).toString('base64'); var identity = Buffer.from(JSON.stringify(req.query.identity)).toString('base64'); }catch(err){ return { message: "Enter valid inputs", isSuccess: false } } if(setting){ app.sdb.update('setting', {earnings: earnings}, {id: '0'}); app.sdb.update('setting', {deductions: deductions}, {id: '0'}); app.sdb.update('setting', {identity: identity}, {id: '0'}); } else{ app.sdb.create('setting', { id: '0', earnings: earnings, deductions: deductions, identity: identity }) } return { isSuccess: true } }); app.route.post('/customFields/get', async function(req, cb){ await locker('/customFields/get'); var setting = await app.model.Setting.findOne({ condition: { id: '0' } }); if(!setting) return { message: "No setting defined", isSuccess: false } return { earnings: JSON.parse(Buffer.from(setting.earnings, 'base64').toString()), deductions: JSON.parse(Buffer.from(setting.deductions, 'base64').toString()), identity: JSON.parse(Buffer.from(setting.identity, 'base64').toString()), isSuccess: true } }); // app.route.post('/payslips/pendingsigns', async function(req, cb){ // var check = await app.model.Ui.exists({ // id: req.query.id // }); // if(!check) return "Invalid id"; // var signs = await app.model.Cs.findAll({ // condition: { // upid: req.query.id // },fields: ['aid'] // }); // var totalAuthorizers=await app.model.Authorizer.findAll({fields: ['id'] // }); // var obj={ // signs:signs.length, // totalAuthorizers:totalAuthorizers.length // } // return obj; // });
routerApp.controller('homeCtrl', function ($rootScope, $scope) { $scope.cur_view = 'f'; var date = new Date(); var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0); $scope.facilities = [ {'img':'img/background1.jpg', 'loc':'HSR sector 1','name':'Pretty Hate Machine ','des':'Nine Inch Nails,Nine Inch Nails.Nine Inch Nails.Nine Inch Nails.Nine Inch Nails.Nine Inch Nails.Nine Inch Nails.Nine Inch Nails.Nine Inch Nails.Nine Inch Nails','booking':'Y'}, {'img':'img/background2.jpg','loc':'HSR sector 1','name':'Pretty Hate Machine 1','des':'Four Inch Nails','booking':'N'}, {'img':'img/background3.jpg','loc':'HSR sector 5','name':'Pretty Hate Machine 2','des':'Three Inch Nails','booking':'Y'}, {'img':'img/background1.jpg','loc':'HSR sector 4','name':'Pretty Hate Machine','des':'Nine Inch Nails','booking':'N'}, {'img':'img/background2.jpg','loc':'HSR sector 3','name':'Pretty Hate Machine 1','des':'Four Inch Nails','booking':'Y'}, {'img':'img/background3.jpg','loc':'HSR sector 12','name':'Pretty Hate Machine 2','des':'Three Inch Nails','booking':'N'}, {'img':'img/background1.jpg','loc':'HSR sector 11','name':'Pretty Hate Machine','des':'Nine Inch Nails'}, {'img':'img/background2.jpg','loc':'HSR sector 12','name':'Pretty Hate Machine 1','des':'Four Inch Nails'}, {'img':'img/background3.jpg','loc':'HSR sector 13','name':'Pretty Hate Machine 2','des':'Three Inch Nails'}, {'img':'img/background1.jpg','loc':'HSR sector 1','name':'Pretty Hate Machine','des':'Nine Inch Nails'}, {'img':'img/background2.jpg','loc':'HSR sector 14','name':'Pretty Hate Machine 1','des':'Four Inch Nails'}, {'img':'img/background3.jpg','loc':'HSR sector 14','name':'Pretty Hate Machine 2','des':'Three Inch Nails'}, {'img':'img/background1.jpg','loc':'HSR sector 13','name':'Pretty Hate Machine','des':'Nine Inch Nails'}, {'img':'img/background2.jpg','loc':'HSR sector 12','name':'Pretty Hate Machine 1','des':'Four Inch Nails'}, {'img':'img/background3.jpg','loc':'HSR sector 11','name':'Pretty Hate Machine 2','des':'Three Inch Nails'}, {'img':'img/background1.jpg','loc':'HSR sector 10','name':'Pretty Hate Machine 3','des':'Two Inch Nails'} ]; $scope.coaches = [ {'img':'img/background3.jpg','name':'Pretty Hate Machine 3','des':'Four Inch Nails'}, {'img':'img/background2.jpg','name':'Pretty Hate Machine 2','des':'Three Inch Nails'}, {'img':'img/background1.jpg','name':'Pretty Hate Machine 1','des':'Two Inch Nails'}, {'img':'img/background1.jpg','name':'Pretty Hate Machine','des':'Nine Inch Nails'}, {'img':'img/background2.jpg','name':'Pretty Hate Machine 1','des':'Four Inch Nails'}, {'img':'img/background3.jpg','name':'Pretty Hate Machine 2','des':'Three Inch Nails'}, {'img':'img/background1.jpg','name':'Pretty Hate Machine','des':'Nine Inch Nails'}, {'img':'img/background2.jpg','name':'Pretty Hate Machine 1','des':'Four Inch Nails'}, {'img':'img/background3.jpg','name':'Pretty Hate Machine 2','des':'Three Inch Nails'}, {'img':'img/background1.jpg','name':'Pretty Hate Machine','des':'Nine Inch Nails'}, {'img':'img/background2.jpg','name':'Pretty Hate Machine 1','des':'Four Inch Nails'}, {'img':'img/background3.jpg','name':'Pretty Hate Machine 2','des':'Three Inch Nails'}, {'img':'img/background1.jpg','name':'Pretty Hate Machine','des':'Nine Inch Nails'}, {'img':'img/background2.jpg','name':'Pretty Hate Machine 1','des':'Four Inch Nails'}, {'img':'img/background3.jpg','name':'Pretty Hate Machine 2','des':'Three Inch Nails'}, {'img':'img/background3.jpg','name':'Pretty Hate Machine 3','des':'One Inch Nails'}, {'img':'img/background3.jpg','name':'Pretty Hate Machine 3','des':'One Inch Nails'} ]; $scope.viewChange = function(v){ $scope.cur_view = v; } });
import React from 'react' import Message from './components/Message' import Time from './components/Time' import Counter from './components/Counter' import StopWatch from './components/Stopwatch' import Amount from './components/Amount' import { Euro, Pound } from './components/Currency' import TemperatureCalculator from './components/TemperatureCalculator' const App = () => ( <div className="container"> <div className="row"> <Message className="col" alert="success" color="green">Hello World</Message> <Message className="col" alert="danger" color="red">Goodby World</Message> </div> <div className="row"> <Message><Time locale="en-US"/></Message> </div> <div className="row mb-3"> <div className="col"> <Counter/> </div> </div> <div className="row mb-3"> <div className="col"> <StopWatch/> </div> </div> <div className="row"> <div className="col"> <h3>Example for Render Props: Currency Converter</h3> <Amount> {amount => ( <div> <Euro amount={amount} /> <Pound amount={amount} /> </div> )} </Amount> </div> </div> <div className="row"> <div className="col"> <h3>Example for Lifting-State-Up: Temperature Calculator</h3> <TemperatureCalculator /> </div> </div> </div> ) export default App
/* MODULES */ const chalk = require('chalk'); const path = require('path'); const fs = require('fs'); const Discord = require('discord.js'); const bot = new Discord.Client(); const modules = require('./modules/modules_manager.js'); const hidden = require('../../tuba kun hidden/export.js'); var firstRun = true; modules.functions.botLogin(hidden.keychain.discordToken, {bot, firstRun}, false);
module.exports = { "Dragon Ward": { name: "Dragon Ward" description: "Allies adjacent to the user have a Luck x 0.5% chance of receiving half damage from enemy attacks", class: ["Hoshido Noble"], level: 5, cost: "1500" }, "Hoshidan Unity": { name: "Hoshidan Unity" description: "Adds 10% to skill activation rates", class: ["Hoshido Noble"], level: 15, cost: "3000" }, "Duelist’s Blow": { name: "Duelist’s Blow" description: "When user triggers the battle, Avoid +30", class: ["Samurai"], level: 1, cost: "500" }, "Vantage": { name: "Vantage" description: "At the start of battle, when the user has under half HP, they attack first", class: ["Samurai"], level: 10, cost: "750" }, "Astra": { name: "Astra" description: "Skill x 0.5% chance of triggering 5 consecutive hits with half damage", class: ["Swordmaster"], level: 5, cost: "2000" }, "Swordfaire": { name: "Swordfaire" description: "When user is equipped with a Sword, damage +5 during battle", class: ["Swordmaster"], level: 15, cost: "2000" }, "Seal Strength": { name: "Seal Strength" description: "After battle, enemy’s Strength -6 *1", class: ["Master of Arms"], level: 5, cost: "750" }, "Life and Death": { name: "Life and Death" description: "During battles, damage +10, damage received +10", class: ["Master of Arms"], level: 15, cost: "1000" }, "Seal Resistance": { name: "Seal Resistance" description: "After battle, enemy’s Resistance -6 *1", class: ["Oni Savage"], level: 1, cost: "750" }, "Shove": { name: "Shove" description: "Select the “Shove” command to push an adjacent ally 1 tile", class: ["Oni Savage"], level: 10, cost: "1500" }, "Death Blow": { name: "Death Blow" description: "When user triggers the battle, Critical rate +20", class: ["Oni Chieftain"], level: 5, cost: "1000" }, "Counter": { name: "Counter" description: "When an adjacent enemy triggers the battle and inflicts damage, the enemy receives the same damage", class: ["Oni Chieftain"], level: 15, cost: "1250" }, "Salvage Blow": { name: "Salvage Blow" description: "When user triggers the battle, Luck% chance of receiving a Katana, Naginata, Club, Yumi or Shuriken if the user defeats the enemy", class: ["Blacksmith"], level: 5, cost: "2500" }, "Lancebreaker": { name: "Lancebreaker" description: "Hit rate and Avoid +50 when the enemy is equipped with a Lance", class: ["Blacksmith"], level: 15, cost: "1500" }, "Seal Defence": { name: "Seal Defence" description: "After battle, enemy’s Defence -6 *1", class: ["Spear Fighter"], level: 1, cost: "1000" }, "Swap": { name: "Swap" description: "Select the “Swap” command to swap places with an adjacent ally on the map", class: ["Spear Fighter"], level: 10, cost: "1000" }, "Seal Speed": { name: "Seal Speed" description: "After battle, enemy’s Speed -6 *1", class: ["Spear Master"], level: 5, cost: "1000" }, "Lancefaire": { name: "Lancefaire" description: "When user is equipped with a Lance, damage +5 during battle", class: ["Spear Master"], level: 15, cost: "2000" }, "Rend Heaven": { name: "Rend Heaven" description: "Skill x 1.5% chance of adding half the enemy’s Strength (if user has a physical weapon) or Magic (if user has a magical weapon) as damage", class: ["Basara"], level: 5, cost: "1500" }, "Quixotic": { name: "Quixotic" description: "User and enemy’s Hit rate +30 and skill activation rate +15% during battle", class: ["Basara"], level: 15, cost: "2000" }, "Magic +2": { name: "Magic +2" description: "Magic +2", class: ["Diviner"], level: 1, cost: "500" }, "Future Sight": { name: "Future Sight" description: "When user triggers the battle, Luck% chance of gaining double experience when user defeats the enemy", class: ["Diviner"], level: 10, cost: "750" }, "Rally Magic": { name: "Rally Magic" description: "Magic +4 to all allies within a 2 tile radius for one Turn when the “Rally” command is used", class: ["Onmyoji"], level: 5, cost: "1000" }, "Tomefaire": { name: "Tomefaire" description: "When user is equipped with a Tome, damage +5 during battle", class: ["Onmyoji"], level: 15, cost: "2000" }, "Miracle": { name: "Miracle" description: "Luck% chance of leaving the user with 1 HP when they have 2 or more HP", class: ["Monk","Shrine Maiden"], level: 1, cost: "500" }, "Rally Luck": { name: "Rally Luck" description: "Luck +8 to all allies within a 2 tile radius for one Turn when the “Rally” command is used", class: ["Monk","Shrine Maiden"], level: 10, cost: "750" }, "Renewal": { name: "Renewal" description: "Recover 30% HP at the start of the user’s Turn", class: ["Great Master"], level: 5, cost: "1500" }, "Renewal": { name: "Renewal" description: "Recover 30% HP at the start of the user’s Turn", class: ["Priestess"], level: 5, cost: "1500" }, "Countermagic": { name: "Countermagic" description: "When the enemy triggers the battle and inflicts magical damage, the enemy receives the same damage", class: ["Great Master"], level: 15, cost: "1250" }, "Countermagic": { name: "Countermagic" description: "When the enemy triggers the battle and inflicts magical damage, the enemy receives the same damage", class: ["Priestess"], level: 15, cost: "1250" }, "Darting Blow": { name: "Darting Blow" description: "When user triggers the battle, follow up attack speed +5", class: ["Sky Knight"], level: 1, cost: "750" }, "Camaraderie": { name: "Camaraderie" description: "Recover 10% HP at the start of the user’s Turn if there are allies within a 2 tile radius", class: ["Sky Knight"], level: 10, cost: "500" }, "Rally Speed": { name: "Rally Speed" description: "Speed +4 to all allies within a 2 tile radius for one Turn when the “Rally” command is used", class: ["Falcon Knight"], level: 5, cost: "1250" }, "Warding Blow": { name: "Warding Blow" description: "When user triggers the battle, magical damage received -20", class: ["Falcon Knight"], level: 15, cost: "1500" }, "Air Superiority": { name: "Air Superiority" description: "Hit rate and Avoid +30 when facing Flying enemies", class: ["Kinshi Knight"], level: 5, cost: "1000" }, "Amaterasu": { name: "Amaterasu" description: "Allies within a 2 tile radius recover 20% HP at the start of the user’s Turn", class: ["Kinshi Knight"], level: 15, cost: "1250" }, "Skill +2": { name: "Skill +2" description: "Skill +2", class: ["Archer"], level: 1, cost: "500" }, "Quick Draw": { name: "Quick Draw" description: "When user triggers the battle, damage +4", class: ["Archer"], level: 10, cost: "750" }, "Certain Blow": { name: "Certain Blow" description: "When user triggers the battle, Hit rate +40", class: ["Sniper"], level: 5, cost: "1000" }, "Bowfaire": { name: "Bowfaire" description: "When user is equipped with a Bow, damage +5 during battle", class: ["Sniper"], level: 15, cost: "2000" }, "Locktouch": { name: "Locktouch" description: "User can open doors and chests without requiring keys", class: ["Ninja"], level: 1, cost: "1250" }, "Poison Strike": { name: "Poison Strike" description: "When user triggers the battle, the enemy’s HP is reduced by 20% after the battle", class: ["Ninja"], level: 10, cost: "750" }, "Lethality": { name: "Lethality" description: "Skill x 0.25% chance of instantly defeating the enemy when dealing 1 or more damage", class: ["Master Ninja"], level: 5, cost: "2500" }, "Shurikenfaire": { name: "Shurikenfaire" description: "When user is equipped with a Dagger, damage +5 during battle", class: ["Master Ninja"], level: 15, cost: "2000" }, "Golembane": { name: "Golembane" description: "Attacks are effective against Mechanists, Automatons and Stoneborn", class: ["Mechanist"], level: 5, cost: "1000" }, "Replicate": { name: "Replicate" description: "Select the “Replicate” command once per map to create a replica with the same appearance, stats, inventory and HP as the user (Anything that happens to the replica happens to the user and vice versa–even death)", class: ["Mechanist"], level: 15, cost: "3000" }, "Potent Potion": { name: "Potent Potion" description: "The effect of HP recovery and stat-boosting potions is increased by 50%", class: ["Apothecary"], level: 1, cost: "500" }, "Quick Salve": { name: "Quick Salve" description: "After consuming a HP recovery or stat-boosting potion, the user can perform another action", class: ["Apothecary"], level: 10, cost: "750" }, "Profiteer": { name: "Profiteer" description: "Luck% chance of obtaining a Gold Bar after moving during the first seven Turns", class: ["Merchant"], level: 5, cost: "2500" }, "Spendthrift": { name: "Spendthrift" description: "During battles, user spends a Gold Bar for damage +10 and damage received -10", class: ["Merchant"], level: 15, cost: "1250" }, "Evenhanded": { name: "Evenhanded" description: "During even-numbered Turns, damage +4", class: ["Kitsune"], level: 1, cost: "500" }, "Beastbane": { name: "Beastbane" description: "When user is a Wolfskin or Kitsune, their attacks are effective against Beast units", class: ["Kitsune"], level: 10, cost: "1000" }, "Even Better": { name: "Even Better" description: "Recover 40% HP at the start of even-numbered Turns", class: ["Nine-Tails"], level: 5, cost: "1250" }, "Grisly Wound": { name: "Grisly Wound" description: "The enemy’s HP is reduced by 20% after the battle", class: ["Nine-Tails"], level: 15, cost: "1250" }, "Luck +4": { name: "Luck +4" description: "Luck +4", class: ["Songstress"], level: 1, cost: "500" }, "Inspiring Song": { name: "Inspiring Song" description: "Skill, Speed and Luck +3 for one Turn for the unit who receives the user’s song", class: ["Songstress"], level: 10, cost: "750" }, "Voice of Peace": { name: "Voice of Peace" description: "Enemies within a 2 tile radius deal 2 less physical damage", class: ["Songstress"], level: 25, cost: "500" }, "Foreign Princess": { name: "Foreign Princess" description: "“Foreign Army” enemies within a 2 tile radius deal 2 less damage and receive 2 extra damage", class: ["Songstress"], level: 35, cost: "750" }, "Aptitude": { name: "Aptitude" description: "Adds 10% to all growth rates during Level Ups", class: ["Villager"], level: 1, cost: "5000" }, "Underdog": { name: "Underdog" description: "Hit rate and Avoid +15 when user’s Level is lower than the enemy (promoted units count as Level +20)", class: ["Villager"], level: 10, cost: "500" }, "Nobility": { name: "Nobility", description: "Experience gained x 1.2", class: ["Nohr Prince(ss)"], level: 1, cost: "750" }, "Dragon Fang": { name: "Dragon Fang", description: "Skill x.0.75% chance of adding 50% of the user’s Attack Power as damage", class: ["Nohr Prince(ss)"], level: 10, cost: "1500" }, "Draconic Hex": { name: "Draconic Hex", description: "After battle, enemy’s stats -4 *1", class: ["Nohr Noble"], level: 5, cost: "2000" }, "Nohrian Trust": { name: "Nohrian Trust", description: "User shares their support unit’s battle skills *2", class: ["Nohr Noble"], level: 15, cost: "1500" }, "Elbow Room": { name: "Elbow Room", description: "When user fights in terrain with no terrain effects, damage +3 during battles", class: ["Cavalier"], level: 1, cost: "500" }, "Shelter": { name: "Shelter", description: "Select the “Shelter” command to make an adjacent ally the user’s support unit", class: ["Cavalier"], level: 10, cost: "1500" }, "Defender": { name: "Defender", description: "When user is the lead unit while paired up, all stats +1", class: ["Paladin"], level: 5, cost: "750" }, "Aegis": { name: "Aegis", description: "Skill% chance of halving damage from Bow, Magic, Dagger, Dragonstone, Breath or Stone attacks", class: ["Paladin"], level: 15, cost: "1500" }, "Luna": { name: "Luna", description: "Skill% chance of ignoring half the enemy’s Defence (if user has a physical weapon) or Resistance (if user has a magical weapon)", class: ["Great Knight"], level: 5, cost: "1500" }, "Armored Blow": { name: "Armored Blow", description: "When user triggers the battle, physical damage received -10", class: ["Great Knight"], level: 15, cost: "1500" }, "Defence +2": { name: "Defence +2", description: "Defence +2", class: ["Knight"], level: 1, cost: "500" }, "Natural Cover": { name: "Natural Cover", description: "When user fights in terrain with terrain effects, damage received -3 during battles", class: ["Knight"], level: 10, cost: "500" }, "Wary Fighter": { name: "Wary Fighter", description: "During battles, neither the user or enemy can perform follow up attacks", class: ["General"], level: 5, cost: "2000" }, "Pavise": { name: "Pavise", description: "Skill% chance of halving damage from Sword, Lance, Axe, Beaststone, Claw or Puppet attacks", class: ["General"], level: 15, cost: "2000" }, "HP +5": { name: "HP +5", description: "Maximum HP +5", class: ["Fighter"], level: 1, cost: "750" }, "Gamble": { name: "Gamble", description: "Hit rate -10, Critical rate +10", class: ["Fighter"], level: 10, cost: "500" }, "Rally Strength": { name: "Rally Strength", description: "Strength +4 to all allies within a 2 tile radius for one Turn when the “Rally” command is used", class: ["Berserker"], level: 5, cost: "1250" }, "Axefaire": { name: "Axefaire", description: "When user is equipped with an Axe, damage +5 during battle", class: ["Berserker"], level: 15, cost: "2000" }, "Good Fortune": { name: "Good Fortune", description: "Luck% chance of recovering 20% HP at the start of the user’s Turn", class: ["Mercenary"], level: 1, cost: "500" }, "Strong Riposte": { name: "Strong Riposte", description: "When enemy triggers the battle, damage +3", class: ["Mercenary"], level: 10, cost: "750" }, "Sol": { name: "Sol", description: "Skill% chance of restoring half the damage dealt to the enemy", class: ["Hero"], level: 5, cost: "1750" }, "Axebreaker": { name: "Axebreaker", description: "Hit rate and Avoid +50 when the enemy is equipped with an Axe", class: ["Hero"], level: 15, cost: "1500" }, "Rally Skill": { name: "Rally Skill", description: "Skill +4 to all allies within a 2 tile radius for one Turn when the “Rally” command is used", class: ["Bow Knight"], level: 5, cost: "750" }, "Shurikenbreaker": { name: "Shurikenbreaker", description: "Hit rate and Avoid +50 when the enemy is equipped with a Dagger", class: ["Bow Knight"], level: 15, cost: "1500" }, "Locktouch": { name: "Locktouch", description: "User can open doors and chests without requiring keys", class: ["Outlaw"], level: 1, cost: "1250" }, "Movement +1": { name: "Movement +1", description: "Movement +1", class: ["Outlaw"], level: 10, cost: "3000" }, "Lucky Seven": { name: "Lucky Seven", description: "Hit rate and Avoid +20 for the first seven Turns", class: ["Adventurer"], level: 5, cost: "1000" }, "Pass": { name: "Pass", description: "User can pass through tiles occupied by enemy units", class: ["Adventurer"], level: 15, cost: "1750" }, "Strength +2": { name: "Strength +2", description: "Strength +2", class: ["Wyvern Rider"], level: 1, cost: "500" }, "Lunge": { name: "Lunge", description: "Select the “Lunge” command to swap places with an enemy after an attack", class: ["Wyvern Rider"], level: 10, cost: "1000" }, "Rally Defence": { name: "Rally Defence", description: "Defence +4 to all allies within a 2 tile radius for one Turn when the “Rally” command is used", class: ["Wyvern Lord"], level: 5, cost: "1500" }, "Swordbreaker": { name: "Swordbreaker", description: "Hit rate and Avoid +50 when the enemy is equipped with a Sword", class: ["Wyvern Lord"], level: 15, cost: "1500" }, "Savage Blow": { name: "Savage Blow", description: "When user triggers the battle, enemies within a 2 tile radius have their HP reduced by 20% after the battle", class: ["Malig Knight"], level: 5, cost: "1250" }, "Trample": { name: "Trample", description: "Unless enemy is on a mount, damage +5", class: ["Malig Knight"], level: 15, cost: "1250" }, "Heartseeker": { name: "Heartseeker", description: "When fighting adjacent to an enemy, enemy’s Avoid -20", class: ["Dark Mage"], level: 1, cost: "750" }, "Malefic Aura": { name: "Malefic Aura", description: "Enemies within a 2 tile radius receive 2 extra damage from magical attacks", class: ["Dark Mage"], level: 10, cost: "500" }, "Vengeance": { name: "Vengeance", description: "Skill x 1.5% chance of adding half the user’s (Max HP – Current HP) as damage", class: ["Sorcerer"], level: 5, cost: "1250" }, "Bowbreaker": { name: "Bowbreaker", description: "Hit rate and Avoid +50 when the enemy is equipped with a Bow", class: ["Sorcerer"], level: 15, cost: "1500" }, "Seal Magic": { name: "Seal Magic", description: "After battle, enemy’s Magic -6 *1", class: ["Dark Knight"], level: 5, cost: "750" }, "Lifetaker": { name: "Lifetaker", description: "When user triggers the battle, recover 50% HP after defeating the enemy", class: ["Dark Knight"], level: 15, cost: "1500" }, "Resistance +2": { name: "Resistance +2", description: "Resistance +2", class: ["Troubadour"], level: 1, cost: "500" }, "Gentilhomme": { name: "Gentilhomme", description: "Female allies within a 2 tile radius receive 2 less damage during battles", class: ["Troubadour (M)"], level: 10, cost: "750" }, "Demoiselle": { name: "Demoiselle", description: "Male allies within a 2 tile radius receive 2 less damage during battles", class: ["Troubadour (F)"], level: 10, cost: "750" }, "Rally Resistance": { name: "Rally Resistance", description: "Resistance +4 to all allies within a 2 tile radius for one Turn when the “Rally” command is used", class: ["Strategist"], level: 5, cost: "1000" }, "Inspiration": { name: "Inspiration", description: "Allies within a 2 tile radius deal 2 extra damage and receive 2 less damage during battles", class: ["Strategist"], level: 15, cost: "1250" }, "Live to Serve": { name: "Live to Serve", description: "When healing an ally, the user recovers the same amount of HP", class: ["Maid", "Butler"], level: 5, cost: "1000" }, "Tomebreaker": { name: "Tomebreaker", description: "Hit rate and Avoid +50 when the enemy is equipped with a Tome", class: ["Maid", "Butler"], level: 15, cost: "1500" }, "Odd Shaped": { name: "Odd Shaped", description: "During odd-numbered Turns, damage +4", class: ["Wolfskin"], level: 1, cost: "500" }, "Beastbane": { name: "Beastbane", description: "When user is a Wolfskin or Kitsune, their attacks are effective against Beast units", class: ["Wolfskin"], level: 10, cost: "1000" }, "Better Odds": { name: "Better Odds", description: "Recover 40% HP at the start of odd-numbered Turns", class: ["Wolfssegner"], level: 5, cost: "1250" }, "Grisly Wound": { name: "Grisly Wound", description: "The enemy’s HP is reduced by 20% after the battle", class: ["Wolfssegner"], level: 15, cost: "1250" } };
import React from 'react'; import {Link, IndexLink} from 'react-router'; import {orange500, blue500} from 'material-ui/styles/colors'; const Header = ({onLogout}) => ( <div> <div> <h3>Portfolio</h3> </div> <div> <nav> <div className="nav-wrapper"> <ul id="nav-mobile" className="left"> {document.cookie ?( <div> <li><IndexLink to="/">HOME</IndexLink></li> <li><Link to="/profile">PROFILE</Link></li> <li><Link to="/post">POST</Link></li> <li><Link to="/admin">ADMIN</Link></li> <li><Link to="/logout" onClick={onLogout}>LOGOUT</Link></li> </div> ) :(<div> <li><IndexLink to="/">HOME</IndexLink></li> <li><Link to="/profile">PROFILE</Link></li> <li><Link to="/login">LOGIN</Link></li> </div>) } </ul> </div> </nav> </div> </div> ); export default Header;
const cheerio = require('cheerio'); const request = require('request'); //Functions const checkUrl = require('./checkUrl')//Function to check if url is relative or direct const collectLinks = require('./collectLinks'); // Function to collect all urls from the body of the page module.exports = function visitUrl(url , goNext,visitedUrl,startUrl,urlsToVisit) { // Add page to the set visitedUrl[url] = true; console.log("Visiting page " + url.split('?')[0]); //url = checkUrl(url, startUrl); try{ if(url.split('?')[0].includes("medium")){ //Request is asynchronous in nature request(url , function getLinks(err,res,body){ //Load body on cheerio dom. let $ = cheerio.load(body); collectLinks($ , urlsToVisit); goNext(); }); } else{ goNext(); } } catch (err){ console.log("Invalid url " + url); goNext(); } };
import React, { Component } from "react"; import { Nav, Navbar, Container } from "react-bootstrap"; import logo from "../assets/logo5.png"; export class Footer extends Component { render() { return ( <Navbar variant="dark" style={{ backgroundColor: "#F6E6CB" }} className="justify-content-center" > <Container style={{ display: 'flex', flexDirection: 'column' }}> <Nav activeKey="/home" > <Nav.Item style={{ fontWeight: '500', display: 'flex', alignItems: 'center', flexDirection: 'column', justifyContent: 'center' }}> <p>Copyright © 2021 RealxInn.com™. All rights reserved.</p> <p> RealxInn.com is part of Booking Holdings Inc., the world leader in online travel and related services. </p> <Navbar.Brand href="#"> <img src={logo} alt="" style={{ width: "120px", height: "50px", color: "rgb(191 130 131 / 200%)", }} /> </Navbar.Brand> </Nav.Item> </Nav> </Container> </Navbar> ); } } export default Footer;
import React from 'react'; const Notes = () => ( <div> <div className="header-home-section"> <span>Notes</span> </div> </div> ); export default Notes;
const fakeAuthorization = (email, password) => { if (email === 'demo@demo.com' && password === 'demo') { localStorage.setItem('user-token', 'js-token-demo'); return true; } return false; }; export default fakeAuthorization;
import colors from 'vuetify/es5/util/colors' export default { primary: colors.indigo.lighten1, secondary: colors.deepPurple.lighten5, // colors.blue.lighten4 tertiary: "#E81087", accent: colors.blue.lighten1, }
var clonemerge = require('../'); exports.clonemerge = { "Clone": function(test) { var source = { a: 1, b: 2 }; var copy = clonemerge(source); copy.b = 3; test.expect(2); test.equal(source.b, 2); test.equal(copy.a, 1); test.done(); }, "Merge": function(test) { var first = { a: 1, b: 2 }; var second = { b: 3, c: 4}; var copy = clonemerge(first, second); test.expect(5); test.equal(first.c, undefined); test.equal(second.a, undefined); test.equal(copy.a, 1); test.equal(copy.b, 3); test.equal(copy.c, 4); test.done(); } }
/* Global Banner Ad Control: =============================================================================== */ (function (win) { win.define("banner-ads", ["jquery"], function ($) { win.AdServ = win.AdServ || { adspaces: [] }; var drBannerAds = { /* Define each banner id's for each site. ----------------------------------------------------------------------- Url can be string or array (multiple). Use "*"" to include sub paths. "Placement" must be either "top" or "bottom", else use elementID. If "elementID" is defined, it must exist in the DOM. */ adIDs: [ { title: "TV Forside", urls: ["/tv", "/tv/program/*"], excludeSubpaths: ["/se/*", "/live/*"], ads: [ { placement: "top", adID: 162 }, { placement: "bottom", adID: 163 } ] }, { title: "TV Oversigt", urls: ["/tv/oversigt/*"], ads: [ { placement: "top", adID: 80 }, { placement: "bottom", adID: 81 } ] } ], initialize: function () { var insertBanners = false; var currentUrl = this.cleanUrl(location.pathname); for (var index = 0; index < this.adIDs.length; index++) { for (var urlIndex = 0; urlIndex < this.adIDs[index].urls.length; urlIndex++) { var adUrl = this.cleanUrl(this.adIDs[index].urls[urlIndex]); if (adUrl.slice(-1) === "*") { if (this.cleanUrl(currentUrl.slice(0, adUrl.length - 1)) === adUrl.slice(0, adUrl.length - 2)) { insertBanners = true; if (this.adIDs[index].hasOwnProperty("excludeSubpaths")) { for (var pathIndex = 0; pathIndex < this.adIDs[index].excludeSubpaths.length; pathIndex++) { var excludeSubpath = this.cleanUrl(this.adIDs[index].excludeSubpaths[pathIndex]); if (excludeSubpath.slice(-1) === "*") { var adUrlExludingSubpath = adUrl.slice(0, adUrl.length - 2) + excludeSubpath.slice(0, excludeSubpath.length - 2); if (this.cleanUrl(currentUrl.slice(0, adUrlExludingSubpath.length)) === adUrlExludingSubpath) { insertBanners = false; } } else if (currentUrl === (adUrl.slice(0, adUrl.length - 2) + excludeSubpath)) { insertBanners = false; } } } } } else if (currentUrl === adUrl) { insertBanners = true; } if (insertBanners) { return this.insert(this.adIDs[index].ads); } } } }, defaults: { placement: null, adID: null, keyword: '', elementID: null }, cleanUrl: function (url) { url = url.toLowerCase(); if ((url !== "") && (url.slice(0, 1) !== "/")) { url = "/" + url; } if (url.slice(-1) === "/") { url = url.slice(0, url.length - 1); } return url; }, setElementID: function (options) { return 'ba_container_' + options.adID + "_" + options.placement; }, insert: function (ads) { if (Object.prototype.toString.call(ads) === "[object Object]") { this.ads = [ads]; } else if (Object.prototype.toString.call(ads) === "[object Array]") { this.ads = ads; } else { return; } this.$globalnavigation = $('#globalnavigation'); this.$globalfooter = $('#globalfooter'); //Process each ad for (var i = 0; i < this.ads.length; i++) { var ad = this.ads[i]; //Inherit default attributes if any is undefined. for (var property in this.defaults) { if ((typeof (ad[property]) === "undefined") || (property === null)) { if (property === "elementID") { ad.elementID = this.setElementID(ad); } else { ad[property] = this.defaults[property]; } } } if ($('#' + ad.elementID).length === 0) { var $bannerContainer = $('<div>', { "id": ad.elementID }), $body = $('body'); //Inject container to the defined position if ((ad.placement === "top")||(ad.placement === "bottom")) { $bannerContainer.html('<div class="row"><div class="col-lg-12 col-lg-12 col-lg-12 col-lg-12"></div></div>') } if (ad.placement === "top") { var $bannerContainerWrapper = $('<div>', { "class": "banner-ad-top-wrapper" }); $bannerContainer.addClass('banner-ad-top container-fluid hidden') $bannerContainerWrapper.append($bannerContainer); $body.prepend($bannerContainerWrapper); } else if (ad.placement === "bottom") { if (this.$globalfooter.length > 0) { $bannerContainer.insertBefore(this.$globalfooter); } else { $body.append($bannerContainer); } $bannerContainer.addClass('banner-ad-bottom container-fluid hidden') } else if (ad.placement !== null) { //Only support top and bottom as placements... continue; } else { //Neither element ID has been defined nor the placement in the document //Something is wrong - ignore it! continue; } } //Insert the ad in the defined target element win.AdServ.adspaces.push({ "id": ad.adID, "keyword": ad.keyword, "target": ad.elementID, "adIndex": i, "onload": this.onload.bind(this) }); } }, onload: function (options, vars) { if ((typeof (options) !== "undefined") && (typeof (vars) !== "undefined")) { if ((typeof (options.banner) !== "undefined") && typeof (vars.adIndex) !== "undefined") { var ad = this.ads[vars.adIndex]; if (typeof (ad) !== "undefined") { var $elementID = $('#' + ad.elementID); if ($elementID.length > 0) { if ($elementID.css('display') === "none") { $elementID.css('display', 'block'); } if (ad.placement === "top") { $elementID.removeClass('hidden'); } else if (ad.placement === "bottom") { $elementID.removeClass('hidden'); } } } } } } }; return { initialize: function () { drBannerAds.initialize(); } }; }); })(window);
"use strict"; var __assign = (this && this.__assign) || Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; return t; }; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spread = (this && this.__spread) || function () { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; }; var _this = this; Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var ReactDOM = require("react-dom"); var refluent_1 = require("refluent"); var common_1 = require("common"); var elmnt_1 = require("elmnt"); var deepEqual = require("deep-equal"); var utils_1 = require("../../../utils"); var d3_1 = require("./d3"); var dataToRows_1 = require("./dataToRows"); var isolate_1 = require("./isolate"); exports.default = refluent_1.default .do(utils_1.restyle(function (style) { var _a, _b; var base = (_a = style .mergeKeys('data') .defaults({ fontStyle: 'normal', fontWeight: 'normal' }) .scale({ paddingTop: { paddingTop: 1, fontSize: 0.5, lineHeight: -0.5 }, paddingBottom: { paddingBottom: 1, fontSize: 0.5, lineHeight: -0.5, }, })).filter.apply(_a, __spread(elmnt_1.css.groups.text, ['padding', 'border', 'background', 'maxWidth'])).merge({ position: 'relative', verticalAlign: 'top', whiteSpace: 'pre-wrap', wordBreak: 'break-word', }); return { base: base, null: base.mergeKeys('null'), empty: base.mergeKeys('empty'), fileLink: (_b = base.mergeKeys('fileLink')).filter.apply(_b, __spread(elmnt_1.css.groups.text)), changed: base.mergeKeys('changed'), input: style .mergeKeys('data', 'input') .scale({ maxWidth: { maxWidth: 1, borderLeftWidth: 1 } }) .merge({ zIndex: 200 }), }; })) .do('context', 'query', 'data', function (context, query, data) { return ({ dataRows: dataToRows_1.default(context, query, data), }); }) .do('context', function (context, push) { return context.store.listen('editing', function (editing) { if (editing === void 0) { editing = {}; } return push({ isEditing: !!editing.key }); }); }) .do('context', function (context, push) { return context.store.listen('unchanged', function (unchanged) { if (unchanged === void 0) { unchanged = {}; } return push({ unchanged: unchanged }); }); }) .yield(isolate_1.default(function (elem, props$) { var Input = props$().context.input; var startEditing = function (key, value) { props$().context.store.set('editing', { key: key, value: value }); props$().context.store.update('unchanged', function (unchanged) { if (unchanged === void 0) { unchanged = {}; } var _a; return (__assign({}, unchanged, (unchanged[key] === undefined ? (_a = {}, _a[key] = value, _a) : {}))); }); }; var stopEditing = function (invalid) { var _a = props$().context.store.get('editing'), key = _a.key, value = _a.value; props$().context.store.set('editing', {}); props$().context.store.update('unchanged', function (_a) { var _b = key, v = _a[_b], unchanged = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]); var _c; if (deepEqual(v, value, { strict: true }) || invalid) { common_1.root.rgo.set({ key: key.split('.'), value: undefined }); return unchanged; } common_1.root.rgo.set({ key: key.split('.'), value: value }); return __assign({}, unchanged, (_c = {}, _c[key] = v, _c)); }); }; var inputRef = null; var unlisten = props$().context.store.listen('editing', function (editing) { if (editing === void 0) { editing = {}; } if (editing.key) { var splitKey = editing.key.split('.'); var elems = elem.querySelectorAll("[data-key='" + editing.key + "']"); for (var i = 0; i < elems.length; i++) { if (elems[i] !== inputRef) { elems[i].textContent = props$().context.config.printValue(editing.value, common_1.root.rgo.schema[splitKey[0]][splitKey[2]]); } } } }); props$('context', 'dataRows', 'style', 'isEditing', 'unchanged', function (context, dataRows, style, _, unchanged) { var editing = context.store.get('editing') || {}; var rows = d3_1.default .select(elem) .selectAll('tr') .data(__spread(dataRows)); rows .exit() .selectAll('td') .each(function () { ReactDOM.unmountComponentAtNode(this); }); rows.exit().remove(); var allRows = rows .enter() .append('tr') .merge(rows); var cells = allRows.selectAll('td').data(function (d) { return d; }); cells .exit() .each(function () { ReactDOM.unmountComponentAtNode(this); }) .remove(); var allCells = cells .enter() .append('td') .merge(cells) .datum(function (d) { return (__assign({}, d, { style: inputRef !== _this && Object.keys(unchanged).includes(d.key) ? 'changed' : d.empty ? 'empty' : d.field.startsWith('#') || d.value === null ? 'null' : 'base' })); }) .style(function (d) { return style[d.style]; }) .style(function (d) { return ({ borderTopWidth: (!d.first ? 1 : 0) * style.base.borderTopWidth, borderBottomWidth: 0, borderLeftWidth: ((!d.firstCol && (d.field === '#1' ? 2 : 1)) || 0) * style.base.borderLeftWidth, borderRightWidth: ((!d.lastCol && d.field === '#2' && 1) || 0) * style.base.borderRightWidth, }); }) .attr('rowspan', function (d) { return d.span; }) .attr('data-key', function (d) { return d.key; }); allCells .filter(function (_a) { var key = _a.key; return key; }) .style({ cursor: 'pointer' }) .on('mouseenter', function (d) { var s = style[d.style]; this.style.background = (s.hover && s.hover.background) || s.background; }) .on('mouseleave', function (d) { this.style.background = style[d.style].background; }) .on('dblclick', function (_a) { var key = _a.key, value = _a.value; startEditing(key, value); inputRef = this; }) .each(function (_a) { var _this = this; var type = _a.type, field = _a.field, key = _a.key, text = _a.text; if (inputRef === this) { this.style.padding = null; ReactDOM.render(React.createElement(Input, { context: context, dataKey: key.split('.'), onBlur: function (invalid) { stopEditing(invalid); if (inputRef === _this) inputRef = null; }, inputRef: function (elem) { if (elem && inputRef === _this) elem.focus(); }, style: style.input }), this); } else { ReactDOM.unmountComponentAtNode(this); if (editing.key === key) { this.textContent = context.config.printValue(editing.value, common_1.root.rgo.schema[type][field]); } else { this.textContent = text; } } }); allCells .filter(function (_a) { var key = _a.key; return !key; }) .style({ cursor: null }) .on('mouseenter', null) .on('mouseleave', null) .on('dblclick', null) .each(function (_a) { var text = _a.text, link = _a.link; ReactDOM.unmountComponentAtNode(this); this.textContent = link ? '' : text; if (link) { var a = document.createElement('a'); a.textContent = text; a.href = link; a.target = '_blank'; d3_1.applyStyle(a, style.fileLink); this.appendChild(a); } }); context.updateWidths(); }); return function () { unlisten(); d3_1.default.select(elem) .selectAll('tr') .selectAll('td') .each(function () { ReactDOM.unmountComponentAtNode(this); }); }; }, 'tbody'));
import React from "react"; // components export default function CardSocialTraffic() { return ( <> <div className="relative flex flex-col min-w-0 break-words bg-white w-full mb-6 shadow-lg rounded"> <div className="rounded-t mb-0 px-4 py-3 border-0"> <div className="flex flex-wrap items-center"> <div className="relative w-full px-4 max-w-full flex-grow flex-1"> <h3 className="font-semibold text-base text-gray-800"> Recent Events </h3> </div> <div className="relative w-full px-4 max-w-full flex-grow flex-1 text-right"> <button className="bg-indigo-500 text-white active:bg-indigo-600 text-xs font-bold uppercase px-3 py-1 rounded outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150" type="button" > See all </button> </div> </div> </div> <div className="block w-full overflow-x-auto"> {/* Projects table */} <table className="items-center w-full bg-transparent border-collapse"> <thead className="thead-light"> <tr> <th className="px-6 bg-gray-100 text-gray-600 align-middle border border-solid border-gray-200 py-3 text-xs uppercase border-l-0 border-r-0 whitespace-no-wrap font-semibold text-left"> Event </th> <th className="px-6 bg-gray-100 text-gray-600 align-middle border border-solid border-gray-200 py-3 text-xs uppercase border-l-0 border-r-0 whitespace-no-wrap font-semibold text-left"> Date </th> <th className="px-6 bg-gray-100 text-gray-600 align-middle border border-solid border-gray-200 py-3 text-xs uppercase border-l-0 border-r-0 whitespace-no-wrap font-semibold text-left min-w-140-px"></th> </tr> </thead> <tbody> <tr> <th className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4 text-left"> Codeforces Round #695 </th> <td className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4"> 28 hours ago </td> </tr> <tr> <th className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4 text-left"> Codeforces Round #694 </th> <td className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4"> Jan 5, 2021 </td> </tr> <tr> <th className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4 text-left"> Codeforces Round #693 </th> <td className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4"> Dec 5, 2020 </td> {/* <td className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4"> <div className="flex items-center"> <span className="mr-2">80%</span> <div className="relative w-full"> <div className="overflow-hidden h-2 text-xs flex rounded bg-purple-200"> <div style={{ width: "80%" }} className="shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-purple-500" ></div> </div> </div> </div> </td> */} </tr> <tr> <th className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4 text-left"> Codeforces Round #692 </th> <td className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4"> Nov 5, 2020 </td> </tr> <tr> <th className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4 text-left"> Codeforces Round #691 </th> <td className="border-t-0 px-6 align-middle border-l-0 border-r-0 text-xs whitespace-no-wrap p-4"> Oct 5, 2020 </td> </tr> </tbody> </table> </div> </div> </> ); }
/** * author: Chris Holle * file: meridianTheme.js * * Description: * Meridian theme. Contains colors and other branding. */ let meridianTheme = { primary: "#55c7b1", secondary: "#3a9483", } export default meridianTheme
'use strict'; module.exports = { up: function(queryInterface, Sequelize) { return queryInterface.bulkInsert('Rooms', [{ number: 200, available: true, capacity: 200, createdAt: new Date(), updatedAt: new Date() }, { number: 325, available: false, capacity: 150, createdAt: new Date(), updatedAt: new Date() }, { number: 100, available: true, capacity: 30, createdAt: new Date(), updatedAt: new Date() }, { number: 500, available: false, capacity: 48, createdAt: new Date(), updatedAt: new Date() }]) }, down: function(queryInterface, Sequelize) { return queryInterface.bulkDelete('Rooms', null, {}); } };
/* * moveWarehouseUpcSwapController.js * * Copyright (c) 2016 HEB * All rights reserved. * * This software is the confidential and proprietary information * of HEB. */ 'use strict'; /** * Controller to support the page that allows users to move a warehouse upc to a new item code. * * @author m314029 * @since 2.0.4 */ (function(){ angular.module('productMaintenanceUiApp').controller('MoveWarehouseUpcSwapController', moveWarehouseUpcSwapController); moveWarehouseUpcSwapController.$inject = ['UpcSwapApi', 'ProductInfoService', '$scope', '$timeout']; function moveWarehouseUpcSwapController(upcSwapApi, productInfoService, $scope, $timeout){ var self = this; /** * The list of upcSwaps to send to back end. * * @type {Array} */ self.upcSwapList = []; /** * The error message to display. * * @type {String} */ self.error = null; /** * The variable to keep track of whether user has typed in any information or not. * * @type {Boolean} */ self.hasUpcSwapRecord = false; /** * Keeps track of whether user is looking at upc swap information after and update. * * @type {boolean} */ self.showAfterUpdate = false; /** * Keeps track of whether front end is waiting for back end response. * * @type {boolean} */ self.isWaitingForResponse = false; /** * Keeps track of whether a source has an error message. * * @type {boolean} */ self.hasSourceError = false; /** * Keeps track of whether a destination has an error message. * * @type {boolean} */ self.hasDestinationError = false; /** * Contains the list of error upc swaps so user can see errors and description. * * @type {Array} */ self.errorResultList = []; /** * Contains options for what to send when source upc is the primary UPC. * * @type {[*]} */ self.whatToSendList = [ {name: "Just primary", id: "JUST_PRIMARY"}, {name: "Primary and associates", id: "PRIMARY_AND_ASSOCIATES"}, {name: "Just associates", id: "JUST_ASSOCIATES"}]; /** * Wheter or not the screen is only showing one row of swaps. * * @type {boolean} */ self.showingSingleRow = false; /** * Select all option for choose Associates. * @type {string} */ self.selectAllOption = "Select All"; /** * Initialize the controller. */ self.init = function(){ self.addEmptyDataRow(); productInfoService.hide(); }; /** * Clear all datas that user entered or the system generated. */ self.clearData = function(){ self.upcSwapList = []; self.init(); self.showAfterUpdate =false; }; /** * This function is used to check datas are null or not. * * @returns {boolean} */ self.isEmptyData = function(){ for (var i = 0; i < self.upcSwapList.length; i++) { if ((self.upcSwapList[i].sourceUpc != null && self.upcSwapList[i].sourceUpc != undefined) || (self.upcSwapList[i].source != null && self.upcSwapList[i].source != undefined) || (self.isViewingProductInfo() == true) ){ return false; }else if(self.upcSwapList[i].destination != null && self.upcSwapList[i].destination != undefined){ if(self.upcSwapList[i].destination.itemCode != null && self.upcSwapList[i].destination.itemCode != undefined){ return false; } } } return true; }; /** * Function that figures out whether or not to show the swap panel at the top. * * @returns {boolean} True to show the panel and false otherwise. */ self.showSwapPanel = function() { // If the update panel is showing, then don't show the swap panel. if (self.showAfterUpdate) { return false; } // If there is only one product showing, always show the panel. if (self.showingSingleRow) { return true; } // If there is more than one row of data, look to see if they've clicked on the product to // show the panel if (self.isViewingProductInfo()) { return false; } // Any other state, show the panel. return true; }; /* * Functions related to setting upc or item code data dynamically from user input. */ /** * Set the upc column in the table dynamically when the user has entered more than one upc in a text field. * * @param inputIndex index of input that is sending the upc. * @param IEclipData Internet Explorer clipboard data. */ self.setUpcDataRows = function(inputIndex, IEclipData){ self.resetDefaultValues(); self.hasUpcSwapRecord = true; var swap = self.upcSwapList[inputIndex]; swap = self.resetRecord(swap); self.upcSwapList[inputIndex] = swap; if(swap.sourceUpc == null && IEclipData == null){ return; } var textSplit; // if internet explorer paste event if(IEclipData != null) { textSplit = IEclipData; } else { textSplit = swap.sourceUpc.split(/[\s,]+/); } var focusUpc = 0; if(textSplit.length > 1){ swap.sourceUpc = textSplit[0]; var firstData = null; if(IEclipData){ firstData = textSplit[0]; } self.upcSwapList[inputIndex] = swap; for(var index = 1; index < textSplit.length; index++){ focusUpc = index + inputIndex; // insert upc into existing data row if(self.upcSwapList.length > (focusUpc)) { self.upcSwapList[focusUpc].sourceUpc = textSplit[index]; self.upcSwapList[focusUpc] = self.resetRecord(self.upcSwapList[focusUpc]); } // create a new data row else { self.upcSwapList.push({sourceUpc: textSplit[index]}); } } // sets focus on last upc updated after angular renders it (null pointer otherwise) $timeout(function(){ $scope.$evalAsync(function() { if(firstData){ self.upcSwapList[inputIndex].sourceUpc = firstData; } document.getElementById("upc" + focusUpc).focus(); }); }); } }; /** * Gets the upc data in the correct format when pasted for IE. * @param index */ self.setUpcDataRowsPaste = function(index) { if(window.clipboardData != null) { var clipData = window.clipboardData.getData('Text'); clipData.replace(/(\s)/g, " "); clipData = self.removeEmptyValuesFromArray(clipData.split(/[\s,]+/)); self.setUpcDataRows(index, clipData); } }; /** * Set the newItemCode column in the table dynamically when the user has entered more than one item code in a text field. * * @param inputIndex index of input that is sending the item code. * @param IEclipData Internet Explorer clipboard data. */ self.setItemCodeDataRows = function(inputIndex, IEclipData){ self.resetDefaultValues(); self.hasUpcSwapRecord = true; var swap = self.upcSwapList[inputIndex]; swap = self.resetRecord(swap); self.upcSwapList[inputIndex] = swap; if(swap.destination == null && IEclipData == null){ return; } var textSplit; // if internet explorer paste event if(IEclipData != null) { textSplit = IEclipData; } else { textSplit = swap.destination.itemCode.split(/[\s,]+/); } var focusItemCode = 0; if(textSplit.length > 1){ swap.destination.itemCode = textSplit[0]; var firstData = null; if(IEclipData){ firstData = textSplit[0]; } self.upcSwapList[inputIndex] = swap; for(var index = 1; index < textSplit.length; index++){ focusItemCode = index + inputIndex; // insert upc into existing data row if(self.upcSwapList.length > (focusItemCode)) { if(self.upcSwapList[focusItemCode].destination != null){ self.upcSwapList[focusItemCode].destination.itemCode = textSplit[index]; } else { self.upcSwapList[focusItemCode].destination = {itemCode: textSplit[index]}; } self.upcSwapList[focusItemCode] = self.resetRecord(self.upcSwapList[focusItemCode]); } // create a new data row else { self.upcSwapList.push({destination: { itemCode: textSplit[index]}}); } } // sets focus on last item code updated after angular renders it (null pointer otherwise) $timeout(function() { $scope.$evalAsync(function() { if(firstData){ self.upcSwapList[inputIndex].destination.itemCode = firstData; } document.getElementById("newItemCode" + focusItemCode).focus(); }); }); } }; /** * Gets the upc data in the correct format when pasted for IE. * @param index */ self.setItemCodeDataRowsPaste = function(index) { if(window.clipboardData != null) { var clipData = window.clipboardData.getData('Text'); clipData.replace(/(\s)/g, " "); clipData = self.removeEmptyValuesFromArray(clipData.split(/[\s,]+/)); self.setItemCodeDataRows(index, clipData); } }; /** * Remove any element from array that should be treated as empty. {This method needed to be added for * internet explorer to show expected behavior} * * @param arrayToInspect array to inspect for empty elements * @returns {Array} */ self.removeEmptyValuesFromArray = function (arrayToInspect) { var currentElement; var arrayToReturn = []; for(var index = 0; index < arrayToInspect.length; index++){ currentElement = arrayToInspect[index]; if(currentElement == null || currentElement == undefined || currentElement == ""){ continue; } arrayToReturn.push(currentElement); } return arrayToReturn; }; /* * Functions related to adding, modifying, and deleting array rows. */ /** * Add an empty row to the upc swap array. */ self.addEmptyDataRow = function(){ self.resetDefaultValues(); self.upcSwapList.push({}); }; /** * Delete the selected index from the upc swap array. * * @param index The index to delete. */ self.removeDataRow = function(index){ self.resetDefaultValues(); self.upcSwapList.splice(index, 1); }; /** * Resets data row when source upc or destination item code changes. * * @param upcSwap The record to reset. */ self.resetRecord = function (upcSwap) { var resetUpcSwap = {}; var sourceUpc = upcSwap.sourceUpc == "" ? null : upcSwap.sourceUpc; var destinationItemCode = (upcSwap.destination != null && upcSwap.destination.itemCode != null) ? upcSwap.destination.itemCode == "" ? null : upcSwap.destination.itemCode : null; resetUpcSwap.sourceUpc = sourceUpc; if(destinationItemCode != null) { resetUpcSwap.destination ={itemCode: destinationItemCode}; } else { resetUpcSwap.destination = {}; } return resetUpcSwap; }; /** * This method resets all information in a data record for a upc swap with errors except: * source: upc + error if there is one * destination: item code + error if there is one * so that it is easy to see what went wrong and where. * * @param upcSwap Upc swap with errors. */ self.resetErrorDataRecord = function(upcSwap){ // if the upcSwap source side had an error if (upcSwap.source != null && upcSwap.source.errorMessage != null) { self.hasSourceError = true; } // if the upcSwap destination side had an error if (upcSwap.destination != null && upcSwap.destination.errorMessage != null) { self.hasDestinationError = true; } // set fields to null so user has to refetch data before submitting upcSwap.sourcePrimaryUpc = null; upcSwap.selectSourcePrimaryUpc = null; if(upcSwap.source != null) { upcSwap.source.productId = null; upcSwap.source.itemCode = null; upcSwap.source.itemDescription = null; upcSwap.source.balanceOnHand = null; upcSwap.source.balanceOnOrder = null; upcSwap.source.onLiveOrPendingPog = null; upcSwap.source.productRetailLink = null; upcSwap.source.onUpcomingDelivery = null; upcSwap.source.purchaseOrderDisplayText = null; } upcSwap.destinationPrimaryUpc = null; upcSwap.makeDestinationPrimaryUpc = null; if(upcSwap.destination != null) { upcSwap.destination.productId = null; upcSwap.destination.itemDescription = null; upcSwap.destination.balanceOnHand = null; upcSwap.destination.balanceOnOrder = null; upcSwap.destination.onLiveOrPendingPog = null; upcSwap.destination.productRetailLink = null; upcSwap.destination.onUpcomingDelivery = null; upcSwap.destination.purchaseOrderDisplayText = null; } }; /* * Functions related to upc swap. */ /** * Get the details of the upc('s) and item code('s) selected. */ self.getWarehouseUpcSwapDetails = function(){ self.resetDefaultValues(); productInfoService.hide(); var upcList = []; var itemCodeList = []; var foundData = false; var upcSwap; for(var index in self.upcSwapList){ upcSwap = self.upcSwapList[index]; if(!self.isEmptyRecord(upcSwap)){ foundData = true; upcList.push(upcSwap.sourceUpc); itemCodeList.push(upcSwap.destination.itemCode); } else if(!$scope.isEmptyString(upcSwap.sourceUpc) && upcSwap.destination != null && $scope.isEmptyString(upcSwap.destination.itemCode)){ self.fetchError({data: {message: "Please select an item code for upc " + upcSwap.sourceUpc + "."}}); return; } else if(upcSwap.destination != null && !$scope.isEmptyString(upcSwap.destination.itemCode) && $scope.isEmptyString(upcSwap.sourceUpc)){ self.fetchError({data: {message: "Please select a upc for item code " + upcSwap.destination.itemCode + "."}}); return; } } if(!foundData){ self.fetchError(({data: {message: "Please enter upc and item code before submitting request."}})); return; } if(upcList.length > 0) { upcSwapApi.getWarehouseMoveUpcSwapsDetails({upcList: upcList, itemCodeList: itemCodeList}, self.setUpcSwapDetails, self.fetchError); } }; /** * Submit a warehouse upc swap. */ self.submitWarehouseUpcSwap = function(){ self.resetDefaultValues(); var upcSwapList = []; var upcSwap; for(var index in self.upcSwapList){ upcSwap = angular.copy(self.upcSwapList[index]); if(!self.isEmptyRecord(upcSwap)){ // user has already fetched data and if(self.alreadyFetchedDetails(upcSwap) && // upc is not primary (!upcSwap.sourcePrimaryUpc || // upc is primary, and is only associated upc of current item code (upcSwap.sourcePrimaryUpc && !self.hasSelectPrimaryList(upcSwap)) || // upc is primary, and user has selected a replacement primary (upcSwap.sourcePrimaryUpc && (upcSwap.selectSourcePrimaryUpc != null || upcSwap.primarySelectOption == 'JUST_ASSOCIATES') && (upcSwap.primarySelectOption == 'JUST_PRIMARY' || (upcSwap.additionalUpcList != undefined && additionalUpcList.additionalUpcList != null))))) { //remove select all option of associated upc list before update self.handleSelectAllOption(true, upcSwap.source.associatedUpcList); upcSwapList.push(upcSwap); } //a selected upc is a primary, and the user has not selected a associate upc else if(self.alreadyFetchedDetails(upcSwap) && upcSwap.sourcePrimaryUpc && (upcSwap.selectSourcePrimaryUpc != null || upcSwap.primarySelectOption == 'JUST_ASSOCIATES') && (upcSwap.primarySelectOption != 'JUST_PRIMARY' && upcSwap.additionalUpcList === undefined || upcSwap.additionalUpcList === null)){ self.fetchError({data: {message: "Please select the list of associate upc for item code: " + upcSwap.source.itemCode + "."}}); return; } // a selected upc is a primary, and the user has not selected a replacement primary upc else if(self.alreadyFetchedDetails(upcSwap) && upcSwap.sourcePrimaryUpc && upcSwap.selectSourcePrimaryUpc == null){ self.fetchError({data: {message: "You must first select a new primary upc for item code: " + upcSwap.source.itemCode + "."}}); return; } // user needs to fetch details first else { self.fetchError({data: {message: "You must first fetch details for upc " + upcSwap.sourceUpc + ", and item code " + upcSwap.destination.itemCode + "."}}); return; } } else if(!$scope.isEmptyString(upcSwap.sourceUpc) && upcSwap.destination != null && $scope.isEmptyString(upcSwap.destination.itemCode)){ self.fetchError({data: {message: "Please select an item code for upc " + upcSwap.sourceUpc + "."}}); return; } else if(upcSwap.destination != null && !$scope.isEmptyString(upcSwap.destination.itemCode) && $scope.isEmptyString(upcSwap.sourceUpc)){ self.fetchError({data: {message: "Please select a upc for item code " + upcSwap.destination.itemCode + "."}}); return; } } if(upcSwapList.length > 0) { self.isWaitingForResponse = true; upcSwapApi.submitWarehouseMoveUpcSwaps(upcSwapList, self.setUpcSwapSuccess, self.fetchError); } }; /** * This method gets the list to display upc swaps that had application caught errors after submitting a * set of upc swaps. If there were no errors, the list will be empty. This is done because the * application returns two types of upc swaps -- results and errors. * * @param results Complete list of upc swap results after submitting a set of upc swaps. * @returns {Array} */ self.getErrorList = function(results){ var upcSwapErrorList = []; var upcSwap; for(var index = 0; index < results.length; index++){ upcSwap = angular.copy(results[index]); // if the upcSwap source or destination side has an error if(upcSwap.errorFound) { self.resetErrorDataRecord(upcSwap); upcSwapErrorList.push(upcSwap); } } return upcSwapErrorList; }; /* * Functions related to retrieving product information. */ /** * Shows the panel that contains product detail information. * * @param productId The product ID of the product to show. * @param comparisonProductId The product ID of the product to put into the comparison pane * of the product info screen. */ self.showProductInfo = function(productId, comparisonProductId){ self.resetDefaultValues(); productInfoService.show(self, productId, comparisonProductId); }; /* * State related functions. */ /** * Returns whether or not the data row has fetched the details from the back end. * * @param upcSwapRecord data row to look at * @returns {boolean} */ self.alreadyFetchedDetails = function(upcSwapRecord){ return (upcSwapRecord != null && upcSwapRecord.errorFound == false); }; /** * Returns whether or not the data row has a list of associated UPCs. * * @param upcSwapRecord data row to look at * @returns {boolean} */ self.hasSelectPrimaryList = function(upcSwapRecord){ return (upcSwapRecord != null && upcSwapRecord.source != null && upcSwapRecord.source.associatedUpcList != null && upcSwapRecord.source.associatedUpcList.length > 0); }; /** * Returns whether or not data row is empty of required information (source upc and destination item code) * * @param upcSwapRecord * @returns {boolean} */ self.isEmptyRecord = function(upcSwapRecord){ return !(upcSwapRecord != null && !$scope.isEmptyString(upcSwapRecord.sourceUpc) && upcSwapRecord.destination != null && !$scope.isEmptyString(upcSwapRecord.destination.itemCode)); }; /** * Closes the view for upc swap submission details. */ self.closePage = function(){ self.showAfterUpdate = false; self.upcSwapList = self.errorResultList; if(self.upcSwapList.length == 0) { self.hasUpcSwapRecord = false; self.addEmptyDataRow(); } }; /** * Returns whether or not the user is currently viewing product information. * * @returns {boolean} True if the user is viewing product information and false otherwise. */ self.isViewingProductInfo = function(){ return productInfoService.isVisible(); }; /** * Resets default values for this controller */ self.resetDefaultValues = function(){ self.error = null; self.hasSourceError = false; self.hasDestinationError = false; }; /* * Callbacks. */ /** * Callback for when there is an error returned from the server. * * @param error The error from the server. */ self.fetchError = function(error){ self.isWaitingForResponse = false; if (error && error.data) { if (error.data.message && error.data.message != "") { self.error = error.data.message; } else { self.error = error.data.error; } } else { self.error = "An unknown error occurred."; } }; /** * Callback for when there is a successful return after requesting the details for a upc swap. * * @param results The results from the server. */ self.setUpcSwapDetails = function(results){ var upcSwapList = []; var upcSwap; var errorFound = false; for(var index = 0; index < results.data.length; index++){ upcSwap = results.data[index]; // if the upcSwap source or destination side has an error if(upcSwap.errorFound) { errorFound = true; self.resetErrorDataRecord(upcSwap); } else { upcSwap.sourceInformation = formatSwapInformation(upcSwap.source); upcSwap.destinationInformation = formatSwapInformation(upcSwap.destination); //add select all option to the first list associated UPC if(upcSwap.source != undefined && upcSwap.source.associatedUpcList != undefined && upcSwap.source.associatedUpcList.length >0){ upcSwap.source.associatedUpcList.splice(0, 0, self.selectAllOption); } } upcSwapList.push(upcSwap); } self.upcSwapList = upcSwapList; // If the user is only looking at one row, go ahead and show the product details page. if (results.data.length == 1 && !errorFound) { self.showingSingleRow = true; self.showProductInfo(results.data[0].source.productId, results.data[0].destination.productId); } else { self.showingSingleRow = false; } }; /** * Callback for when there is a successful return after submitting a upc swap. * * @param results The results from the server. */ self.setUpcSwapSuccess = function(results){ self.isWaitingForResponse = false; self.afterUpdateList = results.data; self.errorResultList = self.getErrorList(results.data); self.showAfterUpdate = true; productInfoService.hide(); }; /** * Set the associated upc list to what is left to pick from in the selectize dropdown. * * @param upcSwap upc swap object you are modifying * @param select selectize dropdown being used * @param item item selected * @param addToList whether item needs to be added to the list or not */ self.setAssociateListToSelectize = function(upcSwap, select, item, addToList){ if(item === self.selectAllOption){ self.handleSelectAllOption(true, upcSwap.additionalUpcList); upcSwap.source.associatedUpcList.forEach(function (value) { if(value !== self.selectAllOption){ upcSwap.additionalUpcList.push(value); } }); upcSwap.source.associatedUpcList = []; }else{ if(addToList){ if(item == upcSwap.makeDestinationPrimaryUpcSelected){ upcSwap.makeDestinationPrimaryUpcSelected = null; } if(select.$select.items === [] || select.$select.items.length === 0){ select.$select.items.push(self.selectAllOption); } select.$select.items.push(item); } select.$select.items.sort( function(firstNumber, secondNumber){return parseInt(firstNumber) - parseInt(secondNumber)} ); upcSwap.source.associatedUpcList = select.$select.items; if(upcSwap.source.associatedUpcList !== null && upcSwap.source.associatedUpcList.length === 1){ self.handleSelectAllOption(true, upcSwap.source.associatedUpcList); } } }; /** * Set available options in make primary list. * * @param upcSwap current upc swap * @param select select dropdown that shows options * @param item upc to add/ remove from primary list */ self.setAvailablePrimaryList = function(upcSwap, select, item){ if(upcSwap.previousSelectedSourcePrimaryUpc){ select.$select.items.push(upcSwap.previousSelectedSourcePrimaryUpc); } upcSwap.previousSelectedSourcePrimaryUpc = item; if(item) { select.$select.items.splice(select.$select.items.indexOf(item), 1); } select.$select.items.sort( function(firstNumber, secondNumber){return parseInt(firstNumber) - parseInt(secondNumber)} ); upcSwap.source.associatedUpcList = select.$select.items; self.handleSelectAllOption(false, upcSwap.source.associatedUpcList); }; /** * Helper method to return if already fetched details and is source primary upc. * * @param upcSwap current upc swap * @returns {boolean} */ self.isDetailsFetchedAndPrimary = function (upcSwap) { return upcSwap.sourcePrimaryUpc && self.alreadyFetchedDetails(upcSwap); }; /** * Refresh drop-downs after user changes their primary select option choice for a upc swap that is primary. * * @param upcSwap current upc swap */ self.refreshSelectize = function(upcSwap){ upcSwap.makeDestinationPrimaryUpcSelected = null; if(upcSwap.primarySelectOption == "JUST_PRIMARY"){ if(upcSwap.additionalUpcList) { upcSwap.additionalUpcList.forEach(function (currentValue) { upcSwap.source.associatedUpcList.splice(0, 0, currentValue); }); upcSwap.source.associatedUpcList.sort( function(firstNumber, secondNumber){return parseInt(firstNumber) - parseInt(secondNumber)} ); } upcSwap.additionalUpcList = []; } else if(upcSwap.primarySelectOption == "JUST_ASSOCIATES"){ upcSwap.previousSelectedSourcePrimaryUpc = null; if(upcSwap.selectSourcePrimaryUpc){ upcSwap.source.associatedUpcList.splice(0, 0, upcSwap.selectSourcePrimaryUpc); upcSwap.selectSourcePrimaryUpc = null; } } else if(upcSwap.primarySelectOption == "PRIMARY_AND_ASSOCIATES"){ if(upcSwap.selectSourcePrimaryUpc && upcSwap.source.associatedUpcList !== undefined && upcSwap.source.associatedUpcList.length > 0 && upcSwap.source.associatedUpcList.indexOf(upcSwap.selectSourcePrimaryUpc) >= 0){ upcSwap.source.associatedUpcList.splice(upcSwap.source.associatedUpcList.indexOf(upcSwap.selectSourcePrimaryUpc),1); } } self.handleSelectAllOption(true,upcSwap.source.associatedUpcList); self.handleSelectAllOption(false,upcSwap.source.associatedUpcList); }; /** * Returns true if user should see 'Pre-digit 4' in 'Future Primary' column; false otherwise. * * @param upcSwap * @returns {boolean} */ self.showPreDigitFour = function (upcSwap) { return self.isDetailsFetchedAndPrimary(upcSwap) && (upcSwap.primarySelectOption == 'PRIMARY_AND_ASSOCIATES' && upcSwap.source.associatedUpcList.length == 0 && !upcSwap.selectSourcePrimaryUpc) || upcSwap.primarySelectOption == 'JUST_PRIMARY' && (!upcSwap.selectSourcePrimaryUpc && upcSwap.source.associatedUpcList.length == 0); }; /** * Returns true if user should select a source primary upc in 'Future Primary' column, false otherwise. * * @param upcSwap current upc swap * @returns {boolean} */ self.showSelectSourcePrimary = function (upcSwap) { return self.isDetailsFetchedAndPrimary(upcSwap) && (upcSwap.primarySelectOption == 'PRIMARY_AND_ASSOCIATES' && (upcSwap.selectSourcePrimaryUpc || upcSwap.source.associatedUpcList.length != 0))|| (upcSwap.primarySelectOption == 'JUST_PRIMARY' && (upcSwap.selectSourcePrimaryUpc || upcSwap.source.associatedUpcList.length != 0)); }; /** * Returns available future primary list. * * @param upcSwap current upc swap * @returns {Array} */ self.getAvailableFuturePrimaryList = function (upcSwap) { var returnArray = []; if(upcSwap.sourcePrimaryUpc){ var index; switch (upcSwap.primarySelectOption){ case 'JUST_PRIMARY': { returnArray.push(upcSwap.sourceUpc); break; } case 'PRIMARY_AND_ASSOCIATES': { returnArray.push(upcSwap.sourceUpc); if(upcSwap.additionalUpcList) { for (index = 0; index < upcSwap.additionalUpcList.length; index++) { returnArray.push(upcSwap.additionalUpcList[index]); } } break; } case 'JUST_ASSOCIATES': { if(upcSwap.additionalUpcList) { for (index = 0; index < upcSwap.additionalUpcList.length; index++) { returnArray.push(upcSwap.additionalUpcList[index]); } } break; } } } else { returnArray.push(upcSwap.sourceUpc); } returnArray.sort( function(firstNumber, secondNumber){return parseInt(firstNumber) - parseInt(secondNumber)} ); return returnArray; }; /** * Returns true if all upc swap records have already fetched details. * * @returns {boolean} */ self.alreadyFetchedAllDetails = function () { for(var index = 0; index < self.upcSwapList.length; index++){ if(!self.alreadyFetchedDetails(self.upcSwapList[index])){ return false; } } return true; }; /** * Handle select all option in associated upc list. If remove switch is true, it mean remove select all * option out of the list of upc associated. Else add select all option in the list of upc associated. * @param remove * @param associatedUpcList */ self.handleSelectAllOption = function (remove, associatedUpcList) { if(associatedUpcList !== undefined && associatedUpcList !== null){ if(remove){ if(associatedUpcList.indexOf(self.selectAllOption) >= 0){ associatedUpcList.splice(associatedUpcList.indexOf(self.selectAllOption),1); } }else if(associatedUpcList.length > 0){ associatedUpcList.splice(0,0,self.selectAllOption); } } } /** * Return the list of associated upc list. The list has been remove select all option. * @param associatedUpcList */ self.associatedUPCsNoneSelectAllOption = function (associatedUpcList) { var associatedUpcListRet = angular.copy(associatedUpcList); if(associatedUpcListRet !== undefined && associatedUpcListRet !== null && associatedUpcListRet.indexOf(self.selectAllOption) >= 0){ associatedUpcListRet.splice(associatedUpcListRet.indexOf(self.selectAllOption),1); } return associatedUpcListRet; } } })();
import angular from 'angular' import Graph from '../../../egraph/src/graph' import graphDirective from "../directives/graph" const modName = 'ece.directives.example3'; const template = ` <div ng-repeat="graph in example3.graphs"> <graph graph="graph"/> </div> `; angular.module(modName, [graphDirective]).config(($routeProvider) => { $routeProvider.when('/example3', { template: template, controllerAs: 'example3', controller: class { constructor(ecNewbery, ecRect) { const g = new Graph(), u1 = Symbol(), u2 = Symbol(), u3 = Symbol(), u4 = Symbol(), u5 = Symbol(), u6 = Symbol(), v1 = Symbol(), v2 = Symbol(), v3 = Symbol(), v4 = Symbol(), v5 = Symbol(), v6 = Symbol(), v7 = Symbol(), v8 = Symbol(), v9 = Symbol(), v10 = Symbol(), v11 = Symbol(); g.addVertex(u1, {text: '1'}); g.addVertex(u2, {text: '2'}); g.addVertex(u3, {text: '3'}); g.addVertex(u4, {text: '4'}); g.addVertex(u5, {text: '5'}); g.addVertex(u6, {text: '6'}); g.addVertex(v1, {text: 'W'}); g.addVertex(v2, {text: 'X'}); g.addVertex(v3, {text: 'C'}); g.addVertex(v4, {text: 'D'}); g.addVertex(v5, {text: 'E'}); g.addVertex(v6, {text: 'Y'}); g.addVertex(v7, {text: 'A'}); g.addVertex(v8, {text: 'B'}); g.addVertex(v9, {text: 'Z'}); g.addVertex(v10, {text: 'M'}); g.addVertex(v11, {text: 'N'}); g.addEdge(u1, v1); g.addEdge(u1, v3); g.addEdge(u1, v4); g.addEdge(u1, v5); g.addEdge(u1, v7); g.addEdge(u1, v8); g.addEdge(u2, v2); g.addEdge(u2, v3); g.addEdge(u2, v4); g.addEdge(u2, v5); g.addEdge(u2, v7); g.addEdge(u2, v8); g.addEdge(u3, v3); g.addEdge(u3, v4); g.addEdge(u3, v5); g.addEdge(u3, v6); g.addEdge(u3, v7); g.addEdge(u3, v8); g.addEdge(u4, v3); g.addEdge(u4, v4); g.addEdge(u4, v5); g.addEdge(u4, v7); g.addEdge(u4, v8); g.addEdge(u4, v9); g.addEdge(u5, v7); g.addEdge(u5, v8); g.addEdge(u5, v10); g.addEdge(u6, v7); g.addEdge(u6, v8); g.addEdge(u6, v11); this.graphs = [ g, ecNewbery(g), ecRect(g) ]; } } }); }); export default modName
/* global SCOUTFILE_APP_CONFIG */ 'use strict'; module.exports = SCOUTFILE_APP_CONFIG;
const fs = require('fs'); var fetchNotes = function() { try{ var notesString = fs.readFileSync('notes_data.json'); return JSON.parse(notesString); } catch (e) { return []; } } var saveNotes = function(notes) { fs.writeFileSync('notes_data.json', JSON.stringify(notes)); } var addNote = function(title, body) { var notes = fetchNotes(); var note = { title, body }; var duplicateNotes = notes.filter(function(note) { return note.title === title; }); if (duplicateNotes.length === 0) { notes.push(note); saveNotes(notes); return note; } } var getAll = function () { return fetchNotes(); } var read = function (title) { var notes = fetchNotes(); var filteredNotes = notes.filter(function(note) { return note.title == title; }); return filteredNotes[0]; } var remove = function (title) { var notes = fetchNotes(); var filteredNotes = notes.filter(function(note){ return note.title !== title; }); saveNotes(filteredNotes); return (notes.length !== filteredNotes.length); } var showNoteInfo = function(note) { console.log("--"); console.log("Title: " + note.title); console.log("Body: " + note.body); } module.exports = { addNote, getAll, read, remove, showNoteInfo };
'use strict'; // Setting up route angular.module('users').config(['$stateProvider', function ($stateProvider) { // Users state routing $stateProvider.state('profile', { url: '/settings/profile', views: { 'aside': { templateUrl: 'modules/core/views/sidebar/todo.client.view.html' }, 'main-view': { templateUrl: 'modules/users/views/settings/edit-profile.client.view.html', controller: 'SettingsController', controllerAs: 'settings' } } }).state('signup', { url: '/signup', templateUrl: 'modules/users/views/authentication/signup.client.view.html' }).state('signin', { url: '/signin', templateUrl: 'modules/users/views/authentication/signin.client.view.html' }).state('forgot', { url: '/password/forgot', templateUrl: 'modules/users/views/password/forgot-password.client.view.html' }).state('reset-invalid', { url: '/password/reset/invalid', templateUrl: 'modules/users/views/password/reset-password-invalid.client.view.html' }).state('reset-success', { url: '/password/reset/success', templateUrl: 'modules/users/views/password/reset-password-success.client.view.html' }).state('reset', { url: '/password/reset/:token', templateUrl: 'modules/users/views/password/reset-password.client.view.html' }); }]);
const Play = require('../models/Play'); async function createPlay(playData){ const play = new Play(playData); return play.save(); } async function getAllPlays(orderBy){ if(orderBy == 'likes') { return Play.find({ public: true }).sort({ usersLiked: 'desc' }).lean(); } return Play.find({ public: true }).lean(); } async function getPlayById(id){ return Play.findById(id).lean(); } async function editPlay(id, playData) { try { const existing = await Play.findById(id); if(existing){ Object.assign(existing, playData); return existing.save(); } else { throw new ReferenceError('No such ID in database!'); } } catch (err) { console.error(err.messaage); throw err; } } async function deletePlay(id){ try { return Play.deleteOne({ _id: id }); } catch (err) { throw new ReferenceError('No such ID in database!'); } } async function likePlay(id, userId){ try { const existing = await Play.findById(id); if(existing){ existing.usersLiked.push(userId); return existing.save(); } else { throw new ReferenceError('No such ID in database!'); } } catch (err) { throw err; } } module.exports = { createPlay, getAllPlays, getPlayById, editPlay, deletePlay, likePlay };
module.exports = function(Referencia) { };
var argv = process.argv; argv = argv.slice(2); console.log(argv.join(" "));
import { makeStyles, Button, Grid } from "@material-ui/core"; import Link from "next/link"; const styles = makeStyles((theme) => ({ box: { width: "75%", margin: "15px auto", }, rainbowText: { background: "linear-gradient(45deg, rgba(255, 0, 255, 1) 0%,rgba(0, 255, 255, 1) 100%)", WebkitBackgroundClip: "text", WebkitTextFillColor: "transparent", width: "100%", fontWeight: 600, [theme.breakpoints.up("lg")]: { fontSize: "24px", }, [theme.breakpoints.down("md")]: { fontSize: "20px", }, [theme.breakpoints.down("xs")]: { fontSize: "18px", }, }, })); function ProductGuide() { const classes = styles(); return ( <Grid container spacing={3} className={classes.box}> <Grid item xs={12} sm={6}> <Link href="/pdf/whitepaper/PIQ_8pp_Core_Brochure_A4.pdf"> <a target="_blank"> <Button variant="contained" className={classes.rainbowText}> Product Guide(A4) </Button> </a> </Link> </Grid> <Grid item xs={12} sm={6}> <Link href="/pdf/whitepaper/PIQ_8pp_Core_Brochure_USLetter.pdf"> <a target="_blank"> <Button variant="contained" className={classes.rainbowText}> Product Guide(Letter) </Button> </a> </Link> </Grid> </Grid> ); } export default ProductGuide;