hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
3638d002c6f7334bc72c803974aabec71e9f04c1
841
js
JavaScript
src/utils.js
huxiaoyun/chrome-extension-demo
783c3f4ca039db3b32d734398a6abb9a7afbc526
[ "MIT" ]
null
null
null
src/utils.js
huxiaoyun/chrome-extension-demo
783c3f4ca039db3b32d734398a6abb9a7afbc526
[ "MIT" ]
null
null
null
src/utils.js
huxiaoyun/chrome-extension-demo
783c3f4ca039db3b32d734398a6abb9a7afbc526
[ "MIT" ]
null
null
null
class ChromeStorage { constructor() { this.local = chrome.storage.local; this.get = this.getStorage; this.set = this.setStorage; } getStorage = (keys) => { const opt = {}; if (keys.constructor.name === 'String') { opt[keys] = null; } else if (keys.constructor.name === 'Array') { keys.forEach(key => { opt[key] = null; }); } else { console.warn('error::参数名不对'); return resolve({}); } return new Promise(resolve => { return this.local.get(opt, (item) => { return resolve(item); }); }) } setStorage = (param) => { return new Promise(resolve => { return this.local.set(param, () => { return resolve(true); }); }) } clear = () => { this.local.clear(); } } export const storage = new ChromeStorage();
23.361111
51
0.530321
363a250112f329f72354de93dfd8fedfe1af5802
899
js
JavaScript
sketch.js
yijinSon/Change_Of_Seasons
cd623ae2220baa0fbba7d831d757d840997b8dff
[ "Unlicense" ]
null
null
null
sketch.js
yijinSon/Change_Of_Seasons
cd623ae2220baa0fbba7d831d757d840997b8dff
[ "Unlicense" ]
null
null
null
sketch.js
yijinSon/Change_Of_Seasons
cd623ae2220baa0fbba7d831d757d840997b8dff
[ "Unlicense" ]
null
null
null
var snowy = []; var snowyLess = 1; var winterIsCome = false; var flowers = []; function setup() { createCanvas(600, 1000); for (let i=0 ; i<10 ; i++){ snowy[i] = new Snow(); } } function draw() { background(0); winterToSpring(); for (let i=0 ; i<snowy.length ; i++){ snowy[i].update(); snowy[i].display(); snowy[i].ground(); } pileup(); for (var i=0 ; i<flowers.length ; i++){ flowers[i].update(); flowers[i].display(); } textSize (20); textAlign (CENTER); fill (255, 200); if (winterIsCome == false){ text ('If you want to melt the snow, press the space bar', width/2, 40); } else { text ('Winter has gone and spring has come', width/2, 40); text ('Click on the mouse', width/2, 70); } } function mousePressed(){ if (winterIsCome == true){ var f = new Flower(mouseX, mouseY); flowers.push(f); } }
18.346939
76
0.569522
363b5d57abedbdc3ec3006e35a8d9454e37d3151
756
js
JavaScript
src/shared/query.js
Alcadur/ipko-chromoe-extension
c86b40d450a693343320ed937c559a07a54349e2
[ "Apache-2.0" ]
null
null
null
src/shared/query.js
Alcadur/ipko-chromoe-extension
c86b40d450a693343320ed937c559a07a54349e2
[ "Apache-2.0" ]
null
null
null
src/shared/query.js
Alcadur/ipko-chromoe-extension
c86b40d450a693343320ed937c559a07a54349e2
[ "Apache-2.0" ]
null
null
null
'use strict'; class Query { /** * Alias for document.querySelector * * @param {string} selector * @param {HTMLElement} [parentElement=document.body] * @returns {HTMLElement} */ one(selector, parentElement = document.body) { return parentElement.querySelector(selector); } /** * Alias for document.querySelectorAll * * @param {string} selector * @param {HTMLElement} parentElement, * @returns {NodeListOf<HTMLElement>} */ all(selector, parentElement = document.body) { return parentElement.querySelectorAll(selector); } } /** * @returns {Query} */ function queryFactory() { return new Query(); } /** * @type {Query} */ const query = queryFactory();
21
57
0.616402
363b685b9bf9b7ff17d11f8fc342f7234bb3e758
333
js
JavaScript
controllers/github.js
getdatapod/keyper
366c92b43bda08abe8992f50a6e63e3ad093e6a5
[ "Apache-2.0" ]
null
null
null
controllers/github.js
getdatapod/keyper
366c92b43bda08abe8992f50a6e63e3ad093e6a5
[ "Apache-2.0" ]
null
null
null
controllers/github.js
getdatapod/keyper
366c92b43bda08abe8992f50a6e63e3ad093e6a5
[ "Apache-2.0" ]
1
2020-10-06T07:36:55.000Z
2020-10-06T07:36:55.000Z
const axios = require('axios'); const getProfileName = async (token) => { try { const res = await axios.get('https://api.github.com/user', { headers: { Authorization: `token ${token}`, }, }); return res.data.login; } catch (error) { throw error; } }; module.exports = { getProfileName };
18.5
64
0.573574
363c6768f25879477127cb3244f85746f359fe81
6,436
js
JavaScript
test/unit/deployment-advisor-test.js
Springworks/node-deployment-notifier
1e028576527bedd74ed6698ea3b8ab143836b85e
[ "MIT" ]
null
null
null
test/unit/deployment-advisor-test.js
Springworks/node-deployment-notifier
1e028576527bedd74ed6698ea3b8ab143836b85e
[ "MIT" ]
3
2015-10-16T18:02:07.000Z
2020-08-14T11:15:34.000Z
test/unit/deployment-advisor-test.js
Springworks/node-deployment-notifier
1e028576527bedd74ed6698ea3b8ab143836b85e
[ "MIT" ]
null
null
null
const deployment_advisor = require('../../src/deployment-advisor'); const dependency_helper = require('../../test-util/dependency-helper'); describe('test/unit/deployment-advisor-test.js', () => { let sinon_sandbox; let mock_git_service; let mock_slack_notifier; let dependencies; beforeEach(() => { sinon_sandbox = sinon.sandbox.create(); }); afterEach(() => { sinon_sandbox.restore(); }); beforeEach('mockDependencies', () => { mock_git_service = dependency_helper.mockGitService(); mock_slack_notifier = dependency_helper.mockSlackNotifier(); dependencies = { git_service: mock_git_service, slack_notifier: mock_slack_notifier }; }); describe('create', () => { it('should create an instance properly', () => { const advisor = deployment_advisor.create(mock_git_service, mock_slack_notifier); advisor.should.have.keys(['suggestDeployment']); }); }); describe('internals.suggestDeployment', () => { describe('with valid app_name, latest_tag_name, deployment_url', () => { const app_name = 'awe-some-app'; const latest_tag_name = 'v1.0.1'; const deployment_url = 'http://www.deploy.com/now'; describe('when dependencies succeed', () => { let send_deployment_message_stub; beforeEach('mockSendMessage', () => { send_deployment_message_stub = sinon_sandbox.stub(mock_slack_notifier, 'sendDeploymentMessage').returns(Promise.resolve(null)); }); describe('when changelog contains changes', () => { const changelog = 'These are all the changes'; const author_name = 'John Doe'; beforeEach('mockChangelog', () => { sinon_sandbox.stub(mock_git_service, 'getChangesBetweenTags').returns(Promise.resolve(changelog)); }); beforeEach('mockLastAuthor', () => { sinon_sandbox.stub(mock_git_service, 'getLatestAuthorName').returns(Promise.resolve(author_name)); }); it('should resolve promise', () => { return deployment_advisor.internals.suggestDeployment(dependencies, app_name, latest_tag_name, deployment_url).should.be.fulfilled(); }); it('should send message to Slack notifier', () => { return deployment_advisor.internals.suggestDeployment(dependencies, app_name, latest_tag_name, deployment_url).then(() => { send_deployment_message_stub.should.have.callCount(1); }); }); it('should have correct message, with link included', () => { return deployment_advisor.internals.suggestDeployment(dependencies, app_name, latest_tag_name, deployment_url) .then(() => { const message_arg = send_deployment_message_stub.getCall(0).args[0]; message_arg.should.eql(`Hey, *${author_name}*. Might be a good time to deploy *${app_name}*.` + '\n' + `:package: ${deployment_url}`); }); }); it('should only define changelog as attachment', () => { return deployment_advisor.internals.suggestDeployment(dependencies, app_name, latest_tag_name, deployment_url) .then(() => { const attachments_arg = send_deployment_message_stub.getCall(0).args[1]; attachments_arg.should.be.instanceOf(Array); attachments_arg.should.have.length(1); attachments_arg[0].fallback.should.eql(changelog, 'Verify that changelog is used'); }); }); }); describe('with empty changelog', () => { const changelog = ''; const author_name = ''; beforeEach('mockChangelog', () => { sinon_sandbox.stub(mock_git_service, 'getChangesBetweenTags').returns(Promise.resolve(changelog)); }); beforeEach('mockLastAuthor', () => { sinon_sandbox.stub(mock_git_service, 'getLatestAuthorName').returns(Promise.resolve(author_name)); }); it('should not send deployment message', () => { return deployment_advisor.internals.suggestDeployment(dependencies, app_name, latest_tag_name, deployment_url).then(() => { send_deployment_message_stub.should.have.callCount(0); }); }); }); }); describe('when git_service fails', () => { beforeEach('mockChangelog', () => { const err = new Error('Mocked getChangesBetweenTags error'); sinon_sandbox.stub(mock_git_service, 'getChangesBetweenTags').returns(Promise.reject(err)); }); it('should reject promise', () => { return deployment_advisor.internals.suggestDeployment(dependencies, app_name, latest_tag_name, deployment_url).should.be.rejected(); }); }); describe('when only slack_notifier fails', () => { beforeEach('mockChangelog', () => { sinon_sandbox.stub(mock_git_service, 'getChangesBetweenTags').returns(Promise.resolve('These are all the changes')); }); beforeEach('mockLastAuthor', () => { sinon_sandbox.stub(mock_git_service, 'getLatestAuthorName').returns(Promise.resolve('John Doe')); }); beforeEach('mockFailedSendMessage', () => { const err = new Error('Mocked getChangesBetweenTags error'); sinon_sandbox.stub(mock_slack_notifier, 'sendDeploymentMessage').returns(Promise.reject(err)); }); it('should reject promise', () => { return deployment_advisor.internals.suggestDeployment(dependencies, app_name, latest_tag_name, deployment_url).should.be.rejected(); }); }); }); }); describe('internals.generateDeploymentSuggestionSlackAttachment', () => { describe('with valid changelog', () => { const changelog = '-This\n-Is\n-Changing'; it('should define attachment as required by Slack', () => { const attachment = deployment_advisor.internals.generateDeploymentSuggestionSlackAttachment(changelog, 'v1.0.0'); attachment.should.eql({ fallback: changelog, fields: [ { title: 'Changes since v1.0.0', value: changelog, short: false, }, ], }); }); }); }); });
36.777143
145
0.610628
363c850be37eddcfc157339a4176058a1c4bad36
233
js
JavaScript
src/core/store.js
adenekan41/over-stateful
6d0974cffc902afb3b35731c1af8001ff876927a
[ "MIT" ]
3
2020-02-23T17:20:05.000Z
2020-04-08T11:26:53.000Z
src/core/store.js
codewonders/over-stateful
6d0974cffc902afb3b35731c1af8001ff876927a
[ "MIT" ]
1
2021-05-11T04:21:19.000Z
2021-05-11T04:21:19.000Z
src/core/store.js
codewonders/over-stateful
6d0974cffc902afb3b35731c1af8001ff876927a
[ "MIT" ]
2
2020-05-18T03:22:35.000Z
2020-09-25T14:48:03.000Z
/** * @constant */ const handler = { get: function (obj, prop) { return prop in obj ? obj[prop] : 'state'; }, }; /** * Proxy Store * @constant * @default */ const store = new Proxy({}, handler); export default store;
12.944444
45
0.570815
363d02f68facef6ce226ab811862f6723abc61fe
8,568
js
JavaScript
src/app.js
EdificeMC/StructureViewer
06451a503d3e8d74353f48e495e1cb607fb771af
[ "MIT" ]
5
2016-06-10T18:25:15.000Z
2020-11-23T19:28:30.000Z
src/app.js
EdificeMC/StructureViewer
06451a503d3e8d74353f48e495e1cb607fb771af
[ "MIT" ]
1
2016-10-06T14:42:46.000Z
2016-10-06T14:42:46.000Z
src/app.js
EdificeMC/StructureViewer
06451a503d3e8d74353f48e495e1cb607fb771af
[ "MIT" ]
5
2017-01-07T17:20:48.000Z
2022-01-14T03:54:17.000Z
// Camera manipulation code derived from https://github.com/mrdoob/three.js/blob/master/examples/webgl_materials_cubemap_dynamic2.html 'use strict'; import THREE from 'three'; import get from 'lodash.get'; import merge from 'lodash.merge'; import mappings from './mappings.json'; import geometries from './geometries'; const assetsURL = 'https://assets.edificemc.com/'; const texturePack = 'Faithful'; const exclude = ['minecraft:air', 'minecraft:tallgrass', 'minecraft:torch', 'minecraft:red_flower', 'minecraft:double_plant']; let canvas; let doPassiveSpinning; let scene, camera, renderer; let cameraFocus; let loader = new THREE.TextureLoader(); loader.crossOrigin = ''; // Allow cross origin requests let fov = 10; let onMouseDownMouseX = 0; let onMouseDownMouseY = 0; let lon = 45; let lat = 20; let onMouseDownLon = 0; let onMouseDownLat = 0; export default function(canvasElement, schematic, renderingDetails, spinning) { canvas = canvasElement; doPassiveSpinning = spinning; scene = new THREE.Scene(); if(renderingDetails) { fov = renderingDetails.fov; lon = renderingDetails.lon; lat = renderingDetails.lat; } camera = new THREE.PerspectiveCamera(fov, window.innerWidth / window.innerHeight, 1, 10000); camera.position.z = 0; // Transform palette from // { "minecraft:air": 0, "minecraft:dirt": 1 } // to ["minecraft:air", "minecraft:dirt"] schematic.PaletteArray = []; for(let key in schematic.Palette) { schematic.PaletteArray[schematic.Palette[key]] = key; } const width = schematic.Width; const height = schematic.Height; const length = schematic.Length; for(let x = 0; x < width; x++) { for(let y = 0; y < height; y++) { for(let z = 0; z < length; z++) { const blockArrIndex = x + z * width + y * width * length; const paletteIndex = schematic.BlockData[blockArrIndex]; const rawType = schematic.PaletteArray[paletteIndex]; const blockData = parseBlockType(rawType); if(exclude.includes(blockData.baseType)) { continue; } let geoFn; for(let geometryType in geometries) { if(blockData.baseType.includes(geometryType) && !blockData.baseType.includes('double')) { geoFn = geometries[geometryType]; } } let geometry; if(geoFn) { geometry = geoFn(blockData); } else { geometry = new THREE.BoxGeometry(1, 1, 1); } geometry.translate(x, y, z); const mesh = new THREE.Mesh(geometry, getMaterial(blockData)); scene.add(mesh); } } } // Focus the camera on the middle of the structure cameraFocus = new THREE.Vector3(width / 2, height / 2, length / 2); scene.add(new THREE.AmbientLight(0xcccccc)) renderer = new THREE.WebGLRenderer({ canvas, preserveDrawingBuffer: true }); renderer.setClearColor(0xbfd1e5); document.addEventListener('mousedown', onDocumentMouseDown, false); document.addEventListener('wheel', onDocumentMouseWheel, false); animate(); } function getMaterial(blockData) { const baseType = blockData.baseType; const properties = blockData.properties; let blockMapping = mappings[baseType]; if (!blockMapping) { console.log('No mapping found for ' + baseType) // Material is the no texture material by default return new THREE.MeshPhongMaterial({ map: loader.load(assetsURL + 'notexture.png') }); } // texturePath can potentially be an array of paths instead of a single string let texturePath, materialProperties; if (blockMapping instanceof Object && !Array.isArray(blockMapping)) { texturePath = blockMapping.path; // By default the texture path will be at the "path" field if (properties) { for (let key in properties) { if (!blockMapping[key]) { // The property is unimportant concerning textures, such as direction continue; } texturePath = blockMapping[key][properties[key]]; } } materialProperties = blockMapping.materialProperties || {}; } else { texturePath = blockMapping; materialProperties = {}; } if (Array.isArray(texturePath)) { // There are different textures for each side of the block texturePath = texturePath.map(path => new THREE.MeshPhongMaterial(merge({ map: getBlockTexture(path) }, materialProperties))) return new THREE.MeshFaceMaterial(texturePath); } else { // Same texture for every side; return new THREE.MeshPhongMaterial(merge({ map: getBlockTexture(texturePath) }, materialProperties)); } } function parseBlockType(rawType) { const bracketInd = rawType.indexOf('['); // Check for the opening square bracket on blocks w/ extra properties if (bracketInd === -1) { return { baseType: rawType, properties: null } } // Split up the raw type into the base type ('minecraft:quartz_block') and properties ('variant=default') const baseType = rawType.substring(0, bracketInd); const propertiesString = rawType.substring(bracketInd + 1, rawType.length - 1); const propertiesStringArray = propertiesString.split(','); let properties = {}; for (const property of propertiesStringArray) { // Parse each 'key=value' property let eqInd = property.indexOf('='); const key = property.substring(0, eqInd); const value = property.substring(eqInd + 1, property.length); properties[key] = value; } return { baseType, properties }; } function getBlockTexture(texturePath) { return loader.load(assetsURL + texturePack + '/assets/minecraft/textures/blocks/' + texturePath + '.png'); } export function exportRenderVariables() { return { fov, lon, lat, texturePack }; } function onDocumentMouseDown(event) { const elementMouseIsOver = document.elementFromPoint(event.clientX, event.clientY); if(elementMouseIsOver !== canvas) { return; } event.preventDefault(); onMouseDownMouseX = event.clientX; onMouseDownMouseY = event.clientY; onMouseDownLon = lon; onMouseDownLat = lat; document.addEventListener('mousemove', onDocumentMouseMove, false); document.addEventListener('mouseup', onDocumentMouseUp, false); } function onDocumentMouseMove(event) { lon = (event.clientX - onMouseDownMouseX) * 0.1 + onMouseDownLon; lat = (event.clientY - onMouseDownMouseY) * 0.1 + onMouseDownLat; } function onDocumentMouseUp(event) { document.removeEventListener('mousemove', onDocumentMouseMove, false); document.removeEventListener('mouseup', onDocumentMouseUp, false); } function onDocumentMouseWheel(event) { const elementMouseIsOver = document.elementFromPoint(event.clientX, event.clientY); if(elementMouseIsOver !== canvas) { return; } if (event.wheelDeltaY) { // WebKit fov -= event.wheelDeltaY * 0.01; // If FOV is negative, it inverts the structure fov = fov <= 0 ? 1 : fov; // If FOV goes above ~180, it inverts the structure fov = fov > 150 ? 150 : fov; } else if (event.wheelDelta) { // Opera / Explorer 9 fov -= event.wheelDelta * 0.01; fov = fov <= 0 ? 1 : fov; fov = fov > 150 ? 150 : fov; } else if (event.detail) { // Firefox fov += event.detail * 0.2; fov = fov <= 0 ? 1 : fov; fov = fov > 150 ? 150 : fov; } camera.projectionMatrix.makePerspective(fov, window.innerWidth / window.innerHeight, 1, 1100); } function animate() { requestAnimationFrame(animate); if(doPassiveSpinning) { lon += .15; } lat = Math.max(-85, Math.min(85, lat)); const phi = THREE.Math.degToRad(90 - lat); const theta = THREE.Math.degToRad(lon); camera.position.x = 100 * Math.sin(phi) * Math.cos(theta); camera.position.y = 100 * Math.cos(phi); camera.position.z = 100 * Math.sin(phi) * Math.sin(theta); camera.lookAt(cameraFocus); renderer.render(scene, camera); }
32.577947
134
0.624767
363e57a27380261af18892593422e9551cc58727
1,577
js
JavaScript
demo/chipmunk/js/stage.js
06wj/angrybird
bffad6e066e9fd299c3895fadee4e3b85db01b54
[ "MIT" ]
2
2018-04-20T07:52:18.000Z
2021-06-17T06:42:34.000Z
demo/chipmunk/js/stage.js
06wj/angrybird
bffad6e066e9fd299c3895fadee4e3b85db01b54
[ "MIT" ]
null
null
null
demo/chipmunk/js/stage.js
06wj/angrybird
bffad6e066e9fd299c3895fadee4e3b85db01b54
[ "MIT" ]
null
null
null
var miniScale = .4; var gameWdith = Math.min(1000, innerWidth); var gameHeight = 500; var handY = gameHeight - 190; var container = document.querySelector(".container"); container.style.width = gameWdith + "px"; container.style.height = gameHeight + "px"; var stage = new Hilo.Stage({ container:container, width:gameWdith, height:gameHeight }); stage.enableDOMEvent([Hilo.event.POINTER_START, Hilo.event.POINTER_MOVE, Hilo.event.POINTER_END]) var scene = new Hilo.Container({ y:gameHeight, pivotY:gameHeight }); stage.addChild(scene); var ticker = new Hilo.Ticker(60); ticker.addTick(stage); ticker.addTick(Hilo.Tween); ticker.start(); Resource.on("complete", function(e){ init(); }); Resource.load(); var camera = new Hilo.Camera({ width:gameWdith, height:gameHeight, bounds:[-1000, -2000, gameWdith + 3000, 2000 + gameHeight], deadzone:[100, 100, gameWdith - 500, gameHeight - 200] }); scene.onUpdate = function(){ camera.tick(); this.x = -camera.scroll.x + 100; this.y = -camera.scroll.y + gameHeight; } function initFloor(){ var floowH = 50; var floor = world._world.addShape(new cp.SegmentShape(world._world.staticBody, v(-1000, gameHeight + floowH), v(10000, gameHeight + floowH), floowH)); floor.setElasticity(1); floor.setFriction(1); floor.setLayers(NOT_GRABABLE_MASK); var floor = world._world.addShape(new cp.SegmentShape(world._world.staticBody, v(-500, gameHeight), v(-500, 0), 0)); floor.setElasticity(1); floor.setFriction(1); floor.setLayers(NOT_GRABABLE_MASK); }
27.189655
154
0.695625
363eb2da4001f4dd4a0bf2bdb4199aa835551107
1,752
js
JavaScript
src/controllers/FilterController.js
MilanSteman/blok-tech-team4.2
458b4552fe5d73c6e4ab36c1107e678ed7d2a6cc
[ "MIT" ]
null
null
null
src/controllers/FilterController.js
MilanSteman/blok-tech-team4.2
458b4552fe5d73c6e4ab36c1107e678ed7d2a6cc
[ "MIT" ]
31
2021-05-31T12:50:51.000Z
2021-06-16T23:22:46.000Z
src/controllers/FilterController.js
Daan-Zwarthoed/blok-tech-team4.2
7556c69d2b3d50aebf59ad7cdaf5eacb9665e54c
[ "MIT" ]
1
2021-06-17T10:37:11.000Z
2021-06-17T10:37:11.000Z
const gameList = require('../models/Game'); const User = require('../models/User'); const { shuffle } = require('../tools/shuffle'); // Filter controller // Render filter form const chooseGame = async (req, res) => { gameList.find({}).then((games) => { shuffle(games); User.findById(req.user._id, (err, user) => { if (err) throw err; res.render('pages/filter/chooseGame.njk', { title: 'Filter game', games, user }); }); }); }; const getFilterFort = (req, res) => { User.findById(req.user._id, (err, user) => { if (err) throw err; res.render('pages/filter/filter.njk', { title: 'Filter', chosenGame: 'fortnite', user }); }); }; const getFilterRocket = (req, res) => { User.findById(req.user._id, (err, user) => { if (err) throw err; res.render('pages/filter/filter.njk', { title: 'Filter', chosenGame: 'rocket-league', user }); }); }; const getFilterNba = (req, res) => { User.findById(req.user._id, (err, user) => { if (err) throw err; res.render('pages/filter/filter.njk', { title: 'Filter', chosenGame: 'nba-2k21', user }); }); }; const getFilterMine = (req, res) => { User.findById(req.user._id, (err, user) => { if (err) throw err; res.render('pages/filter/filter.njk', { title: 'Filter', chosenGame: 'minecraft', user }); }); }; const getFilterCold = (req, res) => { User.findById(req.user._id, (err, user) => { if (err) throw err; res.render('pages/filter/filter.njk', { title: 'Filter', chosenGame: 'cold-war', user }); }); }; module.exports = { chooseGame, getFilterFort, getFilterRocket, getFilterNba, getFilterMine, getFilterCold, };
28.721311
102
0.576484
363f779c799c438d86b800709e36e50c6bb02fa1
1,583
js
JavaScript
huxley/www/js/actions/DelegateActions.js
srisainachuri/huxley
7166a1423e49b506d6d5f142c748eac4e5d2314c
[ "BSD-3-Clause" ]
1
2017-06-08T20:13:03.000Z
2017-06-08T20:13:03.000Z
huxley/www/js/actions/DelegateActions.js
srisainachuri/huxley
7166a1423e49b506d6d5f142c748eac4e5d2314c
[ "BSD-3-Clause" ]
1
2017-08-17T16:15:41.000Z
2017-08-17T16:15:41.000Z
huxley/www/js/actions/DelegateActions.js
srisainachuri/huxley
7166a1423e49b506d6d5f142c748eac4e5d2314c
[ "BSD-3-Clause" ]
null
null
null
/** * Copyright (c) 2011-2016 Berkeley Model United Nations. All rights reserved. * Use of this source code is governed by a BSD License (see LICENSE). */ 'use strict'; var ActionConstants = require('constants/ActionConstants'); var Dispatcher = require('dispatcher/Dispatcher'); var DelegateActions = { deleteDelegate(delegateID, onError) { Dispatcher.dispatch({ actionType: ActionConstants.DELETE_DELEGATE, delegateID: delegateID, onError: onError, }); }, addDelegate(delegate) { Dispatcher.dispatch({ actionType: ActionConstants.ADD_DELEGATE, delegate: delegate, }); }, updateDelegate(delegateID, delta, onError) { Dispatcher.dispatch({ actionType: ActionConstants.UPDATE_DELEGATE, delegateID: delegateID, delta: delta, onError: onError, }); }, delegatesFetched(delegates) { Dispatcher.dispatch({ actionType: ActionConstants.DELEGATES_FETCHED, delegates: delegates, }); }, updateDelegates(schoolID, delegates, onSuccess, onError) { Dispatcher.dispatch({ actionType: ActionConstants.UPDATE_DELEGATES, schoolID: schoolID, delegates: delegates, onSuccess: onSuccess, onError: onError, }); }, updateCommitteeDelegates(committeeID, delegates, onSuccess, onError) { Dispatcher.dispatch({ actionType: ActionConstants.UPDATE_COMMITTEE_DELEGATES, committeeID: committeeID, delegates: delegates, onSuccess: onSuccess, onError: onError, }); }, }; module.exports = DelegateActions;
24.353846
78
0.685407
363fdb88b913f18e0fe42d7c56cb89b8a6b13915
2,584
js
JavaScript
scripts/entry_script.js
omkarjc27/campmap-front
39684fdd8c8711b2396dfbd1821c1ba0e2b67f00
[ "Apache-2.0" ]
null
null
null
scripts/entry_script.js
omkarjc27/campmap-front
39684fdd8c8711b2396dfbd1821c1ba0e2b67f00
[ "Apache-2.0" ]
null
null
null
scripts/entry_script.js
omkarjc27/campmap-front
39684fdd8c8711b2396dfbd1821c1ba0e2b67f00
[ "Apache-2.0" ]
null
null
null
function SignUp() { var form = document.getElementById("signup").getElementsByClassName("text-ip") var acc = form[0].value var u_name = form[1].value var password = form[2].value if(!u_name.match(/^[A-Za-z]\w{7,14}$/)){document.getElementById("name_e").innerHTML = "Username should contain 8-12 charecters. Can contain only alphanumeric charecters or underscore.";return} else{document.getElementById("name_e").innerHTML = ""} if(!password.match(/^[A-Za-z]\w{7,14}$/)){document.getElementById("pass_e").innerHTML = "Password should contain 8-12 charecters. Can contain only alphanumeric charecters or underscore.";return} else{document.getElementById("pass_e").innerHTML = ""} var ourRequest = new XMLHttpRequest(); ourRequest.open('POST', 'https://campus-map-api.herokuapp.com/SignUp'); ourRequest.send(JSON.stringify({ "master_key": acc, "u_name": u_name, "pass": password})); ourRequest.onload = function() { if (ourRequest.status >= 200 && ourRequest.status < 400) { var data = JSON.parse(ourRequest.responseText); if (data=="A"){ var e_disp = document.getElementById("acc_e") e_disp.innerHTML = "Wrong Access Code." } else if (data=="U") { var e_disp = document.getElementById("name_e") e_disp.innerHTML = "Username already taken." } else { window.localStorage.setItem("CampMap_User_ID", data); window.location.href = "index.html"; } } else { error('Server Error','Our Team is working on fixing it.') } } } function Login() { var form = document.getElementById("login").getElementsByClassName("text-ip") var u_name = form[0].value var password = form[1].value var ourRequest = new XMLHttpRequest(); ourRequest.open('POST', 'https://campus-map-api.herokuapp.com/login'); ourRequest.send(JSON.stringify({ "u_name": u_name, "pass": password})); ourRequest.onload = function() { if (ourRequest.status >= 200 && ourRequest.status < 400) { var data = JSON.parse(ourRequest.responseText); if (data==false){ var e_disp = document.getElementById("log_e") e_disp.innerHTML = "Wrong Username & Password Combination." } else { window.localStorage.setItem("CampMap_User_ID", data); window.location.href = "index.html"; } } else { error('Server Error','Our Team is working on fixing it.'); } } } function Toggle(){ login = document.getElementById("login") signup = document.getElementById("signup") if(login.style.display == "none"){ login.style.display = "block" signup.style.display = "none" } else { login.style.display = "none" signup.style.display = "block" } }
37.449275
195
0.694659
55bd8248ee7662e54464f46f0484788b13fe01f0
300
js
JavaScript
data/build-config.js
testowenyoung/bloga-x
67fd5b68a1f96f93efa758794505c8ca19af05db
[ "MIT" ]
null
null
null
data/build-config.js
testowenyoung/bloga-x
67fd5b68a1f96f93efa758794505c8ca19af05db
[ "MIT" ]
null
null
null
data/build-config.js
testowenyoung/bloga-x
67fd5b68a1f96f93efa758794505c8ca19af05db
[ "MIT" ]
null
null
null
const path = require("path"); const fse = require('fs-extra') const cacheDbPath = path.resolve(__dirname, '../.cache/blog-config-cache/config.json') // ensure fse.ensureFileSync(cacheDbPath); const config = { buildCacheKey: "BUILD_CACHE_KEY_2020_04_21", cacheDbPath } module.exports = config;
23.076923
86
0.74
55be5f9c63b831c5c580b69590a9f6c84d05ae98
1,202
js
JavaScript
frontend/src/pages/Backend.js
pb-coding/fullstack_blog_react_express
9fcaf423074399b8fcfa5031fcd21285dfe5c080
[ "MIT" ]
1
2022-01-23T00:55:43.000Z
2022-01-23T00:55:43.000Z
frontend/src/pages/Backend.js
pb-coding/fullstack_blog_react_express
9fcaf423074399b8fcfa5031fcd21285dfe5c080
[ "MIT" ]
null
null
null
frontend/src/pages/Backend.js
pb-coding/fullstack_blog_react_express
9fcaf423074399b8fcfa5031fcd21285dfe5c080
[ "MIT" ]
null
null
null
import React from 'react'; import LinkCard from '../components/LinkCard'; import ManagePages from '../components/ManagePages'; import ManagePosts from '../components/ManagePosts'; function Backend(props) { return ( <div className="page-backend"> <div className="container mt-4"> <div className="row"> <div className="col mt-2"> <LinkCard className="mb-4" title="Settings" links={[ { name: "Manage Posts", link: "/backend/posts"}, { name: "Manage Pages", link: "/backend/pages"} ]} /> </div> <div className="col-lg-6 mt-2"> <ManagePages pageData={props.pageData} setChildChange={props.setChildChange} className="comp-manage-pages"/> <ManagePosts postsData={props.postsData} setChildChange={props.setChildChange} className="comp-manage-posts"/> </div> <div className="col mt-2"> <LinkCard title="Follow me on:" links={[{ name: "Github", link: "https://github.com/pb-coding"}]} /> </div> </div> </div> </div> ) } export default Backend;
32.486486
122
0.554908
55bf5e245fc882e07bda0ab133497d8b9a10c84e
1,650
js
JavaScript
build/lib/dsl.js
QubitProducts/cherrytree
23bcc7a9f625e1eb4beca7f089ac6291738bc4e6
[ "MIT" ]
109
2015-01-20T18:59:54.000Z
2021-11-17T11:20:21.000Z
build/lib/dsl.js
QubitProducts/cherrytree
23bcc7a9f625e1eb4beca7f089ac6291738bc4e6
[ "MIT" ]
94
2015-01-18T20:36:51.000Z
2019-06-24T09:56:11.000Z
build/lib/dsl.js
QubitProducts/cherrytree
23bcc7a9f625e1eb4beca7f089ac6291738bc4e6
[ "MIT" ]
19
2015-01-20T16:31:09.000Z
2019-09-26T20:48:57.000Z
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports['default'] = dsl; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _dash = require('./dash'); var _invariant = require('./invariant'); var _invariant2 = _interopRequireDefault(_invariant); function dsl(callback) { var ancestors = []; var matches = {}; var names = {}; callback(function route(name, options, callback) { var routes = undefined; (0, _invariant2['default'])(!names[name], 'Route names must be unique, but route "%s" is declared multiple times', name); names[name] = true; if (arguments.length === 1) { options = {}; } if (arguments.length === 2 && typeof options === 'function') { callback = options; options = {}; } if (typeof options.path !== 'string') { var parts = name.split('.'); options.path = parts[parts.length - 1]; } // go to the next level if (callback) { ancestors = ancestors.concat(name); callback(); routes = pop(); ancestors.splice(-1); } // add the node to the tree push({ name: name, path: options.path, routes: routes || [], options: options, ancestors: (0, _dash.clone)(ancestors) }); }); function pop() { return matches[currentLevel()] || []; } function push(route) { matches[currentLevel()] = matches[currentLevel()] || []; matches[currentLevel()].push(route); } function currentLevel() { return ancestors.join('.'); } return pop(); } module.exports = exports['default'];
21.710526
125
0.592727
55bfcf5ef23deabd4c024497bf6c05f07a6dad59
122
js
JavaScript
tests/dummy/app/routes/time-series/line-with-circles-chart-demo.js
AddictedToBattlestar/ember-d3-modifiers
597a407877bd4220f1cfb21104e76e5379c0c9d1
[ "MIT" ]
1
2022-01-08T20:50:53.000Z
2022-01-08T20:50:53.000Z
tests/dummy/app/routes/time-series/line-with-circles-chart-demo.js
AddictedToBattlestar/ember-d3-modifiers
597a407877bd4220f1cfb21104e76e5379c0c9d1
[ "MIT" ]
10
2022-03-09T16:27:22.000Z
2022-03-09T21:37:54.000Z
tests/dummy/app/routes/time-series/line-with-circles-chart-demo.js
cah-john-ryan/ember-d3-modifiers
7aadfd52538bff5125ec5476af1777d471598533
[ "MIT" ]
3
2020-07-20T17:19:26.000Z
2021-12-25T21:44:36.000Z
import Route from '@ember/routing/route'; export default class TimeSeriesLineWithCirclesChartDemoRoute extends Route { }
24.4
76
0.827869
55c11582637dfa60f18f6bd91e054d4765560179
430
js
JavaScript
src/store/index.js
MoonCheung/mpvue-applet
18ae5df818fe849b8083d5371230c7228386b2b1
[ "MIT" ]
1
2019-09-26T10:39:19.000Z
2019-09-26T10:39:19.000Z
src/store/index.js
MoonCheung/mpvue-applet
18ae5df818fe849b8083d5371230c7228386b2b1
[ "MIT" ]
null
null
null
src/store/index.js
MoonCheung/mpvue-applet
18ae5df818fe849b8083d5371230c7228386b2b1
[ "MIT" ]
1
2020-10-13T10:17:11.000Z
2020-10-13T10:17:11.000Z
import Vue from 'vue' import Vuex from 'vuex' import getters from './getters' import article from './modules/article' import catg from './modules/catg' import createLogger from 'vuex/dist/logger' Vue.use(Vuex) const debug = process.env.NODE_ENV !== 'production' const store = new Vuex.Store({ modules: { article, catg }, getters, strict: debug, plugins: debug ? [createLogger()] : [] }) export default store
18.695652
51
0.693023
55c3600370fb9b8f0a79588974abf2ca17041c2d
3,607
js
JavaScript
2021-05-09/外卖搭伴拼团php后端/xiaochengxu-master/pages/group/group.js
ritaswc/wechat_app_template
d6ba56b70b09bc755f7d4d6b696b9e9b53511faa
[ "MIT" ]
395
2017-02-24T02:59:29.000Z
2022-03-31T15:48:19.000Z
2021-05-09/外卖搭伴拼团php后端/xiaochengxu-master/pages/group/group.js
ritaswc/wechat_app_template
d6ba56b70b09bc755f7d4d6b696b9e9b53511faa
[ "MIT" ]
7
2020-03-17T08:33:00.000Z
2021-09-02T23:10:46.000Z
2021-05-09/外卖搭伴拼团php后端/xiaochengxu-master/pages/group/group.js
ritaswc/wechat_app_template
d6ba56b70b09bc755f7d4d6b696b9e9b53511faa
[ "MIT" ]
235
2017-03-14T03:31:38.000Z
2022-03-29T16:14:51.000Z
Page({ data:{ navData : {}, goodsData : {}, currentCatId : 0, active : 0 }, type : 2, onLoad : function(options){ // wx.showLoading({ // title : '加载中', // mask : true // }) this.loadNav(); }, onShow : function(){ // var page = this; // var timer = setInterval(function(){ // var data = wx.getStorageSync('goodsData'); // for(var i=0;i<data.length;i++){ // data[i].group_end_time = page.timeFormat(data[i].group_off_time * 1000); // } // page.setData({goodsData:data}) // },1000) // page.timer = timer; this.loadGroupList(); }, onHide : function(){ clearInterval(this.timer); }, onUnload : function(){ clearInterval(this.timer); }, // 加载导航菜单 loadNav : function(){ var page = this; wx.request({ url: 'https://shizhencaiyuan.com/groupAdmin.php/Home/Goodscate/index', data: {data:JSON.stringify({"parent_id":0})}, method: 'POST', header: { 'content-type': 'application/x-www-form-urlencoded' }, success: function(res){ // wx.hideLoading(); page.setData({navData:res.data.data}) } }) }, loadGroupList : function(){ if(wx.showLoading){ wx.showLoading({ title : '加载中...', mask : true }) setTimeout(function(){ wx.hideLoading() },1000) } var cat_id = 0; if(arguments.length > 0){ cat_id = arguments[0].currentTarget.dataset.catid; } clearInterval(this.timer); var page = this; wx.request({ url: 'https://shizhencaiyuan.com/groupAdmin.php/Home/Goods/group', data: {data:JSON.stringify({"cat_id" : cat_id,is_low : this.type})}, method: 'POST', header: { 'content-type': 'application/x-www-form-urlencoded' }, success: function(res){ var data = res.data.data;console.log(data) var timer = setInterval(function(){ for(var i=0;i<data.length;i++){ data[i].group_end_time = page.timeFormat(data[i].group_off_time * 1000); } page.setData({goodsData:data,currentCatId:cat_id}) },1000) page.timer = timer; }, // page.setData({ // goodsData:res.data.data, // currentCatId:cat_id // }) // wx.setStorageSync('goodsData', res.data.data) // page.setData({goodsData:res.data.data}) // wx.hideLoading() // } }) }, timeFormat : function(timestamp){ var page = this; var timestamp = timestamp; // setInterval(function(){ var currentTime = (new Date()).getTime(); var time = timestamp - currentTime; if(time <= 0) return false; var times = Math.floor(time / (1000 * 60 * 60))+':'+Math.floor(time / (1000 * 60) % 60)+':'+Math.floor(time / 1000 % 60); return times; // },1000) }, changeType : function(e){ var type = e.currentTarget.dataset.type; if(type == 'group'){ this.setData({active:0}); this.type = 2; this.loadGroupList(); }else{ this.setData({active:1}); this.type = 1; this.loadGroupList(); } }, offered : function(e){ var group_id = e.currentTarget.dataset.groupid; wx.navigateTo({ url: '/pages/offered/offered?group_id=' + group_id }) }, onShareAppMessage: function() { // 用户点击右上角分享 return { title: 'title', // 分享标题 desc: 'desc', // 分享描述 path: 'path' // 分享路径 } } })
27.534351
128
0.534239
55c4deaf43b07b212bf20ed1ad286841d6d7c517
6,191
js
JavaScript
Lessons/Lesson 04/js/js/main.js
ra1ngo/monkey
25eb57d7224283ccbb0b76217505bc171656c365
[ "MIT" ]
null
null
null
Lessons/Lesson 04/js/js/main.js
ra1ngo/monkey
25eb57d7224283ccbb0b76217505bc171656c365
[ "MIT" ]
null
null
null
Lessons/Lesson 04/js/js/main.js
ra1ngo/monkey
25eb57d7224283ccbb0b76217505bc171656c365
[ "MIT" ]
null
null
null
//если есть сервер или локалка //без сервака не обойти CORS //или добавить --allow-file-access-from-files var img = new Image(); img.src = "./img/elli_walk.png"; img.onload = function() { main(img); } function main(img){ var canvas = document.getElementById("canvas"); var gl = canvas.getContext("webgl"); if (!gl) { // у вас не работает webgl! alert('webgl не работает'); } //вьюпорт gl.viewport(0, 0, canvas.width, canvas.height); /* //vao поддерживает в 1 версии webgl через расширение ext = gl.getExtension("OES_vertex_array_object"); var vao = ext.createVertexArrayOES(); //var vao = gl.createVertexArray(); //gl.bindVertexArray(vao); ext.bindVertexArrayOES(vao); */ var shader_vertex_source=` attribute vec3 position; attribute vec3 color; attribute vec2 texCoord; varying vec3 vertexColor; varying vec2 TexCoord; void main() { gl_Position = vec4(position, 1.0); vertexColor = color; TexCoord = texCoord; }`; var shader_fragment_source=` precision mediump float; varying vec3 vertexColor; varying vec2 TexCoord; uniform float alpha; uniform sampler2D ourTexture; void main() { gl_FragColor = texture2D(ourTexture, TexCoord); }`; ////////////////////////// function createShader(gl, type, source) { var shader = gl.createShader(type); // создание шейдера gl.shaderSource(shader, source); // устанавливаем шейдеру его программный код gl.compileShader(shader); // компилируем шейдер // Проверить успешное завершение компиляции if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { alert("Не скомпилировался шейдер: " + source + "\n\n" + gl.getShaderInfoLog(shader)); return null; } return shader; } var vertexShader = createShader(gl, gl.VERTEX_SHADER, shader_vertex_source); var fragmentShader = createShader(gl, gl.FRAGMENT_SHADER, shader_fragment_source); var shaderProgram = gl.createProgram(); gl.attachShader(shaderProgram, vertexShader); gl.attachShader(shaderProgram, fragmentShader); gl.linkProgram(shaderProgram); if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) { alert("Не слинковалась шейдерная программа: \n" + gl.getProgramInfoLog(shaderProgram)); } //////////////////////// //массив вершин треугольника var vertices = [ // Позиции 0.5, 0.5, 0.0, // Верхний правый угол 0.5, -0.5, 0.0, // Нижний правый угол -0.5, -0.5, 0.0, // Нижний левый угол -0.5, 0.5, 0.0 // Верхний левый угол ]; var indices = [ 0, 1, 3, // Первый треугольник 1, 2, 3 // Второй треугольник ]; var colors = [ // Цвета 1.0, 0.0, 0.0, // Верхний правый угол 0.0, 1.0, 0.0, // Нижний правый угол 0.0, 0.0, 1.0, // Нижний левый угол 1.0, 0.0, 1.0 // Верхний левый угол ]; var texCoords = [ 1.0, 1.0, // Верхний правый угол 1.0, 0.0, // Нижний правый угол 0.0, 0.0, // Нижний левый угол 0.0, 1.0 // Верхний левый угол ]; var texture = gl.createTexture(); gl.bindTexture(gl.TEXTURE_2D, texture); gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, img); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); gl.bindTexture(gl.TEXTURE_2D, null); //объекты вершинного буфера (vertex buffer objects) var VBO = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, VBO); // Передадим информацию о вершинах в OpenGL gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW); //цвета var colorBO = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, colorBO); // Передадим информацию о вершинах в OpenGL gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(colors), gl.STATIC_DRAW); //текстурные координаты var texBO = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, texBO); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(texCoords), gl.STATIC_DRAW); //инфа о индексах var IBO = gl.createBuffer(); gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, IBO); gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW); function loop(){ // очищаем canvas gl.clearColor(0.2, 0.3, 0.3, 1.0); gl.clear(gl.COLOR_BUFFER_BIT); gl.enable(gl.DEPTH_TEST); // включает использование буфера глубины gl.depthFunc(gl.LEQUAL); // определяет работу буфера глубины: более ближние объекты перекрывают дальние gl.enable(gl.BLEND); gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); var alphaLocation = gl.getUniformLocation(shaderProgram, "alpha"); gl.useProgram(shaderProgram); gl.uniform1f(alphaLocation, 0.5); gl.bindBuffer(gl.ARRAY_BUFFER, VBO); posLoc = gl.getAttribLocation(shaderProgram, "position"); gl.vertexAttribPointer(posLoc, 3, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(posLoc); gl.bindBuffer(gl.ARRAY_BUFFER, colorBO); colorLoc = gl.getAttribLocation(shaderProgram, "color"); gl.vertexAttribPointer(colorLoc, 3, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(colorLoc); gl.bindBuffer(gl.ARRAY_BUFFER, texBO); texLoc = gl.getAttribLocation(shaderProgram, "texCoord"); gl.vertexAttribPointer(texLoc, 2, gl.FLOAT, false, 0, 0); gl.enableVertexAttribArray(texLoc); gl.activeTexture(gl.TEXTURE0); gl.bindTexture(gl.TEXTURE_2D, texture); var samplerUniform = gl.getUniformLocation(shaderProgram, "ourTexture"); gl.uniform1i(samplerUniform, 0); gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, IBO); gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0); gl.disable(gl.BLEND); requestAnimationFrame(loop); }; loop(); }
32.244792
112
0.638669
55c5bd2c91b45603cd821620065651308b123f40
38,436
js
JavaScript
public/js/chunks/reports.js
OnlineMarten/pcc3
2956f379518f937627149fe83049075a5a092169
[ "MIT" ]
null
null
null
public/js/chunks/reports.js
OnlineMarten/pcc3
2956f379518f937627149fe83049075a5a092169
[ "MIT" ]
null
null
null
public/js/chunks/reports.js
OnlineMarten/pcc3
2956f379518f937627149fe83049075a5a092169
[ "MIT" ]
null
null
null
"use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([["reports"],{ /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/DateRangePicker.vue?vue&type=script&lang=js&": /*!**********************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/DateRangePicker.vue?vue&type=script&lang=js& ***! \**********************************************************************************************************************************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ name: "DateRangePicker", props: { value: Array, hint: { type: String, value: "" }, label: { type: String, value: "" }, prepend_icon: { type: String, "default": "" }, prepend_inner_icon: { type: String, "default": "" }, dense: { type: Boolean, "default": false }, outlined: { type: Boolean, "default": false }, placeholder: { type: String, "default": "selecteer een datumbereik" } }, data: function data() { return { menuDate: false }; }, mounted: function mounted() {}, watch: { value: { deep: true, handler: function handler(val, oldval) { console.log("dates changed in daterangepicker"); } } }, computed: { dates: { //show sets and gets the value get: function get() { console.log("dates get"); return this.value; }, set: function set(value) { console.log("dates set"); this.$emit("input", value); this.$emit("datesChanged"); } }, computedDateFormattedDates: function computedDateFormattedDates() { //return this.dates.join(" ~ "); console.log("formatting dates"); var options = { //weekday: "short", year: "numeric", month: "short", day: "numeric" }; console.log("#dates: " + this.dates.length); if (this.dates.length == 2) { console.log("we have 2 dates"); var date1 = new Date(this.$options.filters.rwDate(this.dates[0])); var date2 = new Date(this.$options.filters.rwDate(this.dates[1])); if (date2 < date1) { var temp = this.dates[0]; this.dates[0] = this.dates[1]; this.dates[1] = temp; //this.dates[0] = date2.toLocaleDateString("nl-NL", options); //this.dates[1] = date1.toLocaleDateString("nl-NL", options); } //else this.dates[0] = date1.toLocaleDateString("nl-NL", options); //this.dates[1] = date2.toLocaleDateString("nl-NL", options);*/ this.menuDate = false; return new Date(this.$options.filters.rwDate(this.dates[0])).toLocaleDateString("nl-NL", options) + " t/m " + new Date(this.$options.filters.rwDate(this.dates[1])).toLocaleDateString("nl-NL", options); } return; } }, methods: { checkClose: function checkClose(date) { console.log("daterange clicked with date:" + date); } } }); /***/ }), /***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/Control/Reports.vue?vue&type=script&lang=js&": /*!*****************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/Control/Reports.vue?vue&type=script&lang=js& ***! \*****************************************************************************************************************************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _components_DateRangePicker_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/DateRangePicker.vue */ "./resources/js/components/DateRangePicker.vue"); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ name: "Reports", components: { DateRangePicker: _components_DateRangePicker_vue__WEBPACK_IMPORTED_MODULE_0__["default"] }, data: function data() { return { //table dbTable: "transactions", amount: 0, amountRefunded: 0, vat: 0, vatRefunded: 0, loading: false, newItem: true, dialogRefundOrder: false, period: "last7Days", headers: [{ text: "Transactiedatum", align: "start", sortable: true, value: "updated_at" }, { text: "Transactie", value: "transactionId" }, { text: "Boeking", value: "order.booking.bookingId" }, { text: "Datum vaartocht", value: "cruisedate" }, { text: "Klant", value: "customerName" }, { text: "Type", value: "order.paymentType" }, { text: "Bedrag", value: "totalAmount", sortable: false, align: "end" }, { text: "BTW", value: "totalVat", sortable: false, align: "end" }, { text: "Status", value: "status" }], //end table //end edit dbItem tableData: [], dates: [] }; }, created: function created() { var date = new Date(); var curDate = new Date(); console.log("curdate=" + date); var date2 = new Date(); var pastDate = new Date(date2.setDate(date2.getDate() - 6)); // console.log("pastdate=" + pastDate); this.dates.push(pastDate.toISOString().slice(0, 10)); this.dates.push(curDate.toISOString().slice(0, 10)); this.getTransactions(); }, watch: {}, computed: { dateRangeText: function dateRangeText() { console.log("adjusting date text"); return this.dates.join(" ~ "); } }, methods: { allTime: function allTime() { var firstDay = new Date(2021, 0, 1, 12); //add 12 o clock to avoid timezone issues var lastDay = new Date(); this.pushDates(firstDay, lastDay); this.period = "allTime"; this.getTransactions(); }, thisYear: function thisYear() { var date = new Date(); var firstDay = new Date(2022, 0, 1, 12); //add 12 o clock to avoid timezone issues var lastDay = new Date(); // console.log("firstday / lastday " + firstDay + " / " + lastDay); this.pushDates(firstDay, lastDay); this.period = "thisYear"; this.getTransactions(); }, lastMonth: function lastMonth() { var date = new Date(); var firstDay = new Date(date.getFullYear(), date.getMonth() - 1, 1, 12); //add 12 o clock to avoid timezone issues var lastDay = new Date(date.getFullYear(), date.getMonth(), 0, 12); // console.log("firstday / lastday " + firstDay + " / " + lastDay); this.pushDates(firstDay, lastDay); this.period = "lastMonth"; this.getTransactions(); }, thisMonth: function thisMonth() { var date = new Date(); var firstDay = new Date(date.getFullYear(), date.getMonth(), 1, 12); var lastDay = new Date(); // console.log("firstday / lastday " + firstDay + " / " + lastDay); this.pushDates(firstDay, lastDay); this.period = "thisMonth"; this.getTransactions(); }, last7Days: function last7Days() { var date = new Date(); var lastDay = new Date(); var firstDay = new Date(date.setDate(date.getDate() - 6)); this.period = "last7Days"; this.pushDates(firstDay, lastDay); }, pushDates: function pushDates(first, last) { this.dates = []; this.dates.push(first.toISOString().slice(0, 10)); this.dates.push(last.toISOString().slice(0, 10)); }, //DB functions getTransactions: function getTransactions() { var _this = this; this.loading = true; console.log("date 1: " + this.dates[0]); console.log("date 2: " + this.dates[1]); axios.post("admin/gettransactions", { start: this.dates[0], end: this.dates[1], status: "completed" }).then(function (response) { console.log("get tableData"); _this.tableData = response.data.dbData; _this.amount = response.data.amount; _this.amountRefunded = response.data.amountRefunded; _this.vat = response.data.vat; _this.vatRefunded = response.data.vatRefunded; _this.loading = false; })["catch"](function (error) { console.log(error.response.data.errors); _this.errors = error.response.data.errors; _this.loading = false; }); } //end DB functions } }); /***/ }), /***/ "./resources/js/components/DateRangePicker.vue": /*!*****************************************************!*\ !*** ./resources/js/components/DateRangePicker.vue ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _DateRangePicker_vue_vue_type_template_id_41877cfc___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DateRangePicker.vue?vue&type=template&id=41877cfc& */ "./resources/js/components/DateRangePicker.vue?vue&type=template&id=41877cfc&"); /* harmony import */ var _DateRangePicker_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DateRangePicker.vue?vue&type=script&lang=js& */ "./resources/js/components/DateRangePicker.vue?vue&type=script&lang=js&"); /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); /* normalize component */ ; var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( _DateRangePicker_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], _DateRangePicker_vue_vue_type_template_id_41877cfc___WEBPACK_IMPORTED_MODULE_0__.render, _DateRangePicker_vue_vue_type_template_id_41877cfc___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, false, null, null, null ) /* hot reload */ if (false) { var api; } component.options.__file = "resources/js/components/DateRangePicker.vue" /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); /***/ }), /***/ "./resources/js/views/Control/Reports.vue": /*!************************************************!*\ !*** ./resources/js/views/Control/Reports.vue ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _Reports_vue_vue_type_template_id_ff4ee8c4_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Reports.vue?vue&type=template&id=ff4ee8c4&scoped=true& */ "./resources/js/views/Control/Reports.vue?vue&type=template&id=ff4ee8c4&scoped=true&"); /* harmony import */ var _Reports_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Reports.vue?vue&type=script&lang=js& */ "./resources/js/views/Control/Reports.vue?vue&type=script&lang=js&"); /* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js"); /* normalize component */ ; var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])( _Reports_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"], _Reports_vue_vue_type_template_id_ff4ee8c4_scoped_true___WEBPACK_IMPORTED_MODULE_0__.render, _Reports_vue_vue_type_template_id_ff4ee8c4_scoped_true___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns, false, null, "ff4ee8c4", null ) /* hot reload */ if (false) { var api; } component.options.__file = "resources/js/views/Control/Reports.vue" /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports); /***/ }), /***/ "./resources/js/components/DateRangePicker.vue?vue&type=script&lang=js&": /*!******************************************************************************!*\ !*** ./resources/js/components/DateRangePicker.vue?vue&type=script&lang=js& ***! \******************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_DateRangePicker_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DateRangePicker.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/DateRangePicker.vue?vue&type=script&lang=js&"); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_DateRangePicker_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./resources/js/views/Control/Reports.vue?vue&type=script&lang=js&": /*!*************************************************************************!*\ !*** ./resources/js/views/Control/Reports.vue?vue&type=script&lang=js& ***! \*************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Reports_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Reports.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/Control/Reports.vue?vue&type=script&lang=js&"); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Reports_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]); /***/ }), /***/ "./resources/js/components/DateRangePicker.vue?vue&type=template&id=41877cfc&": /*!************************************************************************************!*\ !*** ./resources/js/components/DateRangePicker.vue?vue&type=template&id=41877cfc& ***! \************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_DateRangePicker_vue_vue_type_template_id_41877cfc___WEBPACK_IMPORTED_MODULE_0__.render), /* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_DateRangePicker_vue_vue_type_template_id_41877cfc___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) /* harmony export */ }); /* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_DateRangePicker_vue_vue_type_template_id_41877cfc___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DateRangePicker.vue?vue&type=template&id=41877cfc& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/DateRangePicker.vue?vue&type=template&id=41877cfc&"); /***/ }), /***/ "./resources/js/views/Control/Reports.vue?vue&type=template&id=ff4ee8c4&scoped=true&": /*!*******************************************************************************************!*\ !*** ./resources/js/views/Control/Reports.vue?vue&type=template&id=ff4ee8c4&scoped=true& ***! \*******************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Reports_vue_vue_type_template_id_ff4ee8c4_scoped_true___WEBPACK_IMPORTED_MODULE_0__.render), /* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Reports_vue_vue_type_template_id_ff4ee8c4_scoped_true___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns) /* harmony export */ }); /* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_Reports_vue_vue_type_template_id_ff4ee8c4_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Reports.vue?vue&type=template&id=ff4ee8c4&scoped=true& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/Control/Reports.vue?vue&type=template&id=ff4ee8c4&scoped=true&"); /***/ }), /***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/DateRangePicker.vue?vue&type=template&id=41877cfc&": /*!***************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/DateRangePicker.vue?vue&type=template&id=41877cfc& ***! \***************************************************************************************************************************************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "render": () => (/* binding */ render), /* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns) /* harmony export */ }); var render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "v-menu", { attrs: { "close-on-content-click": false, "nudge-right": 40, transition: "scale-transition", "offset-y": "", "min-width": "auto", }, scopedSlots: _vm._u([ { key: "activator", fn: function (ref) { var on = ref.on var attrs = ref.attrs return [ _c( "v-text-field", _vm._g( _vm._b( { attrs: { value: _vm.computedDateFormattedDates, label: _vm.label, hint: _vm.hint, "persistent-hint": "", "prepend-icon": _vm.prepend_icon, "prepend-inner-icon": _vm.prepend_inner_icon, dense: _vm.dense, outlined: _vm.outlined, readonly: "", placeholder: _vm.placeholder, }, }, "v-text-field", attrs, false ), on ) ), ] }, }, ]), model: { value: _vm.menuDate, callback: function ($$v) { _vm.menuDate = $$v }, expression: "menuDate", }, }, [ _vm._v(" "), _c("v-date-picker", { attrs: { flat: "", range: "", locale: "NL", "no-title": "", "first-day-of-week": 1, }, on: { input: _vm.checkClose }, model: { value: _vm.dates, callback: function ($$v) { _vm.dates = $$v }, expression: "dates", }, }), ], 1 ) } var staticRenderFns = [] render._withStripped = true /***/ }), /***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/Control/Reports.vue?vue&type=template&id=ff4ee8c4&scoped=true&": /*!**********************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/views/Control/Reports.vue?vue&type=template&id=ff4ee8c4&scoped=true& ***! \**********************************************************************************************************************************************************************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "render": () => (/* binding */ render), /* harmony export */ "staticRenderFns": () => (/* binding */ staticRenderFns) /* harmony export */ }); var render = function () { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h return _c( "div", [ _c( "v-card", [ _c("v-card-title", [_vm._v("Accountant Rapportage Omzet en BTW")]), _vm._v(" "), _c("v-card-title", [_vm._v(" Periode ")]), _vm._v(" "), _c( "v-card-text", { staticClass: "hidden-print-only" }, [ _c( "v-btn", { staticClass: "mr-1 mb-1", attrs: { outlined: "", color: _vm.period == "last7Days" ? "blue" : "", }, on: { click: _vm.last7Days }, }, [_vm._v("Laatste 7 dagen")] ), _vm._v(" "), _c( "v-btn", { staticClass: "mr-1 mb-1", attrs: { outlined: "", color: _vm.period == "thisMonth" ? "blue" : "", }, on: { click: _vm.thisMonth }, }, [_vm._v("Deze maand")] ), _vm._v(" "), _c( "v-btn", { staticClass: "mr-1 mb-1", attrs: { outlined: "", color: _vm.period == "lastMonth" ? "blue" : "", }, on: { click: _vm.lastMonth }, }, [_vm._v("Vorige maand")] ), _vm._v(" "), _c( "v-btn", { staticClass: "mr-1 mb-1", attrs: { outlined: "", color: _vm.period == "thisYear" ? "blue" : "", }, on: { click: _vm.thisYear }, }, [_vm._v("Dit jaar")] ), _vm._v(" "), _c( "v-btn", { staticClass: "mr-1 mb-1", attrs: { outlined: "", color: _vm.period == "allTime" ? "blue" : "", }, on: { click: _vm.allTime }, }, [_vm._v("Alles")] ), _vm._v(" "), _c("DateRangePicker", { staticClass: "mr-1 mb-1", attrs: { prepend_inner_icon: "mdi-calendar", outlined: true, dense: true, }, model: { value: _vm.dates, callback: function ($$v) { _vm.dates = $$v }, expression: "dates", }, }), ], 1 ), _vm._v(" "), _c("v-card-text", { staticClass: "hidden-print-only" }), _vm._v(" "), _c("v-card-title", [_vm._v(" Samenvatting ")]), _vm._v(" "), _vm.dates.length == 2 ? _c("v-card-text", [ _c("p", [ _c("b", [_vm._v("Vanaf:")]), _vm._v( " " + _vm._s(_vm._f("toDateNl")(this.dates[0])) + " 00:00:000" ), _c("br"), _vm._v(" "), _c("b", [_vm._v("Tot en met:")]), _vm._v( " " + _vm._s(_vm._f("toDateNl")(this.dates[1])) + " 23:59:999\n " ), ]), _vm._v(" "), _c("table", [ _c("tr", [ _c("th", { staticClass: "text-left" }, [_vm._v("Totalen")]), _vm._v(" "), _c("th", { staticClass: "text-right px-3" }, [ _vm._v("BTW"), ]), _vm._v(" "), _c("th", { staticClass: "text-right px-3" }, [ _vm._v("Bedrag"), ]), ]), _vm._v(" "), _c("tr", [ _c("td", [_vm._v("Ontvangen")]), _vm._v(" "), _c("td", { staticClass: "text-right px-3" }, [ _vm._v(_vm._s(_vm._f("toCurrency")(_vm.vat))), ]), _vm._v(" "), _c("td", { staticClass: "text-right px-3" }, [ _vm._v(_vm._s(_vm._f("toCurrency")(_vm.amount))), ]), ]), _vm._v(" "), _c("tr", [ _c("td", [_vm._v("Retour")]), _vm._v(" "), _c("td", { staticClass: "text-right px-3" }, [ _vm._v(_vm._s(_vm._f("toCurrency")(_vm.vatRefunded))), ]), _vm._v(" "), _c("td", { staticClass: "text-right px-3" }, [ _vm._v(_vm._s(_vm._f("toCurrency")(_vm.amountRefunded))), ]), ]), _vm._v(" "), _c("tr", [ _c("td", [_vm._v("Totaal")]), _vm._v(" "), _c( "td", { staticClass: "text-right px-3", staticStyle: { "border-top": "1px solid #ccc" }, }, [ _vm._v( "\n " + _vm._s( _vm._f("toCurrency")(_vm.vat - _vm.vatRefunded) ) + "\n " ), ] ), _vm._v(" "), _c( "td", { staticClass: "text-right px-3", staticStyle: { "border-top": "1px solid #ccc" }, }, [ _c("b", [ _vm._v( _vm._s( _vm._f("toCurrency")( _vm.amount - _vm.amountRefunded ) ) ), ]), ] ), ]), ]), ]) : _vm._e(), ], 1 ), _vm._v(" "), _vm.dates.length == 2 ? _c( "span", [ _c("v-data-table", { staticClass: "elevation-1", attrs: { headers: _vm.headers, items: _vm.tableData, "sort-by": "updated_at", "sort-desc": true, loading: _vm.loading, "items-per-page": -1, }, scopedSlots: _vm._u( [ { key: "item.updated_at", fn: function (ref) { var item = ref.item return [ _vm._v( _vm._s(_vm._f("toShortDateTime")(item.created_at)) ), ] }, }, { key: "item.totalAmount", fn: function (ref) { var item = ref.item return [ _vm._v( _vm._s( _vm._f("toCurrency")( item.amount - item.amountRefunded ) ) ), ] }, }, { key: "item.totalVat", fn: function (ref) { var item = ref.item return [ _vm._v( _vm._s( _vm._f("toCurrency")(item.vat - item.vatRefunded) ) ), ] }, }, { key: "item.cruisedate", fn: function (ref) { var item = ref.item return [ _vm._v( _vm._s( _vm._f("toShortDateTime")( item.order.booking.start ) ) ), ] }, }, { key: "item.name", fn: function (ref) { var item = ref.item return [ _c("v-avatar", { staticClass: "mr-1 mb-1", attrs: { tile: "", color: item.color, size: "16" }, }), _vm._v(_vm._s(item.name) + "\n "), ] }, }, { key: "item.status", fn: function (ref) { var item = ref.item return [ item.status == "completed" ? _c( "span", [ _c( "v-chip", { staticClass: "ma-2", attrs: { color: "#CAE8CD", "text-color": "#4AA9B2", }, }, [_vm._v("completed\n ")] ), ], 1 ) : _vm._e(), ] }, }, { key: "item.customerName", fn: function (ref) { var item = ref.item return [ _vm._v( _vm._s(item.order.booking.customer.firstName) + "\n " + _vm._s(item.order.booking.customer.lastName) + "\n " ), ] }, }, { key: "top", fn: function () { return [ _c( "v-toolbar", { attrs: { flat: "" } }, [_vm._v(" Transacties"), _c("v-spacer")], 1 ), ] }, proxy: true, }, { key: "no-data", fn: function () { return [_vm._v(" geen transacties gevonden ")] }, proxy: true, }, ], null, true ), }), ], 1 ) : _vm._e(), ], 1 ) } var staticRenderFns = [] render._withStripped = true /***/ }) }]);
35.424885
704
0.473931
55c7df971e1f1f4421ea6c1add54f83d8b9c18c2
66
js
JavaScript
__testfixtures__/NonImport.output.js
stungkit/js-import-sort
bda3624078375ac99a20570fc81781964f569a12
[ "MIT" ]
12
2016-10-03T19:02:13.000Z
2020-08-16T10:20:52.000Z
__testfixtures__/NonImport.output.js
stungkit/js-import-sort
bda3624078375ac99a20570fc81781964f569a12
[ "MIT" ]
30
2016-10-03T20:11:16.000Z
2021-09-01T07:37:36.000Z
__testfixtures__/NonImport.output.js
stungkit/js-import-sort
bda3624078375ac99a20570fc81781964f569a12
[ "MIT" ]
5
2018-01-16T16:09:12.000Z
2019-07-27T06:55:09.000Z
/* eslint-disable max-len, max-lines */ const REPORT_NAMES = [];
16.5
39
0.666667
55c8f7bbfa0a3f3bbcc1758e4723a2e9ff42c864
16,229
js
JavaScript
doxygen/html/navtreeindex3.js
arrowd/klee.github.io
93c6d236275ed870155296d9168dfea930020ef9
[ "CC-BY-3.0" ]
null
null
null
doxygen/html/navtreeindex3.js
arrowd/klee.github.io
93c6d236275ed870155296d9168dfea930020ef9
[ "CC-BY-3.0" ]
null
null
null
doxygen/html/navtreeindex3.js
arrowd/klee.github.io
93c6d236275ed870155296d9168dfea930020ef9
[ "CC-BY-3.0" ]
null
null
null
var NAVTREEINDEX3 = { "Time_8h.html#a1128d2405ba101b3d68fef0e40025cca":[3,0,1,0,8,1,14], "Time_8h.html#a1211917c3f067cc70f66551c1ea04c38":[3,0,1,0,8,1,30], "Time_8h.html#a170cb5af692fe9316f8a8716f9d3a26c":[3,0,1,0,8,1,6], "Time_8h.html#a3e761aec5e54dda10f6111f3e79ab6f5":[3,0,1,0,8,1,15], "Time_8h.html#a425ef2653071cee253f5f8a5eced21e9":[3,0,1,0,8,1,12], "Time_8h.html#a503877cf183ed9e9008091e1749f8d6d":[3,0,1,0,8,1,23], "Time_8h.html#a56fe0e13843972d9f3935a07134f3a67":[3,0,1,0,8,1,3], "Time_8h.html#a661eea21f27837da29e46d4fadcb61d8":[3,0,1,0,8,1,16], "Time_8h.html#a6b420b823eab6f10dc987035680cbe26":[3,0,1,0,8,1,9], "Time_8h.html#a6d72b20b170b35b7956a3ad0f8323e03":[3,0,1,0,8,1,8], "Time_8h.html#a7116c62985d8853b65dcf9533f0c94ba":[3,0,1,0,8,1,24], "Time_8h.html#a7a46461fad950f3294b66da0126af3b0":[3,0,1,0,8,1,31], "Time_8h.html#a8a2fcdd48f86106bcc3d1c5213ef6e60":[3,0,1,0,8,1,21], "Time_8h.html#a9b09557897caf4e2e6b0f21de7d0511c":[3,0,1,0,8,1,29], "Time_8h.html#aa01a586a5d2194c83ad246353b50079e":[3,0,1,0,8,1,20], "Time_8h.html#aa73d09268f812401d247ce56235a8f0a":[3,0,1,0,8,1,33], "Time_8h.html#aace30cfa33279d06b534770e90b8de34":[3,0,1,0,8,1,27], "Time_8h.html#ab17e6b60a25d3ff39a7a0f10790dcfab":[3,0,1,0,8,1,5], "Time_8h.html#abfc5c309b4945728c4fc944f8be27e1e":[3,0,1,0,8,1,4], "Time_8h.html#ac20fd0e67f408babf58b84941b75f9b6":[3,0,1,0,8,1,32], "Time_8h.html#ac77e88b685e589e38cdad4f7d6d22110":[3,0,1,0,8,1,11], "Time_8h.html#ad83ca2cef1c469e8f9758eea587f68a6":[3,0,1,0,8,1,2], "Time_8h.html#ad8a2de7f138b11fb76cd2ca71fa15927":[3,0,1,0,8,1,26], "Time_8h.html#adae47f2d5c597b3defbda42477daea6b":[3,0,1,0,8,1,28], "Time_8h.html#ae1d2a58caff3b097649d3d12923595e0":[3,0,1,0,8,1,34], "Time_8h.html#ae20b3d9312151c05693b1b7e2161e0de":[3,0,1,0,8,1,18], "Time_8h.html#aeb3f48136c748e6ca9755619bc6b8963":[3,0,1,0,8,1,7], "Time_8h.html#af1de3ce54fb4c2771d3864c0f515e518":[3,0,1,0,8,1,10], "Time_8h.html#af9b3d8728f9ee8309e6db57d2c13e8ab":[3,0,1,0,8,1,22], "Time_8h.html#afb8943cc9972aa31cfa3eece463e263b":[3,0,1,0,8,1,25], "Time_8h.html#aff541ec3cfb8da6f178aa969bcbcd787":[3,0,1,0,8,1,19], "Time_8h_source.html":[3,0,1,0,8,1], "TimerStatIncrementer_8h.html":[3,0,1,0,6,2], "TimerStatIncrementer_8h_source.html":[3,0,1,0,6,2], "Timer_8cpp.html":[3,0,2,5,7], "Timer_8cpp_source.html":[3,0,2,5,7], "Timer_8h.html":[3,0,1,0,7,10], "Timer_8h_source.html":[3,0,1,0,7,10], "TimingSolver_8cpp.html":[3,0,2,1,34], "TimingSolver_8cpp_source.html":[3,0,2,1,34], "TimingSolver_8h.html":[3,0,2,1,35], "TimingSolver_8h_source.html":[3,0,2,1,35], "TreeStream_8cpp.html":[3,0,2,5,8], "TreeStream_8cpp.html#ad78e062f62e0d6e453941fb4ca843e4d":[3,0,2,5,8,0], "TreeStream_8cpp_source.html":[3,0,2,5,8], "TreeStream_8h.html":[3,0,1,0,0,11], "TreeStream_8h.html#af04ff25b985f4dea63064753ab25e150":[3,0,1,0,0,11,2], "TreeStream_8h_source.html":[3,0,1,0,0,11], "Updates_8cpp.html":[3,0,2,2,16], "Updates_8cpp.html#a143db8b18f93c17b2bdac660d42a02bd":[3,0,2,2,16,0], "Updates_8cpp_source.html":[3,0,2,2,16], "UserSearcher_8cpp.html":[3,0,2,1,36], "UserSearcher_8cpp.html#a2476b0ea6d46f68ce3ad0980479bb9b4":[3,0,2,1,36,0], "UserSearcher_8cpp_source.html":[3,0,2,1,36], "UserSearcher_8h.html":[3,0,2,1,37], "UserSearcher_8h.html#a879c58ffd759acf15e01314d8a2d39cb":[3,0,2,1,37,2], "UserSearcher_8h.html#ae6d17ba7397633f1565490787bdc2daf":[3,0,2,1,37,0], "UserSearcher_8h.html#af67d0afd25e79f64e90f500426ccfa96":[3,0,2,1,37,1], "UserSearcher_8h_source.html":[3,0,2,1,37], "ValidatingSolver_8cpp.html":[3,0,2,4,26], "ValidatingSolver_8cpp.html#a1e5617742191d05259fa68f9caac6f98":[3,0,2,4,26,1], "ValidatingSolver_8cpp_source.html":[3,0,2,4,26], "Version_8h.html":[3,0,1,0,1,0], "Version_8h.html#a861eb46dd835bc297d63c60418d43d17":[3,0,1,0,1,0,1], "Version_8h.html#a9f014c692cb45ac0ac15c5daa36adc08":[3,0,1,0,1,0,0], "Version_8h_source.html":[3,0,1,0,1,0], "WorkaroundLLVMPR39177_8cpp.html":[3,0,2,3,15], "WorkaroundLLVMPR39177_8cpp_source.html":[3,0,2,3,15], "Z3Builder_8cpp.html":[3,0,2,4,27], "Z3Builder_8cpp_source.html":[3,0,2,4,27], "Z3Builder_8h.html":[3,0,2,4,28], "Z3Builder_8h.html#a77d19bb43beb962fa3a5fb2d42cce143":[3,0,2,4,28,3], "Z3Builder_8h.html#af2d7f4b56e4cf69805bb2b67b80efaa9":[3,0,2,4,28,4], "Z3Builder_8h_source.html":[3,0,2,4,28], "Z3Solver_8cpp.html":[3,0,2,4,29], "Z3Solver_8cpp_source.html":[3,0,2,4,29], "Z3Solver_8h.html":[3,0,2,4,30], "Z3Solver_8h_source.html":[3,0,2,4,30], "annotated.html":[2,0], "classCachingSolver.html":[2,0,3], "classCachingSolver.html#a01b0d085641bfb6c1b2b16b807f38502":[2,0,3,13], "classCachingSolver.html#a04e1b503bb45eefd5087468a1c11465a":[2,0,3,8], "classCachingSolver.html#a1a273fcab34b2e7d8f3f398a8f0bc3f4":[2,0,3,9], "classCachingSolver.html#a20d503e6e84ad2670594eb18e7a13661":[2,0,3,3], "classCachingSolver.html#a42edbde4bc475118ea6d1bbaf9397512":[2,0,3,7], "classCachingSolver.html#a59dd8a53bd2ff1096c9122e241a6da51":[2,0,3,15], "classCachingSolver.html#a6046bf40cc3ac3e009d6b2621129f76e":[2,0,3,2], "classCachingSolver.html#a85e36ba92b09d1838f6063b182ca01b5":[2,0,3,10], "classCachingSolver.html#a9b19940336fc0f9788582853ef528e2c":[2,0,3,4], "classCachingSolver.html#a9ff9c8543bd220838b111ef417a0a854":[2,0,3,14], "classCachingSolver.html#ac6a4aa228fbc839cac40c77c894f0251":[2,0,3,6], "classCachingSolver.html#ad5771d92c30495a081cc2ca1b403a20e":[2,0,3,16], "classCachingSolver.html#ad89503f0ec32cfe36a09a7aef1c37693":[2,0,3,11], "classCachingSolver.html#af49efd7ef4057862815c2238beb7f5ae":[2,0,3,5], "classCachingSolver.html#af64955e2c5e8ce9bd92d475884e132b4":[2,0,3,12], "classCexCachingSolver.html":[2,0,4], "classCexCachingSolver.html#a045996e7628d3976a5363d4dd8bd44cf":[2,0,4,1], "classCexCachingSolver.html#a15a66352efcd4cf543350e91cb50d918":[2,0,4,9], "classCexCachingSolver.html#a36b49e07c5db964f400d20bd13367dc3":[2,0,4,3], "classCexCachingSolver.html#a388349a878c26608f927e9206767a523":[2,0,4,6], "classCexCachingSolver.html#a4bd59e997b3685639f430f800b3681fd":[2,0,4,5], "classCexCachingSolver.html#a53bbf082aa81c7c1e6886c22b3d35131":[2,0,4,14], "classCexCachingSolver.html#a7165819f615708e2c3ad72583549efc2":[2,0,4,12], "classCexCachingSolver.html#a9457c298784506b9d235e616b142671c":[2,0,4,16], "classCexCachingSolver.html#aaf54123e6c707023026e938b8bea81d8":[2,0,4,2], "classCexCachingSolver.html#ab04a18a158bc52e7e1c365232b076272":[2,0,4,10], "classCexCachingSolver.html#ab1bbf51bf59b29e520f075614913483e":[2,0,4,15], "classCexCachingSolver.html#ac6201db9963e60b43ab31250c5687113":[2,0,4,11], "classCexCachingSolver.html#ae545597584417492620afad5bdf4b71a":[2,0,4,7], "classCexCachingSolver.html#ae7b3925d703ea453c673cf11c59fce21":[2,0,4,8], "classCexCachingSolver.html#aecda8c8d031efca0bc3624758258847c":[2,0,4,0], "classCexCachingSolver.html#af7c3859d4d70ff6f93f00685f6f9421c":[2,0,4,4], "classCexCachingSolver.html#af8997c53d553676b1dd399e6fc530adc":[2,0,4,13], "classCexData.html":[2,0,5], "classCexData.html#a0e2e9e91532166b57a7cc99c4affd551":[2,0,5,4], "classCexData.html#a17df21609b77c594c16dd866c22e2273":[2,0,5,2], "classCexData.html#a195828ba453419a59028c13a08a984ab":[2,0,5,11], "classCexData.html#a29c83d34bcd0879216018b160d06e9e5":[2,0,5,5], "classCexData.html#a40238f335294bf944813c01c5a8aa780":[2,0,5,6], "classCexData.html#a42601f170f9188e39e8abc06b61eea33":[2,0,5,3], "classCexData.html#a4769ab3f84a572d696c36cc5762973c7":[2,0,5,9], "classCexData.html#a6c760b4cfb76a7e5b9f0dc81162d7113":[2,0,5,0], "classCexData.html#a6e31b9a0b84e9a253887c02cf4e87cca":[2,0,5,10], "classCexData.html#a771f26f3a7949ad12a7454ad801aa04b":[2,0,5,12], "classCexData.html#aa88babf63fa933c55d9a8937bca66e82":[2,0,5,13], "classCexData.html#ac662aaa03916e181c1934d74f7d787bb":[2,0,5,1], "classCexData.html#ae0f05b0570eefa371745438cdcd14009":[2,0,5,7], "classCexData.html#af61b0252a5cc0ca5f25c190550682281":[2,0,5,8], "classCexExactEvaluator.html":[2,0,6], "classCexExactEvaluator.html#a388ea1010ac1fa7ae8d5cbc108d12b45":[2,0,6,2], "classCexExactEvaluator.html#a467bacfa94652ba14aa2bf4c9e7326c1":[2,0,6,1], "classCexExactEvaluator.html#a8b4539e170099d45f67cc76ffc0f4869":[2,0,6,0], "classCexObjectData.html":[2,0,7], "classCexObjectData.html#a14c7e0b9d901b042d507f78f5f00a716":[2,0,7,9], "classCexObjectData.html#a21bc1dfe6e278092942230bcbcda65ea":[2,0,7,5], "classCexObjectData.html#a386168a15139e4e4bd3d6024feef6cf0":[2,0,7,6], "classCexObjectData.html#a3a117b275136fad9ebcaaeffb4d4c05a":[2,0,7,2], "classCexObjectData.html#a61daa442252e390955b1a5af87d989e2":[2,0,7,0], "classCexObjectData.html#a7abb16bcd596681977c190059a1a02a7":[2,0,7,7], "classCexObjectData.html#a80e1acb4f6aa2f4cb37c27745d2c3d15":[2,0,7,8], "classCexObjectData.html#a92d9cf0b45ceb7b82106bee5c2d058ae":[2,0,7,10], "classCexObjectData.html#ab0232068a7f1459166250e6421c4ac45":[2,0,7,1], "classCexObjectData.html#af6a82a5abca1a7fd0a28f3501402f597":[2,0,7,3], "classCexObjectData.html#afc4520b5220d54f10e266d6b4a833ced":[2,0,7,4], "classCexPossibleEvaluator.html":[2,0,8], "classCexPossibleEvaluator.html#a03bf7929bb4563006843333932d273a5":[2,0,8,0], "classCexPossibleEvaluator.html#a26e000d9f9cc7929d7090a6beb82a83e":[2,0,8,2], "classCexPossibleEvaluator.html#aaedc8827c42ccdba98bc28142a8352af":[2,0,8,1], "classCexRangeEvaluator.html":[2,0,9], "classCexRangeEvaluator.html#a41faae806bc34deb37452e2d2b247e80":[2,0,9,0], "classCexRangeEvaluator.html#aac7c98e1b8393543bcb105ac8b5f24e7":[2,0,9,1], "classCexRangeEvaluator.html#aad0e7ea7157346515f401562d32f34a7":[2,0,9,2], "classDebugInfoExtractor.html":[2,0,10], "classDebugInfoExtractor.html#a1ace974456010cb229d84c2e85d393a9":[2,0,10,0], "classDebugInfoExtractor.html#a1c895430098915b35b14c75e009c9fe2":[2,0,10,6], "classDebugInfoExtractor.html#a51ec2fb8ac06e55f2858bc2c880f113c":[2,0,10,5], "classDebugInfoExtractor.html#a77865947e141eef896145aafd54572f0":[2,0,10,1], "classDebugInfoExtractor.html#a785e1349c265eaa859dd4291e84e48dc":[2,0,10,3], "classDebugInfoExtractor.html#a8f9070b43bbb3624e34274d346ff87a7":[2,0,10,4], "classDebugInfoExtractor.html#aa2c5a8e06f7e609fd67d3e60ee44c73e":[2,0,10,2], "classDenseSet.html":[2,0,11], "classDenseSet.html#a25837f0083e850473e37d3fb5fa4f6cc":[2,0,11,1], "classDenseSet.html#a30c520fee4397090ac7b9ef92d1293c0":[2,0,11,8], "classDenseSet.html#a486ca8235907b7dde7c3417b9aa9d8b2":[2,0,11,5], "classDenseSet.html#a5ade9e3fdfe8b3fcf782ba8d85a0dc18":[2,0,11,0], "classDenseSet.html#aa4904ae0d11582fe0fd8ed0fc25d45ce":[2,0,11,7], "classDenseSet.html#aa86e84223d3e268d55410c3c030d6e0d":[2,0,11,3], "classDenseSet.html#ab5d1099c4ef91b9925beffe6ac153bcd":[2,0,11,6], "classDenseSet.html#abb8ebc00ca0eec5036af643a1d374115":[2,0,11,4], "classDenseSet.html#ad22bdeb30bfee8791c851635a5e2f9cf":[2,0,11,9], "classDenseSet.html#ae25f081925dc8cf64c18f6b728ccb1fe":[2,0,11,2], "classExprReplaceVisitor.html":[2,0,12], "classExprReplaceVisitor.html#a4bebeb4993f430f4f150816708438151":[2,0,12,3], "classExprReplaceVisitor.html#a86f2b7d618b36171311dfcaf6dbe392a":[2,0,12,2], "classExprReplaceVisitor.html#a9780cefcc085f86996b1ac571a50915b":[2,0,12,0], "classExprReplaceVisitor.html#aae876de2c77ac462fc3d83e8d7946a48":[2,0,12,1], "classExprReplaceVisitor.html#ace247fd0ebb323e4e99508ebdede8f54":[2,0,12,4], "classExprReplaceVisitor2.html":[2,0,13], "classExprReplaceVisitor2.html#a02c9a462fb429da54f0b817af46c1103":[2,0,13,1], "classExprReplaceVisitor2.html#a27547df3f07e01927f1988afe3f73de9":[2,0,13,0], "classExprReplaceVisitor2.html#ae330e3799dab25bf61913be5f6593f30":[2,0,13,2], "classFastCexSolver.html":[2,0,14], "classFastCexSolver.html#a1dac411115d378e4b5d6a3a968c3b13e":[2,0,14,4], "classFastCexSolver.html#a74394d9979ad19dc37e4a262ca38d8be":[2,0,14,2], "classFastCexSolver.html#ab2c2742c295211a2f45257b6dad8da49":[2,0,14,1], "classFastCexSolver.html#ab941879050c8fde6260afa66240496ad":[2,0,14,0], "classFastCexSolver.html#ac587c7f6173dcc944e5b142344cfcc03":[2,0,14,3], "classIndependentElementSet.html":[2,0,15], "classIndependentElementSet.html#a2b815f9214e6070537b973fe2a3ac269":[2,0,15,2], "classIndependentElementSet.html#a52b8fee7b3c2ae0d12a49813623fa7cf":[2,0,15,10], "classIndependentElementSet.html#a5ff258728c281346bb9feaf054874db3":[2,0,15,5], "classIndependentElementSet.html#a69c56fa981fcd695a10804984a47f02f":[2,0,15,6], "classIndependentElementSet.html#a6aa7d2699b57d34763bb347dbff1f58d":[2,0,15,3], "classIndependentElementSet.html#a8910801935afa38051337cb4d5d2503d":[2,0,15,1], "classIndependentElementSet.html#a8a1ed6df8740019bcf56fb028e713671":[2,0,15,0], "classIndependentElementSet.html#aa8671f7e2494bcf0c5dcb53c68fbfa6c":[2,0,15,9], "classIndependentElementSet.html#acbcb9fb941ead567b856015c28e2f925":[2,0,15,8], "classIndependentElementSet.html#acf6c08db4b3bee96afb31412d8596f12":[2,0,15,4], "classIndependentElementSet.html#ae9ee7f3e99bcec6cc3ad7d70665bfd94":[2,0,15,7], "classIndependentSolver.html":[2,0,16], "classIndependentSolver.html#a14c34a2d2f31886d21b22c740e1f22ff":[2,0,16,4], "classIndependentSolver.html#a1d675f64b1083c7536868fef4f86809a":[2,0,16,8], "classIndependentSolver.html#a20a8dcadcc8b47cb5cabd26628ee2efe":[2,0,16,5], "classIndependentSolver.html#a57819518470290c651aa95621f6e53bc":[2,0,16,7], "classIndependentSolver.html#a6db8b06f3778f1d6a96c09ca4a46f101":[2,0,16,1], "classIndependentSolver.html#a7362aca6697e83d49735544ee793d8be":[2,0,16,9], "classIndependentSolver.html#a764421d01044b9c0e55f060a04ff5fbd":[2,0,16,2], "classIndependentSolver.html#a875ffe78a8f00929719a699d1e80c59a":[2,0,16,3], "classIndependentSolver.html#ae478ba5776f01d1ca36512ac2c10fef9":[2,0,16,6], "classIndependentSolver.html#ae6dfcedf02c68fe5c7de3b01be2d8b3a":[2,0,16,0], "classInstructionToLineAnnotator.html":[2,0,17], "classInstructionToLineAnnotator.html#aa09abfb406dcad0aa2978b689c08bd66":[2,0,17,0], "classInstructionToLineAnnotator.html#ad2abfd5daa70c82b7bd9f1c45196006c":[2,0,17,1], "classKQueryLoggingSolver.html":[2,0,19], "classKQueryLoggingSolver.html#a2977a6e977b00ed73e75231881d5bf53":[2,0,19,0], "classKQueryLoggingSolver.html#a86c4e16118e5a470cc6c6b5267e1e76c":[2,0,19,3], "classKQueryLoggingSolver.html#a87fb01e39c8d1b7ddbd7753149dd7852":[2,0,19,1], "classKQueryLoggingSolver.html#a9aa2b3cf6dc7f2115d04a9a80c0115fe":[2,0,19,2], "classKleeHandler.html":[2,0,18], "classKleeHandler.html#a03f08e151463c4c5c922b1fc456baff6":[2,0,18,19], "classKleeHandler.html#a0c6cec856b8a50c9d79cdec09d724cec":[2,0,18,4], "classKleeHandler.html#a0db3ff86bb0c056a36991cf9a513be12":[2,0,18,21], "classKleeHandler.html#a1825296dd5cd5d83f0ab020d8f1880f3":[2,0,18,22], "classKleeHandler.html#a22b64556773e0dd86abf329f766de19e":[2,0,18,23], "classKleeHandler.html#a2e2538c728bec8968bd785b2839edd78":[2,0,18,17], "classKleeHandler.html#a62baab91b4ade2249300325f0fa47e31":[2,0,18,3], "classKleeHandler.html#a69ea1e407d33bd2fe922b19442fd1815":[2,0,18,25], "classKleeHandler.html#a6cecca92016eb5216cba131ee0442061":[2,0,18,20], "classKleeHandler.html#a787a037e5cbe41dd023258b729c206d4":[2,0,18,10], "classKleeHandler.html#a7b3e3b259405bcd36e09f418a24a304d":[2,0,18,11], "classKleeHandler.html#a896a728a35dc4cea32d4e1fda53968f4":[2,0,18,9], "classKleeHandler.html#a948d3e495efc51c0124791cfbeec0bcf":[2,0,18,14], "classKleeHandler.html#a95e14fb1b69615715029946c040dd65d":[2,0,18,5], "classKleeHandler.html#a97d3e788f083ac78351f4ced64b763af":[2,0,18,2], "classKleeHandler.html#a9e87eba290b619dbd275ad1aedfef02d":[2,0,18,6], "classKleeHandler.html#aa0153c787c0afe14624a8243db5ec3da":[2,0,18,26], "classKleeHandler.html#aa3aa8b5d297c668e52f48c600196951e":[2,0,18,27], "classKleeHandler.html#aa6dbdca03f021ee81139dc65d65b35eb":[2,0,18,15], "classKleeHandler.html#aa905eefac70efbae1b86b9c71297f8b5":[2,0,18,13], "classKleeHandler.html#aaeaf81f3ca2d9d68213c33d7498673f9":[2,0,18,16], "classKleeHandler.html#ab39b742bcdbb764ad5bc7855d24ac422":[2,0,18,1], "classKleeHandler.html#acf40943e631c26a4e61aeef37e65455d":[2,0,18,18], "classKleeHandler.html#ad021dfa9bbdc23e059aadaf900956ec1":[2,0,18,24], "classKleeHandler.html#ae14c776a0842b772f7c623424f3d486d":[2,0,18,8], "classKleeHandler.html#ae3ba82ec1894405afdec40d6aa41185a":[2,0,18,12], "classKleeHandler.html#ae8a4b6e30a65e4b1880d581c6ec269b1":[2,0,18,7], "classKleeHandler.html#aeb008161ccab50929df934286db91f3b":[2,0,18,0], "classPPrinter.html":[2,0,25], "classPPrinter.html#a0432ba1db755d4960b815b1baa52a6d8":[2,0,25,16], "classPPrinter.html#a06d6b6d525c2e5b1535bc8a37e5479ea":[2,0,25,10] };
63.893701
84
0.809107
55c8fae6a200d23d26274c88f138d50710d830ce
251
js
JavaScript
doc/API Reference/classcom_1_1tuya_1_1smart_1_1sdk_1_1api_1_1bluemesh_1_1_i_mesh_dev_listener_v2.js
piaoyun0223/tuya-home-android-sdk
decf78441de671b1d53f88ec86bd4e099a9172b5
[ "MIT" ]
37
2020-12-14T02:49:14.000Z
2022-03-25T02:36:56.000Z
doc/API Reference/classcom_1_1tuya_1_1smart_1_1sdk_1_1api_1_1bluemesh_1_1_i_mesh_dev_listener_v2.js
piaoyun0223/tuya-home-android-sdk
decf78441de671b1d53f88ec86bd4e099a9172b5
[ "MIT" ]
8
2020-12-14T07:32:03.000Z
2021-08-20T10:42:48.000Z
doc/API Reference/classcom_1_1tuya_1_1smart_1_1sdk_1_1api_1_1bluemesh_1_1_i_mesh_dev_listener_v2.js
piaoyun0223/tuya-home-android-sdk
decf78441de671b1d53f88ec86bd4e099a9172b5
[ "MIT" ]
37
2020-12-14T15:07:19.000Z
2022-01-23T10:30:51.000Z
var classcom_1_1tuya_1_1smart_1_1sdk_1_1api_1_1bluemesh_1_1_i_mesh_dev_listener_v2 = [ [ "onPassThroughDataReceive", "classcom_1_1tuya_1_1smart_1_1sdk_1_1api_1_1bluemesh_1_1_i_mesh_dev_listener_v2.html#a29a31fadbef112ab670d8cc9f7395d50", null ] ];
62.75
161
0.89243
55c9b794b37f0307815f910cd5efab38818a0b71
5,305
js
JavaScript
assets/js/project.js
lisbethmachado/awesome-portfolio
3ac9820430309282650a4d4991842b418ee8e646
[ "MIT" ]
null
null
null
assets/js/project.js
lisbethmachado/awesome-portfolio
3ac9820430309282650a4d4991842b418ee8e646
[ "MIT" ]
null
null
null
assets/js/project.js
lisbethmachado/awesome-portfolio
3ac9820430309282650a4d4991842b418ee8e646
[ "MIT" ]
null
null
null
/* Project Cards */ const projectcards = document.querySelector(".projectcards"); const projects = [ { title: "Spacebook", cardImage: "assets/images/project-page/spacebook.png", description: "Martians can see the current weather for Mars, check on photos from nearby rovers, and manage a task list.", Previewlink: "https://spacebook-mars.herokuapp.com/signup", Githublink: "https://github.com/lisbethmachado/spacebook-mars", }, { title: "Over The Top Beauty", cardImage: "assets/images/project-page/preview.png", description: "An appointment booking and e-commerce application for a small business using React and Web API's.", Previewlink: "https://www.instagram.com/overthetopbeauty/", Githublink: "https://github.com/lisbethmachado/over-the-top-beauty", }, { title: "Emosic", cardImage: "assets/images/project-page/music.jpg", description: "Music Recommendation Engine built using jQuery and Web API's.", Previewlink: "https://lisbethmachado.github.io/emosic/", Githublink: "https://github.com/lisbethmachado/emosic", }, { title: "Donut Maker", cardImage: "assets/images/project-page/MVP-dohnuts.png", description: "An app to make unique donuts for Homer Simpson built using basic React.", Previewlink: "https://dohnuts-app.herokuapp.com/", Githublink: "https://github.com/lisbethmachado/dohnuts", }, { title: "ReadMe Generator", cardImage: "assets/images/project-page/proReadme.png", description: "An app that allows developers to generate professional readMe files for any project using Node.", Previewlink: "https://lisbethmachado.github.io/pro-readme/", Githublink: "https://github.com/lisbethmachado/pro-readme", }, { title: "Budget Tracker", cardImage: "assets/images/project-page/budget-tracker.png", description: "A budget tracking app with offline functionality using IndexedDB.", Previewlink: "https://budgeting-tracker.herokuapp.com/", Githublink: "https://github.com/lisbethmachado/budget-tracker", }, { title: "Password Generator", cardImage: "assets/images/project-page/password.png", description: "A random apssword generator with customizable fields using JavaScript.", Previewlink: "https://github.com/lisbethmachado/password-generator", Githublink: "https://lisbethmachado.github.io/password-generator/", }, { title: "Sky Watcher", cardImage: "assets/images/project-page/weather.jpg", description: "A weather app built using JavaScript and Web API's.", Previewlink: "https://lisbethmachado.github.io/sky-watcher/", Githublink: "https://github.com/lisbethmachado/sky-watcher", }, // { // title: "Minesweeper Game", // cardImage: "assets/images/project-page/minesweeper.jpg", // description: // "Minesweeper Game built using python Object Oriented Programming.", // Previewlink: "", // Githublink: "", // }, // { // title: "Battery Life Calculator", // cardImage: "assets/images/project-page/battery.png", // description: // "Built battery life calculator using Python.", // Previewlink: "", // Githublink: "", // }, // { // title: "Movie Recommendation System", // cardImage: "assets/images/project-page/movie-recommendation.jpeg", // description: // "Movie Recommendation System built using Tensorflow.", // Previewlink: "", // Githublink: "", // }, ]; const showCards = () => { let output = ""; projects.forEach( ({ title, cardImage, description, Previewlink, Githublink }) => (output += ` <div class="column skill-card card"> <div class="wrapper" style="background: url(${cardImage}) center / cover no-repeat;"> <div class="header"> </div> <div class="data"> <div class="content"> <div class="title-div"> <h1 class="title"><a href="#">${title}</a></h1> </div> <p class="text">${description}</p> <ul class="menu-content"> <li><a href="${Previewlink}" class="social-icon"><svg xmlns="http://www.w3.org/2000/svg" width="30" height="25" viewBox="0 0 30 28" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-monitor"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg></a></li> <li><a href="${Githublink}" class="social-icon"><svg xmlns="http://www.w3.org/2000/svg" width="30" height="25" viewBox="0 0 30 28" fill="none" stroke="#fff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg></a></li> </ul> </div> </div> </div> </div>`) ); projectcards.innerHTML = output; }; document.addEventListener("DOMContentLoaded", showCards);
43.483607
592
0.643921
55ca5132961f726666a576f0cd37256a3d981a34
1,320
js
JavaScript
public/js/me.js
saveto-co/saveto
232071c7e4b1009ccf5609d39a11f31394ecc102
[ "Unlicense" ]
54
2016-03-13T06:08:18.000Z
2021-11-18T17:36:38.000Z
public/js/me.js
duyetdev/quick
203c9d47b9ae9632ef0d87d4740d12763474a035
[ "Unlicense" ]
1
2017-03-17T08:00:54.000Z
2017-03-17T12:22:23.000Z
public/js/me.js
duyetdev/quick
203c9d47b9ae9632ef0d87d4740d12763474a035
[ "Unlicense" ]
9
2016-04-30T12:38:21.000Z
2020-04-29T18:52:42.000Z
$(document).ready(function() { $('#reset_accesstoken').click(function(e) { $.get(app.base_url + 'me/reset_access_token', function(result) { if (!result || !result.access_token) console.log('Reset access_token fail.'); else { $('#access_token_value').text(result.access_token); app.user.access_token = result.access_token; trimAccessToken(); } }); }); function trimAccessToken(len) { len = len || 16 var d = $('#access_token_value'); var t = d.text(); d.text(t.substr(0, len - 5) + '...' + t.substr(-5)); } trimAccessToken(); $('#copy_api_token').click(function() { var token = $('#api_token').data('token'); copy(token, function(err) { if (!err) alert('Success!'); else alert('Error, please using Right Click > Copy!') }); }); $('#toggle_api_token').click(function() { var isshow = $('#api_token').data('isshow') ? true : false; var token = $('#api_token').data('token'); if (isshow) $('#api_token').html('xxxxxxxxxxxxxxxxxxx'); else $('#api_token').html(token); $('#api_token').data('isshow', !isshow); $(this).text(isshow ? 'Hide' : 'Show') }); });
33
89
0.521212
55ca75f1feae4c9cf51623f807499f13da2c089b
1,807
js
JavaScript
node_modules/snyk/dist/lib/project-metadata/target-builders/git.js
hom669/TestCognox
cc473d8f245f5b69d09c2c679f6ff4da929e27e7
[ "MIT" ]
66
2019-06-26T20:38:28.000Z
2022-01-15T20:00:26.000Z
node_modules/snyk/dist/lib/project-metadata/target-builders/git.js
hom669/TestCognox
cc473d8f245f5b69d09c2c679f6ff4da929e27e7
[ "MIT" ]
16
2019-07-18T18:14:35.000Z
2022-02-26T12:18:25.000Z
node_modules/snyk/dist/lib/project-metadata/target-builders/git.js
hom669/TestCognox
cc473d8f245f5b69d09c2c679f6ff4da929e27e7
[ "MIT" ]
5
2019-06-27T05:55:19.000Z
2021-07-28T12:15:21.000Z
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getInfo = void 0; const url = require("url"); const subProcess = require("../../sub-process"); // for scp-like syntax [user@]server:project.git const originRegex = /(.+@)?(.+):(.+$)/; async function getInfo(isFromContainer) { // safety check if (isFromContainer) { return null; } const target = {}; try { const origin = (await subProcess.execute('git', ['remote', 'get-url', 'origin'])).trim(); if (origin) { const { protocol, host, pathname = '' } = url.parse(origin); // Not handling git:// as it has no connection options if (host && protocol && ['ssh:', 'http:', 'https:'].includes(protocol)) { // same format for parseable URLs target.remoteUrl = `http://${host}${pathname}`; } else { const originRes = originRegex.exec(origin); if (originRes && originRes[2] && originRes[3]) { target.remoteUrl = `http://${originRes[2]}/${originRes[3]}`; } else { // else keep the original target.remoteUrl = origin; } } } } catch (err) { // Swallowing exception since we don't want to break the monitor if there is a problem // executing git commands. } try { target.branch = (await subProcess.execute('git', ['rev-parse', '--abbrev-ref', 'HEAD'])).trim(); } catch (err) { // Swallowing exception since we don't want to break the monitor if there is a problem // executing git commands. } return target; } exports.getInfo = getInfo; //# sourceMappingURL=git.js.map
36.877551
104
0.539015
55cb9b692e4075d759c7ec175bb00ac5a179d743
95
js
JavaScript
basico/boolean.js
Tavares304/b_jsStart
e32370c4ce05ea001c5dd23d51fa6ce03ab17241
[ "MIT" ]
null
null
null
basico/boolean.js
Tavares304/b_jsStart
e32370c4ce05ea001c5dd23d51fa6ce03ab17241
[ "MIT" ]
null
null
null
basico/boolean.js
Tavares304/b_jsStart
e32370c4ce05ea001c5dd23d51fa6ce03ab17241
[ "MIT" ]
null
null
null
let a = 1; let b = "1"; let r1 = a == b; let r2 = a === b; console.log(r1); console.log(r2);
10.555556
17
0.505263
55cc5d80d6b6e80e34611d9008292fef73a5c3fa
469
js
JavaScript
all-end/five-week/3.0.0/src/util/veevalidate-i18n.js
ZhengXingchi/wheels
7b0f69a0af072f6b0f938deb2939a9867b798d35
[ "Apache-2.0" ]
null
null
null
all-end/five-week/3.0.0/src/util/veevalidate-i18n.js
ZhengXingchi/wheels
7b0f69a0af072f6b0f938deb2939a9867b798d35
[ "Apache-2.0" ]
25
2020-09-04T22:54:28.000Z
2022-03-08T23:03:12.000Z
all-end/five-week/3.0.0/src/util/veevalidate-i18n.js
ZhengXingchi/wheels
7b0f69a0af072f6b0f938deb2939a9867b798d35
[ "Apache-2.0" ]
null
null
null
import {extend ,configure } from 'vee-validate' import {required,email,min,length,confirmed,max,is} from 'vee-validate/dist/rules' import {i18n} from './i18n' extend('email',email) extend('min',min) extend('max',max) extend('is',is) extend('required',required) extend('length',length) extend('confirmed',confirmed) configure({ defaultMessage:(field,values)=>{ values._field_=i18n.t(`fields.${field}`) return i18n.t(`validation.${values._rule_}`,values) } })
29.3125
82
0.716418
55cd8ccffdecb06f9050369f2768d670826eaf48
4,124
js
JavaScript
server-db/src/services/internalTools.js
AlexeySushkov/common-test-db
db7abe9377a94f254f2789b1129141a5dee9d169
[ "MIT" ]
4
2020-12-22T09:20:10.000Z
2021-11-20T11:09:15.000Z
server-db/src/services/internalTools.js
AlexeySushkov/common-test-db
db7abe9377a94f254f2789b1129141a5dee9d169
[ "MIT" ]
null
null
null
server-db/src/services/internalTools.js
AlexeySushkov/common-test-db
db7abe9377a94f254f2789b1129141a5dee9d169
[ "MIT" ]
1
2020-12-22T12:05:46.000Z
2020-12-22T12:05:46.000Z
const config = require('../config/config') const { Users } = require('../models') const db = require('../models/index') const jwt = require('jsonwebtoken') const uuid = require('uuid') const logger = require('./logger') module.exports = { jwtSignUser: function (user) { const ONE_WEEK = 60 * 60 * 24 * 7 return jwt.sign(user, process.env.JWT_SECRET, { expiresIn: ONE_WEEK }) }, getToken: function(email) { return jwt.sign({ email: email }, process.env.JWT_SECRET, { // expiresIn: '1m' // 1 мин для тестирования expiresIn: '1w' }) }, sessionId: function() { return uuid.v4() // '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' }, async checkDataOwner(uuid, ownerUuid) { try { logger.info('checkDataOwner uuid: ', uuid, ' ownerUuid: ', ownerUuid) let data = await db.sequelize.query(`SELECT * FROM "Data" WHERE uuid = :uuid AND ownerUuid = :ownerUuid LIMIT :limit;`, { replacements: { uuid: uuid, ownerUuid: ownerUuid, limit: config.db.limit } }) logger.info('data: ', data) logger.info('data[0]: ', data[0].length) if (data[0].length > 0) { return 'Ok' } } catch (error) {} return null }, async updateInvalidToken (req) { let decodedToken = {} let userToken = null try { // достаем токен из заголовка: let jwtToken = req.headers.authorization.replace('Bearer ', ''); decodedToken = jwt.decode(jwtToken) // logger.info('updateInvalidToken, decodedToken: ', decodedToken) const expDate = new Date(decodedToken.exp*1000) // logger.info('updateInvalidToken, decodedToken expDate: ', expDate.toString()) // проверяем юзера в базе: userToken = await Users.findOne({ where: { email: decodedToken.email } }) if (!userToken) { logger.info('updateInvalidToken, Wrong email from token') return null } // проверяем токен на валидность: const verifiedToken = jwt.verify( jwtToken, process.env.JWT_SECRET ) // logger.info('updateInvalidToken, verifiedToken: ', verifiedToken) } catch (error) { logger.error('updateInvalidToken, Error: ', error, 'try to get new token:') } let lastRequestDate = new Date(userToken.ddosLastRequest) logger.info('userToken.requestsNumber: ', userToken.requestsNumber, 'lastRequestDate: ', lastRequestDate.toISOString()) const maxReguests = 1000 // 1000 requests const maxMinutesTimeout = 60 * 60000 // one hour timout let userToUpdate = {} if ( userToken.ddosRequestsNumber >= maxReguests ) { let plusMaxMinutes = new Date(lastRequestDate.getTime() + maxMinutesTimeout) let now = new Date (Date.now()) logger.info('plusMaxMinutes: ', plusMaxMinutes.toISOString(), ' now.toISOString(): ', now.toISOString()) if (plusMaxMinutes > now) { logger.error('maxReguests and time exceeded!') return null } else { userToUpdate.ddosRequestsNumber = 1 } } else { userToUpdate.ddosRequestsNumber = userToken.ddosRequestsNumber + 1 } userToUpdate.ddosLastRequest = Date.now() userToUpdate.sessionId = this.sessionId(decodedToken.email ) userToUpdate.commonToken = this.getToken(decodedToken.email ) await Users.update(userToUpdate, { where: { email: decodedToken.email } }) // logger.info('updateInvalidToken, User update ok') return { sessionId: userToUpdate.sessionId, token: userToUpdate.commonToken, email: userToken.email, uuid: userToken.uuid, id: userToken.id } }, }
36.495575
207
0.56547
55cdd716c0ade4f40026ae31a4aaaae7f7dcfb86
528
js
JavaScript
BinarySearch/peakIndex.js
Codhog/leetcode_javascript
d8db47b8d909380b0d462febec717bb7441cbe63
[ "MIT" ]
null
null
null
BinarySearch/peakIndex.js
Codhog/leetcode_javascript
d8db47b8d909380b0d462febec717bb7441cbe63
[ "MIT" ]
null
null
null
BinarySearch/peakIndex.js
Codhog/leetcode_javascript
d8db47b8d909380b0d462febec717bb7441cbe63
[ "MIT" ]
null
null
null
const peakIndexInMountainArray = (A, low = 0, high = A.length - 1) => { if (!A.length) return -1 const mid = ((low + high) / 2) | 0 if (A[mid] > A[mid - 1] && A[mid] > A[mid + 1]) console.log(mid); return mid if (A[mid] < A[mid - 1]) return peakIndexInMountainArray(A, low, mid) if (A[mid] < A[mid + 1]) return peakIndexInMountainArray(A, mid, high) } console.log(peakIndexInMountainArray([0,1,2,10,5,2])); // [0,186,234,534,342,123,122,111,97,65]
26.4
71
0.539773
55cdefa3bf47c97c74902fb2cf4934762a4354e4
884
js
JavaScript
assets/js/functions/frases/frases.js
cazdlt/cazdlt.github.io
482233e219ac38c53add7be5dcdfd46933495720
[ "MIT" ]
null
null
null
assets/js/functions/frases/frases.js
cazdlt/cazdlt.github.io
482233e219ac38c53add7be5dcdfd46933495720
[ "MIT" ]
3
2021-01-13T03:44:02.000Z
2022-01-08T21:09:05.000Z
assets/js/functions/frases/frases.js
cazdlt/cazdlt.github.io
482233e219ac38c53add7be5dcdfd46933495720
[ "MIT" ]
null
null
null
const frases = [ '"Muy lindo." - Mi mamá', '"Excelente profesional." - Mi jefe, probablemente', '"Buen muchacho." - Mi abuela', '"非常に面白い" - ののか', '"¿En qué le puedo ayudar?" - El chatbot de Claro', '"Muy cumplido y responsable." - La DIAN', '"Aprende rápido." - Stack Overflow', '"Tiene buen gusto." - El algoritmo de Spotify', '"¿Quién?" - Mis compañeros de primaria', '"Muy malos chistes. - Mis compañeros de universidad"', '"Sigue ahí." - Netflix' ]; function sample(arr) { return arr[Math.floor(Math.random() * arr.length)]; } exports.handler = async (event, context) => { try { return { statusCode: 200, headers: { "content-type": "text/plain; charset=utf-8" }, body: sample(frases) }; } catch (err) { return { statusCode: 500, body: err.toString() }; } };
29.466667
69
0.569005
55cea656950cd3350c4d896b767c5dac981716b1
2,872
js
JavaScript
addon/-private/model/observer/snapshot-observer.js
ampatspell/ember-cli-zug
c9f3ccb8e7a63a6a6d3bc3b2dde6e4d9d950b060
[ "MIT" ]
1
2018-04-04T03:24:23.000Z
2018-04-04T03:24:23.000Z
addon/-private/model/observer/snapshot-observer.js
ampatspell/ember-cli-zug
c9f3ccb8e7a63a6a6d3bc3b2dde6e4d9d950b060
[ "MIT" ]
null
null
null
addon/-private/model/observer/snapshot-observer.js
ampatspell/ember-cli-zug
c9f3ccb8e7a63a6a6d3bc3b2dde6e4d9d950b060
[ "MIT" ]
null
null
null
import Destroyable from '../destroyable'; import { join } from '@ember/runloop'; import { defer } from 'rsvp'; import { DeferredOperation } from '../operation'; export default class SnapshotObserver extends Destroyable { constructor(context, query, delegate, options) { super(); this._context = context; this._query = query; this._options = options; this._delegate = delegate; this._deferred = null; this._loaded = false; this._metadata = null; this._isStarted = false; this._content = null; this._operation = null; } get promise() { this.start(); return this._deferred && this._deferred.promise; } get metadata() { let metadata = this._metadata; if(!metadata) { return; } let hash = {}; for(let key in metadata) { let value = metadata[key]; if(typeof value === 'function') { continue; } hash[key] = value; } return hash; } get content() { return this._content; } get loaded() { return this._loaded; } _onLoading() { let onLoading = this._delegate.onLoading; onLoading && onLoading(); } _onLoaded() { let onLoaded = this._delegate.onLoaded; onLoaded && onLoaded(); } _createModel(doc) { return this._delegate.createModel(doc); } _updateModel(model, doc) { return this._delegate.updateModel(model, doc); } _destroyModel(model) { return this._delegate.destroyModel(model); } _onUpdated() { this._delegate.onUpdated(); } _onMetadata(metadata) { if(this._metadata && this._metadata.isEqual(metadata)) { return; } this._metadata = metadata; this._delegate.onMetadata(metadata); } _onSnapshotInternal(snapshot) { this._onMetadata(snapshot.metadata); this._onSnapshot(snapshot); if(this._loaded) { return; } this._loaded = true; this._onLoaded(); this._deferred.resolve(snapshot); } _registerOperation(operation) { let operations = this._context.operations; return operations.invoke(operation); } _start() { if(this._isStarted || this.isDestroyed) { return; } this._deferred = defer(); this._operation = new DeferredOperation(this._deferred, { name: 'query' }); this._cancel = this._query.onSnapshot(this._options, snapshot => join(() => this._onSnapshotInternal(snapshot))); this._isStarted = true; this._registerOperation(this._operation); this._onLoading(); } start() { this._start(); } _stop() { } _stopInternal() { if(!this._isStarted) { return; } this._cancel(); this._deferred.resolve(); this._stop(); this._cancel = null; this._query = null; this._deferred = null; this._operation = null; } willDestroy() { this._stopInternal(); super.willDestroy(); } }
19.806897
117
0.626045
55cec39bc21630e247c140acc9c8dad61c042f46
1,727
js
JavaScript
src/cond.js
customcommander/functionaut
202213433c2f9d71a755ff51deb240e5ff1a1e0b
[ "MIT" ]
1
2022-01-04T10:45:01.000Z
2022-01-04T10:45:01.000Z
src/cond.js
customcommander/functionaut
202213433c2f9d71a755ff51deb240e5ff1a1e0b
[ "MIT" ]
38
2021-02-14T22:58:06.000Z
2022-01-28T21:10:36.000Z
src/cond.js
customcommander/functionaut
202213433c2f9d71a755ff51deb240e5ff1a1e0b
[ "MIT" ]
null
null
null
/** * @license MIT * @copyright (c) 2021 Julien Gonzalez <hello@spinjs.com> */ const T = require('./T'); /** * @summary * Functional equivalent of a `switch` statement. * * @description * Takes a list of predicate/function pairs and returns a function that takes * any number of arguments and applies them to the predicates until one is * satisfied. At which point the function associated with that predicate * is applied to the same arguments and we take its return value. * Predicates must return logical true. Returns `undefined` when * no predicates are satisfied. * * @example * const record = cond( ({age}) => age < 5, * ({name}) => `Free for ${name}.`, * * ({age}) => age < 12, * ({name}) => `50% discount for ${name}.`, * * ({age}) => age < 20, * ({name}) => `20% discount for ${name}.`, * * ({age}) => age < 65, * ({name}) => `Standard charge for ${name}.`, * * ({age}) => age >= 65, * ({name}) => `40% discount for ${name}.`); * * record({name: 'Harry', age: 2}); * //=> 'Free for Harry.' * * record({name: 'Jane', age: 11}); * //=> '50% discount for Jane.' * * record({name: 'Idris', age: 18}); * //=> '20% discount for Idris.' * * record({name: 'Bob', age: 40}); * //=> 'Standard charge for Bob.' * * record({name: 'John', age: 65}); * //=> '40% discount for John.' * * @param {...function()} fn * @return {function()} */ module.exports = (...fn) => (...args) => { for (let i=0; i<fn.length; i+=2) { if (T(fn[i](...args))) return fn[i+1](...args); } };
29.271186
77
0.498552
55d08d74297d90301a9220669d5d80a8307019d7
3,359
js
JavaScript
main.js
vionaosiako/FindTheDay
3d07b4aea0f707edbcd9be4d1652a5d592ae729c
[ "MIT" ]
null
null
null
main.js
vionaosiako/FindTheDay
3d07b4aea0f707edbcd9be4d1652a5d592ae729c
[ "MIT" ]
null
null
null
main.js
vionaosiako/FindTheDay
3d07b4aea0f707edbcd9be4d1652a5d592ae729c
[ "MIT" ]
null
null
null
let gender; // let Male; // let Female; function checkRequired(){ } function getDay(dateString) { //Array for days of the week let weekday = new Array( "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); //Create a new date object const date = new Date(dateString); //Get the day, month and year from the date object const MM = date.getMonth() + 1; const DD = date.getDate(); const year = date.getFullYear(); // get the century digit from the year const CC = year.toString().substring(0, 2); // get the year digit from the year const YY = year.toString().substring(2, 4); // calculate the day of the week const day = (CC / 4 - 2 * CC - 1 + (5 * YY) / 4 + (26 * (MM + 1)) / 10 + DD) % 7; // floor the result to get the day of the week let dayOfWeek = Math.floor(day); // return the day of the week from not been negative if (dayOfWeek < 0) { dayOfWeek = Math.abs(dayOfWeek); } // get the weekday from the array const nameOfDay = weekday[dayOfWeek]; // return all the information return { MM, DD, year, CC, YY, dayOfWeek, nameOfDay }; } function dayBorn() { checkRequired(); // get the date const dateOfBirth = document.getElementById("dateOfBirth").value; // get the day of the week const { nameOfDay } = getDay(dateOfBirth); gender = document.querySelector('input[name="gender"]:checked').value; console.log(gender); if(gender == "Male"){ if(nameOfDay == "Monday") { alert("Your Akhan Name: Kwando"); // console.log("Kwasi"); } else if(nameOfDay == "Teusday") { alert("Your Akhan Name: Kwabena"); } else if(nameOfDay == "Wednesday") { alert("Your Akhan Name: Kwaku"); } else if(nameOfDay == "Thursday") { alert("Your Akhan Name: Yaw"); } else if(nameOfDay == "Friday") { alert("Your Akhan Name: Kofi"); } else if(nameOfDay == "Saturday") { alert("Your Akhan Name: Kwame"); } else if(nameOfDay == "Sunday") { alert("Your Akhan Name: Kwasi"); } else { alert("Date of birth is required"); } } if(gender == "Female"){ if(nameOfDay == "Monday") { alert("Your Akhan Name: Adwoa"); } else if(nameOfDay == "Teusday") { alert("Your Akhan Name: Abenna"); } else if(nameOfDay == "Wednesday") { alert("Your Akhan Name: Akua"); } else if(nameOfDay == "Thursday") { alert("Your Akhan Name: Yaa"); } else if(nameOfDay == "Friday") { alert("Your Akhan Name: Afua"); } else if(nameOfDay == "Saturday") { alert("Your Akhan Name: Ama"); } else if(nameOfDay == "Sunday") { alert("Your Akhan Name: Akosua"); } else { alert("Date of birth is required"); } } // alert(nameOfDay); } function genderCheck(){ //Get the value of the gender selected // gender = document.querySelector('input[name="gender"]:checked').value; // return gender; // console.log(gender); }
22.098684
78
0.535576
55d0fb84c4dd803c8c56540ef197db7b6a838d67
435
js
JavaScript
src/aura/ltngBaseWizardPage/ltngBaseWizardPageController.js
SalesforceLabs/Partner-Recruitement-App
95ccf09af62df49efe93d9e75cf0cac6d8335523
[ "BSD-3-Clause" ]
1
2019-04-04T16:08:52.000Z
2019-04-04T16:08:52.000Z
src/aura/ltngBaseWizardPage/ltngBaseWizardPageController.js
SalesforceLabs/Partner-Recruitement-App
95ccf09af62df49efe93d9e75cf0cac6d8335523
[ "BSD-3-Clause" ]
null
null
null
src/aura/ltngBaseWizardPage/ltngBaseWizardPageController.js
SalesforceLabs/Partner-Recruitement-App
95ccf09af62df49efe93d9e75cf0cac6d8335523
[ "BSD-3-Clause" ]
1
2021-08-20T18:35:45.000Z
2021-08-20T18:35:45.000Z
({ goBack : function(component, event, helper) { helper.gotoPrevPage(component); }, goForward: function(component, event, helper) { helper.gotoNextPage(component); }, handleSaveForLater : function(component, event, helper){ helper.handleSaveOrComplete(component, false); }, handleComplete : function(component, event, helper){ helper.handleSaveOrComplete(component, true); } })
31.071429
60
0.671264
55d1507b0eab8fc2fba4edcd0f7412d3a69c6dac
2,285
js
JavaScript
dist/text/Text.js
suprim12/suprim-react-ui-public
f43cf777fefab610dbda4ca8b6db73a2acfd95ee
[ "MIT" ]
1
2020-06-17T17:56:00.000Z
2020-06-17T17:56:00.000Z
dist/text/Text.js
suprim12/suprim-react-ui-public
f43cf777fefab610dbda4ca8b6db73a2acfd95ee
[ "MIT" ]
1
2021-05-11T17:43:32.000Z
2021-05-11T17:43:32.000Z
dist/text/Text.js
suprim12/suprim-react-ui-public
f43cf777fefab610dbda4ca8b6db73a2acfd95ee
[ "MIT" ]
null
null
null
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); var _TextStyle = require("./TextStyle"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var Text = function Text(_ref) { var as = _ref.as, b = _ref.b, className = _ref.className, type = _ref.type, children = _ref.children, rest = _objectWithoutProperties(_ref, ["as", "b", "className", "type", "children"]); return /*#__PURE__*/_react.default.createElement(_TextStyle.TextStyle, _extends({ as: as, type: type, className: "".concat(b ? 'b' : '', " ").concat(className ? className : '') }, rest), children); }; Text.propTypes = { as: _propTypes.default.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'b', 'blockquote']), type: _propTypes.default.oneOf(['success', 'warning', 'primary', 'danger', 'secondary']), b: _propTypes.default.bool, className: _propTypes.default.string }; var _default = Text; exports.default = _default;
51.931818
492
0.681838
55d1a816b6dccdf50e7640d96812a9c18dc7c540
130
js
JavaScript
src/client/core/Api/Pokeapi/PokemonDetails/PokemonDetails.js
12evgen/pokemon-app
0b994b8a80e49cfeadcc0898db89bc4e15b9d312
[ "MIT" ]
1
2021-01-25T10:21:57.000Z
2021-01-25T10:21:57.000Z
src/client/core/Api/Pokeapi/PokemonDetails/PokemonDetails.js
12evgen/pokemon-app
0b994b8a80e49cfeadcc0898db89bc4e15b9d312
[ "MIT" ]
null
null
null
src/client/core/Api/Pokeapi/PokemonDetails/PokemonDetails.js
12evgen/pokemon-app
0b994b8a80e49cfeadcc0898db89bc4e15b9d312
[ "MIT" ]
null
null
null
import request from '../../request' export default async function PokemonDetails (id) { return request(`/pokemon/${id}`, {}) }
21.666667
51
0.676923
55d1be878ed09fee650de8e775a23307acb58e1a
668
js
JavaScript
src/Authorized/renderAuthorize.js
sitorhy/ant-design-pro-authorized-lite
1c3988da91f7be85775b9bb37c397da495711e5e
[ "MIT" ]
null
null
null
src/Authorized/renderAuthorize.js
sitorhy/ant-design-pro-authorized-lite
1c3988da91f7be85775b9bb37c397da495711e5e
[ "MIT" ]
null
null
null
src/Authorized/renderAuthorize.js
sitorhy/ant-design-pro-authorized-lite
1c3988da91f7be85775b9bb37c397da495711e5e
[ "MIT" ]
null
null
null
import check from "./Authorized"; /** * @param {string|()=>String} currentAuthority */ export default (currentAuthority, authority = []) => ({...rest}) => { let CURRENT = "NULL"; if (currentAuthority) { if (currentAuthority.constructor.name === "Function") { CURRENT = currentAuthority(); } if ( currentAuthority.constructor.name === "String" || currentAuthority.constructor.name === "Array" ) { CURRENT = currentAuthority; } } else { CURRENT = "NULL"; } return check({currentAuthority: CURRENT, authority, ...rest}); };
23.034483
67
0.532934
55d26c59150edf77df9a415d4d970a35f10af075
1,500
js
JavaScript
ko.config.js
lily000000/book-show
20678637aa6c352095a6eedcb12a903aac4ba854
[ "MIT" ]
null
null
null
ko.config.js
lily000000/book-show
20678637aa6c352095a6eedcb12a903aac4ba854
[ "MIT" ]
null
null
null
ko.config.js
lily000000/book-show
20678637aa6c352095a6eedcb12a903aac4ba854
[ "MIT" ]
null
null
null
const path = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const serverConfig = require('./server.config'); module.exports = (context) => { const { webpack } = context; return { server: { "host": serverConfig.host, "port": serverConfig.port }, proxy: [{ "path": '/api/v1/**', "target": 'http://172.16.8.194:8891', "changeOrigin": true }], dll:{ }, webpack: { entry: {}, output: {}, module: { rules: [] }, plugins: [ new webpack.DefinePlugin({__PRODUCTION: JSON.stringify(false)}), new CopyWebpackPlugin([ {from: path.resolve(__dirname,'public/config'),to:'./conf'}, {from: path.resolve(__dirname,'public/mock'),to:'./mock'}, {from: path.resolve(__dirname,'public/assets/libs'),to:'./libs'}, {from: path.resolve(__dirname,'public/assets/images'),to:'./imgs'} ]) ], resolve: { alias: { "@": path.resolve(__dirname, 'src'), assets: path.resolve(__dirname, 'public/assets'), components: path.resolve(__dirname, 'src/components/'), pages: path.resolve(__dirname, 'src/pages/'), utils: path.resolve(__dirname, 'src/utils/'), constants: path.resolve(__dirname, 'src/constants/'), layout: path.resolve(__dirname, 'src/layout/') } }, externals :{ 'FRONT_CONF': 'FRONT_CONF' } } }; };
29.411765
76
0.546667
55d2d09cc87027904eea924640eed24dd7ed2152
1,719
js
JavaScript
src/helpers/index.js
comonadd/alacritty-themes
a04e286636b9f4200d05314f8cff7808d54b85e0
[ "MIT" ]
null
null
null
src/helpers/index.js
comonadd/alacritty-themes
a04e286636b9f4200d05314f8cff7808d54b85e0
[ "MIT" ]
null
null
null
src/helpers/index.js
comonadd/alacritty-themes
a04e286636b9f4200d05314f8cff7808d54b85e0
[ "MIT" ]
null
null
null
const fs = require('fs'); const path = require('path'); const NoAlacrittyFileFoundError = new Error( 'No Alacritty configuration file found. Expected one of the following files to exist:\n' + possibleLocations().join('\n') ); function rootDir() { return process.env.PWD; } function isWindows() { return process.env.OS === 'Windows_NT'; } function windowsHome() { return process.env.APPDATA; } function linuxHome() { return process.env.HOME; } function archHome() { return process.env.XDG_CONFIG_HOME; } function alacrittyTemplatePath() { return path.join(rootDir(), 'alacritty.yml'); } function alacrittyFileExists() { return possibleLocations().some(function (location) { return fs.existsSync(location); }); } function alacrittyConfigPath() { return possibleLocations().find(function (location) { if (!fs.existsSync(location)) return; return location; }); } function possibleLocations() { let locations = []; locations.push( path.resolve(linuxHome(), '.config/alacritty/alacritty.yml'), path.resolve(linuxHome(), '.alacritty.yml') ); if (isWindows()) { locations.push(path.resolve(windowsHome(), 'alacritty/alacritty.yml')); } // locations where the alacritty config can be located according to // https://github.com/alacritty/alacritty#configuration if (archHome()) { locations.push( path.resolve(archHome(), 'alacritty/alacritty.yml'), path.resolve(archHome(), 'alacritty.yml') ); } return locations; } module.exports = { NoAlacrittyFileFoundError, alacrittyConfigPath, alacrittyFileExists, alacrittyTemplatePath, archHome, isWindows, linuxHome, possibleLocations, rootDir, windowsHome, };
20.710843
92
0.700989
55d3d77fd3f171e8057a13227677712ca0d72927
4,009
js
JavaScript
components/Header.js
farhan2077/symbol_search
ae536cb87a8df955cfa095ca36b2f693febf8245
[ "MIT" ]
21
2020-09-27T18:21:06.000Z
2020-11-05T14:50:52.000Z
components/Header.js
farhan2077/symbol-search
ae536cb87a8df955cfa095ca36b2f693febf8245
[ "MIT" ]
1
2021-05-25T01:33:52.000Z
2021-05-25T08:14:18.000Z
components/Header.js
farhan2077/symbols-search
ae536cb87a8df955cfa095ca36b2f693febf8245
[ "MIT" ]
5
2020-09-27T21:14:50.000Z
2020-11-19T09:29:53.000Z
import Link from "next/link"; import ThemeSwitcher from "./ThemeSwitcher"; export default function Navbar() { return ( <header className="flex items-center justify-between mt-5"> {/* logo */} <Link href="/"> <a aria-label="Symbols search"> <svg className="w-10 h-10 border-2 border-teal-300 border-solid rounded-lg dark:border-teal-300 dark:bg-white" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clipPath="url(#clip0)"> <rect width="512" height="512" rx="90" fill="#fff" /> <path d="M279.43 80.447c-12.858 10.905-19.287 24.17-19.287 39.795 0 15.462 4.231 31.006 12.695 46.631 8.626 15.462 18.636 28.646 30.029 39.551 11.393 10.905 20.182 19.612 26.367 26.123 6.348 6.348 13.428 14.079 21.241 23.193 7.975 8.952 14.241 17.009 18.798 24.17 11.231 17.416 16.846 32.715 16.846 45.899 0 13.02-2.767 25.146-8.301 36.377-5.371 11.23-13.102 21.484-23.193 30.761-9.928 9.115-22.705 16.683-38.33 22.705-15.462 6.022-32.552 9.44-51.27 10.254 5.209-7.487 7.813-15.299 7.813-23.437 0-8.301-1.709-16.683-5.127-25.147-3.418-8.626-8.626-17.822-15.625-27.588-11.231-15.787-23.844-31.25-37.842-46.386-13.834-15.137-23.519-25.961-29.053-32.471-5.371-6.51-11.474-14.73-18.31-24.658-13.346-19.206-20.02-38.493-20.02-57.862 0-19.368 5.941-37.353 17.823-53.955 11.881-16.601 27.913-29.703 48.095-39.306 20.345-9.603 42.562-14.486 66.651-14.649zm81.299 147.461c0-15.788-2.849-32.064-8.545-48.828-11.231-32.715-29.948-59.082-56.153-79.102.326-2.93 3.093-6.428 8.301-10.497 5.208-4.07 9.522-6.104 12.939-6.104 11.882 0 25.717 2.36 41.504 7.08 15.951 4.72 28.565 9.277 37.842 13.672.814 4.883 1.221 13.428 1.221 25.635 0 12.044-1.139 27.181-3.418 45.41-2.279 18.066-5.046 32.389-8.301 42.969-.976 2.441-4.476 4.72-10.498 6.836-5.859 1.953-10.823 2.929-14.892 2.929zM243.785 404.666c-1.953 11.068-4.964 18.473-9.033 22.217-17.09 0-37.272-2.197-60.547-6.592s-40.202-10.01-50.781-16.846c-.163-3.58-.244-8.707-.244-15.381 0-31.738 3.743-61.849 11.23-90.332.651-2.604 3.418-5.859 8.301-9.765 4.883-4.069 9.277-6.104 13.184-6.104 3.743 17.904 10.416 35.889 20.019 53.955 9.766 18.067 20.752 33.366 32.959 45.899 12.37 12.37 24.007 20.019 34.912 22.949z" fill="#1F2937" /> </g> <defs> <clipPath id="clip0"> <rect width="512" height="512" rx="90" fill="#fff" /> </clipPath> </defs> </svg> </a> </Link> <div className="flex items-center gap-6"> {/* github */} {/* <a href="https://github.com/farhan2077/symbol-search" aria-label="Github repository link" > <svg className="w-8 h-8 text-gray-800 transition-colors duration-150 ease-in-out dark:text-gray-100 hover:text-gray-600 dark:hover:text-gray-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" strokeWidth="2" display="block" > <path fillRule="evenodd" clipRule="evenodd" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z" /> </svg> </a> */} <ThemeSwitcher /> </div> </header> ); }
69.12069
1,656
0.589673
55d403bdc7f6fb06d3956f0bcfbe2e3d0eae2fff
414
js
JavaScript
lib/authentication.js
insomnia90/era
1d239d77305b484c5072cbb0c2cfee682e824ccb
[ "MIT" ]
1
2018-01-24T12:44:46.000Z
2018-01-24T12:44:46.000Z
lib/authentication.js
insomnia90/era
1d239d77305b484c5072cbb0c2cfee682e824ccb
[ "MIT" ]
null
null
null
lib/authentication.js
insomnia90/era
1d239d77305b484c5072cbb0c2cfee682e824ccb
[ "MIT" ]
null
null
null
/** * Expose ModelResource */ module.exports = Authentication; /** * Authentication mechanism for ModelResource */ function Authentication () {}; /** * Middleware for expressApp. * Implements authentication mechanism. * * @param {Object} req * @param {Object} res * @param {Object} next * @api public */ Authentication.prototype.isAuthenticated = function(req, res, next) { next(); };
15.923077
69
0.664251
55d4dd1fb76bbc6d04d2f5704a171ecdf1b5109e
1,104
js
JavaScript
src/components/pages/home/event-list-view/index.js
CivicTechFredericton/caring-fredericton-ui
d5c8b5bf4888458ad77b18432455ecab0fac2bd7
[ "MIT" ]
2
2019-08-07T22:12:07.000Z
2019-10-03T02:01:25.000Z
src/components/pages/home/event-list-view/index.js
CivicTechFredericton/caring-fredericton-ui
d5c8b5bf4888458ad77b18432455ecab0fac2bd7
[ "MIT" ]
19
2018-12-23T13:40:06.000Z
2019-12-17T21:16:00.000Z
src/components/pages/home/event-list-view/index.js
CivicTechFredericton/caring-fredericton-ui
d5c8b5bf4888458ad77b18432455ecab0fac2bd7
[ "MIT" ]
6
2018-12-11T23:11:26.000Z
2019-06-11T23:48:34.000Z
import _ from 'lodash'; import React from 'react'; import PropTypes from 'prop-types'; import List from '@material-ui/core/List'; import Typography from '@material-ui/core/Typography'; import EventListItemView from '../event-list-item-view'; import useStyles from './styles'; import { useTranslation } from 'react-i18next'; export default function EventListView({ events }) { const { t } = useTranslation('common'); const classes = useStyles(); if (_.get(events, 'length', 0) === 0) { return ( <div> <Typography variant='h6'>{t('common:lblNoEventsScheduled')}</Typography> </div> ); } return ( <div> <Typography variant='h6'>{t('common:lblUpcomingEvents')}</Typography> <div style={{ maxHeight: 375, overflow: 'auto' }}> <List className={classes.root}> {events.map((entry) => ( <EventListItemView key={entry.id + '-' + entry.occurrence} event={entry} /> ))} </List> </div> </div> ); } EventListView.propTypes = { events: PropTypes.array, };
24.533333
80
0.595109
55d5674cfa6c1e7a7ad3482e95e3d79d78299e93
2,394
js
JavaScript
out/vs/base/node/decoder.js
akrisiun/vscode
dc9c287e8b6be38dd49f1efaf4cd4542807144f4
[ "MIT" ]
1
2021-05-26T06:39:56.000Z
2021-05-26T06:39:56.000Z
out/vs/base/node/decoder.js
akrisiun/vscode
dc9c287e8b6be38dd49f1efaf4cd4542807144f4
[ "MIT" ]
null
null
null
out/vs/base/node/decoder.js
akrisiun/vscode
dc9c287e8b6be38dd49f1efaf4cd4542807144f4
[ "MIT" ]
null
null
null
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ define(["require", "exports", "string_decoder"], function (require, exports, sd) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Convenient way to iterate over output line by line. This helper accommodates for the fact that * a buffer might not end with new lines all the way. * * To use: * - call the write method * - forEach() over the result to get the lines */ class LineDecoder { constructor(encoding = 'utf8') { this.stringDecoder = new sd.StringDecoder(encoding); this.remaining = null; } write(buffer) { const result = []; const value = this.remaining ? this.remaining + this.stringDecoder.write(buffer) : this.stringDecoder.write(buffer); if (value.length < 1) { return result; } let start = 0; let ch; let idx = start; while (idx < value.length) { ch = value.charCodeAt(idx); if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) { result.push(value.substring(start, idx)); idx++; if (idx < value.length) { const lastChar = ch; ch = value.charCodeAt(idx); if ((lastChar === 13 /* CarriageReturn */ && ch === 10 /* LineFeed */) || (lastChar === 10 /* LineFeed */ && ch === 13 /* CarriageReturn */)) { idx++; } } start = idx; } else { idx++; } } this.remaining = start < value.length ? value.substr(start) : null; return result; } end() { return this.remaining; } } exports.LineDecoder = LineDecoder; }); //# sourceMappingURL=decoder.js.map
40.576271
167
0.443609
55d6534e29b829e8fe70b0070670eaf4b8a6c991
108
js
JavaScript
src/components/test/test.component.js
heekim1/WebpackStudy
42174a93370a22fd52fe9318819784c86af637d2
[ "MIT" ]
null
null
null
src/components/test/test.component.js
heekim1/WebpackStudy
42174a93370a22fd52fe9318819784c86af637d2
[ "MIT" ]
null
null
null
src/components/test/test.component.js
heekim1/WebpackStudy
42174a93370a22fd52fe9318819784c86af637d2
[ "MIT" ]
null
null
null
export class TestComponent{ constructor(){ } $onInit(){ console.log('TestComponent Initialized') } }
12
42
0.694444
55d6e56b9bbba4ab73dd5372e9fc954e5112182f
3,185
js
JavaScript
src/components/Popover.js
alexstaroselsky/react-lite-calendar
dcbbda90d35b3c4d3eaf08615637c1aa220a9710
[ "MIT" ]
2
2019-06-24T11:24:50.000Z
2019-07-01T03:48:40.000Z
src/components/Popover.js
alexstaroselsky/react-svelte-calendar
dcbbda90d35b3c4d3eaf08615637c1aa220a9710
[ "MIT" ]
7
2020-09-05T01:39:19.000Z
2022-02-26T12:02:33.000Z
src/components/Popover.js
alexstaroselsky/react-svelte-calendar
dcbbda90d35b3c4d3eaf08615637c1aa220a9710
[ "MIT" ]
null
null
null
import React, { useEffect, useRef, useState } from "react"; import PropTypes from "prop-types"; import classNames from "classnames"; import "./Popover.css"; import dayjs from "dayjs"; function Popover({ children, isOpen, onOpened, onClosed, selected, format, render }) { const contentsWrapperRef = useRef(null); const [translateX, setTranslateX] = useState(0); const [translateY, setTranslateY] = useState(0); const [shrink, setShrink] = useState(false); useEffect(() => { const { innerWidth: w } = window; const contentsWrapper = contentsWrapperRef.current; const rect = contentsWrapper.getBoundingClientRect(); const dist = { top: rect.top + -1 * translateY, bottom: window.innerHeight - rect.bottom + translateY, left: rect.left + -1 * translateX, right: document.body.clientWidth - rect.right + translateX }; let tX, tY; if (w < 480) { tY = dist.bottom; } else if (dist.top < 0) { tY = Math.abs(dist.top); } else if (dist.bottom < 0) { tY = dist.bottom; } else { tY = 0; } if (dist.left < 0) { tX = Math.abs(dist.left); } else if (dist.right < 0) { tX = dist.right; } else { tX = 0; } setTranslateX(tX); setTranslateY(tY); }, [isOpen, translateX, translateY]); useEffect(() => { const handleDocumentClick = e => { if (isOpen) { const { target } = e; const isClickInDatepicker = target.closest(".datepicker"); const isDay = target.classList.contains("day--label"); if (isDay || !isClickInDatepicker) { setShrink(true); } } }; document.addEventListener("click", handleDocumentClick); return () => { document.removeEventListener("click", handleDocumentClick); }; }, [isOpen]); const contentsClass = classNames({ "contents-wrapper": true, visible: isOpen, shrink }); const contentsStyles = { transform: `translate(-50%, -50%) translate(${translateX}px, ${translateY}px)` }; const handleAnimationEnd = () => { if (shrink) { setShrink(false); onClosed(); } }; const formattedDate = dayjs(selected).format(format); return ( <div className="popover"> <div className="trigger"> {render ? ( render(onOpened) ) : ( <button className="calendar-button" type="button" onClick={onOpened}> {formattedDate} </button> )} </div> <div className={contentsClass} style={contentsStyles} ref={contentsWrapperRef} > <div className="contents" onAnimationEnd={handleAnimationEnd}> <div className="contents-inner"> <div className="calendar">{children}</div> </div> </div> </div> </div> ); } Popover.propTypes = { children: PropTypes.node.isRequired, format: PropTypes.string.isRequired, isOpen: PropTypes.bool.isRequired, onOpened: PropTypes.func.isRequired, onClosed: PropTypes.func.isRequired, selected: PropTypes.instanceOf(Date).isRequired, render: PropTypes.func }; export default Popover;
23.947368
82
0.601884
55d7f9ec16171eaef966b9ef595ab12ef7f0a6ed
8,045
js
JavaScript
src/dpnAutocomplete.js
featdd/jQuery.dpnAutocomplete
8873474e4b462e11896ae06b99a5a596ccbf42ca
[ "MIT" ]
null
null
null
src/dpnAutocomplete.js
featdd/jQuery.dpnAutocomplete
8873474e4b462e11896ae06b99a5a596ccbf42ca
[ "MIT" ]
null
null
null
src/dpnAutocomplete.js
featdd/jQuery.dpnAutocomplete
8873474e4b462e11896ae06b99a5a596ccbf42ca
[ "MIT" ]
null
null
null
'use strict'; (function($, window, document, undefined) { var pluginName = 'dpnAutocomplete', defaults = { ajax: {}, categories: [], minChars: 3, autocompleteClass: 'dpn-autocomplete', itemListCallback: function(item, category) { if (typeof category === 'undefined') { return '<li class="item">' + item + '</li>'; } else { return '<li class="' + category.name + ' item">' + item + '</li>'; } }, clickCallback: null, hoverCallback: null }; function Plugin(element, options) { this.element = element; this.settings = $.extend({}, defaults, options); this.init(); } $.extend(Plugin.prototype, { $element: {}, $autocomplete: {}, init: function() { this.$element = $(this.element); this.initDropdown(); this.initEvents(); }, initDropdown: function() { var html = '<div class="' + this.settings.autocompleteClass + '" style="display: none;"><ul>'; $(this.settings.categories).each(function() { var category = this; html += '<li class="category ' + category.name + '" style="display: none;">' + category.label + '</li>'; }); html += '</ul></div>'; $(this.element).after($(html)); this.$autocomplete = $(this.element).next('.' + this.settings.autocompleteClass); }, initEvents: function() { var that = this; var $list = this.$autocomplete.find('ul'); var $selectedItem, $listItems, $lastItem, $firstItem = {}; /* * input event * * executes ajax request or close autocomplete if * input is to small */ $(this.element).on('input', function() { if (that.settings.minChars <= $(this).val().length) { that.execAjaxRequest($(this).val()); } else { that.closeAutocomplete(); } }); /* * focus event * * when element gets focus and has enough input * the autocomplete should be reopened */ $(this.element).on('focus', function() { if (that.settings.minChars <= $(this).val().length) { that.execAjaxRequest($(this).val()); } }); /* * focusout event * * when element loses the focus autocomplete * should be closed */ $(this.element).on('focusout', function() { if (false === that.$autocomplete.is(':hover') && false === that.$element.is(':hover')) { that.closeAutocomplete(); } }); /* * click event * * executes the click callback when click * an item if callback is defined */ $list.on('click', 'li.item', function(event) { if (typeof that.settings.clickCallback === 'function') { that.settings.clickCallback(event, this, that.$element); } that.closeAutocomplete(); }); /* * mouseover event * * adds selected class to elementes hovered * by the mouse and removes from other item */ $list.on('mouseover', 'li.item', function(event) { $selectedItem = $(this); $list.find('li.selected').removeClass('selected'); $selectedItem.addClass('selected'); if (typeof that.settings.hoverCallback === 'function') { that.settings.hoverCallback(event, this); } }); /* * keydown event * * catches several keys if autocomplete is shown * - Enter: simulate click on item * - Escape: closes the autocomplete * - Arrow up/down: navigates threw the items */ $(this.element).on('keydown', function(event) { if (false === that.$autocomplete.is(':hidden')) { $listItems = that.$autocomplete.find('ul li.item'); $selectedItem = $list.find('li.selected'); $firstItem = $listItems.first(); $lastItem = $listItems.last(); /* * Prevent cursor or screen from moving when using arrow keys * and prevent browser sending the form when pushing the enter key */ if (event.which === 38 || event.which === 40 || event.which === 13) { event.preventDefault(); } // escape if (event.which === 27) { that.closeAutocomplete(); } // enter if (event.which === 13) { if (0 <= $selectedItem.length) { $selectedItem.trigger('click'); } } // arrow up if (event.which === 38) { if ($selectedItem.length === 0) { $lastItem.addClass('selected'); } else if ($selectedItem[0] !== $firstItem[0]) { $selectedItem.removeClass('selected'); $selectedItem = $selectedItem.prevAll('li.item:first'); $selectedItem.addClass('selected'); } } // arrow down if (event.which === 40) { if ($selectedItem.length === 0) { $firstItem.addClass('selected'); } else if ($selectedItem[0] !== $lastItem[0]) { $selectedItem.removeClass('selected'); $selectedItem = $selectedItem.nextAll('li.item:first'); $selectedItem.addClass('selected'); } } } }); }, execAjaxRequest: function(input) { var that = this; // get ajax settings and fetch data on success $.ajax(this.getAjaxSettings(input)).success(function(data) { that.addSelections(data); }); }, getAjaxSettings: function(input) { // check if ajax settings is a callback and expects the input if (typeof this.settings.ajax === 'function') { return this.settings.ajax(input); } else { return this.settings.ajax; } }, addSelections: function(data) { var that = this; var categories = this.settings.categories.length; var category, $list = {}; // clear list before adding new items this.clearAutocomplete(); // check if there are categories if (0 === this.settings.categories.length) { $list = that.$autocomplete.find('ul'); if ($(data).length > 0) { that.$autocomplete.show(); } else { that.closeAutocomplete(); } $(data).each(function() { $list.append(that.settings.itemListCallback(this)); }); } else { $(this.settings.categories).each(function() { category = this; if (data.hasOwnProperty(category.name)) { $list = that.$autocomplete.find('ul li.' + category.name); // show autocomplete or count down available categories if (data[category.name].length > 0) { $list.show(); that.$autocomplete.show(); } else { categories--; } /* * hide autocomplete if no categories ar available * else call the listitem callback */ if (0 === categories) { that.closeAutocomplete(); } else { $(data[category.name]).each(function() { $list.after(that.settings.itemListCallback(this, category)); }); } } }); } }, closeAutocomplete: function() { this.$autocomplete.hide(); this.clearAutocomplete(); }, clearAutocomplete: function() { var $autocomListItems = this.$autocomplete.find('ul li'); $autocomListItems.remove('.item'); $autocomListItems.each(function() { $(this).hide(); }); } }); $.fn[pluginName] = function(options) { this.each(function() { if (!$.data(this, 'plugin_' + pluginName)) { $.data(this, 'plugin_' + pluginName, new Plugin(this, options)); } }); return this; }; })(jQuery, window, document);
29.254545
112
0.523928
55d892667cf5a74daf969ac965079ce086e3dc12
2,359
js
JavaScript
My.js
All-the-villains/Dormitory-management
43a4513ac0a51a4321ba47e068b016b3354d005f
[ "MIT" ]
null
null
null
My.js
All-the-villains/Dormitory-management
43a4513ac0a51a4321ba47e068b016b3354d005f
[ "MIT" ]
null
null
null
My.js
All-the-villains/Dormitory-management
43a4513ac0a51a4321ba47e068b016b3354d005f
[ "MIT" ]
null
null
null
import React from 'react'; import axios from 'axios' export default class My extends React.Component{ constructor(props){ super(props); this.state={ imgurl:'' } } componentDidMount(){ } load(){ this.refs.loading.style.display="block" let file=this.refs.file console.log(file.files[0]) let forData=new FormData forData.append('headfile',file.files[0]) var url="http://vueshop.glbuys.com/api/user/myinfo/formdatahead?token=1ec949a15fb709370f" axios({ method:"post", url:url, data:forData }).then(res=>{ this.refs.loading.style.display="none" console.log(res.data) if(res.data.code==200) { let temp="//vueshop.glbuys.com/userfiles/head/" this.setState({ imgurl:temp+res.data.data.msbox }) } }) } //jsx render(){ return( <div className="zong"> <div className="loading" ref="loading">上传中....</div> <input type="file" ref="file" onChange={this.load.bind(this)}/> <img src={this.state.imgurl}/> </div> ) } }
39.983051
116
0.275964
55da4168f3c57703cf7890f20be787bb4d0f0dcd
301
js
JavaScript
frontend/src/pages/Profile.js
Rafael-Batista-Dev/coworking
9c1996a069bb9f5597eff5d9208652574e70c87a
[ "MIT" ]
1
2020-09-17T20:38:54.000Z
2020-09-17T20:38:54.000Z
frontend/src/pages/Profile.js
Rafael-Batista-Dev/coworking
9c1996a069bb9f5597eff5d9208652574e70c87a
[ "MIT" ]
6
2021-03-10T20:44:03.000Z
2022-02-27T05:51:15.000Z
frontend/src/pages/Profile.js
Rafael-Batista-Dev/aircnc
9c1996a069bb9f5597eff5d9208652574e70c87a
[ "MIT" ]
null
null
null
import React from "react"; import ProfileConteiner from "./components/ProfileConteiner/ProfileConteiner"; import SpotsModal from "./components/SpotsModal/SpotsModal"; function Profile() { return ( <div> <ProfileConteiner /> <SpotsModal /> </div> ); } export default Profile;
20.066667
78
0.700997
55dab55c987d3186cb7cea8e33215a8a7837a4a0
250
js
JavaScript
src/assets/gulp/watch.js
RinMinase/anidb-angularjs
8acc85dfae50663b72362224ffa48c8d9e405251
[ "MIT" ]
2
2019-03-03T06:30:26.000Z
2019-09-02T12:25:28.000Z
src/assets/gulp/watch.js
RinMinase/anidb-angularjs
8acc85dfae50663b72362224ffa48c8d9e405251
[ "MIT" ]
2
2019-08-18T08:52:58.000Z
2019-11-22T16:42:44.000Z
src/assets/gulp/watch.js
RinMinase/anidb-angularjs
8acc85dfae50663b72362224ffa48c8d9e405251
[ "MIT" ]
null
null
null
const { task, watch, series } = require("gulp"); const conf = require("../../../gulpfile.js"); task("watch", () => { watch(`${conf.paths.src}/**/*.html`, series("inject-reload")); watch(`${conf.paths.src}/**/*.scss`, series("styles-reload")); });
31.25
63
0.576
55dad4942a2b479c6dc0ae6cd171fd7e7c513a80
42,865
js
JavaScript
scripts/skullcraft.js
seacloud9/ds.skullCraftIntro
1ff07ef97c5128f8ee3414deee9b6582d08d3d08
[ "MIT" ]
1
2015-01-11T06:33:59.000Z
2015-01-11T06:33:59.000Z
scripts/skullcraft.js
seacloud9/ds.skullCraftIntro
1ff07ef97c5128f8ee3414deee9b6582d08d3d08
[ "MIT" ]
null
null
null
scripts/skullcraft.js
seacloud9/ds.skullCraftIntro
1ff07ef97c5128f8ee3414deee9b6582d08d3d08
[ "MIT" ]
null
null
null
{ "metadata" : { "formatVersion" : 3.1, "sourceFile" : "skullcraft.obj", "generatedBy" : "OBJConverter", "vertices" : 504, "faces" : 472, "normals" : 7, "colors" : 0, "uvs" : 730, "materials" : 1 }, "scale" : 1.000000, "materials": [ { "DbgColor" : 15658734, "DbgIndex" : 0, "DbgName" : "Material", "colorAmbient" : [0.0, 0.0, 0.0], "colorDiffuse" : [0.64, 0.64, 0.64], "colorSpecular" : [0.5, 0.5, 0.5], "illumination" : 2, "opticalDensity" : 1.0, "specularCoef" : 96.078431, "transparency" : 1.0 }], "vertices": [5.115385,-0.393028,0.000000,4.923077,-0.393028,0.000000,4.923077,-0.393028,-0.461538,4.788462,-0.393028,-0.461538,4.788462,-0.393028,-0.615385,5.250000,-0.393028,-0.615385,5.250000,-0.393028,-0.461538,5.115385,-0.393028,-0.461538,4.461538,-0.393028,0.000000,4.269231,-0.393028,0.000000,4.269231,-0.393028,-0.615385,4.730769,-0.393028,-0.615385,4.730769,-0.393028,-0.461538,4.461538,-0.393028,-0.461538,4.461538,-0.393028,-0.384615,4.730769,-0.393028,-0.384615,4.730769,-0.393028,-0.230769,4.461538,-0.393028,-0.230769,4.019231,-0.393028,-0.288462,4.057693,-0.393028,-0.288462,4.057693,-0.393028,-0.403846,4.019231,-0.393028,-0.403846,4.019231,-0.393028,-0.442308,4.096154,-0.393028,-0.442308,4.096154,-0.393028,-0.519231,4.019231,-0.393028,-0.519231,4.019231,-0.393028,-0.442308,3.942308,-0.393028,-0.442308,3.942308,-0.393028,-0.519231,3.865385,-0.393028,-0.519231,3.865385,-0.393028,-0.442308,3.942308,-0.393028,-0.442308,3.942308,-0.393028,-0.403846,3.903847,-0.393028,-0.403846,3.903847,-0.393028,-0.288462,3.942308,-0.393028,-0.288462,3.942308,-0.393028,-0.326923,4.019231,-0.393028,-0.326923,3.942308,-0.393028,0.000000,3.750000,-0.393028,0.000000,3.750000,-0.393028,-0.615385,4.211539,-0.393028,-0.615385,4.211539,-0.393028,0.000000,4.019231,-0.393028,0.000000,4.019231,-0.393028,-0.173077,3.942308,-0.393028,-0.173077,3.423077,-0.393028,-0.384615,3.500000,-0.393028,-0.384615,3.500000,-0.393028,-0.461538,3.423077,-0.393028,-0.461538,3.423077,-0.393028,0.000000,3.230769,-0.393028,0.000000,3.230769,-0.393028,-0.615385,3.692308,-0.393028,-0.615385,3.692308,-0.393028,-0.269231,3.634616,-0.393028,-0.269231,3.634616,-0.393028,-0.230769,3.692308,-0.393028,-0.230769,3.692308,-0.393028,0.000000,3.500000,-0.393028,0.000000,3.500000,-0.393028,-0.230769,3.423077,-0.393028,-0.230769,3.173077,-0.393028,0.000000,2.673077,-0.393028,0.000000,2.673077,-0.393028,-0.615385,3.173077,-0.393028,-0.615385,3.173077,-0.393028,-0.461538,2.865385,-0.393028,-0.461538,2.865385,-0.393028,-0.153846,3.173077,-0.393028,-0.153846,2.615385,-0.393028,0.000000,2.153846,-0.393028,0.000000,2.153846,-0.393028,-0.615385,2.346154,-0.393028,-0.615385,2.346154,-0.393028,-0.153846,2.615385,-0.393028,-0.153846,2.096154,-0.393028,0.000000,1.634615,-0.393028,0.000000,1.634615,-0.393028,-0.615385,1.826923,-0.393028,-0.615385,1.826923,-0.393028,-0.153846,2.096154,-0.393028,-0.153846,1.576923,-0.393028,0.000000,1.076923,-0.393028,0.000000,1.076923,-0.393028,-0.615385,1.269231,-0.393028,-0.615385,1.269231,-0.393028,-0.153846,1.384615,-0.393028,-0.153846,1.384615,-0.393028,-0.615385,1.576923,-0.393028,-0.615385,0.730769,-0.393028,0.000000,0.538462,-0.393028,0.000000,0.538462,-0.393028,-0.615385,0.730769,-0.393028,-0.615385,0.730769,-0.393028,-0.480769,0.769231,-0.393028,-0.480769,0.769231,-0.393028,-0.538462,0.826923,-0.393028,-0.538462,0.826923,-0.393028,-0.615385,1.019231,-0.393028,-0.615385,1.019231,-0.393028,-0.403846,0.942308,-0.393028,-0.403846,0.942308,-0.393028,-0.346154,0.884615,-0.393028,-0.346154,0.884615,-0.393028,-0.269231,0.942308,-0.393028,-0.269231,0.942308,-0.393028,-0.211538,1.019231,-0.393028,-0.211538,1.019231,-0.393028,0.000000,0.826923,-0.393028,0.000000,0.826923,-0.393028,-0.076923,0.769231,-0.393028,-0.076923,0.769231,-0.393028,-0.134615,0.730769,-0.393028,-0.134615,0.480769,-0.393028,0.000000,0.000000,-0.393028,0.000000,0.000000,-0.393028,-0.153846,0.288462,-0.393028,-0.153846,0.288462,-0.393028,-0.230769,0.000000,-0.393028,-0.230769,0.000000,-0.393028,-0.615385,0.480769,-0.393028,-0.615385,0.480769,-0.393028,-0.461538,0.192308,-0.393028,-0.461538,0.192308,-0.393028,-0.384615,0.480769,-0.393028,-0.384615,5.115385,-0.933028,0.000000,4.923077,-0.933028,0.000000,4.923077,-0.933028,-0.461538,4.788462,-0.933028,-0.461538,4.788462,-0.933028,-0.615385,5.250000,-0.933028,-0.615385,5.250000,-0.933028,-0.461538,5.115385,-0.933028,-0.461538,4.461538,-0.933028,0.000000,4.269231,-0.933028,0.000000,4.269231,-0.933028,-0.615385,4.730769,-0.933028,-0.615385,4.730769,-0.933028,-0.461538,4.461538,-0.933028,-0.461538,4.461538,-0.933028,-0.384615,4.730769,-0.933028,-0.384615,4.730769,-0.933028,-0.230769,4.461538,-0.933028,-0.230769,4.019231,-0.933028,-0.288462,4.057693,-0.933028,-0.288462,4.057693,-0.933028,-0.403846,4.019231,-0.933028,-0.403846,4.019231,-0.933028,-0.442308,4.096154,-0.933028,-0.442308,4.096154,-0.933028,-0.519231,4.019231,-0.933028,-0.519231,4.019231,-0.933028,-0.442308,3.942308,-0.933028,-0.442308,3.942308,-0.933028,-0.519231,3.865385,-0.933028,-0.519231,3.865385,-0.933028,-0.442308,3.942308,-0.933028,-0.442308,3.942308,-0.933028,-0.403846,3.903847,-0.933028,-0.403846,3.903847,-0.933028,-0.288462,3.942308,-0.933028,-0.288462,3.942308,-0.933028,-0.326923,4.019231,-0.933028,-0.326923,3.942308,-0.933028,0.000000,3.750000,-0.933028,0.000000,3.750000,-0.933028,-0.615385,4.211539,-0.933028,-0.615385,4.211539,-0.933028,0.000000,4.019231,-0.933028,0.000000,4.019231,-0.933028,-0.173077,3.942308,-0.933028,-0.173077,3.423077,-0.933028,-0.384615,3.500000,-0.933028,-0.384615,3.500000,-0.933028,-0.461538,3.423077,-0.933028,-0.461538,3.423077,-0.933028,0.000000,3.230769,-0.933028,0.000000,3.230769,-0.933028,-0.615385,3.692308,-0.933028,-0.615385,3.692308,-0.933028,-0.269231,3.634616,-0.933028,-0.269231,3.634616,-0.933028,-0.230769,3.692308,-0.933028,-0.230769,3.692308,-0.933028,0.000000,3.500000,-0.933028,0.000000,3.500000,-0.933028,-0.230769,3.423077,-0.933028,-0.230769,3.173077,-0.933028,0.000000,2.673077,-0.933028,0.000000,2.673077,-0.933028,-0.615385,3.173077,-0.933028,-0.615385,3.173077,-0.933028,-0.461538,2.865385,-0.933028,-0.461538,2.865385,-0.933028,-0.153846,3.173077,-0.933028,-0.153846,2.615385,-0.933028,0.000000,2.153846,-0.933028,0.000000,2.153846,-0.933028,-0.615385,2.346154,-0.933028,-0.615385,2.346154,-0.933028,-0.153846,2.615385,-0.933028,-0.153846,2.096154,-0.933028,0.000000,1.634615,-0.933028,0.000000,1.634615,-0.933028,-0.615385,1.826923,-0.933028,-0.615385,1.826923,-0.933028,-0.153846,2.096154,-0.933028,-0.153846,1.576923,-0.933028,0.000000,1.076923,-0.933028,0.000000,1.076923,-0.933028,-0.615385,1.269231,-0.933028,-0.615385,1.269231,-0.933028,-0.153846,1.384615,-0.933028,-0.153846,1.384615,-0.933028,-0.615385,1.576923,-0.933028,-0.615385,0.730769,-0.933028,0.000000,0.538462,-0.933028,0.000000,0.538462,-0.933028,-0.615385,0.730769,-0.933028,-0.615385,0.730769,-0.933028,-0.480769,0.769231,-0.933028,-0.480769,0.769231,-0.933028,-0.538462,0.826923,-0.933028,-0.538462,0.826923,-0.933028,-0.615385,1.019231,-0.933028,-0.615385,1.019231,-0.933028,-0.403846,0.942308,-0.933028,-0.403846,0.942308,-0.933028,-0.346154,0.884615,-0.933028,-0.346154,0.884615,-0.933028,-0.269231,0.942308,-0.933028,-0.269231,0.942308,-0.933028,-0.211538,1.019231,-0.933028,-0.211538,1.019231,-0.933028,0.000000,0.826923,-0.933028,0.000000,0.826923,-0.933028,-0.076923,0.769231,-0.933028,-0.076923,0.769231,-0.933028,-0.134615,0.730769,-0.933028,-0.134615,0.480769,-0.933028,0.000000,0.000000,-0.933028,0.000000,0.000000,-0.933028,-0.153846,0.288462,-0.933028,-0.153846,0.288462,-0.933028,-0.230769,0.000000,-0.933028,-0.230769,0.000000,-0.933028,-0.615385,0.480769,-0.933028,-0.615385,0.480769,-0.933028,-0.461538,0.192308,-0.933028,-0.461538,0.192308,-0.933028,-0.384615,0.480769,-0.933028,-0.384615,0.480769,-0.933028,0.000000,0.480769,-0.393028,0.000000,0.000000,-0.933028,0.000000,0.000000,-0.393028,0.000000,0.000000,-0.933028,-0.153846,0.000000,-0.393028,-0.153846,0.288462,-0.933028,-0.153846,0.288462,-0.393028,-0.153846,0.288462,-0.933028,-0.230769,0.288462,-0.393028,-0.230769,0.000000,-0.933028,-0.230769,0.000000,-0.393028,-0.230769,0.000000,-0.933028,-0.615385,0.000000,-0.393028,-0.615385,0.480769,-0.933028,-0.615385,0.480769,-0.393028,-0.615385,0.480769,-0.933028,-0.461538,0.480769,-0.393028,-0.461538,0.192308,-0.933028,-0.461538,0.192308,-0.393028,-0.461538,0.192308,-0.933028,-0.384615,0.192308,-0.393028,-0.384615,0.480769,-0.933028,-0.384615,0.480769,-0.393028,-0.384615,0.730769,-0.933028,0.000000,0.730769,-0.393028,0.000000,0.538462,-0.933028,0.000000,0.538462,-0.393028,0.000000,0.538462,-0.933028,-0.615385,0.538462,-0.393028,-0.615385,0.730769,-0.933028,-0.615385,0.730769,-0.393028,-0.615385,0.730769,-0.933028,-0.480769,0.730769,-0.393028,-0.480769,0.769231,-0.933028,-0.480769,0.769231,-0.393028,-0.480769,0.769231,-0.933028,-0.538462,0.769231,-0.393028,-0.538462,0.826923,-0.933028,-0.538462,0.826923,-0.393028,-0.538462,0.826923,-0.933028,-0.615385,0.826923,-0.393028,-0.615385,1.019231,-0.933028,-0.615385,1.019231,-0.393028,-0.615385,1.019231,-0.933028,-0.403846,1.019231,-0.393028,-0.403846,0.942308,-0.933028,-0.403846,0.942308,-0.393028,-0.403846,0.942308,-0.933028,-0.346154,0.942308,-0.393028,-0.346154,0.884615,-0.933028,-0.346154,0.884615,-0.393028,-0.346154,0.884615,-0.933028,-0.269231,0.884615,-0.393028,-0.269231,0.942308,-0.933028,-0.269231,0.942308,-0.393028,-0.269231,0.942308,-0.933028,-0.211538,0.942308,-0.393028,-0.211538,1.019231,-0.933028,-0.211538,1.019231,-0.393028,-0.211538,1.019231,-0.933028,0.000000,1.019231,-0.393028,0.000000,0.826923,-0.933028,0.000000,0.826923,-0.393028,0.000000,0.826923,-0.933028,-0.076923,0.826923,-0.393028,-0.076923,0.769231,-0.933028,-0.076923,0.769231,-0.393028,-0.076923,0.769231,-0.933028,-0.134615,0.769231,-0.393028,-0.134615,0.730769,-0.933028,-0.134615,0.730769,-0.393028,-0.134615,1.576923,-0.933028,0.000000,1.576923,-0.393028,0.000000,1.076923,-0.933028,0.000000,1.076923,-0.393028,0.000000,1.076923,-0.933028,-0.615385,1.076923,-0.393028,-0.615385,1.269231,-0.933028,-0.615385,1.269231,-0.393028,-0.615385,1.269231,-0.933028,-0.153846,1.269231,-0.393028,-0.153846,1.384615,-0.933028,-0.153846,1.384615,-0.393028,-0.153846,1.384615,-0.933028,-0.615385,1.384615,-0.393028,-0.615385,1.576923,-0.933028,-0.615385,1.576923,-0.393028,-0.615385,2.096154,-0.933028,0.000000,2.096154,-0.393028,0.000000,1.634615,-0.933028,0.000000,1.634615,-0.393028,0.000000,1.634615,-0.933028,-0.615385,1.634615,-0.393028,-0.615385,1.826923,-0.933028,-0.615385,1.826923,-0.393028,-0.615385,1.826923,-0.933028,-0.153846,1.826923,-0.393028,-0.153846,2.096154,-0.933028,-0.153846,2.096154,-0.393028,-0.153846,2.615385,-0.933028,0.000000,2.615385,-0.393028,0.000000,2.153846,-0.933028,0.000000,2.153846,-0.393028,0.000000,2.153846,-0.933028,-0.615385,2.153846,-0.393028,-0.615385,2.346154,-0.933028,-0.615385,2.346154,-0.393028,-0.615385,2.346154,-0.933028,-0.153846,2.346154,-0.393028,-0.153846,2.615385,-0.933028,-0.153846,2.615385,-0.393028,-0.153846,3.173077,-0.933028,0.000000,3.173077,-0.393028,0.000000,2.673077,-0.933028,0.000000,2.673077,-0.393028,0.000000,2.673077,-0.933028,-0.615385,2.673077,-0.393028,-0.615385,3.173077,-0.933028,-0.615385,3.173077,-0.393028,-0.615385,3.173077,-0.933028,-0.461538,3.173077,-0.393028,-0.461538,2.865385,-0.933028,-0.461538,2.865385,-0.393028,-0.461538,2.865385,-0.933028,-0.153846,2.865385,-0.393028,-0.153846,3.173077,-0.933028,-0.153846,3.173077,-0.393028,-0.153846,3.423077,-0.933028,-0.384615,3.423077,-0.393028,-0.384615,3.500000,-0.933028,-0.384615,3.500000,-0.393028,-0.384615,3.500000,-0.933028,-0.461538,3.500000,-0.393028,-0.461538,3.423077,-0.933028,-0.461538,3.423077,-0.393028,-0.461538,3.423077,-0.933028,0.000000,3.423077,-0.393028,0.000000,3.230769,-0.933028,0.000000,3.230769,-0.393028,0.000000,3.230769,-0.933028,-0.615385,3.230769,-0.393028,-0.615385,3.692308,-0.933028,-0.615385,3.692308,-0.393028,-0.615385,3.692308,-0.933028,-0.269231,3.692308,-0.393028,-0.269231,3.634616,-0.933028,-0.269231,3.634616,-0.393028,-0.269231,3.634616,-0.933028,-0.230769,3.634616,-0.393028,-0.230769,3.692308,-0.933028,-0.230769,3.692308,-0.393028,-0.230769,3.692308,-0.933028,0.000000,3.692308,-0.393028,0.000000,3.500000,-0.933028,0.000000,3.500000,-0.393028,0.000000,3.500000,-0.933028,-0.230769,3.500000,-0.393028,-0.230769,3.423077,-0.933028,-0.230769,3.423077,-0.393028,-0.230769,4.019231,-0.933028,-0.288462,4.019231,-0.393028,-0.288462,4.057693,-0.933028,-0.288462,4.057693,-0.393028,-0.288462,4.057693,-0.933028,-0.403846,4.057693,-0.393028,-0.403846,4.019231,-0.933028,-0.403846,4.019231,-0.393028,-0.403846,4.019231,-0.933028,-0.442308,4.019231,-0.393028,-0.442308,4.096154,-0.933028,-0.442308,4.096154,-0.393028,-0.442308,4.096154,-0.933028,-0.519231,4.096154,-0.393028,-0.519231,4.019231,-0.933028,-0.519231,4.019231,-0.393028,-0.519231,4.019231,-0.933028,-0.442308,4.019231,-0.393028,-0.442308,3.942308,-0.933028,-0.442308,3.942308,-0.393028,-0.442308,3.942308,-0.933028,-0.519231,3.942308,-0.393028,-0.519231,3.865385,-0.933028,-0.519231,3.865385,-0.393028,-0.519231,3.865385,-0.933028,-0.442308,3.865385,-0.393028,-0.442308,3.942308,-0.933028,-0.442308,3.942308,-0.393028,-0.442308,3.942308,-0.933028,-0.403846,3.942308,-0.393028,-0.403846,3.903847,-0.933028,-0.403846,3.903847,-0.393028,-0.403846,3.903847,-0.933028,-0.288462,3.903847,-0.393028,-0.288462,3.942308,-0.933028,-0.288462,3.942308,-0.393028,-0.288462,3.942308,-0.933028,-0.326923,3.942308,-0.393028,-0.326923,4.019231,-0.933028,-0.326923,4.019231,-0.393028,-0.326923,3.942308,-0.933028,0.000000,3.942308,-0.393028,0.000000,3.750000,-0.933028,0.000000,3.750000,-0.393028,0.000000,3.750000,-0.933028,-0.615385,3.750000,-0.393028,-0.615385,4.211539,-0.933028,-0.615385,4.211539,-0.393028,-0.615385,4.211539,-0.933028,0.000000,4.211539,-0.393028,0.000000,4.019231,-0.933028,0.000000,4.019231,-0.393028,0.000000,4.019231,-0.933028,-0.173077,4.019231,-0.393028,-0.173077,3.942308,-0.933028,-0.173077,3.942308,-0.393028,-0.173077,4.461538,-0.933028,0.000000,4.461538,-0.393028,0.000000,4.269231,-0.933028,0.000000,4.269231,-0.393028,0.000000,4.269231,-0.933028,-0.615385,4.269231,-0.393028,-0.615385,4.730769,-0.933028,-0.615385,4.730769,-0.393028,-0.615385,4.730769,-0.933028,-0.461538,4.730769,-0.393028,-0.461538,4.461538,-0.933028,-0.461538,4.461538,-0.393028,-0.461538,4.461538,-0.933028,-0.384615,4.461538,-0.393028,-0.384615,4.730769,-0.933028,-0.384615,4.730769,-0.393028,-0.384615,4.730769,-0.933028,-0.230769,4.730769,-0.393028,-0.230769,4.461538,-0.933028,-0.230769,4.461538,-0.393028,-0.230769,5.115385,-0.933028,0.000000,5.115385,-0.393028,0.000000,4.923077,-0.933028,0.000000,4.923077,-0.393028,0.000000,4.923077,-0.933028,-0.461538,4.923077,-0.393028,-0.461538,4.788462,-0.933028,-0.461538,4.788462,-0.393028,-0.461538,4.788462,-0.933028,-0.615385,4.788462,-0.393028,-0.615385,5.250000,-0.933028,-0.615385,5.250000,-0.393028,-0.615385,5.250000,-0.933028,-0.461538,5.250000,-0.393028,-0.461538,5.115385,-0.933028,-0.461538,5.115385,-0.393028,-0.461538], "morphTargets": [], "morphColors": [], "normals": [0,1,-0,0,0,0,0,-1,0,0.70708,0,0.70708,-0.70708,0,0.70708,-0.70708,0,-0.70708,0.70708,0,-0.70708], "colors": [], "uvs": [[0.48143,0.96848,0.51392,0.87201,0.51362,0.96858,0.48173,0.87191,0,0,0.86099,0.95267,0.82105,0.85598,0.86128,0.8561,0.82075,0.95255,0.54616,0.000347,0.5867,0.096796,0.54656,0.12911,0.64313,0.12881,0.64303,0.096623,0.58665,0.0807,0.58655,0.048509,0.64298,0.080527,0.64288,0.048337,0.5864,0.000223,0.44517,0.38763,0.46965,0.4962,0.44556,0.51639,0.54214,0.51609,0.48574,0.49615,0.50184,0.4961,0.51793,0.49605,0.54174,0.38733,0.4696,0.4801,0.48569,0.48005,0.50179,0.48,0.51788,0.47995,0.47762,0.47203,0.48567,0.472,0.50176,0.47195,0.50981,0.47193,0.47755,0.44788,0.50974,0.44779,0.48559,0.44786,0.50171,0.45586,0.48562,0.45591,0.50169,0.44781,0.48552,0.42372,0.50162,0.42367,0.48541,0.3875,0.5015,0.38745,0.63854,0.64528,0.59859,0.54858,0.63893,0.51651,0.54236,0.51622,0.5825,0.54853,0.54214,0.58865,0.59854,0.56468,0.58245,0.56463,0.59845,0.59687,0.55421,0.58868,0.55418,0.59673,0.5983,0.64515,0.48128,0.92032,0.45327,0.87195,0.48143,0.87203,0.44119,0.87191,0.44105,0.92019,0.44477,0.51641,0.40483,0.41972,0.44517,0.38765,0.34055,0.38733,0.34045,0.41952,0.40464,0.4841,0.34025,0.4839,0.34015,0.51609,0.008344,0.51671,0.048978,0.64535,0.008739,0.64547,0.048681,0.54878,0.10501,0.54861,0.10492,0.51641,0.22677,0.5167,0.2674,0.64534,0.22717,0.64546,0.26711,0.54876,0.32344,0.54859,0.32334,0.5164,0.34015,0.12946,0.38079,0.2581,0.34055,0.25822,0.38049,0.16152,0.40464,0.16145,0.44517,0.2579,0.40493,0.25802,0.44477,0.12914,0.22677,0.38764,0.2674,0.51628,0.22717,0.5164,0.26732,0.48811,0.28747,0.50012,0.32776,0.51609,0.28752,0.51622,0.32762,0.47183,0.27536,0.48809,0.2754,0.50016,0.29942,0.45985,0.31153,0.47188,0.31149,0.45981,0.29937,0.44375,0.26709,0.41568,0.31144,0.44371,0.31141,0.43164,0.3275,0.43159,0.27514,0.41566,0.32737,0.38733,0.26701,0.38751,0.2751,0.40359,0.28718,0.40355,0.28713,0.38745,0.44532,0.17773,0.4857,0.22589,0.44556,0.25821,0.54616,0.2579,0.54606,0.22571,0.48566,0.2098,0.54601,0.20961,0.50567,0.17755,0.54577,0.12914,0.50563,0.16145,0.44517,0.12944,0.44527,0.16164,0.065024,0.87198,0.097511,0.96846,0.065321,0.96856,0.097215,0.87189,0.94211,0.85591,0.90216,0.95261,0.90187,0.85604,0.9424,0.95249,0.59857,0.4839,0.6391,0.38745,0.63871,0.51622,0.54214,0.51592,0.54224,0.48373,0.59862,0.46781,0.59872,0.43562,0.54229,0.46763,0.54238,0.43544,0.59887,0.38733,0.47774,0.27861,0.45393,0.38733,0.45354,0.25857,0.55011,0.25827,0.49384,0.27856,0.50994,0.27851,0.52603,0.27846,0.55051,0.38703,0.47779,0.29471,0.49389,0.29466,0.50998,0.29461,0.52608,0.29456,0.48587,0.30273,0.49391,0.30271,0.51001,0.30266,0.51806,0.30263,0.48594,0.32687,0.51813,0.32677,0.51006,0.31875,0.49399,0.32685,0.49396,0.3188,0.51008,0.3268,0.49406,0.35099,0.51016,0.35094,0.49417,0.38721,0.51027,0.38716,0.5865,0.1615,0.54656,0.2582,0.54616,0.12943,0.64273,0.12914,0.60259,0.16145,0.64296,0.20156,0.58655,0.1776,0.60264,0.17755,0.58665,0.20978,0.63088,0.2016,0.63091,0.20965,0.58679,0.25807,0.52599,0.92023,0.55431,0.87203,0.55416,0.92032,0.51392,0.92019,0.51407,0.87191,0.040337,0.41972,0.000395,0.51641,0,0.38765,0.10462,0.38733,0.10472,0.41952,0.040535,0.4841,0.10492,0.4839,0.10501,0.51609,0.18614,0.64534,0.22637,0.64546,0.18643,0.54876,0.1301,0.54859,0.1302,0.5164,0.5015,0.64533,0.54214,0.51668,0.54174,0.64545,0.5018,0.54875,0.44547,0.54858,0.44556,0.51639,0.38039,0.000223,0.34055,0.12911,0.34015,0.000347,0.38069,0.096796,0.44477,2.6e-05,0.40483,0.096722,0.40454,0.000149,0.44517,0.12879,0.15362,0.38751,0.11378,0.5164,0.11338,0.38764,0.15371,0.41568,0.21398,0.38733,0.17379,0.40355,0.17374,0.38745,0.21412,0.43159,0.16176,0.41566,0.16172,0.40359,0.18599,0.44375,0.19802,0.43164,0.19806,0.44371,0.18604,0.45985,0.15393,0.48811,0.19811,0.45981,0.19814,0.47188,0.21424,0.47183,0.16198,0.48809,0.21438,0.51609,0.15402,0.51628,0.17409,0.50012,0.16202,0.50016,0.17414,0.51622,0.50563,0.096796,0.54601,0.048633,0.54577,0.12911,0.44517,0.1288,0.44527,0.09661,0.50567,0.0807,0.44532,0.080515,0.48566,0.048448,0.44556,3.8e-05,0.4857,0.032352,0.54606,0.032537,0.63893,0.51653,0.73953,0.51622,0.73987,0.62921,0.98321,0.50041,0.95102,0.5005,0.98286,0.38742,0.80058,0.74299,0.86094,0.7428,0.80092,0.85598,0.22677,0.9849,0.21067,0.98495,0.22642,0.87191,0.56226,0.7587,0.62261,0.75851,0.62296,0.8715,0.62296,0.75826,0.54248,0.75851,0.62261,0.64528,0.6391,0.38764,0.7397,0.38733,0.74005,0.50032,0.40493,0.96921,0.37274,0.96931,0.37239,0.85632,0.48143,0.75892,0.54179,0.75873,0.54214,0.87172,0.34013,0.9849,0.32404,0.98495,0.32369,0.87196,0.42073,0.75892,0.48109,0.75873,0.42107,0.87191,0.82087,0.50038,0.74039,0.50063,0.74005,0.38764,0.91779,0.11334,0.87755,0.11321,0.8779,0.000223,0.11378,0.38733,0.11338,0.25857,0.22677,0.38698,0.8814,0.12943,0.92164,0.12931,0.88175,0.24242,0.73585,0.85579,0.70768,0.85588,0.70734,0.74289,0.98349,0.25853,0.99153,0.2585,0.99188,0.3715,0.10993,0.98487,0.097858,0.98491,0.10958,0.87189,0.40493,0.74307,0.417,0.74304,0.41735,0.85603,0.55858,0.8715,0.54248,0.87155,0.55823,0.75851,0.91439,0.25857,0.95462,0.25844,0.95497,0.37143,0.10963,0.87175,0.065371,0.87189,0.065024,0.75889,0.03214,0.87197,0.048236,0.87192,0.048582,0.98491,0.98741,0.85579,0.97534,0.85583,0.97499,0.74284,0.62651,0.87137,0.63858,0.87133,0.63893,0.98432,0.21033,0.9849,0.19423,0.98495,0.19389,0.87196,0.62651,0.87129,0.62686,0.7583,0.99143,0.24238,0.97936,0.24242,0.97901,0.12943,0.008344,0.87197,0.024439,0.87192,0.024786,0.98491,0.8814,0.24229,0.83714,0.24242,0.83679,0.12943,0.91814,0.000347,0.95837,0.000223,0.95872,0.11321,0.31633,0.9849,0.30024,0.98495,0.31599,0.87191,0.63858,0.7583,0.62651,0.75826,0.62686,0.64528,0.41735,0.96905,0.40528,0.96909,0.417,0.85606,0.99126,0.5005,0.98321,0.50048,0.98356,0.38749,0.36872,0.96921,0.34055,0.9693,0.3402,0.85631,0.3402,0.63004,0.44482,0.62972,0.44517,0.74271,0.22717,0.38733,0.22677,0.25857,0.34015,0.38698,0.8738,0.25857,0.91404,0.25844,0.91439,0.37143,0.54214,0.75844,0.44556,0.75873,0.44522,0.64575,0.10561,0.51648,0.12975,0.5164,0.1301,0.62939,0.73585,0.7425,0.63928,0.7428,0.7355,0.62952,0.95033,0.5005,0.91009,0.50038,0.91043,0.38739,0.22717,0.25822,0.22677,0.12946,0.33976,0.12911,0.73585,0.62981,0.83242,0.62952,0.83277,0.7425,0.000395,0.38733,0,0.25857,0.11338,0.38698,0.92566,0.62934,0.88543,0.62922,0.88577,0.51623,0.22677,0.75845,0.1302,0.75875,0.12985,0.64576,0.11341,0.75892,0.16974,0.75875,0.11375,0.87191,0.59042,0.98468,0.55823,0.98478,0.55789,0.87179,0.73987,0.51653,0.83645,0.51623,0.83679,0.62922,0.34015,0.25857,0.45354,0.38698,0.90152,0.85591,0.86128,0.85579,0.86163,0.7428,0.32369,0.75845,0.22712,0.75875,0.22677,0.64576,0.008344,0.75893,0.064678,0.75876,0.00869,0.87192,0.62296,0.98468,0.59077,0.98478,0.59042,0.87179,0.3402,0.6294,0.34055,0.51641,0.11378,0.25822,0.11338,0.12946,0.22677,0.25787,0.65513,0.37158,0.55051,0.37126,0.55085,0.25827,0.67147,0.96898,0.63928,0.96908,0.63893,0.85609,0.63893,0.743,0.70331,0.7428,0.70366,0.85579,0.40493,0.85603,0.34055,0.85622,0.3402,0.74323,0.80023,0.85599,0.80058,0.743,0.97499,0.85579,0.9428,0.85589,0.94245,0.7429,0.14595,0.98495,0.12985,0.9849,0.1302,0.87191,0.43717,0.9849,0.42107,0.98495,0.43682,0.87191,0.15365,0.87196,0.16974,0.87191,0.17009,0.9849,0.29989,0.9849,0.2838,0.98495,0.28345,0.87196,0.90187,0.85579,0.90221,0.7428,0.000395,0.25822,0,0.12946,0.11338,0.25787,0.65547,0.25857,0.75204,0.25827,0.65582,0.37156,0.82517,0.37133,0.75274,0.37156,0.75239,0.25857,0.99109,0.62928,0.97901,0.62924,0.97936,0.51625,0.99983,0.2424,0.99178,0.24242,0.99143,0.12943,0.97901,0.6297,0.99109,0.62966,0.99143,0.74265,0.83714,0.62937,0.83679,0.51638,0.96223,0.74278,0.92199,0.74265,0.92233,0.62966,0.8814,0.74265,0.83312,0.7428,0.88106,0.62966,0.048582,0.87197,0.064678,0.87192,0.065024,0.98491,0.8695,0.50038,0.82122,0.50053,0.82087,0.38754,0.33176,0.38735,0.33981,0.38733,0.34015,0.50032,0.12985,0.75845,0.10571,0.75853,0.1295,0.64546,0.21438,0.38735,0.22242,0.38733,0.22277,0.50032,0.99983,0.74265,0.99178,0.74268,0.99948,0.62966,0.32376,0.62977,0.33986,0.62972,0.3402,0.74271,0.26701,0.9849,0.25091,0.98495,0.26666,0.87191,0.32344,0.51645,0.33954,0.5164,0.33988,0.62939,0.18653,0.9849,0.17044,0.98495,0.17009,0.87196,0.96257,0.12943,0.97867,0.12938,0.97901,0.24237,0.28345,0.9849,0.26736,0.98495,0.2831,0.87191,0.99104,0.96895,0.97494,0.9689,0.97529,0.85591,0.24321,0.9849,0.22712,0.98495,0.22677,0.87196,0.11341,0.87196,0.1295,0.87191,0.99983,0.62924,0.99178,0.62927,0.99143,0.51628,0.99965,0.11329,0.99161,0.11326,0.99195,0.000273,0.98321,0.11321,0.95907,0.11329,0.95872,0.000297,0.98321,0.000297,0.99126,0.000273,0.99978,0.9689,0.99173,0.96893,0.99943,0.85591,0.96257,0.51629,0.97867,0.51624,0.97901,0.62923,0.9958,0.8558,0.98776,0.85583,0.98741,0.74284,0.87721,0.11334,0.83697,0.11321,0.83731,0.000223,0.000395,0.12911,0,0.000347,0.11338,0.12876,0.64296,0.12943,0.73953,0.12914,0.73987,0.24213,0.11378,0.12911,0.11338,0.000347,0.22637,0,0.8695,0.38751,0.90974,0.38739,0.90187,0.9689,0.86565,0.96901,0.96257,0.62971,0.97867,0.62966,0.97901,0.74265,0.96257,0.62923,0.92636,0.62934,0.92601,0.51635,0.92199,0.12943,0.96223,0.12931,0.96257,0.2423,0.22717,0.12911,0.22677,0.000347,0.34015,0.12876,0.83662,0.11351,0.74005,0.11321,0.74039,0.000223,0.80127,0.96898,0.76908,0.96908,0.76873,0.85609,0.33978,0.87191,0.28345,0.87174,0.2838,0.75875,0.82075,0.96896,0.80465,0.96901,0.80431,0.85603,0.22677,0.87174,0.94275,0.969,0.9424,0.85601,0.17009,0.87174,0.17044,0.75875,0.8738,0.37141,0.82551,0.37156,0.82517,0.25857,0.92164,0.74278,0.88175,0.62966,0.10526,0.75846,0.008691,0.75876,0.10492,0.64547,0.95497,0.25853,0.98314,0.25844,0.98349,0.37143,0.7362,0.96898,0.70401,0.96908,0.73585,0.85599,0.73987,0.12943,0.83645,0.12914,0.83679,0.24213,0.76873,0.96898,0.73654,0.96908,0.7362,0.85609,0.67515,0.85607,0.70331,0.85599,0.70366,0.96898,0.64348,0.11351,0.64313,0.000519,0.63928,0.62952,0.95067,0.38751,0.21033,0.87196,0.5626,0.87169,0.54214,0.64552,0.63945,0.50063,0.40458,0.85622,0.48178,0.87191,0.48143,0.87172,0.82052,0.38739,0.22637,0.25822,0.92199,0.2423,0.7355,0.7428,0.98383,0.37152,0.097511,0.87192,0.40528,0.85606,0.54214,0.75856,0.91473,0.37156,0.10929,0.75876,0.032487,0.98496,0.98706,0.7428,0.62686,0.98436,0.20998,0.87191,0.63893,0.75834,0.99109,0.1294,0.008691,0.98496,0.88106,0.1293,0.91848,0.11334,0.29989,0.87196,0.63893,0.64531,0.40493,0.8561,0.99161,0.38751,0.36837,0.85622,0.34055,0.74304,0.33976,0.25822,0.87415,0.37156,0.54179,0.64545,0.10595,0.62947,0.63893,0.62981,0.34015,0.25787,0.7362,0.7428,0.11299,0.25822,0.22642,0.64546,0.59008,0.87169,0.74022,0.62952,0.45314,0.25822,0.90187,0.74292,0.32334,0.64546,0.065024,0.87175,0.62261,0.87169,0.44517,0.51674,0.22637,0.12911,0.65547,0.25859,0.67112,0.85599,0.63928,0.85599,0.40458,0.74304,0.97464,0.7428,0.14629,0.87196,0.42073,0.87196,0.15399,0.98495,0.29955,0.87191,0.94245,0.74292,0.11299,0.12911,0.75239,0.37126,0.82482,0.25834,0.99143,0.51629,0.99948,0.12941,0.97936,0.74269,0.88508,0.51623,0.96257,0.62979,0.83277,0.62981,0.048929,0.98496,0.86916,0.38739,0.33211,0.50034,0.10536,0.64553,0.21472,0.50034,0.99143,0.62969,0.32411,0.74276,0.25057,0.87196,0.32379,0.62944,0.18618,0.87191,0.96292,0.24242,0.26701,0.87196,0.99138,0.85596,0.24286,0.87191,0.11375,0.98495,0.99948,0.51625,1,0.000297,0.98286,0.000223,0.98356,0.11329,0.99138,0.85594,0.96292,0.62928,0.99546,0.74281,0.87755,0.000347,0.11299,0,0.6433,0.24242,0.22677,0.12876,0.86985,0.5005,0.86531,0.85603,0.96292,0.7427,0.96223,0.51624,0.92233,0.24242,0.33976,0,0.83697,0.000519,0.80092,0.85599,0.34013,0.75892,0.8204,0.85598,0.28345,0.75892,0.97459,0.85591,0.22677,0.75892,0.87345,0.25842,0.92199,0.62979,0.008344,0.64577,0.95532,0.37152,0.70366,0.85609,0.74022,0.24242,0.76839,0.85599,0.67549,0.96906,0.7397,0.000223]], "faces": [42,3,5,4,0,0,1,2,0,0,0,42,3,6,5,0,0,3,1,0,0,0,42,2,6,3,0,4,4,4,1,1,1,42,1,7,2,0,5,6,7,0,0,0,42,7,6,2,0,4,4,4,1,1,1,42,1,0,7,0,5,8,6,0,0,0,42,9,13,10,0,9,10,11,0,0,0,42,13,11,10,0,10,12,11,0,0,0,42,13,12,11,0,10,13,12,0,0,0,42,9,14,13,0,9,14,10,0,0,0,42,9,17,14,0,9,15,14,0,0,0,42,17,15,14,0,15,16,14,0,0,0,42,17,16,15,0,15,17,16,0,0,0,42,9,8,17,0,9,18,15,0,0,0,42,39,29,40,0,19,20,21,0,0,0,42,29,41,40,0,20,22,21,0,0,0,42,29,28,41,0,20,23,22,0,0,0,42,28,25,41,0,23,24,22,0,0,0,42,25,24,41,0,24,25,22,0,0,0,42,24,42,41,0,25,26,22,0,0,0,42,39,30,29,0,19,27,20,0,0,0,42,27,25,28,0,28,24,23,0,0,0,42,27,26,25,0,28,29,24,0,0,0,42,23,42,24,0,30,26,25,0,0,0,42,39,33,30,0,19,31,27,0,0,0,42,33,31,30,0,31,28,27,0,0,0,42,33,32,31,0,31,32,28,0,0,0,42,21,23,22,0,33,30,29,0,0,0,42,21,20,23,0,33,34,30,0,0,0,42,20,42,23,0,34,26,30,0,0,0,42,39,34,33,0,19,35,31,0,0,0,42,19,42,20,0,36,26,34,0,0,0,42,35,37,36,0,37,38,39,0,0,0,42,35,18,37,0,37,40,38,0,0,0,42,39,35,34,0,19,37,35,0,0,0,42,39,18,35,0,19,40,37,0,0,0,42,39,19,18,0,19,36,40,0,0,0,42,39,45,19,0,19,41,36,0,0,0,42,45,44,19,0,41,42,36,0,0,0,42,44,42,19,0,42,26,36,0,0,0,42,39,38,45,0,19,43,41,0,0,0,42,43,42,44,0,44,26,42,0,0,0,42,51,49,52,0,45,46,47,0,0,0,42,49,53,52,0,46,48,47,0,0,0,42,49,48,53,0,46,49,48,0,0,0,42,48,54,53,0,49,50,48,0,0,0,42,51,46,49,0,45,51,46,0,0,0,42,47,54,48,0,52,50,49,0,0,0,42,51,47,46,0,45,52,51,0,0,0,42,51,61,47,0,45,53,52,0,0,0,42,61,55,47,0,53,54,52,0,0,0,42,55,54,47,0,54,50,52,0,0,0,42,61,56,55,0,53,55,54,0,0,0,42,51,50,61,0,45,56,53,0,0,0,42,60,56,61,0,4,4,4,1,1,1,42,59,56,60,0,57,58,59,0,0,0,42,59,57,56,0,57,60,58,0,0,0,42,59,58,57,0,57,61,60,0,0,0,42,63,67,64,0,62,63,64,0,0,0,42,67,65,64,0,63,65,64,0,0,0,42,67,66,65,0,63,66,65,0,0,0,42,63,68,67,0,62,67,63,0,0,0,42,63,69,68,0,62,68,67,0,0,0,42,63,62,69,0,62,69,68,0,0,0,42,71,73,72,0,70,71,72,0,0,0,42,71,74,73,0,70,73,71,0,0,0,42,71,75,74,0,70,74,73,0,0,0,42,71,70,75,0,70,75,74,0,0,0,42,77,79,78,0,76,77,78,0,0,0,42,77,80,79,0,76,79,77,0,0,0,42,77,81,80,0,76,80,79,0,0,0,42,77,76,81,0,76,81,80,0,0,0,42,83,85,84,0,82,83,84,0,0,0,42,83,86,85,0,82,85,83,0,0,0,42,87,89,88,0,86,87,88,0,0,0,42,87,82,89,0,86,89,87,0,0,0,42,83,87,86,0,82,86,85,0,0,0,42,83,82,87,0,82,89,86,0,0,0,42,91,93,92,0,90,91,92,0,0,0,42,91,94,93,0,90,93,91,0,0,0,42,97,99,98,0,94,95,96,0,0,0,42,97,100,99,0,94,97,95,0,0,0,42,95,97,96,0,98,94,99,0,0,0,42,95,100,97,0,98,97,94,0,0,0,42,91,95,94,0,90,98,93,0,0,0,42,91,103,95,0,90,100,98,0,0,0,42,103,101,95,0,100,101,98,0,0,0,42,101,100,95,0,101,97,98,0,0,0,42,103,102,101,0,100,102,101,0,0,0,42,91,104,103,0,90,103,100,0,0,0,42,91,113,104,0,90,104,103,0,0,0,42,113,105,104,0,104,105,103,0,0,0,42,113,106,105,0,104,106,105,0,0,0,42,113,107,106,0,104,107,106,0,0,0,42,113,112,107,0,104,108,107,0,0,0,42,112,108,107,0,108,109,107,0,0,0,42,91,90,113,0,90,110,104,0,0,0,42,111,110,112,0,111,112,108,0,0,0,42,110,108,112,0,112,109,108,0,0,0,42,109,108,110,0,113,109,112,0,0,0,42,119,123,120,0,114,115,116,0,0,0,42,123,121,120,0,115,117,116,0,0,0,42,123,122,121,0,115,118,117,0,0,0,42,119,124,123,0,114,119,115,0,0,0,42,119,125,124,0,114,120,119,0,0,0,42,119,118,125,0,114,121,120,0,0,0,42,118,114,125,0,121,122,120,0,0,0,42,117,114,118,0,123,122,121,0,0,0,42,115,117,116,0,124,123,125,0,0,0,42,115,114,117,0,124,122,123,0,0,0,42,131,129,130,0,126,127,128,2,2,2,42,132,129,131,0,129,127,126,2,2,2,42,132,128,129,0,4,4,4,1,1,1,42,133,127,128,0,130,131,132,2,2,2,42,132,133,128,0,4,4,4,1,1,1,42,126,127,133,0,133,131,130,2,2,2,42,139,135,136,0,134,135,136,2,2,2,42,137,139,136,0,137,134,136,2,2,2,42,138,139,137,0,138,134,137,2,2,2,42,140,135,139,0,139,135,134,2,2,2,42,143,135,140,0,140,135,139,2,2,2,42,141,143,140,0,141,140,139,2,2,2,42,142,143,141,0,142,140,141,2,2,2,42,134,135,143,0,143,135,140,2,2,2,42,155,165,166,0,144,145,146,2,2,2,42,167,155,166,0,147,144,146,2,2,2,42,154,155,167,0,148,144,147,2,2,2,42,151,154,167,0,149,148,147,2,2,2,42,150,151,167,0,150,149,147,2,2,2,42,168,150,167,0,151,150,147,2,2,2,42,156,165,155,0,152,145,144,2,2,2,42,151,153,154,0,149,153,148,2,2,2,42,152,153,151,0,154,153,149,2,2,2,42,168,149,150,0,151,155,150,2,2,2,42,159,165,156,0,156,145,152,2,2,2,42,157,159,156,0,153,156,152,2,2,2,42,158,159,157,0,157,156,153,2,2,2,42,149,147,148,0,155,158,154,2,2,2,42,146,147,149,0,159,158,155,2,2,2,42,168,146,149,0,151,159,155,2,2,2,42,160,165,159,0,160,145,156,2,2,2,42,168,145,146,0,151,161,159,2,2,2,42,163,161,162,0,162,163,164,2,2,2,42,144,161,163,0,165,163,162,2,2,2,42,161,165,160,0,163,145,160,2,2,2,42,144,165,161,0,165,145,163,2,2,2,42,145,165,144,0,161,145,165,2,2,2,42,171,165,145,0,166,145,161,2,2,2,42,170,171,145,0,167,166,161,2,2,2,42,168,170,145,0,151,167,161,2,2,2,42,164,165,171,0,168,145,166,2,2,2,42,168,169,170,0,151,169,167,2,2,2,42,175,177,178,0,170,171,172,2,2,2,42,179,175,178,0,173,170,172,2,2,2,42,174,175,179,0,174,170,173,2,2,2,42,180,174,179,0,175,174,173,2,2,2,42,172,177,175,0,176,171,170,2,2,2,42,180,173,174,0,175,177,174,2,2,2,42,173,177,172,0,177,171,176,2,2,2,42,187,177,173,0,178,171,177,2,2,2,42,181,187,173,0,179,178,177,2,2,2,42,180,181,173,0,175,179,177,2,2,2,42,182,187,181,0,180,178,179,2,2,2,42,176,177,187,0,181,171,178,2,2,2,42,182,186,187,0,4,4,4,1,1,1,42,182,185,186,0,182,183,184,2,2,2,42,183,185,182,0,185,183,182,2,2,2,42,184,185,183,0,186,183,185,2,2,2,42,193,189,190,0,187,188,189,2,2,2,42,191,193,190,0,190,187,189,2,2,2,42,192,193,191,0,191,187,190,2,2,2,42,194,189,193,0,192,188,187,2,2,2,42,195,189,194,0,193,188,192,2,2,2,42,188,189,195,0,194,188,193,2,2,2,42,199,197,198,0,195,76,196,2,2,2,42,200,197,199,0,197,76,195,2,2,2,42,201,197,200,0,198,76,197,2,2,2,42,196,197,201,0,199,76,198,2,2,2,42,205,203,204,0,200,201,202,2,2,2,42,206,203,205,0,203,201,200,2,2,2,42,207,203,206,0,204,201,203,2,2,2,42,202,203,207,0,205,201,204,2,2,2,42,211,209,210,0,206,207,208,2,2,2,42,212,209,211,0,209,207,206,2,2,2,42,215,213,214,0,210,211,212,2,2,2,42,208,213,215,0,213,211,210,2,2,2,42,213,209,212,0,211,207,209,2,2,2,42,208,209,213,0,213,207,211,2,2,2,42,219,217,218,0,214,215,216,2,2,2,42,220,217,219,0,217,215,214,2,2,2,42,225,223,224,0,218,219,220,2,2,2,42,226,223,225,0,221,219,218,2,2,2,42,223,221,222,0,219,222,223,2,2,2,42,226,221,223,0,221,222,219,2,2,2,42,221,217,220,0,222,215,217,2,2,2,42,229,217,221,0,224,215,222,2,2,2,42,227,229,221,0,225,224,222,2,2,2,42,226,227,221,0,221,225,222,2,2,2,42,228,229,227,0,226,224,225,2,2,2,42,230,217,229,0,227,215,224,2,2,2,42,239,217,230,0,228,215,227,2,2,2,42,231,239,230,0,229,228,227,2,2,2,42,232,239,231,0,230,228,229,2,2,2,42,233,239,232,0,231,228,230,2,2,2,42,238,239,233,0,232,228,231,2,2,2,42,234,238,233,0,233,232,231,2,2,2,42,216,217,239,0,234,215,228,2,2,2,42,236,237,238,0,235,236,232,2,2,2,42,234,236,238,0,233,235,232,2,2,2,42,234,235,236,0,233,237,235,2,2,2,42,249,245,246,0,238,239,240,2,2,2,42,247,249,246,0,241,238,240,2,2,2,42,248,249,247,0,242,238,241,2,2,2,42,250,245,249,0,243,239,238,2,2,2,42,251,245,250,0,244,239,243,2,2,2,42,244,245,251,0,245,239,244,2,2,2,42,240,244,251,0,246,245,244,2,2,2,42,240,243,244,0,246,247,245,2,2,2,42,243,241,242,0,247,9,248,2,2,2,42,240,241,243,0,246,9,247,2,2,2,42,253,255,254,0,249,250,251,3,4,4,42,255,257,254,0,252,253,254,4,5,4,42,257,259,256,0,255,256,257,5,5,5,42,259,261,258,0,258,259,260,5,4,5,42,261,263,262,0,261,262,263,4,4,4,42,263,265,262,0,264,265,266,4,5,4,42,265,267,266,0,267,268,269,5,6,6,42,267,269,268,0,270,271,272,6,3,3,42,269,271,270,0,273,274,275,3,3,3,42,271,273,272,0,276,277,278,3,6,6,42,273,275,272,0,279,280,281,6,6,6,42,275,253,252,0,282,283,284,6,3,3,42,277,279,278,0,285,286,287,3,4,4,42,279,281,278,0,288,289,290,4,5,4,42,281,283,280,0,291,292,293,5,6,5,42,283,285,284,0,294,295,296,6,6,6,42,285,287,286,0,297,298,299,6,5,5,42,287,289,286,0,300,301,302,5,5,5,42,289,291,290,0,303,304,305,5,5,5,42,291,293,290,0,306,307,308,5,5,5,42,293,295,294,0,309,310,311,5,6,6,42,295,297,296,0,312,313,314,6,3,3,42,297,299,298,0,315,316,317,3,3,3,42,299,301,300,0,318,319,320,3,3,3,42,301,303,302,0,321,322,323,3,3,3,42,303,305,304,0,324,325,326,3,6,6,42,305,307,306,0,322,327,328,6,6,6,42,307,309,308,0,329,330,331,6,6,6,42,309,311,310,0,332,333,334,6,6,6,42,311,313,312,0,335,336,337,6,3,3,42,313,315,314,0,338,339,340,3,4,4,42,315,317,314,0,341,342,343,4,4,4,42,317,319,318,0,344,345,346,4,4,4,42,319,321,318,0,347,348,349,4,4,4,42,321,323,322,0,350,351,352,4,3,3,42,323,277,276,0,353,354,355,3,3,3,42,325,327,326,0,356,357,358,3,4,4,42,327,329,326,0,359,360,361,4,5,4,42,329,331,330,0,362,363,364,5,6,6,42,331,333,332,0,365,366,367,6,6,6,42,333,335,334,0,368,369,370,6,5,5,42,335,337,334,0,371,372,373,5,5,5,42,337,339,338,0,374,375,376,5,6,6,42,339,325,324,0,377,378,379,6,3,3,42,341,343,342,0,380,381,382,3,4,4,42,343,345,342,0,383,384,385,4,5,4,42,345,347,346,0,386,387,388,5,6,6,42,347,349,348,0,389,390,391,6,6,6,42,349,351,348,0,392,393,394,6,6,6,42,351,341,340,0,395,396,397,6,3,3,42,353,355,354,0,398,399,400,3,4,4,42,355,357,354,0,65,401,402,4,5,4,42,357,359,358,0,403,404,405,5,6,6,42,359,361,360,0,406,407,408,6,6,6,42,361,363,360,0,409,410,411,6,6,6,42,363,353,352,0,412,413,414,6,3,3,42,365,367,366,0,357,415,416,3,4,4,42,367,369,366,0,417,418,419,4,5,4,42,369,371,370,0,420,421,422,5,6,6,42,371,373,372,0,423,424,425,6,3,3,42,373,375,374,0,426,427,428,3,3,3,42,375,377,376,0,429,430,431,3,6,6,42,377,379,376,0,432,294,433,6,6,6,42,379,365,364,0,434,435,436,6,3,3,42,381,383,382,0,437,438,439,6,5,5,42,383,385,382,0,440,441,442,5,4,5,42,385,387,386,0,443,444,445,4,3,3,42,387,381,380,0,446,447,448,3,6,6,42,389,391,390,0,130,449,450,3,4,4,42,391,393,390,0,451,452,453,4,5,4,42,393,395,392,0,454,455,456,5,6,5,42,395,397,396,0,457,458,459,6,3,3,42,397,399,398,0,460,461,462,3,3,3,42,399,401,400,0,463,464,465,3,6,6,42,401,403,402,0,466,467,468,6,6,6,42,403,405,404,0,387,469,470,6,3,3,42,405,407,406,0,471,472,473,3,4,4,42,407,409,406,0,474,475,476,4,4,4,42,409,411,410,0,477,478,479,4,3,3,42,411,389,388,0,480,481,482,3,3,3,42,413,415,414,0,483,484,485,6,5,5,42,415,417,414,0,486,487,488,5,4,5,42,417,419,418,0,489,490,491,4,4,4,42,419,421,418,0,492,493,494,4,5,4,42,421,423,422,0,495,496,497,5,5,5,42,423,425,422,0,498,499,500,5,4,5,42,425,427,426,0,501,502,503,4,3,3,42,427,429,428,0,504,505,506,3,3,3,42,429,431,430,0,507,508,509,3,4,4,42,431,433,430,0,510,511,512,4,4,4,42,433,435,434,0,513,514,515,4,3,3,42,435,437,436,0,516,517,518,3,6,6,42,437,439,438,0,519,520,438,6,6,6,42,439,441,440,0,521,522,523,6,3,3,42,441,443,442,0,524,525,526,3,3,3,42,443,445,444,0,527,528,529,3,6,6,42,445,447,446,0,530,531,525,6,5,5,42,447,449,446,0,532,533,534,5,5,5,42,449,451,450,0,535,536,537,5,6,6,42,451,413,412,0,538,539,540,6,6,6,42,453,455,454,0,541,542,543,3,4,4,42,455,457,454,0,544,545,546,4,5,4,42,457,459,458,0,547,548,549,5,6,6,42,459,461,460,0,550,551,552,6,3,3,42,461,463,462,0,553,554,375,3,4,4,42,463,465,462,0,555,556,403,4,4,4,42,465,467,466,0,557,558,559,4,3,3,42,467,453,452,0,560,561,562,3,3,3,42,469,471,470,0,563,564,565,3,4,4,42,471,473,470,0,566,567,568,4,5,4,42,473,475,474,0,569,570,571,5,6,6,42,475,477,476,0,572,573,574,6,3,3,42,477,479,478,0,575,576,577,3,3,3,42,479,481,480,0,578,579,580,3,6,6,42,481,483,482,0,512,581,407,6,6,6,42,483,485,484,0,514,582,583,6,3,3,42,485,487,486,0,260,584,585,3,3,3,42,487,469,468,0,586,587,588,3,3,3,42,489,491,490,0,589,474,590,3,4,4,42,491,493,490,0,591,592,593,4,4,4,42,493,495,494,0,594,595,596,4,4,4,42,495,497,494,0,597,598,599,4,5,4,42,497,499,498,0,600,601,602,5,6,6,42,499,501,500,0,603,604,605,6,3,3,42,501,503,502,0,606,607,608,3,3,3,42,503,489,488,0,570,609,610,3,3,3,42,252,253,254,0,611,249,251,3,3,4,42,257,256,254,0,253,612,254,5,5,4,42,259,258,256,0,256,404,257,5,5,5,42,261,260,258,0,259,613,260,4,4,5,42,260,261,262,0,614,261,263,4,4,4,42,265,264,262,0,265,615,266,5,5,4,42,264,265,266,0,616,267,269,5,5,6,42,266,267,268,0,617,270,272,6,6,3,42,268,269,270,0,618,273,275,3,3,3,42,270,271,272,0,575,276,278,3,3,6,42,275,274,272,0,280,619,281,6,6,6,42,274,275,252,0,620,282,284,6,6,3,42,276,277,278,0,338,285,287,3,3,4,42,281,280,278,0,289,621,290,5,5,4,42,283,282,280,0,292,622,293,6,6,5,42,282,283,284,0,623,294,296,6,6,6,42,284,285,286,0,624,297,299,6,6,5,42,289,288,286,0,301,625,302,5,5,5,42,288,289,290,0,626,303,305,5,5,5,42,293,292,290,0,307,627,308,5,5,5,42,292,293,294,0,628,309,311,5,5,6,42,294,295,296,0,629,312,314,6,6,3,42,296,297,298,0,630,315,317,3,3,3,42,298,299,300,0,631,318,320,3,3,3,42,300,301,302,0,632,321,323,3,3,3,42,302,303,304,0,633,324,326,3,3,6,42,304,305,306,0,634,322,328,6,6,6,42,306,307,308,0,635,329,331,6,6,6,42,308,309,310,0,636,332,334,6,6,6,42,310,311,312,0,637,335,337,6,6,3,42,312,313,314,0,638,338,340,3,3,4,42,317,316,314,0,342,639,343,4,4,4,42,316,317,318,0,640,344,346,4,4,4,42,321,320,318,0,348,641,349,4,4,4,42,320,321,322,0,642,350,352,4,4,3,42,322,323,276,0,643,353,355,3,3,3,42,324,325,326,0,644,356,358,3,3,4,42,329,328,326,0,360,645,361,5,5,4,42,328,329,330,0,646,362,364,5,5,6,42,330,331,332,0,647,365,367,6,6,6,42,332,333,334,0,648,368,370,6,6,5,42,337,336,334,0,372,649,373,5,5,5,42,336,337,338,0,612,374,376,5,5,6,42,338,339,324,0,650,377,379,6,6,3,42,340,341,342,0,651,380,382,3,3,4,42,345,344,342,0,384,652,385,5,5,4,42,344,345,346,0,562,386,388,5,5,6,42,346,347,348,0,653,389,391,6,6,6,42,351,350,348,0,393,584,394,6,6,6,42,350,351,340,0,654,395,397,6,6,3,42,352,353,354,0,655,398,400,3,3,4,42,357,356,354,0,401,656,402,5,5,4,42,356,357,358,0,657,403,405,5,5,6,42,358,359,360,0,658,406,408,6,6,6,42,363,362,360,0,410,659,411,6,6,6,42,362,363,352,0,660,412,414,6,6,3,42,364,365,366,0,661,357,416,3,3,4,42,369,368,366,0,418,662,419,5,5,4,42,368,369,370,0,663,420,422,5,5,6,42,370,371,372,0,664,423,425,6,6,3,42,372,373,374,0,665,426,428,3,3,3,42,374,375,376,0,666,429,431,3,3,6,42,379,378,376,0,294,651,433,6,6,6,42,378,379,364,0,667,434,436,6,6,3,42,380,381,382,0,668,437,439,6,6,5,42,385,384,382,0,441,669,442,4,4,5,42,384,385,386,0,670,443,445,4,4,3,42,386,387,380,0,671,446,448,3,3,6,42,388,389,390,0,672,130,450,3,3,4,42,393,392,390,0,452,673,453,5,5,4,42,395,394,392,0,455,674,456,6,6,5,42,394,395,396,0,675,457,459,6,6,3,42,396,397,398,0,676,460,462,3,3,3,42,398,399,400,0,677,463,465,3,3,6,42,400,401,402,0,678,466,468,6,6,6,42,402,403,404,0,679,387,470,6,6,3,42,404,405,406,0,680,471,473,3,3,4,42,409,408,406,0,475,681,476,4,4,4,42,408,409,410,0,682,477,479,4,4,3,42,410,411,388,0,683,480,482,3,3,3,42,412,413,414,0,684,483,485,6,6,5,42,417,416,414,0,487,685,488,4,4,5,42,416,417,418,0,686,489,491,4,4,4,42,421,420,418,0,493,687,494,5,5,4,42,420,421,422,0,688,495,497,5,5,5,42,425,424,422,0,499,689,500,4,4,5,42,424,425,426,0,690,501,503,4,4,3,42,426,427,428,0,691,504,506,3,3,3,42,428,429,430,0,692,507,509,3,3,4,42,433,432,430,0,511,693,512,4,4,4,42,432,433,434,0,694,513,515,4,4,3,42,434,435,436,0,695,516,518,3,3,6,42,436,437,438,0,696,519,438,6,6,6,42,438,439,440,0,697,521,523,6,6,3,42,440,441,442,0,698,524,526,3,3,3,42,442,443,444,0,699,527,529,3,3,6,42,444,445,446,0,700,530,525,6,6,5,42,449,448,446,0,533,701,534,5,5,5,42,448,449,450,0,702,535,537,5,5,6,42,450,451,412,0,703,538,540,6,6,6,42,452,453,454,0,704,541,543,3,3,4,42,457,456,454,0,545,705,546,5,5,4,42,456,457,458,0,706,547,549,5,5,6,42,458,459,460,0,707,550,552,6,6,3,42,460,461,462,0,708,553,375,3,3,4,42,465,464,462,0,556,709,403,4,4,4,42,464,465,466,0,710,557,559,4,4,3,42,466,467,452,0,711,560,562,3,3,3,42,468,469,470,0,712,563,565,3,3,4,42,473,472,470,0,567,713,568,5,5,4,42,472,473,474,0,714,569,571,5,5,6,42,474,475,476,0,715,572,574,6,6,3,42,476,477,478,0,716,575,577,3,3,3,42,478,479,480,0,717,578,580,3,3,6,42,480,481,482,0,718,512,407,6,6,6,42,482,483,484,0,719,514,583,6,6,3,42,484,485,486,0,720,260,585,3,3,3,42,486,487,468,0,721,586,588,3,3,3,42,488,489,490,0,722,589,590,3,3,4,42,493,492,490,0,592,723,593,4,4,4,42,492,493,494,0,724,594,596,4,4,4,42,497,496,494,0,598,725,599,5,5,4,42,496,497,498,0,726,600,602,5,5,6,42,498,499,500,0,727,603,605,6,6,3,42,500,501,502,0,728,606,608,3,3,3,42,502,503,488,0,729,570,610,3,3,3] }
931.847826
15,935
0.708154
55db0a8db2bc8862f3f041a20fe5047f78c68685
1,522
js
JavaScript
backend/src/services/atlassian/index.js
elijahmontenegro/fullstack-graphql-sequelize-postgres-atlassian-oauth
c226b02f786e64d2f70ffdee614921e86228a928
[ "MIT" ]
null
null
null
backend/src/services/atlassian/index.js
elijahmontenegro/fullstack-graphql-sequelize-postgres-atlassian-oauth
c226b02f786e64d2f70ffdee614921e86228a928
[ "MIT" ]
null
null
null
backend/src/services/atlassian/index.js
elijahmontenegro/fullstack-graphql-sequelize-postgres-atlassian-oauth
c226b02f786e64d2f70ffdee614921e86228a928
[ "MIT" ]
null
null
null
const AtlassianStrategy = require('passport-atlassian-oauth2'); const { atlassian: config, jwt } = require('../../config'); const models = require('../../models'); const { getTimeExpires } = require('../time'); const cloudinary = require('../cloudinary'); const { v4: uuidv4 } = require('uuid'); module.exports = new AtlassianStrategy({ clientID: config.clientID, clientSecret: config.clientSecret, callbackURL: config.callbackURL, scope: config.scope, }, async (accessToken, refreshToken, { expires_in }, profile, cb) => { // this is a constant hence not needed in the db so we inlcude it in the cookie for later access. const cloudId = config.cloudID; let user = await models.User.findOne({ where: { id: profile.id } }); // i need to return object not model const upload_photo = await cloudinary.v2.uploader.upload(profile.photo, { public_id: profile.id, overwrite: true, tags: ['avatar'] }); if (!user) { // include the expiry time in user for refreshing the accessToken later const timeExpiry = getTimeExpires(expires_in); user = await models.User.create({ id: profile.id, displayName: profile.displayName, email: profile.email, photo: upload_photo.secure_url, accessToken: accessToken, refreshToken: refreshToken, timeExpiry: timeExpiry }); // i need to return a object not sequelize model } return cb(null, Object.assign(user.get({ plain: true }), { cloudId })); } );
34.590909
109
0.662286
55dbaedd560fdf9947d2cb93de3a0dc470ab5ffc
1,182
js
JavaScript
cloud/functions/base/fn/getGrade.js
xhwgood/hynuHelper
41b51aeb0e6b4c151d9370418d2654f8b0ed1071
[ "MIT" ]
15
2020-03-13T10:56:58.000Z
2021-03-17T14:47:54.000Z
cloud/functions/base/fn/getGrade.js
xhwgood/hynuHelper
41b51aeb0e6b4c151d9370418d2654f8b0ed1071
[ "MIT" ]
2
2022-01-02T14:28:23.000Z
2022-02-24T03:09:46.000Z
cloud/functions/base/fn/getGrade.js
xhwgood/hynuHelper
41b51aeb0e6b4c151d9370418d2654f8b0ed1071
[ "MIT" ]
5
2020-06-29T01:58:51.000Z
2021-03-17T14:47:57.000Z
// @ts-check const rp = require('request-promise') const cheerio = require('cheerio') const strToDate = require('../strToDate') /** * @param {{ * sessionid: string * }} data * @param {string} url */ exports.getGrade = async (data, url) => { const { sessionid } = data const headers = { Cookie: sessionid } const options = { uri: `${url}/kjlbgl.do?method=findXskjcjXszq`, headers } return rp(options) .then(body => { let code const grade = [] if (body.includes('错误')) { code = 401 } else { const $ = cheerio.load(body) $('#mxh tr').each((i, value) => { const getTxt = num => $(value).children().eq(num).text().trim() grade.push({ grade: getTxt(6), score: getTxt(9), time: strToDate(getTxt(13)) }) code = 200 }) } let msg if (grade.length == 0) { msg = '你还没有考级数据' } else { grade.reverse() } return { grade, code, msg } }) .catch(err => { console.log('服务器内部错误:', err) return { code: 401 } }) }
19.7
73
0.476311
55dd3efd5f5d7c039c326becdd3688ab1717679c
754
js
JavaScript
src/modules/logger/index.js
Techie-Pi/techie-web-utils
085aa9b3f70fc02d0eb3373c80e26b74d57c3595
[ "Apache-2.0" ]
null
null
null
src/modules/logger/index.js
Techie-Pi/techie-web-utils
085aa9b3f70fc02d0eb3373c80e26b74d57c3595
[ "Apache-2.0" ]
1
2021-04-16T12:10:28.000Z
2021-04-16T13:00:26.000Z
src/modules/logger/index.js
Techie-Pi/techie-web-utils
085aa9b3f70fc02d0eb3373c80e26b74d57c3595
[ "Apache-2.0" ]
null
null
null
const log4js = require("log4js"); const trace = (moduleName, ...data) => { log4js.getLogger(moduleName).trace(data); }; const debug = (moduleName, ...data) => { log4js.getLogger(moduleName).debug(data); }; const info = (moduleName, ...data) => { log4js.getLogger(moduleName).info(data); }; const warn = (moduleName, ...data) => { log4js.getLogger(moduleName).warn(data); }; const error = (moduleName, ...data) => { log4js.getLogger(moduleName).error(data); }; const fatal = (moduleName, ...data) => { log4js.getLogger(moduleName).fatal(data); }; // Allow easy migration const log = (moduleName, ...data) => { log4js.getLogger(moduleName).log(data); }; module.exports = { trace, debug, info, warn, error, fatal, log };
22.848485
65
0.64191
55dda912a21f9d3adbd447fd0082927244ec1e51
117
js
JavaScript
A2/html/search/functions_64.js
bxio/csc360
894943f9e0cd7e4982cb0c907bd2524db7d4a58d
[ "Unlicense" ]
null
null
null
A2/html/search/functions_64.js
bxio/csc360
894943f9e0cd7e4982cb0c907bd2524db7d4a58d
[ "Unlicense" ]
null
null
null
A2/html/search/functions_64.js
bxio/csc360
894943f9e0cd7e4982cb0c907bd2524db7d4a58d
[ "Unlicense" ]
null
null
null
var searchData= [ ['delay',['delay',['../class_producer.html#a0126a919a5abbfa32a00981fdc4ff6af',1,'Producer']]] ];
23.4
95
0.709402
55de94c20365bc1c6530b14810f428fb4de2348e
1,656
js
JavaScript
client/regex.js
tetalab/echoplexus
725b1640525a81432f1d47eb155ce7b1021c9280
[ "MIT" ]
1
2015-12-20T07:51:21.000Z
2015-12-20T07:51:21.000Z
client/regex.js
tetalab/echoplexus
725b1640525a81432f1d47eb155ce7b1021c9280
[ "MIT" ]
null
null
null
client/regex.js
tetalab/echoplexus
725b1640525a81432f1d47eb155ce7b1021c9280
[ "MIT" ]
null
null
null
(function(root, factory) { // Set up Backbone appropriately for the environment. if (typeof exports !== 'undefined') { // Node/CommonJS, no need for jQuery in that case. factory(exports); } else if (typeof define === 'function' && define.amd) { // AMD define(['exports'], function(exports) { // Export global even in AMD case in case this script is loaded with // others that may still expect a global Backbone. return factory(exports); }); } })(this,function( exports ) { // utility: a container of useful regexes arranged into some a rough taxonomy exports.REGEXES = { urls: { image: /(\b(https?|http):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|].(jpg|png|bmp|gif|svg))/gi, youtube: /((https?:\/\/)?(www\.)?youtu((?=\.)\.be\/|be\.com\/watch.*v=)([\w\d\-_]*))/gi, all_others: /(\b(https?|http):(\/\/|&#x2F;&#x2F;)[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|;])/gi }, users: { mentions: /(@[^\b\s]*)/gi }, commands: { nick: /^\/(nick|n) /, register: /^\/register/, identify: /^\/(identify|id)/, topic: /^\/(topic) /, broadcast: /^\/(broadcast|bc) /, failed_command: /^\//, private: /^\/private/, public: /^\/public/, password: /^\/(password|pw)/, private_message: /^\/(pm|w|whisper|t|tell) /, join: /^\/(join|j)/, leave: /^\/leave/, pull_logs: /^\/(pull|p|sync|s) /, set_color: /^\/(color|c) /, edit: /^(\/edit) #?(\d*) /, reply: /(>>|&gt;&gt;)(\d+)/g }, colors: { hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i, // matches 3 and 6-digit hex colour codes, optional # } }; });
33.795918
107
0.513285
55de97e064c1d9d21ac1e37e7cec136a073e16f3
1,629
js
JavaScript
src/main/webapp/js/userAdd.js
zhangpeibisha/PrisonGuardAttendance
c7b0ee6163bc008c2149f9259615025691241545
[ "Apache-2.0" ]
1
2018-05-24T09:46:02.000Z
2018-05-24T09:46:02.000Z
src/main/webapp/js/userAdd.js
zhangpeibisha/PrisonGuardAttendance
c7b0ee6163bc008c2149f9259615025691241545
[ "Apache-2.0" ]
1
2018-03-16T17:34:34.000Z
2018-03-16T17:34:34.000Z
src/main/webapp/js/userAdd.js
zhangpeibisha/prisonPerformanceSystem
c7b0ee6163bc008c2149f9259615025691241545
[ "Apache-2.0" ]
3
2018-03-25T15:16:36.000Z
2020-08-31T05:57:01.000Z
$(document).ready(function(){ var userAddUrl = "http://localhost:8080/register.do"; $("#sure").click(function(){ var user = $("#user").val(); var name = $("#name").val(); var wage = $("#wage").val(); var password = $("#password").val(); var password1 = $("#password1").val(); if (user == null || name == null || wage == null || password == null || password1 == null || user == "" || name == "" || wage == "" || password == ""|| password1 == "" ) { alert("输入不能为空"); return; } var num = /^[0-9]*$/;//警号必须是数字 if(!num.test(user)){ alert("请输入正确的警号!"); return; } if(user.length!==7){ alert("警号必须为7位!"); return; } if(password!==password1){ alert("两次输入密码不一致!"); return; } password= hex_md5(password); $.ajax({ type: 'POST', url: userAddUrl, data: { serialNumber:user, name:name, salary:wage, password:password }, success: function (data) { console.info(data); if(data.result==="0"){ alert("添加成功!"); $(location).attr("href","userList.html"); } else{ alert(err(data.result)); } }, dataType: "json" }); }); $("#back").click(function(){ $(location).attr("href","userList.html"); }); });
27.610169
179
0.395948
55dfcc2f377285b6631fc0f114d38e4fe42b4889
297
js
JavaScript
cypress/support/commands.js
jeffrockx/cypress-basico-v2
12d603927c440b191f7728f117ec8913c16d1d87
[ "MIT" ]
2
2022-03-13T23:33:45.000Z
2022-03-16T19:48:59.000Z
cypress/support/commands.js
jeffrockx/cypress-basico-v2
12d603927c440b191f7728f117ec8913c16d1d87
[ "MIT" ]
null
null
null
cypress/support/commands.js
jeffrockx/cypress-basico-v2
12d603927c440b191f7728f117ec8913c16d1d87
[ "MIT" ]
null
null
null
Cypress.Commands.add('fillMandatoryFieldsAndSubmit', function () { cy.get('#firstName').type('Jefferson') cy.get('#lastName').type('Xavier') cy.get('#email').type('jeffersonrock_05@hotmail.com') cy.get('#open-text-area').type('Teste') cy.contains('button', 'Enviar').click() })
42.428571
66
0.6633
55e02a45fced8a626f34a085bc72369b8f9640ed
1,860
js
JavaScript
vicinityManager/server/controllers/nodes/put.js
bAvenir/vicinity-neighbourhood-manager
0f2ee58574af5ba56c18cab47104678747cdff54
[ "MIT" ]
null
null
null
vicinityManager/server/controllers/nodes/put.js
bAvenir/vicinity-neighbourhood-manager
0f2ee58574af5ba56c18cab47104678747cdff54
[ "MIT" ]
null
null
null
vicinityManager/server/controllers/nodes/put.js
bAvenir/vicinity-neighbourhood-manager
0f2ee58574af5ba56c18cab47104678747cdff54
[ "MIT" ]
null
null
null
// Global objects var mongoose = require('mongoose'); var nodeOp = require('../../models/vicinityManager').node; var userAccountOp = require('../../models/vicinityManager').userAccount; var logger = require("../../middlewares/logger"); var myNode = require('../../services/nodes/processNode'); // Function 1 /* Updates a node for an organisation Adds or deletes a node depending on the status field of the node MONGO object Receives request from client */ function putOne(req, res) { var adid = req.params.id; var updates = req.body; var userMail = req.body.decoded_token !== 'undefined' ? req.body.decoded_token.sub : "unknown"; var userId = req.body.decoded_token !== 'undefined' ? req.body.decoded_token.uid : "unknown"; delete updates.userMail; nodeOp.findOneAndUpdate({adid: adid}, {$set: updates}, { new: true }, function(err, data){ if(err){ logger.debug("Error updating the node"); }else{ var cid = data.cid.id; if(req.body.status === 'deleted'){ var adids = []; adids.push(adid); userAccountOp.update({_id: cid}, { $pull: {hasNodes: {extid: adid}} }) .then(function(response){return myNode.deleteNode(adids, userMail, userId);}) .then(function(response){res.json({'error': false, 'message': response});}) .catch(function(err){ logger.debug(err); res.json({'error': true, 'message': err});}); }else{ data.pass = req.body.pass; myNode.updateNode(data, userMail, userId) .then(function(response){res.json({'error': false, 'message': response});}) .catch(function(err){ logger.debug(err); res.json({'error': true, 'message': err});}); } } }); } // Export Functions module.exports.putOne = putOne;
34.444444
99
0.606452
55e037a924a6a58443a77878470f505d3d863f67
423
js
JavaScript
scripts/updateOpenInVscodeHtml.js
SimonSiefke/vscode-html-preview
3191f0d95d7cdeb7ed92c9e33332f16d5032f61f
[ "MIT" ]
4
2019-11-24T13:16:19.000Z
2020-06-09T20:23:20.000Z
scripts/updateOpenInVscodeHtml.js
SimonSiefke/vscode-html-preview
3191f0d95d7cdeb7ed92c9e33332f16d5032f61f
[ "MIT" ]
24
2019-07-15T17:32:03.000Z
2020-07-26T11:06:03.000Z
scripts/updateOpenInVscodeHtml.js
SimonSiefke/vscode-html-preview
3191f0d95d7cdeb7ed92c9e33332f16d5032f61f
[ "MIT" ]
null
null
null
const path = require('path'); const fs = require('fs'); const root = path.join(__dirname, '..'); const highlightCss = fs.readFileSync( path.join(root, 'packages/extension/src/open/open-in-vscode/openInVscode.html'), 'utf-8' ); const code = `export const html = \`${highlightCss}\``; fs.writeFileSync( path.join(root, 'packages/extension/src/open/open-in-vscode/openInVscodeHtml.ts'), code ); console.log('success');
24.882353
83
0.706856
55e0ea19faa992c1c9e18712e4fe52bad9eb0bb3
510
js
JavaScript
esnext/spreadRest.js
Raulcarvalhomelo/javaScript
51e99e75ab99e9f22897be13ae1b3dc4988b64cf
[ "MIT" ]
null
null
null
esnext/spreadRest.js
Raulcarvalhomelo/javaScript
51e99e75ab99e9f22897be13ae1b3dc4988b64cf
[ "MIT" ]
null
null
null
esnext/spreadRest.js
Raulcarvalhomelo/javaScript
51e99e75ab99e9f22897be13ae1b3dc4988b64cf
[ "MIT" ]
null
null
null
// operador rest (juntar)/spread(espalhar) // e representado por ... (redisencias ) // usar rest como parametro de funcao // usar spread com objeto console.log('usar spread com objeto') const funcionario ={nome:'ana', salario:1000.00} const clone = {ativo:true, ...funcionario} console.log(clone) console.log(`\n`) // usar spread com array console.log(' usar spread com array') const grupoA= ['a','b','c'] const grupoB= ['d','e','f'] const grupoFinal= [...grupoA,...grupoB, 'g',5] console.log(grupoFinal)
25.5
48
0.688235
55e22522d3e1215196a142cacfc92e858b49062b
380
js
JavaScript
dummy/models/repayment.js
muheebolakunle/Quick_credit
6f2a153cc03480b35691c21f6d13ecad51483791
[ "MIT" ]
2
2019-06-03T17:41:33.000Z
2020-11-08T10:03:02.000Z
dummy/models/repayment.js
muheebolakunle/Quick_credit
6f2a153cc03480b35691c21f6d13ecad51483791
[ "MIT" ]
3
2019-12-06T06:20:19.000Z
2021-09-01T04:41:31.000Z
dummy/models/repayment.js
muheebolakunle/Quick_credit
6f2a153cc03480b35691c21f6d13ecad51483791
[ "MIT" ]
1
2019-05-23T15:48:03.000Z
2019-05-23T15:48:03.000Z
import moment from 'moment'; export default class Repayments { constructor({ id, loanId, amount, monthlyInstallment, paidAmount, balance }) { this.id = id; this.loanId = loanId; this.createdOn = moment(new Date()); this.amount = amount; this.monthlyInstallment = monthlyInstallment; this.balance = balance; this.paidAmount = paidAmount; } }
23.75
63
0.678947
55e26b16ff7d2394c2e120d272183a0ce6bd176a
1,043
js
JavaScript
src/request/index.js
dizel-by/upload
a4e945872e44a8d94085d0a6aa384c1a01c67742
[ "MIT" ]
596
2017-03-24T01:34:48.000Z
2018-09-10T21:27:17.000Z
src/request/index.js
dizel-by/upload
a4e945872e44a8d94085d0a6aa384c1a01c67742
[ "MIT" ]
32
2017-03-24T12:21:42.000Z
2018-09-12T10:35:06.000Z
src/request/index.js
dizel-by/upload
a4e945872e44a8d94085d0a6aa384c1a01c67742
[ "MIT" ]
32
2017-03-24T01:43:22.000Z
2018-08-18T07:55:54.000Z
import registerListeners from './register-listeners'; export default ({ request, files, instance, progress }) => new Promise(resolve => { const xhr = new XMLHttpRequest(); if (instance) instance(xhr); registerListeners({ xhr, resolve, progress }); xhr.open(request.method || 'POST', request.url); xhr.withCredentials = request.withCredentials || false; if (request.headers) { Object.keys(request.headers).forEach(header => xhr.setRequestHeader(header, request.headers[header])); } //send just the file if no fields or filename is set if (!request.fileName && !request.fields) return xhr.send(files[0]); var formData = new FormData(); //append fields first, fixes https://github.com/expressjs/multer/issues/322 if (request.fields) { Object.keys(request.fields).forEach(field => formData.append(field, request.fields[field])); } Array.from(files).forEach(file => formData.append(request.fileName || 'file', file)); xhr.send(formData); });
31.606061
79
0.666347
55e32ee1a48f29d509d6be6e2855d26cfeecd6eb
183
js
JavaScript
samples/node/web/log/winston/app.js
elfecho/learn-javascript
88e2f1c5397b1726efe9324269f5c869337edb15
[ "Apache-2.0" ]
1,890
2015-08-11T16:57:45.000Z
2022-03-28T23:59:13.000Z
samples/node/web/log/winston/app.js
chanchanrongrong/learn-javascript
88e2f1c5397b1726efe9324269f5c869337edb15
[ "Apache-2.0" ]
10
2016-09-12T03:22:13.000Z
2020-09-04T03:02:50.000Z
samples/node/web/log/winston/app.js
chanchanrongrong/learn-javascript
88e2f1c5397b1726efe9324269f5c869337edb15
[ "Apache-2.0" ]
3,066
2015-09-03T14:16:39.000Z
2022-03-27T19:19:58.000Z
const logger = require('./logger.js'); logger.info('start app...'); try { throw new Error('APP ERROR!'); } catch (e) { logger.error('error', e); } logger.info('app ended.');
18.3
38
0.595628
55e32f87e2960ad778c4f142f555f3c8f665cc81
112
js
JavaScript
spec/dummy/app/assets/config/manifest.js
katalyst/koi
9a9ded399e19f984ee7a944d9b6b286f28e8852d
[ "MIT" ]
2
2020-04-06T07:39:14.000Z
2021-05-05T03:41:17.000Z
spec/dummy/app/assets/config/manifest.js
katalyst/koi
9a9ded399e19f984ee7a944d9b6b286f28e8852d
[ "MIT" ]
267
2015-01-07T05:34:17.000Z
2022-03-29T04:22:00.000Z
spec/dummy/app/assets/config/manifest.js
katalyst/koi
9a9ded399e19f984ee7a944d9b6b286f28e8852d
[ "MIT" ]
5
2015-01-07T00:55:35.000Z
2018-03-22T09:44:14.000Z
//= link_tree ../images //= link_directory ../stylesheets .css //= link koi/manifest.js //= link application.js
22.4
38
0.6875
55e4a0dd14dc41c3b97dc8c4372fc84c71f7616c
1,326
js
JavaScript
src/main/webapp/core/WebUI/Public/Print-Label-Cmd.js
15292137182/era
011d1c468ca4ea989e01ca3b87589b59557a58dd
[ "MIT" ]
null
null
null
src/main/webapp/core/WebUI/Public/Print-Label-Cmd.js
15292137182/era
011d1c468ca4ea989e01ca3b87589b59557a58dd
[ "MIT" ]
null
null
null
src/main/webapp/core/WebUI/Public/Print-Label-Cmd.js
15292137182/era
011d1c468ca4ea989e01ca3b87589b59557a58dd
[ "MIT" ]
null
null
null
/** * Created by WangGuoyan on 2017/2/23. */ $(function () { var jsCheck = isInclude("ibcpLayer.js") == false ? function () { document.write(getRootPath() + "/WebUI/Public/ibcpLayer.js"); } : true; }); //判断js/css是否存在 function isInclude(name) { var js = /js$/i.test(name); var es = document.getElementsByTagName(js ? 'script' : 'link'); for (var i = 0; i < es.length; i++) { if (es[i][js ? 'src' : 'href'].indexOf(name) != -1) { return true; } } return false; } //获取根目录 function getRootPath() { //获取当前网址,如: http://localhost:8083/uimcardprj/share/meun.jsp var curWwwPath = window.document.location.href; //获取主机地址之后的目录,如: uimcardprj/share/meun.jsp var pathName = window.document.location.pathname; var pos = curWwwPath.indexOf(pathName); //获取主机地址,如: http://localhost:8083 var localhostPaht = curWwwPath.substring(0, pos); //获取带"/"的项目名,如:/uimcardprj var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1); return (localhostPaht + projectName); } function callPrint(type, id) { //称量标签信息初始化 var weightingLabelPath = "/WebUI/Public/WeightLabel.html?resultId=" + id; if (type = "weighting") { var LabelPrintIndex = ibcpLayer.ShowIframe(getRootPath() + weightingLabelPath, "称量标签打印", "125mm", "130mm", false, function () { }); } }
28.212766
79
0.653846
55e4a83d3a0ba30708bb0efe3347f933ba092fe7
919
js
JavaScript
src/main/webapp/store/actions/watchListAction/getWatchListAction.js
markcardamis/PropertyFinder
4b5f778cd67fc55f483e7e5fe2a5f47d3e4b1879
[ "MIT" ]
null
null
null
src/main/webapp/store/actions/watchListAction/getWatchListAction.js
markcardamis/PropertyFinder
4b5f778cd67fc55f483e7e5fe2a5f47d3e4b1879
[ "MIT" ]
19
2020-03-25T00:14:21.000Z
2022-01-12T13:09:46.000Z
src/main/webapp/store/actions/watchListAction/getWatchListAction.js
markcardamis/PropertyFinder
4b5f778cd67fc55f483e7e5fe2a5f47d3e4b1879
[ "MIT" ]
1
2019-10-31T18:30:48.000Z
2019-10-31T18:30:48.000Z
import axios from "../../../api/axiosConfig"; import { store } from "../../../javascript"; import { hideLoading, showLoading } from "../loadingAction"; const apiUrl = "/api/notifications?type=watchlist"; export const getWatchList = () => async dispatch => { const { accessToken } = store.getState().auth; const headers = accessToken ? { Authorization: "Bearer " + accessToken } : {}; dispatch(showLoading()); dispatch(setWatchListRequest()); await axios.get(apiUrl, { timeout: 10000, headers }) .then(res=>dispatch({ type: "SET_WATCH_LIST_LOADED", data: res.data })) .catch(error => console.log(error)); dispatch(hideLoading()); }; export const setWatchListRequest = () => dispatch => { dispatch({ type: "SET_WATCH_LIST_REQUEST" }); }; export const setWatchListLoaded = (data) => dispatch => { dispatch({ type: "SET_WATCH_LIST_LOADED", data }); };
29.645161
80
0.642002
55e5566216f9e7846a11a2bd30409f2f304198b4
2,375
js
JavaScript
controllers/record.js
hardman/hellonode
e4b27003941037d47e68bb23cc65590273d2d2d8
[ "Apache-2.0" ]
null
null
null
controllers/record.js
hardman/hellonode
e4b27003941037d47e68bb23cc65590273d2d2d8
[ "Apache-2.0" ]
null
null
null
controllers/record.js
hardman/hellonode
e4b27003941037d47e68bb23cc65590273d2d2d8
[ "Apache-2.0" ]
null
null
null
const recordModel = require('../models/record'); const loginSession = require('../utils/loginSession'); const response = require('../utils/response'); const Error = require('../utils/error'); let getSummaryRecord = async (ctx, next) => { if(!await loginSession.isLogin(ctx)){ ctx.response.body = response.error(Error.codes.server.needLogin, '需要登录'); return; } let uid = await loginSession.getOpenId(ctx); let record = await recordModel.getSummaryRecord(uid); if(record){ if(record.level > 0){ record.speed = record.duration / record.level; }else{ record.speed = 0; } } ctx.response.body = response.succ(record, 'ok'); } let getRecentlyRecords = async (ctx, next) => { if(!await loginSession.isLogin(ctx)){ ctx.response.body = response.error(Error.codes.server.needLogin, '需要登录'); return; } let uid = await loginSession.getOpenId(ctx); let records = await recordModel.getRecentlyRecords(uid); if(Array.isArray(records)){ records = records.map((item) => { return { ...item, speed: item.level > 0 ? item.duration / item.level: 0 }; }); } ctx.response.body = response.succ(records, 'ok'); } let createRecord = async (ctx, next) => { if(!await loginSession.isLogin(ctx)){ ctx.response.body = response.error(Error.codes.server.needLogin, '需要登录'); return; } let uid = await loginSession.getOpenId(ctx); Error.assertNumber(ctx.request.body.duration, 'duration could be converted to number'); Error.assertNumber(ctx.request.body.level, 'level could be converted to number'); Error.assertNumber(ctx.request.body.combo, 'combo could be converted to number'); Error.assertNumber(ctx.request.body.maxcombo, 'maxcombo could be converted to number'); if(await recordModel.createRecord(uid, ctx.request.body.duration, ctx.request.body.level, ctx.request.body.combo, ctx.request.body.maxcombo)){ ctx.response.body = response.succ(null, 'ok'); }else{ ctx.response.body = response.error(Error.codes.server.internalError, '创建游戏记录失败'); } } module.exports = { 'GET /getgamesummaryrecord': getSummaryRecord, 'GET /getgamerecentlyrecords': getRecentlyRecords, 'POST /creategamerecord': createRecord }
37.109375
146
0.652211
55e5782645453fa09f75f39f79a64a2328857efe
3,159
js
JavaScript
test/test.js
icfnext/aws-api-gateway-errors
f7dddeafb8ee5a8b5609b11eb64e4bbb69541bad
[ "Apache-2.0" ]
null
null
null
test/test.js
icfnext/aws-api-gateway-errors
f7dddeafb8ee5a8b5609b11eb64e4bbb69541bad
[ "Apache-2.0" ]
null
null
null
test/test.js
icfnext/aws-api-gateway-errors
f7dddeafb8ee5a8b5609b11eb64e4bbb69541bad
[ "Apache-2.0" ]
1
2018-01-02T16:22:10.000Z
2018-01-02T16:22:10.000Z
var errors = require( '../index' ); var should = require( 'should' ); describe( 'Errors', function() { it( 'Should expose all HTTP errors with appropriate status codes', function() { var badRequest = new errors.BadRequest(), unauthorized = new errors.Unauthorized(), paymentRequired = new errors.PaymentRequired(), forbidden = new errors.Forbidden(), notFound = new errors.NotFound(), methodNotAllowed = new errors.MethodNotAllowed(), notAcceptable = new errors.NotAcceptable(), proxyAuthenticationRequest = new errors.ProxyAuthenticationRequired(), requestTimeout = new errors.RequestTimeout(), conflict = new errors.Conflict(), gone = new errors.Gone(), lengthRequired = new errors.LengthRequired(), preconditionFailed = new errors.PreconditionFailed(), requestEntityTooLarge = new errors.RequestEntityTooLarge(), requestURITooLong = new errors.RequestURITooLong(), unsupportedMediaType = new errors.UnsupportedMediaType(), requestedRangeNotSatisfiable = new errors.RequestedRangeNotSatisfiable(), expectationFailed = new errors.ExpectationFailed(), internalServerError = new errors.InternalServerError(), notImplemented = new errors.NotImplemented(), badGateway = new errors.BadGateway(), serviceUnavailable = new errors.ServiceUnavailable(), gatewayTimeout = new errors.GatewayTimeout(), httpVersionNotSupported = new errors.HTTPVersionNotSupported(); badRequest.toString().should.startWith( '400' ); unauthorized.toString().should.startWith( '401' ); paymentRequired.toString().should.startWith( '402' ); forbidden.toString().should.startWith( '403' ); notFound.toString().should.startWith( '404' ); methodNotAllowed.toString().should.startWith( '405' ); notAcceptable.toString().should.startWith( '406' ); proxyAuthenticationRequest.toString().should.startWith( '407' ); requestTimeout.toString().should.startWith( '408' ); conflict.toString().should.startWith( '409' ); gone.toString().should.startWith( '410' ); lengthRequired.toString().should.startWith( '411' ); preconditionFailed.toString().should.startWith( '412' ); requestEntityTooLarge.toString().should.startWith( '413' ); requestURITooLong.toString().should.startWith( '414' ); unsupportedMediaType.toString().should.startWith( '415' ); requestedRangeNotSatisfiable.toString().should.startWith( '416' ); expectationFailed.toString().should.startWith( '417' ); internalServerError.toString().should.startWith( '500' ); notImplemented.toString().should.startWith( '501' ); badGateway.toString().should.startWith( '502' ); serviceUnavailable.toString().should.startWith( '503' ); gatewayTimeout.toString().should.startWith( '504' ); httpVersionNotSupported.toString().should.startWith( '505' ); } ); } );
52.65
85
0.656537
55e790ccd88b60d557a124fa74b233bc69a151d1
2,643
js
JavaScript
src/app/components/activity-feed/activity-feed-cards/card/Card.js
cgsunkel/data-science-frontend
e5ca8c44bd77245435308f92c97717c63721290f
[ "MIT" ]
null
null
null
src/app/components/activity-feed/activity-feed-cards/card/Card.js
cgsunkel/data-science-frontend
e5ca8c44bd77245435308f92c97717c63721290f
[ "MIT" ]
17
2021-01-11T15:35:58.000Z
2021-05-14T16:39:32.000Z
src/app/components/activity-feed/activity-feed-cards/card/Card.js
cgsunkel/data-science-frontend
e5ca8c44bd77245435308f92c97717c63721290f
[ "MIT" ]
1
2020-12-24T12:12:11.000Z
2020-12-24T12:12:11.000Z
/* eslint-disable no-func-assign */ 'use strict' var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault') Object.defineProperty(exports, '__esModule', { value: true, }) exports.default = void 0 var _classCallCheck2 = _interopRequireDefault(require('@babel/runtime/helpers/classCallCheck')) var _createClass2 = _interopRequireDefault(require('@babel/runtime/helpers/createClass')) var _possibleConstructorReturn2 = _interopRequireDefault(require('@babel/runtime/helpers/possibleConstructorReturn')) var _getPrototypeOf2 = _interopRequireDefault(require('@babel/runtime/helpers/getPrototypeOf')) var _inherits2 = _interopRequireDefault(require('@babel/runtime/helpers/inherits')) var _defineProperty2 = _interopRequireDefault(require('@babel/runtime/helpers/defineProperty')) var _taggedTemplateLiteral2 = _interopRequireDefault(require('@babel/runtime/helpers/taggedTemplateLiteral')) var _react = _interopRequireDefault(require('react')) var _styledComponents = _interopRequireDefault(require('styled-components')) var _constants = require('@govuk-react/constants') var _propTypes = _interopRequireDefault(require('prop-types')) var _govukColours = require('govuk-colours') function _templateObject () { var data = (0, _taggedTemplateLiteral2.default)(['\n border: ', ';\n padding: ', ';\n']) _templateObject = function _templateObject () { return data } return data } var CardContainer = (0, _styledComponents.default)('div')(_templateObject(), function (_ref) { var isUpcoming = _ref.isUpcoming return isUpcoming ? '1px dashed '.concat(_govukColours.GREY_2) : '1px solid '.concat(_govukColours.GREY_2) }, _constants.SPACING.SCALE_3) var Card = /* #__PURE__ */ (function (_React$PureComponent) { (0, _inherits2.default)(Card, _React$PureComponent) function Card () { (0, _classCallCheck2.default)(this, Card) return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(Card).apply(this, arguments)) } (0, _createClass2.default)(Card, [{ key: 'render', value: function render () { var _this$props = this.props var isUpcoming = _this$props.isUpcoming var children = _this$props.children return _react.default.createElement(CardContainer, { isUpcoming: isUpcoming, }, children) }, }]) return Card }(_react.default.PureComponent)) exports.default = Card; (0, _defineProperty2.default)(Card, 'propTypes', { isUpcoming: _propTypes.default.bool, children: _propTypes.default.node, }); (0, _defineProperty2.default)(Card, 'defaultProps', { isUpcoming: false, children: null, })
31.843373
117
0.747257
55e810c9e8d3fd8b2b2431ace309e0f26355dc42
628
js
JavaScript
test/getUrlsFromQueryParam.js
iTonyYo/get-urls
bb30d6c045f823783f8b7c9e660e953423e051cb
[ "MIT" ]
2
2019-04-21T08:56:24.000Z
2021-05-09T01:49:57.000Z
test/getUrlsFromQueryParam.js
iTonyYo/get-urls
bb30d6c045f823783f8b7c9e660e953423e051cb
[ "MIT" ]
23
2019-05-07T11:51:53.000Z
2022-02-26T10:39:32.000Z
test/getUrlsFromQueryParam.js
iTonyYo/get-urls
bb30d6c045f823783f8b7c9e660e953423e051cb
[ "MIT" ]
null
null
null
import { assert } from 'chai'; import getUrlsFromQueryParam from '../src/getUrls/getUrlsFromQueryParam'; setTimeout(() => { describe('getUrlsFromQueryParam(url)', () => { it('获取查询参数里的链接', () => { const url = 'https://github.com/iTonyYo?tab=https://git.io/fh7df'; assert.deepEqual( getUrlsFromQueryParam(url), new Set(['https://git.io/fh7df']), ); }); it('`url` 参数不仅仅是链接,而且必须包含传输协议声明', () => { const url = '//github.com/iTonyYo?tab=https://git.io/fh7df'; assert.throws(() => { getUrlsFromQueryParam(url); }, '必须提供有效链接'); }); }); run(); }, 0);
25.12
73
0.570064
55e86d125c692fbad1074e7d879333e8709818c3
4,992
js
JavaScript
tests/init.test.js
brainomite/auto-config-eslint-for-prettier
ea46c126bd2bdd56a60d9bb9178c6abf53a3d8ff
[ "MIT" ]
2
2021-03-30T01:05:45.000Z
2021-03-31T02:15:34.000Z
tests/init.test.js
brainomite/auto-config-eslint-for-prettier
ea46c126bd2bdd56a60d9bb9178c6abf53a3d8ff
[ "MIT" ]
2
2021-02-11T15:39:13.000Z
2021-03-30T01:05:42.000Z
tests/init.test.js
brainomite/auto-config-eslint-for-prettier
ea46c126bd2bdd56a60d9bb9178c6abf53a3d8ff
[ "MIT" ]
null
null
null
/* eslint-disable no-undef */ const { expect } = require("chai"); const sinon = require("sinon"); const { init } = require("../src/init"); const initFns = require("../src/initFns"); const OOPS_MESSAGE = "Oops! Something went wrong! :("; describe("init", () => { let addPrettierToConfigStub = sinon.stub(); let getExtendsAdditionStrArrStub = sinon.stub(); let getStrArrayOfDependenciesStub = sinon.stub(); let getEslintrcPathStrStub = sinon.stub(); let getEslintObjStub = sinon.stub(); let writeEslintrcFileStub = sinon.stub(); let installPrettierExtensionsStub = sinon.stub(); let processExitStub = sinon.stub(); let addRulesToConfigStub = sinon.stub(); const oldProcessArgv = process.argv; beforeEach(() => { processExitStub = sinon.stub(process, "exit"); installPrettierExtensionsStub = sinon.stub( initFns, "installPrettierExtensions" ); addPrettierToConfigStub = sinon.stub(initFns, "addPrettierToConfig"); getExtendsAdditionStrArrStub = sinon.stub( initFns, "getExtendsAdditionStrArr" ); getStrArrayOfDependenciesStub = sinon.stub( initFns, "getStrArrayOfDependencies" ); getEslintrcPathStrStub = sinon.stub(initFns, "getEslintrcPathStr"); getEslintObjStub = sinon.stub(initFns, "getEslintObj"); writeEslintrcFileStub = sinon.stub(initFns, "writeEslintrcFile"); addRulesToConfigStub = sinon.stub(initFns, "addRulesToConfig"); }); afterEach(() => { addRulesToConfigStub.restore(); processExitStub.restore(); installPrettierExtensionsStub.restore(); addPrettierToConfigStub.restore(); getExtendsAdditionStrArrStub.restore(); getStrArrayOfDependenciesStub.restore(); getEslintrcPathStrStub.restore(); getEslintObjStub.restore(); writeEslintrcFileStub.restore(); }); it("Runs all the functions", async () => { const dependenciesArr = []; getStrArrayOfDependenciesStub.returns(dependenciesArr); const newEslintConfigFile = {}; addPrettierToConfigStub.returns(newEslintConfigFile); const extendsArr = []; getExtendsAdditionStrArrStub.returns(extendsArr); const returnedPath = "testing.test"; getEslintrcPathStrStub.returns(returnedPath); const eslintObj = {}; getEslintObjStub.returns(eslintObj); await init(); expect(getEslintObjStub.firstCall.firstArg).to.equal(returnedPath); expect(getExtendsAdditionStrArrStub.firstCall.firstArg).to.equal( dependenciesArr ); expect(addPrettierToConfigStub.firstCall.args[0]).to.equal(eslintObj); expect(addPrettierToConfigStub.firstCall.args[1]).to.equal(extendsArr); expect(writeEslintrcFileStub.firstCall.args[0]).to.equal(returnedPath); expect(writeEslintrcFileStub.firstCall.args[1]).to.equal( newEslintConfigFile ); expect(installPrettierExtensionsStub.firstCall.firstArg).to.equal( dependenciesArr ); }); it('invokes addRulesToConfig with argument "rules=thinkful"', async () => { process.argv = [...process.argv, "rules=thinkful"]; await init(); const expected = true; const actual = addRulesToConfigStub.called; expect(actual).to.equal(expected); }); describe("when an error is thrown", () => { let consoleErrorStub = sinon.stub(); beforeEach(() => { consoleErrorStub = sinon.stub(console, "error"); }); afterEach(() => { process.argv = oldProcessArgv; consoleErrorStub.restore(); }); it("exits gracefully with a message and no zero exit code if packages don't install right", async () => { installPrettierExtensionsStub.throws(new Error()); try { await init(); // eslint-disable-next-line id-length, no-empty } catch (e) {} let expected = OOPS_MESSAGE; let actual = consoleErrorStub.firstCall.firstArg; expect(actual).to.equal(expected); expected = 1; actual = processExitStub.firstCall.firstArg; expect(actual).to.equal(expected); }); it("suggest eslint --init to be run if missing files", async () => { getEslintrcPathStrStub.throws(new Error("No .eslintrc.* detected")); const eslintMsg = `No .eslintrc.* files located please run: npx eslint --init `; const expected = [eslintMsg, OOPS_MESSAGE]; await init(); const actual = consoleErrorStub.getCalls().map((call) => call.firstArg); expect(actual).to.eql(expected); expect(processExitStub.firstCall.firstArg).to.equal(1); }); it("exits gracefully if error downloading", async () => { process.argv = [...process.argv, "rules=thinkful"]; addRulesToConfigStub.throws(new Error()); const eslintMsg = `There was a problem downloading the rules!`; const expected = [eslintMsg, OOPS_MESSAGE]; await init(); const actual = consoleErrorStub.getCalls().map((call) => call.firstArg); expect(actual).to.eql(expected); expect(processExitStub.firstCall.firstArg).to.equal(1); }); }); });
35.404255
109
0.688101
55e9c63b0fa5d78ee9ae1ad79bf4a11fbb8feb78
598
js
JavaScript
node_modules/react-native-testing-library/build/flushMicroTasks.js
kavya-5/wordsreminder
4a3daf5fc3e22ecb047327171cbc953cdf03af13
[ "MIT" ]
null
null
null
node_modules/react-native-testing-library/build/flushMicroTasks.js
kavya-5/wordsreminder
4a3daf5fc3e22ecb047327171cbc953cdf03af13
[ "MIT" ]
null
null
null
node_modules/react-native-testing-library/build/flushMicroTasks.js
kavya-5/wordsreminder
4a3daf5fc3e22ecb047327171cbc953cdf03af13
[ "MIT" ]
null
null
null
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = flushMicrotasksQueue; exports.flushMicroTasks = flushMicroTasks; var _errors = require("./helpers/errors"); /** * Wait for microtasks queue to flush */ function flushMicrotasksQueue() { (0, _errors.printDeprecationWarning)('flushMicrotasksQueue'); return flushMicroTasks(); } function flushMicroTasks() { return { // using "thenable" instead of a Promise, because otherwise it breaks when // using "modern" fake timers then(resolve) { setImmediate(resolve); } }; }
21.357143
78
0.707358
55ea09fc96dbe7a04bdfac0a013f13fc71b96470
295
js
JavaScript
Server/routes/use-case.js
edilsonlonC/Project-Management-Sort
17b26697a76f5e53139e6c3fc4083616c922e684
[ "MIT" ]
null
null
null
Server/routes/use-case.js
edilsonlonC/Project-Management-Sort
17b26697a76f5e53139e6c3fc4083616c922e684
[ "MIT" ]
10
2020-09-07T09:23:21.000Z
2022-03-02T05:41:00.000Z
Server/routes/use-case.js
edilsonlonC/Project-Management-Sort
17b26697a76f5e53139e6c3fc4083616c922e684
[ "MIT" ]
null
null
null
const routerCases = require('express').Router() const useCaseController = require('../controllers/use-case') const { projectExist } = require('../middleware/queriesVerification') routerCases.post('/estimate/use/case', projectExist, useCaseController.useCase) module.exports= { routerCases }
36.875
79
0.766102
55ea4b4056948733d6a5e38e57d8eaa6eb71decb
149
js
JavaScript
javascript/src/helloWorld.js
kkrull/coderetreat-templates
3aac0a522c3d92462f4fe1f1d89d5d0216549511
[ "Unlicense" ]
null
null
null
javascript/src/helloWorld.js
kkrull/coderetreat-templates
3aac0a522c3d92462f4fe1f1d89d5d0216549511
[ "Unlicense" ]
null
null
null
javascript/src/helloWorld.js
kkrull/coderetreat-templates
3aac0a522c3d92462f4fe1f1d89d5d0216549511
[ "Unlicense" ]
null
null
null
module.exports = class HelloWorld { constructor(name = 'world') { this.name = name; } message() { return `Hello ${this.name}`; } };
14.9
35
0.577181
55eaa57e82ae4cddc1d706587707c5d556cf3c56
968
js
JavaScript
node-mongoose/server-1.js
nbkhope/server-side-with-node
c647d4a769797db0508063b99ba054d75a28b47f
[ "MIT" ]
null
null
null
node-mongoose/server-1.js
nbkhope/server-side-with-node
c647d4a769797db0508063b99ba054d75a28b47f
[ "MIT" ]
null
null
null
node-mongoose/server-1.js
nbkhope/server-side-with-node
c647d4a769797db0508063b99ba054d75a28b47f
[ "MIT" ]
null
null
null
// Require modules var mongoose = require('mongoose'), assert = require('assert'); // Require the dishes model var Dishes = require('./models/dishes-1'); // Connection URL var url = 'mongodb://localhost:27017/conFusion'; mongoose.connect(url); var db = mongoose.connection; db.on('error', console.error.bind(console, 'connection error:')); db.once('open', function() { console.log('Connected correctly to the server'); // Make a new dish var newDish = Dishes({ name: "Uthapizza", description: "Test", }); // Save the dish to the db newDish.save(function(err) { // Throw an error if any if (err) { throw err; } // Retrieve all the dishes Dishes.find({}, function(err, dishes) { if (err) { throw err; } console.log(dishes); // Drop all the records and close the connection to the db db.collection('dishes').drop(function() { db.close(); }); }); }); });
21.043478
65
0.606405
55eab383f6b283beaf7f101da43fd8dda212f058
204
js
JavaScript
src/theme/index.js
nikolal/FlowrSpot
96aae5c8630937155e26dc442b1c57675a5ad112
[ "MIT" ]
2
2019-09-17T14:11:39.000Z
2020-05-16T14:10:55.000Z
src/theme/index.js
nikolal/FlowrSpot
96aae5c8630937155e26dc442b1c57675a5ad112
[ "MIT" ]
4
2018-04-26T15:43:12.000Z
2021-10-06T00:20:00.000Z
src/theme/index.js
nikolal/FlowrSpot
96aae5c8630937155e26dc442b1c57675a5ad112
[ "MIT" ]
null
null
null
import colors from './colors'; import metrics from './metrics'; import fonts from './fonts'; import images from './images'; import icons from './icons'; export { colors, metrics, fonts, images, icons };
25.5
49
0.70098
55eadea350479b25b43db30055fc3abc583da315
695
js
JavaScript
seeders/20190926174557-initials-moves.js
johnny4young/games-of-drones-api
6f9dfc5ab36d505dfd31218629ab4fa7bb47ee29
[ "MIT" ]
null
null
null
seeders/20190926174557-initials-moves.js
johnny4young/games-of-drones-api
6f9dfc5ab36d505dfd31218629ab4fa7bb47ee29
[ "MIT" ]
1
2021-03-09T19:46:53.000Z
2021-03-09T19:46:53.000Z
seeders/20190926174557-initials-moves.js
johnny4young/games-of-drones-api
6f9dfc5ab36d505dfd31218629ab4fa7bb47ee29
[ "MIT" ]
null
null
null
'use strict' module.exports = { up : async (queryInterface, Sequelize) => { /* Add altering commands here. Return a promise to correctly handle asynchronicity. Example: */ await queryInterface.bulkDelete('Moves') return queryInterface.bulkInsert( 'Moves', [ { name : 'Rock', size : 1 }, { name : 'Scissors', size : 2 }, { name : 'Paper', size : 3 } ], {} ) }, down : (queryInterface, Sequelize) => { /* Add reverting commands here. Return a promise to correctly handle asynchronicity. Example: return queryInterface.bulkDelete('People', null, {}); */ } }
16.547619
59
0.551079
55eafb1b858e25134f8be3e298da806089e37d72
999
js
JavaScript
example/cp/Modfile.js
looknd/mod
e1215bd34e5f8d610e8ae17542c8e1cbd3c0a75f
[ "MIT" ]
155
2015-01-07T06:29:54.000Z
2021-11-08T09:12:05.000Z
example/cp/Modfile.js
looknd/mod
e1215bd34e5f8d610e8ae17542c8e1cbd3c0a75f
[ "MIT" ]
2
2015-03-23T08:56:56.000Z
2016-04-07T13:58:07.000Z
example/cp/Modfile.js
modjs/mod
e1215bd34e5f8d610e8ae17542c8e1cbd3c0a75f
[ "MIT" ]
35
2015-02-02T06:01:37.000Z
2018-09-17T11:43:39.000Z
module.exports = { tasks: { cp: { file: { src: ["../catjs/*.js", "../catcss/*.css"], dest: "./dist/a", filter: /foobar/ }, dir: { src: ["./dist/a/"], dest: "./dist/b" }, subdir: { src: ["../catjs/foo.js"], dest: "./dist/b/bb", backup: false }, fileAndDir: { src: ["./dist/b"], dest: "./dist/c" }, fileAndDirFlatten: { src: ["./dist/b"], flatten: true, dest: "./dist/d" }, flattenSrc: { src: ["./dist/b/**/*.js"], dest: "./dist/e" }, fileCopyRoot: { src: "./dist", dest: "./dist/f" } } }, targets: { default: "cp" } };
23.785714
58
0.27027
55eb0b7bd557e27fcf49e23582707a2fa5123d59
1,099
js
JavaScript
src/api/infoMng/basics/land.js
Yuners/zsl-jxy-admin
5e862ac03ada39bca62ae7881fa45ec54a47c7eb
[ "MIT" ]
null
null
null
src/api/infoMng/basics/land.js
Yuners/zsl-jxy-admin
5e862ac03ada39bca62ae7881fa45ec54a47c7eb
[ "MIT" ]
null
null
null
src/api/infoMng/basics/land.js
Yuners/zsl-jxy-admin
5e862ac03ada39bca62ae7881fa45ec54a47c7eb
[ "MIT" ]
null
null
null
import request from "@/utils/request"; // let index = 'http://192.168.31.28:10209' let index = '/jxy' /** * 新增土地信息 * @param params * @returns {AxiosPromise<any>} */ export function addLand( params ) { return request.post(index+'/land/addLand', params) } /** * 删除土地信息 * @param params * @returns {AxiosPromise<any>} */ export function delLand( params ) { return request.post(index+'/land/delLand', params) } /** * 根据id查询土地信息 * @param params * @returns {AxiosPromise<any>} */ export function getLandById( params ) { return request.post(index+'/land/getLandById', params) } /** * 获取土地信息分页数据 * @param params * @returns {AxiosPromise<any>} */ export function getLandPage( params ) { return request.get(index+'/land/getLandPage', { params }) } /** * 修改土地信息 * @param params * @returns {AxiosPromise<any>} */ export function updateLand( params ) { return request.post(index+'/land/updateLand', params) } /** * 是否存在该村当年信息 * @param params * @returns {AxiosPromise<any>} */ export function getLandFlag( params ) { return request.post(index+'/land/getLandFlag', params) }
19.625
59
0.67152
55eb925dddb1be4e82bead50acd7da6581ebb1de
3,918
js
JavaScript
src/components/Pages/HomePage.js
apetkau/covidcg
155c839ff9aa4c820ee5072ef568611b8f53393a
[ "MIT" ]
null
null
null
src/components/Pages/HomePage.js
apetkau/covidcg
155c839ff9aa4c820ee5072ef568611b8f53393a
[ "MIT" ]
null
null
null
src/components/Pages/HomePage.js
apetkau/covidcg
155c839ff9aa4c820ee5072ef568611b8f53393a
[ "MIT" ]
null
null
null
import React from 'react'; import { observer } from 'mobx-react'; import styled from 'styled-components'; import { connect } from '../../stores/connect'; import useDimensions from 'react-use-dimensions'; import { onMobileDevice } from '../../utils/device'; import TabBar from '../TabBar'; import FilterSidebar from '../Sidebar/FilterSidebar'; import DefaultSidebar from '../Sidebar/DefaultSidebar'; import CGLogo from '../../assets/images/cg_logo_v13.png'; import ExampleTab from './ExampleTab'; import GroupTab from './GroupTab'; import LocationTab from './LocationTab'; import AboutTab from './AboutTab'; import MethodologyTab from './MethodologyTab'; import RelatedProjectsTab from './RelatedProjectsTab'; import SequencingEffortsTab from './SequencingEffortsTab'; import Footer from '../Footer'; import KeyListener from '../KeyListener'; import { TABS } from '../../constants/UI'; const HomePageDiv = styled.div` display: grid; grid-template-columns: [col1] 300px [col2] calc(100vw - 300px) [col3]; grid-template-rows: [row1] auto [row2]; width: 100vw; position: relative; overflow-y: hidden; `; const PlotContainer = styled.div` grid-column: col2 / col3; grid-row: row1 / row2; display: flex; flex-direction: column; width: 100%; min-height: 100vh; box-sizing: border-box; position: relative; overflow-y: scroll; `; const HomePage = observer(({ UIStore }) => { const [ref, { width }] = useDimensions(); const onTabChange = (tab) => { UIStore.setActiveTab(tab); }; const renderTab = () => { if (UIStore.activeTab === TABS.TAB_GROUP) { return <GroupTab width={width} />; } else if (UIStore.activeTab === TABS.TAB_LOCATION) { return <LocationTab width={width} />; } else if (UIStore.activeTab === TABS.TAB_EXAMPLE) { return <ExampleTab width={width} />; } else if (UIStore.activeTab === TABS.TAB_ABOUT) { return <AboutTab />; } else if (UIStore.activeTab === TABS.TAB_METHODOLOGY) { return <MethodologyTab />; } else if (UIStore.activeTab === TABS.TAB_RELATED) { return <RelatedProjectsTab />; } else if (UIStore.activeTab === TABS.TAB_GLOBAL_SEQUENCES) { return <SequencingEffortsTab width={width} />; } }; if (onMobileDevice()) { return ( <div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', marginTop: 10, }} > <img src={CGLogo}></img> <p style={{ margin: '20px' }}> COVID-19 CG is designed for large screen devices due to the highly detailed analyses presented on the browser. Please view this site on a laptop or computer for the best user experience. </p> <p style={{ margin: '20px', marginTop: '10px', fontWeight: 'normal', fontSize: '0.9em', lineHeight: 'normal', }} > COVID-19 CG can also be explored on iPad and larger tablets if browser settings are switched to &quot;Request Desktop Version&quot; and the device is in landscape mode. Exploring COVID-19 CG on handheld mobile devices will result in excessively limited browser functionality. </p> </div> ); } return ( <> <KeyListener /> <HomePageDiv> {(UIStore.activeTab === TABS.TAB_GROUP || UIStore.activeTab === TABS.TAB_LOCATION) && <FilterSidebar />} {UIStore.activeTab !== TABS.TAB_GROUP && UIStore.activeTab !== TABS.TAB_LOCATION && <DefaultSidebar />} <PlotContainer ref={ref}> <TabBar activeTab={UIStore.activeTab} onTabChange={onTabChange} /> {renderTab()} <Footer /> </PlotContainer> </HomePageDiv> </> ); }); // eslint-disable-next-line react/display-name export default connect(HomePage);
30.609375
80
0.626085
55ebe9ee33102a758126ad497b833839d5032f87
405
js
JavaScript
web/src/item/misc-selection.js
chrisprice/honesty-store-1
7064d0c6322b0e0db490a21a50323d81c407f8e3
[ "MIT" ]
null
null
null
web/src/item/misc-selection.js
chrisprice/honesty-store-1
7064d0c6322b0e0db490a21a50323d81c407f8e3
[ "MIT" ]
12
2020-09-05T03:10:01.000Z
2022-03-03T22:23:23.000Z
web/src/item/misc-selection.js
chrisprice/honesty-store-1
7064d0c6322b0e0db490a21a50323d81c407f8e3
[ "MIT" ]
7
2018-05-18T09:59:38.000Z
2019-10-21T14:58:30.000Z
import React from 'react'; import MiscCrisps from './misc-crisps'; import './misc-selection.css'; export default ({ className = '', style = {} }) => ( <div className={`item-misc-selection ${className}`} style={style}> <MiscCrisps className="item-misc-selection-left" /> <MiscCrisps className="item-misc-selection-right" /> <MiscCrisps className="item-misc-selection-center" /> </div> );
31.153846
68
0.674074
55eca4db81cf595491856c2c7e1742b74c7ec99d
4,683
js
JavaScript
web/components/pages/__MarkupPage__.js
brightinteractive/bullet-train-frontend
fc23d963a157a0e182c901e7c25a3688544987f1
[ "BSD-3-Clause" ]
null
null
null
web/components/pages/__MarkupPage__.js
brightinteractive/bullet-train-frontend
fc23d963a157a0e182c901e7c25a3688544987f1
[ "BSD-3-Clause" ]
null
null
null
web/components/pages/__MarkupPage__.js
brightinteractive/bullet-train-frontend
fc23d963a157a0e182c901e7c25a3688544987f1
[ "BSD-3-Clause" ]
1
2020-07-31T15:01:56.000Z
2020-07-31T15:01:56.000Z
import React, { Component } from 'react'; import { Link } from 'react-router'; import { ButtonSecondary, ButtonWhite } from '../base/forms/Button'; import PricingPanel from '../PricingPanel'; export default class ExampleOne extends Component { static displayName = 'CreateOrganisastionPage' constructor(props, context) { super(props, context); this.state = { name: '' }; } render() { return ( <div className="mt-5"> <div className="container"> <section className="pt-5 pb-3"> <h2>Typeography</h2> <h1>Heading H1</h1> <h2>Heading H2</h2> <h3>Heading H3</h3> <h4>Heading H4</h4> <h5>Heading H5</h5> <h6>Heading H6</h6> <p className="no-mb">This is a paragraph.</p> <p className="text-small no-mb">This is some small paragraph text.</p> <p> View and manage {' '} <Tooltip title={<a className="dark" href="#">feature flags</a>} place="right" > {Constants.strings.FEATURE_FLAG_DESCRIPTION} </Tooltip> {' '} and {' '} {' '} <Tooltip title={<a className="dark" href="#">remote config</a>} place="right" > {Constants.strings.REMOTE_CONFIG_DESCRIPTION} </Tooltip> {' '} for your selected environment. </p> </section> <section className="pt-5 pb-3"> <h2 className="mb-3">Colour</h2> <h4>Brand</h4> <div className="colour-block colour-block--brand-primary"/> <div className="colour-block colour-block--brand-dark-green"/> <div className="colour-block colour-block--brand-secondary"/> <h4>Gradients</h4> <div className="colour-block colour-block--brand-primary-gradient"/> <h4>Utility</h4> <div className="colour-block colour-block--brand-orange"/> <div className="colour-block colour-block--brand-purple"/> <div className="colour-block colour-block--brand-red"/> </section> <section className="pt-5 pb-3"> <h2>Buttons</h2> <FormGroup> <Button className="mr-3">Primary</Button> <ButtonSecondary className="mr-3">Secondary</ButtonSecondary> <ButtonWhite>White</ButtonWhite> </FormGroup> </section> <section className="pt-5 pb-3"> <h2>Forms</h2> <Input inputProps={{ name: 'firstName', className: 'full-width', }} className="input-default full-width" placeholder="First name" type="text" name="firstName" id="firstName" /> <FormGroup className="mt-3"> <InputGroup inputProps={{ className: 'full-width', name: 'featureID', }} value={null} type="text" title="ID" placeholder="E.g. header_size" /> </FormGroup> </section> <section className="pt-5 pb-3"> <h2>Components</h2> <PricingPanel/> </section> </div> </div> ); } }
36.874016
94
0.364937
55ed5d38bf098fc3bb38bf8d8b59713d03534bbe
702
js
JavaScript
app/routes/ownerId-api-routes.js
cbeez07/traveling-food
610c716076bdd04e109acf3f7643e497dec5c72a
[ "MIT" ]
null
null
null
app/routes/ownerId-api-routes.js
cbeez07/traveling-food
610c716076bdd04e109acf3f7643e497dec5c72a
[ "MIT" ]
null
null
null
app/routes/ownerId-api-routes.js
cbeez07/traveling-food
610c716076bdd04e109acf3f7643e497dec5c72a
[ "MIT" ]
null
null
null
var db = require("../models"); module.exports = function(app) { // initial read of owner table/user check app.get("/api/OwnerIds", function(req, res) { db.LocationId.findAll({ include: [db.OwnerId] }).then(function(LocationId) { res.json(LocationId); }); }); // add new owner/user app.post("/api/OwnerIds", function(req, res) { db.OwnerId.create(req.body).then(function(dbOwnerId) { res.json(dbOwnerId); }); }); // delete owner/user app.delete("/api/OwnerIds/:userid", function(req, res) { db.OwnerId.destroy({ where: { id: req.params.userid } }).then(function(dbOwnerId) { res.json(dbOwnerId); }); }); };
19.5
58
0.591168
55ee403d96c8cc467064bdf58296e059ae0a8610
1,322
js
JavaScript
test/helpers/sir-mock-socket.js
octoblu/genisys-websocket-rotator
d4aae444515c8f398c2207eedf4ccfaeb1467a5f
[ "MIT" ]
null
null
null
test/helpers/sir-mock-socket.js
octoblu/genisys-websocket-rotator
d4aae444515c8f398c2207eedf4ccfaeb1467a5f
[ "MIT" ]
null
null
null
test/helpers/sir-mock-socket.js
octoblu/genisys-websocket-rotator
d4aae444515c8f398c2207eedf4ccfaeb1467a5f
[ "MIT" ]
1
2021-12-19T00:44:20.000Z
2021-12-19T00:44:20.000Z
// const bodyParser = require('body-parser') // const express = require('express') const http = require('http') const bindAll = require('lodash/fp/bindAll') const enableDestroy = require('server-destroy') const url = require('url') const WebSocket = require('ws') // const sinon = require('sinon') // class SirMockSocket { constructor({ port } = {}) { bindAll(Object.getOwnPropertyNames(SirMockSocket.prototype), this) this._port = port || 0 this.server = http.createServer() enableDestroy(this.server) this.wss = new WebSocket.Server({ server: this.server }) } broadcast(message) { this.broadcastRaw(JSON.stringify(message)) } broadcastRaw(message) { this.wss.clients.forEach((client) => { if (client.readyState !== WebSocket.OPEN) return client.send(message) }) } port() { return this.server.address().port } restart(callback) { const port = this.port() this.server.destroy((error) => { if (error) return callback(error) this.server.listen(port, callback) }) } start(callback) { this.server.listen(this._port, callback) } stop(callback) { this.server.destroy(callback) } url() { return url.format({ protocol: 'ws', hostname: 'localhost', port: this.port() }) } } module.exports = SirMockSocket
22.793103
83
0.654312
55ee8cc1e8f6ae9aad78360b1da0327a7d26b623
2,245
js
JavaScript
packages/terra-open-source-scripts/src/terra-cli/express-server/ExpressServer.js
SaurabhKhare86/terra-toolkit
837e36ef2781d198f992d562925abacc76dcddc6
[ "Apache-2.0" ]
null
null
null
packages/terra-open-source-scripts/src/terra-cli/express-server/ExpressServer.js
SaurabhKhare86/terra-toolkit
837e36ef2781d198f992d562925abacc76dcddc6
[ "Apache-2.0" ]
null
null
null
packages/terra-open-source-scripts/src/terra-cli/express-server/ExpressServer.js
SaurabhKhare86/terra-toolkit
837e36ef2781d198f992d562925abacc76dcddc6
[ "Apache-2.0" ]
null
null
null
const fs = require('fs-extra'); const express = require('express'); const Logger = require('@cerner/terra-cli/lib/utils/Logger'); const logger = new Logger({ prefix: '[terra-open-source-scripts:express-server]' }); class ExpressServer { constructor(options = {}) { const { host, port, site } = options; this.host = host; this.port = port; this.site = site; } /** * Creates an express app. * @returns {Object} - An instance of an express app. */ createApp() { const app = express(); app.use(express.static(this.site, { extensions: ['html', 'htm'] })); app.use([/\/[^.]*$/, '/*.html?'], (_req, res, next) => { // Return 404.html if provided. res.status(404).sendFile('/404.html', { root: this.site }, () => { // If there is an error, bail. next(); }); }); return app; } /** * Starts the webpack dev server. * @returns {Promise} - A promise that resolves when the server has started. */ async start() { // Check if the site exists prior to starting the express server. if (!await fs.pathExists(this.site) || ((await fs.lstat(this.site)).isDirectory() && (await fs.readdir(this.site)).length === 0)) { logger.error(`Cannot serve content from ${this.site} because it does not exist or it is empty.`); throw new Error(); } await new Promise((resolve, reject) => { const app = this.createApp(); logger.info('Starting the express server.'); this.server = app.listen(this.port, this.host, (error) => { if (error) { reject(error); } else { logger.info(`Express server has started listening at ${`http://${this.host}:${this.port}/`}.`); resolve(); } }); }); } /** * Stops the express server. * @returns {Promise} - A promise that resolves when the server has been stopped. */ async stop() { logger.info('Closing the express server.'); // Resolve immediately if the server is not available. if (!this.server) { return; } await new Promise((resolve) => { this.server.close(() => { this.server = null; resolve(); }); }); } } module.exports = ExpressServer;
26.411765
135
0.575056
55ef5799270946385d88855a07f657bbc8e2838b
1,365
js
JavaScript
utils/email.js
ramankarki/chat-app-api
a8f36c106f24fcf362ceb4b665303a5a2080ecbd
[ "MIT" ]
null
null
null
utils/email.js
ramankarki/chat-app-api
a8f36c106f24fcf362ceb4b665303a5a2080ecbd
[ "MIT" ]
null
null
null
utils/email.js
ramankarki/chat-app-api
a8f36c106f24fcf362ceb4b665303a5a2080ecbd
[ "MIT" ]
null
null
null
const nodemailer = require("nodemailer"); const pug = require("pug"); const htmlToText = require("html-to-text"); module.exports = class Email { constructor(user, url) { this.to = user.email; this.from = `Raman Karki <${process.env.EMAIL_FROM}>`; this.username = user.username; this.url = url; } newTransport() { // sendgrid return nodemailer.createTransport({ service: "SendGrid", auth: { user: process.env.SENDGRID_USERNAME, pass: process.env.SENDGRID_PW, }, }); } async send(template, subject) { // render html based on pug const html = pug.renderFile( `${__dirname}/../views/emails/${template}.pug`, { username: this.username, url: this.url, subject, } ); // define email options const mailOptions = { from: this.from, to: this.to, subject, html, text: htmlToText.fromString(html), }; // create a transport and send email await this.newTransport().sendMail(mailOptions); } async sendActivateAccount() { await this.send( "activateAccount", "Activate your chat app account, only valid for 1h" ); } async sendResetPassword() { await this.send( "passwordReset", "Reset your chat app account password, only valid for 10 min" ); } };
22.016129
67
0.6
55ef92c6e285ebb33ba4470753211b3cd69f32a1
1,432
js
JavaScript
src/server/game/socket.js
Chaucharian/mmog-web
1dba393871c755d14acb2b62cf32099c5187108e
[ "MIT" ]
null
null
null
src/server/game/socket.js
Chaucharian/mmog-web
1dba393871c755d14acb2b62cf32099c5187108e
[ "MIT" ]
null
null
null
src/server/game/socket.js
Chaucharian/mmog-web
1dba393871c755d14acb2b62cf32099c5187108e
[ "MIT" ]
null
null
null
const jsonEncode = require('circular-json'); class Socket { constructor(io, game) { this.game = game; this.io = io; this.playerId = -1; this.init(); } init() { //init the game and pass socket to comunicate this.game.init(this); //handle socket connections this.io.on('connection', socket => { this.playerId += 1; console.log('new user ',this.playerId); this.game.addPlayer(this.playerId); this.io.emit('getPlayer', jsonEncode.stringify( this.game.getLastPlayer() ) ); socket.on('player-jump', playerId => { this.game.playerJump(playerId); }); socket.on('player-moveLeft', playerId => { this.game.playerMoveLeft(playerId); }); socket.on('player-moveRight', playerId => { this.game.playerMoveRight(playerId); }); socket.on('disconnect', (e) => { console.log('user disconnected ',e); }); }); } //Emit events to the server emit(event, object) { switch (event) { case 'updateBodies': this.io.emit('updateBodies', jsonEncode.stringify(object) ); break; case 'player-moveLeft': this.socket.emit('player-moveLeft', jsonEncode.stringify(player) ); break; case 'player-moveRight': this.socket.emit('player-moveRight', jsonEncode.stringify(player) ); break; default: } } } module.exports = Socket;
23.47541
84
0.594274
55f04cf3bd3e9038b4e73fdeefc799556651f207
2,130
js
JavaScript
target/1.0.0/resources/js/tree.js
Qlone/bisheService
2b67d8eb4e49f29f801faa9ef05b9fa07fe90a2a
[ "Apache-2.0" ]
null
null
null
target/1.0.0/resources/js/tree.js
Qlone/bisheService
2b67d8eb4e49f29f801faa9ef05b9fa07fe90a2a
[ "Apache-2.0" ]
null
null
null
target/1.0.0/resources/js/tree.js
Qlone/bisheService
2b67d8eb4e49f29f801faa9ef05b9fa07fe90a2a
[ "Apache-2.0" ]
null
null
null
// JavaScript Document function showTree(){ var myTreeData = new Array(); myTreeData = [[0,0,"Root"],[1,0,"Tree0"],[2,0,"Tree1"],[3,1,"Tree2"],[4,1,"Tree3"],[5,1,"Tree4"],[6,3,"Tree5"],[7,2,"Tree6"]]; for(i=0;i<myTreeData.length;i++){ var elem = document.createElement('div'); elem.id="tree_"+myTreeData[i][0]; elem.innerHTML= '<a href="javascript:;" onclick="javascript:itemClick(\''+myTreeData[i][0] +'\')"><img src="../graphics/down.gif" id="img_'+ myTreeData[i][0] +'"/ border="0"><img src="../graphics/down.gif" border="0" id="folder_'+ myTreeData[i][0] +'" />' + myTreeData[i][2]+ '</a>'; var elem2 = document.getElementById("tree_"+myTreeData[i][1]); if(elem2!=null){ var imgElem2 = document.getElementById("img_"+myTreeData[i][1]); var imgElem = document.getElementById("img_"+ myTreeData[i][0]); var folderElem = document.getElementById("folder_"+ myTreeData[i][1]); elem2.appendChild(elem); elem2.appendChild(elem); imgElem2.src="../graphics/down.gif"; folderElem.src= "../graphics/down.gif"; elem.className="child"; elem.style.display="none"; }else{ document.body.appendChild(elem); elem.className="child"; var imgElem = document.getElementById("img_"+ myTreeData[i][0]); var folderElem = document.getElementById("folder_"+ myTreeData[i][0]); elem.style.display="block"; imgElem.src="../graphics/down.gif"; folderElem.src = "../graphics/down.gif"; } } } function itemClick(id){ var elem= document.getElementById("tree_"+id); var imgElem= document.getElementById("img_"+id); var folderElem = document.getElementById("folder_"+ id); if (elem.childNodes.length>1){ //alert(elem.childNodes.length); if (elem.childNodes[1].style.display=="none"){ for(i=1;i<elem.childNodes.length;i++){ elem.childNodes[i].style.display="block"; } imgElem.src="../graphics/minus1.jpg"; folderElem.src = "../graphics/down.gif"; }else{ for(i=1;i<elem.childNodes.length;i++) elem.childNodes[i].style.display="none"; imgElem.src="../graphics/minus1.jpg"; folderElem.src = "../graphics/down.gif"; } } }
41.764706
287
0.650704
55f05724359310f898f4687483ae140d034d3597
3,985
js
JavaScript
packages/package-json-lint/tests/jest/rules/require-no-hard-coded-dependency-versions.test.js
cerner/terra-toolk
d325a7a65b9ee064d7a056019308e1901b268dd8
[ "Apache-2.0" ]
31
2017-07-28T22:11:18.000Z
2022-01-28T17:38:27.000Z
packages/package-json-lint/tests/jest/rules/require-no-hard-coded-dependency-versions.test.js
cerner/terra-toolk
d325a7a65b9ee064d7a056019308e1901b268dd8
[ "Apache-2.0" ]
423
2017-01-30T18:16:15.000Z
2022-03-21T15:17:00.000Z
packages/package-json-lint/tests/jest/rules/require-no-hard-coded-dependency-versions.test.js
cerner/terra-toolk
d325a7a65b9ee064d7a056019308e1901b268dd8
[ "Apache-2.0" ]
45
2017-11-02T13:04:02.000Z
2021-12-16T09:50:15.000Z
const requireNoHardCodedDependencyVersions = require('../../../src/rules/require-no-hard-coded-dependency-versions'); describe('require-no-hard-coded-dependency-versions', () => { describe('when projectType is application', () => { it('succeeds when there are hardcoded dependencies', () => { let results; requireNoHardCodedDependencyVersions.create({ ruleConfig: { severity: { severityType: 'error', }, }, projectType: 'application', report: (issues) => { results = issues; }, }).dependencies({ a: '1.0.0', }); expect(results).toMatchSnapshot(); }); it('succeeds when there are no hardcoded dependencies', () => { let results; requireNoHardCodedDependencyVersions.create({ ruleConfig: { severity: { severityType: 'error', }, }, projectType: 'application', report: (issues) => { results = issues; }, }).dependencies({ a: '^1.0.0', }); expect(results).toMatchSnapshot(); }); }); describe('when projectType is module', () => { it('fails when there are hardcoded dependencies', () => { let results; requireNoHardCodedDependencyVersions.create({ ruleConfig: { severity: { severityType: 'error', }, }, projectType: 'module', report: (issues) => { results = issues; }, }).dependencies({ a: '1.0.0', }); expect(results).toMatchSnapshot(); }); it('succeeds when there are no hardcoded dependencies', () => { let results; requireNoHardCodedDependencyVersions.create({ ruleConfig: { severity: { severityType: 'error', }, }, projectType: 'module', report: (issues) => { results = issues; }, }).dependencies({ a: '^1.0.0', b: '1.0.0 - 2.9999.9999', c: '>=1.0.2 <2.1.2', d: '>1.0.2 <=2.3.4', e: '<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0', f: '~1.2', g: 'latest', h: '~1.2.3', i: '2.x', j: '3.3.x', }); expect(results).toMatchSnapshot(); }); }); describe('when projectType is devModule', () => { it('fails when there are hardcoded dependencies', () => { let results; requireNoHardCodedDependencyVersions.create({ ruleConfig: { severity: { severityType: 'error', }, }, projectType: 'devModule', report: (issues) => { results = issues; }, }).dependencies({ a: '1.0.0', }); expect(results).toMatchSnapshot(); }); it('succeeds when there are no hardcoded dependencies', () => { let results; requireNoHardCodedDependencyVersions.create({ ruleConfig: { severity: { severityType: 'error', }, }, projectType: 'devModule', report: (issues) => { results = issues; }, }).dependencies({ a: '^1.0.0', b: '1.0.0 - 2.9999.9999', c: '>=1.0.2 <2.1.2', d: '>1.0.2 <=2.3.4', e: '<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0', f: '~1.2', g: 'latest', h: '~1.2.3', i: '2.x', j: '3.3.x', }); expect(results).toMatchSnapshot(); }); }); it('succeeds when hardcoded dependency is passed in the allowList', () => { let results; requireNoHardCodedDependencyVersions.create({ ruleConfig: { severity: { severityType: 'error', allowList: ['a'], }, }, projectType: 'devModule', report: (issues) => { results = issues; }, }).dependencies({ a: '1.0.0', }); expect(results).toMatchSnapshot(); }); });
26.217105
117
0.481305
55f107413d2bf2ef3845d03115b306a5b0f2f0f3
2,226
js
JavaScript
LocalAuthorities/resources/cases.js
odileeds/covid-19
749282d5eb4d719df87a281aaee2cd87f48b7064
[ "MIT" ]
9
2020-04-16T14:38:08.000Z
2021-04-30T17:06:12.000Z
LocalAuthorities/resources/cases.js
odileeds/covid-19
749282d5eb4d719df87a281aaee2cd87f48b7064
[ "MIT" ]
6
2020-04-03T11:55:16.000Z
2021-09-02T01:19:26.000Z
LocalAuthorities/resources/cases.js
odileeds/covid-19
749282d5eb4d719df87a281aaee2cd87f48b7064
[ "MIT" ]
1
2020-05-15T19:17:49.000Z
2020-05-15T19:17:49.000Z
(function(root){ var ODI = root.ODI || {}; if(!ODI.ready){ ODI.ready = function(fn){ // Version 1.1 if(document.readyState != 'loading') fn(); else document.addEventListener('DOMContentLoaded', fn); }; } var loaded = 0; var toload = 0; // For local versions function getResource(res){ var src = res.getAttribute('data'); fetch(src).then(response => response.text()).then((data) => { // Remove the comments data = data.replace(/<\!--\?[^>]*\?-->/g,""); if(src.indexOf('html') >= 0){ res.innerHTML = data; }else{ // Parse the document let parser = new DOMParser(); doc = parser.parseFromString(data,"application/xml"); // Get the document var dom = doc.activeElement; // Add the XML res.insertAdjacentElement('beforebegin', dom); // Remove original image res.parentNode.removeChild(res); } loaded++; if(loaded==toload) ready(); }) return; } var g; ODI.ready(function(){ // Parse Jekyll bits if on local filesystem var blocks = document.getElementsByClassName('jekyll-parse'); for(var i = 0; i < blocks.length; i++){ html = blocks[i].innerHTML; html = html.replace(/\{\% include_relative (.*\.[a-zA-Z]*) \%\}/g,function(m,p1){ return "<div class=\"jekyll-resource\" data=\""+p1+"\"></div>"; }); blocks[i].innerHTML = html; } var rs = document.getElementsByClassName('jekyll-remove'); for(var i = 0; i < rs.length; i++) rs[i].parentNode.removeChild(rs[i]); var res = document.getElementsByClassName('jekyll-resource'); toload = res.length; if(toload == loaded) ready(); else{ for(var i = 0; i < toload; i++) getResource(res[i]); } }); function highlightLines(v){ for(i = 0; i < g.length; i++) g[i].classList.remove('on'); if(v.length > 2){ for(i = 0; i < g.length; i++){ txt = g[i].querySelector('text').textContent.toLowerCase(); if(txt.indexOf(v.toLowerCase())>=0) g[i].classList.add('on'); } } } function ready(){ g = document.querySelectorAll('svg g'); search = document.getElementById('search'); search.addEventListener('keyup',function(e){ highlightLines(e.target.value); }); highlightLines(search.value); }; root.ODI = ODI; })(window || this);
25.586207
152
0.619048
55f136a5a3cab9051c5dbe5e20da61b910f2d760
1,380
js
JavaScript
config/webpack/production.js
njhoffman/better-musician
2a86f4c0751070b5890678efb428443f9af20831
[ "MIT" ]
null
null
null
config/webpack/production.js
njhoffman/better-musician
2a86f4c0751070b5890678efb428443f9af20831
[ "MIT" ]
null
null
null
config/webpack/production.js
njhoffman/better-musician
2a86f4c0751070b5890678efb428443f9af20831
[ "MIT" ]
null
null
null
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = (config) => ({ optimization: { minimizer: [ new UglifyJsPlugin({ sourceMap: true, uglifyOptions: { mangle: true, warnings: false, // Suppress uglification warnings pure_getters: true, unsafe: true, unsafe_comps: true, screw_ie8: true, conditionals: true, unused: true, comparisons: true, sequences: true, dead_code: true, evaluate: true, if_return: true, join_vars: true, output: { comments: false, } }, exclude: [/\.min\.js$/gi] // skip pre-minified libs }) ], runtimeChunk: false, splitChunks: { cacheGroups: { default: false, commons: { test: /[\\/]node_modules[\\/]/, name: 'vendor_app', chunks: 'all', minChunks: 2 } } } }, plugins: [ new HtmlWebpackPlugin({ template : config.paths.client('index.html'), favicon : config.paths.public('favicon.ico'), filename : 'index.html', hash : false, inject : true, minify : { collapseWhitespace : true } }) ] });
24.210526
60
0.51087
55f2bd96279fadf881132d44b966552fbc2b1eb1
4,753
js
JavaScript
client/app/reducers/ManageAvailabilityReducer.js
vivek2007/sharetribe
97f43f61854ab94490edc5e380f76057a51a8e0f
[ "PostgreSQL", "Ruby", "ImageMagick" ]
2,242
2015-01-02T22:18:15.000Z
2022-03-23T06:12:58.000Z
client/app/reducers/ManageAvailabilityReducer.js
vivek2007/sharetribe
97f43f61854ab94490edc5e380f76057a51a8e0f
[ "PostgreSQL", "Ruby", "ImageMagick" ]
1,139
2015-01-02T05:03:43.000Z
2021-12-23T10:37:23.000Z
client/app/reducers/ManageAvailabilityReducer.js
vivek2007/sharetribe
97f43f61854ab94490edc5e380f76057a51a8e0f
[ "PostgreSQL", "Ruby", "ImageMagick" ]
1,576
2015-01-02T09:56:01.000Z
2022-03-29T16:35:30.000Z
import Immutable from 'immutable'; import moment from 'moment'; import { isSameDay } from 'react-dates'; import * as actionTypes from '../constants/ManageAvailabilityConstants'; const initialState = Immutable.Map({ isOpen: true, visibleMonth: moment() .startOf('month'), saveInProgress: false, saveFinished: false, loadedMonths: Immutable.Set(), triggerChanges: null, blocked_dates: [], initial_blocked_dates: [], booked_dates: [], }); const includesDay = (days, day) => days.some((d) => isSameDay(d, day)); const ACTION_UNBLOCK = 'unblock'; const ACTION_BLOCK = 'block'; const withChange = (state, action, day) => { if (includesDay(state.get('booked_dates'), day)) { return state; } const blocked_dates = state.get('blocked_dates'); // console.log('before changes ' + JSON.stringify(state.get('blocked_dates'), null, 4)); const currentBlock = blocked_dates.find( (b) => isSameDay(b.blocked_at, day) ); const destroy = (action === ACTION_UNBLOCK) ? '1' : null; if (currentBlock) { currentBlock.destroy = destroy; } else if (action === ACTION_BLOCK) { blocked_dates.push({ id: null, blocked_at: moment.utc(day) }); } // force calendar rerender return state.set('triggerChanges', Math.random()); }; const mergeBlockedDates = (state, payload) => { const blocked_dates = state.get('blocked_dates'); const initial_blocked_dates = state.get('initial_blocked_dates') || []; const update_blocked_dates = payload.blocked_dates.filter( (block) => !blocked_dates.find((x) => x.id === block.id)); const update_initial_blocked_dates = [...payload.blocked_dates].filter( (block) => !initial_blocked_dates.find((x) => x.id === block.id)); const loadedMonths = payload.loadedMonths; return state .set('blocked_dates', blocked_dates.concat(update_blocked_dates)) .set('initial_blocked_dates', initial_blocked_dates.concat(update_initial_blocked_dates)) .set('loadedMonths', state.get('loadedMonths').union(loadedMonths)); }; const mergeBookedDates = (state, payload) => { const booked_dates = state.get('booked_dates'); const update = payload.filter((x) => booked_dates.indexOf(x) < 0); return state.set('booked_dates', booked_dates.concat(update)); }; export const hasChanges = (state) => { const blocked_dates = state.get('blocked_dates') .filter((x) => !(x.id === null && x.destroy === '1')); const initial_blocked_dates = state.get('initial_blocked_dates'); if (blocked_dates && initial_blocked_dates) { if (blocked_dates.length !== initial_blocked_dates.length) { return true; } else { return blocked_dates.some((x) => x.destroy === '1'); } } return false; }; // Calculate currently blocked days from the fetched ones and the // unsaved changes. export const blockedDays = (state) => { const blocked_dates = state.get('blocked_dates'); return blocked_dates .filter((x) => x.destroy !== '1') .map((x) => x.blocked_at); }; const clearState = (state) => state .set('isOpen', false) .set('bookings', Immutable.List()) .set('blocks', Immutable.List()) .set('changes', Immutable.List()) .set('saveInProgress', false) .set('saveFinished', false) .set('loadedMonths', Immutable.Set()) .set('visibleMonth', moment() .startOf('month')) .set('blocked_dates', []) .set('initial_blocked_dates', []) .set('booked_dates', []); const manageAvailabilityReducer = (state = initialState, action) => { const { type, payload } = action; const saveInProgress = state.get('saveInProgress'); switch (type) { case actionTypes.BLOCK_DAY: return saveInProgress ? state : withChange(state, ACTION_BLOCK, payload); case actionTypes.UNBLOCK_DAY: return saveInProgress ? state : withChange(state, ACTION_UNBLOCK, payload); case actionTypes.CHANGE_MONTH: return state.set('visibleMonth', payload); case actionTypes.START_SAVING: return state.set('saveInProgress', true); case actionTypes.CHANGES_SAVED: return state.set('saveInProgress', false).set('saveFinished', true); case actionTypes.SAVING_FAILED: return state.set('saveInProgress', false); case actionTypes.DATA_BLOCKED_DATES_LOADED: return mergeBlockedDates(state, payload); case actionTypes.DATA_BOOKED_DATES_LOADED: return mergeBookedDates(state, payload); case actionTypes.OPEN_EDIT_VIEW: return state.set('isOpen', true); case actionTypes.CLOSE_EDIT_VIEW: // Clean up store state, everything will be refetched when opened again. return saveInProgress ? state : clearState(state); default: return state; } }; export default manageAvailabilityReducer;
34.194245
93
0.683358
55f2e2ae188f864b0d93868481d55834058b14fb
720
js
JavaScript
App/components/Profile/__tests__/ProfilePost.test.js
SPZJ/tembu-friends
baec61063ed0d9d5bb2c4280b9b61ff789530158
[ "MIT" ]
1
2020-05-19T09:16:12.000Z
2020-05-19T09:16:12.000Z
App/components/Profile/__tests__/ProfilePost.test.js
SPZJ/tembu-friends
baec61063ed0d9d5bb2c4280b9b61ff789530158
[ "MIT" ]
2
2020-12-18T17:46:40.000Z
2021-09-02T12:00:27.000Z
App/components/Profile/__tests__/ProfilePost.test.js
SPZJ/tembu-friends
baec61063ed0d9d5bb2c4280b9b61ff789530158
[ "MIT" ]
1
2020-05-18T10:04:52.000Z
2020-05-18T10:04:52.000Z
import React from 'react'; import renderer from 'react-test-renderer'; jest.mock('react-native-image-zoom-viewer'); import ProfilePost from '../ProfilePost'; describe('<ProfilePost/>', () => { const mockDateFn = () => new Date(1466424490000); const mockTimestamp = { toDate: mockDateFn, }; const mockPost = { body: 'TESTING', is_private: true, sender_name: 'Mock User', sender_uid: '12345', time_posted: mockTimestamp, post_id: '1234', reported: false, }; it('renders correctly', () => { const tree = renderer.create(<ProfilePost postDetails={mockPost} />).toJSON(); expect(tree).toMatchSnapshot(); }); });
24.827586
86
0.598611
55f37d3b00128eec7bd9aa01950569700031b3c1
868
js
JavaScript
scripts/build-watch.js
suchipi/monorepo
f8be72583cd36e0c0cb198d418cee9231ca3897a
[ "MIT" ]
null
null
null
scripts/build-watch.js
suchipi/monorepo
f8be72583cd36e0c0cb198d418cee9231ca3897a
[ "MIT" ]
null
null
null
scripts/build-watch.js
suchipi/monorepo
f8be72583cd36e0c0cb198d418cee9231ca3897a
[ "MIT" ]
null
null
null
const path = require("path"); const fs = require("fs"); const { exec } = require("shelljs"); const packageJson = require("../package.json"); const bin = (name) => path.resolve(__dirname, "..", "node_modules", ".bin", name); const pkgsWithSrc = packageJson.workspaces .map((pkgPath) => { if (fs.existsSync(path.resolve(__dirname, "..", pkgPath, "src"))) { return pkgPath; } else { return null; } }) .filter(Boolean); exec( [ bin("concurrently"), "--raw", "--kill-others", pkgsWithSrc .map( (pkgPath) => "'" + [ bin("babel"), "-w", path.join(pkgPath, "src"), "-d", path.join(pkgPath, "dist"), "--ignore", "*.test.js", ].join(" ") + "'" ) .join(" "), ].join(" ") );
20.666667
71
0.459677
55f454b99e854bf325c1431d0e0fa69cee1229ad
3,041
js
JavaScript
scripts/dev.js
monaco-software/zooma
9e9d7dcf8c11343924c32f3a95dd166a4a8c25cf
[ "MIT" ]
null
null
null
scripts/dev.js
monaco-software/zooma
9e9d7dcf8c11343924c32f3a95dd166a4a8c25cf
[ "MIT" ]
62
2021-02-04T11:32:07.000Z
2021-04-26T11:28:18.000Z
scripts/dev.js
monaco-software/zema
9e9d7dcf8c11343924c32f3a95dd166a4a8c25cf
[ "MIT" ]
1
2021-05-11T14:57:55.000Z
2021-05-11T14:57:55.000Z
// Этот скрипт предназначен для разработки // запускает два потока сборки и WS сервер // для перезагрузки страниц // запуск node scripts/dev.js const WebSocket = require('ws'); const webpack = require('webpack'); const webpackConfig = require('../webpack.ssr.js'); const cluster = require('cluster'); const { spawn } = require('child_process'); const RELOAD_MESSAGE = 'restart sharply'; const statsConfig = { all: false, entrypoints: true, chunkGroups: true, timings: true, errors: true, colors: true, }; const compilers = []; let postgres; webpackConfig.forEach((config) => { compilers.push(webpack(config)); }); const spawnPostgres = () => { return spawn('docker-compose', ['up', 'postgres'], { stdio: ['pipe', 'pipe', 'pipe', 'ipc'], env: { ...process.env }, }); }; if (cluster.isMaster) { console.log( `🔧\x1b[1m\x1b[33m process.env.NODE_ENV = '\x1b[96m${process.env.NODE_ENV}\x1b[33m'\x1b[0m\n` ); postgres = spawnPostgres(); postgres.stderr.on('data', (data) => { process.stdout.write(`⚡ ${data}`); // console.log(`⚡ ${data.toString()}`); }); const wsConnections = []; let wsServer; wsServer = new WebSocket.Server({ port: 54321 }); wsServer.on('connection', (connection) => { wsConnections.push(connection); connection.on('message', (message) => { console.log(`📜 ️received: ${message}`); }); connection.send('🛠 Reload WebSocket connected 🛠'); }); const shutDown = () => { if (wsConnections.length) { wsConnections.forEach((connection) => { if (connection && connection.readyState === 1) { connection.send('🛠 Reload WebSocket disconnected 🛠'); connection.close(); } }); } setInterval(() => { if (!postgres.connected) { process.exit(0); } }, 100); }; const messageListener = (msg) => { if (msg.data === RELOAD_MESSAGE) { console.log(`Message received to master from worker: ${msg.data}`); setTimeout(() => { wsConnections.forEach((connection) => { if (connection && connection.readyState === 1) { connection.send('reload'); } }); }, 2000); } }; compilers.forEach((compiler, id) => { const worker = cluster.fork({ id, name: compiler.name }); worker.on('message', (msg) => messageListener(msg)); }); cluster.on('exit', (worker, code, signal) => { console.log(`worker ${worker.process.pid} died`); }); process.on('SIGTERM', () => shutDown()); process.on('SIGINT', () => shutDown()); } else { compilers[process.env.id].watch( { ignored: /node_modules/, aggregateTimeout: 500, poll: 500, }, (err, stats) => { if (stats) { console.log(stats.toString(statsConfig)); if (process.env.name === 'client') { process.send({ data: RELOAD_MESSAGE }); } } if (err) { console.error(err); } } ); console.log(`Worker '${process.env.name}' ${process.pid} started`); }
25.554622
96
0.582703
55f4bbfebc7e04d2b0ae0800782abf633fc17de9
681
js
JavaScript
blueoak/generators/app/src/bower.js
BlueOakJS/generator-blueoak
ca16bb513d1d5610c9f4652311b6eb4ed2f99164
[ "MIT" ]
null
null
null
blueoak/generators/app/src/bower.js
BlueOakJS/generator-blueoak
ca16bb513d1d5610c9f4652311b6eb4ed2f99164
[ "MIT" ]
null
null
null
blueoak/generators/app/src/bower.js
BlueOakJS/generator-blueoak
ca16bb513d1d5610c9f4652311b6eb4ed2f99164
[ "MIT" ]
null
null
null
/* * Copyright (c) 2015-2017 PointSource, LLC. * MIT Licensed */ 'use strict'; var _ = require('lodash'); module.exports = function(BlueOakGenerator) { /** * Prepare Bower overrides property to fix external bower.json with missing * or incomplete main property (needed by wiredep) */ BlueOakGenerator.prototype.prepareBowerOverrides = function() { var bowerOverrides = { 'font-awesome': { main: [ './fonts/*' ] } }; if (_.isEmpty(bowerOverrides)) { this.bowerOverrides = null; } else { this.bowerOverrides = JSON.stringify(bowerOverrides, null, 2) .replace(/\n/g, '\n '); } }; };
21.28125
77
0.599119
55f4c8f9f26e2c5b629f05bfbc8d9e6dcb49a292
680
js
JavaScript
src/js/local/resourceCN.js
SuperMap/iClient3D-vue
32ebdd4cb84e14d08617f20b9d988028535fe953
[ "Apache-2.0" ]
27
2020-10-26T08:48:32.000Z
2022-03-22T14:55:47.000Z
src/js/local/resourceCN.js
SuperMap/iClient3D-vue
32ebdd4cb84e14d08617f20b9d988028535fe953
[ "Apache-2.0" ]
6
2020-10-14T09:37:56.000Z
2021-07-13T01:17:24.000Z
src/js/local/resourceCN.js
SuperMap/iClient3D-vue
32ebdd4cb84e14d08617f20b9d988028535fe953
[ "Apache-2.0" ]
8
2020-10-26T08:48:38.000Z
2022-03-10T07:05:56.000Z
export default { showRenderLoopErrors:'渲染时发生错误,已停止渲染。', AttributeError:'该组件props没有这个属性:', NoPickPositionSupported:"不支持深度纹理,无法绘制多边形,地形操作功能无法使用!", NoTerrain:"请在地形里使用地形组件!", initViewerWarn:'请先初始化viewer!', MoveMouseHeightBox:'点击鼠标左键结束矩形绘制,移动鼠标绘制box高度', RightClickEndDrawing: '右键单击结束绘制', LeftClickBottomBox:'点击鼠标左键,开始绘制矩形作为box底面', ClickModelAddBox:'点击模型,添加裁剪盒子', SkyLineWarn: "获取天际线体前,请先绘制天际线!", SkyLineBody:'天际线体', ShadowqueryWarn:"此操作需要先开启阴影!", VeiwshedBody:'可视体', VeiwshedBodyHidden:'不可视体', EchartsErr: "二维显示需要echarts支持,未找到相关依赖!", BaseMapImg:'底图', tip1: '<p>点击左键确定操作区域中间点</p><p>右键单击结束绘制</p>', }
34
59
0.694118
55f797d7b761fb2db5720a0ca18c9a4b01ee5298
3,304
js
JavaScript
src/state/modules/layout.js
JasonGrant/UXUIPrinciples
64fbc8836e16d52605c46e053f88f9e78339c76a
[ "MIT" ]
2
2018-10-07T14:04:22.000Z
2018-10-19T16:19:35.000Z
src/state/modules/layout.js
JasonGrant/UXUIPrinciples
64fbc8836e16d52605c46e053f88f9e78339c76a
[ "MIT" ]
null
null
null
src/state/modules/layout.js
JasonGrant/UXUIPrinciples
64fbc8836e16d52605c46e053f88f9e78339c76a
[ "MIT" ]
null
null
null
// LAYOUT_DIRECTION_HORIZONTAL // Horizontal = true // Vertical = false export const state = { config: { application_name: "UX UI Principles", application_logo_loc: "/logo/LaunchLogoGray.svg", application_logo_alt_text: "Application Logo", toolbar_height: 64, layout_direction_horizontal: true, aboutModal: false, mobileNav: false, mobileSettings: false }, navigationItems: [ { name: "Landing", route: "/", fn: null, url: null, icon: "mdi-home-outline" }, { name: "Cards", route: "/cardstoomany", fn: null, url: null, icon: "mdi-view-sequential" }, { name: "Readability", route: "/readabilitylinewidth", fn: null, url: null, icon: "mdi-text-subject" }, { name: "Heuristic", route: "/heuristic", fn: null, url: null, icon: "mdi-format-list-checks" } // { // name: "Colors", // route: "/colors", // fn: null, // url: null, // icon: "mdi-format-color-fill" // }, // { // name: "Flip Layout", // route: null, // fn: "flipLayout", // url: null, // icon: "mdi-page-layout-header" // }, // { // name: "Vue Docs", // route: null, // fn: null, // url: "https://vuejs.org", // icon: "mdi-file-document-box-outline" // } ], userMenuItems: [ { name: "Logout", route: null, fn: "logoutUser", url: null, icon: "mdi-logout-variant" } ], appMenuItems: [ { name: "About App", route: null, fn: "toggleAppAbout", url: null, icon: "mdi-information-outline" }, { name: "Release Notes", route: "/releasenotes", fn: null, url: null, icon: "mdi-file-document-box-outline" } ], bottomNavItems: [ { name: "Landing", route: "/", fn: null, url: null, icon: "mdi-home-outline" }, { name: "Colors", route: "/colors", fn: null, url: null, icon: "mdi-format-color-fill" } ] }; export const getters = { getConfig(state) { return state.config; }, getNavigationItems(state) { return state.navigationItems; }, getUserMenuItems(state) { return state.userMenuItems; }, getAppMenuItems(state) { return state.appMenuItems; }, getBottomNavItems(state) { return state.bottomNavItems; } }; export const mutations = { TOGGLE_LAYOUT_DIRECTION: state => { state.config.layout_direction_horizontal = !state.config .layout_direction_horizontal; }, TOGGLE_APP_ABOUT: state => { state.config.aboutModal = !state.config.aboutModal; }, TOGGLE_MOBILE_NAV: state => { state.config.mobileNav = !state.config.mobileNav; }, TOGGLE_MOBILE_SETTINGS: state => { state.config.mobileSettings = !state.config.mobileSettings; } }; export const actions = { toggleLayoutDirection: ({ commit }) => { commit("TOGGLE_LAYOUT_DIRECTION"); }, toggleAppAbout: ({ commit }) => { commit("TOGGLE_APP_ABOUT"); }, toggleMobileNav: ({ commit }) => { commit("TOGGLE_MOBILE_NAV"); }, toggleMobileSettings: ({ commit }) => { commit("TOGGLE_MOBILE_SETTINGS"); } };
20.911392
63
0.559019
55f7a4279a7dbb2430f00632328623f650859f88
3,108
js
JavaScript
frontend/mono-ui/web/dss-dashboard/src/components/Charts/genericchart.js
pradeepkumarcm-egov/DIGIT-Dev
d8fb601fae6d919d2386f36b36dfc7fde77ebd4f
[ "MIT" ]
11
2021-04-22T13:18:00.000Z
2021-07-13T06:24:48.000Z
frontend/mono-ui/web/dss-dashboard/src/components/Charts/genericchart.js
pradeepkumarcm-egov/DIGIT-Dev
d8fb601fae6d919d2386f36b36dfc7fde77ebd4f
[ "MIT" ]
2,489
2019-12-05T11:56:06.000Z
2022-03-31T23:05:12.000Z
frontend/mono-ui/web/dss-dashboard/src/components/Charts/genericchart.js
pradeepkumarcm-egov/DIGIT-Dev
d8fb601fae6d919d2386f36b36dfc7fde77ebd4f
[ "MIT" ]
65
2019-11-29T10:08:05.000Z
2021-09-24T09:48:03.000Z
import React from 'react'; import CollectionChart from './CollectionChart'; import PerformanceChart from './PerformanceChart' import ChartType from './charttype'; import style from './layOutStyle'; import { withStyles } from '@material-ui/styles'; import Cards from '../common/Cards/Cards'; import variables from '../../styles/variables'; import { isMobile } from 'react-device-detect'; import MCards from '../common/mobileCards/Cards'; class GenericChart extends React.Component { setViewAll = (visualCode) =>{ this.props.setViewAll(visualCode); } renderCharts(d, chartData) { let filters = this.props.filters; switch (d.vizType.toUpperCase()) { case 'METRIC-COLLECTION': return <CollectionChart key={d.id} chartData={d.charts} filters={filters} dimensions={d.dimensions} section={chartData.name} page={this.props.page}/> case 'PERFORMING-METRIC': return <PerformanceChart key={d.id} chartData={d.charts} label={d.name} filters={filters} dimensions={d.dimensions} section={chartData.name} setViewAll={this.setViewAll.bind(this)} page={this.props.page}/> case 'CHART': return <ChartType key={d.id} gFilter={this.props.gFilter} chartData={d.charts} label={d.name} filters={filters} dimensions={d.dimensions} section={chartData.name} page={this.props.page} /> default: return <div></div> } } render() { let { classes, chartData, displayName, filters, page,Gfilter,row } = this.props; let d = chartData; let style = { flex: ((row == 0) ? '3' : '1'), backgroundColor: variables.widget_background, height: 'auto', margin: '10px 10px 10px 10px !important', maxWidth: '100%', display: 'flex', flexDirection: 'column', } let style1 = { flex: ((row == 0) ? '2.1' : '1'), backgroundColor: variables.widget_background, height: 'auto', margin: '10px 10px 10px 10px !important', maxWidth: '100%', display: 'flex', flexDirection: 'column', } if(isMobile){ return ( <div> <MCards key={1} id={d.id} chartData={chartData} name={d.name} cardStyle={{}} needInfo={true} title={d.name} noUnit={d.noUnit || false}> {this.renderCharts(d, chartData)} </MCards> </div> ); }else{ return ( <div className={classes.chartRow}> {chartData.vizArray.map((d, i) => <Cards key={i} id={d.id} name={d.name} page={page} cardStyle={i == 1 && row === 0 ? style : style1} needInfo={true} title={d.name} noUnit={d.noUnit || false}> {this.renderCharts(d, chartData)} </Cards> )} </div> ); } } } export default withStyles(style)(GenericChart);
41.44
221
0.550515
55f8227840c9f29568d063351c7251d716222881
954
js
JavaScript
client/src/App.js
phatpham9/gitlab-one-board
dc6e6214212e9f6bedf3a65c7b18d74a6784720a
[ "MIT" ]
5
2018-04-21T09:35:46.000Z
2021-10-09T22:45:58.000Z
client/src/App.js
phatpham9/gitlab-one-board
dc6e6214212e9f6bedf3a65c7b18d74a6784720a
[ "MIT" ]
16
2018-04-21T11:04:52.000Z
2018-04-28T10:36:29.000Z
client/src/App.js
phatpham9/gitlab-one-board
dc6e6214212e9f6bedf3a65c7b18d74a6784720a
[ "MIT" ]
1
2018-04-25T10:11:26.000Z
2018-04-25T10:11:26.000Z
import React from 'react'; import { Provider as ReduxProvider } from 'react-redux'; import configureStore from './state'; import { getIssues } from './state/ducks/issues'; import { getProjects } from './state/ducks/projects'; import { getLabels } from './state/ducks/labels'; import { getAuthors } from './state/ducks/authors'; import { getAssignees } from './state/ducks/assignees'; import Header from './components/Common/Header'; import Content from './components/Common/Content'; import Footer from './components/Common/Footer'; import './App.scss'; const store = configureStore(window.REDUX_INITIAL_DATA); store.dispatch(getIssues()); store.dispatch(getProjects()); store.dispatch(getLabels()); store.dispatch(getAuthors()); store.dispatch(getAssignees()); const App = () => ( <ReduxProvider store={store}> <div className="app"> <Header /> <Content /> <Footer /> </div> </ReduxProvider> ); export default App;
25.105263
56
0.701258