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
1a75600c62a8024ba04df9e9d61dfaa45ef911ee
4,798
js
JavaScript
app.js
maldicion069/HBPWebNodeJs
708b5edbddab85755ba809026ff7718a6c2c09f9
[ "MIT" ]
1
2015-11-04T08:24:45.000Z
2015-11-04T08:24:45.000Z
app.js
maldicion069/HBPWebNodeJs
708b5edbddab85755ba809026ff7718a6c2c09f9
[ "MIT" ]
null
null
null
app.js
maldicion069/HBPWebNodeJs
708b5edbddab85755ba809026ff7718a6c2c09f9
[ "MIT" ]
null
null
null
/* * The MIT License (MIT) * * Copyright (c) 2015 maldicion069 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ 'use strict'; //http://bootswatch.com/darkly/# //dependencies var config = require('./config'), express = require('express'), cookieParser = require('cookie-parser'), bodyParser = require('body-parser'), session = require('express-session'), mongoStore = require('connect-mongo')(session), http = require('http'), path = require('path'), passport = require('passport'), mongoose = require('mongoose'), helmet = require('helmet'), csrf = require('csurf'), Set = require("set"), //https://www.npmjs.org/package/set multer = require("multer"); //create express app var app = express(); //keep reference to config app.config = config; //setup the web server app.server = http.createServer(app); //setup mongoose app.db = mongoose.createConnection(config.mongodb.uri); app.db.on('error', console.error.bind(console, 'mongoose connection error: ')); app.db.once('open', function () { //and... we have a data store }); //beautiful HTML code app.locals.pretty=true; //config data models require('./models')(app, mongoose); //settings app.disable('x-powered-by'); app.set('port', config.port); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); //middleware app.use(require('morgan')('dev')); app.use(require('compression')()); app.use(require('serve-static')(path.join(__dirname, 'public'))); app.use(require('method-override')()); app.use(multer({ dest : './upload-folder/' })) app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(cookieParser(config.cryptoKey)); app.use(session({ resave: true, saveUninitialized: true, secret: config.cryptoKey, store: new mongoStore({ url: config.mongodb.uri }) })); app.use(passport.initialize()); app.use(passport.session()); app.use(csrf({ cookie: { signed: true } })); helmet(app); //beautiful HTML code app.locals.pretty=true; //response locals app.use(function(req, res, next) { res.cookie('_csrfToken', req.csrfToken()); res.locals.isLogued = req.isAuthenticated(); res.locals.user = {}; res.locals.user.defaultReturnUrl = req.user && req.user.defaultReturnUrl(); res.locals.user.username = req.user && req.user.username; next(); }); //global locals app.locals.projectName = app.config.projectName; app.locals.copyrightYear = new Date().getFullYear(); app.locals.copyrightName = app.config.companyName; app.locals.cacheBreaker = 'br34k-01'; //setup passport require('./passport')(app, passport); //setup routes require('./routes')(app, passport); //custom (friendly) error handler app.use(require('./views/http/index').http500); //setup utilities app.utility = {}; app.utility.os = require("os"); app.utility.fs = require("fs"); app.utility.sendmail = require('./util/sendmail'); app.utility.slugify = require('./util/slugify'); app.utility.workflow = require('./util/workflow'); app.utility.passRest = "d44c330489a7cff566e1e4981e40f6d93631aaac"; app.utility.Set = Set; //SHA1 de HbpDesktopC++WebNode //http://www.hashgenerator.de/ var fs = require('fs'); var data = fs.readFileSync('./datavars.json'), myObj; var jSchema = fs.readFileSync("./jSchema.json"), myObj2; try { myObj = JSON.parse(data); myObj2 = JSON.parse(jSchema); console.dir(myObj); console.dir(myObj2); app.utility.variables = new Set(myObj.vars); app.utility.jSchema = jSchema; } catch (err) { console.log('There has been an error parsing your JSON.') console.log(err); } console.log(app.utility.variables); app.set('json spaces', 0); //listen up app.server.listen(app.config.port, function(){ //and... we're live console.log("Servidor activo ..."); });
27.895349
81
0.705502
1a75a2c0e42907d28d07f4711fd5071657f9f180
2,102
js
JavaScript
src/pages/contact.js
gfellah45/Portfolio
d4ab2d91a85d454a698aaf988dfacc796c7fe520
[ "MIT" ]
null
null
null
src/pages/contact.js
gfellah45/Portfolio
d4ab2d91a85d454a698aaf988dfacc796c7fe520
[ "MIT" ]
null
null
null
src/pages/contact.js
gfellah45/Portfolio
d4ab2d91a85d454a698aaf988dfacc796c7fe520
[ "MIT" ]
null
null
null
import React from "react"; import { motion } from "framer-motion"; import Layout from "../components/layout"; import SEO from "../components/seo"; function ContactPage() { return ( <Layout> <SEO keywords={[`gatsby`, `tailwind`, `react`, `tailwindcss`]} title="Contact" /> <section> <motion.form initial={{ y: 1000 }} animate={{ y: 0 }} className="mx-auto md:w-1/2" name="contact" method="POST" data-netlify="true" > <p className="mb-8 leading-loose text-white text-2xl font-semibold font-portfoliohead"> Want to work with me or hire me? </p> <label className="block mb-2 text-xs font-bold uppercase text-white" htmlFor="first-name" > First Name </label> <input className="w-full mb-6 form-input px-4" id="first-name" placeholder="Bill" type="text" name="firstname" /> <label className="block mb-2 text-xs font-bold uppercase text-white" htmlFor="last-name" > Last Name </label> <input className="w-full mb-6 form-input px-4" id="last-name" placeholder="Murray" type="text" name="lastname" /> <label className="block mb-2 text-xs font-bold uppercase text-white" htmlFor="message" > Message </label> <textarea className="w-full mb-6 form-textarea px-4" id="message" placeholder="Say something..." rows="8" name="message" /> <button className="px-4 py-2 text-sm font-bold text-gray-800 bg-white border-b-4 border-gray-800 rounded hover:border-gray-700 hover:bg-gray-600"> Submit </button> </motion.form> </section> </Layout> ); } export default ContactPage;
25.950617
156
0.498097
1a768b4fd68386f4268c5e184d92732376680f73
1,098
js
JavaScript
app/components/f7-page-container.js
Bottom-Line-Software/ember-cli-framework7
3257fede06ffa886290cad43a23304264245db0d
[ "MIT" ]
null
null
null
app/components/f7-page-container.js
Bottom-Line-Software/ember-cli-framework7
3257fede06ffa886290cad43a23304264245db0d
[ "MIT" ]
null
null
null
app/components/f7-page-container.js
Bottom-Line-Software/ember-cli-framework7
3257fede06ffa886290cad43a23304264245db0d
[ "MIT" ]
null
null
null
import Ember from 'ember'; export default Ember.Component.extend({ classNameBindings: [':page', 'navbar:navbar-fixed', 'toolbar:toolbar-fixed'], navbar: undefined, toolbar: undefined, searchBar: undefined, /* * Initializes a given feature by looking for the given selector within the * page container. To overwrite a feature from outside, it could just be set * in the handlebars. * * ### Example * * ```javascript * this.feature('navbar', '.navbar'); * ``` */ feature: function(name, selector) { if (this.get(name) === undefined) { this.set(name, this.$(selector).length > 0); } }, /* * Initialized the supported features of the page container. */ didInsertElement: function() { this.feature('navbar', '.navbar'); this.feature('toolbar', '.toolbar'); this.feature('searchBar', '.searchbar'); }, /* * Initializes the search bar if this feature is enabled. */ initSearchBar: function() { if (this.get('searchBar')) { this.get('f7').initSearchbar(this.$()); } }.observes('searchBar') });
24.954545
79
0.628415
1a76994ddcfc7760a5e46704b8d1f99dbc3f91f5
2,616
js
JavaScript
hearth/chessKnockout/chessKnockout.js
albseb511/fsd
fd94258e246f3fbe0cfb9aef915383d4629af7d0
[ "MIT" ]
52
2020-01-03T10:08:09.000Z
2022-03-14T16:18:44.000Z
hearth/chessKnockout/chessKnockout.js
impcakash/fsd
fd94258e246f3fbe0cfb9aef915383d4629af7d0
[ "MIT" ]
1
2020-10-03T08:43:07.000Z
2020-10-03T08:43:07.000Z
hearth/chessKnockout/chessKnockout.js
impcakash/fsd
fd94258e246f3fbe0cfb9aef915383d4629af7d0
[ "MIT" ]
18
2020-01-19T18:42:22.000Z
2022-03-08T17:42:39.000Z
/* PROBLEM STATEMENT Points: 30 2N participants (P1 , P2 , P3 .... , P2N ) have enrolled for a knockout chess tournament. In the first round, each participant P2k-1 is to play against participant P2k, (1 ≤ k ≤ 2N-1) . Here is an example for k = 4 : enter image description here Some information about all the participants is known in the form of a triangular matrix A with dimensions (2N-1) X (2N-1). If Aij = 1 (i > j), participant Pi is a better player than participant Pj, otherwise Aij = 0 and participant Pj is a better player than participant Pi. Given that the better player always wins, who will be the winner of the tournament? Note : Being a better player is not transitive i.e if Pi is a better player than Pj and Pj is a better player than Pk, it is not necessary that Pi is a better player than Pk . Input The first line consists of N. Then, 2N-1 lines follow, the ith line consisting of i space separated integers Ai+1 1 , Ai+1 2 , .... Ai+1 i Output A single integer denoting the id of the winner of the tournament. Constraints 1 ≤ N ≤ 10 Aij = {0, 1} (i > j) SAMPLE INPUT 2 0 1 0 0 1 1 SAMPLE OUTPUT 1 Explanation When 1 plays against 2, 1 wins. When 3 plays against 4, 4 wins. When 1 plays against 4, 1 wins. So, 1 wins the tournament. */ process.stdin.resume(); process.stdin.setEncoding("utf-8"); var stdin_input = ""; process.stdin.on("data", function (input) { stdin_input += input; // Reading input from STDIN }); process.stdin.on("end", function () { main(stdin_input); }); function main(input) { let [n, ...info] = input.split("\n") n = Number(n) let total = Math.pow( 2, Number(n) ) info = info.map(a=>a.split(" ").map(Number)) let isFirstRound = true let results = [] for(let i=0; i<n; i++){ results[i]=[] if(isFirstRound){ isFirstRound = false for(let j=0; j<info.length; j+=2){ let opp = j if( info[j][opp] === 0 ){ results[i].push(j) } else{ results[i].push(j+1) } } } else{ for(let j=0; j<results[i-1].length; j+=2){ let first = results[i-1][j] let second = results[i-1][j+1] if( info[second-1][first] === 0 ){ results[i].push( first ) } else{ results[i].push( second ) } } } } console.log(Number(results[results.length-1])+1) }
28.434783
252
0.572248
1a77eb9f69584f2680c3af8215e17914d17b3dd9
695
js
JavaScript
test/testcache2.js
mmaroti/tasync
6dce4eba796703fbd965ed5b62bf7c0194dfe0e2
[ "MIT" ]
null
null
null
test/testcache2.js
mmaroti/tasync
6dce4eba796703fbd965ed5b62bf7c0194dfe0e2
[ "MIT" ]
null
null
null
test/testcache2.js
mmaroti/tasync
6dce4eba796703fbd965ed5b62bf7c0194dfe0e2
[ "MIT" ]
null
null
null
"use strict"; var TASYNC = require("../lib/tasync"); var FS = require("fs"); (function () { var fsReadFile = TASYNC.wrap(FS.readFile); var lastFileName, lastFileData; function cachedReadFile (fileName) { if (fileName === lastFileName) { return TASYNC.call(patch, lastFileData); } lastFileName = fileName; lastFileData = fsReadFile(fileName); return lastFileData; } function patch (fileData) { return "cached:" + fileData; } FS.readFile = TASYNC.unwrap(cachedReadFile); }()); // --- test FS.readFile("testcache2.js", function (err, data) { console.log(err, data.length); }); FS.readFile("testcache2.js", function (err, data) { console.log(err, data.length); });
18.783784
51
0.676259
1a784d607c52d49ccfaa997e0896a2efa92f0dc2
272
js
JavaScript
packages/plugin-convert-equal-to-strict-equal/lib/convert-equal-to-strict-equal.js
sobolevn/putout
965279977fa9aa7e522960a86793813c64af1f26
[ "MIT" ]
260
2019-01-21T21:21:09.000Z
2022-03-28T13:06:47.000Z
packages/plugin-convert-equal-to-strict-equal/lib/convert-equal-to-strict-equal.js
sobolevn/putout
965279977fa9aa7e522960a86793813c64af1f26
[ "MIT" ]
98
2019-04-24T12:01:35.000Z
2022-03-31T18:38:15.000Z
packages/plugin-convert-equal-to-strict-equal/lib/convert-equal-to-strict-equal.js
sobolevn/putout
965279977fa9aa7e522960a86793813c64af1f26
[ "MIT" ]
31
2019-02-19T14:25:40.000Z
2022-02-12T22:20:53.000Z
'use strict'; module.exports.report = () => 'Strict equal should be used instead of equal'; module.exports.exclude = () => [ '__ == null', '__ != null', ]; module.exports.replace = () => ({ '__a == __b': '__a === __b', '__a != __b': '__a !== __b', });
18.133333
77
0.518382
1a798d4dc02eeeb1689791e9448e5ae92bfcd487
318
js
JavaScript
lib/Commands/getTempHistory.js
Apollon77/ioBroker.miio
ea3054b79de99972adf9cbb540e816aeee6d2016
[ "MIT" ]
23
2019-02-18T07:40:00.000Z
2022-02-08T07:33:30.000Z
lib/Commands/getTempHistory.js
Apollon77/ioBroker.miio
ea3054b79de99972adf9cbb540e816aeee6d2016
[ "MIT" ]
8
2019-02-18T07:31:20.000Z
2019-06-07T17:03:50.000Z
lib/Commands/getTempHistory.js
Apollon77/ioBroker.miio
ea3054b79de99972adf9cbb540e816aeee6d2016
[ "MIT" ]
7
2019-02-25T14:50:47.000Z
2021-04-18T21:07:10.000Z
"use strict"; const MiioCommand = require("./command"); module.exports = class GetTempHistory extends MiioCommand { constructor() { super("get_temp_history", { name: "get temp history", desc: "Retrieves a temperature history", returnType: "object" }); } };
24.461538
59
0.58805
1a7a10fd233210a8b121164653bf1cb3eb425484
1,499
js
JavaScript
problems/algorithms/095.unique-binary-search-trees-ii.js
yoffee-wang/leetcode
cf033b0c66548f2685f6acbbb3976b1da031553f
[ "Unlicense" ]
null
null
null
problems/algorithms/095.unique-binary-search-trees-ii.js
yoffee-wang/leetcode
cf033b0c66548f2685f6acbbb3976b1da031553f
[ "Unlicense" ]
null
null
null
problems/algorithms/095.unique-binary-search-trees-ii.js
yoffee-wang/leetcode
cf033b0c66548f2685f6acbbb3976b1da031553f
[ "Unlicense" ]
null
null
null
/** * [中等]95. 不同的二叉搜索树 II * https://leetcode-cn.com/problems/unique-binary-search-trees-ii/ * * 给定一个整数 n,生成所有由 1 ... n 为节点所组成的 二叉搜索树 。 示例: 输入:3 输出: [   [1,null,3,2],   [3,2,null,1],   [3,1,null,null,2],   [2,1,3],   [1,null,2,null,3] ] 解释: 以上的输出对应以下 5 种不同结构的二叉搜索树: 1 3 3 2 1 \ / / / \ \ 3 2 1 1 3 2 / / \ \ 2 1 2 3   提示: 0 <= n <= 8 */ /** * Definition for a binary tree node. */ function TreeNode(val, left, right) { this.val = val === undefined ? 0 : val this.left = left === undefined ? null : left this.right = right === undefined ? null : right } /** * @param {number} n * @return {TreeNode[]} */ var generateTrees = function (n) { return helper(1, n) } function helper(start, end) { if (start > end) { return [] } const treeList = [] for (let i = start; i <= end; i++) { const left = helper(start, i - 1) const right = helper(i + 1, end) for (let j = 0; j <= left.length; j++) { for (let k = 0; k <= right.length; k++) { const node = new TreeNode(i) node.left = left[j - 1] node.right = right[k - 1] treeList.push(node) } } } return treeList } write('algorithms: 95. 不同的二叉搜索树 II', 'title') write(generateTrees(3)) // [ // [1, null, 3, 2], // [3, 2, null, 1], // [3, 1, null, null, 2], // [2, 1, 3], // [1, null, 2, null, 3] // ] // tag: 树;
17.845238
66
0.474983
1a7a2227cef4c7093253fac5c62ebde5d31c1499
225
js
JavaScript
monolith/sender/index.js
GeorgeNiece/fortune-cookies
d40f8f27896cc433272919b5344d61bc1974ea4d
[ "MIT" ]
1
2019-10-08T16:42:33.000Z
2019-10-08T16:42:33.000Z
monolith/sender/index.js
GeorgeNiece/fortune-cookies
d40f8f27896cc433272919b5344d61bc1974ea4d
[ "MIT" ]
null
null
null
monolith/sender/index.js
GeorgeNiece/fortune-cookies
d40f8f27896cc433272919b5344d61bc1974ea4d
[ "MIT" ]
3
2019-08-13T17:04:51.000Z
2021-01-05T08:10:15.000Z
/* config = { firstName:string lastName:string userId:string; } */ const send = (config, fortune) =>{ console.log(`Greetings from ${config.firstName} ${config.lastName}: ${fortune}`); }; module.exports = {send};
16.071429
85
0.644444
1a7d9dc9732883a0ca544a58851edeaa9b810998
1,493
js
JavaScript
contributors.js
hellomykami/cbc-kitten-scientists
489c6b268453adbc3c364c4a0cf71e04d34c493f
[ "MIT" ]
1
2018-09-20T09:36:57.000Z
2018-09-20T09:36:57.000Z
contributors.js
hellomykami/cbc-kitten-scientists
489c6b268453adbc3c364c4a0cf71e04d34c493f
[ "MIT" ]
null
null
null
contributors.js
hellomykami/cbc-kitten-scientists
489c6b268453adbc3c364c4a0cf71e04d34c493f
[ "MIT" ]
2
2021-07-02T06:56:18.000Z
2022-01-05T03:20:13.000Z
#!/usr/bin/env node "use strict"; var Promise = require('bluebird'); var _ = require('lodash'); var request = Promise.promisifyAll(require('superagent')); var staticContributors = [ { login: 'SphtMarathon', html_url: 'https://www.reddit.com/user/SphtMarathon' }, { login: 'FancyRabbitt', html_url: 'https://www.reddit.com/user/FancyRabbitt' }, { login: 'Azulan', html_url: 'https://www.reddit.com/user/Azulan' }, { login: 'Mewnine', html_url: 'https://www.reddit.com/user/Mewnine' }, { login: 'pefoley2', html_url: 'https://www.reddit.com/user/pefoley2' }, { login: 'DirCattus', html_url: 'https://www.reddit.com/user/DirCattus' } ]; request .get('https://api.github.com/repos/cameroncondry/cbc-kitten-scientists/contributors') .endAsync() .then(parseContributors); function parseContributors(response) { var contributors = _.chain(response.body.concat(staticContributors)) .sortBy(function nameToLowerCase(contributor) { return contributor.login.toLowerCase(); }) .remove(function excludeCameron(contributor) { return contributor.login !== "cameroncondry"; }) .map(toMarkdown) .value() .join('\n'); console.log(contributors); } function toMarkdown(contributor) { return '- [' + contributor.login + '](' + contributor.html_url + ')'; }
24.47541
89
0.602813
1a7e705f13ebe3451663a930f879605f668906aa
2,311
js
JavaScript
core/ui-src/js/directives/download-nzbzip-button.js
leidolf/nzbhydra2
b51f72edfc066df37f8eabd486d6f9a292918f1a
[ "Apache-2.0" ]
915
2018-01-06T14:56:05.000Z
2022-03-29T17:22:38.000Z
core/ui-src/js/directives/download-nzbzip-button.js
leidolf/nzbhydra2
b51f72edfc066df37f8eabd486d6f9a292918f1a
[ "Apache-2.0" ]
745
2018-01-06T14:38:28.000Z
2022-03-26T05:06:06.000Z
core/ui-src/js/directives/download-nzbzip-button.js
leidolf/nzbhydra2
b51f72edfc066df37f8eabd486d6f9a292918f1a
[ "Apache-2.0" ]
85
2018-01-06T17:50:04.000Z
2022-03-03T12:10:01.000Z
angular .module('nzbhydraApp') .directive('downloadNzbzipButton', downloadNzbzipButton); function downloadNzbzipButton() { return { templateUrl: 'static/html/directives/download-nzbzip-button.html', require: ['^searchResults'], scope: { searchResults: "<", searchTitle: "<", callback: "&" }, controller: controller }; function controller($scope, growl, $http, FileDownloadService) { $scope.download = function () { if (angular.isUndefined($scope.searchResults) || $scope.searchResults.length === 0) { growl.info("You should select at least one result..."); } else { var values = _.map($scope.searchResults, function (value) { return value.searchResultId; }); var link = "internalapi/nzbzip"; var searchTitle; if (angular.isDefined($scope.searchTitle)) { searchTitle = " for " + $scope.searchTitle.replace("[^a-zA-Z0-9.-]", "_"); } else { searchTitle = ""; } var filename = "NZBHydra NZBs" + searchTitle + ".zip"; $http({method: "post", url: link, data: values}).then(function (response) { if (response.data.successful && response.data.zip !== null) { link = "internalapi/nzbzipDownload"; FileDownloadService.downloadFile(link, filename, "POST", response.data.zipFilepath); if (angular.isDefined($scope.callback)) { $scope.callback({result: response.data.addedIds}); } if (response.data.missedIds.length > 0) { growl.error("Unable to add " + response.missedIds.length + " out of " + values.length + " NZBs to ZIP"); } } else { growl.error(response.data.message); } }, function (data, status, headers, config) { growl.error(status); }); } } } }
41.267857
133
0.475119
1a7ea614f1782c5868dc2c7da1a4a5a6aefd4eb0
365
js
JavaScript
bachelor-thesis/mobile/app/actions/gamesActions.js
jsimck/uni
42ea184ccf3d9ecbffdea19b74ed13f3bc583137
[ "MIT" ]
null
null
null
bachelor-thesis/mobile/app/actions/gamesActions.js
jsimck/uni
42ea184ccf3d9ecbffdea19b74ed13f3bc583137
[ "MIT" ]
null
null
null
bachelor-thesis/mobile/app/actions/gamesActions.js
jsimck/uni
42ea184ccf3d9ecbffdea19b74ed13f3bc583137
[ "MIT" ]
null
null
null
import API from '../services/APIService' // Manage games actions export const ADD_GAME = 'ADD_GAME'; export const UPDATE_GAME = 'UPDATE_GAME'; export function addGame(id, qrId) { return { type: ADD_GAME, id: id, qrId: qrId }; } export function updateGame(game) { return { type: UPDATE_GAME, game: game }; }
18.25
41
0.610959
1a7f0804da7d5067e27af2a979f9774e031656c6
981
js
JavaScript
src/api/system/user-manage.js
houever/mall-admin
555d3ebf49fe56539ca635bff2bd1e58274f682d
[ "Apache-2.0" ]
null
null
null
src/api/system/user-manage.js
houever/mall-admin
555d3ebf49fe56539ca635bff2bd1e58274f682d
[ "Apache-2.0" ]
null
null
null
src/api/system/user-manage.js
houever/mall-admin
555d3ebf49fe56539ca635bff2bd1e58274f682d
[ "Apache-2.0" ]
null
null
null
// eslint-disable-next-line no-unused-vars import request from '@/utils/request' // eslint-disable-next-line no-unused-vars import { deleteRequest, getRequest, postRequest } from '../../utils/request' import { userApi } from '../../config/env' // 分页列表查询 export function getUserListPage(current,size,param) { return getRequest(userApi + `/account/pages/${current}/${size}`, param) } // 获取用户列表数据 export function getUserListData(data) { return postRequest(userApi + '/account/all', data) } /* 导出全部数据*/ export function getAll() { return postRequest(userApi + '/account/all') } // 编辑用户 export function editUser(data) { return postRequest(userApi + '/account/edit', data) } // 新增用户 export function addUser(params) { return postRequest(userApi + '/account/add', params) } /* 禁用,启用用户*/ export function disableUser(param) { return postRequest(userApi + '/account/disable', param) } // 删除 export function delUser(id) { return deleteRequest(userApi + '/account/' + id) }
23.926829
76
0.710499
1a7f34405d67a96f8ef5a504ddb2e23469942ea1
759
js
JavaScript
src/RandomHooksFeature/index.js
manuelpuchta/react-boilerplate
9755b8e2bb4c0b8c5486506e2b778db17bec794b
[ "MIT" ]
2
2019-09-25T13:40:49.000Z
2020-04-06T16:07:08.000Z
src/RandomHooksFeature/index.js
manuelpuchta/react-boilerplate
9755b8e2bb4c0b8c5486506e2b778db17bec794b
[ "MIT" ]
9
2021-08-16T19:42:04.000Z
2021-08-16T19:42:17.000Z
src/RandomHooksFeature/index.js
manuelpuchta/react-boilerplate
9755b8e2bb4c0b8c5486506e2b778db17bec794b
[ "MIT" ]
null
null
null
import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { Button } from '../styles'; const RandomHooksFeature = ({ randomProp }) => { const [count, setCount] = useState(0); return ( <> <h2> <a href="https://reactjs.org/docs/hooks-intro.html" title={'React hooks docs'} > React Hooks </a>{' '} example </h2> <p>{randomProp}</p> <p>You clicked {count} times</p> <Button onClick={() => setCount(count + 1)}>Click me</Button> </> ); }; RandomHooksFeature.propTypes = { randomProp: PropTypes.string.isRequired, }; RandomHooksFeature.defaultProps = { randomProp: 'Cool, cool, cool.', }; export default RandomHooksFeature;
21.685714
67
0.582345
1a7f5748844dd53be43d824aa855cbb0f240caba
913
js
JavaScript
examples/basic.js
jloveric/Clockmaker
355ffc1a080e9b300be89d2a8dbfc55135b33a2e
[ "MIT" ]
5
2019-12-28T04:58:48.000Z
2021-11-20T11:46:03.000Z
examples/basic.js
jloveric/Clockmaker
355ffc1a080e9b300be89d2a8dbfc55135b33a2e
[ "MIT" ]
2
2021-02-18T05:26:23.000Z
2021-05-10T22:05:22.000Z
examples/basic.js
jloveric/Clockmaker
355ffc1a080e9b300be89d2a8dbfc55135b33a2e
[ "MIT" ]
1
2020-12-11T14:34:55.000Z
2020-12-11T14:34:55.000Z
let BasicBot = require('../response/PhrasexBotLib.js').BasicBot let UserData = require('../user/UserData.js') //fileDatabase should always be 'filesystem' //somebotname is your bots name - anything you want, but it can't match an existing bot //uniqueindex should be all LOWERCASE and is the name of the index in elasticsearch let conf = { fileDatabase: 'filesystem', doc: { description: { name: 'somebotname', }, }, phraseTable: 'uniqueindex', } let userData = new UserData() userData.initialize() let bot = new BasicBot() bot .initialize(conf) .then(() => { bot .getResult('ho bome', userData) .then(ans => { console.log(ans) bot.close() process.exit(0) }) .catch(reason => { console.log('error', reason) bot.close() process.exit(0) }) }) .catch(reason => { console.log('error', reason) })
22.825
87
0.613363
1a7f699a4033ded85fe0d51180472df7d6c1f6e8
1,773
js
JavaScript
src/models/user.model.js
chinhhiep996/messaging-application
2548773c87372ec33c101add6728b7b6388d1db2
[ "MIT" ]
null
null
null
src/models/user.model.js
chinhhiep996/messaging-application
2548773c87372ec33c101add6728b7b6388d1db2
[ "MIT" ]
2
2021-05-10T04:10:53.000Z
2021-09-01T20:30:15.000Z
src/models/user.model.js
chinhhiep996/messaging-application
2548773c87372ec33c101add6728b7b6388d1db2
[ "MIT" ]
null
null
null
import mongoose from 'mongoose'; import bcrypt from 'bcrypt'; const Schema = mongoose.Schema; const UserSchema = new Schema({ username: String, gender: { type: String, default: 'male' }, phone: { type: Number, default: null }, address: { type: String, default: null }, avatar: { type: String, default: 'avatar-default.jpg' }, role: { type: String, default: 'USER' }, local: { email: { type: String, trim: true }, password: String, isActive: { type: Boolean, default: false }, verifyToken: String }, facebook: { uid: String, token: String, email: { type: String, trim: true } }, google: { uid: String, token: String, email: { type: String, trim: true } }, createdAt: { type: Number, default: Date.now }, updatedAt: { type: Number, default: null }, deleteAt: { type: Number, default: null } }); UserSchema.statics = { createNew(item) { return this.create(item); }, findByEmail(email) { return this.findOne({"local.email": email}).exec(); }, removeById(id) { return this.findByIdAndRemove(id).exec(); }, findByToken(token) { return this.findOne({"local.verifyToken": token}).exec(); }, verify(token) { return this.findOneAndUpdate( {"local.verifyToken": token}, {"local.isActive": true, "local.verifyToken": null} ).exec(); }, findUserById(id) { return this.findById(id).exec(); } }; UserSchema.methods = { comparePassword(password) { return bcrypt.compare(password, this.local.password); } }; module.exports = mongoose.model('user', UserSchema);
18.861702
62
0.566272
1a80a3146bcad3078f54951bb84dcac448b1718a
919
js
JavaScript
wp-content/plugins/kali-forms/resources/assets/js/forms/components/Snackbars/CustomSnackStyles.js
anhanguera-lr/anhanguera-lr.github.io
55f66a8b4d2c443228caf314c216ecb84918b357
[ "CC-BY-3.0", "MIT" ]
3
2019-11-28T00:57:08.000Z
2020-07-25T21:09:39.000Z
wp-content/plugins/kali-forms/resources/assets/js/forms/components/Snackbars/CustomSnackStyles.js
anhanguera-lr/anhanguera-lr.github.io
55f66a8b4d2c443228caf314c216ecb84918b357
[ "CC-BY-3.0", "MIT" ]
null
null
null
wp-content/plugins/kali-forms/resources/assets/js/forms/components/Snackbars/CustomSnackStyles.js
anhanguera-lr/anhanguera-lr.github.io
55f66a8b4d2c443228caf314c216ecb84918b357
[ "CC-BY-3.0", "MIT" ]
2
2019-11-28T00:58:28.000Z
2020-07-27T05:53:20.000Z
import { makeStyles } from '@material-ui/core/styles'; const customSnackStyles = makeStyles(theme => ({ card: { maxWidth: 400, minWidth: 344, }, typography: { fontWeight: 500, }, actionRoot: { padding: '8px 8px 8px 16px', color: theme.palette.getContrastText(theme.palette.primary.main), background: theme.palette.primary.main, }, icons: { marginLeft: 'auto !important', }, expand: { padding: '8px 8px', color: theme.palette.getContrastText(theme.palette.primary.main), transform: 'rotate(0deg)', transition: theme.transitions.create('transform', { duration: theme.transitions.duration.shortest, }), }, expandOpen: { transform: 'rotate(180deg)', }, collapse: { padding: 16, }, checkIcon: { fontSize: 20, color: '#b3b3b3', paddingRight: 4, }, button: { padding: '2px 5px', textTransform: 'none', marginRight: '10px', }, })); export default customSnackStyles
20.422222
67
0.67247
1a82d2417920ce17dc44ef9fa6965e34edfc1f62
78
js
JavaScript
tournaments/isInfiniteProcess/isInfiniteProcess.js
gurfinkel/codeSignal
114817947ac6311bd53a48f0f0e17c0614bf7911
[ "MIT" ]
5
2020-02-06T09:51:22.000Z
2021-03-19T00:18:44.000Z
tournaments/isInfiniteProcess/isInfiniteProcess.js
gurfinkel/codeSignal
114817947ac6311bd53a48f0f0e17c0614bf7911
[ "MIT" ]
null
null
null
tournaments/isInfiniteProcess/isInfiniteProcess.js
gurfinkel/codeSignal
114817947ac6311bd53a48f0f0e17c0614bf7911
[ "MIT" ]
3
2019-09-27T13:06:21.000Z
2021-04-20T23:13:17.000Z
function isInfiniteProcess(a, b) { return a > b || 1 === ((b - a) & 1); }
19.5
40
0.5
1a8300dcbea64c817bf4f2e5954e034e45cf40e3
2,824
js
JavaScript
src/app/lastweekooo.component.js
sayandg14/PVPOC
2818ba89d471d069e39a82b6c2a93fc4146545b2
[ "MIT" ]
null
null
null
src/app/lastweekooo.component.js
sayandg14/PVPOC
2818ba89d471d069e39a82b6c2a93fc4146545b2
[ "MIT" ]
null
null
null
src/app/lastweekooo.component.js
sayandg14/PVPOC
2818ba89d471d069e39a82b6c2a93fc4146545b2
[ "MIT" ]
null
null
null
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = require("@angular/core"); var lastweekooo_service_1 = require("./lastweekooo.service"); var team_service_1 = require("./team.service"); var LastWeekOOO = (function () { function LastWeekOOO(teamService, lastWeekOOOService) { this.teamService = teamService; this.lastWeekOOOService = lastWeekOOOService; this.isSuccess = true; this.teams = []; this.lastWeekOOODTOs = []; } LastWeekOOO.prototype.ngOnInit = function () { console.log("within ngonit"); this.getTeams(); this.getLastWeekOOOData(); }; LastWeekOOO.prototype.getLastWeekOOOData = function () { var _this = this; this.lastWeekOOOService.getLastWeekOOOData() .subscribe(function (lastWeekOOODTOs) { return _this.lastWeekOOODTOs = lastWeekOOODTOs; }, function (error) { return _this.errorMessage = error; }); }; LastWeekOOO.prototype.save = function () { var _this = this; console.log("Teams lenght : " + this.lastWeekOOODTOs.length); this.lastWeekOOOService.create(this.lastWeekOOODTOs) .subscribe(function (isSuccess) { return _this.isSuccess = isSuccess; }, function (error) { return _this.errorMessage = error; }); }; LastWeekOOO.prototype.getTeams = function () { var _this = this; this.teamService.getTeams() .subscribe(function (teams) { return _this.teams = teams; }, function (error) { return _this.errorMessage = error; }); console.log("Teams lenght : " + this.teams.length); }; return LastWeekOOO; }()); LastWeekOOO = __decorate([ core_1.Component({ selector: 'PV-app', templateUrl: 'app/views/lastweekooo.component.html', providers: [lastweekooo_service_1.LastWeekOOOService, team_service_1.TeamService], }), __metadata("design:paramtypes", [team_service_1.TeamService, lastweekooo_service_1.LastWeekOOOService]) ], LastWeekOOO); exports.LastWeekOOO = LastWeekOOO; //# sourceMappingURL=lastweekooo.component.js.map
55.372549
161
0.653329
1a8356c9108fe8c41829af086919b758493388b2
661
js
JavaScript
gulpfile.js
carlosazaustre/note-me
cd7fe853f0c9db727bfdb971723f37bae3402ad6
[ "MIT" ]
2
2017-03-02T17:12:08.000Z
2019-11-07T12:26:41.000Z
gulpfile.js
carlosazaustre/note-me
cd7fe853f0c9db727bfdb971723f37bae3402ad6
[ "MIT" ]
null
null
null
gulpfile.js
carlosazaustre/note-me
cd7fe853f0c9db727bfdb971723f37bae3402ad6
[ "MIT" ]
3
2015-03-01T22:23:32.000Z
2019-11-07T12:26:06.000Z
'use strict'; var gulp = require('gulp'); var mocha = require('gulp-mocha'); var jshint = require('gulp-jshint'); gulp.task('lint', function() { gulp.src(['gulpfile.js', 'server.js', './lib/**/*.js']) .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')); }); gulp.task('test', function() { return gulp.src('./test/*.js', { read: false }) .pipe(mocha({ reporter: 'spec', globals: { chai: require('chai'), expect : require('chai').expect } })); }); gulp.task('watch', function() { gulp.watch(['./test/*.js', './lib/**/*.js'], ['test', 'lint']); }); gulp.task('default', ['watch']);
22.793103
65
0.531014
1a839552ea45234775766b8ccbe9fc786306455e
355
js
JavaScript
.storybook/main.js
LuckyFBB/vikingship-ts-antd
09887113089c828a555098a2b17b1d60e09f830f
[ "MIT" ]
3
2020-10-10T07:38:14.000Z
2020-10-10T07:54:21.000Z
.storybook/main.js
LuckyFBB/vikingship-ts-antd
09887113089c828a555098a2b17b1d60e09f830f
[ "MIT" ]
null
null
null
.storybook/main.js
LuckyFBB/vikingship-ts-antd
09887113089c828a555098a2b17b1d60e09f830f
[ "MIT" ]
1
2020-12-11T11:03:37.000Z
2020-12-11T11:03:37.000Z
/* * @Author: FBB * @Date: 2020-09-23 13:18:11 * @LastEditors: FBB * @LastEditTime: 2020-09-23 14:58:44 * @Description: */ module.exports = { stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], addons: [ "@storybook/addon-links", "@storybook/addon-essentials", "@storybook/preset-create-react-app", ], };
22.1875
79
0.588732
1a84cd2dcda62d60f4e14bb35ff7d548de1d0081
118
js
JavaScript
assets/built/comment.min.js
ScottHelme/scotthelme.co.uk
f1882587123930d981d1d2080baa5ee02b419448
[ "MIT" ]
null
null
null
assets/built/comment.min.js
ScottHelme/scotthelme.co.uk
f1882587123930d981d1d2080baa5ee02b419448
[ "MIT" ]
2
2020-06-14T09:40:56.000Z
2021-09-02T12:03:26.000Z
assets/built/comment.min.js
ScottHelme/scotthelme.co.uk
f1882587123930d981d1d2080baa5ee02b419448
[ "MIT" ]
2
2020-06-11T14:27:04.000Z
2021-05-06T13:05:39.000Z
var disqus_identifier=document.getElementById("post_id").getAttribute("data"); //# sourceMappingURL=comment.min.js.map
59
78
0.813559
1a84ffd81b526b0db5379172b1135a2b4953bb06
149
js
JavaScript
src/services/user.js
sonsangsoo/uiuxft.front.dev
0f9dadd2593fe32faa93e41526ca7e58bd6e2745
[ "MIT" ]
null
null
null
src/services/user.js
sonsangsoo/uiuxft.front.dev
0f9dadd2593fe32faa93e41526ca7e58bd6e2745
[ "MIT" ]
null
null
null
src/services/user.js
sonsangsoo/uiuxft.front.dev
0f9dadd2593fe32faa93e41526ca7e58bd6e2745
[ "MIT" ]
null
null
null
import HTTP from '../utils/http' export const getUser = (params) => HTTP.post('api/smartcntrt/cust/nameVerifyCheck', params) // SelectDisNetwork
21.285714
58
0.731544
1a8686e2f65966ddf8268a8e91f203bede5d34fa
63,682
js
JavaScript
dist_testing/18.js
majiacan/admin
7d926442a8ce6f998febc3ffa6d46e9e6ad62e74
[ "MIT" ]
null
null
null
dist_testing/18.js
majiacan/admin
7d926442a8ce6f998febc3ffa6d46e9e6ad62e74
[ "MIT" ]
null
null
null
dist_testing/18.js
majiacan/admin
7d926442a8ce6f998febc3ffa6d46e9e6ad62e74
[ "MIT" ]
null
null
null
(this["webpackJsonp"] = this["webpackJsonp"] || []).push([[18],{ /***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=script&lang=js&": /*!************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/glod/glod/glodactive.vue?vue&type=script&lang=js& ***! \************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n data: function data() {\n return {\n activeName: 'first',\n center: 'top',\n tableData2: [{\n date: '2016-05-02',\n name: '王小虎',\n address: '上海市普陀区金沙江路 1518 弄'\n }, {\n date: '2016-05-04',\n name: '王小虎',\n address: '上海市普陀区金沙江路 1518 弄'\n }, {\n date: '2016-05-01',\n name: '王小虎',\n address: '上海市普陀区金沙江路 1518 弄'\n }, {\n date: '2016-05-03',\n name: '王小虎',\n address: '上海市普陀区金沙江路 1518 弄'\n }]\n };\n },\n methods: {\n handleClick: function handleClick(tab, event) {\n console.log(tab, event);\n },\n tableRowClassName: function tableRowClassName(_ref) {\n var row = _ref.row,\n rowIndex = _ref.rowIndex;\n\n if (rowIndex === 1) {\n return 'warning-row';\n } else if (rowIndex === 3) {\n return 'success-row';\n }\n\n return '';\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY2FjaGUtbG9hZGVyL2Rpc3QvY2pzLmpzPyEuL25vZGVfbW9kdWxlcy9iYWJlbC1sb2FkZXIvbGliL2luZGV4LmpzIS4vbm9kZV9tb2R1bGVzL2NhY2hlLWxvYWRlci9kaXN0L2Nqcy5qcz8hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvaW5kZXguanM/IS4vc3JjL3ZpZXdzL2dsb2QvZ2xvZC9nbG9kYWN0aXZlLnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZ2xvZGFjdGl2ZS52dWU/ZGNkOSJdLCJzb3VyY2VzQ29udGVudCI6WyI8dGVtcGxhdGU+XG4gICA8ZGl2IGNsYXNzPVwiZ2xvZGFjdGl2ZVwiPlxuICAgICAgPGVsLXRhYnMgdi1tb2RlbD1cImFjdGl2ZU5hbWVcIiBAdGFiLWNsaWNrPVwiaGFuZGxlQ2xpY2tcIiA6dGFiLXBvc2l0aW9uPVwiY2VudGVyXCIgY2xhc3M9XCJ0YWItbmF2XCI+XG4gICAgPGVsLXRhYi1wYW5lIGxhYmVsPVwi6aaW5qyh55m76ZmG57qi5YyF6K+05piOXCIgbmFtZT1cImZpcnN0XCIgdGFiLXBvc2l0aW9uPVwiY2VudGVyXCI+XG4gICAgICAgICAgPGVsLXRhYmxlXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJlbC10YWJsZVwiXG4gICAgICAgICAgICAgICAgOmRhdGE9XCJ0YWJsZURhdGEyXCJcbiAgICAgICAgICAgICAgICBzdHlsZT1cIndpZHRoOiAxMDAlXCJcbiAgICAgICAgICAgICAgICA6cm93LWNsYXNzLW5hbWU9XCJ0YWJsZVJvd0NsYXNzTmFtZVwiPlxuICAgICAgICAgICAgICAgIDxlbC10YWJsZS1jb2x1bW5cbiAgICAgICAgICAgICAgICBwcm9wPVwiZGF0ZVwiXG4gICAgICAgICAgICAgICAgbGFiZWw9XCLml6XmnJ9cIlxuICAgICAgICAgICAgICAgIHdpZHRoPVwiMTgwXCI+XG4gICAgICAgICAgICAgICAgPC9lbC10YWJsZS1jb2x1bW4+XG4gICAgICAgICAgICAgICAgPGVsLXRhYmxlLWNvbHVtblxuICAgICAgICAgICAgICAgICB3aWR0aD1cIjg1MFwiXG4gICAgICAgICAgICAgICAgcHJvcD1cImFkZHJlc3NcIlxuICAgICAgICAgICAgICAgIGxhYmVsPVwi5Zyw5Z2AXCI+XG4gICAgICAgICAgICAgICAgPC9lbC10YWJsZS1jb2x1bW4+XG4gICAgICAgICAgICAgICAgIDxlbC10YWJsZS1jb2x1bW5cbiAgICAgICAgICAgICAgICAgICAgbGFiZWw9XCLmk43kvZxcIlxuICAgICAgICAgICAgICAgICAgICB3aWR0aD1cIjEwMFwiPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgc2xvdC1zY29wZT1cInNjb3BlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8ZWwtYnV0dG9uIEBjbGljaz1cImhhbmRsZUNsaWNrKHNjb3BlLnJvdylcIiB0eXBlPVwidGV4dFwiIHNpemU9XCJzbWFsbFwiPuafpeecizwvZWwtYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGVsLWJ1dHRvbiB0eXBlPVwidGV4dFwiIHNpemU9XCJzbWFsbFwiPue8lui+kTwvZWwtYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgPC9lbC10YWJsZS1jb2x1bW4+XG4gICAgICAgICAgICA8L2VsLXRhYmxlPlxuICAgIDwvZWwtdGFiLXBhbmU+XG4gICAgPGVsLXRhYi1wYW5lIGxhYmVsPVwi5YiG5Lqr5pyL5Y+L5ZyI6K+05piOXCIgbmFtZT1cInNlY29uZFwiPlxuICAgICAgICAgICA8ZWwtdGFibGVcbiAgICAgICAgICAgICAgICBjbGFzcz1cImVsLXRhYmxlXCJcbiAgICAgICAgICAgICAgICA6ZGF0YT1cInRhYmxlRGF0YTJcIlxuICAgICAgICAgICAgICAgIHN0eWxlPVwid2lkdGg6IDEwMCVcIlxuICAgICAgICAgICAgICAgIDpyb3ctY2xhc3MtbmFtZT1cInRhYmxlUm93Q2xhc3NOYW1lXCI+XG4gICAgICAgICAgICAgICAgPGVsLXRhYmxlLWNvbHVtblxuICAgICAgICAgICAgICAgIHByb3A9XCJkYXRlXCJcbiAgICAgICAgICAgICAgICBsYWJlbD1cIuaXpeacn1wiXG4gICAgICAgICAgICAgICAgd2lkdGg9XCIxODBcIj5cbiAgICAgICAgICAgICAgICA8L2VsLXRhYmxlLWNvbHVtbj5cbiAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIDxlbC10YWJsZS1jb2x1bW5cbiAgICAgICAgICAgICAgICAgICAgd2lkdGg9XCI5MDBcIlxuICAgICAgICAgICAgICAgICAgICBwcm9wPVwiYWRkcmVzc1wiXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsPVwi5Zyw5Z2AXCI+XG4gICAgICAgICAgICAgICAgPC9lbC10YWJsZS1jb2x1bW4+XG4gICAgICAgICAgICAgICAgIDxlbC10YWJsZS1jb2x1bW5cbiAgICAgICAgICAgICAgICAgICAgbGFiZWw9XCLmk43kvZxcIlxuICAgICAgICAgICAgICAgICAgICB3aWR0aD1cIjEwMFwiPlxuICAgICAgICAgICAgICAgICAgICA8dGVtcGxhdGUgc2xvdC1zY29wZT1cInNjb3BlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8ZWwtYnV0dG9uIEBjbGljaz1cImhhbmRsZUNsaWNrKHNjb3BlLnJvdylcIiB0eXBlPVwidGV4dFwiIHNpemU9XCJzbWFsbFwiPuafpeecizwvZWwtYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGVsLWJ1dHRvbiB0eXBlPVwidGV4dFwiIHNpemU9XCJzbWFsbFwiPue8lui+kTwvZWwtYnV0dG9uPlxuICAgICAgICAgICAgICAgICAgIDwvdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgPC9lbC10YWJsZS1jb2x1bW4+XG4gICAgICAgICAgICA8L2VsLXRhYmxlPlxuICAgIDwvZWwtdGFiLXBhbmU+XG4gICAgPGVsLXRhYi1wYW5lIGxhYmVsPVwi56aP5Yip57qi5YyF6K+05piOXCIgbmFtZT1cInRoaXJkXCI+XG4gICAgICAgICAgPGVsLXRhYmxlXG4gICAgICAgICAgICAgICAgIGNsYXNzPVwiZWwtdGFibGVcIlxuICAgICAgICAgICAgICAgIDpkYXRhPVwidGFibGVEYXRhMlwiXG4gICAgICAgICAgICAgICAgc3R5bGU9XCJ3aWR0aDogMTAwJVwiXG4gICAgICAgICAgICAgICAgOnJvdy1jbGFzcy1uYW1lPVwidGFibGVSb3dDbGFzc05hbWVcIj5cbiAgICAgICAgICAgICAgICA8ZWwtdGFibGUtY29sdW1uXG4gICAgICAgICAgICAgICAgcHJvcD1cImRhdGVcIlxuICAgICAgICAgICAgICAgIGxhYmVsPVwi5pel5pyfXCJcbiAgICAgICAgICAgICAgICB3aWR0aD1cIjE4MFwiPlxuICAgICAgICAgICAgICAgIDwvZWwtdGFibGUtY29sdW1uPlxuICAgICAgICAgICAgICAgIDxlbC10YWJsZS1jb2x1bW5cbiAgICAgICAgICAgICAgICAgd2lkdGg9XCI5MDBcIlxuICAgICAgICAgICAgICAgIHByb3A9XCJhZGRyZXNzXCJcbiAgICAgICAgICAgICAgICBsYWJlbD1cIuWcsOWdgFwiPlxuICAgICAgICAgICAgICAgIDwvZWwtdGFibGUtY29sdW1uPlxuICAgICAgICAgICAgICAgICA8ZWwtdGFibGUtY29sdW1uXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsPVwi5pON5L2cXCJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGg9XCIxMDBcIj5cbiAgICAgICAgICAgICAgICAgICAgPHRlbXBsYXRlIHNsb3Qtc2NvcGU9XCJzY29wZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGVsLWJ1dHRvbiBAY2xpY2s9XCJoYW5kbGVDbGljayhzY29wZS5yb3cpXCIgdHlwZT1cInRleHRcIiBzaXplPVwic21hbGxcIj7mn6XnnIs8L2VsLWJ1dHRvbj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxlbC1idXR0b24gdHlwZT1cInRleHRcIiBzaXplPVwic21hbGxcIj7nvJbovpE8L2VsLWJ1dHRvbj5cbiAgICAgICAgICAgICAgICAgICA8L3RlbXBsYXRlPlxuICAgICAgICAgICAgICAgIDwvZWwtdGFibGUtY29sdW1uPlxuICAgICAgICAgICAgPC9lbC10YWJsZT5cbiAgICA8L2VsLXRhYi1wYW5lPlxuICAgIFxuICA8L2VsLXRhYnM+XG4gICA8L2Rpdj5cbiAgXG48L3RlbXBsYXRlPlxuPHNjcmlwdD5cbiAgZXhwb3J0IGRlZmF1bHQge1xuICAgIGRhdGEoKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICAgIGFjdGl2ZU5hbWU6ICdmaXJzdCcsXG4gICAgICAgICAgIGNlbnRlcjondG9wJyxcbiAgICAgICAgICAgdGFibGVEYXRhMjogW3tcbiAgICAgICAgICBkYXRlOiAnMjAxNi0wNS0wMicsXG4gICAgICAgICAgbmFtZTogJ+eOi+Wwj+iZjicsXG4gICAgICAgICAgYWRkcmVzczogJ+S4iua1t+W4guaZrumZgOWMuumHkeaymeaxn+i3ryAxNTE4IOW8hCcsXG4gICAgICAgIH0sIHtcbiAgICAgICAgICBkYXRlOiAnMjAxNi0wNS0wNCcsXG4gICAgICAgICAgbmFtZTogJ+eOi+Wwj+iZjicsXG4gICAgICAgICAgYWRkcmVzczogJ+S4iua1t+W4guaZrumZgOWMuumHkeaymeaxn+i3ryAxNTE4IOW8hCdcbiAgICAgICAgfSwge1xuICAgICAgICAgIGRhdGU6ICcyMDE2LTA1LTAxJyxcbiAgICAgICAgICBuYW1lOiAn546L5bCP6JmOJyxcbiAgICAgICAgICBhZGRyZXNzOiAn5LiK5rW35biC5pmu6ZmA5Yy66YeR5rKZ5rGf6LevIDE1MTgg5byEJyxcbiAgICAgICAgfSwge1xuICAgICAgICAgIGRhdGU6ICcyMDE2LTA1LTAzJyxcbiAgICAgICAgICBuYW1lOiAn546L5bCP6JmOJyxcbiAgICAgICAgICBhZGRyZXNzOiAn5LiK5rW35biC5pmu6ZmA5Yy66YeR5rKZ5rGf6LevIDE1MTgg5byEJ1xuICAgICAgICB9XVxuICAgICAgfVxuICAgICAgfSxcbiAgICBcbiAgICBtZXRob2RzOiB7XG4gICAgICBoYW5kbGVDbGljayh0YWIsIGV2ZW50KSB7XG4gICAgICAgIGNvbnNvbGUubG9nKHRhYiwgZXZlbnQpO1xuICAgICAgfSxcbiAgICAgIHRhYmxlUm93Q2xhc3NOYW1lKHtyb3csIHJvd0luZGV4fSkge1xuICAgICAgICBpZiAocm93SW5kZXggPT09IDEpIHtcbiAgICAgICAgICByZXR1cm4gJ3dhcm5pbmctcm93JztcbiAgICAgICAgfSBlbHNlIGlm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QTtBQUtBO0FBQ0E7QUFDQTtBQUhBO0FBS0E7QUFDQTtBQUNBO0FBSEE7QUFmQTtBQXFCQTtBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBWEE7QUF6QkEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=script&lang=js&\n"); /***/ }), /***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"6891b663-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a&": /*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6891b663-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a& ***! \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"glodactive\" },\n [\n _c(\n \"el-tabs\",\n {\n staticClass: \"tab-nav\",\n attrs: { \"tab-position\": _vm.center },\n on: { \"tab-click\": _vm.handleClick },\n model: {\n value: _vm.activeName,\n callback: function($$v) {\n _vm.activeName = $$v\n },\n expression: \"activeName\"\n }\n },\n [\n _c(\n \"el-tab-pane\",\n {\n attrs: {\n label: \"首次登陆红包说明\",\n name: \"first\",\n \"tab-position\": \"center\"\n }\n },\n [\n _c(\n \"el-table\",\n {\n staticClass: \"el-table\",\n staticStyle: { width: \"100%\" },\n attrs: {\n data: _vm.tableData2,\n \"row-class-name\": _vm.tableRowClassName\n }\n },\n [\n _c(\"el-table-column\", {\n attrs: { prop: \"date\", label: \"日期\", width: \"180\" }\n }),\n _vm._v(\" \"),\n _c(\"el-table-column\", {\n attrs: { width: \"850\", prop: \"address\", label: \"地址\" }\n }),\n _vm._v(\" \"),\n _c(\"el-table-column\", {\n attrs: { label: \"操作\", width: \"100\" },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function(scope) {\n return [\n _c(\n \"el-button\",\n {\n attrs: { type: \"text\", size: \"small\" },\n on: {\n click: function($event) {\n return _vm.handleClick(scope.row)\n }\n }\n },\n [_vm._v(\"查看\")]\n ),\n _vm._v(\" \"),\n _c(\n \"el-button\",\n { attrs: { type: \"text\", size: \"small\" } },\n [_vm._v(\"编辑\")]\n )\n ]\n }\n }\n ])\n })\n ],\n 1\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"el-tab-pane\",\n { attrs: { label: \"分享朋友圈说明\", name: \"second\" } },\n [\n _c(\n \"el-table\",\n {\n staticClass: \"el-table\",\n staticStyle: { width: \"100%\" },\n attrs: {\n data: _vm.tableData2,\n \"row-class-name\": _vm.tableRowClassName\n }\n },\n [\n _c(\"el-table-column\", {\n attrs: { prop: \"date\", label: \"日期\", width: \"180\" }\n }),\n _vm._v(\" \"),\n _c(\"el-table-column\", {\n attrs: { width: \"900\", prop: \"address\", label: \"地址\" }\n }),\n _vm._v(\" \"),\n _c(\"el-table-column\", {\n attrs: { label: \"操作\", width: \"100\" },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function(scope) {\n return [\n _c(\n \"el-button\",\n {\n attrs: { type: \"text\", size: \"small\" },\n on: {\n click: function($event) {\n return _vm.handleClick(scope.row)\n }\n }\n },\n [_vm._v(\"查看\")]\n ),\n _vm._v(\" \"),\n _c(\n \"el-button\",\n { attrs: { type: \"text\", size: \"small\" } },\n [_vm._v(\"编辑\")]\n )\n ]\n }\n }\n ])\n })\n ],\n 1\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"el-tab-pane\",\n { attrs: { label: \"福利红包说明\", name: \"third\" } },\n [\n _c(\n \"el-table\",\n {\n staticClass: \"el-table\",\n staticStyle: { width: \"100%\" },\n attrs: {\n data: _vm.tableData2,\n \"row-class-name\": _vm.tableRowClassName\n }\n },\n [\n _c(\"el-table-column\", {\n attrs: { prop: \"date\", label: \"日期\", width: \"180\" }\n }),\n _vm._v(\" \"),\n _c(\"el-table-column\", {\n attrs: { width: \"900\", prop: \"address\", label: \"地址\" }\n }),\n _vm._v(\" \"),\n _c(\"el-table-column\", {\n attrs: { label: \"操作\", width: \"100\" },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function(scope) {\n return [\n _c(\n \"el-button\",\n {\n attrs: { type: \"text\", size: \"small\" },\n on: {\n click: function($event) {\n return _vm.handleClick(scope.row)\n }\n }\n },\n [_vm._v(\"查看\")]\n ),\n _vm._v(\" \"),\n _c(\n \"el-button\",\n { attrs: { type: \"text\", size: \"small\" } },\n [_vm._v(\"编辑\")]\n )\n ]\n }\n }\n ])\n })\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;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tcIjogX3ZtLmhhbmRsZUNsaWNrIH0sXG4gICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgIHZhbHVlOiBfdm0uYWN0aXZlTmFtZSxcbiAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgX3ZtLmFjdGl2ZU5hbWUgPSAkJHZcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBleHByZXNzaW9uOiBcImFjdGl2ZU5hbWVcIlxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgW1xuICAgICAgICAgIF9jKFxuICAgICAgICAgICAgXCJlbC10YWItcGFuZVwiLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgIGxhYmVsOiBcIummluasoeeZu+mZhue6ouWMheivtOaYjlwiLFxuICAgICAgICAgICAgICAgIG5hbWU6IFwiZmlyc3RcIixcbiAgICAgICAgICAgICAgICBcInRhYi1wb3NpdGlvblwiOiBcImNlbnRlclwiXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgIFwiZWwtdGFibGVcIixcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJlbC10YWJsZVwiLFxuICAgICAgICAgICAgICAgICAgc3RhdGljU3R5bGU6IHsgd2lkdGg6IFwiMTAwJVwiIH0sXG4gICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICBkYXRhOiBfdm0udGFibGVEYXRhMixcbiAgICAgICAgICAgICAgICAgICAgXCJyb3ctY2xhc3MtbmFtZVwiOiBfdm0udGFibGVSb3dDbGFzc05hbWVcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgIF9jKFwiZWwtdGFibGUtY29sdW1uXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgcHJvcDogXCJkYXRlXCIsIGxhYmVsOiBcIuaXpeacn1wiLCB3aWR0aDogXCIxODBcIiB9XG4gICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICBfYyhcImVsLXRhYmxlLWNvbHVtblwiLCB7XG4gICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IHdpZHRoOiBcIjg1MFwiLCBwcm9wOiBcImFkZHJlc3NcIiwgbGFiZWw6IFwi5Zyw5Z2AXCIgfVxuICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgX2MoXCJlbC10YWJsZS1jb2x1bW5cIiwge1xuICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBsYWJlbDogXCLmk43kvZxcIiwgd2lkdGg6IFwiMTAwXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgc2NvcGVkU2xvdHM6IF92bS5fdShbXG4gICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBcImRlZmF1bHRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGZuOiBmdW5jdGlvbihzY29wZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJlbC1idXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgdHlwZTogXCJ0ZXh0XCIsIHNpemU6IFwic21hbGxcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0uaGFuZGxlQ2xpY2soc2NvcGUucm93KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfdm0uX3YoXCLmn6XnnItcIildXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJlbC1idXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgYXR0cnM6IHsgdHlwZTogXCJ0ZXh0XCIsIHNpemU6IFwic21hbGxcIiB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KFwi57yW6L6RXCIpXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAxXG4gICAgICAgICAgKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF9jKFxuICAgICAgICAgICAgXCJlbC10YWItcGFuZVwiLFxuICAgICAgICAgICAgeyBhdHRyczogeyBsYWJlbDogXCLliIbkuqvmnIvlj4vlnIjor7TmmI5cIiwgbmFtZTogXCJzZWNvbmRcIiB9IH0sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgIFwiZWwtdGFibGVcIixcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJlbC10YWJsZVwiLFxuICAgICAgICAgICAgICAgICAgc3RhdGljU3R5bGU6IHsgd2lkdGg6IFwiMTAwJVwiIH0sXG4gICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICBkYXRhOiBfdm0udGFibGVEYXRhMixcbiAgICAgICAgICAgICAgICAgICAgXCJyb3ctY2xhc3MtbmFtZVwiOiBfdm0udGFibGVSb3dDbGFzc05hbWVcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgIF9jKFwiZWwtdGFibGUtY29sdW1uXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgcHJvcDogXCJkYXRlXCIsIGxhYmVsOiBcIuaXpeacn1wiLCB3aWR0aDogXCIxODBcIiB9XG4gICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICBfYyhcImVsLXRhYmxlLWNvbHVtblwiLCB7XG4gICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IHdpZHRoOiBcIjkwMFwiLCBwcm9wOiBcImFkZHJlc3NcIiwgbGFiZWw6IFwi5Zyw5Z2AXCIgfVxuICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgX2MoXCJlbC10YWJsZS1jb2x1bW5cIiwge1xuICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBsYWJlbDogXCLmk43kvZxcIiwgd2lkdGg6IFwiMTAwXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgc2NvcGVkU2xvdHM6IF92bS5fdShbXG4gICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBcImRlZmF1bHRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGZuOiBmdW5jdGlvbihzY29wZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJlbC1idXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgdHlwZTogXCJ0ZXh0XCIsIHNpemU6IFwic21hbGxcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0uaGFuZGxlQ2xpY2soc2NvcGUucm93KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfdm0uX3YoXCLmn6XnnItcIildXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJlbC1idXR0b25cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgYXR0cnM6IHsgdHlwZTogXCJ0ZXh0XCIsIHNpemU6IFwic21hbGxcIiB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KFwi57yW6L6RXCIpXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAxXG4gICAgICAgICAgKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF9jKFxuICAgICAgICAgICAgXCJlbC10YWItcGFuZVwiLFxuICAgICAgICAgICAgeyBhdHRyczogeyBsYWJlbDogXCLnpo/liKnnuqLljIXor7TmmI5cIiwgbmFtZTogXCJ0aGlyZFwiIH0gfSxcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgXCJlbC10YWJsZVwiLFxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcImVsLXRhYmxlXCIsXG4gICAgICAgICAgICAgICAgICBzdGF0aWNTdHlsZTogeyB3aWR0aDogXCIxMDAlXCIgfSxcbiAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IF92bS50YWJsZURhdGEyLFxuICAgICAgICAgICAgICAgICAgICBcInJvdy1jbGFzcy1uYW1lXCI6IF92bS50YWJsZVJvd0NsYXNzTmFtZVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgX2MoXCJlbC10YWJsZS1jb2x1bW5cIiwge1xuICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBwcm9wOiBcImRhdGVcIiwgbGFiZWw6IFwi5pel5pyfXCIsIHdpZHRoOiBcIjE4MFwiIH1cbiAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgICAgIF9jKFwiZWwtdGFibGUtY29sdW1uXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgd2lkdGg6IFwiOTAwXCIsIHByb3A6IFwiYWRkcmVzc1wiLCBsYWJlbDogXCLlnLDlnYBcIiB9XG4gICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICBfYyhcImVsLXRhYmxlLWNvbHVtblwiLCB7XG4gICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IGxhYmVsOiBcIuaTjeS9nFwiLCB3aWR0aDogXCIxMDBcIiB9LFxuICAgICAgICAgICAgICAgICAgICBzY29wZWRTbG90czogX3ZtLl91KFtcbiAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IFwiZGVmYXVsdFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm46IGZ1bmN0aW9uKHNjb3BlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImVsLWJ1dHRvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyB0eXBlOiBcInRleHRcIiwgc2l6ZTogXCJzbWFsbFwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF92bS5oYW5kbGVDbGljayhzY29wZS5yb3cpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW192bS5fdihcIuafpeeci1wiKV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImVsLWJ1dHRvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBhdHRyczogeyB0eXBlOiBcInRleHRcIiwgc2l6ZTogXCJzbWFsbFwiIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfdm0uX3YoXCLnvJbovpFcIildXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIDFcbiAgICAgICAgICApXG4gICAgICAgIF0sXG4gICAgICAgIDFcbiAgICAgIClcbiAgICBdLFxuICAgIDFcbiAgKVxufVxudmFyIHN0YXRpY1JlbmRlckZucyA9IFtdXG5yZW5kZXIuX3dpdGhTdHJpcHBlZCA9IHRydWVcblxuZXhwb3J0IHsgcmVuZGVyLCBzdGF0aW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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"6891b663-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a&\n"); /***/ }), /***/ "./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&": /*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/css-loader??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css& ***! \******************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("exports = module.exports = __webpack_require__(/*! ../../../../node_modules/css-loader/lib/css-base.js */ \"./node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.i, \"\\n.glodactive{\\n margin-left: 10px;\\n margin-top: 10px\\n}\\n /* .el-tabs__item{\\n font-size: 20px !important\\n }\\n #tab-first{\\n margin-left: 380px !important\\n } */\\n.el-tabs__active-bar{ \\n /* /* z-index:-999 !important; */\\n /* margin-left: 380px !important */\\n}\\n.el-table{\\n /* margin-left:40px;\\n margin-top: 20px; */\\n /* border-bottom: 1px solid transparent;\\n border-color: transparent; */\\n}\\n\", \"\"]);\n\n// exports\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvY3NzLWxvYWRlci9pbmRleC5qcz8hLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvbG9hZGVycy9zdHlsZVBvc3RMb2FkZXIuanMhLi9ub2RlX21vZHVsZXMvcG9zdGNzcy1sb2FkZXIvc3JjL2luZGV4LmpzPyEuL25vZGVfbW9kdWxlcy9jYWNoZS1sb2FkZXIvZGlzdC9janMuanM/IS4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2luZGV4LmpzPyEuL3NyYy92aWV3cy9nbG9kL2dsb2QvZ2xvZGFjdGl2ZS52dWU/dnVlJnR5cGU9c3R5bGUmaW5kZXg9MCZsYW5nPWNzcyYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvdmlld3MvZ2xvZC9nbG9kL2dsb2RhY3RpdmUudnVlP2E0M2QiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cyA9IG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcIi4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9jc3MtbG9hZGVyL2xpYi9jc3MtYmFzZS5qc1wiKShmYWxzZSk7XG4vLyBpbXBvcnRzXG5cblxuLy8gbW9kdWxlXG5leHBvcnRzLnB1c2goW21vZHVsZS5pZCwgXCJcXG4uZ2xvZGFjdGl2ZXtcXG4gICBtYXJnaW4tbGVmdDogMTBweDtcXG4gICBtYXJnaW4tdG9wOiAxMHB4XFxufVxcbiAgLyogLmVsLXRhYnNfX2l0ZW17XFxuICAgICAgZm9udC1zaXplOiAyMHB4ICFpbXBvcnRhbnRcXG4gIH1cXG4gICN0YWItZmlyc3R7XFxuICAgICAgbWFyZ2luLWxlZnQ6IDM4MHB4ICFpbXBvcnRhbnRcXG4gIH0gKi9cXG4uZWwtdGFic19fYWN0aXZlLWJhcnsgICBcXG4gICAgICAvKiAvKiB6LWluZGV4Oi05OTkgIWltcG9ydGFudDsgKi9cXG4gICAgICAvKiBtYXJnaW4tbGVmdDogMzgwcHggIWltcG9ydGFudCAgKi9cXG59XFxuLmVsLXRhYmxle1xcbiAgICAvKiBtYXJnaW4tbGVmdDo0MHB4O1xcbiAgICBtYXJnaW4tdG9wOiAyMHB4OyAqL1xcbiAgICAvKiBib3JkZXItYm90dG9tOiAxcHggc29saWQgdHJhbnNwYXJlbnQ7XFxuICAgIGJvcmRlci1jb2xvcjogdHJhbnNwYXJlbnQ7ICovXFxufVxcblwiLCBcIlwiXSk7XG5cbi8vIGV4cG9ydHNcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&\n"); /***/ }), /***/ "./node_modules/vue-style-loader/index.js?!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&": /*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/vue-style-loader??ref--6-oneOf-1-0!./node_modules/css-loader??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css& ***! \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../../node_modules/css-loader??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./glodactive.vue?vue&type=style&index=0&lang=css& */ \"./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&\");\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"67ebd71a\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(true) {\n // When the styles change, update the <style> tags\n if(!content.locals) {\n module.hot.accept(/*! !../../../../node_modules/css-loader??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./glodactive.vue?vue&type=style&index=0&lang=css& */ \"./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&\", function() {\n var newContent = __webpack_require__(/*! !../../../../node_modules/css-loader??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./glodactive.vue?vue&type=style&index=0&lang=css& */ \"./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&\");\n if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];\n update(newContent);\n });\n }\n // When the module is disposed, remove the <style> tags\n module.hot.dispose(function() { update(); });\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVs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G1vZHVsZS5ob3QuZGlzcG9zZShmdW5jdGlvbigpIHsgdXBkYXRlKCk7IH0pO1xufSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/vue-style-loader/index.js?!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&\n"); /***/ }), /***/ "./src/views/glod/glod/glodactive.vue": /*!********************************************!*\ !*** ./src/views/glod/glod/glodactive.vue ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./glodactive.vue?vue&type=template&id=0cee753a& */ \"./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a&\");\n/* harmony import */ var _glodactive_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./glodactive.vue?vue&type=script&lang=js& */ \"./src/views/glod/glod/glodactive.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _glodactive_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./glodactive.vue?vue&type=style&index=0&lang=css& */ \"./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n _glodactive_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (true) {\n var api = __webpack_require__(/*! ./node_modules/vue-hot-reload-api/dist/index.js */ \"./node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"))\n if (api.compatible) {\n module.hot.accept()\n if (!module.hot.data) {\n api.createRecord('0cee753a', component.options)\n } else {\n api.reload('0cee753a', component.options)\n }\n module.hot.accept(/*! ./glodactive.vue?vue&type=template&id=0cee753a& */ \"./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a&\", function(__WEBPACK_OUTDATED_DEPENDENCIES__) { /* harmony import */ _glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./glodactive.vue?vue&type=template&id=0cee753a& */ \"./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a&\");\n(function () {\n api.rerender('0cee753a', {\n render: _glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n staticRenderFns: _glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]\n })\n })(__WEBPACK_OUTDATED_DEPENDENCIES__); })\n }\n}\ncomponent.options.__file = \"src/views/glod/glod/glodactive.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdmlld3MvZ2xvZC9nbG9kL2dsb2RhY3RpdmUudnVlLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vc3JjL3ZpZXdzL2dsb2QvZ2xvZC9nbG9kYWN0aXZlLnZ1ZT8zZWE3Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHJlbmRlciwgc3RhdGljUmVuZGVyRm5zIH0gZnJvbSBcIi4vZ2xvZGFjdGl2ZS52dWU/dnVlJnR5cGU9dGVtcGxhdGUmaWQ9MGNlZTc1M2EmXCJcbmltcG9ydCBzY3JpcHQgZnJvbSBcIi4vZ2xvZGFjdGl2ZS52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmXCJcbmV4cG9ydCAqIGZyb20gXCIuL2dsb2RhY3RpdmUudnVlP3Z1ZSZ0eXBlPXNjcmlwdCZsYW5nPWpzJlwiXG5pbXBvcnQgc3R5bGUwIGZyb20gXCIuL2dsb2RhY3RpdmUudnVlP3Z1ZSZ0eXBlPXN0eWxlJmluZGV4PTAmbGFuZz1jc3MmXCJcblxuXG4vKiBub3JtYWxpemUgY29tcG9uZW50ICovXG5pbXBvcnQgbm9ybWFsaXplciBmcm9tIFwiIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9ydW50aW1lL2NvbXBvbmVudE5vcm1hbGl6ZXIuanNcIlxudmFyIGNvbXBvbmVudCA9IG5vcm1hbGl6ZXIoXG4gIHNjcmlwdCxcbiAgcmVuZGVyLFxuICBzdGF0aWNSZW5kZXJGbnMsXG4gIGZhbHNlLFxuICBudWxsLFxuICBudWxsLFxuICBudWxsXG4gIFxuKVxuXG4vKiBob3QgcmVsb2FkICovXG5pZiA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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/views/glod/glod/glodactive.vue\n"); /***/ }), /***/ "./src/views/glod/glod/glodactive.vue?vue&type=script&lang=js&": /*!*********************************************************************!*\ !*** ./src/views/glod/glod/glodactive.vue?vue&type=script&lang=js& ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/babel-loader/lib!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./glodactive.vue?vue&type=script&lang=js& */ \"./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_cache_loader_dist_cjs_js_ref_12_0_node_modules_babel_loader_lib_index_js_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); //# source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b2RhY3RpdmUudnVlP3Z1ZSZ0eXBlPXNjcmlwdCZsYW5nPWpzJlwiIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/views/glod/glod/glodactive.vue?vue&type=script&lang=js&\n"); /***/ }), /***/ "./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&": /*!*****************************************************************************!*\ !*** ./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css& ***! \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-style-loader??ref--6-oneOf-1-0!../../../../node_modules/css-loader??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./glodactive.vue?vue&type=style&index=0&lang=css& */ \"./node_modules/vue-style-loader/index.js?!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_style_loader_index_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); //# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdmlld3MvZ2xvZC9nbG9kL2dsb2RhY3RpdmUudnVlP3Z1ZSZ0eXBlPXN0eWxlJmluZGV4PTAmbGFuZz1jc3MmLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vc3JjL3ZpZXdzL2dsb2QvZ2xvZC9nbG9kYWN0aXZlLnZ1ZT9kNjMxIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBtb2QgZnJvbSBcIi0hLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1zdHlsZS1sb2FkZXIvaW5kZXguanM/P3JlZi0tNi1vbmVPZi0xLTAhLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvaW5kZXguanM/P3JlZi0tNi1vbmVPZi0xLTEhLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2xvYWRlcnMvc3R5bGVQb3N0TG9hZGVyLmpzIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9wb3N0Y3NzLWxvYWRlci9zcmMvaW5kZXguanM/P3JlZi0tNi1vbmVPZi0xLTIhLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2NhY2hlLWxvYWRlci9kaXN0L2Nqcy5qcz8/cmVmLS0wLTAhLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2luZGV4LmpzPz92dWUtbG9hZGVyLW9wdGlvbnMhLi9nbG9kYWN0aXZlLnZ1ZT92dWUmdHlwZT1zdHlsZSZpbmRleD0wJmxhbmc9Y3NzJlwiOyBleHBvcnQgZGVmYXVsdCBtb2Q7IGV4cG9ydCAqIGZyb20gXCItIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtc3R5bGUtbG9hZGVyL2luZGV4LmpzPz9yZWYtLTYtb25lT2YtMS0wIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9jc3MtbG9hZGVyL2luZGV4LmpzPz9yZWYtLTYtb25lT2YtMS0xIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9sb2FkZXJzL3N0eWxlUG9zdExvYWRlci5qcyEuLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvcG9zdGNzcy1sb2FkZXIvc3JjL2luZGV4LmpzPz9yZWYtLTYtb25lT2YtMS0yIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9jYWNoZS1sb2FkZXIvZGlzdC9janMuanM/P3JlZi0tMC0wIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9pbmRleC5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vZ2xvZGFjdGl2ZS52dWU/dnVlJnR5cGU9c3R5bGUmaW5kZXg9MCZsYW5nPWNzcyZcIiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/views/glod/glod/glodactive.vue?vue&type=style&index=0&lang=css&\n"); /***/ }), /***/ "./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a&": /*!***************************************************************************!*\ !*** ./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a& ***! \***************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cache_loader_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_6891b663_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!cache-loader?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"6891b663-vue-loader-template\"}!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./glodactive.vue?vue&type=template&id=0cee753a& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"6891b663-vue-loader-template\\\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _cache_loader_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_6891b663_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _cache_loader_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_6891b663_vue_loader_template_node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_glodactive_vue_vue_type_template_id_0cee753a___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvdmlld3MvZ2xvZC9nbG9kL2dsb2RhY3RpdmUudnVlP3Z1ZSZ0eXBlPXRlbXBsYXRlJmlkPTBjZWU3NTNhJi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy92aWV3cy9nbG9kL2dsb2QvZ2xvZGFjdGl2ZS52dWU/ZjQxZiJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tIFwiLSFjYWNoZS1sb2FkZXI/e1xcXCJjYWNoZURpcmVjdG9yeVxcXCI6XFxcIm5vZGVfbW9kdWxlcy8uY2FjaGUvdnVlLWxvYWRlclxcXCIsXFxcImNhY2hlSWRlbnRpZmllclxcXCI6XFxcIjY4OTFiNjYzLXZ1ZS1sb2FkZXItdGVtcGxhdGVcXFwifSEuLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvbG9hZGVycy90ZW1wbGF0ZUxvYWRlci5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9jYWNoZS1sb2FkZXIvZGlzdC9janMuanM/P3JlZi0tMC0wIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9pbmRleC5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vZ2xvZGFjdGl2ZS52dWU/dnVlJnR5cGU9dGVtcGxhdGUmaWQ9MGNlZTc1M2EmXCIiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/views/glod/glod/glodactive.vue?vue&type=template&id=0cee753a&\n"); /***/ }) }]);
656.515464
20,602
0.774222
1a8697d4cc5c6e012650e5dcd0502127a8a0948f
3,203
js
JavaScript
etudes/watch_props.js
cjsequeira/creature
cf09257dae1f0d7ad80896fd1685a1f05e0cd07b
[ "MIT" ]
null
null
null
etudes/watch_props.js
cjsequeira/creature
cf09257dae1f0d7ad80896fd1685a1f05e0cd07b
[ "MIT" ]
5
2021-02-18T04:00:21.000Z
2021-04-18T17:03:27.000Z
etudes/watch_props.js
cjsequeira/creature
cf09257dae1f0d7ad80896fd1685a1f05e0cd07b
[ "MIT" ]
null
null
null
'use strict' // ****** Etude to experiment with watching changes on an object/property ****** // get the value at a nested property of an object // takes: // obj: the object to look at // prop: the nested property, as a string, e.g. 'nest1.nest2.property' // will also work with a non-nested property, e.g. 'toplevelproperty' // returns the value at the nested property - could be undefined const getNestedProp = (obj) => (prop) => prop.split('.').reduce( (accum_obj, this_prop) => accum_obj[this_prop], obj); // function to change some schtufffff const funcToDo = (x) => ({ ...x, me: 'BOOOOM!', layer2: { ...x.layer2, two1: 'faaaaake', } }); // function to apply given doFunc to obj and articulate whether props // changed after the application of doFunc // even works on nested properties! // takes: // before: object to apply to // doFunc: function to apply to object 'before' // ...props: list of props to watch // returns object, with added/updated property 'changes', containing // each watched prop and a boolean answering 'did this property change?' const watchProps = (beforeObj) => (doFunc) => (...props) => ( // anonymous function to build an object composed of: // 'afterObj': the doFunc(obj) result // a 'changes' property containing an object of given props and whether they changed (afterObj) => ({ ...afterObj, changes: Object.fromEntries( // build an array of properties, and compare the given 'before' object to // the 'after' object to see whether the listed properties // changed or not // true: property changed from 'before' to 'after' // false: property did not change from 'before' to 'after' props.flat(Infinity).reduce((accum, prop) => // build an array... [ ...accum, [ prop, (getNestedProp(beforeObj)(prop) === getNestedProp(afterObj)(prop)) ? false : true ] ], // ...starting with an empty array []) ), }) ) // apply doFunc to the given object and use the result as the "after" object // for comparing property changes against the given object (doFunc(beforeObj)) // *** Test code let myObj = { me: 'yes', you: 'no', that: 'what', layer2: { two1: 'up', two2: 'down', }, }; console.log('________________________________________ '); console.log(myObj); const watchedObj = watchProps (myObj) (funcToDo) (['me', 'that'], 'layer2.two1', 'layer2.two2', 'nope') console.log(watchedObj); console.log('*** Did \'me\' change? ' + watchedObj.changes['me']); console.log('*** Did \'that\' change? ' + watchedObj.changes['that']); console.log('*** Did \'layer2.two1\' change? ' + watchedObj.changes['layer2.two1']); console.log(' '); // outta here process.exit();
32.353535
94
0.556353
1a86e55ec49aa70f24f29ffb77f3b20193ab84d1
7,296
js
JavaScript
src/app/home/views/home.view.js
67775128/test
d1e4493a957fe9e6c1f823c25ecb2298b38523c3
[ "MIT" ]
null
null
null
src/app/home/views/home.view.js
67775128/test
d1e4493a957fe9e6c1f823c25ecb2298b38523c3
[ "MIT" ]
null
null
null
src/app/home/views/home.view.js
67775128/test
d1e4493a957fe9e6c1f823c25ecb2298b38523c3
[ "MIT" ]
null
null
null
// 依赖 // ---------------------- /*@require home:home.less*/ /*@require ui:button.less*/ /*@require home:mustHave.less*/ // Backbone var Backbone = require('backbone'); // 页面基类 var PageView = require('common:page.view'); var _ = require('underscore'); // 驱动视图 var DeviceView = require('home:device.view'); // 磁盘容量视图 var DiskView = require('home:disk.view'); var eventCenter = require('common:libs/eventCenter'); // CEF API var Dialog = require('ui:dialog.ui'); var cefAPI = require('common:libs/cefAPI'); var serverAPI = require('common:libs/serverAPI'); // 日志 var log = require('log'); // Tab切换 var tab = require('bootstrap:tab'); // 业务逻辑代码 // -------------------- var HomeViewCP = { CLASS: { iPad : 'i-screenshot-ipad', iPhone: 'i-screenshot-iphone', iPod : 'i-screenshot-ipod', iWatch: 'i-screenshot-iwatch' } }; // 首页 var HomeView = PageView.extend({ // 基本类名 className : 'i-home', // 初始化函数 initialize: function () { var me = this; // 屏幕截图 this.render(); this.initUI(); this.$('a.system-tab-must').on('show.bs.tab', _.bind(this.loadMustHaveHandler, this)); this.deviceView = new DeviceView({ el: this.$('.i-device') }); this.diskView = new DiskView({ el: this.$('.i-disk') }); // 已获取到设备信息 this.listenTo(cefAPI,cefAPI.appEvent.PlugIn,me.plugInHandler); // 检测磁盘容量 this.listenTo(cefAPI,cefAPI.appEvent.DiskinfoChange,me.diskInfoHandler); }, events: { 'click .confirm-name' : 'confirmDeviceName', 'click .edit-name' : 'editDeviceName', 'blur .device-name' : 'confirmDeviceName', 'click .mainmenu-genie' : 'iosIgenieInstall', 'click [data-toggle="tab"]': function (e) { e.preventDefault(); $(e.currentTarget).tab('show'); } }, ui: { $screenShot : '.i-screenshot', /*装机必备app*/ $mustAppList : '.must-have-app .must-have-app-list', $mustAppCount : '.must-have-app .app-count', /*装机必备Game*/ $mustGameList : '.must-have-game .must-have-game-list', $mustGameCount: '.must-have-game .game-count', $nameControl : '.i-name', $deviceName : '.i-name .device-name', $editButton : '.i-name .edit-name', $confirmButton: '.i-name .confirm-name' }, setScreenType: function (productType) { var CLASS = HomeViewCP.CLASS, $el = this.$screenShot; if (/^iphone/ig.test(productType)) { $el.addClass(CLASS.iPhone); $el.removeClass(CLASS.iPad); $el.removeClass(CLASS.iPod); } else if (/^ipad/ig.test(productType)) { $el.addClass(CLASS.iPad); $el.removeClass(CLASS.iPhone); $el.removeClass(CLASS.iPod); } else if (/^ipod/ig.test(productType)) { $el.addClass(CLASS.iPod); $el.removeClass(CLASS.iPhone); $el.removeClass(CLASS.iPad); } }, iosIgenieInstall:function() { var me = this; var dialog, tpl = __inline('../templates/igenieDialog.mustache'); if(cefAPI.isConnect()){ // 第一步 dialog = Dialog.getInstance().render({ title : 'iGenie for iOS', contentHTML : tpl({stepOne : true}) }).show(); var $repairFlash = dialog.$('.repair-flash'); $repairFlash.on('click', '.install-iGenie', function () { var IOSRouter = require('common:ios.router'); eventCenter.trigger(eventCenter.appInstallEvent.Import, [cefAPI.getProgramFiles()+'\\iGenie\\iGenieHelper.ipa']); var lang = IOSRouter.getPageInfo().language; IOSRouter.getInstance().navigate("lang/"+lang+"/task", true); }) } else{ dialog = Dialog.getInstance().render({ title : 'Notice', contentHTML : __inline('../../viewport/templates/connectTip.mustache') }).show(); } }, confirmDeviceName: function () { var me = this, newDeviceName = this.$deviceName.val(); if(this.$deviceName.attr('readonly')){ return; } cefAPI.deviceRename(newDeviceName, function (data) { me.displayDeviceName(); }); }, displayDeviceName: function () { this.$confirmButton.hide(); this.$editButton.show(); this.$deviceName.attr('readonly', true).removeClass('editing'); }, editDeviceName : function () { this.$editButton.hide(); this.$confirmButton.show(); this.$deviceName.attr('readonly', false).addClass('editing').focus(); }, showDeviceName : function (name) { this.$deviceName.val(name); }, loadMustHaveHandler: function (e) { var me = this, mustHaveTpl = __inline('../templates/mustHave.mustache'); // 回调函数 serverAPI.getHomeRecommendApps(function (data) { var html, list; if (data && data.ipaList && data.ipaList.length) { list = data.ipaList.slice(0, 4); html = mustHaveTpl({ data : list, // 获取Icon地址 getIconPath: function () { return serverAPI.getIconPath(this.iconPath); } }); me.$mustAppCount.text(list.length); me.$mustAppList.html(html); } }); serverAPI.getHomeRecommendGames(function (data) { var html, list; if (data && data.ipaList && data.ipaList.length) { list = data.ipaList.slice(0, 4); html = mustHaveTpl({ data : list, // 获取Icon地址 getIconPath: function () { return serverAPI.getIconPath(this.iconPath); } }); me.$mustGameCount.text(list.length); me.$mustGameList.html(html); } }) }, template : __inline('../templates/home.mustache'), plugInHandler : function(data){ var me = this, json, info, productType; me.deviceId = data[0]; if (data && data.length) { json = JSON.parse(data[1] || '{}'); info = json.info || {}; // 产品类型 productType = info.ProductType || ''; me.deviceView.model.set(me.deviceView.model.parse(info)); info && me.showDeviceName(info.DeviceName); me.setScreenType(productType); } }, diskInfoHandler : function(data){ data || (data = []); var me = this; if (data && data.length) { var json = JSON.parse(data[1] || '{}'); var info = me.diskView.model.parse(json.info); me.diskView.model.set(info); } }, render : function () { var html = this.template(); this.$el.html(html); } }); module.exports = HomeView;
32.140969
129
0.515625
1a8705cd599e1fec4cfdb6d03c53188414d76492
1,114
js
JavaScript
tasks/templates.js
glennreyes/gulp-boilerplate
170c11c04fec33d84d98ecccd4603b89d241543f
[ "MIT" ]
2
2016-05-29T16:22:22.000Z
2018-06-05T11:04:00.000Z
tasks/templates.js
glennreyes/gulp-boilerplate
170c11c04fec33d84d98ecccd4603b89d241543f
[ "MIT" ]
null
null
null
tasks/templates.js
glennreyes/gulp-boilerplate
170c11c04fec33d84d98ecccd4603b89d241543f
[ "MIT" ]
null
null
null
import gulp from 'gulp' import browserSync from 'browser-sync' import fs from 'fs' import handlebars from 'gulp-compile-handlebars' import plumber from 'gulp-plumber' import rename from 'gulp-rename' import util from 'gulp-util' import clean from './clean' const templates = () => { const DATA_GLOBAL = JSON.parse(fs.readFileSync('src/data/global.json')) const createTemplates = templateFile => { const DATA = JSON.parse(fs.readFileSync(`src/data/lang/${templateFile}`)) gulp.src('src/templates/*.hbs') .pipe(plumber()) .pipe(handlebars(Object.assign({}, DATA_GLOBAL, DATA), { ignorePartials: true, batch: ['src/templates'], helpers: { deep: text => text } })) .pipe(rename(path => { path.extname = '.html' })) .pipe(gulp.dest('.tmp' + DATA.pathname)) .pipe(browserSync.reload({stream: true})) .on('error', util.log) } fs.readdir('src/data/lang', (err, files) => { for (let i = 0; i < files.length; i++) { createTemplates(files[i]); } }) } gulp.task('templates', ['clean'], templates) export default templates
28.564103
77
0.637343
1a886f212f658155362b0a1f41c831ef9e8a65f5
252
js
JavaScript
src/mixins/scroll-behavior.js
Lance-Hu/vue-dev
949d74dee4c9079b21b513fa81a2a8ef44ad6c6d
[ "MIT" ]
null
null
null
src/mixins/scroll-behavior.js
Lance-Hu/vue-dev
949d74dee4c9079b21b513fa81a2a8ef44ad6c6d
[ "MIT" ]
null
null
null
src/mixins/scroll-behavior.js
Lance-Hu/vue-dev
949d74dee4c9079b21b513fa81a2a8ef44ad6c6d
[ "MIT" ]
null
null
null
export default { activated() { const scrollTop = this.$route.meta.scrollTop const $content = document.querySelector('.m-innerPanel-bd') // 自定义: pageView里的class if (scrollTop && $content) { $content.scrollTop = scrollTop } } }
25.2
87
0.654762
1a8913c61ee11f39b346d9291bac0e18405a56a4
853
js
JavaScript
src/screens/SignIn/index.js
NearFutureBand/react-native-saga-template
c122b7ac3bea5ef5a2bbdf3132c15296c467dab3
[ "MIT" ]
null
null
null
src/screens/SignIn/index.js
NearFutureBand/react-native-saga-template
c122b7ac3bea5ef5a2bbdf3132c15296c467dab3
[ "MIT" ]
2
2021-05-08T09:17:54.000Z
2021-05-10T17:39:41.000Z
src/screens/SignIn/index.js
NearFutureBand/react-native-saga-template
c122b7ac3bea5ef5a2bbdf3132c15296c467dab3
[ "MIT" ]
null
null
null
import React, {useEffect, useState} from 'react'; import {View, Text, StyleSheet, TextInput, Button} from 'react-native'; import {useDispatch} from 'react-redux'; import {loginRequest} from 'src/actions'; const Screen1 = ({navigation}) => { const dispatch = useDispatch(); const onDonePress = () => { dispatch(loginRequest({phone: '+112121221', password: 'xxxxx'})); }; return ( <View style={styles.wrapper}> <TextInput style={styles.input} /> <Button title="Done" onPress={onDonePress} /> </View> ); }; const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', }, wrapper: { flex: 1, justifyContent: 'center', alignItems: 'center', }, input: { width: '100%', height: 100, borderWidth: 1, borderColor: 'red', }, }); export default Screen1;
20.804878
71
0.621336
1a89366417d79e05179b799e168ccc8e0a35c37c
297
js
JavaScript
public/apis/printService.js
DaniloCorvus/inventario
7192fe2bf38299ae697a67d3bd13e062384b3b25
[ "MIT" ]
null
null
null
public/apis/printService.js
DaniloCorvus/inventario
7192fe2bf38299ae697a67d3bd13e062384b3b25
[ "MIT" ]
null
null
null
public/apis/printService.js
DaniloCorvus/inventario
7192fe2bf38299ae697a67d3bd13e062384b3b25
[ "MIT" ]
null
null
null
const showPrintService = (id) => { console.log('imprimiendo'); document.getElementById('formPrint').id.value = id $('#printerModal').modal('show') } const showPrintServiceDetails = (id) => { document.getElementById('formPrint').id.value = id $('#printerModal').modal('show') }
29.7
54
0.659933
1a89c3beaa528c486555c76b8547aaaae8905046
17,819
js
JavaScript
app/services/user.service.js
WesleyMarques/sc-server
8cd3a060c73a63251863f459eda29ccd89c6e73e
[ "MIT" ]
null
null
null
app/services/user.service.js
WesleyMarques/sc-server
8cd3a060c73a63251863f459eda29ccd89c6e73e
[ "MIT" ]
null
null
null
app/services/user.service.js
WesleyMarques/sc-server
8cd3a060c73a63251863f459eda29ccd89c6e73e
[ "MIT" ]
null
null
null
(function() { 'use strict'; var User = require('../models/user.model'); var nodemailer = require('../../node_modules/nodemailer'); var Transaction = require('../models/transaction.model'); exports.newUser = function(request, response) { console.log(request.body); var user = new User({ "fullname": request.body.fullname, "cpfcnpj": request.body.cpfcnpj, "email": request.body.email, "phone": request.body.phone, "login": request.body.login, "password": request.body.password }); user.save(function(error) { if (error) response.status(500).send(error); else response.status(200).send("user registered"); }); }; exports.getUsers = function(req, res, next) { User.find(function(err, users) { if (err) return next(err); res.json(users); }); }; exports.logUser = function(req, res, next) { User.find(function(err, users) { if (err) return next(err); else { var user; for (var i = 0; i < users.length; i++) { if (users[i].login == req.body.login) { if (users[i].password == req.body.password) { user = users[i]; user.id = user._id; res.status(200).send(user); return; } } } res.status(400).send("user not found"); } }); }; exports.sendinvoice = function(req, res, next) { var transporter = nodemailer.createTransport('smtps://inpayapp@gmail.com:1ngenico@smtp.gmail.com'); Transaction.find(function(err, transactions) { if (err) return next(err); else { var userTransaction; for (var i = 0; i < transactions.length; i++) { if (transactions[i]._id == req.body.transactionId) { userTransaction = transactions[i]; } } if (userTransaction) { send_invoice(userTransaction, req.body.userMail); } else res.status(400).send("Transactions not found"); } }); function send_invoice(userTransaction, userMail) { var mailOptions = { from: 'inpayappß@gmail.com', // sender address to: userMail, // list of receivers subject: 'Nota fiscal', // Subject line html: '<html><head></head><body><div style="padding-top: 8px; font-size:30px;background-color: #FFFFCC; margin-top: 5px; margin-left: 8px; text-align: center; height: 80%" >' + '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAABoCAYAAADPYH28AAAABmJLR0QA/wD/AP+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228QroHGDcNQYM5b2GtcHxnjuxW4Ghkz7zTegV2j9Q7j+2fgP0T1JJy1vXyOFrS42OEsnFvU5nVUITab8Cs5y4EUWpFzk7B7kOQcRjjJ4VU4W0vnofS7y9C+yk3NNCfgc8jq+wju7qjHUbLEz3E35mxDwQi34Fz/2S/WGmPbn4ymcCelS7Nbh6zw96CAjulIAg5GWsZgtGi61QzrMu5jPpK6D+HPQ2FiE+JAksLnfwItLE6VPjYY10qEdC0SwPYFnqiUaKU3CcySrWFZTBPGNdyKgjcgS/ipaHKNMq7fhSblYkTch1HWi98WHQlEpq8jiTwKTaxWpKrNN875T8JL4hiDJv0ktIf/DP587MXAQKSlTDOew25ofg4is8C0Iym3EpHhBfSs3yK/eO06wjUSmgu3nTAx+2KHhv8HbdnpOz7L6y8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTUtMDktMTVUMTQ6MDE6NDUtMDQ6MDAvcZZOAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE1LTA5LTE1VDE0OjAxOjQ2LTA0OjAwb8Q0bwAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII=">' + '<br><br> Operação:' + userTransaction.choice + '<br> Data: ' + new Date(userTransaction.transactionDate).toLocaleString() + '<br> Total: ' + userTransaction.amount/100 + '<br> Parcelas: ' + userTransaction.portionsNumber + '</div></body></html>' // html body }; transporter.sendMail(mailOptions, function(error, info) { if (error) { return console.log(error); } console.log('Message sent: ' + info.response); }); res.status(200).send(userMail); } }; exports.setPassword = function(req, res, next) { var transporter = nodemailer.createTransport('smtps://inpayapp@gmail.com:1ngenico@smtp.gmail.com'); User.find(function(err, users) { if (err) return next(err); else { var user; for (var i = 0; i < users.length; i++) { if (users[i].cpfcnpj == req.body.cpfcnpj) { user = users[i]; user.password = Math.floor((Math.random() * 10000)); save_user(user); return; } } res.status(400).send("user not found"); } }); function save_user(user) { return user.save(function(error) { if (error) res.status(500).send(error); else { var mailOptions = { from: 'inpayappß@gmail.com', // sender address to: user.email, // list of receivers subject: 'Recuperação de senha', // Subject line html: '<b>Olá ' + user.fullname + ', sua senha foi alterada para: ' + user.password + '</b>' // html body }; transporter.sendMail(mailOptions, function(error, info) { if (error) { return console.log(error); } console.log('Message sent: ' + info.response); }); res.status(200).send(user.email); } }); } }; exports.updateProfile = function(req, res, next) { User.find(function(err, users) { if (err) return next(err); else { var user; for (var i = 0; i < users.length; i++) { if (users[i]._id == req.body.id) { user = users[i]; if (req.body.fullname !== undefined) user.fullname = req.body.fullname; if (req.body.email !== undefined) user.email = req.body.email; if (req.body.phone !== undefined) user.phone = req.body.phone; save_user(user); return; } } res.status(400).send("user not found"); } }); function save_user(user) { return user.save(function(error) { if (error) res.status(500).send(error); else { res.status(200).send(user); } }); } }; }());
90.451777
11,963
0.786015
1a8acb385f6845d8df18e347a5ba74e57546f4d4
49
js
JavaScript
example.js
jonschlinkert/global-paths
a2c115f5703947c4bdde49dad9642fd7f66fd732
[ "MIT" ]
12
2015-07-15T06:41:30.000Z
2021-06-30T10:48:18.000Z
example.js
jonschlinkert/global-paths
a2c115f5703947c4bdde49dad9642fd7f66fd732
[ "MIT" ]
7
2016-11-25T06:24:25.000Z
2017-09-11T20:17:22.000Z
example.js
jonschlinkert/global-paths
a2c115f5703947c4bdde49dad9642fd7f66fd732
[ "MIT" ]
2
2016-11-25T06:01:18.000Z
2017-02-07T20:47:44.000Z
var paths = require('./'); console.log(paths())
12.25
26
0.612245
1a8af175e59c98464a8f067986e62a499bf0b6b0
1,420
js
JavaScript
lib/analyzer.js
jimmy-collazos/analyze-css-gulp
299728af531ecbbce3c83b380e10354f3dd5a3c6
[ "MIT" ]
null
null
null
lib/analyzer.js
jimmy-collazos/analyze-css-gulp
299728af531ecbbce3c83b380e10354f3dd5a3c6
[ "MIT" ]
null
null
null
lib/analyzer.js
jimmy-collazos/analyze-css-gulp
299728af531ecbbce3c83b380e10354f3dd5a3c6
[ "MIT" ]
null
null
null
const analyzerCss = require('analyze-css'); const fs = require('fs'); const path = require('path'); const utils = require('./utils'); module.exports = analyzer; function analyzer(file, options, callback) { let contents = String(file.contents); let analyzerCallback = options.outDiretory ? _analyzeAndSaveReport : _analyzeAndChangeContent; return new analyzerCss(contents, options, analyzerCallback); function _analyzeAndChangeContent(err, result) { file.contents = new Buffer(utils.stringify(result)); callback(null, file); } function _analyzeAndSaveReport(err, result) { if(err) throw err; if (utils.isObject(result.offenders)) { Object.keys(result.offenders).forEach(metricFilter, result.offenders); } fs.writeFile( buildOtDiretory(file, options.outDiretory), utils.stringify(result), err => { if(err) throw err; }); callback(null, file); } } function buildOtDiretory(fileOrigin, outDiretory) { let filename = path.basename(fileOrigin.path, '.css'); let filepath = path.join(outDiretory, filename + '.json'); return filepath; } function metricFilterMap(offender) { var position = offender.position && offender.position.start; return offender.message + (position ? ' @ ' + position.line + ':' + position.column : ''); } function metricFilter(metricName) { this[metricName] = this[metricName].map(metricFilterMap); };
29.583333
96
0.702113
1a8b372dfaa831d30b62ec2dca1bf98bdb6960de
392
js
JavaScript
resources/assets/spa/js/spa.js
claytongf/codefin
dd57fce84853b3ac11a458431f7062b7f887d7df
[ "MIT" ]
1
2017-10-22T14:36:28.000Z
2017-10-22T14:36:28.000Z
resources/assets/spa/js/spa.js
claytongf/codefin
dd57fce84853b3ac11a458431f7062b7f887d7df
[ "MIT" ]
null
null
null
resources/assets/spa/js/spa.js
claytongf/codefin
dd57fce84853b3ac11a458431f7062b7f887d7df
[ "MIT" ]
null
null
null
import LocalStorage from './services/localStorage'; import appConfig from './services/appConfig'; require('materialize-css'); window.Vue = require('vue'); require('vue-resource'); Vue.http.options.root = appConfig.api_url; require('./services/interceptors'); require('./router'); // LocalStorage.setObject('user', {name: 'Clayton', id: 2}); // console.log(LocalStorage.getObject('user'));
28
60
0.72449
1a8ba0ae8b4a63784424c85afe5a71106b3ce41f
4,355
js
JavaScript
web/src/pages/Login/index.js
fernandonetom/api-iot-iluminacao-public
c73a6ae2836ec61c36b9139f24e2bea8cf0c89c7
[ "MIT" ]
null
null
null
web/src/pages/Login/index.js
fernandonetom/api-iot-iluminacao-public
c73a6ae2836ec61c36b9139f24e2bea8cf0c89c7
[ "MIT" ]
null
null
null
web/src/pages/Login/index.js
fernandonetom/api-iot-iluminacao-public
c73a6ae2836ec61c36b9139f24e2bea8cf0c89c7
[ "MIT" ]
null
null
null
import React, { useContext, useState } from "react"; import { Container, LeftSection, RightSection, LogoSection, TextLoginType, LogoText, FormSection, FormInput, SubmitButtom, ForgotPass, ChangeLogin, ErrorBox, } from "./styles"; import Input from "../../components/Input"; import Checkbox from "../../components/Checkbox"; import LoginLogo from "../../assets/images/LoginLogo"; import { Context } from "../../Context/AuthContext"; import GlobalLoading from "../../components/GlobalLoading"; import { Formik } from "formik"; import { loginSchema } from "../../utils/validations"; export default function Login({ loginType }) { const { handleLogin, authLoading } = useContext(Context); const [remember, setRemember] = useState(false); return ( <> {authLoading && <GlobalLoading />} <Container> <LeftSection loginType={loginType}> <LogoSection loginType={loginType}> <LoginLogo /> <LogoText>Sistema de Iluminação Pública Inteligente</LogoText> </LogoSection> <TextLoginType loginType={loginType}> {loginType === "users" ? "usuário" : "organização"} </TextLoginType> </LeftSection> <RightSection> <FormSection> <Formik initialValues={{ email: "", password: "" }} validationSchema={loginSchema} onSubmit={async (values, form) => { form.setFieldError("response", null); const response = await handleLogin({ loginType, email: values.email, password: values.password, remember, }); if (response && response.error) { form.setFieldError("response", response.message); } }} > {({ values, errors, touched, handleChange, handleBlur, handleSubmit, isSubmitting, /* and other goodies */ }) => ( <form onSubmit={handleSubmit}> {errors.response && <ErrorBox>{errors.response}</ErrorBox>} <FormInput> <Input type="email" name="email" label="Email" width="100%" onChange={handleChange} onBlur={handleBlur} value={values.email} error={errors.email} /> </FormInput> {errors.email && touched.email && ( <ErrorBox>{errors.email}</ErrorBox> )} <FormInput> <Input type="password" name="password" label="Senha" width="100%" onChange={handleChange} onBlur={handleBlur} value={values.password} error={errors.password} /> </FormInput> {errors.password && touched.password && ( <ErrorBox>{errors.password}</ErrorBox> )} <FormInput> <Checkbox label="lembrar-me" onChange={(e) => setRemember(e.target.checked)} /> </FormInput> <SubmitButtom type="submit" disabled={isSubmitting} loginType={loginType} > {isSubmitting ? "aguarde" : "acessar"} </SubmitButtom> <ForgotPass to="#">esqueci minha senha</ForgotPass> </form> )} </Formik> </FormSection> <ChangeLogin to={loginType === "users" ? "/organizations/login" : "/login"} logintype={loginType} > acessar como {loginType === "users" ? "organização" : "usuário"} </ChangeLogin> </RightSection> </Container> </> ); }
34.023438
77
0.453961
1a8ea5c137cc471d86a9554d787fdb242aa6544f
489
js
JavaScript
packages/@mdpress/core/lib/client/components/Content.js
docschina/mdpress
d75662e7283e35883630e0991611480964a5d6e3
[ "MIT" ]
8
2021-01-28T02:35:26.000Z
2021-11-09T10:43:13.000Z
packages/@mdpress/core/lib/client/components/Content.js
docschina/mdpress
d75662e7283e35883630e0991611480964a5d6e3
[ "MIT" ]
2
2021-05-05T11:54:37.000Z
2021-05-16T09:05:42.000Z
packages/@mdpress/core/lib/client/components/Content.js
docschina/mdpress
d75662e7283e35883630e0991611480964a5d6e3
[ "MIT" ]
null
null
null
import React from 'react'; import useData from '../hooks/data'; import pages from '@internal/page-components'; import { setGlobalInfo } from '@app/util'; import '../style/content.styl'; export default function Content(props) { const { $page } = useData(); const { pageKey = $page.key,className,slotKey = 'default' } = props; setGlobalInfo('pageKey', pageKey); const Component = pages[pageKey] || (() => null); // return <Component className={className} slotKey={slotKey}/>; }
32.6
70
0.685072
1a8f6c6753ede16aef8f9266083a4a5ce353abb6
1,296
js
JavaScript
src/screens/Perfil/styles.js
ouvidor/mobile
e48531bd6ec71bee3397223626541e5e5ede5dcd
[ "MIT" ]
null
null
null
src/screens/Perfil/styles.js
ouvidor/mobile
e48531bd6ec71bee3397223626541e5e5ede5dcd
[ "MIT" ]
1
2021-05-11T01:05:19.000Z
2021-05-11T01:05:19.000Z
src/screens/Perfil/styles.js
ouvidor/mobile
e48531bd6ec71bee3397223626541e5e5ede5dcd
[ "MIT" ]
null
null
null
/* eslint-disable react/prop-types */ import styled from 'styled-components'; import colors from '../../utils/colors'; import { Text } from '../../components'; const { globalColors } = colors; export const OuterContainer = styled.View` padding: 10px; flex: 1; justify-content: space-between; `; export const Title = styled.Text` font-family: 'OpenSans-ExtraBold'; font-size: 46px; `; export const Label = styled(Text)` font-family: 'OpenSans-Regular'; font-size: 18px; margin-top: 20px; `; export const StyledText = styled(Text)` font-family: 'OpenSans-Regular'; font-size: 24px; `; export const ContainerFilter = styled.View` flex-direction: row; justify-content: space-around; `; export const ButtonFilter = styled.TouchableOpacity` flex: 1; height: 40px; padding: 20px; margin: 20px; align-items: center; justify-content: center; padding: 20px; background-color: ${globalColors.primaryColor}; border-radius: 5px; border: 5px solid ${props => props.selected === props.id ? colors.LightBlue : globalColors.primaryColor}; `; export const TextFilter = styled.Text` color: #fff; font-weight: bold; font-size: 18px; `; export const Empty = styled.Text` align-self: center; margin: 10px; font-size: 18px; `;
20.25
52
0.682099
1a8fb0fbbdf445c1d64e8fb20d6f38d8ff5abf1c
1,276
js
JavaScript
source/app/components/_common/production/exception-handler.decorator.spec.js
yperevoznikov/angular1-webpack-starter
4ae184eedc9761064dc475093e86a6f7d80c6b58
[ "MIT" ]
176
2015-11-27T01:40:13.000Z
2020-09-23T20:33:46.000Z
source/app/components/_common/production/exception-handler.decorator.spec.js
yperevoznikov/angular1-webpack-starter
4ae184eedc9761064dc475093e86a6f7d80c6b58
[ "MIT" ]
19
2015-10-14T13:49:15.000Z
2017-08-23T12:58:10.000Z
source/app/components/_common/production/exception-handler.decorator.spec.js
yperevoznikov/angular1-webpack-starter
4ae184eedc9761064dc475093e86a6f7d80c6b58
[ "MIT" ]
64
2016-03-21T03:39:19.000Z
2019-07-18T01:32:53.000Z
import exceptionHandlerDecorator from './exception-handler.decorator'; describe('ExceptionHandler Decorator', () => { let Logger; let $timeout; // module defination, module load beforeEach(() => { angular.module('test', []) .config(($provide) => { $provide.decorator('$exceptionHandler', exceptionHandlerDecorator); }); angular.mock.module('test'); }); // mock dependences beforeEach(() => { angular.mock.module(($provide) => { $provide.value('Logger', jasmine.createSpyObj('Logger', ['error'])); }); }); // inject dependences beforeEach(() => { angular.mock.inject((_Logger_, _$timeout_) => { Logger = _Logger_; $timeout = _$timeout_; }); }); it('should call Logger.error when error happens', () => { const prefix = '[Aio Angular App Error]'; // try to throw a error const error = new Error('exception'); $timeout(() => { throw error; }); $timeout.flush(); expect(Logger.error).toHaveBeenCalledWith(`${prefix} exception`, { exception: error, cause: undefined // eslint-disable-line }); }); });
28.355556
83
0.533699
1a906d2dad347c53519ddcec3bad209eff1451d8
773
js
JavaScript
client/src/app/components/tvSeason/factory.js
GuiNaud/waww
080cfa389e6ad4eb8d85509ddc34213929448fc0
[ "MIT" ]
null
null
null
client/src/app/components/tvSeason/factory.js
GuiNaud/waww
080cfa389e6ad4eb8d85509ddc34213929448fc0
[ "MIT" ]
null
null
null
client/src/app/components/tvSeason/factory.js
GuiNaud/waww
080cfa389e6ad4eb8d85509ddc34213929448fc0
[ "MIT" ]
null
null
null
(function() { 'use strict'; function TvSeasonService($http, $log) { var service = {}; service.seasontv = []; var key = 'bb7f1b623e15f1c323072c6f2c7c8a2d'; service.getOneSeason = function(tvID, season){ return $http.get('http://api.themoviedb.org/3/tv/' + tvID + '/season/' + season,{ params: { api_key: key } }) .success(function(data){ service.seasontv = data; }) .error(function(data){ console.log(data); }); }; return service; } angular.module('service.seasontv', []).factory('TvSeasonService', TvSeasonService); })();
24.935484
93
0.468305
1a915f327ce736c5bd0958c766b9835c27c38193
799
js
JavaScript
js/components/oppfolgingsplan/arbeidsoppgaver/ArbeidsoppgaverInfoboks.js
navikt/oppfolgingsplan
0d94537f1b1f0571b3da4e43e36b069a75b0139c
[ "MIT" ]
null
null
null
js/components/oppfolgingsplan/arbeidsoppgaver/ArbeidsoppgaverInfoboks.js
navikt/oppfolgingsplan
0d94537f1b1f0571b3da4e43e36b069a75b0139c
[ "MIT" ]
37
2020-07-07T10:29:54.000Z
2021-09-29T07:00:09.000Z
js/components/oppfolgingsdialog/utfylling/arbeidsoppgaver/ArbeidsoppgaverInfoboks.js
navikt/oppfolgingsplanarbeidsgiver
bd4665a62b5c365ff283be0165e7e67acbd86baf
[ "MIT" ]
null
null
null
import React from 'react'; import PropTypes from 'prop-types'; import { Knapp } from 'nav-frontend-knapper'; const tekster = { knapp: '+ Legg til ny arbeidsoppgave', }; const ArbeidsoppgaverInfoboks = ({ children, tittel, visSkjema, toggleSkjema }) => { return ( <div className="arbeidsoppgaverInfoboks"> <h3>{tittel}</h3> {children} {!visSkjema && ( <Knapp mini onClick={() => { toggleSkjema(); }} > {tekster.knapp} </Knapp> )} </div> ); }; ArbeidsoppgaverInfoboks.propTypes = { children: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), tittel: PropTypes.string, visSkjema: PropTypes.bool, toggleSkjema: PropTypes.func, }; export default ArbeidsoppgaverInfoboks;
22.194444
84
0.613267
1a9199f781b67931be859ad81f6071b47816dcc7
979
js
JavaScript
web/gatsby-config.js
kmelve/lisemdressage
7d135dc2c8867bbd3f9dfed261b3ef30a28e1576
[ "CECILL-B" ]
null
null
null
web/gatsby-config.js
kmelve/lisemdressage
7d135dc2c8867bbd3f9dfed261b3ef30a28e1576
[ "CECILL-B" ]
42
2019-06-09T13:13:32.000Z
2022-02-26T09:31:31.000Z
web/gatsby-config.js
kmelve/lisemdressage
7d135dc2c8867bbd3f9dfed261b3ef30a28e1576
[ "CECILL-B" ]
null
null
null
const { api: { projectId, dataset } } = require('../studio/sanity.json') require('dotenv').config() module.exports = { siteMetadata: { siteUrl: `https://www.lisemdressage.no` }, plugins: [ 'gatsby-plugin-postcss', 'gatsby-plugin-react-helmet', `gatsby-plugin-sitemap`, { resolve: `gatsby-plugin-google-analytics`, options: { trackingId: 'UA-133124493-1', // Puts tracking script in the head instead of the body head: true, // Setting this parameter is optional anonymize: true, // Setting this parameter is also optional respectDNT: true } }, { resolve: 'gatsby-source-sanity', options: { projectId, dataset, // To enable preview of drafts, copy .env-example into .env, // and add a token with read permissions token: process.env.SANITY_TOKEN, watchMode: true, overlayDrafts: true } } ] }
25.102564
72
0.586313
1a91b4f9fe16db860ffb36b21f70cd298fb7ff30
724
js
JavaScript
plugins/hangang.js
ChalkPE/welcomes
6703e2e8a0e01a72dd6bea606195c806b0b1be17
[ "MIT" ]
5
2017-05-29T09:58:41.000Z
2021-02-21T19:56:57.000Z
plugins/hangang.js
ChalkPE/welcomes
6703e2e8a0e01a72dd6bea606195c806b0b1be17
[ "MIT" ]
null
null
null
plugins/hangang.js
ChalkPE/welcomes
6703e2e8a0e01a72dd6bea606195c806b0b1be17
[ "MIT" ]
null
null
null
const axios = require('axios') const defaultServer = 'http://hangang.dkserver.wo.tc' // 섭씨 20도 이상이면 초록, 10도 이상이면 청록, 그 아래는 파랑 const waterColour = t => t >= 20 ? 'green' : t >= 10 ? 'cyan' : 'blue' module.exports = async argv => { const options = { method: 'get', timeout: argv.timeout || 0, url: argv.my.server || defaultServer } let { data } = await axios(options) if (!(typeof data === 'object' && 'temp' in data)) return {} const temp = parseFloat(data.temp) const powerline = { style: argv.my.style, color: waterColour(temp), fgColor: argv.my.fgColor || 'black', message: `${argv.my.icon || '🌡'} ${temp}°C` } return { powerline } } module.exports.pluginName = 'hangang'
24.965517
70
0.610497
1a92b91aaa7f5414cca93a6ac4659589d99a59ef
31,497
js
JavaScript
app/Main.js
Esri/3d-viewer
fb0dd215fbd89b776df6a47478e2e01002b1228f
[ "Apache-2.0" ]
2
2021-03-04T14:30:50.000Z
2021-11-08T05:00:35.000Z
app/Main.js
Esri/3d-viewer
fb0dd215fbd89b776df6a47478e2e01002b1228f
[ "Apache-2.0" ]
1
2021-01-19T17:10:54.000Z
2021-01-19T17:27:58.000Z
app/Main.js
Esri/3d-viewer
fb0dd215fbd89b776df6a47478e2e01002b1228f
[ "Apache-2.0" ]
3
2021-03-20T00:26:32.000Z
2021-07-22T23:17:02.000Z
// Copyright 2020 Esri // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.​ define(["require", "exports", "tslib", ".//components/Alert", "ApplicationBase/support/itemUtils", "ApplicationBase/support/domHelper", "esri/core/Handles", "./ConfigurationSettings", "esri/core/watchUtils", "esri/core/promiseUtils", "./telemetry/telemetry", "./utils/esriWidgetUtils"], function (require, exports, tslib_1, Alert_1, itemUtils_1, domHelper_1, Handles_1, ConfigurationSettings_1, watchUtils_1, promiseUtils_1, telemetry_1, esriWidgetUtils_1) { "use strict"; Alert_1 = tslib_1.__importDefault(Alert_1); Handles_1 = tslib_1.__importDefault(Handles_1); ConfigurationSettings_1 = tslib_1.__importDefault(ConfigurationSettings_1); telemetry_1 = tslib_1.__importDefault(telemetry_1); var CSS = { loading: "configurable-application--loading" }; var MapExample = /** @class */ (function () { function MapExample() { //-------------------------------------------------------------------------- // // Properties // //-------------------------------------------------------------------------- //---------------------------------- // ApplicationBase //---------------------------------- this.base = null; this._telemetry = null; this._appConfig = null; this._handles = null; this._hoverHandler = null; this._header = null; this._initialExtent = null; //-------------------------------------------------------------------------- // // Public Methods // //-------------------------------------------------------------------------- this.ovMap = null; } MapExample.prototype.init = function (base) { if (!base) { console.error("ApplicationBase is not defined"); return; } this._handles = new Handles_1.default(); domHelper_1.setPageLocale(base.locale); domHelper_1.setPageDirection(base.direction); this.base = base; this.createApp(); document.body.classList.remove(CSS.loading); }; MapExample.prototype.createApp = function () { var _a; return tslib_1.__awaiter(this, void 0, void 0, function () { var _b, config, results, webSceneItems, validWebSceneItems, item, portalItem, appProxies, viewContainerNode, defaultViewProperties, viewNode, container, viewProperties, _c, websceneTransparentBackground, websceneBackgroundColor, map, view, widgetProps; var _this = this; return tslib_1.__generator(this, function (_d) { switch (_d.label) { case 0: _b = this.base, config = _b.config, results = _b.results; this._appConfig = new ConfigurationSettings_1.default(config); this._handleTelemetry(); this._handles.add([ watchUtils_1.init(this._appConfig, "customCSS", function () { return _this._handleCustomCSS(); }) ]); this._handleCustomCSS(); webSceneItems = results.webSceneItems; validWebSceneItems = webSceneItems.map(function (response) { return response.value; }); item = validWebSceneItems[0]; if (!item) { console.error("Could not load an item to display"); return [2 /*return*/]; } config.title = !config.title ? itemUtils_1.getItemTitle(item) : ""; domHelper_1.setPageTitle(config.title); this._handles.add(watchUtils_1.init(this._appConfig, "theme", function () { var theme = _this._appConfig.theme; var style = document.getElementById("esri-stylesheet"); style.href = style.href.indexOf("light") !== -1 ? style.href.replace(/light/g, theme) : style.href.replace(/dark/g, theme); if (theme === "light") { document.body.classList.remove("dark"); document.body.classList.add("light"); } else { document.body.classList.remove("light"); document.body.classList.add("dark"); } }), "configuration"); portalItem = this.base.results.applicationItem .value; appProxies = portalItem && portalItem.applicationProxies ? portalItem.applicationProxies : null; viewContainerNode = document.getElementById("viewContainer"); defaultViewProperties = itemUtils_1.getConfigViewProperties(config); viewNode = document.createElement("div"); viewContainerNode.appendChild(viewNode); container = { container: viewNode }; viewProperties = tslib_1.__assign(tslib_1.__assign({}, defaultViewProperties), container); _c = this._appConfig, websceneTransparentBackground = _c.websceneTransparentBackground, websceneBackgroundColor = _c.websceneBackgroundColor; if (websceneTransparentBackground && websceneBackgroundColor) { viewProperties.alphaCompositingEnabled = true; viewProperties.environment = { background: { type: "color", color: websceneBackgroundColor }, starsEnabled: false, atmosphereEnabled: false }; } return [4 /*yield*/, itemUtils_1.createMapFromItem({ item: item, appProxies: appProxies })]; case 1: map = _d.sent(); map.set({ ground: "world-elevation" }); return [4 /*yield*/, itemUtils_1.createView(tslib_1.__assign(tslib_1.__assign({}, viewProperties), { map: map }))]; case 2: view = _d.sent(); this._setupUrlParams(view); return [4 /*yield*/, view.when()]; case 3: _d.sent(); widgetProps = { view: view, config: this._appConfig, portal: this.base.portal, telemetry: this._telemetry }; this._initialExtent = (_a = view === null || view === void 0 ? void 0 : view.extent) === null || _a === void 0 ? void 0 : _a.clone(); this._handles.add([ watchUtils_1.init(this._appConfig, "customHeader, customHeaderPositionedAtBottom, customHeaderHTML", function (newValue, oldValue, propertyName) { _this._addHeader(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "basemapToggle, basemapTogglePosition, nextBasemap, basemapSelector", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addBasemap(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "disableScroll", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addOverlay(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "screenshot, screenshotPosition", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addScreenshot(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "search, searchOpenAtStart,extentSelector,extentSelectorConfig, searchPosition,searchConfiguration", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addSearch(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "home, homePosition", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addHome(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "slice, slicePosition,sliceOpenAtStart", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addSlice(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "mapZoom, mapZoomPosition", function (newValue, oldValue, propertyName) { // Check to see if zoom is already in components list if so remove it if (propertyName === "mapZoom" && newValue === true && view.ui.components.indexOf("zoom") !== -1) { view.ui.remove("zoom"); } ; esriWidgetUtils_1.addZoom(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "share, sharePosition, theme", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addShare(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, ["legend", "legendOpenAtStart", "legendPosition", "legendConfig"], function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addLegend(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, ["layerList", "layerListOpenAtStart", "layerListPosition", "layerListIncludeTable"], function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addLayerList(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, ["measure", "measureOpenAtStart", "measurePosition"], function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addMeasurement(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, ["lineOfSight", "lineOfSightPosition", "lineOfSightOpenAtStart"], function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addLineOfSight(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, ["daylight", "daylightPosition", "daylightDateOrSeason", "daylightDate", "daylightOpenAtStart"], function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addDaylight(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, ["splash", "splashFullScreen", "splashButtonPosition", "splashButtonText", "info", "detailsOpenAtStart"], function (newValue, oldValue, propertyName) { var props = tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName }); var _a = _this._appConfig, info = _a.info, splash = _a.splash; if (!info && !splash) { return; } if (info && splash) { _this._appConfig.splash = false; } else { _this._appConfig.splash = !info; _this._appConfig.info = !splash; } _this._appConfig.info ? esriWidgetUtils_1.addInfo(props) : esriWidgetUtils_1.addSplash(props); }), watchUtils_1.init(this._appConfig, "fullScreen,fullScreenPosition", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addFullscreen(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, "slides, slidesPosition", function (newValue, oldValue, propertyName) { esriWidgetUtils_1.addBookmarks(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, ["insetOverviewMap", "insetOverviewMapPosition", "insetOverviewMapMarkerStyle", "insetOverviewMapOpenAtStart", "insetOverviewMapBasemap", "insetOverviewSplitDirection"], function (newValue, oldValue, propertyName) { _this._addOverviewMap(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }), watchUtils_1.init(this._appConfig, ["popupHover", "popupHoverType", "popupHoverPosition", "popupHoverFixed"], function (newValue, oldValue, propertyName) { _this._addPopupHover(tslib_1.__assign(tslib_1.__assign({}, widgetProps), { propertyName: propertyName })); }) ], "configuration"); // Clean up configuration handles if we are // hosted if (this.base.settings.environment.isEsri) { this._cleanUpHandles(); } return [2 /*return*/]; } }); }); }; MapExample.prototype._setupUrlParams = function (view) { var _a = this.base.config, find = _a.find, marker = _a.marker; itemUtils_1.findQuery(find, view); itemUtils_1.goToMarker(marker, view); }; MapExample.prototype._cleanUpHandles = function () { // if we aren't in the config experience remove all handlers after load if (!this._appConfig.withinConfigurationExperience) { this._handles.remove("configuration"); } }; MapExample.prototype._addHeader = function (props) { return tslib_1.__awaiter(this, void 0, void 0, function () { var propertyName, _a, customHeader, customHeaderPositionedAtBottom, node, Header, viewContainer; return tslib_1.__generator(this, function (_b) { switch (_b.label) { case 0: propertyName = props.propertyName; _a = this._appConfig, customHeader = _a.customHeader, customHeaderPositionedAtBottom = _a.customHeaderPositionedAtBottom; node = document.getElementById("header"); if (!customHeader) { if (node) node.classList.add("hide"); return [2 /*return*/]; } else { node.classList.remove('hide'); } return [4 /*yield*/, new Promise(function (resolve_1, reject_1) { require(["./components/Header"], resolve_1, reject_1); }).then(tslib_1.__importStar)]; case 1: Header = _b.sent(); if (propertyName === "customHeader" && node && !this._header) { this._header = new Header.default({ config: this._appConfig, portal: this.base.portal, container: node }); } if (propertyName === "customHeaderPositionedAtBottom" && node) { viewContainer = document.getElementById("splitContainer"); customHeaderPositionedAtBottom ? document.body.insertBefore(node, viewContainer === null || viewContainer === void 0 ? void 0 : viewContainer.nextSibling) : document.body.insertBefore(node, viewContainer); } return [2 /*return*/]; } }); }); }; MapExample.prototype._openPopup = function (props, e) { var view = props.view; view.popup.open({ updateLocationEnabled: false, location: view.toMap(e), fetchFeatures: true }); }; MapExample.prototype._addPopupHover = function (props) { var _a, _b, _c, _d, _e, _f, _g, _h, _j; return tslib_1.__awaiter(this, void 0, void 0, function () { var view, config, popupHover, _k, popupHoverFixed, popupHoverPosition, click, mostRecentScreenPointStr; var _this = this; return tslib_1.__generator(this, function (_l) { view = props.view, config = props.config; popupHover = config.popupHover; // Clean up this._handles.remove("popupHover"); view.popup.close(); (_c = (_b = (_a = view.popup) === null || _a === void 0 ? void 0 : _a.container) === null || _b === void 0 ? void 0 : _b.classList) === null || _c === void 0 ? void 0 : _c.remove("popup-fixed"); if (!popupHover || this._isMobile()) { if (view.popup) { view.popup.autoOpenEnabled = true; } // disable popup hover and return return [2 /*return*/]; } _k = this._appConfig, popupHoverFixed = _k.popupHoverFixed, popupHoverPosition = _k.popupHoverPosition; (popupHoverFixed) ? (_f = (_e = (_d = view.popup) === null || _d === void 0 ? void 0 : _d.container) === null || _e === void 0 ? void 0 : _e.classList) === null || _f === void 0 ? void 0 : _f.add("popup-fixed") : (_j = (_h = (_g = view.popup) === null || _g === void 0 ? void 0 : _g.container) === null || _h === void 0 ? void 0 : _h.classList) === null || _j === void 0 ? void 0 : _j.remove("popup-fixed"); view.popup.visibleElements = { featureNavigation: true }; view.popup.spinnerEnabled = false; view.popup.autoOpenEnabled = false; view.popup.defaultPopupTemplateEnabled = true; view.popup.dockEnabled = popupHoverFixed ? true : false; view.popup.dockOptions = { buttonEnabled: popupHoverFixed ? false : true, position: popupHoverFixed ? popupHoverPosition : "auto" }; click = false; this._handles.add(view.on("click", function () { view.popup.autoOpenEnabled = true; click = true; watchUtils_1.whenFalseOnce(view.popup, "visible", function () { view.popup.autoOpenEnabled = false; click = false; }); }), "popupHover"); this._handles.add(view.on("pointer-move", function (e) { var currScreenPointStr = e.x + "_" + e.y; mostRecentScreenPointStr = currScreenPointStr; if (e === null || e === void 0 ? void 0 : e.error) { return; } if (!click) { setTimeout(function () { if (currScreenPointStr === mostRecentScreenPointStr) { _this._openPopup(props, e); } }, 100); } }), "popupHover"); return [2 /*return*/]; }); }); }; MapExample.prototype.createTelemetry = function () { var _a, _b, _c; return tslib_1.__awaiter(this, void 0, void 0, function () { var portal, appName, _d; return tslib_1.__generator(this, function (_e) { switch (_e.label) { case 0: portal = this.base.portal; appName = (_b = (_a = this.base.config) === null || _a === void 0 ? void 0 : _a.telemetry) === null || _b === void 0 ? void 0 : _b.name; _d = this; return [4 /*yield*/, telemetry_1.default.init({ portal: portal, config: this._appConfig, appName: appName })]; case 1: _d._telemetry = _e.sent(); (_c = this._telemetry) === null || _c === void 0 ? void 0 : _c.logPageView(); return [2 /*return*/]; } }); }); }; MapExample.prototype._handleTelemetry = function () { var _this = this; // Wait until both are defined promiseUtils_1.eachAlways([watchUtils_1.whenDefinedOnce(this._appConfig, "googleAnalytics"), watchUtils_1.whenDefinedOnce(this._appConfig, "googleAnalyticsKey"), watchUtils_1.whenDefinedOnce(this._appConfig, "googleAnalyticsConsentMsg"), watchUtils_1.whenDefinedOnce(this._appConfig, "googleAnalyticsConsent")]).then(function () { var alertContainer = document.createElement("container"); document.body.appendChild(alertContainer); new Alert_1.default({ config: _this._appConfig, container: alertContainer }); _this.createTelemetry(); _this._handles.add([ watchUtils_1.watch(_this._appConfig, ["googleAnalytics", "googleAnalyticsConsent", "googleAnalyticsConsentMsg", "googleAnalyticsKey"], function (newValue, oldValue, propertyName) { _this.createTelemetry(); }) ]); }); }; MapExample.prototype._handleCustomCSS = function () { var customStylesheet = document.getElementById("customCSS"); if (customStylesheet) customStylesheet.remove(); if (!this._appConfig.customCSS || this._appConfig.customCSS === "") return; var customStyle = document.createElement("style"); customStyle.id = "customCSS"; customStyle.type = "text/css"; customStyle.appendChild(document.createTextNode(this._appConfig.customCSS)); document.head.appendChild(customStyle); }; MapExample.prototype._isMobile = function () { return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) ? true : false; }; MapExample.prototype._addOverviewMap = function (props) { var _a, _b, _c; return tslib_1.__awaiter(this, void 0, void 0, function () { var view, config, propertyName, insetOverviewMapPosition, insetOverviewMap, insetOverviewSplitDirection, insetOverviewMapBasemap, insetOverviewMapOpenAtStart, insetOverviewMapMarkerStyle, node, nodes, OverviewMap, container, insetExpand; return tslib_1.__generator(this, function (_d) { switch (_d.label) { case 0: view = props.view, config = props.config, propertyName = props.propertyName; insetOverviewMapPosition = config.insetOverviewMapPosition, insetOverviewMap = config.insetOverviewMap, insetOverviewSplitDirection = config.insetOverviewSplitDirection, insetOverviewMapBasemap = config.insetOverviewMapBasemap, insetOverviewMapOpenAtStart = config.insetOverviewMapOpenAtStart, insetOverviewMapMarkerStyle = config.insetOverviewMapMarkerStyle; node = view.ui.find("expand-overview"); if (!insetOverviewMap) { // move the container back to the main and then remove expand // node if ((_a = this.ovMap) === null || _a === void 0 ? void 0 : _a.splitter) { this.ovMap.splitter.destroy(); } if (node) view.ui.remove(node); nodes = Array.from(document.getElementsByClassName("overview-map")); nodes.forEach(function (element) { element.remove(); }); return [2 /*return*/]; } return [4 /*yield*/, new Promise(function (resolve_2, reject_2) { require(["./components/InsetMap"], resolve_2, reject_2); }).then(tslib_1.__importStar)]; case 1: OverviewMap = _d.sent(); container = document.getElementById("splitContainer"); if (insetOverviewSplitDirection === "vertical") { container.classList.remove("direction-horizontal"); container === null || container === void 0 ? void 0 : container.classList.add("direction-vertical"); } else { container.classList.add("direction-horizontal"); (_b = container === null || container === void 0 ? void 0 : container.classList) === null || _b === void 0 ? void 0 : _b.remove("direction-vertical"); } if (propertyName === "insetOverviewMap" && !node) { this.ovMap = new OverviewMap.default(props); this.ovMap.id = "overview-map"; view.ui.add(this.ovMap, insetOverviewMapPosition); } if (propertyName === "insetOverviewMapPosition" && node) { view.ui.move(node, insetOverviewMapPosition); } if (propertyName == "insetOverviewMapBasemap" && this.ovMap) { this.ovMap.changeBasemap(insetOverviewMapBasemap); } if (propertyName === "insetOverviewMapOpenAtStart") { if (this.ovMap && this.ovMap.insetExpand) { insetExpand = this.ovMap.insetExpand; insetOverviewMapOpenAtStart ? insetExpand.expand() : insetExpand.collapse(); } } if (propertyName === "insetOverviewSplitDirection" && this.ovMap) { if (this.ovMap) { insetOverviewSplitDirection === "vertical" ? container === null || container === void 0 ? void 0 : container.classList.add("direction-vertical") : (_c = container === null || container === void 0 ? void 0 : container.classList) === null || _c === void 0 ? void 0 : _c.remove("direction-vertical"); if (insetOverviewMap) { this.ovMap.updateDirection(); } } ; } return [2 /*return*/]; } }); }); }; return MapExample; }()); return MapExample; }); //# sourceMappingURL=Main.js.map
68.770742
458
0.485792
1a92bc453d45c3c54cd62e2c89bb0d49330d8308
333
js
JavaScript
lib/ARIAChecked.js
aristov/ariamodule
a964f072baad703baed1d4efac86f1f239617af7
[ "MIT" ]
1
2020-08-05T23:11:23.000Z
2020-08-05T23:11:23.000Z
lib/ARIAChecked.js
aristov/ariamodule
a964f072baad703baed1d4efac86f1f239617af7
[ "MIT" ]
1
2021-03-08T21:19:45.000Z
2021-03-08T21:19:45.000Z
lib/ARIAChecked.js
aristov/ariamodule
a964f072baad703baed1d4efac86f1f239617af7
[ "MIT" ]
null
null
null
import { ARIATypeTristate } from './ARIATypeTristate' /** * Indicates the current "checked" state of checkboxes, * radio buttons, and other widgets. * @see https://www.w3.org/TR/wai-aria-1.1/#aria-checked */ export class ARIAChecked extends ARIATypeTristate { } /** * @alias ARIAChecked */ export { ARIAChecked as Checked }
22.2
56
0.711712
1a960f3791405494baea43467b881f122191c5e9
41
js
JavaScript
src/components/PageExcerpt/index.js
metamn/gatsby-starter-mrui
a3e54c0c60e8e19c9081e72a8be8873a03116e22
[ "MIT" ]
null
null
null
src/components/PageExcerpt/index.js
metamn/gatsby-starter-mrui
a3e54c0c60e8e19c9081e72a8be8873a03116e22
[ "MIT" ]
null
null
null
src/components/PageExcerpt/index.js
metamn/gatsby-starter-mrui
a3e54c0c60e8e19c9081e72a8be8873a03116e22
[ "MIT" ]
null
null
null
export { default } from "./PageExcerpt";
20.5
40
0.682927
1a96e58815adc3f620b61b8e818122b6233c15bc
3,596
js
JavaScript
oneClickRate/App.js
qirh/one_click_rate
bb7fddf42d9d73123cf4db49229dc8e68321b129
[ "MIT" ]
1
2018-02-26T18:49:12.000Z
2018-02-26T18:49:12.000Z
oneClickRate/App.js
qirh/profHacksTakeTwo
bb7fddf42d9d73123cf4db49229dc8e68321b129
[ "MIT" ]
null
null
null
oneClickRate/App.js
qirh/profHacksTakeTwo
bb7fddf42d9d73123cf4db49229dc8e68321b129
[ "MIT" ]
null
null
null
import React, { Component } from 'react'; import { AppRegistry, Image, Button, Text, Alert, View, TouchableOpacity, ImageBackground, StyleSheet } from 'react-native'; export default class ratingApp extends Component { constructor(){ super(); this.state = { counter: 0, num: 0 } } renderButton() { const buttons = [ {text: 'button 1', pic: './assets/star.png', action: () => console.log('pressed button 0')}, {text: 'button 2', pic: './assets/star.png', action: () => console.log('pressed button 1')}, {text: 'button 3', pic: './assets/star.png', action: () => console.log('pressed button 2')}, {text: 'button 4', pic: './assets/star.png', action: () => console.log('pressed button 3')}, {text: 'button 5', pic: './assets/star.png', action: () => console.log('pressed button 4')} ]; const renderedButtons = buttons.map(b => { return <TouchableOpacity key={b.text} title={b.text} onPress={b.action}><Image source={require('./assets/star.png')} style={{height:60,width:60}}/></TouchableOpacity>;}); return renderedButtons; } renderTitle(num) { const renderedTitle = <View style={styles.header}><Text style={styles.headerText}>{shops[num].name}</Text></View>; return renderedTitle; } renderPic(num) { const renderedPic = <View style={{alignItems:"center"}}><Image style={styles.previewImg} source={shops[num].pic}/></View>; return renderedPic; } updateCounters(){ this.setState({counter: this.state.counter + 1, num: this.state.counter % 5}); } render() { var counter = 0; var num = 0; return ( //Base Background <ImageBackground source={require("./assets/materialBack.jpg")} style={styles.background}> {this.renderTitle(this.state.num)} {this.renderPic(this.state.num)} <TouchableOpacity title="Change Device Location" style={{flex:0,flexDirection:'row',justifyContent:'center'}} onPress={() => { console.log("here --> " + this.state.num); this.updateCounters(); } }><Image source={require('./assets/mapspic.png')} style={{height:50,width:50}}/></TouchableOpacity> <View style={styles.stars}> {this.renderButton()} </View> </ImageBackground> ); } } const styles = StyleSheet.create({ background: { flex:1, flexDirection:"column", backgroundColor:"blue", justifyContent:"space-between", }, header: { alignItems:"center", marginTop:75, }, headerText: { fontSize:42, color:"#FFFFFF", textAlign:"center", }, previewImg: { height:250, width:250, borderRadius:125, borderWidth:10, borderColor:"#DCDCDC", }, stars: { flex:0, flexDirection:"row", justifyContent:"space-between", marginBottom:75, marginLeft:15, marginRight:15, }, starsDimensions: { height: 60, width:60, }, }); const shops = [ {name: 'Walmart', pic: require("./assets/shops/walmart.jpg"), action: () => console.log('pressed shop 0')}, {name: 'HEB', pic: require("./assets/shops/heb.jpg"), action: () => console.log('pressed shop 1')}, {name: 'Trader Joe\'s', pic: require("./assets/shops/trader.jpg"), action: () => console.log('pressed shop 2')}, {name: 'Wegmans', pic: require("./assets/shops/wegmans.jpg"), action: () => console.log('pressed shop 3')}, {name: 'Hyper Panda', pic: require("./assets/shops/panda.jpg"), action: () => console.log('pressed shop 4')} ];
31.269565
176
0.598999
1a973cb1d7bf579c198aa699a9999b0acbbe1c92
1,840
js
JavaScript
react_wd_front/src/asynchronous/counter.js
Green-Pea-Ai/WD_Video_React
7a8f6068f03f2513415999384215981aeef57a62
[ "MIT" ]
null
null
null
react_wd_front/src/asynchronous/counter.js
Green-Pea-Ai/WD_Video_React
7a8f6068f03f2513415999384215981aeef57a62
[ "MIT" ]
null
null
null
react_wd_front/src/asynchronous/counter.js
Green-Pea-Ai/WD_Video_React
7a8f6068f03f2513415999384215981aeef57a62
[ "MIT" ]
null
null
null
// 파일명 만들 때 클래스는 대문자로 function은 소문자로 만든다. import { createAction, handleActions } from 'redux-actions' import { delay, put, takeLatest, select, throttle } from 'redux-saga/effects' //mutation type 지정하는 곳 const INCREASE = 'counter/INCREASE' const DECREASE = 'counter/DECREASE' const INCREASE_ASYNC = 'counter/INCREASE_ASYNC' const DECREASE_ASYNC = 'counter/DECREASE_ASYNC' export const increase = createAction(INCREASE) export const decrease = createAction(DECREASE) // 마우스 클릭 이벤트가 들어가지 않도록 undefined 설정 export const increaseAsync = createAction(INCREASE_ASYNC, () => undefined) export const decreaseAsync = createAction(DECREASE_ASYNC, () => undefined) // JS에서 function* 으로 붙은 녀석들은 Generator 객체를 생성한다.(자바의 iterator 비슷한 것을 만들어낸다) // 객체 지향에서는 lambada 개념, C에서는 함수 포인터 개념으로 받아들이면 된다. function* increaseSaga() { // 강제 1초 대기 yield delay(1000) // Vue Dispatch와 동일 yield put(increase()) const number = yield select(state => state.counter) console.log(`증가! 현재 값은 ${ number }`) } function* decreaseSaga() { yield delay(1000) yield put(decrease()) const number = yield select(state => state.counter) console.log(`감소! 현재 값은 ${ number }`) } export function* counterSaga() { yield throttle(3000, INCREASE_ASYNC, increaseSaga) // 기존에 진행중이던 작업이 있다면 강제 취소 처리 // 가장 마지막 작업만 수행한다.(3초내 100번 클릭하면, 99번의 클릭은 무시됨) yield takeLatest(DECREASE_ASYNC, decreaseSaga) } // function* decreaseSaga()를 아래처럼 적을 수도 있다. /* export const increaseAsync = () => dispatch => { setTimeout( () => { dispatch(increase()) }, 1000) }*/ const initialState = 0 const counter = handleActions( { [INCREASE]: state => state + 1, [DECREASE]: state => state - 1 }, initialState ) // 동기 처리를 보장해주는 카운터 작성 완료 // 데이터 처리전에 데이터가 나오거나 제대로 처리되지 않는 문제는 동기방식으로 처리하면 된다. export default counter
28.307692
77
0.690217
1a9825e7a0b4d9ad7122b61fce5d3b711bda2661
4,753
js
JavaScript
devel/share/gennodejs/ros/robotnik_msgs/msg/BatteryDockingStatusStamped.js
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
devel/share/gennodejs/ros/robotnik_msgs/msg/BatteryDockingStatusStamped.js
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
devel/share/gennodejs/ros/robotnik_msgs/msg/BatteryDockingStatusStamped.js
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
// Auto-generated. Do not edit! // (in-package robotnik_msgs.msg) "use strict"; const _serializer = _ros_msg_utils.Serialize; const _arraySerializer = _serializer.Array; const _deserializer = _ros_msg_utils.Deserialize; const _arrayDeserializer = _deserializer.Array; const _finder = _ros_msg_utils.Find; const _getByteLength = _ros_msg_utils.getByteLength; let BatteryDockingStatus = require('./BatteryDockingStatus.js'); let std_msgs = _finder('std_msgs'); //----------------------------------------------------------- class BatteryDockingStatusStamped { constructor(initObj={}) { if (initObj === null) { // initObj === null is a special case for deserialization where we don't initialize fields this.header = null; this.status = null; } else { if (initObj.hasOwnProperty('header')) { this.header = initObj.header } else { this.header = new std_msgs.msg.Header(); } if (initObj.hasOwnProperty('status')) { this.status = initObj.status } else { this.status = new BatteryDockingStatus(); } } } static serialize(obj, buffer, bufferOffset) { // Serializes a message object of type BatteryDockingStatusStamped // Serialize message field [header] bufferOffset = std_msgs.msg.Header.serialize(obj.header, buffer, bufferOffset); // Serialize message field [status] bufferOffset = BatteryDockingStatus.serialize(obj.status, buffer, bufferOffset); return bufferOffset; } static deserialize(buffer, bufferOffset=[0]) { //deserializes a message object of type BatteryDockingStatusStamped let len; let data = new BatteryDockingStatusStamped(null); // Deserialize message field [header] data.header = std_msgs.msg.Header.deserialize(buffer, bufferOffset); // Deserialize message field [status] data.status = BatteryDockingStatus.deserialize(buffer, bufferOffset); return data; } static getMessageSize(object) { let length = 0; length += std_msgs.msg.Header.getMessageSize(object.header); length += BatteryDockingStatus.getMessageSize(object.status); return length; } static datatype() { // Returns string type for a message object return 'robotnik_msgs/BatteryDockingStatusStamped'; } static md5sum() { //Returns md5sum for a message object return 'f9b376e82e9d778484349573af188b1d'; } static messageDefinition() { // Returns full string definition for message return ` Header header BatteryDockingStatus status ================================================================================ MSG: std_msgs/Header # Standard metadata for higher-level stamped data types. # This is generally used to communicate timestamped data # in a particular coordinate frame. # # sequence ID: consecutively increasing ID uint32 seq #Two-integer timestamp that is expressed as: # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs') # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs') # time-handling sugar is provided by the client library time stamp #Frame this data is associated with string frame_id ================================================================================ MSG: robotnik_msgs/BatteryDockingStatus # Modes of operation: # no docking station contacts string MODE_DISABLED=disabled # Unattended relay detection & activation with no inputs/outputs feedback. Done by the hw string MODE_AUTO_HW=automatic_hw # Unattended relay detection & activation with inputs/outputs feedback. Done by the sw string MODE_AUTO_SW=automatic_sw # Unattended relay detection & and manual activation of the charging relay string MODE_MANUAL_SW=manual_sw string operation_mode bool contact_relay_status # shows if there's contact with the charger bool charger_relay_status # shows if the relay for the charge is active or not `; } static Resolve(msg) { // deep-construct a valid message object instance of whatever was passed in if (typeof msg !== 'object' || msg === null) { msg = {}; } const resolved = new BatteryDockingStatusStamped(null); if (msg.header !== undefined) { resolved.header = std_msgs.msg.Header.Resolve(msg.header) } else { resolved.header = new std_msgs.msg.Header() } if (msg.status !== undefined) { resolved.status = BatteryDockingStatus.Resolve(msg.status) } else { resolved.status = new BatteryDockingStatus() } return resolved; } }; module.exports = BatteryDockingStatusStamped;
32.554795
96
0.666106
b4adca09b6975b90ed44ddf08573361eb4caa70e
2,341
js
JavaScript
src/controls/TextInput.js
maierfelix/gown.js
ae7efe333d9b6e215453393c01adfd5a469eeff5
[ "Apache-2.0" ]
null
null
null
src/controls/TextInput.js
maierfelix/gown.js
ae7efe333d9b6e215453393c01adfd5a469eeff5
[ "Apache-2.0" ]
null
null
null
src/controls/TextInput.js
maierfelix/gown.js
ae7efe333d9b6e215453393c01adfd5a469eeff5
[ "Apache-2.0" ]
1
2019-05-09T01:51:50.000Z
2019-05-09T01:51:50.000Z
var InputControl = require('./InputControl'), InputWrapper = require('../utils/InputWrapper'), position = require('../utils/position'); /** * The basic Text Input - based on PIXI.Input Input by Sebastian Nette, * see https://github.com/SebastianNette/PIXI.Input * * @class TextInput * @extends GOWN.InputControl * @memberof GOWN * @param text editable text shown in input * @param theme default theme * @constructor */ function TextInput(theme, skinName) { // show and load background image as skin (exploiting skin states) this.skinName = skinName || TextInput.SKIN_NAME; this._validStates = this._validStates || InputControl.stateNames; InputControl.call(this, theme); } TextInput.prototype = Object.create(InputControl.prototype); TextInput.prototype.constructor = TextInput; module.exports = TextInput; // name of skin TextInput.SKIN_NAME = 'text_input'; /* * set display as password */ Object.defineProperty(TextInput.prototype, 'displayAsPassword', { get: function () { return this._displayAsPassword; }, set: function (displayAsPassword) { this._displayAsPassword = displayAsPassword; this.setText(this._origText); } }); TextInput.prototype.getLines = function() { return [this.text]; }; TextInput.prototype.inputControlSetText = InputControl.prototype.setText; TextInput.prototype.setText = function(text) { if (this._displayAsPassword) { text = text.replace(/./gi, '*'); } var hasText = this.pixiText !== undefined; this.inputControlSetText(text); if (!hasText && this.height > 0) { position.centerVertical(this.pixiText); // set cursor to start position if (this.cursor) { this.cursor.y = this.pixiText.y; } } }; TextInput.prototype.updateSelectionBg = function() { var start = this.selection[0], end = this.selection[1]; this.selectionBg.clear(); if (start !== end) { start = this.textWidth(this.text.substring(0, start)); end = this.textWidth(this.text.substring(0, end)); this.selectionBg.beginFill(0x0080ff); this.selectionBg.drawRect(start, 0, end - start, this.pixiText.height); this.selectionBg.x = this.pixiText.x; this.selectionBg.y = this.pixiText.y; } }; // TODO: autoSizeIfNeeded
28.901235
79
0.674071
b4ae874621bc41f7078fdb5f35f6f596f56ca9bc
25,455
js
JavaScript
view/listComponentView.js
sabicalija/WebACS
fb10ba49348c8bd5ad67a26c16f04313f5b81774
[ "Apache-2.0" ]
2
2017-09-11T20:33:21.000Z
2022-02-28T09:16:04.000Z
view/listComponentView.js
sabicalija/WebACS
fb10ba49348c8bd5ad67a26c16f04313f5b81774
[ "Apache-2.0" ]
46
2017-07-14T06:09:31.000Z
2020-06-05T10:49:56.000Z
view/listComponentView.js
sabicalija/WebACS
fb10ba49348c8bd5ad67a26c16f04313f5b81774
[ "Apache-2.0" ]
3
2016-12-07T21:04:14.000Z
2019-11-02T13:59:44.000Z
/* * AsTeRICS - Assistive Technology Rapid Integration and Construction Set (http://www.asterics.org) * * * Y88b d88P 888 d8888 .d8888b. .d8888b. * Y88b d88P 888 d88888 d88P Y88b d88P Y88b * Y88b d88P 888 d88P888 888 888 Y88b. * Y88b d888b d88P .d88b. 8888888b. d88P 888 888 "Y888b. * Y88b d88888b d88P d8P Y8b 888 Y88b d88P 888 888 "Y88b. * Y88b d88P Y88b d88P 88888888 888 888 d88P 888 888 888 "888 * Y88888P Y88888P Y8b. 888 d88P d8888888888 Y88b d88P Y88b d88P * Y888P Y888P "Y8888 8888888P" d88P 888 "Y8888P" "Y8888P" * * Copyright 2015 Kompetenznetzwerk KI-I (http://ki-i.at) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ ACS.listComponentView = function( containerId, // String mainList, // DOM Element component, // ACS.component model, // ACS.model listView) { // ACS.listView // *********************************************************************************************************************** // ************************************************** private variables ************************************************** // *********************************************************************************************************************** var $listElem = $(document.createElement('li')); var $subList = $(document.createElement('ul')); var completePortList = []; var focussedPortIndex = -1; var actPortChannelList = []; var focussedChannelIndex = -1; var focusableElementClassName; // *********************************************************************************************************************** // ************************************************** private methods **************************************************** // *********************************************************************************************************************** var getIncomingDataChannel = function(inPort) { for (var i = 0; i < model.dataChannelList.length; i++) { if (model.dataChannelList[i].getInputPort() === inPort) return model.dataChannelList[i]; } return null; } var getDataChannels = function(outPort) { var channelList = []; for (var i = 0; i < model.dataChannelList.length; i++) { if (model.dataChannelList[i].getOutputPort() === outPort) channelList.push(model.dataChannelList[i]); } return channelList; } var channelExists = function(inPort) { for (var i = 0; i < model.dataChannelList.length; i++) { if (model.dataChannelList[i].getInputPort() === inPort) return true; } return false; } var eventChannelAlreadyExists = function(startComp, endComp) { for (var i = 0; i < model.eventChannelList.length; i++) { if ((model.eventChannelList[i].startComponent === startComp) && (model.eventChannelList[i].endComponent === endComp)) return true; } return false; } var listEntryOutgoingDataConnection = function(dataCh) { var $le = $(document.createElement('li')); $le.attr('id', containerId + '_' + dataCh.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')); $le.attr('tabindex', '0'); $le.addClass(focusableElementClassName); $le.append('port '); var $btn = $(document.createElement('button')); $btn.attr('type', 'button'); $btn.text(dataCh.getInputPort().getId()); $btn.click(function(iPort) { return function(evt) {$('#' + containerId + '_' + iPort.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + iPort.getParentComponent().getId().replace(/\s+/g, '').replace(/\.+/g, '')).focus();}; }(dataCh.getInputPort())); $le.append($btn); $le.append(' at '); $btn = $(document.createElement('button')); $btn.attr('type', 'button'); $btn.text(dataCh.getInputPort().getParentComponent().getId()); $btn.click(function(iPort) { return function(evt) {$('#' + containerId + '_' + iPort.getParentComponent().getId().replace(/\s+/g, '').replace(/\.+/g, '')).focus();}; }(dataCh.getInputPort())); $le.append($btn); $le.focus(function() { model.deSelectAll(); model.addItemToSelection(dataCh); returnObj.events.fireEvent('listComponentViewSelectedEvent', returnObj); }); return $le; } var addIncomingDataConnection = function($div, inChannel) { $div.text('connected to port '); var $btn = $(document.createElement('button')); $btn.attr('type', 'button'); $btn.text(inChannel.getOutputPort().getId()); $btn.click(function(oPort) { return function(evt) {$('#' + containerId + '_' + oPort.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + oPort.getParentComponent().getId().replace(/\s+/g, '').replace(/\.+/g, '')).focus();}; }(inChannel.getOutputPort())); $div.append($btn); $div.append(' at '); $btn = $(document.createElement('button')); $btn.attr('type', 'button'); $btn.text(inChannel.getOutputPort().getParentComponent().getId()); $btn.click(function(oPort) { return function() {$('#' + containerId + '_' + oPort.getParentComponent().getId().replace(/\s+/g, '').replace(/\.+/g, '')).focus();}; }(inChannel.getOutputPort())); // make channel focusable and select channel on focus $div.attr('tabindex', '0'); $div.addClass(focusableElementClassName); $div.focus(function() { model.deSelectAll(); model.addItemToSelection(inChannel); returnObj.events.fireEvent('listComponentViewSelectedEvent', returnObj); }); $div.append($btn); } var generatePortList = function(id, portList) { var $list = $(document.createElement('ul')); $list.attr('id', id + 'List'); for (var i = 0; i < portList.length; i++) { var $li = $(document.createElement('li')); $li.attr('id', containerId + '_' + portList[i].getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')); $li.attr('tabindex', '0'); $li.addClass(focusableElementClassName); $li.focus(function() { model.deSelectAll(); model.addItemToSelection(component); returnObj.events.fireEvent('listComponentViewSelectedEvent', returnObj); }); $list.append($li); $li.text(portList[i].getId()); var $div = $(document.createElement('div')); $div.attr('id', containerId + '_' + portList[i].getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $btn = $(document.createElement('button')); $btn.attr('type', 'button'); $li.append($div); $li.append($btn); // add already existing connections (i.e. channels) if (portList[i].getType() === ACS.portType.INPUT) { var inChannel = getIncomingDataChannel(portList[i]); if (inChannel) addIncomingDataConnection($div, inChannel); $btn.text('Connect datachannel here'); $btn.addClass(containerId + '_dataInPortBtn'); $btn.click(function(port) { return function() { if (!channelExists(port)) { model.dataChannelList[model.dataChannelList.length - 1].setInputPort(port); } else { $('#' + containerId + '_actionInfo').text('Cannot connect to this port, since it already has a connection. Please complete the channel by using the "connect here"-button at a matching input port.'); $('#' + containerId + '_actionInfo').append(ACS.listView.makeCancelButton(model)); $('#' + containerId + '_actionInfo').focus(); } } }(portList[i])); $btn.attr('disabled', ''); } else { var dataChannels = getDataChannels(portList[i]); if (dataChannels.length > 0) { $div.text(' connected to'); var $ul = $(document.createElement('ul')); $div.append($ul); for (var j = 0; j < dataChannels.length; j++) { $ul.append(listEntryOutgoingDataConnection(dataChannels[j])); } } $btn.text('Start new datachannel'); $btn.addClass(containerId + '_dataOutPortBtn'); $btn.click(function(port) { return function() { var ch = ACS.dataChannel(port.getId() + 'AT' + port.getParentComponent().getId(), port, null); var addAct = ACS.addDataChannelAction(model, ch); addAct.execute(); } }(portList[i])); } } $('#' + id).append($list); $('#' + id).focus(function() { model.deSelectAll(); model.addItemToSelection(component); returnObj.events.fireEvent('listComponentViewSelectedEvent', returnObj); }); } var listEntryEventConnection = function(channel, incomingEventConnection) { var $li = $(document.createElement('li')); $li.attr('id', containerId + '_' + channel.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')); $li.attr('tabindex', '0'); $li.addClass(focusableElementClassName); $li.focus(function(evtChannel) { return function() { model.deSelectAll(); model.addItemToSelection(evtChannel); returnObj.events.fireEvent('listComponentViewSelectedEvent', returnObj); }; }(channel)); // create button that links to other end of eventChannel var linkToCompId; if (incomingEventConnection) { linkToCompId = channel.startComponent.getId(); } else { linkToCompId = channel.endComponent.getId(); } var $btn = $(document.createElement('button')); $btn.attr('type', 'button'); $btn.text(linkToCompId); $btn.click(function(compId) { return function() {$('#' + containerId + '_' + compId.replace(/\s+/g, '').replace(/\.+/g, '')).focus();}; }(linkToCompId)); $li.append($btn); return $li; } var addEventConnections = function($div, incomingEventConnection) { var $list = null; for (var i = 0; i < model.eventChannelList.length; i++) { var tmpComp; if (incomingEventConnection) { tmpComp = model.eventChannelList[i].endComponent; } else { tmpComp = model.eventChannelList[i].startComponent; } if (tmpComp === component) { if (!$list) { $div.text(' connected to'); $list = $(document.createElement('ul')); $div.append($list); } $list.append(listEntryEventConnection(model.eventChannelList[i], incomingEventConnection)); } } } var focusPort = function(port) { if (typeof port.getId != 'undefined') { // must be a dataPort $('#' + containerId + '_' + port.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')).focus(); } else { // must be an eventPort $('#' + containerId + '_' + port + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')).focus(); } } // ********************************************** handlers *********************************************************** var listKeyboardModeChangedEventHandler = function() { if (listView.getListKeyboardMode()) { focusableElementClassName = 'listPanelFocusableElementKeyboardMode'; } else { focusableElementClassName = 'listPanelFocusableElement'; } } var componentIdChangedEventHandler = function() { $listElem.contents().filter(function(){return this.nodeType === 3; }).first().replaceWith(component.getId()); $listElem.attr('id', containerId + '_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')); } // *********************************************************************************************************************** // ************************************************** public stuff ******************************************************* // *********************************************************************************************************************** var returnObj = {}; returnObj.events = ACS.eventManager(); returnObj.getComponent = function() { return component; } returnObj.destroy = function() { $listElem.remove(); } returnObj.focusComponent = function() { $('#' + containerId + '_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')).focus(); } returnObj.focusFirstPort = function() { if (completePortList.length > 0) { focusPort(completePortList[0]); focussedPortIndex = 0; } else { focussedPortIndex = -1; } } returnObj.focusNextPort = function(direction) { var nextIndex; if (direction === 'right' || direction === 'down') { nextIndex = focussedPortIndex + 1; } else { nextIndex = focussedPortIndex - 1; } if (nextIndex > -1 && nextIndex < completePortList.length) { focusPort(completePortList[nextIndex]); focussedPortIndex = nextIndex; } } returnObj.focusFirstChannel = function() { // make list of all channels connected to currently focussed port if (completePortList[focussedPortIndex] === 'eventOutput') { for (var i = 0; i < model.eventChannelList.length; i++) { if (model.eventChannelList[i].startComponent === component) actPortChannelList.push(model.eventChannelList[i]); } } else if (completePortList[focussedPortIndex] === 'eventInput') { for (var i = 0; i < model.eventChannelList.length; i++) { if (model.eventChannelList[i].endComponent === component) actPortChannelList.push(model.eventChannelList[i]); } } else if (completePortList[focussedPortIndex].getType() === ACS.portType.INPUT) { for (var i = 0; i < model.dataChannelList.length; i++) { if (model.dataChannelList[i].getInputPort() === completePortList[focussedPortIndex]) actPortChannelList.push(model.dataChannelList[i]); } } else if (completePortList[focussedPortIndex].getType() === ACS.portType.OUTPUT) { for (var i = 0; i < model.dataChannelList.length; i++) { if (model.dataChannelList[i].getOutputPort() === completePortList[focussedPortIndex]) actPortChannelList.push(model.dataChannelList[i]); } } // focus first channel in list if (actPortChannelList.length > 0) { returnObj.focusConnection(actPortChannelList[0]); focussedChannelIndex = 0; return true; } return false; } returnObj.focusNextChannel = function(direction) { if (direction === 'right' || direction === 'down') { if (focussedChannelIndex + 1 < actPortChannelList.length) { focussedChannelIndex++; } } else { if (focussedChannelIndex - 1 > -1) { focussedChannelIndex--; } } returnObj.focusConnection(actPortChannelList[focussedChannelIndex]); } returnObj.deactivateChannelMode = function() { // unfocus channels, select component again model.deSelectAll(); model.addItemToSelection(component); actPortChannelList = []; focussedChannelIndex = -1; // focus the port we came from focusPort(completePortList[focussedPortIndex]); } returnObj.focusConnection = function(ch) { if ((typeof ch.getInputPort !== 'undefined') && (ch.getInputPort().getParentComponent() === component)) { // must be a dataChannel and must be an incoming connection $('#' + containerId + '_' + ch.getInputPort().getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections').focus(); } else { $('#' + containerId + '_' + ch.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')).focus(); } } returnObj.addOutgoingDataChannel = function(dataCh) { var $outPortDiv = $('#' + containerId + '_' + dataCh.getOutputPort().getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $list = $outPortDiv.find('ul'); if ($list.length === 0) { $outPortDiv.text(' connected to'); $list = $(document.createElement('ul')); $outPortDiv.append($list); } $list.append(listEntryOutgoingDataConnection(dataCh)); } returnObj.removeOutgoingDataChannel = function(dataCh) { // remove the list entry $le = $('#' + containerId + '_' + dataCh.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')); if ($le.length > 0) $le.remove(); // check if there are any connections left from this port - if no, remove sublist var $outPortDiv = $('#' + containerId + '_' + dataCh.getOutputPort().getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $list = $outPortDiv.find('ul'); if (($list.length > 0) && ($list.children().length === 0)) { // remove list in case it is emtpy; also remove words "connected to", since there is no connection anymore $list.remove(); $outPortDiv.text(''); } } returnObj.addIncomingDataChannel = function(dataCh) { var $inPortDiv = $('#' + containerId + '_' + dataCh.getInputPort().getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); addIncomingDataConnection($inPortDiv, dataCh); } returnObj.removeIncomingDataChannel = function(dataCh) { var $inPortDiv = $('#' + containerId + '_' + dataCh.getInputPort().getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); $inPortDiv.text(''); $inPortDiv.unbind(); $inPortDiv.removeAttr('tabindex'); $inPortDiv.removeClass(focusableElementClassName); } returnObj.addOutgoingEventChannel = function(eventCh) { var $outPortDiv = $('#' + containerId + '_eventOutput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $list = $outPortDiv.find('ul'); if ($list.length === 0) { $outPortDiv.text(' connected to'); $list = $(document.createElement('ul')); $outPortDiv.append($list); } $list.append(listEntryEventConnection(eventCh, false)); } returnObj.addIncomingEventChannel = function(eventCh) { var $inPortDiv = $('#' + containerId + '_eventInput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $list = $inPortDiv.find('ul'); if ($list.length === 0) { $inPortDiv.text(' connected to'); $list = $(document.createElement('ul')); $inPortDiv.append($list); } $list.append(listEntryEventConnection(eventCh, true)); } returnObj.removeOutgoingEventChannel = function(eventCh) { // remove the list entry $le = $('#' + containerId + '_' + eventCh.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')); if ($le.length > 0) $le.remove(); // check if there are any connections left from this port - if no, remove sublist var $outPortDiv = $('#' + containerId + '_eventOutput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $list = $outPortDiv.find('ul'); if (($list.length > 0) && ($list.children().length === 0)) { // remove list in case it is emtpy; also remove words "connected to", since there is no connection anymore $list.remove(); $outPortDiv.text(''); } } returnObj.removeIncomingEventChannel = function(eventCh) { // remove the list entry $le = $('#' + containerId + '_' + eventCh.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')); if ($le.length > 0) $le.remove(); // check if there are any connections left to this port - if no, remove sublist var $inPortDiv = $('#' + containerId + '_eventInput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $list = $inPortDiv.find('ul'); if (($list.length > 0) && ($list.children().length === 0)) { // remove list in case it is emtpy; also remove words "connected to", since there is no connection anymore $list.remove(); $inPortDiv.text(''); } } // *********************************************************************************************************************** // ************************************************** constructor code *************************************************** // *********************************************************************************************************************** if (listView.getListKeyboardMode()) { focusableElementClassName = 'listPanelFocusableElementKeyboardMode'; } else { focusableElementClassName = 'listPanelFocusableElement'; } $listElem.attr('tabindex', '0'); $listElem.addClass(focusableElementClassName); $listElem.attr('id', containerId + '_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')); $listElem.text(component.getId()); $subList.addClass('componentSublist'); $listElem.append($subList); $listElem.focus(function() { model.deSelectAll(); model.addItemToSelection(component); returnObj.events.fireEvent('listComponentViewSelectedEvent', returnObj); }); $(mainList).append($listElem); if (component.inputPortList.length > 0) { $subList.append('<li id="' + containerId + '_inputPorts_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '" class="' + focusableElementClassName + '" tabindex="0">Input Ports:</li>'); generatePortList(containerId + '_inputPorts_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, ''), component.inputPortList); completePortList = completePortList.concat(component.inputPortList); } if (component.outputPortList.length > 0) { $subList.append('<li id="' + containerId + '_outputPorts_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '" class="' + focusableElementClassName + '" tabindex="0">Output Ports:</li>'); generatePortList(containerId + '_outputPorts_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, ''), component.outputPortList); completePortList = completePortList.concat(component.outputPortList); } if (component.listenEventList.length > 0) { $subList.append('<li id="' + containerId + '_eventInput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '" class="' + focusableElementClassName + '" tabindex="0">Event input port</li>'); completePortList.push('eventInput'); var $div = $(document.createElement('div')); $div.attr('id', containerId + '_eventInput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $btn = $(document.createElement('button')); $btn.attr('type', 'button'); $btn.text('Connect eventchannel here'); $btn.addClass(containerId + '_eventInPortBtn'); $btn.click(function() { if (!eventChannelAlreadyExists(model.eventChannelList[model.eventChannelList.length - 1].startComponent, component)) { model.eventChannelList[model.eventChannelList.length - 1].setId(model.eventChannelList[model.eventChannelList.length - 1].getId() + component.getId()); // this ID involves start- and end-component - therefore it must be finalised here, on completion of channel model.eventChannelList[model.eventChannelList.length - 1].endComponent = component; model.eventChannelList[model.eventChannelList.length - 1].events.fireEvent('eventChannelCompletedEvent'); } else { $('#' + containerId + '_actionInfo').text('The eventchannel you intend to create already exists. Please complete the channel by using the "connect here"-button at a matching input port or cancel the action.'); $('#' + containerId + '_actionInfo').append(ACS.listView.makeCancelButton(model)); $('#' + containerId + '_actionInfo').focus(); } }); $btn.attr('disabled', ''); $('#' + containerId + '_eventInput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')).append($div); $('#' + containerId + '_eventInput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')).append($btn); addEventConnections($div, true); } if (component.triggerEventList.length > 0) { $subList.append('<li id="' + containerId + '_eventOutput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '" class="' + focusableElementClassName + '" tabindex="0">Event output port</li>'); completePortList.push('eventOutput'); var $div = $(document.createElement('div')); $div.attr('id', containerId + '_eventOutput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '') + '_connections'); var $btn = $(document.createElement('button')); $btn.attr('type', 'button'); $btn.text('Start new eventchannel'); $btn.addClass(containerId + '_eventOutPortBtn'); $btn.click(function() { var ch = ACS.eventChannel(component.getId() + '_TO_'); // second half of ID is added, when channel is completed ch.startComponent = component; var addAct = ACS.addEventChannelAction(model, ch); addAct.execute(); }); $('#' + containerId + '_eventOutput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')).append($div); $('#' + containerId + '_eventOutput_AT_' + component.getId().replace(/\s+/g, '').replace(/\.+/g, '')).append($btn); addEventConnections($div, false); } listView.events.registerHandler('listKeyboardModeChangedEvent', listKeyboardModeChangedEventHandler); component.events.registerHandler('componentIdChangedEvent', componentIdChangedEventHandler); return returnObj; }
47.226345
264
0.608564
b4afd54556d35b07aff99f6bb621496ecb7dc061
1,410
js
JavaScript
src/queries/index.js
ConstableBrew/EarthCoreRL
badb2cfb2e5793a3413c4e76b8ac8c15b56d177d
[ "MIT" ]
1
2020-11-07T19:31:35.000Z
2020-11-07T19:31:35.000Z
src/queries/index.js
ConstableBrew/EarthCoreRL
badb2cfb2e5793a3413c4e76b8ac8c15b56d177d
[ "MIT" ]
null
null
null
src/queries/index.js
ConstableBrew/EarthCoreRL
badb2cfb2e5793a3413c4e76b8ac8c15b56d177d
[ "MIT" ]
null
null
null
import {ecs} from 'src/state'; import { Appearance, IsBlocking, IsInFov, IsOpaque, IsRevealed, MoveTo, Position, BackgroundLayer, TerrainLayer, MarkingsLayer, ItemsLayer, ActorsLayer, UILayer, } from 'src/components'; export const backgroundLayerEntities = ecs.createQuery({ all: [Appearance, Position, BackgroundLayer], any: [IsInFov, IsRevealed], }); export const terrainLayerEntities = ecs.createQuery({ all: [Appearance, Position, TerrainLayer], any: [IsInFov, IsRevealed], }); export const markingsLayerEntities = ecs.createQuery({ all: [Appearance, Position, MarkingsLayer], any: [IsInFov, IsRevealed], }); export const itemsLayerEntities = ecs.createQuery({ all: [Appearance, Position, ItemsLayer], any: [IsInFov, IsRevealed], }); export const actorsLayerEntities = ecs.createQuery({ all: [Appearance, Position, ActorsLayer], any: [IsInFov, IsRevealed], }); export const uiLayerEntities = ecs.createQuery({ all: [Appearance, Position, UILayer], any: [IsInFov, IsRevealed], }); export const blockingEntities = ecs.createQuery({ all: [IsBlocking, Position], }); export const inFovEntities = ecs.createQuery({ all: [IsInFov], }); export const movableEntities = ecs.createQuery({ all: [MoveTo, Position], }); export const opaqueEntities = ecs.createQuery({ all: [IsOpaque], });
21.363636
56
0.686525
b4b08c78e1131ea09a9c8a7cc59edb2973eb81d2
396
js
JavaScript
routes/api/index.js
kvlin/PurchaseOrder-Generator
e85f3a56c783bd73a947c2c9d846e9121208992a
[ "MIT" ]
null
null
null
routes/api/index.js
kvlin/PurchaseOrder-Generator
e85f3a56c783bd73a947c2c9d846e9121208992a
[ "MIT" ]
10
2021-04-29T11:06:25.000Z
2021-05-15T03:27:12.000Z
routes/api/index.js
kvlin/PurchaseOrder-Generator
e85f3a56c783bd73a947c2c9d846e9121208992a
[ "MIT" ]
null
null
null
const router = require('express').Router() const productRoutes = require('./products') const userRoutes = require('./user') const vendorsRoutes = require('./vendors') const posRoutes = require('./purchaseOrders') // Product routes router.use('/products', productRoutes) router.use('/user', userRoutes) router.use('/vendors', vendorsRoutes) router.use('/pos', posRoutes) module.exports = router
28.285714
45
0.737374
b4b164f4850a5eeaaea5e36c5870477b4bdcd746
4,692
js
JavaScript
static/scripts/home.js
HausCloud/HausCloud-Portfolio
b55838f9dbca9ec2cf8b292870047e1b6d1018b5
[ "MIT" ]
1
2020-09-04T00:15:07.000Z
2020-09-04T00:15:07.000Z
static/scripts/home.js
HausCloud/HausCloud-Portfolio
b55838f9dbca9ec2cf8b292870047e1b6d1018b5
[ "MIT" ]
1
2021-04-11T04:38:40.000Z
2021-04-11T04:38:40.000Z
static/scripts/home.js
HausCloud/HausCloud-Portfolio
b55838f9dbca9ec2cf8b292870047e1b6d1018b5
[ "MIT" ]
null
null
null
window.addEventListener('DOMContentLoaded', function () { /* Typed.js for title */ var options = { strings: ['Software Engineer', 'Eternal Student', 'Gamer', 'Lofi Addict', 'Anime Lover'], typeSpeed: 60, backspeed: 40, loop: true, }; var obj = { 0: ['Command interpreter', 'APR 2019', 'Coursework to broaden understanding of how shells work. Concepts covered are env, built-ins, signals, system calls, string parsing, and errno.'], 1: ['Wish upon a star web application', 'SEP 2019 - NOV 2019', 'Developed to counteract the trend of other wishing apps where you make a wish and it disappears into the void. Get insight into the wants of others from all around the world. Help fill a desolate universe with fun, hopes, dreams, ..'], 2: ['AWS EB SSL setup scripts', 'May 2020', 'Lack of easy solution readily available on the net. There is a lot of questions and only unclear and/or thorough explanations regarding adding SSL for EB.'] }; var project_links = ['https://github.com/HausCloud/C-Shell', 'https://github.com/HausCloud/Hopeful-Cosmos', 'https://github.com/HausCloud/AWS-ElasticBeanstalk-SSL']; new Typed('#anttitle div h2', options); /* Register plugin ScrolTo plugin for GSAP */ gsap.registerPlugin(ScrollToPlugin); /* Fade in title */ gsap.from('#anttitle', { duration: 1.5, opacity: 0 }); /* Float navbar in with stagger effect */ gsap.from('.navitem', { duration: 0.8, opacity: 0, y: -70, stagger: 0.25, }); /* Smooth scroll for navbar */ document.querySelector('#typicalbackground #navbar ul li:first-child a').addEventListener('click', function (e) { e.preventDefault(); gsap.to(document.body, { duration: 0.8, scrollTo: { y: '#about', autoKill: false } }); }); document.querySelector('#typicalbackground #navbar ul li:nth-child(3)').addEventListener('click', function (e) { e.preventDefault(); gsap.to(document.body, { duration: 0.8, scrollTo: { y: '#projects', autoKill: false } }); }); document.querySelector('#typicalbackground #navbar ul li:last-child').addEventListener('click', function (e) { e.preventDefault(); gsap.to(document.body, { duration: 0.8, scrollTo: { y: '#contact', autoKill: false } }); }); /* Grab all projects */ var projects = document.querySelectorAll('#projects > div > div > a'); /* Assign each project an attribute with a corresponding index */ for (i = 0; i < projects.length; ++i) { projects[i].setAttribute('proj_num', i); } /* Bind click event to display overlay with corresponding info */ for (j = 0; j < projects.length; ++j) { projects[j].addEventListener('click', function (e) { e.preventDefault(); document.querySelector('#projectinfo div:first-child p').innerHTML = obj[this.getAttribute('proj_num')][0]; document.querySelector('#projectinfo div:nth-child(2) p').innerHTML = obj[this.getAttribute('proj_num')][1]; document.querySelector('#projectinfo div:last-child p').innerHTML = obj[this.getAttribute('proj_num')][2]; document.getElementById('overlay').setAttribute('proj_num', this.getAttribute('proj_num')); gsap.to('#overlay', { duration: 0.4, display: 'block', opacity: 1 }); }); } // Bind click event to hide overlay document.querySelector('#overlaymenu div:last-child a').addEventListener('click', function (e) { gsap.to('#overlay', { duration: 0.4, display: 'none', opacity: 0 }); }); document.querySelector('#overlaymenu div:first-child a').addEventListener('click', function (e) { window.open(project_links[document.getElementById('overlay').getAttribute('proj_num')], '_blank'); }); /* Open link for resume button */ document.getElementById('resume').addEventListener('click', function (e) { e.preventDefault(); window.open('https://drive.google.com/file/d/1oH4Z61atV7oZCge_eJpzXZwONH5dvaFQ/view?usp=sharing', '_blank'); }); /* Open links for contact section */ document.querySelector('#hclinkedin').addEventListener('click', function (e) { e.preventDefault(); window.open('https://www.linkedin.com/in/hauscloud', '_blank'); }); document.querySelector('#hcgithub').addEventListener('click', function (e) { e.preventDefault(); window.open('https://www.github.com/hauscloud', '_blank'); }); document.querySelector('#hctweet').addEventListener('click', function (e) { e.preventDefault(); window.open('https://www.twitter.com/hauscloud', '_blank'); }); });
49.389474
509
0.649403
b4b20cf90b8dba0aee6b58da454f782a0682e9ff
40
js
JavaScript
src/js_wala/normalizer/test/data/test53.js
sch8906/static-dom-anlaysis
840109a582e044ff2a4b0ab70f50369941a3c09d
[ "MIT" ]
7
2018-01-18T10:31:24.000Z
2021-06-29T07:16:44.000Z
src/js_wala/normalizer/test/data/test53.js
sch8906/static-dom-anlaysis
840109a582e044ff2a4b0ab70f50369941a3c09d
[ "MIT" ]
3
2016-06-29T20:53:52.000Z
2017-05-14T06:01:20.000Z
src/js_wala/normalizer/test/data/test53.js
sch8906/static-dom-anlaysis
840109a582e044ff2a4b0ab70f50369941a3c09d
[ "MIT" ]
1
2019-02-20T13:34:59.000Z
2019-02-20T13:34:59.000Z
(function(i) { return i++, 42; })();
13.333333
19
0.45
b4b25b0d5b25638936e6f843f779949a55b6081d
714
js
JavaScript
lib/satcat.js
jhermsmeier/node-satcat
0e89737f1983646b14abf257c139568a1c482f9e
[ "MIT" ]
4
2017-03-10T09:20:04.000Z
2019-04-04T02:46:32.000Z
lib/satcat.js
jhermsmeier/node-satcat
0e89737f1983646b14abf257c139568a1c482f9e
[ "MIT" ]
null
null
null
lib/satcat.js
jhermsmeier/node-satcat
0e89737f1983646b14abf257c139568a1c482f9e
[ "MIT" ]
1
2019-10-22T10:00:09.000Z
2019-10-22T10:00:09.000Z
var stream = require( 'stream' ) class SatCat extends stream.Transform { /** * SatCat constructor * @extends {stream.Transform} * @param {Object} [options] */ constructor( options ) { options = options || {} options.readableObjectMode = true super( options ) this._stringBuffer = '' } _transform( chunk, _, next ) { var lines = ( this._stringBuffer + chunk ) .split( /\r?\n/g ) while( lines.length > 1 ) { this.push( SatCat.Satellite.parse( lines.shift() ) ) } this._stringBuffer = lines.shift() || '' process.nextTick( next ) } } SatCat.Parser = SatCat SatCat.Satellite = require( './satellite' ) // Exports module.exports = SatCat
18.307692
58
0.610644
b4b3264f3a63f174acd6b9c9fbbdfbb2f952a43d
108
js
JavaScript
src/components/Form/index.js
barumel/ultritium-game-server-client
34e35b2e1b943fd10bb2e9e1d3898f03232dad85
[ "MIT" ]
null
null
null
src/components/Form/index.js
barumel/ultritium-game-server-client
34e35b2e1b943fd10bb2e9e1d3898f03232dad85
[ "MIT" ]
null
null
null
src/components/Form/index.js
barumel/ultritium-game-server-client
34e35b2e1b943fd10bb2e9e1d3898f03232dad85
[ "MIT" ]
null
null
null
export { default as TextInput } from './TextInput'; export { default as NumberInput } from './NumberInput';
36
55
0.722222
b4b52c015523c5a3ded01cd40f42915f33749434
1,326
js
JavaScript
module-tools/readPom.js
MangoAutomation/mango-module-tools
a010261b1d77aa2325a41d23e875fc31e60501dc
[ "Apache-2.0" ]
1
2020-10-10T06:34:23.000Z
2020-10-10T06:34:23.000Z
module-tools/readPom.js
MangoAutomation/mango-module-tools
a010261b1d77aa2325a41d23e875fc31e60501dc
[ "Apache-2.0" ]
10
2021-11-08T17:44:17.000Z
2021-12-16T23:50:15.000Z
module-tools/readPom.js
infiniteautomation/node-mango-module-tools
a010261b1d77aa2325a41d23e875fc31e60501dc
[ "Apache-2.0" ]
1
2020-06-20T06:48:55.000Z
2020-06-20T06:48:55.000Z
/** * Copyright 2020 Infinite Automation Systems Inc. * http://infiniteautomation.com/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const path = require('path'); const xml2js = require('xml2js'); const fs = require('fs'); module.exports = function readPom(directory = path.resolve('.')) { return new Promise((resolve, reject) => { const parser = new xml2js.Parser(); fs.readFile(path.join(directory, 'pom.xml'), function(err, data) { if (err) { reject(err); } else { parser.parseString(data, function (err, result) { if (err) { reject(err); } else { resolve(result); } }); } }); }); }
33.15
75
0.588235
b4b845e267520e4daaf64bedf0172a1336e846ef
463
js
JavaScript
src/bin/index.js
artdecocode/transfer
264fd73a2a03c6a2a3ac50ad5550027292f457e8
[ "MIT" ]
1
2018-06-26T06:58:42.000Z
2018-06-26T06:58:42.000Z
src/bin/index.js
artdecocode/transfer
264fd73a2a03c6a2a3ac50ad5550027292f457e8
[ "MIT" ]
null
null
null
src/bin/index.js
artdecocode/transfer
264fd73a2a03c6a2a3ac50ad5550027292f457e8
[ "MIT" ]
null
null
null
#!/usr/bin/env node import { addOwner, removeOwner } from '../lib' import { resolve } from 'path' const newOwner = 'artdecocode' let name try { const p = resolve(process.cwd(), 'package.json') ;({ name } = require(p)) } catch (err) { console.log('Could not find name from the package.json') process.exit(1) } (async () => { const a = await addOwner(newOwner, name) console.log(a) const r = await removeOwner(newOwner, name) console.log(r) })()
21.045455
58
0.652268
b4b846e2b4911d93327ca80a8ba932111ebc4562
381
js
JavaScript
JavaScript/controle/breakcontinue.js
Rebeca-Ismirna/Full-Stack-Learn
8121150501510b4a65983e3692e4e102028c242f
[ "MIT" ]
null
null
null
JavaScript/controle/breakcontinue.js
Rebeca-Ismirna/Full-Stack-Learn
8121150501510b4a65983e3692e4e102028c242f
[ "MIT" ]
null
null
null
JavaScript/controle/breakcontinue.js
Rebeca-Ismirna/Full-Stack-Learn
8121150501510b4a65983e3692e4e102028c242f
[ "MIT" ]
null
null
null
const num = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for(x in num) { if (x ==5) { break } console.log(`${x} = ${num[x]}`) } for (y in num) { if (y ==5) { continue } console.log(`${y} = ${num[y]}`) } // label: externo: for (a in num) { for (b in num) { if(a == 2 && b == 3) break externo console.log(`Par = ${a},${b}`) } }
15.24
43
0.396325
b4b94efada47cf146f22d32fa907918c15d05ee1
3,645
js
JavaScript
src/shared/components/addon/maps/marker.js
lancetw/react-isomorphic-bundle
4b137e4a42aee6d98115b2ad1546ccba74d94098
[ "MIT" ]
59
2015-07-08T17:40:10.000Z
2020-12-07T08:45:27.000Z
src/shared/components/addon/maps/marker.js
lancetw/react-isomorphic-bundle
4b137e4a42aee6d98115b2ad1546ccba74d94098
[ "MIT" ]
13
2015-07-09T08:35:05.000Z
2022-02-10T15:50:19.000Z
src/shared/components/addon/maps/marker.js
lancetw/react-isomorphic-bundle
4b137e4a42aee6d98115b2ad1546ccba74d94098
[ "MIT" ]
11
2015-07-12T06:48:28.000Z
2019-06-27T15:30:25.000Z
import React, { Component, PropTypes } from 'react' import shouldPureComponentUpdate from 'react-pure-render/function' import classNames from 'classnames' import { toShortDate } from 'shared/utils/date-utils' import { tongwenAutoStr } from 'shared/utils/tongwen' export default class Marker extends Component { static propTypes = { hover: PropTypes.bool.isRequired, pulse: PropTypes.bool.isRequired, isOpen: PropTypes.bool.isRequired, data: PropTypes.object.isRequired, handleGoClick: PropTypes.func, handleCloseClick: PropTypes.func, handleTouchStart: PropTypes.func, defaultLocale: PropTypes.string.isRequired } constructor (props) { super(props) } shouldComponentUpdate = shouldPureComponentUpdate onTouchStart = (key, childProps, event) => { event.preventDefault() if (this.props.handleTouchStart) { return this.props.handleTouchStart(key, childProps) } } render () { const Translate = require('react-translate-component') const pinClasses = classNames( 'pin', 'bounce', 'green', { 'hover': this.props.hover }, { 'open': this.props.isOpen } ) const tooltipsClasses = classNames( 'ui', 'box', 'tooltips', { 'hover': this.props.hover }, { 'open': this.props.isOpen } ) const pulseClasses = classNames( { 'xpulse': this.props.pulse ? true : false }, 'green', { 'hover': this.props.hover }, { 'open': this.props.isOpen } ) const actionClasses = classNames( 'extra', 'content', { 'hidden': !this.props.isOpen } ) const { data } = this.props const eventDate = (data.startDate === data.endDate) ? toShortDate(data.endDate) : toShortDate(data.startDate) + ' - ' + toShortDate(data.endDate) return ( <div onTouchStart={this.onTouchStart.bind(null, data.id, data)}> <div> <div className={pinClasses}></div> <div className={pulseClasses}></div> </div> <div className={tooltipsClasses}> <div className="ui card popupbox"> <div className="content"> <div className="ui right aligned"> {eventDate && ( <span className="ui attached top orange label"> {eventDate} </span>) } </div> </div> <div className="content"> <div className="header"> {tongwenAutoStr(data.title, this.props.defaultLocale)} </div> </div> <div className="content"> <i className="ui orange icon large compass"></i> { data.distance >= 1 && <Translate content="geoloc.distance.km" dist={data.distance.toFixed(3)}/> } { data.distance < 1 && data.distance >= 0.01 && <Translate content="geoloc.distance.m" dist={(data.distance * 1000).toFixed(2)}/> } { data.distance < 0.01 && <Translate content="geoloc.distance.here" /> } </div> <div className={actionClasses}> <div className="ui two buttons"> <a onClick={this.props.handleGoClick} className="ui basic green button"> <Translate content="geoloc.button.go" /> </a> <a onClick={this.props.handleCloseClick} className="ui basic red button"> <Translate content="geoloc.button.close" /> </a> </div> </div> </div> </div> </div> ) } }
30.889831
102
0.563512
b4baa55140b2a901255d5af895aa142e62f73554
708
js
JavaScript
example-factory.js
bseib/drag-drop-flexbox
4e6f789f4f0d66f77d951c8c614cd1794e939d0c
[ "MIT" ]
3
2021-01-09T01:24:24.000Z
2021-07-09T14:46:20.000Z
example-factory.js
bseib/drag-drop-flexbox
4e6f789f4f0d66f77d951c8c614cd1794e939d0c
[ "MIT" ]
null
null
null
example-factory.js
bseib/drag-drop-flexbox
4e6f789f4f0d66f77d951c8c614cd1794e939d0c
[ "MIT" ]
null
null
null
window.exampleFactory = (function() { return { 'create': function(name) { var pub = { world: "hello " + name, }; var me = { justme: "can't see me " + name, }; me.callMeMaybe = function() { console.log("calling callMeMaybe: " + me.justme); }; pub.simpleCall = function() { console.log("calling simpleCall: " + pub.world); } pub.secondCall = function() { console.log("calling secondCall"); me.callMeMaybe(); } return pub; } }; })(); // from console do: // bob = exampleFactory.create('bob'); // bob.callMeMaybe(); /* fails */ // bob.simpleCall(); // bob.secondCall();
21.454545
57
0.512712
b4bb23c2b1dbfbbe85f2db0876ca87fd975c1331
1,008
js
JavaScript
core/runtime/test/mixin.test.js
bstefanescu/qutejs
609a4ba26cc0f87bb363f892d97abc9948ef40ce
[ "MIT" ]
2
2020-01-02T19:46:08.000Z
2020-01-22T20:53:00.000Z
core/runtime/test/mixin.test.js
bstefanescu/qutejs
609a4ba26cc0f87bb363f892d97abc9948ef40ce
[ "MIT" ]
5
2020-05-08T19:31:53.000Z
2020-09-06T13:57:27.000Z
core/runtime/test/mixin.test.js
bstefanescu/qutejs
609a4ba26cc0f87bb363f892d97abc9948ef40ce
[ "MIT" ]
null
null
null
import assert from 'assert'; import window from '@qutejs/window'; import Qute from '..'; const TestMixin = Qute(function() { var h1 = window.document.createElement('h1'); h1.textContent = 'Test Mixins'; return h1; }, {}); TestMixin.mixin({ addMixin1Class() { this.$el.className = 'mixin1'; } }, { addMixin2Class() { this.$el.className = 'mixin2'; }, changeText() { this.$el.textContent = 'Test Mixins changed'; } }); describe('Component Mixins', () => { it('can add mixins to a component type', () => { let test = new TestMixin().mount(); assert.ok(!test.$el.className); assert.strictEqual(test.$el.textContent, 'Test Mixins'); test.addMixin1Class(); assert.strictEqual(test.$el.className, 'mixin1'); test.addMixin2Class(); assert.strictEqual(test.$el.className, 'mixin2'); test.changeText(); assert.strictEqual(test.$el.textContent, 'Test Mixins changed'); }) });
26.526316
72
0.599206
b4bb3fcb58f109d6296821ec906c6101f919bee9
950
js
JavaScript
src/Auth.redux.js
q1w2e3r4wwww/react_demo1
2891bd16dbaeee6bbb3343868c9c2e6a21df08fc
[ "MIT" ]
null
null
null
src/Auth.redux.js
q1w2e3r4wwww/react_demo1
2891bd16dbaeee6bbb3343868c9c2e6a21df08fc
[ "MIT" ]
null
null
null
src/Auth.redux.js
q1w2e3r4wwww/react_demo1
2891bd16dbaeee6bbb3343868c9c2e6a21df08fc
[ "MIT" ]
null
null
null
import axios from 'axios' const LOGIN = 'LOGIN'; const LOGOUT = 'LOGOUT'; const USER_DATA = 'USER_DATA'; // reducer const userState = { isAuth:false, name:"王涛", age:24 } export function auth(state = userState,action) { switch (action.type) { case LOGIN: return {...state, isAuth:true}; case LOGOUT: return {...state, isAuth:false}; case USER_DATA: return {...state, ...action.payload}; default: return state; } } // action export function getUserData() { // dispatch用来通知数据修改 return dispatch => { axios.get('/data').then(res => { if (res.status === 200) { dispatch(userData(res.data)) } }) } } export function userData(data){ return { type : USER_DATA,payload:data} } export function login() { return { type:LOGIN } } export function logout() { return { type: LOGOUT } }
22.093023
49
0.56
b4bb4555143804100cbc447a7e961640ceb49991
370
js
JavaScript
examples/login-api/controller/create_token.js
DeveshPankaj/node-api
2f9db294767351e69db148d9088a0d37cda5e013
[ "MIT" ]
null
null
null
examples/login-api/controller/create_token.js
DeveshPankaj/node-api
2f9db294767351e69db148d9088a0d37cda5e013
[ "MIT" ]
null
null
null
examples/login-api/controller/create_token.js
DeveshPankaj/node-api
2f9db294767351e69db148d9088a0d37cda5e013
[ "MIT" ]
null
null
null
// Imports // Class class GetToken { constructor(platform, req, res) { this.platform = platform this.req = req this.res = res } main (input, resolve, reject) { resolve({token: "123"}) } destroy () { } } // Input GetToken.input = ({ name: 'string', password: 'string' }) // Output GetToken.output = ({ token: 'string' }) module.exports = GetToken
11.5625
34
0.616216
b4bc19dd56b4e2a14b37498a231f0e00e70825f1
2,501
js
JavaScript
src/chrome-extension/background.js
mynaparrot/plugNmeet-recorder
832934aca85b3e157d5979a5a86258683f73da42
[ "MIT" ]
null
null
null
src/chrome-extension/background.js
mynaparrot/plugNmeet-recorder
832934aca85b3e157d5979a5a86258683f73da42
[ "MIT" ]
null
null
null
src/chrome-extension/background.js
mynaparrot/plugNmeet-recorder
832934aca85b3e157d5979a5a86258683f73da42
[ "MIT" ]
null
null
null
// eslint-disable-next-line @typescript-eslint/no-unused-vars /* global chrome, navigator, MediaRecorder, FileReader */ let recorder = null; let ws; let closeByCmd = false; chrome.runtime.onConnect.addListener((port) => { port.onMessage.addListener((msg) => { switch (msg.type) { case 'START_WEBSOCKET': startWebsocket(msg.websocket_url, port); break; case 'REC_STOP': closeByCmd = true; recorder.stop(); break; case 'REC_START': recorder.start(1000); break; case 'REC_CLIENT_PLAY': if (recorder) { break; } startScreenSharing(msg, port); break; default: console.log('Unrecognized message', msg); } }); }); function startScreenSharing(msg, port) { const { tab } = port.sender; tab.url = msg.data.url; chrome.desktopCapture.chooseDesktopMedia(['tab', 'audio'], (streamId) => { // Get the stream navigator.webkitGetUserMedia( { audio: { mandatory: { chromeMediaSource: 'system', }, }, video: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: streamId, minWidth: 1920, maxWidth: 1920, minHeight: 1080, maxHeight: 1080, minFrameRate: 60, }, }, }, (stream) => { recorder = new MediaRecorder(stream, { width: { min: 1280, ideal: 1920, max: 1920 }, height: { min: 720, ideal: 1080, max: 1080 }, frameRate: { min: 30, ideal: 30 }, videoBitsPerSecond: 3000000, audioBitsPerSecond: 128000, ignoreMutedMedia: true, mimeType: 'video/webm;codecs=h264', }); recorder.ondataavailable = (event) => { if (event.data.size > 0) { if (ws.readyState === WebSocket.OPEN) { ws.send(event.data); } } }; recorder.onstop = () => { ws.close(); }; }, (error) => console.log('Unable to get user media', error), ); }); } function startWebsocket(url, port) { ws = new WebSocket(url); ws.addEventListener('error', () => { if (!closeByCmd) { port.postMessage({ websocketError: ws.readyState }); } }); ws.addEventListener('close', () => { if (!closeByCmd) { port.postMessage({ websocketError: ws.readyState }); } }); }
24.519608
76
0.530588
b4bc8e74fd97ac1a8e382c0202f63cfe79be35f5
1,298
js
JavaScript
src/reducers/TeamReducer.js
renerbaffa/315-app
fdedb6f3c81c88f00adbd20659e032b51b00ca41
[ "MIT" ]
null
null
null
src/reducers/TeamReducer.js
renerbaffa/315-app
fdedb6f3c81c88f00adbd20659e032b51b00ca41
[ "MIT" ]
10
2019-03-11T21:45:54.000Z
2019-03-23T16:13:27.000Z
src/reducers/TeamReducer.js
renerbaffa/315-app
fdedb6f3c81c88f00adbd20659e032b51b00ca41
[ "MIT" ]
null
null
null
import { SET_TEAM_NAME, SET_NEW_PLAYER, EDIT_PLAYER } from '../constants/teamReducer' import { setTeamOnLocalStorage, getTeamFromLocalStorage } from '../utils/localStorage' const emptyPlayer = { name: '', nickname: '', number: '', age: '', } export default function TeamReducer(team, action) { switch (action.type) { case SET_TEAM_NAME: const name = action.payload // @TODO: test if we still need the validation const localTeam = getTeamFromLocalStorage() || {} const newTeam = { ...localTeam, name } setTeamOnLocalStorage(newTeam) return newTeam case SET_NEW_PLAYER: const newPlayers = [...team.players] let id = 1 if (newPlayers.length > 0) { id = newPlayers[newPlayers.length - 1].id + 1 } newPlayers.push({ id, ...emptyPlayer }) const newTeamWithPlayer = { ...team, players: newPlayers } setTeamOnLocalStorage(newTeamWithPlayer) return newTeamWithPlayer case EDIT_PLAYER: const newPlayersList = team.players.map(player => ({ ...player, ...(player.id === action.payload.id && action.payload.props) })) const newTeamWithEditedPlayer = { ...team, players: newPlayersList } setTeamOnLocalStorage(newTeamWithEditedPlayer) return newTeamWithEditedPlayer default: return team } }
30.186047
86
0.682589
b4bd9c271c86fc074ab4c0b0eb8699d8a7ae351a
2,097
js
JavaScript
app.js
HaneenDarwish/test
30ba572acb5b114a3dd3d2768a3be7535066d431
[ "MIT" ]
null
null
null
app.js
HaneenDarwish/test
30ba572acb5b114a3dd3d2768a3be7535066d431
[ "MIT" ]
null
null
null
app.js
HaneenDarwish/test
30ba572acb5b114a3dd3d2768a3be7535066d431
[ "MIT" ]
null
null
null
'use strict'; // let fruit = prompt ('What kind of fruits do you want?') // fruit = fruit.toLocaleLowerCase() // console.log(fruit); // switch (fruit) { // case 'apple': // case 'yes': // console.log('Apple is delicious!'); // break; // case 'banana': // console.log('Banana is nice!'); // break; // default: // fruit= prompt('Please select your favourit fruit!') // console.log(fruit); // break; // } // let userName = prompt ('waht is your name?'); // let anotherName = ''; //falsy value // if (userName) { // alert('hello ' + userName) // } else if (!anotherName) { // alert('Please enter your name!'); // } // let i=0; // for (i=0; i<5; i++){ // if (i==2){ // break; // } // console.log(i); // } //console.log(i); // let userName = prompt ('waht is your name?'); // console.log(userName); // while (!userName) { // console.log(userName); // userName = prompt('please enter your name.') // } // console.log(typeof(userName)); // while (userName == '') { // console.log(userName); // userName = prompt('please enter your name.') // } // let i = 1; // while (i<1){ // console.log(i); // i++; // } // let grades = [100, 66, 30, 23] // grades.push(0.25); // grades.pop(); // grades.unshift(52) // grades.shift() // console.log(grades.length); // console.log(grades.indexOf(23)); // let information = ['Haneen', 'Hamzeh', 'Darwish', [27, 12, 1992,[28,5,29]]] // // console.log(information); // console.log(information[3][3][1]); // prompt('Hello!', 'Press ok to proceed') // let test = 'test'; // console.log(test); // // let test = 'test1' // let thingsToDo = ['play','swim', 'read', 'study']; // for (let i = 0; i < thingsToDo.length; i++) { // console.log(thingsToDo[i]); // let test = i // console.log(test); // } // function square(length){ // let area = length **2; // let perimeter = length*4; // // console.log (area); // return [area, perimeter] // } // console.log(square(90)[0]);
18.394737
78
0.532666
b4be55dd7422300afe15fc57493ea987d4f567b4
522
js
JavaScript
gatsby/utils/create-localized-redirect.js
misiekn/docs-website
2db640bad4210a55a8a99cb444894fd8b25269e0
[ "Apache-2.0", "CC-BY-4.0" ]
90
2020-08-19T20:27:45.000Z
2022-03-30T19:07:28.000Z
gatsby/utils/create-localized-redirect.js
misiekn/docs-website
2db640bad4210a55a8a99cb444894fd8b25269e0
[ "Apache-2.0", "CC-BY-4.0" ]
5,204
2020-08-19T18:59:49.000Z
2022-03-31T23:51:23.000Z
gatsby/utils/create-localized-redirect.js
misiekn/docs-website
2db640bad4210a55a8a99cb444894fd8b25269e0
[ "Apache-2.0", "CC-BY-4.0" ]
625
2020-09-30T19:39:20.000Z
2022-03-31T15:20:02.000Z
const path = require('path'); const createLocalizedRedirect = ({ fromPath, toPath, locales, redirectInBrowser = true, isPermanent = true, createRedirect, }) => { createRedirect({ fromPath, toPath, isPermanent, redirectInBrowser, }); locales.forEach((locale) => { createRedirect({ fromPath: path.join(`/${locale}`, fromPath), toPath: path.join(`/${locale}`, toPath), isPermanent, redirectInBrowser, }); }); }; module.exports = createLocalizedRedirect;
18
50
0.630268
b4bea34c3284c55889afb4df040eac1fb526f7fc
2,345
js
JavaScript
src/components/Sidebar.js
userly-tools/research-hub-webapp
00afa9edb8c6fa996b95529160686f120075021c
[ "MIT" ]
5
2020-09-13T19:07:41.000Z
2020-09-27T16:23:07.000Z
src/components/Sidebar.js
userly-tools/research-hub-webapp
00afa9edb8c6fa996b95529160686f120075021c
[ "MIT" ]
null
null
null
src/components/Sidebar.js
userly-tools/research-hub-webapp
00afa9edb8c6fa996b95529160686f120075021c
[ "MIT" ]
1
2020-09-12T03:24:27.000Z
2020-09-12T03:24:27.000Z
import { mdiAccountGroupOutline, mdiCalendarMultiselect, mdiCog, mdiHomeOutline, mdiLogout } from "@mdi/js"; import Icon from "@mdi/react"; import React from "react"; import { Link, useHistory } from "react-router-dom"; import styled from "styled-components"; import Logo from '../assets/logo.png' import User from '../assets/user.png' const tabs = [ { img: mdiHomeOutline, text: "PROJECTS", next: "/projects" },{ img: mdiAccountGroupOutline, text: "PARTICIPANTS", next: "/participants" }, { img: mdiCalendarMultiselect, text: "CALENDAR", next: "/calendar" }, ] const SideTab = ({img, text, isActive, next}) => { const history = useHistory(); const border = isActive ? "0.2rem solid #dee2e6" : ""; const opacity = isActive ? "1" : "0.7"; const goTo =() =>{ history.push(next) } return ( <div onClick={goTo} className={`border-primary py-2 my-2 d-flex h5 align-items-center hoverPointer px-3 head ${isActive ? "text-primary" : "text-secondary"}`} style={{borderLeft: border, opacity: opacity}}> <Icon path={img} size={1.3} /><span className="pl-3">{text}</span> </div> ) } const Sidebar = ({activeTab}) => { const isSmall = window.innerWidth <= 991.98; const pos = isSmall ? "" : "fixed" return ( <div className="d-flex flex-column h-100 pb-3" style={{position: pos}}> <CustomBrand className="no-decoration font-weight-bold h3 mb-4 d-flex align-items-center justify-content-center" to="/"><img src={Logo} alt="" width={60} />Userly</CustomBrand> {tabs.map((data, i) => ( <SideTab img={data.img} key={i} text={data.text} next={data.next} isActive={i===activeTab} /> ))} <div className="mt-auto"> <div className="d-flex align-items-end"> <img src={User} width="35%" alt="" /> <div className="head small text-uppercase"> <p className="mb-0 text-secondary" style={{opacity: "0.5"}}>Logged in as</p> <p className="text-secondary h4 mb-2">John D.</p> </div> </div> <SideTab img={mdiCog} text="SETTINGS" next="#" /> <SideTab img={mdiLogout} text="LOGOUT" next="login" /> </div> </div> ); }; const CustomBrand = styled(Link)` font-family: 'Nunito', sans-serif; &:hover { color: #5D2CFF } `; export default Sidebar;
31.689189
210
0.61322
b4c0bc86ff1c795f680c728c0b8a1779b3d171d2
767
js
JavaScript
models/scheduled-email.js
jrrjdev/postgres-sequelize-jest-docker-example
f0cf142bef512536166c27caa029d21198c7383e
[ "MIT" ]
null
null
null
models/scheduled-email.js
jrrjdev/postgres-sequelize-jest-docker-example
f0cf142bef512536166c27caa029d21198c7383e
[ "MIT" ]
null
null
null
models/scheduled-email.js
jrrjdev/postgres-sequelize-jest-docker-example
f0cf142bef512536166c27caa029d21198c7383e
[ "MIT" ]
null
null
null
'use strict'; module.exports = (sequelize, DataTypes) => { const scheduledEmail = sequelize.define('scheduledEmail', { sent: { type: DataTypes.BOOLEAN, allowNull: false }, scheduledDateTime: { type: DataTypes.DATE, allowNull: false }, toEmailAddress: { type: DataTypes.STRING, allowNull: false, validate: { isEmail: true } }, subject: { type: DataTypes.STRING, allowNull: false }, text: { type: DataTypes.TEXT, allowNull: false }, sentDateTime: { type: DataTypes.DATE, allowNull: true }, }, { indexes: [ { fields: ['sent', 'sentDateTime'], name: 'SentAndScheduledDateTime' } ] }); scheduledEmail.associate = function(models) { // associations can be defined here }; return scheduledEmail; };
34.863636
94
0.650587
b4c1692ed2c20da7880687f9ab8555f6cf3b8e34
1,946
js
JavaScript
client/src/context/reducers/index.js
3imed-jaberi/wander-pins
893ecaa631a0f1228ad22e8f40f32bb90136009a
[ "MIT" ]
null
null
null
client/src/context/reducers/index.js
3imed-jaberi/wander-pins
893ecaa631a0f1228ad22e8f40f32bb90136009a
[ "MIT" ]
null
null
null
client/src/context/reducers/index.js
3imed-jaberi/wander-pins
893ecaa631a0f1228ad22e8f40f32bb90136009a
[ "MIT" ]
null
null
null
import { LOGIN_USER, IS_LOGGED_IN, SIGNOUT_USER, CREATE_DRAFT, UPDATE_DRAFT_LOCATION, DELETE_DRAFT, GET_PINS, CREATE_PIN, SET_PIN, DELETE_PIN, CREATE_COMMENT } from '../types' export function reducer(state, { type: ActionType, payload: ActionPayload }) { switch (ActionType) { case LOGIN_USER: return { ...state, currentUser: ActionPayload } case IS_LOGGED_IN: return { ...state, isAuth: ActionPayload } case SIGNOUT_USER: return { ...state, isAuth: false, currentUser: null } case CREATE_DRAFT: return { ...state, currentPin: null, draft: { latitude: 0, longitude: 0 } } case UPDATE_DRAFT_LOCATION: return { ...state, draft: ActionPayload } case DELETE_DRAFT: return { ...state, draft: null } case GET_PINS: return { ...state, pins: ActionPayload } case CREATE_PIN: const newPin = ActionPayload const prevPin = state.pins.filter(pin => pin._id !== newPin._id) return { ...state, pins: [ ...prevPin, newPin ] } case SET_PIN: return { ...state, currentPin: ActionPayload, draft: null } case DELETE_PIN: const deletedPin = ActionPayload const filterdPins = state.pins.filter(pin => pin._id !== deletedPin._id) return { ...state, pins: filterdPins, currentPin: null } case CREATE_COMMENT: const updatedCurrentPin = ActionPayload const updatedPins = state.pins.map(pin => pin._id === updatedCurrentPin._id ? updatedCurrentPin : pin) return { ...state, pins: updatedPins, currentPin: updatedCurrentPin } default: return state } }
20.924731
108
0.546249
b4c2318a2dbec28b8cbf638f0baff9277da3bb57
336
js
JavaScript
test/adapter.js
rickkky/thener
fca16a73c80aaadfb570d6a993cc11de935f43c7
[ "MIT" ]
null
null
null
test/adapter.js
rickkky/thener
fca16a73c80aaadfb570d6a993cc11de935f43c7
[ "MIT" ]
1
2020-06-23T09:08:13.000Z
2020-06-23T09:08:13.000Z
test/adapter.js
rickkky/thener
fca16a73c80aaadfb570d6a993cc11de935f43c7
[ "MIT" ]
null
null
null
const Thener = require('../dist/index') const deferred = () => { let closure = undefined const promise = new Thener((resolve, reject) => { closure = { resolve, reject } }) return { ...closure, promise } } const resolved = Thener.resolve const rejected = Thener.reject module.exports = { deferred, resolved, rejected }
18.666667
51
0.657738
b4c2e1c59a80cbb1ce5afedb4fbdf2164433dd41
147
js
JavaScript
docs/search/enumvalues_3.js
AkiyukiOkayasu/jade
64ee0c6f4bf887c7a57aa3bf0c205b53ab15f4f1
[ "MIT" ]
1
2021-03-22T14:45:50.000Z
2021-03-22T14:45:50.000Z
docs/search/enumvalues_3.js
AkiyukiOkayasu/jade
64ee0c6f4bf887c7a57aa3bf0c205b53ab15f4f1
[ "MIT" ]
1
2021-03-23T13:21:18.000Z
2021-03-23T13:21:18.000Z
docs/search/enumvalues_3.js
AkiyukiOkayasu/jade
64ee0c6f4bf887c7a57aa3bf0c205b53ab15f4f1
[ "MIT" ]
null
null
null
var searchData= [ ['rise_132',['Rise',['../main_8cpp.html#ac22b5ec98803feb017c6ff9d1e9b30aea64d71b4eabcd8de0a1d64bd6d5973c50',1,'main.cpp']]] ];
29.4
125
0.761905
b4c458bca56397ccb7ca8816eb679307ee9d8dd3
1,224
js
JavaScript
src/cmdSwitches.js
GooseMod/OpenAsar
c6f2f5eb7827fea14cb4c54345af8ff6858c633a
[ "MIT" ]
284
2021-12-09T16:59:24.000Z
2022-03-28T08:04:28.000Z
src/cmdSwitches.js
GooseMod/OpenAsar
c6f2f5eb7827fea14cb4c54345af8ff6858c633a
[ "MIT" ]
40
2021-12-09T16:21:39.000Z
2022-03-27T22:00:53.000Z
src/cmdSwitches.js
GooseMod/OpenAsar
c6f2f5eb7827fea14cb4c54345af8ff6858c633a
[ "MIT" ]
20
2021-12-10T22:56:03.000Z
2022-03-28T00:05:45.000Z
const { app } = require('electron'); const presets = { 'base': '--autoplay-policy=no-user-gesture-required --disable-features=WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService', // Base Discord 'perf': `--enable-gpu-rasterization --enable-zero-copy --ignore-gpu-blocklist --enable-hardware-overlays=single-fullscreen,single-on-top,underlay --enable-features=EnableDrDc,CanvasOopRasterization,BackForwardCache:TimeToLiveInBackForwardCacheInSeconds/300/should_ignore_blocklists/true/enable_same_site/true,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation --disable-features=Vulkan --force_high_performance_gpu`, // Performance 'battery': '--enable-features=TurnOffStreamingMediaCachingOnBattery --force_low_power_gpu' // Known to have better battery life for Chromium? }; module.exports = () => { let c = {}; for (const x of ('base,' + (oaConfig.cmdPreset || 'perf')).split(',').reduce((a, x) => a.concat(presets[x]?.split(' ')), [])) { if (!x) continue; const [ k, v ] = x.split('='); (c[k] = c[k] || []).push(v); } for (const k in c) { app.commandLine.appendSwitch(k.replace('--', ''), c[k].join(',')); } };
55.636364
482
0.722222
b4c4606ecaf6aeb7deceab33979cfc7b3374a07c
1,775
js
JavaScript
demo/nerdlets/nr1-community-demo-nerdlet/pages/NerdGraphError/examples/basic.js
tangollama/nr1-community
498916bdd2363933c5a90ebbfe8f76b7c52f6e43
[ "Apache-2.0" ]
10
2020-01-28T22:26:13.000Z
2021-12-22T11:18:23.000Z
demo/nerdlets/nr1-community-demo-nerdlet/pages/NerdGraphError/examples/basic.js
tangollama/nr1-community
498916bdd2363933c5a90ebbfe8f76b7c52f6e43
[ "Apache-2.0" ]
67
2019-11-25T17:53:39.000Z
2022-02-02T17:57:19.000Z
demo/nerdlets/nr1-community-demo-nerdlet/pages/NerdGraphError/examples/basic.js
tangollama/nr1-community
498916bdd2363933c5a90ebbfe8f76b7c52f6e43
[ "Apache-2.0" ]
11
2019-11-28T14:41:26.000Z
2022-02-25T16:40:18.000Z
import React from 'react'; import PropTypes from 'prop-types'; import { NerdGraphQuery } from 'nr1'; import { NerdGraphError } from '@/../dist'; import CodeHighlight from '../../../shared/components/CodeHighlight'; export default class NerdGraphErrorBasicDemo extends React.Component { static propTypes = { header: PropTypes.object }; constructor(props) { super(props); this.state = { enableLiveEditing: false }; } renderHighlight() { const { enableLiveEditing } = this.state; const scope = { NerdGraphQuery, NerdGraphError }; const code = ` () => { // Enclosed in an arrow function so we can show you query and variables const query = \` query($id: Int!) { actor { account(id: $id) { name } } } \`; const variables = { id: 1111111111111 // Not a real account id, triggers the error }; return ( <NerdGraphQuery query={query} variables={variables}> {({ loading, data, error }) => { if (error) { return <NerdGraphError error={error} />; } return null; }} </NerdGraphQuery> ); } `; return ( <CodeHighlight scope={scope} code={code} language="jsx" use="react-live" enableLiveEditing={enableLiveEditing} /> ); } render() { const { header } = this.props; return ( <div className="example-container"> <h3 id={header.id}>{header.text}</h3> <p> Demonstrate the default behavior of displaying captured errors in an Apollo-based GraphQL error. </p> <div className="example-container-content"> {this.renderHighlight()} </div> </div> ); } }
21.646341
106
0.567887
b4c5935a82812b69038ccdd63d096d1a7a44917f
163
js
JavaScript
packages/dd-badge/index.js
Lazydd/ddlazy-ui
a0fcbe9e0808df11c23e43bd9ecb12e242d4195d
[ "MIT" ]
null
null
null
packages/dd-badge/index.js
Lazydd/ddlazy-ui
a0fcbe9e0808df11c23e43bd9ecb12e242d4195d
[ "MIT" ]
1
2022-03-08T12:23:45.000Z
2022-03-08T12:23:46.000Z
packages/dd-badge/index.js
Lazydd/ddlazy-ui
a0fcbe9e0808df11c23e43bd9ecb12e242d4195d
[ "MIT" ]
null
null
null
// 导入组件 import ddBadge from "./src"; // 为组件提供install安装方法,供按需引入 ddBadge.install = Vue => { Vue.component(ddBadge.name, ddBadge) } // 暴露组件 export default ddBadge
20.375
40
0.711656
b4c66e33caed7a739e880d83ce8dcacea9ad3c83
519
js
JavaScript
composables/useState.js
mikehappythoughts/Nuxt-covid19-dashboard
72eb5bd536fa19fa47e991050cd7223297fe5643
[ "MIT" ]
null
null
null
composables/useState.js
mikehappythoughts/Nuxt-covid19-dashboard
72eb5bd536fa19fa47e991050cd7223297fe5643
[ "MIT" ]
null
null
null
composables/useState.js
mikehappythoughts/Nuxt-covid19-dashboard
72eb5bd536fa19fa47e991050cd7223297fe5643
[ "MIT" ]
null
null
null
import { ref, computed, readonly } from '@nuxtjs/composition-api' const state = ref({ covidData: {}, data: {}, }) const isDataLoaded = ref(false) export default function useState() { const setStateData = ({ covidData }) => { state.value.covidData = covidData isDataLoaded.value = true } return { setStateData, isDataReady: computed(() => isDataLoaded.value), storeState: computed(() => readonly(state.value)), covidData: computed(() => readonly(state.value.covidData.data)), } }
22.565217
68
0.65896
b4c8cb89059b32bae1e0352d3848e95cf73534ea
572
js
JavaScript
icons/music_note_outlined/MusicNoteOutlined.js
rook2pawn/password-manager-baseweb
7a6655bfa0758569738a042fc7deb3b730607126
[ "ISC", "MIT" ]
null
null
null
icons/music_note_outlined/MusicNoteOutlined.js
rook2pawn/password-manager-baseweb
7a6655bfa0758569738a042fc7deb3b730607126
[ "ISC", "MIT" ]
null
null
null
icons/music_note_outlined/MusicNoteOutlined.js
rook2pawn/password-manager-baseweb
7a6655bfa0758569738a042fc7deb3b730607126
[ "ISC", "MIT" ]
null
null
null
import * as React from "react"; function SvgMusicNoteOutlined(props) { return ( <svg width={24} height={24} fill="none" xmlns="http://www.w3.org/2000/svg" {...props} > <path d="M7 1v12.4c-.6-.3-1.3-.4-2-.4-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5V9h9v4.4c-.6-.3-1.3-.4-2-.4-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5V1H7zM5 20c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm12 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM10 6V4h9v2h-9z" fill="currentColor" /> </svg> ); } export default SvgMusicNoteOutlined;
27.238095
257
0.543706
b4c8e29836c125cb13494edb2840f5def7129c23
367
js
JavaScript
probe/workers/containerSecurity.js
augustinebest/app
74e797de5b43e8e9d34e6323ed8590f4c0bc1bb2
[ "Apache-2.0" ]
null
null
null
probe/workers/containerSecurity.js
augustinebest/app
74e797de5b43e8e9d34e6323ed8590f4c0bc1bb2
[ "Apache-2.0" ]
null
null
null
probe/workers/containerSecurity.js
augustinebest/app
74e797de5b43e8e9d34e6323ed8590f4c0bc1bb2
[ "Apache-2.0" ]
null
null
null
const ErrorService = require('../utils/errorService'); const ContainerService = require('../utils/containerService'); module.exports = { scan: async security => { try { await ContainerService.scan(security); } catch (error) { ErrorService.log('containerSecurity.scan', error); throw error; } }, };
26.214286
62
0.591281
b4c97cc73b2026997babd9fab9fcd09c3bffc187
751
js
JavaScript
test/utils/getEasing.test.js
Mefjus/react-tiger-transition
48f89133cc7a011602fd427a166b309204ca5d21
[ "MIT" ]
502
2019-12-01T08:03:43.000Z
2022-03-13T19:45:33.000Z
test/utils/getEasing.test.js
Mefjus/react-tiger-transition
48f89133cc7a011602fd427a166b309204ca5d21
[ "MIT" ]
35
2019-12-13T18:11:07.000Z
2022-02-26T19:56:45.000Z
test/utils/getEasing.test.js
Mefjus/react-tiger-transition
48f89133cc7a011602fd427a166b309204ca5d21
[ "MIT" ]
33
2019-10-27T10:12:13.000Z
2022-03-13T19:45:37.000Z
import { getEasing } from '../../src/utils'; const easings = [ 'easeInSine', 'easeOutSine', 'easeInOutSine', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeInQuint', 'easeOutQuint', 'easeInOutQuint', 'easeInCirc', 'easeOutCirc', 'easeInOutCirc', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad', 'easeInQuart', 'easeOutQuart', 'easeInOutQuart', 'easeInExpo', 'easeOutExpo', 'easeInOutExpo', 'easeInBack', 'easeOutBack', 'easeInOutBack' ]; describe('getEasing', () => { easings.map(easing => { test(`${easing} is defined`, () => { expect(getEasing(easing)).not.toBe(easing); }); }) test('Default returns input', () => { expect(getEasing('easing')).toBe('easing'); }); })
18.317073
49
0.612517
b4cc70273f20997853727868cfe9d902b6b0de82
295
js
JavaScript
test/bigtest/network/factories/file.js
folio-org/ui-localkbadmin
613d75ba6eef13ea88289cc9533f66ca46f3f511
[ "Apache-2.0" ]
null
null
null
test/bigtest/network/factories/file.js
folio-org/ui-localkbadmin
613d75ba6eef13ea88289cc9533f66ca46f3f511
[ "Apache-2.0" ]
186
2019-07-01T18:32:08.000Z
2022-03-22T11:49:08.000Z
test/bigtest/network/factories/file.js
folio-org/ui-localkbadmin
613d75ba6eef13ea88289cc9533f66ca46f3f511
[ "Apache-2.0" ]
4
2019-10-03T12:59:28.000Z
2020-09-03T07:16:27.000Z
import { Factory } from 'miragejs'; import faker from 'faker'; export default Factory.extend({ id: () => faker.random.uuid(), contentType: () => 'application/json', size: () => faker.random.number(), modified: () => faker.date.recent().getTime(), name: () => faker.random.words() });
26.818182
48
0.627119
b4cd13b9c6f1f28f9dea2f55c16a777c74c3aef7
359
js
JavaScript
src/components/Screens/index.js
elationbase/am-2020
9d27a6755ba66b5aa3d7fe11aa5fa53756e42ca7
[ "MIT" ]
null
null
null
src/components/Screens/index.js
elationbase/am-2020
9d27a6755ba66b5aa3d7fe11aa5fa53756e42ca7
[ "MIT" ]
null
null
null
src/components/Screens/index.js
elationbase/am-2020
9d27a6755ba66b5aa3d7fe11aa5fa53756e42ca7
[ "MIT" ]
null
null
null
import React from 'react'; import { commasToArray, i18n } from '../../utils'; const Screens = ({ images }) => { return ( <section> <h3>{i18n.t('project.SCREENS')}</h3> {commasToArray(images).map((image, index) => ( <img key={index} src={`../../projects/${image}`} alt="" /> ))} </section> ); }; export default Screens;
22.4375
66
0.543175
b4cd46b907f4d16819f0acf24bc35826185e5a0c
2,813
js
JavaScript
packages/ui/src/components/tooltip/Tooltip.js
dkandalam/borrow-ui
cd59ff5b59d92726fc5ee0176ac97178f9f9ff7a
[ "MIT" ]
6
2020-03-24T13:21:54.000Z
2021-12-12T23:48:52.000Z
packages/ui/src/components/tooltip/Tooltip.js
dkandalam/borrow-ui
cd59ff5b59d92726fc5ee0176ac97178f9f9ff7a
[ "MIT" ]
29
2020-05-01T14:14:26.000Z
2022-01-05T21:51:43.000Z
packages/ui/src/components/tooltip/Tooltip.js
dkandalam/borrow-ui
cd59ff5b59d92726fc5ee0176ac97178f9f9ff7a
[ "MIT" ]
2
2020-08-11T08:05:39.000Z
2021-11-15T07:30:40.000Z
import React from 'react'; import PropTypes from 'prop-types'; import { UI_PREFIX } from '../../config'; import { propTypesChildren } from '../../utils/types'; import { ReferenceOverlay, PLACEMENTS } from '../reference-overlay/ReferenceOverlay'; const TOOLTIP_CLASS = `${UI_PREFIX}__tooltip`; const TOOLTIP_MIN_WIDTH_CLASS = `${UI_PREFIX}__tooltip--min-width`; const TOOLTIP_MAX_WIDTH_CLASS = `${UI_PREFIX}__tooltip--max-width`; const TOOLTIP_ARROW_CLASS = `${UI_PREFIX}__tooltip__arrow`; export function Tooltip({ tooltip, children, placement = 'top', triggerMode = 'hover', minWidth = true, maxWidth = true, tooltipProps = {}, tooltipArrowProps = {}, popperProps, className = '', ...rest }) { const { className: tooltipPropsClass = '', ...restTooltipProps } = tooltipProps; const { className: tooltipArrowPropsClass = '', ...restTooltipArrowProps } = tooltipArrowProps; const minWidthClass = minWidth ? TOOLTIP_MIN_WIDTH_CLASS : ''; const maxWidthClass = maxWidth ? TOOLTIP_MAX_WIDTH_CLASS : ''; const widthClasses = `${minWidthClass} ${maxWidthClass}`.trim(); const tooltipClass = `${TOOLTIP_CLASS} ${widthClasses} ${tooltipPropsClass}`.trim(); const tooltipArrowClass = `${TOOLTIP_ARROW_CLASS} ${tooltipArrowPropsClass}`.trim(); return ( <ReferenceOverlay overlayContent={tooltip} className={className} triggerProps={rest} triggerMode={triggerMode} overlayProps={{ className: tooltipClass, ...restTooltipProps, }} overlayArrowProps={{ className: tooltipArrowClass, ...restTooltipArrowProps, }} placement={placement} popperProps={popperProps} > {children} </ReferenceOverlay> ); } Tooltip.propTypes = { /** Tooltip content */ tooltip: propTypesChildren, /** Trigger */ children: propTypesChildren, /** Tooltip placement */ placement: PropTypes.oneOf(PLACEMENTS), /** Which event will make the tooltip visible */ triggerMode: PropTypes.oneOf(['hover', 'click']), /** Applies a class with min-width (150px) */ minWidth: PropTypes.bool, /** Applies a class with max-width (300px) */ maxWidth: PropTypes.bool, /** Props passed to the tooltip container */ tooltipProps: PropTypes.shape({ className: PropTypes.string, }), /** Props passed to the tooltip arrow */ tooltipArrowProps: PropTypes.shape({ className: PropTypes.string, }), /** Props forwarded to popper hook. * See [documentation](https://popper.js.org/react-popper/v2/hook/). */ popperProps: PropTypes.object, className: PropTypes.string, };
33.094118
99
0.637398
b4cdd77b383ee00fde9000e92a2c172b39d69d42
3,683
js
JavaScript
static/js/adminNewsItem.js
bbondy/brianbondy.gae
5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c
[ "MIT" ]
null
null
null
static/js/adminNewsItem.js
bbondy/brianbondy.gae
5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c
[ "MIT" ]
null
null
null
static/js/adminNewsItem.js
bbondy/brianbondy.gae
5c189e5d8f1ee0fdc77ab48c21f3da2c9e3f246c
[ "MIT" ]
null
null
null
/** * @jsx React.DOM */ 'use strict'; define(['models', 'react', 'showdown'], function(models, React, Showdown) { var converter = new Showdown.converter(); /** * The HTML form for filling out the blog post */ var NewsItemForm = React.createClass({ getInitialState: function() { if (newsItemId) { return { newsItem: new models.NewsItem( { id: newsItemId }) }; } else { return { newsItem: new models.NewsItem() }; } }, loadFromServer: function() { if (newsItemId) { var newsItem = this.state.newsItem; newsItem.fetch({ data: $.param({ uncached: 1}) }).done(function() { this.setState({ newsItem: newsItem }); }.bind(this)); } }, componentWillMount: function() { this.loadFromServer(); }, handleSubmit: function(event) { event.preventDefault(); var title = this.refs.title.getDOMNode().value.trim(); var body = this.refs.body.getDOMNode().value.trim(); var tagsStr = this.refs.tags.getDOMNode().value.trim(); var draft = this.refs.draft.getDOMNode().checked; // Normally you want to filter out HTML here but this is from an authenticated trusted source //body = body.replace(/(<([^>]+)>)/ig,''); //title = title.replace(/(<([^>]+)>)/ig,''); if (!title || !body) { return false; } this.state.newsItem.set({body: body, title: title, tags: tagsStr.split(','), draft: draft}); this.state.newsItem.save().done(function(newsItem) { alert('saved!'); }.bind(this)); return false; }, handleSaveAndContinue: function() { this.handleSubmit(); return false; }, handleSaveAndDone: function() { this.handleSubmit(); return false; }, handleDelete: function() { if (!confirm('Are you sure you want to remove this blog post completely?')) { return; } this.state.newsItem.destroy().done(function() { location.href = '/admin/newsItems/'; }.bind(this)); }, handleChange: function(event) { var id = event.target.id; var val = event.target.value; if (id === 'draft') val = event.target.checked; this.state.newsItem.set(id, val); this.setState({ }); }, render: function() { return ( <div> <form className='NewsItemForm' onSubmit={this.handleSubmit}> <input className='newsItem' type='text' id='title' ref='title' size='60' placeholder='Title of the blog post' value={this.state.newsItem.get('title')} onChange={this.handleChange} /> <textarea className='newsItem' rows='6' cols='200' placeholder='Blog post in markdown here!' ref='body' id='body' value={this.state.newsItem.get('body')} onChange={this.handleChange} /> <br/> <label htmlFor='tags' className='newsItem'>Tags:</label> <input className='newsItem' type='text' id='tags' ref='tags' size='60' placeholder='Comma separated list of tags here' value={this.state.newsItem.tagsStr()} onChange={this.handleChange} /> <input className='newsItem' type='checkbox' id='draft' ref='draft' checked={this.state.newsItem.get('draft')} onChange={this.handleChange}>Draft</input> <p> <a href='#' onClick={this.handleSubmit}>Save and continue</a> | <a href='#' onClick={this.handleDelete}>Delete</a> </p> </form> <br/> <p><a href='/admin/newsItems/'>Back to News Items</a></p> </div> ); } }); React.renderComponent( <NewsItemForm />, document.getElementById('news-item-form') ); return NewsItemForm; });
33.481818
198
0.59218
b4d0285d70a8ddf8ce67447fa8bdd5faa52476c6
263
js
JavaScript
src/jobs/ThumbnailReport.js
saurabharch/rollout
f268c3140e18311fc107aa678f14b878b1361722
[ "MIT" ]
2
2020-02-12T09:00:34.000Z
2021-06-27T07:03:58.000Z
src/jobs/ThumbnailReport.js
saurabharch/rollout
f268c3140e18311fc107aa678f14b878b1361722
[ "MIT" ]
225
2020-02-14T19:47:18.000Z
2022-03-25T17:43:15.000Z
src/jobs/ThumbnailReport.js
saurabharch/rollout
f268c3140e18311fc107aa678f14b878b1361722
[ "MIT" ]
2
2021-01-31T17:30:26.000Z
2022-02-16T04:14:24.000Z
const multer = require('multer'); const ffmpeg = require('fluent-ffmpeg'); export default{ key: 'ThumnailReport', options: { delay: 5000 }, async handle({ data }){ const { InputData } = data; console.log(InputData); } };
17.533333
40
0.577947
b4d0ad05cd3b27fd4ecbf6ce461102a692e2a9c0
2,320
js
JavaScript
src/notice/DropDownNotice.js
changkai244/react-native-ios-comps
3322b7f6f339a1fafe631ad4c7f595e08664d076
[ "MIT" ]
4
2018-01-23T23:58:31.000Z
2018-07-11T09:58:04.000Z
src/notice/DropDownNotice.js
changkai244/react-native-ios-comps
3322b7f6f339a1fafe631ad4c7f595e08664d076
[ "MIT" ]
2
2018-06-25T07:51:19.000Z
2018-08-19T13:13:21.000Z
src/notice/DropDownNotice.js
changkai244/react-native-ios-comps
3322b7f6f339a1fafe631ad4c7f595e08664d076
[ "MIT" ]
1
2018-09-05T03:07:23.000Z
2018-09-05T03:07:23.000Z
import React, {PureComponent} from 'react'; import {View, Text, StyleSheet, Animated} from 'react-native'; import NoticeImage from "./NoticeImage"; import {noticeTypes} from "./Notice"; const colors = { [noticeTypes.info]: '#5084ef', [noticeTypes.warn]: '#FF9F35', [noticeTypes.success]: '#48CB25', [noticeTypes.fail]: '#FF5656', [noticeTypes.loading]: '#5084ef', }; class DropDownNotice extends PureComponent { constructor(props) { super(props); this.state = { animationValue: new Animated.Value(0), }; } componentDidMount() { Animated.spring(this.state.animationValue, { toValue: 1, duration: 450, friction: 9, useNativeDriver: true, }).start(); const {interval} = this.props; if (interval) { setTimeout(() => { Animated.spring(this.state.animationValue, { toValue: 0, duration: 450, friction: 9, useNativeDriver: true, }).start(); }, interval - 900); } } render() { const {data} = this.props; const { icon, title, subTitle, noticeType } = data; const wrapperStyle = { transform: [ { translateY: this.state.animationValue.interpolate({ inputRange: [0, 1], outputRange: [0, 82], }), }, ], backgroundColor: colors[noticeType] }; return ( <Animated.View style={[styles.container, wrapperStyle]}> <View style={styles.imageContainer}> <NoticeImage icon={icon} noticeType={noticeType} /> </View> <View style={styles.right}> <Text style={{color: 'white', fontSize: 19}}>{title}</Text> {subTitle ? <Text style={{color: 'white', fontSize: 14, marginTop: 5}}>{subTitle}</Text> : null } </View> </Animated.View> ); } } export default DropDownNotice; const styles = StyleSheet.create({ container: { position: 'absolute', left: 0, right: 0, top: -82, flexDirection: 'row', paddingTop: 20, alignItems: 'center', height: 82 }, imageContainer: { marginLeft: 12, marginRight: 12, }, right: { flex: 1, flexDirection: 'column', justifyContent: 'center', } });
22.095238
95
0.55819
b4d0ad859a4ceab15f97855d5820517948516eac
9,091
js
JavaScript
build/compiled/test/functional/persistence/partial-persist/partial-persist.js
monkeymon/typeorm
694c91607902a08b9b6f557b827e267b46571136
[ "MIT" ]
null
null
null
build/compiled/test/functional/persistence/partial-persist/partial-persist.js
monkeymon/typeorm
694c91607902a08b9b6f557b827e267b46571136
[ "MIT" ]
null
null
null
build/compiled/test/functional/persistence/partial-persist/partial-persist.js
monkeymon/typeorm
694c91607902a08b9b6f557b827e267b46571136
[ "MIT" ]
null
null
null
"use strict"; var _this = this; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); require("reflect-metadata"); var test_utils_1 = require("../../../utils/test-utils"); var Post_1 = require("./entity/Post"); var Category_1 = require("./entity/Category"); var chai_1 = require("chai"); var Counters_1 = require("./entity/Counters"); describe("persistence > partial persist", function () { // ------------------------------------------------------------------------- // Configuration // ------------------------------------------------------------------------- var connections; before(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, test_utils_1.createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], })]; case 1: return [2 /*return*/, connections = _a.sent()]; } }); }); }); beforeEach(function () { return test_utils_1.reloadTestingDatabases(connections); }); after(function () { return test_utils_1.closeTestingConnections(connections); }); // ------------------------------------------------------------------------- // Specifications // ------------------------------------------------------------------------- it("should persist partial entities without data loss", function () { return Promise.all(connections.map(function (connection) { return tslib_1.__awaiter(_this, void 0, void 0, function () { var postRepository, categoryRepository, newCategory, newPost, loadedPost, loadedPostAfterTitleUpdate, loadedPostAfterStarsUpdate, loadedPostAfterCategoryUpdate; return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: postRepository = connection.getRepository(Post_1.Post); categoryRepository = connection.getRepository(Category_1.Category); newCategory = new Category_1.Category(); newCategory.id = 1; newCategory.name = "Animals"; newCategory.position = 999; return [4 /*yield*/, categoryRepository.save(newCategory)]; case 1: _a.sent(); newPost = new Post_1.Post(); newPost.id = 1; newPost.title = "All about animals"; newPost.description = "Description of the post about animals"; newPost.categories = [newCategory]; newPost.counters = new Counters_1.Counters(); newPost.counters.stars = 5; newPost.counters.commentCount = 2; newPost.counters.metadata = "Animals Metadata"; return [4 /*yield*/, postRepository.save(newPost)]; case 2: _a.sent(); return [4 /*yield*/, postRepository.findOne(newPost.id, { join: { alias: "post", leftJoinAndSelect: { categories: "post.categories" } } })]; case 3: loadedPost = _a.sent(); chai_1.expect(loadedPost).not.to.be.undefined; chai_1.expect(loadedPost.categories).not.to.be.undefined; loadedPost.title.should.be.equal("All about animals"); loadedPost.description.should.be.equal("Description of the post about animals"); loadedPost.categories[0].name.should.be.equal("Animals"); loadedPost.categories[0].position.should.be.equal(999); loadedPost.counters.metadata.should.be.equal("Animals Metadata"); loadedPost.counters.stars.should.be.equal(5); loadedPost.counters.commentCount.should.be.equal(2); // now update partially return [4 /*yield*/, postRepository.update({ title: "All about animals" }, { title: "All about bears" })]; case 4: // now update partially _a.sent(); return [4 /*yield*/, postRepository.findOne(1, { join: { alias: "post", leftJoinAndSelect: { categories: "post.categories" } } })]; case 5: loadedPostAfterTitleUpdate = _a.sent(); chai_1.expect(loadedPostAfterTitleUpdate).not.to.be.undefined; chai_1.expect(loadedPostAfterTitleUpdate.categories).not.to.be.undefined; loadedPostAfterTitleUpdate.title.should.be.equal("All about bears"); loadedPostAfterTitleUpdate.description.should.be.equal("Description of the post about animals"); loadedPostAfterTitleUpdate.categories[0].name.should.be.equal("Animals"); loadedPostAfterTitleUpdate.categories[0].position.should.be.equal(999); loadedPostAfterTitleUpdate.counters.metadata.should.be.equal("Animals Metadata"); loadedPostAfterTitleUpdate.counters.stars.should.be.equal(5); loadedPostAfterTitleUpdate.counters.commentCount.should.be.equal(2); // now update in partial embeddable column return [4 /*yield*/, postRepository.update({ id: 1 }, { counters: { stars: 10 } })]; case 6: // now update in partial embeddable column _a.sent(); return [4 /*yield*/, postRepository.findOne(1, { join: { alias: "post", leftJoinAndSelect: { categories: "post.categories" } } })]; case 7: loadedPostAfterStarsUpdate = _a.sent(); chai_1.expect(loadedPostAfterStarsUpdate).not.to.be.undefined; chai_1.expect(loadedPostAfterStarsUpdate.categories).not.to.be.undefined; loadedPostAfterStarsUpdate.title.should.be.equal("All about bears"); loadedPostAfterStarsUpdate.description.should.be.equal("Description of the post about animals"); loadedPostAfterStarsUpdate.categories[0].name.should.be.equal("Animals"); loadedPostAfterStarsUpdate.categories[0].position.should.be.equal(999); loadedPostAfterStarsUpdate.counters.metadata.should.be.equal("Animals Metadata"); loadedPostAfterStarsUpdate.counters.stars.should.be.equal(10); loadedPostAfterStarsUpdate.counters.commentCount.should.be.equal(2); // now update in relational column return [4 /*yield*/, postRepository.save({ id: 1, categories: [{ id: 1, name: "Bears" }] })]; case 8: // now update in relational column _a.sent(); return [4 /*yield*/, postRepository.findOne(1, { join: { alias: "post", leftJoinAndSelect: { categories: "post.categories" } } })]; case 9: loadedPostAfterCategoryUpdate = _a.sent(); chai_1.expect(loadedPostAfterCategoryUpdate).not.to.be.undefined; chai_1.expect(loadedPostAfterCategoryUpdate.categories).not.to.be.undefined; loadedPostAfterCategoryUpdate.title.should.be.equal("All about bears"); loadedPostAfterCategoryUpdate.description.should.be.equal("Description of the post about animals"); loadedPostAfterCategoryUpdate.categories[0].name.should.be.equal("Bears"); loadedPostAfterCategoryUpdate.categories[0].position.should.be.equal(999); loadedPostAfterCategoryUpdate.counters.metadata.should.be.equal("Animals Metadata"); loadedPostAfterCategoryUpdate.counters.stars.should.be.equal(10); loadedPostAfterCategoryUpdate.counters.commentCount.should.be.equal(2); return [2 /*return*/]; } }); }); })); }); }); //# sourceMappingURL=partial-persist.js.map
59.418301
194
0.511275
b4d2115358ca32228a7c68f86c184ebe076daaa2
165
js
JavaScript
JavaScript/ES6/module8.js
zhuyudong/blog
f3dbddb0065ce8e314718d1a1201c7cafc8a8465
[ "MIT" ]
1
2019-06-04T21:00:07.000Z
2019-06-04T21:00:07.000Z
JavaScript/ES6/module8.js
zhuyudong/blog
f3dbddb0065ce8e314718d1a1201c7cafc8a8465
[ "MIT" ]
2
2020-07-18T13:36:36.000Z
2021-05-09T03:07:45.000Z
JavaScript/ES6/module8.js
zhuyudong/blog
f3dbddb0065ce8e314718d1a1201c7cafc8a8465
[ "MIT" ]
1
2019-08-29T02:59:37.000Z
2019-08-29T02:59:37.000Z
exports.done = false; var mod7 = require('./module7'); console.log('在 module7.js 中, mod7.done = %j', mod7.done); exports.done = true; console.log('module8.js 执行完毕');
33
57
0.684848
b4d216997c7dd36844cf853ad7bfbaaedcaeef49
3,105
js
JavaScript
src/rmi/stub.js
betajs/betajs
36bea5c0b2431f710e28ee8eb38d9419647c18a3
[ "Apache-2.0" ]
19
2015-05-09T15:57:02.000Z
2022-03-27T20:53:55.000Z
src/rmi/stub.js
betajs/betajs
36bea5c0b2431f710e28ee8eb38d9419647c18a3
[ "Apache-2.0" ]
16
2015-06-10T05:17:01.000Z
2022-02-24T15:55:51.000Z
src/rmi/stub.js
betajs/betajs
36bea5c0b2431f710e28ee8eb38d9419647c18a3
[ "Apache-2.0" ]
5
2016-11-24T07:31:02.000Z
2020-11-22T06:14:28.000Z
Scoped.define("module:RMI.Stub", [ "module:Class", "module:Classes.InvokerMixin", "module:Functions" ], function(Class, InvokerMixin, Functions, scoped) { return Class.extend({ scoped: scoped }, [InvokerMixin, function(inherited) { /** * Abstract Stub Class * * @class BetaJS.RMI.Stub */ return { /** * * @member {array} intf abstract interface list, needs to be overwritten in subclasses */ intf: [], /** * * @member {object} serializes list of serialization information */ serializes: {}, /** * Instantiates the stub. * */ constructor: function() { inherited.constructor.call(this); this.invoke_delegate("invoke", this.intf); }, /** * @override */ destroy: function() { this.invoke("_destroy"); inherited.destroy.call(this); }, /** * @override */ invoke: function(message) { return this.__send(message, Functions.getArguments(arguments, 1), this.serializes[message]); } }; }]); }); Scoped.define("module:RMI.StubSyncer", [ "module:Class", "module:Classes.InvokerMixin", "module:Functions", "module:Promise" ], function(Class, InvokerMixin, Functions, Promise, scoped) { return Class.extend({ scoped: scoped }, [InvokerMixin, function(inherited) { /** * Stub Syncer class for executing RMI methods one after the other. * * @class BetaJS.RMI.StubSyncer */ return { /** * Instantiates the stub syncer. * * @param {object} stub stub object */ constructor: function(stub) { inherited.constructor.call(this); this.__stub = stub; this.__current = null; this.__queue = []; this.invoke_delegate("invoke", this.__stub.intf); }, /** * @override */ invoke: function() { var object = { args: Functions.getArguments(arguments), promise: Promise.create() }; this.__queue.push(object); if (!this.__current) this.__next(); return object.promise; }, /** * @private */ __next: function() { if (this.__queue.length === 0) return; this.__current = this.__queue.shift(); this.__stub.invoke.apply(this.__stub, this.__current.args).forwardCallback(this.__current.promise).callback(this.__next, this); } }; }]); });
27.236842
143
0.455072
b4d474d66d3643b5f686e5e10992acda45b73200
123
js
JavaScript
app/containers/LiteVaults/constants.js
zer0cache/yearn-finance
4d97295bb71904494d94b2bf9edd65fb32a24a0c
[ "MIT" ]
140
2021-03-01T14:47:41.000Z
2022-03-30T08:54:34.000Z
app/containers/LiteVaults/constants.js
zer0cache/yearn-finance
4d97295bb71904494d94b2bf9edd65fb32a24a0c
[ "MIT" ]
173
2021-03-01T18:02:53.000Z
2021-12-30T15:09:50.000Z
app/containers/LiteVaults/constants.js
devhani/yearn-finance
dddd1049c7873739602b96b750fcaab5cfdab088
[ "MIT" ]
76
2021-03-02T02:47:46.000Z
2022-03-09T04:19:50.000Z
export const VAULTS_LOADED = 'VAULTS_LOADED'; export const USER_VAULT_STATISTICS_LOADED = 'USER_VAULT_STATISTICS_LOADED ';
41
76
0.845528
b4d5bfbf1b394ef1a6923d65f1cf39d94c24357d
606
js
JavaScript
p5js/slippy-map/classes/tile_set.js
brianhonohan/sketchbook
b43df1a8106e1073500ddf37885a8537c702be7b
[ "MIT" ]
10
2021-12-16T18:47:37.000Z
2022-03-12T00:28:01.000Z
p5js/slippy-map/classes/tile_set.js
brianhonohan/sketchbook
b43df1a8106e1073500ddf37885a8537c702be7b
[ "MIT" ]
4
2018-09-08T04:00:26.000Z
2021-12-25T18:19:34.000Z
p5js/slippy-map/classes/tile_set.js
brianhonohan/sketchbook
b43df1a8106e1073500ddf37885a8537c702be7b
[ "MIT" ]
null
null
null
class TileSet { constructor(zoom, tileRenderer){ this.zoom = zoom; this.tileRenderer = tileRenderer; this.tiles = {}; this.rowCount = TileSet.rowCount(this.zoom); this.colCount = TileSet.colCount(this.zoom); } static rowCount(zoomLevel) { return Math.pow(2, zoomLevel); } static colCount(zoomLevel) { return TileSet.rowCount(zoomLevel); } getTile(x, y){ const tileIdx = `${x}/${y}`; let tile = this.tiles[tileIdx]; if (tile){ return tile; } this.tiles[tileIdx] = this.tileRenderer.renderTile(x, y, this.zoom); return this.tiles[tileIdx]; } }
26.347826
72
0.648515
b4d625bbd9ef431ae04badb4252f4f533daed55b
22,505
js
JavaScript
client/src/scripts/app.js
hannyajin/bittysound
3a82bbc80412d3230c35c75f359f336ba9cbd408
[ "MIT" ]
8
2015-06-16T15:34:17.000Z
2016-01-06T03:59:25.000Z
client/src/scripts/app.js
hannyajin/bittysound
3a82bbc80412d3230c35c75f359f336ba9cbd408
[ "MIT" ]
2
2016-02-09T03:21:48.000Z
2019-02-12T16:31:42.000Z
client/src/scripts/app.js
talmobi/bittysound
3a82bbc80412d3230c35c75f359f336ba9cbd408
[ "MIT" ]
3
2016-02-09T03:21:57.000Z
2020-03-18T15:28:48.000Z
var test_track = "/tracks/293"; var uri = "https://api.soundcloud.com" + test_track; var template_uri = "https://api.soundcloud.com"; //var iframeEl = document.getElementById('sc-widget'); //var WIDGET = SC.Widget('sc-widget'); var __els = {}; var clipboard = null; var widgets = {}; var current_widget = null; var WIDGET = { pause: function () {}, stop: function () {}, play: function () {} }; // check if mobile (not 100% accurate) var isMobile = false; //initiate as false // device detection if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) { isMobile = true }; console.log(">> IS MOBILE: " + isMobile); var auto_play = true; var __initialized = false; var __first = true; function widgets_clear () { __els = []; var divEl = document.getElementById('hidden-area-id'); while (divEl.firstChild) { var el = divEl.firstChild; if (current_widget && el.__id == current_widget.__id) break; divEl.removeChild(el); } while (divEl.lastChild) { var el = divEl.lastChild; if (current_widget && el.__id == current_widget.__id) break; divEl.removeChild(el); } }; function get_track_id (track) { console.log(track); if (track.lastIndexOf('/')) { return track.slice( track.lastIndexOf('/') + 1); } else { return track; } }; function load_widget_track (track) { console.log("LOAD WIDGET TRACK"); var divEl = document.getElementById('hidden-area-id'); var template_uri = "https://w.soundcloud.com/player/?url="; var src = template_uri + (track.uri || track); var track_id = get_track_id(track); console.log("track_id: " + track_id); var iframeEl = document.createElement('iframe'); iframeEl.width = "100%"; iframeEl.height = "166"; iframeEl.scrolling = "no"; iframeEl.frameborder = "no"; iframeEl.src = src; iframeEl.show_artwork = false; iframeEl.show_comments = false; iframeEl.show_playcount = false; iframeEl.show_user = false; iframeEl.show_track = false; iframeEl.__id = track_id; iframeEl.__track = track; iframeEl.__ready = false; divEl.appendChild(iframeEl); var w = SC.Widget(iframeEl); widgets[track_id] = w; w.bind(SC.Widget.Events.READY, function () { console.log("widget onReady called"); var icon = __els[track_id]; icon.removeClass("icon-pause icon-spin3 animate-spin"); icon.addClass("icon-play"); iframeEl.__ready = true; w.__ready = true; }); w.bind(SC.Widget.Events.FINISH, function () { console.log("widget onFinish called"); }); w.__id = track_id; w.__track = track; console.log("widget loaded, uri: " + src); }; function onReady () { return console.log("onReady called."); if (auto_play && __initialized && !__first) { setTimeout(function () { WIDGET.play(); }, 100); } __first = false; }; function onFinish () { return console.log("onFinished called."); }; init(); //WIDGET.bind(SC.Widget.Events.READY, onReady); //WIDGET.bind(SC.Widget.Events.FINISH, onFinish); function attachEvents (widget) { }; function init () { console.log(">>> MY APP INIT CALLED <<<"); var client_id = "c904db093e9f1cf88fbb34fbd9624b19"; SC.initialize({ client_id: client_id }); var host = window.location.protocol + "//" + window.location.host; var ENV = 'dev'; if (window.location.host.indexOf('local') < 0 && window.location.host.indexOf('192.168') < 0) { ENV = 'production'; }; function widget_play (track) { var track_id = get_track_id(track.uri); // TOUCH EVENT ENDED socket.emit('stats', { type: "widget play, index: " + track.index + ", track: " + track_id, track: track, }); WIDGET = widgets[track_id]; console.log("> Track Index: " + track.index); return WIDGET.play(); }; var selected_track_url = null; var selected_track_id = null; /* Setup socket.io to listen for live progress on a download * */ if (ENV == 'dev') { socket = io(); } else { var wsurl = "d.teenysong.com:3050"; socket = io(wsurl); } setTimeout(function () { if (socket) { socket.emit('stats', { type: "device: " + (isMobile ? 'mobile' : 'pc') }); } }, 300); socket.on('hello', function (data) { console.log("hello from server: " + data); }); var debug = true; var lastSound = null; var lastTrack = null; var $lastIcon = null; var trackIsPlaying = false; var lastSearch = ""; var history = window.localStorage.getItem('history') || []; window.history = history; // some test history history.push( 336736 ); history.push( 6902662 ); // triggered on track list change (like after a search) var onSearchLoad = null; /* * setup modal * */ var elModal = document.getElementById('modal'); var elCancelButton = document.getElementById('cancel-button'); var elDownloadButton = document.getElementById('download-button'); var elHrefDownload = document.getElementById('href-download'); var elSongName = document.getElementById('song-name'); var elProgress = document.getElementById('download-progress'); var elProgressBar = document.getElementById('download-progress-bar'); var pressDelay = 4000; elHrefDownload.pressTime = Date.now(); elHrefDownload.onclick = function (e) { console.log("Download Link Clicked!"); var now = Date.now(); if (now > elHrefDownload.pressTime + pressDelay) { elHrefDownload.pressTime = now; console.log("triggering download"); setProgress(3); // show progress bar // trigger download // socket.io listen for live progress updates on the track download console.log("emitting download: " + selected_track_id); setTimeout(function () { socket.emit('download', { trackId: selected_track_id }); }, 100); } else { // dont trigger the download console.log("download already in progress, please wait"); e.preventDefault(); return false; } }; elCancelButton.onclick = function () { console.log("cancel-button clicked"); hideModal(); }; function showModal() { elModal.style.display = 'block'; }; function hideModal() { elModal.style.display = 'none'; setProgress(0); }; function setModalInfo (name, url) { elSongName.innerHTML = name; // modal song name elHrefDownload.href = url; // download button link }; function setProgress (percent) { elProgress.style.display = percent <= 0 ? "none" : "block"; elProgressBar.style.width = percent + "%"; }; /* Setup socket.io to listen for live progress on a download * */ socket.on('progress', function (data) { //console.log("Received progress from server: %s", data.percent); var trackId = data.trackId; var percent = data.percent; setProgress(percent); }); socket.on('completed', function (data) { setProgress(100); // close the download modal after completion setTimeout(function () { // close the modal hideModal(); setProgress(0); }, 1000); }); /* * logging * */ function log(str) { if (debug) console.log(str); } String.prototype.replaceAll = function (find, replace) { return this.replace(new RegExp(find, 'g'), replace); } var LOAD_TIMEOUT = 4500; // ms var loadStartedTime = null; // PLAY TRACK, ELEMENT function play(track, $listElement) { log("URI: " + track.uri); if (lastTrack == track) { // same element as before if ($lastIcon.hasClass('animate-spin')) { $lastIcon.removeClass("icon-pause icon-spin3 animate-spin"); WIDGET.pause(); return; } if ($lastIcon.hasClass('icon-pause')) { // sound is playing -> pause it WIDGET.pause(); $lastIcon.removeClass("icon-pause icon-spin3 animate-spin"); return; } else { // sound was not playing -> play it WIDGET.play(); $lastIcon.removeClass("icon-pause icon-spin3 animate-spin"); $lastIcon.addClass("icon-pause"); return; } } else { // playing completely new track WIDGET.pause(); if ($lastIcon) { $lastIcon.removeClass("icon-pause icon-spin3 animate-spin"); } } if (track) { socket.emit('stats', { type: "play", trackId: track.id, title: track.title }); }; // add spinning icon and remove it once music // starts plaing var $i = $listElement ? $($listElement.find('button')[0]) : null; if ($i) { $i.addClass("icon-spin3 animate-spin"); $i.spinning = true; // bind events to remove the loading icon once music is playing // and icon for sop when fnished playing var opts = (function(){ var e = $i; return { whileplaying: function () { WIDGET.getPosition(function (position) { if (!e.spinning) return; if (position < 1) // once actually playing return; log("Music started to play."); e.removeClass("icon-spin3 animate-spin icon-block"); e.spinning = false; if (this._timeout) clearTimeout(this._timeout); }) }, onfinish: function () { log(" >>> ONFINISH CALLED"); e.removeClass("icon-pause"); } }; })(); } var uri = track.uri || track; uri = uri.slice(uri.indexOf('/tracks')); log("URI: " + uri); widget_play(track); window.current = uri; var __e = $i; var w = WIDGET; w.bind(SC.Widget.Events.PLAY_PROGRESS, function () { console.log("widget play_progress called"); __e.removeClass("icon-spin3 animate-spin icon-block"); __e.spinning = false; w.unbind(SC.Widget.Events.PLAY_PROGRESS); }); current_widget = WIDGET; //var track_id = get_track_id(track); //e.removeClass("icon-spin3 animate-spin icon-block"); //e.spinning = false; //WIDGET.bind(SC.Widget.Events.FINISH, opts.onfinish); //WIDGET.bind(SC.Widget.Events.PLAY_PROGRESS, opts.whileplaying); if ($i) { $i.addClass("icon-pause"); } lastSound = { uri: uri, stop: function () { WIDGET.pause(); WIDGET.seekTo(0); }, setPosition: function (pos) { WIDGET.seekTo(pos); }, play: function () { WIDGET.play(); } }; $lastIcon = $i; lastTrack = track; } window.play = play; var $list = $('#list'); var lastTracks = null; var currentTrackIndex = 0; function addMoreTracks(amount, animation) { if (!lastTracks) return; var tracks = lastTracks; log("current: " + currentTrackIndex); log("tracks.length: " + tracks.length); log("track: " + tracks[0].uri); if (currentTrackIndex >= tracks.length) { showMessage("<b>Didn't find any more songs!</b> Try a new search?", "error"); $('#more-button').removeClass().html("No more songs found!"); return; } var limit = (amount + currentTrackIndex); for (var i = currentTrackIndex; i < limit; i++) { var t = tracks[i]; if (!t) continue; var _l = 40; var t_title = t.title.substring(0, _l); var shortTitle = t_title; if (t.title.length > _l) { t_title += "..."; } var _track_id = t.uri.substring(t.uri.lastIndexOf('/')).substring(1); var track_url = host + '/track/' + _track_id; load_widget_track(t.uri); t.index = i; // add query param 'title' for custom default name track_url += "?title=" + shortTitle; var textToCopy = (host + '/?search='+ lastSearch.replaceAll(' ', '+') +'&play=' + i); var ani = animation || 'fadeIn'; // create list item (track) var $el = $( '<li class="list-item ' + ani + ' animated">' + '<button id="track'+i+'" class="icon-play"></button>' + '<span class="title">' + t_title + '</span>' + '<div class="right">' + '<button class="icon-export" data-clipboard-text="'+textToCopy+'" ></button>' + //'<form style="display: inline;" method="get" action="'+ track_url +'">' + //'<a href="' + track_url + '">' + '<button type="submit" class="icon-download"></button>' + //'</a>' + //'</form>' + '</div>' + '</li>' ); var buttons = $el.find('button'); // play/pause button var ii = $(buttons[0]); ii.addClass("icon-spin3 animate-spin"); ii.trackNumber = i; ii.track = t; (function(){ var e = $el; ii.on('click', function (evt) { __last_evt = this; evt.preventDefault(); log("click: " + e.track.uri); play(e.track, e); // CAUGHT }) }()); // export/copypaste link var ii_export = $(buttons[1]); ii_export.trackNumber = i + 1; ii_export.track = t; ii_export.trackId = _track_id; (function(){ var e = $el; var self = ii_export; ii_export.on('click', function () { log("click: " + e.track.uri); log(e.track); var textToCopy = (host + '/?search='+ lastSearch.replaceAll(' ', '+') +'&play=' + self.trackNumber); //showNotice(host + '/?search='+ lastSearch +'&track=' + self.trackId, 'info'); window.location.href = textToCopy; ii_export['data-clipboard-text'] = textToCopy; //showNotice("link copied to clipboard!"); return false; }) }()); // download link var ii_download = $(buttons[2]); ii_download.trackNumber = i; ii_download.track = t; (function(){ var e = $el; var turl = track_url; var tid = _track_id; var st = shortTitle; ii_download.on('click', function () { log("download click: " + e.track.uri); log(e.track); //window.location.href = "http://" + track_url; selected_track_url = turl; selected_track_id = tid; // setup modal info setModalInfo(st, turl); // show the modal showModal(); return false; }) }()); $el.track = t; $list.append($el); __els[_track_id] = ii; } currentTrackIndex = limit; if (typeof onSearchLoad === 'function') { onSearchLoad(); }; } var defaultLimit = 16; var $text = $('#message-text'); function playTrack(id) { var uri = "/tracks/" + id; if (lastTrack && (typeof lastTrack.stopAll === 'function')) { WIDGET.pause(); WIDGET.seekTo(0); } widget_play(uri) } window.playTrack = playTrack; // SEARCH function search(str) { lastSearch = str; // set spinning icon to signify loading showMessage(null, 'ok'); showNotice(null); // clear the notice $text.removeClass().html('').addClass('icon-spin3 animate-spin'); var params = { q: str, limit: defaultLimit } SC.get("/tracks", params).then(function (tracks) { currentTrackIndex = 0; lastTracks = tracks; $('#more-button').html("More results").removeClass().addClass('icon-plus'); var track = tracks[0]; for (var i = 0; i < tracks.length; i++) { tracks[i].index = i; } console.log("first track info"); console.log(track); if (tracks.length < 1) { log("No tracks found!"); $list.empty(); $('.results-footer').css("display", "none"); // hide more button showMessage("<b>Didn't find any songs!</b> Try a new search?", "error"); } else { showMessage("<b>Here are some results.</b>", "ok"); // send search stats socket.emit('stats', { type: "search", message: str }); // clear list for new search $list.empty(); widgets_clear(); // Initial amount of tracks to show after search addMoreTracks(4); $('.results-footer').css("display", "block"); // show more button } }); // eof SC.get } var inputWatermarkText = "Search for any song"; var input = $('.searchbar input'); var _timeout_time = 600; if (isMobile) { _timeout_time = 2000; } // setup input watermark input.val(inputWatermarkText); input.on('focus', function () { input.val(""); }); input.on('blur', function () { if (input.val().length < 1) input.val(inputWatermarkText); }); var timeout = null; input.on('input', function () { if (timeout) { clearTimeout(timeout); } if (input.val().length <= 0) return; // do nothing timeout = setTimeout(function() { if (input.val().length < 2) { showMessage("<b>Search</b> something more than a single letter please :|", 'ok'); return; } search(input.val()); }, _timeout_time); }) // seupt more button $('#more-button').on('click', function() { addMoreTracks(2); return false; }); var $text = $('#message-text'); var $message = $('#message-box'); function showMessage(message, type) { log("showMessage called"); $text.removeClass(); if (message) $text.html(message); $message.removeClass(); $message.addClass("message info-ok info-" + type); } var $nText = $('#notice-text'); var $nMessage = $('#notice-box'); var nTimeout = null; // show temporary notice message function showNotice (message, type) { log("showNotice called"); $nText.removeClass(); if (message) { $nText.html(message); } else { if (nTimeout) { clearTimeout(nTimeout); } $nMessage.addClass('fadeOut animated'); return false; } $nMessage.removeClass(); $nMessage.addClass("message bounce animated info-ok info-" + type); $nMessage.css('display', 'block'); if (nTimeout) clearTimeout(nTimeout); nTimeout = setTimeout(function(){ //$nMessage.css('display', 'none'); $nMessage.addClass('fadeOut animated'); }, LOAD_TIMEOUT * 1.8); } log("app loaded"); // default debug search result //search("melody circus"); // set up events to close modal when pressing ESC or clicking // the modal background var elInput = input.get(0); document.getElementById('modal-bg').onclick = function () { hideModal(); }; window.onkeyup = function (e) { var key = e.keyCode || e.which; if (key == 27) { // ESC hideModal(); } } // focus search bar on key press when not already active window.onkeypress = function (e) { if (e.which !== 0 && !elInput.activeElement) { elInput.focus(); }; }; if (ENV != 'dev') { console.log = function (args) { return; }; } __initialized = true; console.log("app initialized"); // query url auto search var href = window.location.search.substring(1); var kv = href.split('&'); var queryString = {}; for (var i = 0; i < kv.length; i++) { var s = kv[i].split('='); var k = s[0]; var v = s[1]; queryString[k] = v; }; console.log("queryString: " + queryString.search); var queryPlay = false; var querySearch = function () { if (!queryString.search) return; if (!query_search_called) { query_search_called = !query_search_called; console.log(" >>>>>>>>> GOT FOCUS <<<<<<<<<<<<<"); if (queryString.search.length > 2) { search(queryString.search); if (queryString.play >= 0) { var divEl = document.getElementById('hidden-area-id'); var interval = null; interval = setInterval(function () { console.log(">interval< " + queryString.play); var num = queryString.play - 1; var el = document.getElementById('track' + num); console.log(el); var $el = $(el); if ($el.hasClass('icon-play') && !$el.hasClass('animate-spin') && !queryPlay) { queryPlay = true; setTimeout(function () { $el.click(); console.log("QUERY PLAY: " + queryString.play); }, 200); clearInterval(interval); } }, 400); } } } }; var query_search_called = false; if (!document.hasFocus()) { window.addEventListener('focus', querySearch); } else { querySearch(); } }
27.681427
1,677
0.579693
b4d651bcce534e7f86a4a9ad1b33c6c4843bbc46
4,042
js
JavaScript
frontend/src/utils/api/HexoAdminNeueAPIService.js
Transfusion/hexo-admin-neue
d6f9451b72e3c33ec8a7370e58c23acf4a6047a6
[ "Apache-2.0" ]
null
null
null
frontend/src/utils/api/HexoAdminNeueAPIService.js
Transfusion/hexo-admin-neue
d6f9451b72e3c33ec8a7370e58c23acf4a6047a6
[ "Apache-2.0" ]
2
2020-07-26T09:44:43.000Z
2020-07-26T09:53:00.000Z
frontend/src/utils/api/HexoAdminNeueAPIService.js
Transfusion/hexo-admin-neue
d6f9451b72e3c33ec8a7370e58c23acf4a6047a6
[ "Apache-2.0" ]
null
null
null
import axios from 'axios'; import Cookies from 'universal-cookie'; import { toast } from 'react-toastify'; import { Config } from '../Config'; import history from '../history'; const cookies = new Cookies(); // https://stackoverflow.com/questions/47216452/how-to-handle-401-authentication-error-in-axios-and-react axios.interceptors.response.use((response) => response, (error) => { if (error?.response.status === 403) { // nuke cookie cookies.remove('hexo-admin-neue-auth'); localStorage.removeItem(Config.localStorageProfileKey); // https://stackoverflow.com/questions/42941708/react-history-push-is-updating-url-but-not-navigating-to-it-in-browser history.push('/login'); } else if (error?.response.status === 408 || error?.code === 'ECONNABORTED') { toast('Operation timed out, please retry.'); } throw error; }); export default class HexoAdminNeueAPIService { static performLogin(username: String, password: String) { const params = new URLSearchParams(); params.append('username', username); params.append('password', password); return axios.post(`${Config.routerBase}/api/auth/login/`, params, { headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, }); } static performLogout() { return axios.post(`${Config.routerBase}/api/auth/logout`); } static getSettings() { return axios.get(`${Config.routerBase}/api/settings/list`); } static getAuthed() { return axios.get(`${Config.routerBase}/api/profile`); } static createPost(title: String) { return axios.post(`${Config.routerBase}/api/posts/new`, { title, }); } static createPage(title: String) { return axios.post(`${Config.routerBase}/api/pages/new`, { title, }); } static getAllPosts() { return axios.get(`${Config.routerBase}/api/posts/list`); } static getAllPages() { return axios.get(`${Config.routerBase}/api/pages/list`); } // TODO: add a parameter for filetype /* static getRendered(raw: String) { return axios.post(`${Config.routerBase}/api/mdrender`, { md: raw, }); } */ static publishPost(postId: String) { return axios.post(`${Config.routerBase}/api/posts/${postId}/publish`); } static unpublishPost(postId: String) { return axios.post(`${Config.routerBase}/api/posts/${postId}/unpublish`); } static savePost(postId: String, content: String) { /* return axios.post(Config.routerBase + `/api/posts/${postId}`, { _content: content }); */ return axios.post(`${Config.routerBase}/api/posts/${postId}`, { postRaw: content, }); } static deletePost(postId: String) { return axios.post(`${Config.routerBase}/api/posts/${postId}/remove`); } /* static publishPage(pageId: String) { return axios.post(Config.routerBase + `/api/posts/${pageId}/publish`); } static unpublishPage(pageId: String) { return axios.post(Config.routerBase + `/api/posts/${pageId}/unpublish`); } */ static savePage(pageId: String, content: String) { /* return axios.post(Config.routerBase + `/api/posts/${postId}`, { _content: content }); */ return axios.post(`${Config.routerBase}/api/pages/${pageId}`, { pageRaw: content, }); } static deletePage(pageId: String) { return axios.post(`${Config.routerBase}/api/pages/${pageId}/remove`); } static hexoGenerate() { return axios.post(`${Config.routerBase}/api/generate`); } static hexoDeploy(args) { return axios.post(`${Config.routerBase}/api/deploy`, { args, }); } static hexoClean() { return axios.post(`${Config.routerBase}/api/clean`); } static hexoUnwatch() { return axios.post(`${Config.routerBase}/api/unwatch`); } static hexoWatch() { return axios.post(`${Config.routerBase}/api/watch`); } static hexoGetWatchStatus() { return axios.get(`${Config.routerBase}/api/watch/status`); } static killServer() { return axios.post(`${Config.routerBase}/api/kill-server`); } }
27.496599
122
0.653142
b4d6b002cd509de20b41168956b6dd3763523b54
115
js
JavaScript
packages/having-things/lib/modules/components.js
Shielkwamm/shielkwamm-shell
56d744a68277ca5cf24c6d5ed740be14ceea1548
[ "Apache-2.0" ]
null
null
null
packages/having-things/lib/modules/components.js
Shielkwamm/shielkwamm-shell
56d744a68277ca5cf24c6d5ed740be14ceea1548
[ "Apache-2.0" ]
8
2021-05-11T06:51:54.000Z
2022-02-27T02:50:44.000Z
packages/having-things/lib/modules/components.js
Shielkwamm/shielkwamm-shell
56d744a68277ca5cf24c6d5ed740be14ceea1548
[ "Apache-2.0" ]
null
null
null
export * from '../components/HavingThings/HavingThings.jsx'; export * from '../components/HavingThings/Things.jsx';
57.5
60
0.765217
b4d700bd4cc1f4136aa095dc0af2f7959f2747a1
8,624
js
JavaScript
src/p5/main.js
atorov/p5js-webpack-pixel-puzzle
c83ccbe2cba8c62bee31b0bae2ae2ad1e4a7d6e0
[ "MIT" ]
null
null
null
src/p5/main.js
atorov/p5js-webpack-pixel-puzzle
c83ccbe2cba8c62bee31b0bae2ae2ad1e4a7d6e0
[ "MIT" ]
1
2020-06-08T12:06:11.000Z
2020-06-08T12:06:11.000Z
src/p5/main.js
atorov/p5js-webpack-pixels-puzzle
c83ccbe2cba8c62bee31b0bae2ae2ad1e4a7d6e0
[ "MIT" ]
null
null
null
import delay from '../lib/utils/delay' import cfg from './cfg' import StateMachine from './StateMachine' new p5((sketch) => { const s = sketch let data = {} const imgTileArr = [] let imgSrc let pgImgSrc = null const pgImgSrcPixelsVector = [] let pgImgSrcWindowPointerX = 0 let pgImgSrcWindowPointerY = 0 const sm = new StateMachine(s) s.preload = () => { imgSrc = s.loadImage(cfg.imageSrcFile) for (let i = cfg.imageTileFileCountMin; i <= cfg.imageTileFileCountMax; i++) { const img = s.loadImage(`${cfg.imageTileFileBase}-${i}.${cfg.imageTileFileExtension}`) imgTileArr.push(img) } } s.setup = () => { sm.setStatus(':PENDING:') s.createCanvas(cfg.canvasWidth, cfg.canvasHeight) s.frameRate(cfg.frameRate) s.background(cfg.canvasBgnd) sm.nextStep() sm.setStatus(':READY:') } s.draw = async () => { if (sm.state.status === ':READY:') { // Display pgImgSrc if (sm.state.step === 1) { sm.setStatus(':PENDING:') pgImgSrc = s.createGraphics(cfg.pgImgSrcWidth, cfg.pgImgSrcHeight) pgImgSrc.imageMode(s.CORNER) pgImgSrc.image(imgSrc, 0, 0, cfg.pgImgSrcWidth, cfg.pgImgSrcHeight) if (cfg.isPgImgPosterized) { pgImgSrc.filter(s.POSTERIZE, cfg.pgImgSrcPosterizeDepth) } s.image(pgImgSrc, cfg.pgImgSrcViewX, cfg.pgImgSrcViewY, cfg.pgImgSrcViewWidth, cfg.pgImgSrcViewHeight) sm.nextStep() sm.setStatus(':READY:') } // Calculate pgImgSrcPixelsVector else if (sm.state.step === 2) { sm.setStatus(':PENDING:') pgImgSrc.loadPixels() const pgImgSrcPixels = [...pgImgSrc.pixels] while (pgImgSrcPixels.length) { pgImgSrcPixels.pop() pgImgSrcPixelsVector.push([pgImgSrcPixels.pop(), pgImgSrcPixels.pop(), pgImgSrcPixels.pop()].reverse()) } pgImgSrcPixelsVector.reverse() console.log(`::: step: ${sm.state.step}, pgImgSrcPixelsVector:`, pgImgSrcPixelsVector) sm.nextStep() sm.setStatus(':READY:') } // Calculate colorsVector else if (sm.state.step === 3) { sm.setStatus(':PENDING:') const colorsVector = [...new Set(pgImgSrcPixelsVector.map((row = []) => row.join(', ')))] .map((str = '') => ({ str, comp: str.split(', '), idx: pgImgSrcPixelsVector.reduce((acc = [], row = [], i) => { if (row.join(', ') === str) { return [...acc, i] } return acc }, []), })) .sort(({ idx: a = [] }, { idx: b = [] }) => b.length - a.length) data = { allCrops: cfg.cropsNumX * cfg.cropsNumY, allPixels: cfg.pgImgSrcWidth * cfg.pgImgSrcHeight, colorsVector, } console.log(`::: step: ${sm.state.step}, data:`, data) sm.nextStep() sm.setStatus(':READY:') } // Display pgImgSrc blocks else if (sm.state.step === 4) { sm.setStatus(':PENDING:') const blockWidth = cfg.pgImgSrcViewWidth / cfg.pgImgSrcWidth const blockHeight = cfg.pgImgSrcViewHeight / cfg.pgImgSrcHeight s.noStroke() for (let y = 0; y < cfg.pgImgSrcHeight; y++) { for (let x = 0; x < cfg.pgImgSrcWidth; x++) { const { comp = [] } = data.colorsVector.find(({ idx = [] }) => idx.some((i) => i === y * cfg.pgImgSrcWidth + x)) s.fill(comp) s.rect( x * blockWidth, y * blockHeight, blockWidth, blockHeight, ) } } sm.nextStep() sm.setStatus(':READY:') } else if (sm.state.step === 5) { sm.setStatus(':PENDING:') const paletteItemWidth = cfg.paletteViewWidth / data.colorsVector.length s.noStroke() s.rectMode(s.CORNER) for (let i = 0; i < data.colorsVector.length; i++) { s.fill(data.colorsVector[i].comp) s.rect( cfg.paletteViewX + i * paletteItemWidth, cfg.paletteViewY, paletteItemWidth, cfg.paletteViewHeight, ) } // sm.nextStep() sm.setStatus(':READY:') } else if (sm.state.step === 6) { sm.setStatus(':PENDING:') s.background(cfg.canvasBgnd) const pg = s.createGraphics(cfg.cropsNumX * cfg.cropBlockWidth, cfg.cropsNumY * cfg.cropBlockHeight) pg.noStroke() pg.rectMode(s.CORNER) pg.imageMode(s.CORNER) pg.background(cfg.cropBgnd) let index for (let y = 0; y < cfg.cropsNumY; y++) { for (let x = 0; x < cfg.cropsNumX; x++) { index = (pgImgSrcWindowPointerY + y) * cfg.pgImgSrcWidth + pgImgSrcWindowPointerX + x const { comp = [0, 0, 0] } = data.colorsVector.find(({ idx = [] }) => idx.some((_i) => _i === index)) || {} // pg.fill([...comp, 127]) // pg.ellipseMode(s.CENTER) // pg.ellipse( // x * cfg.cropBlockWidth + cfg.cropBlockWidth / 2, // y * cfg.cropBlockHeight + cfg.cropBlockHeight / 2, // cfg.cropBlockWidth * cfg.cropOverlapX, // cfg.cropBlockHeight * cfg.cropOverlapY, // ) // pg.fill(comp) // pg.textAlign(s.CENTER, s.CENTER) // pg.text( // `${pgImgSrcWindowPointerX},${pgImgSrcWindowPointerY};${index}`, // x * cfg.cropBlockWidth + cfg.cropBlockWidth / 2, // y * cfg.cropBlockHeight + cfg.cropBlockHeight / 2, // ) const imgTileArrIndex = Math.floor(s.random(0, imgTileArr.length)) pg.tint(comp) pg.imageMode(s.CENTER) pg.image( imgTileArr[imgTileArrIndex], x * cfg.cropBlockWidth + cfg.cropBlockWidth / 2, y * cfg.cropBlockHeight + cfg.cropBlockHeight / 2, cfg.cropBlockWidth * cfg.cropOverlapX, cfg.cropBlockHeight * cfg.cropOverlapY, ) } } s.imageMode(s.CENTER) s.image(pg, s.width / 2, s.height / 2, pg.width, pg.height) if (cfg.isSaveCropEnabled) { pg.saveCanvas(pg, `${cfg.cropFileBase}-${pgImgSrcWindowPointerY + 100}-${pgImgSrcWindowPointerX + 100}`, cfg.cropFileExtension) } console.log(`::: step: ${sm.state.step}, completed %:`, Math.round((index / data.allPixels) * 100)) pgImgSrcWindowPointerX += cfg.cropsNumX if (pgImgSrcWindowPointerX >= cfg.pgImgSrcWidth) { pgImgSrcWindowPointerX = 0 pgImgSrcWindowPointerY += cfg.cropsNumY } if (pgImgSrcWindowPointerY >= cfg.pgImgSrcHeight) { sm.nextStep() } await delay(cfg.cropPreviewDelay) sm.setStatus(':READY:') } } } s.keyPressed = () => { if (sm.state.status === ':READY:') { sm.nextStep() console.log('::: step #:', sm.state.step) } } }, 'p5-main')
36.697872
147
0.448516
b4d737d50adde0e71c7ecda70342c783425b0c0f
1,831
es6
JavaScript
src/nodefony/kernel/security/provider.es6
nodefony/nodefony
cc1910217ac1cab3cb01c865be5389296bb8f082
[ "CECILL-B" ]
104
2016-11-18T18:30:08.000Z
2022-01-20T11:10:15.000Z
src/nodefony/kernel/security/provider.es6
nodefony/nodefony
cc1910217ac1cab3cb01c865be5389296bb8f082
[ "CECILL-B" ]
44
2016-11-16T11:25:19.000Z
2021-11-27T23:19:28.000Z
src/nodefony/kernel/security/provider.es6
nodefony/nodefony
cc1910217ac1cab3cb01c865be5389296bb8f082
[ "CECILL-B" ]
15
2016-12-22T11:23:38.000Z
2021-10-30T14:09:59.000Z
class Provider extends nodefony.Service { constructor(name, manager) { super(name, manager.container); this.manager = manager; this.encoder = null; } log(pci, severity, msgid, msg) { if (!msgid) { msgid = "PROVIDER " + this.name; } return super.log(pci, severity, msgid, msg); } authenticate(token) { return new Promise((resolve, reject) => { if (token && this.supports(token)) { return this.loadUserByUsername(token.getUsername()) .then(async (user) => { if (user) { this.log(`TRY AUTHENTICATION ${token.getUsername()} PROVIDER ${this.name}`, "DEBUG"); if (await this.isPasswordValid(token.getCredentials(), user.getPassword())) { token.setUser(user); token.setProvider(this); return resolve(token); } return reject(new nodefony.Error(`user ${token.getUsername()} Incorrect password`, 401)); } return reject(new nodefony.Error(`user ${token.getUsername()} not found `)); }).catch((error) => { return reject(error); }); } return reject(new nodefony.Error("The token is not supported by this authentication provider " + this.name)); }); } async loadUserByUsername( /*username*/ ) { throw new nodefony.Error(`Provider : ${this.name} loadUserByUsername method not defined`); } async isPasswordValid(raw, encoded) { return encoded === raw; } async refreshUser(user) { if (user instanceof nodefony.User) { return await this.loadUserByUsername(user.getUsername()); } throw new nodefony.Error("refreshUser bad user type"); } supports( /*token*/ ) { return true; } } nodefony.Provider = Provider; module.exports = Provider;
30.016393
115
0.599672
b4d84d8df016cd5f923b32003d502746e0ceb95e
133
js
JavaScript
doc/search/namespaces_0.js
flhorizon/Lums
2516fdebe89cf82cd3d470de20567d99448758d2
[ "MIT" ]
33
2015-01-20T10:15:24.000Z
2021-06-16T13:20:50.000Z
doc/search/namespaces_0.js
flhorizon/Lums
2516fdebe89cf82cd3d470de20567d99448758d2
[ "MIT" ]
1
2020-03-11T15:58:46.000Z
2020-05-09T14:58:13.000Z
doc/search/namespaces_0.js
flhorizon/Lums
2516fdebe89cf82cd3d470de20567d99448758d2
[ "MIT" ]
7
2015-01-15T21:02:38.000Z
2019-08-23T09:41:57.000Z
var searchData= [ ['lm',['lm',['../namespacelm.html',1,'']]], ['vertex',['Vertex',['../namespacelm_1_1_vertex.html',1,'lm']]] ];
22.166667
65
0.556391
b4d8f1e8d364e89efc35310d17c5e71dea800777
1,451
js
JavaScript
examples/apps/cloudfront-redirect-on-viewer-country/index.js
eugeniosu/serverless-application-model
d93e15232a1921fa51667389d83aeabbf1ff72d3
[ "Apache-2.0" ]
326
2019-12-20T04:04:41.000Z
2020-09-30T10:42:43.000Z
examples/apps/cloudfront-redirect-on-viewer-country/index.js
eugeniosu/serverless-application-model
d93e15232a1921fa51667389d83aeabbf1ff72d3
[ "Apache-2.0" ]
18
2019-10-09T23:27:48.000Z
2021-06-25T15:18:24.000Z
examples/apps/cloudfront-redirect-on-viewer-country/index.js
eugeniosu/serverless-application-model
d93e15232a1921fa51667389d83aeabbf1ff72d3
[ "Apache-2.0" ]
220
2020-10-02T06:12:18.000Z
2022-03-31T13:15:21.000Z
'use strict'; /* This is an origin request function */ exports.handler = (event, context, callback) => { const request = event.Records[0].cf.request; const headers = request.headers; /* * Based on the value of the CloudFront-Viewer-Country header, generate an * HTTP status code 302 (Redirect) response, and return a country-specific * URL in the Location header. * NOTE: 1. You must configure your distribution to cache based on the * CloudFront-Viewer-Country header. For more information, see * http://docs.aws.amazon.com/console/cloudfront/cache-on-selected-headers * 2. CloudFront adds the CloudFront-Viewer-Country header after the viewer * request event. To use this example, you must create a trigger for the * origin request event. */ let url = 'https://example.com/'; if (headers['cloudfront-viewer-country']) { const countryCode = headers['cloudfront-viewer-country'][0].value; if (countryCode === 'TW') { url = 'https://tw.example.com/'; } else if (countryCode === 'US') { url = 'https://us.example.com/'; } } const response = { status: '302', statusDescription: 'Found', headers: { location: [{ key: 'Location', value: url, }], }, }; callback(null, response); };
35.390244
87
0.582357
b4d961ef77faed59005b7bcb18e3c6a627296dec
1,001
js
JavaScript
downloader/webpack.config.js
notseenee/hscpapers
f3d73b202db8723d4badd207119ef9ade4c1a142
[ "MIT" ]
1
2021-10-31T22:47:26.000Z
2021-10-31T22:47:26.000Z
downloader/webpack.config.js
notseenee/hscpapers
f3d73b202db8723d4badd207119ef9ade4c1a142
[ "MIT" ]
null
null
null
downloader/webpack.config.js
notseenee/hscpapers
f3d73b202db8723d4badd207119ef9ade4c1a142
[ "MIT" ]
null
null
null
const webpack = require('webpack'); const path = require('path'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const cssnano = require('cssnano'); const BUILD_DIR = path.resolve(__dirname, 'dist'); const APP_DIR = path.resolve(__dirname, 'src'); module.exports = { entry: APP_DIR + '/js/app.jsx', output: { path: BUILD_DIR, filename: 'bundle.js' }, devtool: true, module: { loaders: [ { test: /\.jsx?/, include: APP_DIR, loader: 'babel-loader' }, { test: /\.css/, include: APP_DIR, loaders: ExtractTextPlugin.extract('css-loader') } ] }, plugins: [ new ExtractTextPlugin('bundle.css'), new OptimizeCSSAssetsPlugin({ assetNameRegExp: /\.min\.css$/g, cssProcessor: cssnano, cssProcessorOptions: { discardComments: { removeAll: true } }, canPrint: true }) ] };
23.833333
78
0.615385
b4dcc3a7968ed8119a1b706925a0d3f33fa6ea24
392
js
JavaScript
models/Review.js
letsgoflorida/backend-repo
83611b6d3487c934ac6d7ca73e417abe781ad21e
[ "MIT" ]
null
null
null
models/Review.js
letsgoflorida/backend-repo
83611b6d3487c934ac6d7ca73e417abe781ad21e
[ "MIT" ]
null
null
null
models/Review.js
letsgoflorida/backend-repo
83611b6d3487c934ac6d7ca73e417abe781ad21e
[ "MIT" ]
null
null
null
const mongoose = require("mongoose"); const Schema = mongoose.Schema; const reviewSchema = new Schema({ user: {type: Schema.Types.ObjectId, ref: "User"}, status: {type: String, enum:["local", "visitor"]}, rating: Number, content: String, trip: {type: Schema.Types.ObjectId, ref: "Trip"}, }, { timestamps: true }); module.exports = mongoose.model("Review", reviewSchema);
26.133333
56
0.668367