code
stringlengths
2
1.05M
'use strict'; angular .module('reflect.calendar') .factory('calendarTitle', function(moment, calendarConfig) { function day(currentDay) { return moment(currentDay).format(calendarConfig.titleFormats.day); } function week(currentDay) { var weekTitleLabel = calendarConfig.titleFormats.week; return weekTitleLabel.replace('{week}', moment(currentDay).week()).replace('{year}', moment(currentDay).format('YYYY')); } function month(currentDay) { return moment(currentDay).format(calendarConfig.titleFormats.month); } function year(currentDay) { return moment(currentDay).format(calendarConfig.titleFormats.year); } return { day: day, week: week, month: month, year: year }; });
var express = require('express') , h = require('../modules/application_helpers') // Helpers , router = express.Router() , passport = require('passport') , Post = require('../models/post'); // Blog router.get('/', function (req, res, next) { Post.all('All', null, function(err, posts) { return res.render('blog/list', { title: h.titleHelper('Blog'), posts: posts }); }); }); // Single Post router.get('/:url', function (req, res, next) { Post.findBy('url', req.params.url, function(err, post){ if (err) { return res.redirect('/404'); } return res.render('blog/single', { title: h.titleHelper(post.title), post: post }); }, true); }); module.exports = router;
import React from 'react'; import { Tabs, Tab } from 'material-ui/Tabs'; // From https://github.com/oliviertassinari/react-swipeable-views import SwipeableViews from 'react-swipeable-views'; import EditablePersonalInfo from '../personalInfo'; import ChangePassword from '../changePassword'; import ContactInformation from '../contactInformation'; import '../style.css'; import { queries, mutations } from '../helpers'; import { compose, graphql } from 'react-apollo'; import { alertOptions, MyExclamationTriangle, MyFaCheck, } from '../../../../../theme/alert'; import AlertContainer from 'react-alert'; const styles = { headline: { fontSize: 24, paddingTop: 16, marginBottom: 12, fontWeight: 400, }, slide: { padding: 10, }, }; class InfoTabs extends React.Component { constructor(props) { super(props); this.state = { slideIndex: 0, }; this.saveInformation = this.saveInformation.bind(this); this.savePassword = this.savePassword.bind(this); } showAlertError = text => { this.msg.error(text, { type: 'error', // type of alert icon: <MyExclamationTriangle />, }); }; showAlertSuccess = () => { this.msg.success('Saved!', { type: 'success', icon: <MyFaCheck />, }); }; handleChange = value => { this.setState({ slideIndex: value, }); }; async saveInformation(values) { const { UPDATE_ME_MUTATION } = this.props; try { await UPDATE_ME_MUTATION({ variables: { firstname: values.firstname, lastname: values.lastname, gender: values.gender, dob: values.dob, bio: values.bio, position: values.position, organization: values.organization, linkedin_id: values.linkedin_id, facebook_id: values.facebook_id, twitter_id: values.twitter_id, }, refetchQueries: [ { query: queries.ME_QUERY, }, ], }); this.showAlertSuccess(); } catch (error) { let temp = error.graphQLErrors[0].message; this.showAlertError(temp.substring(7, temp.length)); } } async savePassword(values) { const { UPDATE_PASSWORD_MUTATION } = this.props; try { await UPDATE_PASSWORD_MUTATION({ variables: { oldPassword: values.oldPassword, newPassword: values.newPassword, }, }); this.showAlertSuccess(); } catch (error) { let temp = error.graphQLErrors[0].message; this.showAlertError(temp.substring(7, temp.length)); console.log(error.graphQLErrors[0].message); } } render() { const me = this.props.me; return ( <div> <Tabs onChange={this.handleChange} value={this.state.slideIndex}> <Tab label="Personal Info" value={0} /> <Tab label="Contact Information" value={1} /> {this.props.disabled ? ( '' ) : ( <Tab label="Change Password" value={2} disabled={this.props.disabled} /> )} </Tabs> <SwipeableViews index={this.state.slideIndex} onChangeIndex={this.handleChange} > <div> <EditablePersonalInfo me={me} disabled={this.props.disabled} onSubmit={this.saveInformation} /> </div> <div> <ContactInformation me={me} disabled={this.props.disabled} onSubmit={this.saveInformation} /> </div> <div style={styles.slide}> <ChangePassword onSubmit={this.savePassword} /> </div> <AlertContainer ref={a => (this.msg = a)} {...alertOptions} /> </SwipeableViews> </div> ); } } export default compose( graphql(mutations.UPDATE_ME_MUTATION, { name: 'UPDATE_ME_MUTATION', }), graphql(queries.ME_QUERY, { name: 'ME_QUERY', }), graphql(mutations.UPDATE_PASSWORD_MUTATION, { name: 'UPDATE_PASSWORD_MUTATION', }), )(InfoTabs);
var chai = require('chai'), assert = chai.assert, expect = chai.expect, should = chai.should(), testTar = require('../src/abc-util-trim'); describe('abc-util-trim', function() { var _str = " hello world ", _tarStr = "hello world"; it('成功: 清除前后空字符: trim("' + _str + '")', function() { var _reObj = testTar.trim(_str); expect(_reObj).to.equal(_tarStr); }); });
/*! * gulp * $ npm install gulp-compass gulp-ruby-sass@1.0.0-alpha gulp-sourcemaps gulp-autoprefixer gulp-plumber gulp-minify-css gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev * npm install gulp-compass --save-dev */ // Load Plugins var gulp = require('gulp'), minifycss = require('gulp-minify-css'), compass = require('gulp-compass'), // sass = require('gulp-ruby-sass'), // sourcemaps = require('gulp-sourcemaps'), autoprefixer = require('gulp-autoprefixer'), plumber = require('gulp-plumber'), jshint = require('gulp-jshint'), uglify = require('gulp-uglify'), imagemin = require('gulp-imagemin'), rename = require('gulp-rename'), concat = require('gulp-concat'), notify = require('gulp-notify'), //cache = require('gulp-cache'), livereload = require('gulp-livereload'), del = require('del'); //Styles gulp.task('styles', function() { // return sass('src/styles/app.scss', { sourcemap: true }) return gulp.src('src/styles/app.scss') .pipe(plumber({ errorHandler: function (error) { console.log(error.message); this.emit('end'); }})) .pipe(compass({ config_file: 'config.rb', css: 'assets/styles/', sass: 'src/styles/' })) .pipe(autoprefixer()) .pipe(gulp.dest('assets/styles')) .pipe(rename({suffix: '.min'})) .pipe(minifycss()) .pipe(gulp.dest('assets/styles')) .pipe(notify({ message: 'Styles task complete' })); }); //Scripts // gulp.task('scripts', function() { // return gulp.src('src/scripts/**/*.js') // .pipe(jshint('.jshintrc')) // .pipe(jshint.reporter('default')) // .pipe(concat('main.js')) // .pipe(gulp.dest('assets/js')) // .pipe(rename({suffix: '.min'})) // .pipe(uglify()) // .pipe(gulp.dest('assets/js')) // .pipe(notify({ message: 'Scripts task complete' })); // }); //Images gulp.task('images', function() { return gulp.src('src/images/**/*') .pipe(imagemin({ optimizationLevel: 5, progressive: true, interlaced: true })) .pipe(gulp.dest('assets/img')) .pipe(notify({ message: 'Images task complete' })); }); // Clean gulp.task('clean', function(cb, err, deletedFiles) { del(['assets/styles', 'assets/img', 'assets/js'], cb); }); // Watch gulp.task('watch', function() { // Watch .scss files gulp.watch('src/styles/**/*.scss', ['styles']); // Watch .js files gulp.watch('src/scripts/**/*.js', ['scripts']); // Watch image files gulp.watch('src/images/**/*', ['images']); // Create LiveReload server //livereload.listen(); // Watch any files in dist/, reload on change //gulp.watch(['assets/**']).on('change', livereload.changed); }); // Default task gulp.task('default', ['clean', 'watch'], function() { gulp.start('styles', 'images'); });
var vows = require('vows'); var assert = require('assert'); var migration = require('../lib/migration.js'); var date = createDateForTest(); var dateString = '20140220143050'; var dirName = '/directory/name/'; var fileNameNoExtension = 'filename'; var fileName = 'filename.js'; var templateType = Migration.TemplateType.SQL_FILE_LOADER; vows.describe('migration').addBatch({ 'when creating a new migration object': { 'with 1 parameter as the complete filepath': { topic: function() { var migration = new Migration(dirName + dateString+'-'+fileName); return migration; }, 'should have title set without file extension': function(migration) { assert.equal(migration.title, fileNameNoExtension); }, 'should have date set': function(migration) { migration.date.setMilliseconds(0); date.setMilliseconds(0); assert.equal(migration.date.getTime(), date.getTime()); }, 'should have name set without file extension': function(migration) { assert.equal(migration.name, dateString+'-'+fileNameNoExtension); }, 'should have path set': function(migration) { assert.equal(migration.path, dirName+dateString+'-'+fileName); }, 'should have templateType not set': function(migration) { assert.equal(migration.templateType, undefined); } }, 'with 3 parameters': { topic: function() { var migration = new Migration(fileName, dirName, date); return migration; }, 'should have title set': function(migration) { assert.equal(migration.title, fileName); }, 'should have date set with month': function(migration) { assert.equal(migration.date, date); }, 'should have name set': function(migration) { assert.equal(migration.name, dateString+'-'+fileName); }, 'should have path set': function(migration) { assert.equal(migration.path, dirName+dateString+'-'+fileName); }, 'should have templateType not set': function(migration) { assert.equal(migration.templateType, undefined); } }, 'with 4 parameters': { topic: function() { var migration = new Migration(fileName, dirName, date, templateType); return migration; }, 'should have title set': function(migration) { assert.equal(migration.title, fileName); }, 'should have date set': function(migration) { assert.equal(migration.date, date); }, 'should have name set': function(migration) { assert.equal(migration.name, dateString+'-'+fileName); }, 'should have path set': function(migration) { assert.equal(migration.path, dirName+dateString+'-'+fileName); }, 'should have templateType set': function(migration) { assert.equal(migration.templateType, templateType); } } } }).addBatch({ 'get template' : { 'when template type is not set': { topic: function() { var migration = new Migration(fileName, dirName, date); return migration; }, 'should return default javascript template': function(migration) { var actual = migration.getTemplate(); assert.equal(actual, migration.defaultJsTemplate()); } }, 'when template type is set': { 'as sql file loader' : { topic: function() { var migration = new Migration(fileName, dirName, date, Migration.TemplateType.SQL_FILE_LOADER); return migration; }, 'should return sql file loader template': function(migration) { var actual = migration.getTemplate(); assert.equal(actual, migration.sqlFileLoaderTemplate()); } }, 'as default sql' : { topic: function() { var migration = new Migration(fileName, dirName, date, Migration.TemplateType.DEFAULT_SQL); return migration; }, 'should return default sql template': function(migration) { var actual = migration.getTemplate(); assert.equal(actual, migration.defaultSqlTemplate()); } }, 'as default coffee' : { topic: function() { var migration = new Migration(fileName, dirName, date, Migration.TemplateType.DEFAULT_COFFEE); return migration; }, 'should return default coffee template': function(migration) { var actual = migration.getTemplate(); assert.equal(actual, migration.defaultCoffeeTemplate()); } }, 'as default javascript' : { topic: function() { var migration = new Migration(fileName, dirName, date, Migration.TemplateType.DEFAULT_JS); return migration; }, 'should return default sql template': function(migration) { var actual = migration.getTemplate(); assert.equal(actual, migration.defaultJsTemplate()); } } } } }).export(module); function createDateForTest() { var date = new Date(); date.setUTCFullYear(2014); date.setUTCDate('20'); date.setUTCMonth('01'); date.setUTCHours('14'); date.setUTCMinutes('30'); date.setUTCSeconds('50'); return date; }
// Support import {expect} from 'chai'; import sinon from 'sinon'; // To be mocked import * as imageItemReducer from '../../../src/client/reducer/image-set/image-item'; // Module under test import * as imageSetReducer from '../../../src/client/reducer/image-set'; describe('image-set module', () => { let sandbox; function mockReducer(state, {type, payload}) { return `${state.toUpperCase()}-${type}-${payload}`; } beforeEach(() => { sandbox = sinon.sandbox.create(); sandbox.stub(imageItemReducer, 'get').returns(mockReducer); }); afterEach(() => { sandbox.restore(); }); it('should slice state based on the provided itemKey', () => { // given const reducerUnderTest = imageSetReducer.get(); const testItemKey = 'key-1'; const anotherItemKey = 'key-2'; const testInputState = { [testItemKey]: 'foo', [anotherItemKey]: 'bar' }; const testAction = { itemKey: testItemKey, type: 'TEST_TYPE', payload: 'TEST_PAYLOAD' }; const outputState = reducerUnderTest(testInputState, testAction); // then expect(outputState[testItemKey]).to.deep.equal('FOO-TEST_TYPE-TEST_PAYLOAD'); }); });
// January // February // March // April // May // June // July // August // September // October // November // December // CMD+SHIFT+L to multiline select // or can CMD+CLICK // hit " // hit right arrow // hit del var config = { //uncomment to show linting hints //var months = ["January"," February"," March"," April"," May"," June"," July"," August"," September"," October"," November"," December"]; months : ["January"," February"," March"," April"," May"," June"," July"," August"," September"," October"," November"," December"] }; var foo = { January February March April May June July August September October November December }
import Vue from 'vue'; import template from './ogre.html'; import './ogre.scss'; export default Vue.extend({ template, props: ['paused'], data() { return { name: '', showName: false, email: '', password: '', // Physics variables weight: 0.05, friction: 0.1, jump: 4, speed: 0.8, hurtTime: 10, hurtCount: 0, hp: 300, dead: false, facing: 'scale(1,1)', // Coordinates yTop: 200, xLHS: 0, yBottom: 30, xRHS: 22, // Velocity yVel: 0, xVel: 0, status: 'idle', // 'idle', 'run', 'hurt' // Sprite Animation variables shift: 0, // Used to log shift in pixels thru anim frames shiftStart: 40, // 0 for Run, 88 for Idle, 110 for jump frameWidth: 40, // CONST frameHeight: 50, // CONST delay: 20, // CONST delayI: 0, // Delay iterator, starts at 0 totalFrames: 3, // 4 for run, 1 for idle or jump currentFrame: 0, // Frame iterator, starts at 0 context: {}, // Will hold different canvas locations // Stores all current sprites sprite: { ogre: document.createElement('img'), slashes: [document.createElement('img'), document.createElement('img'), document.createElement('img')] }, slashLoad: false }; }, // bind event handlers to the `doResize` method (defined below) mounted: function() { // Setting up canvas vars for animation var canvas = document.getElementById('ogre'); this.context.ogre = canvas.getContext('2d'); this.loadSprites(); this.animLoop(); }, beforeDestroy: function() { }, methods: { loadSprites() { this.sprite.ogre.src = 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/795933/ogreSheet.png'; this.sprite.slashes[0].src = 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/795933/slash1.png'; this.sprite.slashes[1].src = 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/795933/slash2.png'; this.sprite.slashes[2].src = 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/795933/slash3.png'; }, animate: function() { this.move(); // this.fall(); // this.slow(); //Causes friction // // OGRE ANIMATION STANDIN // if (this.xLHS > 200 && !this.dead) { this.slow(); } else if (this.dead) { this.fall(); if (this.yTop > 600) { this.$parent.newMonster(); } } else { this.moveRight(); } var slashNode = document.getElementById('slash'); if (this.$parent.slash && slashNode !== undefined && !this.slashLoaded) { var context = slashNode.getContext('2d'); var slashIndex = Math.floor(Math.random() * 3); context.clearRect(0, 0, 50, 50); context.drawImage(this.sprite.slashes[slashIndex], 0, 0, 50, 50, 0, 0, 50, 50); this.slashLoaded = true; } if (!this.$parent.slash) { this.slashLoaded = false; } if (this.status === 'hurt') { this.hurtCount--; if (this.hurtCount === 0) { this.status = 'idle'; } this.totalFrames = 1; this.shiftStart = 160; this.shift = 160; this.currentFrame = 0; } else if (this.xVel > 0.1 || this.xVel < -0.1) { if (this.status !== 'run'){ this.status = 'run'; this.totalFrames = 3; this.shiftStart = 0; this.shift = 0; this.currentFrame = 0; this.delayI = 0; } } else { this.status = 'idle'; this.totalFrames = 1; this.shiftStart = 0; this.shift = 0; this.currentFrame = 0; } return; }, animLoop: function() { this.delayI++; if (this.delayI === this.delay) { var parts = ['ogre']; for (var i in parts) { this.context[parts[i]].clearRect(0, 0, 300, 300); //draw each frame + place them in the middle this.context[parts[i]].drawImage(this.sprite[parts[i]], this.shift, 0, this.frameWidth, this.frameHeight, 0, 0, this.frameWidth, this.frameHeight); } this.shift += this.frameWidth; /* Start at the beginning once you've reached the end of your sprite! */ if (this.currentFrame === this.totalFrames) { this.shift = this.shiftStart; this.currentFrame = 0; } this.currentFrame++; this.delayI = 0; } window.requestAnimationFrame(this.animLoop); }, move: function() { //Override movement for pause screen. if (this.paused) { // this.yTop = // this.xLHS = (Math.floor(this.xVel * 10) / 10); // this.yBottom = this.yTop + 14; // this.xRHS = this.xLHS + 6; } // if (this.topCollision() && !this.isGrounded()){ // this.yVel = 1; // } this.yTop += (Math.floor(this.yVel * 10) / 10); this.xLHS += (Math.floor(this.xVel * 10) / 10); this.yBottom = this.yTop + 14; this.xRHS = this.xLHS + 6; }, fall: function() { if (!this.isGrounded()) { this.yVel += this.weight; } else { this.yVel = 0; } }, slow: function() { if (this.xVel > 0.3) { this.xVel -= this.friction; } else if (this.xVel < -0.3) { this.xVel += this.friction; } else { this.xVel = 0; } }, isGrounded: function() { return false; // if (this.yBottom < 200) { // return false; // } else { // return true; // } // var gridLocY = Math.floor(this.yBottom / 20); // var gridLocX = Math.floor((this.xLHS + 16) / 20) - 3; // var grid = this.$parent.$refs.home.grid; // var tilesToCheck = []; // if (grid[gridLocY + 1] !== undefined) { // if (grid[gridLocY + 1][gridLocX] !== undefined) { // tilesToCheck.push(grid[gridLocY + 1][gridLocX]); // } // } else { // return false; // } // for (var tile in tilesToCheck) { // if (tilesToCheck[tile] === 'f') { // return true; // } // } // gridLocX = Math.floor((this.xRHS - 5) / 20) - 3; // tilesToCheck = []; // if (grid[gridLocY + 1] !== undefined) { // if (grid[gridLocY + 1][gridLocX] !== undefined) { // tilesToCheck.push(grid[gridLocY + 1][gridLocX]); // } // } else { // return false; // } // for (tile in tilesToCheck) { // if (tilesToCheck[tile] === 'f') { // return true; // } // } // return false; }, topCollision: function() { var gridLocY = Math.floor((this.yTop + 22) / 20); var gridLocX = Math.floor(this.xLHS / 20) - 3; var grid = this.$parent.$refs.home.grid; var tilesToCheck = []; if (grid[gridLocY - 1] !== undefined) { if (grid[gridLocY - 1][gridLocX] !== undefined) { tilesToCheck.push(grid[gridLocY - 1][gridLocX]); } if (grid[gridLocY - 1][gridLocX + 1] !== undefined) { tilesToCheck.push(grid[gridLocY - 1][gridLocX + 1]); } else { return false; } } else { return false; } for (var tile in tilesToCheck) { if (tilesToCheck[tile] === 'f') { return true; } } return false; }, // Actions jumpUp: function() { if (this.isGrounded() && this.yVel === 0) { this.yVel = -this.jump; } }, moveRight: function() { // // BOUNDARY CHECK: // var gridLocY = Math.floor(this.yBottom / 20); // var gridLocX = Math.floor((this.xRHS - 5) / 20) - 3; // Grid rendering is 3 off on the x axis // var grid = this.$parent.$refs.home.grid; // var tilesToCheck = []; // // This first 'if' makes sure we're not looking for data inside an undefined obj // if (grid[gridLocY] !== undefined) { // if (grid[gridLocY][gridLocX + 1] !== undefined) { // tilesToCheck.push(grid[gridLocY][gridLocX + 1]); // } else { // return; // } // } else { // return; // } // if (grid[gridLocY - 1] !== undefined){ // if (grid[gridLocY - 1][gridLocX + 1] !== undefined) { // tilesToCheck.push(grid[gridLocY - 1][gridLocX + 1]); // } else { // return; // } // } // for (var tile in tilesToCheck) { // if (tilesToCheck[tile] === 'f') { // return; // } // } this.xVel = this.speed; this.facing = 'scale(1,1)'; }, moveLeft: function() { // BOUNDARY CHECK: // var gridLocY = Math.floor((this.yBottom + 10) / 20); // var gridLocX = Math.floor((this.xLHS + 15) / 20) - 3; // var grid = this.$parent.$refs.home.grid; // var tilesToCheck = []; // // This first 'if' makes sure we're not looking for data inside an undefined obj // if (grid[gridLocY] !== undefined) { // if (grid[gridLocY][gridLocX - 1] !== undefined) { // tilesToCheck.push(grid[gridLocY][gridLocX - 1]); // } else { // return; // } // } else { // return; // } // if (grid[gridLocY - 1] !== undefined){ // if (grid[gridLocY - 1][gridLocX - 1] !== undefined) { // tilesToCheck.push(grid[gridLocY - 1][gridLocX - 1]); // } else { // return; // } // } // for (var tile in tilesToCheck) { // if (tilesToCheck[tile] === 'f') { // return; // } // } this.xVel = (0 - this.speed); this.facing = 'scale(-1,1)'; }, hurtMonster: function() { this.slash = true; if (this.monster === 'ogre') { this.$refs.homeOgre.hurt(); } if (this.monster === 'ent') { this.$refs.homeEnt.hurt(); } }, hurt: function(amt) { if (typeof amt === 'undefined') { amt = 1; } if (this.hurtCount > 0 || this.xLHS < 200) { return; } this.$parent.slash = true; this.hp -= amt; console.log('ogre hp: ' + this.hp); if (this.hp <= 0) { this.yVel = -1; this.dead = true; this.status = 'hurt'; // this.$parent.newMonster(); } this.status = 'hurt'; this.hurtCount = this.hurtTime; } } });
#!/usr/bin/env node var program = require('commander'); program .option('-s, --src [source]', 'Source folder.') .option('-t, --target [target]', 'Target folder.') .option('-b, --branch [branch]', 'Branch to deploy.') .option('-r, --remote [remote]', 'Git remote to push changes to.') .option('-v, --verbose', 'Enable verbose mode.') .parse(process.argv); require('../index')(program);
/* Game namespace */ var game = { // an object where to store game information data : { // score score : 0, option1: "", option2: "", //made the following global variables enemyBaseHealth: 1, playerBaseHealth: 1, enemyCreepHealth: 5, playerHealth: 5, enemyCreepAttack: 1, playerAttack: 1, // orcBAseDamage: 10, // orcBaseHealth: 100, // orcBaseSpeed: 3, // orcBaseDefense: 0, playerAttackTimer: 1000, enemyCreepAttackTimer: 1000, playerMoveSpeed: 5, creepMoveSpeed: 5, gameTimerManager: "", heroDeathManager: "", spearTimer: 15, player: "", //added global variables for gold and experience exp: 0, gold: 0, ability1: 0, ability2: 0, ability3: 0, skill1: 0, skill2: 0, skill3: 0, exp1: 0, exp2: 0, exp3: 0, exp4: 0, win: "", pausePos: "", buyscreen: "", buytext: "", minimap: "", miniPlayer: "" }, // Run on page load. "onload" : function () { // Initialize the video. //changed the height and width to fit the screen. if (!me.video.init("screen", me.video.CANVAS, 1067, 600, true, '1.0')) { alert("Your browser does not support HTML5 canvas."); return; } // add "#debug" to the URL to enable the debug Panel if (document.location.hash === "#debug") { window.onReady(function () { me.plugin.register.defer(this, debugPanel, "debug"); }); } me.state.SPENDEXP = 112; me.state.LOAD = 113; me.state.NEW = 114; console.log(game.data.exp); console.log(game.data.exp1); console.log(game.data.exp2); console.log(game.data.exp3); console.log(game.data.exp4); // Initialize the audio. me.audio.init("mp3,ogg"); // Set a callback to run when loading is complete. me.loader.onload = this.loaded.bind(this); // Load the resources. me.loader.preload(game.resources); // Initialize melonJS and display a loading screen. me.state.change(me.state.LOADING); }, // Run on game resources loaded. "loaded" : function () { //registered a player entity me.pool.register("player", game.PlayerEntity, true); //registered a second player me.pool.register("Player2", game.Player2, true); //registered a playerbase to entity me.pool.register("PlayerBase", game.PlayerBaseEntity); //registered a enemybase to entity. me.pool.register("EnemyBase", game.EnemyBaseEntity); //registered a enemycreep to entity. me.pool.register("EnemyCreep", game.EnemyCreep, true); //registered a gametimemanager to entity. me.pool.register("GameTimerManager", game.GameTimerManager); //registered a herodeathmanager to entity. me.pool.register("HeroDeathManager", game.HeroDeathManager); //registered a experience manager to entity. me.pool.register("ExperienceManager", game.ExperienceManager); //registered a enemy hero to entity. me.pool.register("EnemyHero", game.EnemyHero); //registered a spendgold to entity. me.pool.register("SpendGold", game.SpendGold); //registered a spear to entity. me.pool.register("spear", game.SpearThrow, true); //registered a minimap to entity. me.pool.register("minimap", game.MiniMap, true); //registered a miniplayer to entity. me.pool.register("miniplayer", game.MiniPlayerLocation, true); me.state.set(me.state.MENU, new game.TitleScreen()); me.state.set(me.state.PLAY, new game.PlayScreen()); me.state.set(me.state.SPENDEXP, new game.SpendExp()); me.state.set(me.state.LOAD, new game.LoadProfile()); me.state.set(me.state.NEW, new game.NewProfile()); // Start the game. //changed it so it starts on the title screen and not the game me.state.change(me.state.MENU); } };
import React from 'react'; import assert from 'assert'; import sinon from 'sinon'; import { shallow } from 'enzyme'; import { ReferenceField } from './ReferenceField'; import TextField from './TextField'; describe('<ReferenceField />', () => { const muiTheme = { palette: {}, }; it('should call crudGetManyAccumulate on componentDidMount if reference source is defined', () => { const crudGetManyAccumulate = sinon.spy(); shallow( <ReferenceField record={{ fooId: 123 }} source="fooId" referenceRecord={{ id: 123, title: 'foo' }} reference="bar" basePath="" crudGetManyAccumulate={crudGetManyAccumulate} muiTheme={muiTheme} > <TextField source="title" /> </ReferenceField>, { lifecycleExperimental: true } ); assert(crudGetManyAccumulate.calledOnce); }); it('should not call crudGetManyAccumulate on componentDidMount if reference source is null or undefined', () => { const crudGetManyAccumulate = sinon.spy(); shallow( <ReferenceField record={{ fooId: null }} source="fooId" referenceRecord={{ id: 123, title: 'foo' }} reference="bar" basePath="" crudGetManyAccumulate={crudGetManyAccumulate} muiTheme={muiTheme} > <TextField source="title" /> </ReferenceField>, { lifecycleExperimental: true } ); assert(crudGetManyAccumulate.notCalled); }); it('should render a link to the Edit page of the related record by default', () => { const wrapper = shallow( <ReferenceField record={{ fooId: 123 }} source="fooId" referenceRecord={{ id: 123, title: 'foo' }} reference="bar" basePath="" crudGetManyAccumulate={() => {}} muiTheme={muiTheme} > <TextField source="title" /> </ReferenceField> ); const linkElement = wrapper.find('Link'); assert.equal(linkElement.prop('to'), '/bar/123'); }); it('should render a link to the Show page of the related record when the linkType is show', () => { const wrapper = shallow( <ReferenceField record={{ fooId: 123 }} source="fooId" referenceRecord={{ id: 123, title: 'foo' }} reference="bar" basePath="" linkType="show" crudGetManyAccumulate={() => {}} muiTheme={muiTheme} > <TextField source="title" /> </ReferenceField> ); const linkElement = wrapper.find('Link'); assert.equal(linkElement.prop('to'), '/bar/123/show'); }); it('should render no link when the linkType is false', () => { const wrapper = shallow( <ReferenceField record={{ fooId: 123 }} source="fooId" referenceRecord={{ id: 123, title: 'foo' }} reference="bar" basePath="" linkType={false} crudGetManyAccumulate={() => {}} muiTheme={muiTheme} > <TextField source="title" /> </ReferenceField> ); const linkElement = wrapper.find('Link'); assert.equal(linkElement.length, 0); }); });
'use strict'; var util = require('util'), path = require('path'), yeoman = require('yeoman-generator'), chalk = require('chalk'); var XbarsGenerator = module.exports = function XbarsGenerator(args, options, config) { yeoman.generators.Base.apply(this, arguments); this.on('end', function () { this.installDependencies({ skipInstall: options['skip-install'], callback: function () { this.spawnCommand('grunt', ['init']); }.bind(this) }); }); this.pkg = JSON.parse(this.readFileAsString(path.join(__dirname, '../package.json'))); }; util.inherits(XbarsGenerator, yeoman.generators.Base); XbarsGenerator.prototype.askFor = function askFor() { var cb = this.async(); // have Yeoman greet the user. console.log(this.yeoman); console.log(chalk.magenta('Out of the box I include Express, Express Handlebars, Bootstrap, Modernizr, and a Gruntfile.js to build your app.')); var prompts = [{ name: 'appname', message: 'Project name?' }, { name: 'description', message: 'Description?', default: 'Ze app' }, { name: 'author', message: 'Author name?', default: 'Greg Lamp' }, { name: 'author_uri', message: 'Author website?', default: 'http://yaksis.com/' }, { name: 'port', message: 'Port?', default: '5000' }]; this.prompt(prompts, function (props) { this.appname = props.appname; this.description = props.description; this.author = props.author; this.author_uri = props.author_uri; this.port = props.port; cb(); }.bind(this)); }; XbarsGenerator.prototype.gruntfile = function gruntfile() { this.copy('Gruntfile.js', 'Gruntfile.js'); }; XbarsGenerator.prototype.packageJSON = function packageJSON() { this.template('_package.json', 'package.json'); }; XbarsGenerator.prototype.git = function git() { this.copy('gitignore', '.gitignore'); }; XbarsGenerator.prototype.bower = function bower() { this.copy('bowerrc', '.bowerrc'); this.copy('_bower.json', 'bower.json'); }; XbarsGenerator.prototype.h5bp = function h5bp() { this.copy('robots.txt', 'public/robots.txt'); this.copy('favicon.ico', 'public/favicon.ico'); }; XbarsGenerator.prototype.appFiles = function appFiles() { this.template('app.js', 'app.js'); this.template('main.html', 'views/layouts/main.html'); this.write('views/index.html', '<p class="lead">Suck it Trabek!</p>'); this.write('views/404.html', '<h4>404</h4>'); this.write('public/js/main.js', ''); }; XbarsGenerator.prototype.app = function app() { this.mkdir('public/css'); this.mkdir('public/js'); this.mkdir('public/img'); };
var http = require("http"), https = require("https"), fs = require("fs"), fc = require("./fetcher.common.js"), CSVWriter = require("./CSVWriter.js"), db = require("./db.js"), Quarter = require("./quarter"), Promise = require("bluebird"), _ = require("underscore"), Utils = require("./utils.js"); var pg = require('postgres-bluebird'); var config = require('./config'); var readGoogleDocsFundsFile = function(){ return new Promise(function(resolve, reject){ var options = { host: "docs.google.com", port : 443, path : "/spreadsheets/d/1mUsNeb8gD2ELPKGpjD12AqZkuCybJlGCTz62oryLZY4/export?exportFormat=csv&gid=1311761971" } var data = ''; https.get(options,function(res){ res.on('data', function(chunk){ data = data + chunk.toString(); }); res.on('end', function(){ var Baby = require('babyparse'); // data = String(data).replace(/ /g,''); //remove whitespaces data = Baby.parse(data, {header:false}).data; parseCsvFetch(data) .then(function(funds){ resolve(funds); }); }); }) .on('error',function(r){ console.log("error fetching sheet",r); process.exit(); reject("error fetching sheet "+r); }); }); } var validateUrl = function(url){ var RegExp = /(http|https):\/\//; if(RegExp.test(url)){ if (url.indexOf('http') == 0 ){ return url; } else{ //try to find start of url url = url.slice(url.indexOf('http')); return url; } }else{ return null; } } var parseCsvFetch = function(parsedLines){ var reducer = function(out, line){ var _out = []; //beginning cell var startYear = 2012; var startQuarter = 4; var quarter = new Quarter(startYear, startQuarter -1); var body = String(line[2]).toLowerCase().trim() var body_heb = String(line[3]).trim(); var fund_heb = String(line[5]).trim(); var number = String(line[7]).replace(/\//g, '').trim(); for (var i = 10; i < line.length; i++){ var url = validateUrl(String(line[i]).trim()); if (body && number && url ) _out.push({ body : body, body_heb: body_heb, fund_heb: fund_heb, number : number, url : url, year : quarter.year, quarter : quarter.quarter + 1 }) quarter.increase(); } return out.concat(_out) } return new Promise(function(resolve, reject){ resolve(parsedLines.reduce(reducer, [])); }); } var getContribFunds = function() { return new Promise(function(resolve, reject){ var client = (new db.pg(true)).client; client.query("SELECT q.id, q.year, q.quarter, q.url, q.status, f.managing_body, f.id as fund_id, f.name as fund_name, f.url as fund_url FROM admin_funds_quarters as q, admin_funds as f WHERE q.fund_id = f.id AND status = 'validated'", function(err, result) { if(err) { return console.error('error running query', err); } var funds = []; result.rows.forEach(function(f) { funds.push({ body: f.managing_body, number: f.fund_id, url: f.url, year: f.year, quarter: f.quarter+1 }); }); resolve(funds); }); }); }; exports.fetchKnown = function(body, year, quarter, fund_number, trgdir, overwrite){ if (!fs.existsSync(trgdir)){ // logger.info("Creating directory:" +trgdir); fs.mkdirSync(trgdir); } readGoogleDocsFundsFile() .then(function(allFunds){ return Utils.filterFunds(allFunds, body, year, quarter, fund_number); }) .each(function(fund){ fc.downloadFundFile(fund, trgdir, overwrite); }) .then(function(xlFilename){ //console.log(xlFilename); }) .catch(function(e){ console.log(e.stack); }); }; exports.fundsTable = function(){ readGoogleDocsFundsFile() .then(function(allFunds){ var uniqFunds = _.chain(allFunds) .map(function(fund){return { id: fund.number, managing_body: fund.body, managing_body_heb: fund.body_heb, name: fund.fund_heb, url: fund.url } }) .uniq(false, function(fund){ return fund.managing_body+fund.id; } ).value(); return uniqFunds; }) .then(function(funds){ return pg.connectAsync(config.connection_string) .spread(function(client, release) { _.each(funds, function(fund, i){ var tableName = "admin_funds3"; var sql = "INSERT INTO "+ tableName +" (id, managing_body, managing_body_heb, name, url) SELECT " + fund.id + ", '"+fund.managing_body+"', '" +"', '', ''" + " WHERE NOT EXISTS ( " + " SELECT id from " + tableName + " WHERE id = " + fund.id + ")"; console.log(i + " " +sql); return client.query(sql); }) release(); }); }) .then(function(xlFilename){ console.log(xlFilename); }) .catch(function(e){ console.log(e.stack); }); }; exports.fetchContrib = function(){ getContribFunds() // .then(function(funds){ // return filterFunds(funds); // }) .each(function(fund){ fc.downloadFundFile(fund); }); }; //TODO: not finished... parse query results, sort by instrument type, write csv exports.dumpFunds = function(body, year, quarter, fund_number){ readGoogleDocsFundsFile() .then(function(allFunds){ body = 'Migdal'; year = '2014'; quarter = '2'; fund_number = '659'; //TODO: get chosen attributes from user var chosenFunds = allFunds.filter(function(f){ return (body == undefined? true: f.body == body || ( _.isArray(body) && body.indexOf(f.body) > -1 ) ) && (fund_number == undefined ? true: f.number == fund_number || ( _.isArray(fund_number) && fund_number.indexOf(f.number) > -1 )) && (year == undefined ? true: f.year == year || ( _.isArray(year) && year.indexOf(f.year) > -1 )) && (quarter == undefined? true: f.quarter == quarter || ( _.isArray(quarter) && quarter.indexOf(f.quarter) > -1 )) }) return chosenFunds; }) .then(function(chosenFunds){ return chosenFunds.map(function(chosenFund){ var tableName = "pension_data_all" var sql = "SELECT * FROM "+ tableName +" WHERE managing_body='" +chosenFund.body +"'" + " AND report_year='"+chosenFund.year+"' AND report_qurater='"+chosenFund.quarter+"'" + " AND fund='"+chosenFund.number+"' "; return db.query(sql); }); }) .map(function(queryResult){ console.log("=============================") // console.log(queryResult); var rowCount = queryResult.rowCount; var rows = queryResult.rows; var managing_body = rows[0].managing_body; var report_year = rows[0].report_year; var report_qurater = rows[0].managing_body; var fund = rows[0].fund; // var instrument_type = rows[0]. // var instrument_sub_type = rows[0]. var fundObj = Utils.getFundObj(managing_body, report_year, report_qurater, fund); var filename = Utils.filename("./from_db", fundObj, ".csv"); console.log(rows); console.log("=============================") CSVWriter.write(managing_body, fund, report_year, report_qurater, instrument, instrumentSub, tabData, headers) return; }); }; exports.readGoogleDocsFundsFile = readGoogleDocsFundsFile; // exports.fundsTable();
var rqr = require('rqr'); var express = require('express'); var config = require('config'); var glob = require('glob'); var mongoose = require('mongoose'); var logger = rqr('app/components/logger').logger; var realtime = rqr('app/components/realtime'); var messagesList = rqr('app/components/messages-queue'); /* *** MongoDB connection *** */ var mongoUri = process.env.MONGOLAB_URI || config.db.url; mongoose.connect(mongoUri); var db = mongoose.connection; db.on('error', function() { throw new Error('unable to connect to database at ' + config.db.url); }); var models = glob.sync('./app/models/*.js'); models.forEach(function(model) { require(model); }); var app = rqr('app'); var port = process.env.PORT || config.app.port; var server = app.listen(port, function() { var host = server.address().address; var port = server.address().port; logger.debug('App listening at http://%s:%s', host, port); }); // Initialize realtime component realtime(server);
// see http://vuejs-templates.github.io/webpack for documentation. var path = require('path') module.exports = { build: { env: require('./prod.env'), index: path.resolve(__dirname, '../dist/index.html'), assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', assetsPublicPath: '/', productionSourceMap: true, productionGzip: true, productionGzipExtensions: ['js', 'css'] }, dev: { env: require('./dev.env'), port: 3000, assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: {}, cssSourceMap: true } }
import net from 'net'; import hollaback from '../src/index'; import getPort from 'get-port'; import { assert } from 'chai'; describe('Init', function () { this.timeout(0); it('should reach google', function () { return hollaback('google.com:80'); }); it('should allow multiple hosts', function() { return hollaback('linkedin.com:80', 'yahoo.com:80'); }); it('should timeout on non-reachable host after 500ms', async function() { const localPort = await getPort(); const notReachable = `localhost:${localPort}`; const result = hollaback(notReachable, { timeout: 500, }); return assert.isRejected(result); }); it('should succeed on new host after 2000ms', async function() { const localPort = await getPort(); const result = hollaback(`localhost:${localPort}`); // Create new host after 2 seconds setTimeout(function() { const server = net.createServer(function() { server.end(); }); server.listen(localPort); }, 2000); return assert.isFulfilled(result); }); });
'use strict'; var canUseDOM = !!( typeof window !== 'undefined' && window.document && window.document.createElement ); var get = easyGet; var set = easySet; if (canUseDOM && document.selection && document.selection.createRange) { get = hardGet; set = hardSet; } function easyGet (el) { return { start: el.selectionStart, end: el.selectionEnd }; } function hardGet (el) { var active = document.activeElement; if (active !== el) { el.focus(); } var range = document.selection.createRange(); var bookmark = range.getBookmark(); var original = el.value; var marker = getUniqueMarker(original); var parent = range.parentElement(); if (parent === null || !inputs(parent)) { return result(0, 0); } range.text = marker + range.text + marker; var contents = el.value; el.value = original; range.moveToBookmark(bookmark); range.select(); return result(contents.indexOf(marker), contents.lastIndexOf(marker) - marker.length); function result (start, end) { if (active !== el) { // don't disrupt pre-existing state if (active) { active.focus(); } else { el.blur(); } } return { start: start, end: end }; } } function getUniqueMarker (contents) { var marker; do { marker = '@@marker.' + Math.random() * new Date(); } while (contents.indexOf(marker) !== -1); return marker; } function inputs (el) { return ((el.tagName === 'INPUT' && el.type === 'text') || el.tagName === 'TEXTAREA'); } function easySet (el, p) { el.selectionStart = parse(el, p.start); el.selectionEnd = parse(el, p.end); } function hardSet (el, p) { var range = el.createTextRange(); if (p.start === 'end' && p.end === 'end') { range.collapse(false); range.select(); } else { range.collapse(true); range.moveEnd('character', parse(el, p.end)); range.moveStart('character', parse(el, p.start)); range.select(); } } function parse (el, value) { return value === 'end' ? el.value.length : value || 0; } function sell (el, p) { if (arguments.length === 2) { set(el, p); } return get(el); } module.exports = sell;
/* * Copyright (c) 2013 Csernik Flaviu Andrei * * See the file LICENSE.txt for copying permission. * */ "use strict"; window.AudioContext = window.AudioContext || window.webkitAudioContext; function PropertyNotInitialized(obj, propName) { this.property = propName; this.obj = obj; } PropertyNotInitialized.prototype.toString = function () { return this.obj + " : " + this.property + " not initialized."; }; function isInteger(n) { return typeof n === "number" && Math.floor(n) == n; } function checkNat(callerName, n) { if (!isInteger || value < 1) { throw new TypeError("downsampleFactor must be a natural number." + "given value is not: " + value); } }
const initialState = { isLoading: false, isRequestingInfo: false, success: false, error: false, scheduleTemplates: [ {weekday: 'monday', name: 'Segunda', active: false, opensAt: {value: null, error: null}, closesAt: {value: null, error: null}, lunchStartsAt: {value: null, error: null}, lunchEndsAt: {value: null, error: null}}, {weekday: 'tuesday', name: 'Terça', active: false, opensAt: {value: null, error: null}, closesAt: {value: null, error: null}, lunchStartsAt: {value: null, error: null}, lunchEndsAt: {value: null, error: null}}, {weekday: 'wednesday', name: 'Quarta', active: false, opensAt: {value: null, error: null}, closesAt: {value: null, error: null}, lunchStartsAt: {value: null, error: null}, lunchEndsAt: {value: null, error: null}}, {weekday: 'thursday', name: 'Quinta', active: false, opensAt: {value: null, error: null}, closesAt: {value: null, error: null}, lunchStartsAt: {value: null, error: null}, lunchEndsAt: {value: null, error: null}}, {weekday: 'friday', name: 'Sexta', active: false, opensAt: {value: null, error: null}, closesAt: {value: null, error: null}, lunchStartsAt: {value: null, error: null}, lunchEndsAt: {value: null, error: null}}, {weekday: 'saturday', name: 'Sábado', active: false, opensAt: {value: null, error: null}, closesAt: {value: null, error: null}, lunchStartsAt: {value: null, error: null}, lunchEndsAt: {value: null, error: null}}, {weekday: 'sunday', name: 'Domingo', active: false, opensAt: {value: null, error: null}, closesAt: {value: null, error: null}, lunchStartsAt: {value: null, error: null}, lunchEndsAt: {value: null, error: null}} ], averageServiceTime: {value: '01:00', error: null} }; function scheduleTemplates(state = initialState, action) { switch (action.type) { case 'TOGGLE_SCHEDULE_TEMPLATE': var {weekday, value} = action.data; var index = state.scheduleTemplates.findIndex(scheduleTemplate => scheduleTemplate.weekday === weekday); var scheduleTemplate = state.scheduleTemplates.find(scheduleTemplate => scheduleTemplate.weekday === weekday); return { ...state, scheduleTemplates: [ ...state.scheduleTemplates.slice(0, index), Object.assign(scheduleTemplate, { active: value }), ...state.scheduleTemplates.slice(index + 1) ] }; case 'CHANGE_SCHEDULE_TEMPLATE_TIME': var {weekday, field, time} = action.data; var index = state.scheduleTemplates.findIndex(scheduleTemplate => scheduleTemplate.weekday === weekday); var scheduleTemplate = state.scheduleTemplates.find(scheduleTemplate => scheduleTemplate.weekday === weekday); scheduleTemplate[field].value = time; scheduleTemplate[field].error = null; return { ...state, scheduleTemplates: [ ...state.scheduleTemplates.slice(0, index), scheduleTemplate, ...state.scheduleTemplates.slice(index + 1) ] }; case 'CHANGE_AVERAGE_SERVICE_TIME': return { ...state, averageServiceTime: { value: action.data.averageServiceTime, error: null } }; case 'ADD_SCHEDULE_TEMPLATES_ERROR': return { ...state, error: true }; case 'INVALID_SCHEDULE_TEMPLATES': var {schedule_templates, average_service_time} = action.data; var averageServiceTime = !!average_service_time ? { value: state.averageServiceTime.value, error: average_service_time[0] } : state.averageServiceTime; if (schedule_templates) { var scheduleTemplates = state.scheduleTemplates.map((scheduleTemplate, index) => { var error = schedule_templates[index]; var opensAt = !!error && !!error.opens_at ? { value: scheduleTemplate.opensAt.value, error: error.opens_at[0] } : scheduleTemplate.opensAt; var closesAt = !!error && !!error.closes_at ? { value: scheduleTemplate.closesAt.value, error: error.closes_at[0] } : scheduleTemplate.closesAt; var lunchStartsAt = !!error && !!error.lunch_starts_at ? { value: scheduleTemplate.lunchStartsAt.value, error: error.lunch_starts_at[0] } : scheduleTemplate.lunchStartsAt; var lunchEndsAt = !!error && !!error.lunch_ends_at ? { value: scheduleTemplate.lunchEndsAt.value, error: error.lunch_ends_at[0] } : scheduleTemplate.lunchEndsAt; return Object.assign(scheduleTemplate, { opensAt, closesAt, lunchStartsAt, lunchEndsAt }); }); } return { ...state, isLoading: false, success: false, scheduleTemplates: scheduleTemplates || state.scheduleTemplates, averageServiceTime: averageServiceTime }; case 'REQUEST_SCHEDULE_TEMPLATES': return { ...state, isLoading: true, error: false }; case 'SCHEDULE_TEMPLATES_CREATED': var response = action.data.schedule_templates; var scheduleTemplates = state.scheduleTemplates.map(scheduleTemplate => { var newScheduleTemplate = response.find(s => s.weekday === scheduleTemplate.weekday); return Object.assign(scheduleTemplate, newScheduleTemplate); }); return { ...initialState, success: true, scheduleTemplates: scheduleTemplates }; case 'REQUEST_LOAD_SCHEDULE_TEMPLATES': return { ...state, success: false, isRequestingInfo: true }; case 'SCHEDULE_TEMPLATES_LOADED': var {schedule_templates, average_service_time} = action.data; var averageServiceTime = { value: average_service_time, error: null }; var scheduleTemplates = state.scheduleTemplates.map(scheduleTemplate => { var newScheduleTemplate = schedule_templates.find(s => s.weekday === scheduleTemplate.weekday); return Object.assign(scheduleTemplate, { id: newScheduleTemplate.id, opensAt: { value: newScheduleTemplate.opens_at, error: null }, closesAt: { value: newScheduleTemplate.closes_at, error: null }, lunchStartsAt: { value: newScheduleTemplate.lunch_starts_at, error: null }, lunchEndsAt: { value: newScheduleTemplate.lunch_ends_at, error: null }, active: newScheduleTemplate.active }); }); return { ...state, isRequestingInfo: false, scheduleTemplates: scheduleTemplates, averageServiceTime: averageServiceTime }; case 'LOGGED_OUT': return initialState; default: return state; } } module.exports = scheduleTemplates;
function hasClass(obj, cls) { return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')); } function addClass(obj, cls) { if (!hasClass(obj, cls)) obj.className += " " + cls; } function removeClass(obj, cls) { if (hasClass(obj, cls)) { var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)'); obj.className = obj.className.replace(reg, ' '); } } window.onscroll = function() { var totop = document.getElementById('totop'); var scroll = document.documentElement.scrollTop || document.body.scrollTop || window.scrollY; if (scroll >= 300) { addClass(totop,"show"); //totop.classList.add("show"); } else { removeClass(totop,"show"); removeClass(totop,"launch"); //totop.classList.remove("show", "launch"); } }; function gotoTop(aSpeed, time) { aSpeed = aSpeed || 0.1; time = time || 10; var totop = document.getElementById('totop'); var scroll = document.documentElement.scrollTop || document.body.scrollTop || window.scrollY || 0; var speeding = 1 + aSpeed; window.scrollTo(0, Math.floor(scroll / speeding)); if (scroll > 0) { var run = "gotoTop(" + aSpeed + ", " + time + ")"; window.setTimeout(run, time); } } totop.onclick = function() { var totop = document.getElementById('totop'); gotoTop(0.1, 20); addClass(totop,"launch"); //totop.classList.add('launch'); return false; };
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * SISTEMA DE SEGUIMIENTO DE PROYECTOS DEL MPPCTI Y ENTES ADSCRITOS * * DESARROLLADO POR: ING.REIZA GARCÍA * * ING.HÉCTOR MARTÍNEZ * * PARA: OFICINA ESTRATÉGICA DE SEGUIMIENTO Y EVALUACION DE * * POLÍTICAS PÚBLICAS (OESEPP) * * DEL: MINISTERIO DEL PODER POPULAR PARA CIENCIA, TECNOLOGÍA * * E INNOVACIÓN (MPPCTI) * * FECHA: JULIO DE 2013 * * FRAMEWORK PHP UTILIZADO: SYMFONY Version 2.3.1 * * http://www.symfony.com * * TELEFONOS PARA SOPORTE: 0416-9052533 / 0212-5153033 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ $(document).ready(function() { }); // FUNCIONES ESPECIALES // // DEVUELVE LA FECHA DEL DIA DE HOY function _diaHoy(opcion) { var Hoy= new Array(2); var fecha=new Date(); Hoy[1]= fecha.getFullYear(); Hoy[0]=(fecha.getDate()<10)? '0'+fecha.getDate(): fecha.getDate(); Hoy[0]+=((fecha.getMonth()+1)<10)? '/0'+(fecha.getMonth()+1):'/'+(fecha.getMonth()+1); Hoy[0]+= '/'+Hoy[1]; if (opcion==1){return Hoy[1];} else {return Hoy[0];} } // DEVUELVE LA FECHA MAYOR ENTRE LAS DOS SUMINISTRADAS function _fechaMayor(FechaIni, FechaFin) { //Obtiene dia, mes y año var fecha1 = new _fecha( FechaIni ); var fecha2 = new _fecha( FechaFin ); //Obtiene Objetos Date var miFecha1 = new Date( fecha1.anio, fecha1.mes, fecha1.dia ); var miFecha2 = new Date( fecha2.anio, fecha2.mes, fecha2.dia ); //Resta fechas y redondea return (miFecha1.getTime()>miFecha2.getTime())? FechaIni:FechaFin; } // DEVUELVE LA DIFERENCIA EN DIAS DE DOS FECHAS function _diferenciaFechas(FechaIni, FechaFin) { //Obtiene dia, mes y año var fecha1 = new _fecha( FechaIni ); var fecha2 = new _fecha( FechaFin ); //Obtiene Objetos Date var miFecha1 = new Date( fecha1.anio, fecha1.mes, fecha1.dia ); var miFecha2 = new Date( fecha2.anio, fecha2.mes, fecha2.dia ); //Resta fechas y redondea var diferencia = (miFecha2.getTime() - miFecha1.getTime())/1000*60; //var dias = Math.floor(diferencia / (1000 * 60 * 60 * 24)); //return dias; return diferencia; } // CONSTRUCTOR DE CADENA (Formato "dd/mm/YYYY" A FECHA function _fecha(cadena) { //Separador para la introduccion de las fechas var separador = "/"; //Separa por dia, mes y año if ( cadena.indexOf( separador ) != -1 ) { var posi1 = 0; var posi2 = cadena.indexOf( separador, posi1 + 1 ); var posi3 = cadena.indexOf( separador, posi2 + 1 ); this.dia = cadena.substring( posi1, posi2 ); this.mes = cadena.substring( posi2 + 1, posi3 ); this.mes =this.mes -1 this.anio = cadena.substring( posi3 + 1, cadena.length ); } else { this.dia = 0; this.mes = 0; this.anio = 0; } return true; } function cancelarModal() { $('#ventanaModal').html(''); $('#ventanaModal').hide(); return true; } function centrarModal(id) { var id = id || 'ventanaModal'; var el = document.getElementById(id); var margenIzq = ((-1)*(parseInt(el.style.width)/2)).toString(); var margenTop= ((-1)*(parseInt(el.style.height)/2)).toString(); // Asignamos la nueva posición al elemento para que aparezca en el centro. el.style.marginLeft = margenIzq + 'px'; el.style.marginTop = margenTop + 'px'; el.style.left = '50%'; el.style.top = '50%'; el.style.position = 'fixed'; return true; } function cajaDialogo(tipo, mensaje, botones) { var caja; var mensaje= mensaje || "Atención"; var tipo = tipo || "Mensaje"; var titulo; var imagen; var botones=botones || {Cerrar: function(){$( this ).dialog( "close" );}}; switch(tipo) { case "Guardar": titulo="Guardar"; imagen=$('#baseImg').val()+"img/guardar.png"; break; case "Alerta": titulo="Atención"; imagen=$('#baseImg').val()+"img/alerta.png"; break; case "Borrado": titulo="Operación Exitosa"; imagen=$('#baseImg').val()+"img/borrado64.png"; break; case "Exito": titulo="Operación Exitosa"; imagen=$('#baseImg').val()+"img/exito.png"; break; case "Pregunta": titulo="Pregunta"; imagen=$('#baseImg').val()+"img/pregunta.png"; break; case "Error": titulo="Error"; imagen=$('#baseImg').val()+"img/error.png"; break; default: titulo=tipo; imagen=$('#baseImg').val()+"img/warning.png"; } caja='<div title="'+titulo+'" id="caja">'; caja+='<table width=100%"><tr>'; caja+='<td style="vertical-align: middle; width: 80px; text-align: center; padding:15px 5px 0 0">'; caja+='<img src="'+imagen+'" /></td>'; caja+='<td style="vertical-align: middle; padding:15px 0 0 10px; font-size:1.2em">'; caja+=mensaje+'</td></tr></table></div>'; caja=$(caja); caja.dialog({ modal: true, zIndex:1000, draggable:true, resizable: false, minHeight:200, width:400, buttons:botones}); return true; } // Traductor de mensajes de sistema function traductor(texto) { texto=trim(texto.toLowerCase()); switch(texto) { case "error": return "Error"; break; case "timeout": return "Tiempo de Espera Agotado"; break; case "abort": return "Operación Abortada"; break; case "parsererror": return "Error de Sintaxis"; break; case "not found": return "Ruta no encontrada"; break; case "internal server error": return "Error Interno del Servidor"; break; default: return texto; } } function nroPuro(nro) { return parseFloat(nro.replace(/\./g,'').replace(/\,/g,'.')); } function formatNumber(num, decLength, decSep, milSep) { if(num == '') return ''; var arg, entero, nrStr, sign = true; var cents = ''; if(typeof(num) == 'undefined') return; if(typeof(decLength) == 'undefined') decLength = 2; if(typeof(decSep) == 'undefined') decSep = ','; if(typeof(milSep) == 'undefined') milSep = '.'; if(milSep == '.') arg=/\./g; else if(milSep == ',') arg=/\,/g; if(typeof(arg) != 'undefined') num = num.toString().replace(arg, ''); num = num.toString().replace(/,/g,'.'); if(num.indexOf('.') != -1) entero = num.substring(0, num.indexOf('.')); else entero = num; if(isNaN(num))return "0"; if(decLength > 0) { sign = (num == (num = Math.abs(num))); nrStr = parseFloat(num).toFixed(decLength); nrStr = nrStr.toString(); if (nrStr.indexOf('.') != -1) cents=nrStr.substring(nrStr.indexOf('.')+1); } num = parseInt(entero); if(milSep != '') { num = num.toString(); for(var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++) num = num.substring(0, num.length - (4 * i + 3)) + milSep + num.substring( num.length - (4 * i + 3)); } else { for(var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++) num = num.substring(0, num.length - (4 * i + 3)) + num.substring(num.length - (4 * i + 3)); } if (isNaN(nroPuro(num)))num = '0'; if(decLength > 0) return (((sign) ? '' : '-') + num + decSep + cents); else return (((sign) ? '' : '-') + num); } function onlyDigits(e, value, allowDecimal, allowNegative, allowThousand, decSep, thousandSep, decLength) { var _ret = true, key; if(window.event) { key = window.event.keyCode; isCtrl = window.event.ctrlKey; } else if(e) { if(e.which) { key = e.which; isCtrl = e.ctrlKey; }} if(key === 8) return true; if(isNaN(key)) return true; if(key < 44 || key > 57) { return false; } keychar = String.fromCharCode(key); if(decLength === 0) allowDecimal = false; if(!allowDecimal && keychar === decSep || !allowNegative && keychar === '-' || !allowThousand && keychar === thousandSep) return false; return _ret; } function isCI(ci) { if (isNaN(ci) || ci==='' || ci.length<4) return false; return true; } function isEmail(email) { var ereg=/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/; return ereg.test(email); } function isNombre(nombre) { var ereg=/^([A-Za-zÑÁÉÍÓÚñáéíóúÜü]{1}[A-Za-zÑÁÉÍÓÚñáéíóúÜü]+[\s]*)+$/; return ereg.test(nombre); } function nroFormatoUS(nro) { var n= parseFloat(nro.replace(/\./g,'').replace(/\,/g,'.')); if (isNaN(n)===true || trim(nro)==='') return false; return n; } function trim(myString) { return myString.replace(/^\s+/g,'').replace(/\s+$/g,''); }
/** * @author XingGu Liu */ (function( window, undefined ) { var easyJsDomUtil = new EasyJsDomUtil(); function EasyJsDomUtil() { var RETURN_LINE_STR = '\n'; var ATTR_NAME_RELOAD_SELECT = "reloadSelect"; var ATTR_NAME_RELOAD_RADIO = "reloadRadio"; /** * Load content of data xml into assigned dom node * @param args an object which has properties as below: * args.dataListXml : string in xml format. For example: <List><TestData>...</TestData><TestData>...</TestData>...</List> * args.dataXmlNodeName: node name of the Data. In example above it is "TestData" * args.dataListDomNode : node where xml loading to * args.dataDomNodeCopy : copy of the dom node which is used to displays content of data * args.domNodeAttrName : Dom节点下的attribute名,用于扫描过滤 * args.dataNodeDidLoadFunc : List中的节点数据装载完成后的回调函数,在循环装载Data节点时,每个节点调用一次. * 格式:dataNodeDidLoadFunc(domNode, index, length) */ this.loadListDataXmlToDomNode = function (args) { if(args.dataListXml.length == 0) { return; } var xmlRootNode; if(typeof args.dataListXml == "string") { var xmlDoc = myParseXML(args.dataListXml); xmlRootNode = xmlDoc.childNodes[0]; } else { xmlRootNode = args.dataListXml; } var xmlRowNodes = $(xmlRootNode).find(args.dataXmlNodeName); var tempNode; var length = xmlRowNodes.length; for(var i = 0; i < length; i++) { tempNode = $(args.dataDomNodeCopy).clone(); $(args.dataListDomNode).append(tempNode); //set value from xml setDataXmlNode(tempNode[0], 0, args.domNodeAttrName, xmlRowNodes[i], false); //did load one data node if(args.dataNodeDidLoadFunc != null && args.dataNodeDidLoadFunc != undefined) { args.dataNodeDidLoadFunc(tempNode[0], i, length); } } } /** * dataAttributeName: String 属性名 */ this.mappingDomToDataXml = function (dataAttributeName) { var domNodes = $('[' + dataAttributeName + ']'); if(domNodes.length > 0) { return getDataXml(domNodes[0], 0, dataAttributeName); } else { return ''; } }; this.mappingDomNodeToDataXml = function (domNode, dataAttributeName) { return getDataXml(domNode, 0, dataAttributeName); }; /** * dataAttributeName: String 属性名 * dataXml: String 数据对象对应的XML */ /* this.mappingDataXmlToDom = function (dataAttributeName, dataXml) { var domNodes = $('[' + dataAttributeName + ']'); if(domNodes.length > 0) { setDataXml(domNodes[0], 0, dataAttributeName, dataXml); } }; */ /** * dataAttributeName: String 属性名 * dataXmlNode: String 数据对象对应的XML的根节点 */ this.mappingDataXmlNodeToDom = function (dataAttributeName, dataXmlNode, isAutoCloneListElement) { var domNodes = $('[' + dataAttributeName + ']'); if(domNodes.length > 0) { setDataXmlNode(domNodes[0], 0, dataAttributeName, dataXmlNode, isAutoCloneListElement); } }; this.mappingDataXmlNodeToDomNode = function(domNode, attributeName, dataXmlNode, isAutoCloneListElement) { setDataXmlNode(domNode, 0, attributeName, dataXmlNode, isAutoCloneListElement); }; /** * dataAttributeName: String 属性名 * simpleResultXml: String ajax取得的SimpleResult对象对应的XML */ this.mappingSimpleResultXmlToDom = function (dataAttributeName, simpleResultXml, isAutoCloneListElement) { var domNodes = $('[' + dataAttributeName + ']'); if(domNodes.length > 0) { var dataXmlNode = getNodeFromXml(simpleResultXml, 'Result'); setDataXmlNode(domNodes[0], 0, dataAttributeName, dataXmlNode, isAutoCloneListElement); } }; this.getNodeFromSimpleResultXml = function (simpleResultXml, nodeName) { return getNodeFromXml(simpleResultXml, nodeName); }; this.getNodeFromSimpleResultXmlDoc = function (simpleResultXmlDoc, nodeName) { return getChildNodeByName(simpleResultXmlDoc, nodeName); }; this.cloneRows = function (rowId, cloneCount) { //Clone the detail rows var row0 = $('#' + rowId + ''); var rowTmp = row0; var i = 0; if($(row0).after != undefined) { var prevRow = row0; for(i = 0; i < cloneCount; i++) { rowTmp = $(row0).clone(true); prevRow.after(rowTmp); prevRow = rowTmp; } } else { var parentNode = row0.parentNode; for(i = 0; i < cloneCount; i++) { rowTmp = $(row0).clone(true); $(parentNode).append(rowTmp); } } }; this.getDomNodeValue = function(domNode) { return GetDomNodeValue(domNode); }; /*************************************************************/ /*************** handle select and radio ********************/ this.reloadAllSelectAndRadioFromResultXmlNode = function (dataXmlNode) { if(typeof dataXmlNode == "string") { dataXmlNode = myParseXML(dataXmlNode); } var valueLabelListNodes = $(dataXmlNode).find("ValueLabelList"); var valueLabelListNode = null; var valueLabelListName; var valueLabelsNode; var valueLabelNode; var nodeTmp; var valueArray = null; var labelArray = null; var selectNodes = null; var domSelect; var radioGroupNodes = null; var domRadioGroup; var i, k, m, valueIndex, labelIndex; for(i = 0; i < valueLabelListNodes.length; i++) { valueLabelListNode = valueLabelListNodes[i]; valueLabelListName = null; valueLabelsNode = null; for(k = 0; k < valueLabelListNode.childNodes.length; k++) { nodeTmp = valueLabelListNode.childNodes[k]; if(isStrEqualIgnoreCase(nodeTmp.nodeName, "name")) { valueLabelListName = getXmlNodeTextValue(nodeTmp); } else if (isStrEqualIgnoreCase(nodeTmp.nodeName, "valueLabels")) { valueLabelsNode = nodeTmp; } if(valueLabelListName != null && valueLabelsNode != null) { break; } } if(valueLabelListName == null || valueLabelsNode == null) { continue; } selectNodes = $('[' + ATTR_NAME_RELOAD_SELECT + '="' + valueLabelListName + '"' + ']'); radioGroupNodes = $('[' + ATTR_NAME_RELOAD_RADIO + '="' + valueLabelListName + '"' + ']'); if(selectNodes.length == 0 && radioGroupNodes.length == 0) { continue; } //Get the value label array valueArray = new Array(); labelArray = new Array(); valueIndex = 0; labelIndex = 0; for(k = 0; k < valueLabelsNode.childNodes.length; k++) { valueLabelNode = valueLabelsNode.childNodes[k]; for(m = 0; m < valueLabelNode.childNodes.length; m++) { nodeTmp = valueLabelNode.childNodes[m]; if(isStrEqualIgnoreCase(nodeTmp.nodeName, "value")) { valueArray[valueIndex++] = getXmlNodeTextValue(nodeTmp); } else if (isStrEqualIgnoreCase(nodeTmp.nodeName, "label")) { labelArray[labelIndex++] = getXmlNodeTextValue(nodeTmp); } } } //load dom select for(k = 0; k < selectNodes.length; k++) { domSelect = selectNodes[k]; reloadOneDomSelect(domSelect, valueArray, labelArray); } //load dom radio group for(k = 0; k < radioGroupNodes.length; k++) { domRadioGroup = radioGroupNodes[k]; reloadOneDomRadio(domRadioGroup, valueArray, labelArray); } } }; this.reloadAllSelectByName = function (name, valueArray, labelArray) { var controls = document.getElementsByName(name); for(var i = 0; i < controls.length; i++) { reloadOneDomSelect(controls[i], valueArray, labelArray); } }; this.reloadDomSelect = function (domSelect, valueArray, labelArray) { reloadOneDomSelect(domSelect, valueArray, labelArray); }; function reloadOneDomRadio(domRadioGroup, valueArray, labelArray) { if($(domRadioGroup).after == undefined) { alert('$().after() must be be supported.'); return; } var nodeTmp; var nodeNameTmp = ""; var i, k, radioNodesCnt; var index, index1, index2; var radioNodesArray = new Array(); var childNodes = $(domRadioGroup).children(); var domRadioNodes = $(domRadioGroup).find('input[type="radio"]'); if(domRadioNodes.length == 0) { return; } else if (domRadioNodes.length == 1) { radioNodesCnt = 1; } else { for(i = 0; i < childNodes.length; i++) { if(childNodes[i].nodeName) if(isStrEqualIgnoreCase(nodeNameTmp, childNodes[i].nodeName)) { //Find the loop cnt radioNodesCnt = i; } } } if(childNodes.length == 0) { return; } else if(childNodes.length == 1) { radioNodesCnt = 1; } else { index1 = -1; index2 = 1; for(i = 0; i < childNodes.length; i++) { nodeTmp = childNodes[i]; if(nodeTmp.tagName.toLowerCase() == "input" && nodeTmp.type.toLowerCase() == "radio") { if(index1 < 0) { index1 = i; } else { index2 = i; break; } } } radioNodesCnt = index2 - index1; } //Copy nodes to array index = 0; for(k = 0; k < radioNodesCnt; k++) { radioNodesArray[index++] = $(childNodes[k]).clone(true); } //Remove all nodes except 1st var length = domRadioGroup.childNodes.length; for(i = 0; i < length; i++) { $(domRadioGroup.childNodes[0]).remove(); } //Append for(i = 0; i < valueArray.length; i++) { for(index = 0; index < radioNodesArray.length; index++) { $(domRadioGroup).append($(radioNodesArray[index]).clone(true)); } } //set value and label domRadioNodes = $(domRadioGroup).find('input[type="radio"]'); for(i = 0; i < domRadioNodes.length; i++) { $(domRadioNodes[i]).val(valueArray[i]); if(radioNodesCnt == 1) { $(domRadioNodes[i]).after(labelArray[i]); } else { nodeTmp = getNextSibling($(domRadioNodes[i])); try{ $(nodeTmp).text(labelArray[i]); } catch(e) { try{ $(nodeTmp).val(labelArray[i]); } catch(e) { $(domRadioNodes[i]).after(labelArray[i]); } } } } } function reloadOneDomSelect(domSelect, valueArray, labelArray) { var k; var len = domSelect.options.length; for(k = 0; k < len; k++) { domSelect.remove(0); } len = valueArray.length; var option; for(k = 0; k < len; k++) { option = document.createElement('option'); option.value = valueArray[k]; option.text = labelArray[k]; if(isMSIE()){ domSelect.add(option); } else { domSelect.add(option, null); } } } /*******************************************************************************/ this.getChildNodeFromXml = function (simpleResultXml, nodeName) { return getNodeFromXml(simpleResultXml, nodeName); }; function getNodeFromXml(simpleResultXml, nodeName) { var simpleResultXmlDoc = null; if(typeof simpleResultXml == "string") { simpleResultXmlDoc = myParseXML(simpleResultXml); } else { simpleResultXmlDoc = simpleResultXml; } return getChildNodeByName(simpleResultXmlDoc.firstChild, nodeName); } function getChildNodeByName(xmlNode, nodeName) { for(var i = 0; i < xmlNode.childNodes.length; i++) { if(isStrEqualIgnoreCase(xmlNode.childNodes[i].nodeName, nodeName)) { return xmlNode.childNodes[i]; } } return null; } // /** // * dataAttributeName: String 属性名 // * simpleResultXmlNode: String ajax取得的SimpleResult对象对应的XML的根节点 // */ // this.mappingSimpleResultNodeToDom = function (dataAttributeName, simpleResultXmlNode) // { // var domNodes = $('[' + dataAttributeName + ']'); // if(domNodes.length > 0) { // setDataXml(domNodes[0], 0, dataAttributeName, simpleResultXmlNode); // } // }; /** * callBackWhenForwardNode(node, depth) * callBackWhenBackwardNode(node, depth) * callBackWhenVisitLeafNode(node, depth) * * return: void */ /* traverseDomNode() has already ignored text node function traverseDomNodeIgnoreTextNode(domNode, depth, callBackWhenForwardNode, callBackWhenBackwardNode, callBackWhenVisitLeafNode) { traverseDomNode (domNode, depth, function(nodeTmp, depthTmp) { //forward if(nodeTmp.nodeType != 3) { if(nodeTmp.childNodes.length == 1) { if(nodeTmp.childNodes[0].nodeType == 3) { callBackWhenVisitLeafNode(nodeTmp, depthTmp); return; } } callBackWhenForwardNode(nodeTmp, depthTmp); } }, function(nodeTmp, depthTmp) { //backward callBackWhenBackwardNode(nodeTmp, depthTmp); }, function(nodeTmp, depthTmp) { //visit leaf if(nodeTmp.nodeType != 3) { callBackWhenVisitLeafNode(nodeTmp, depthTmp); } } ); } */ function traverseDomNode(domNode, depth, callBackWhenForwardNode, callBackWhenBackwardNode, callBackWhenVisitLeafNode) { var nodeTmp = domNode; var depthTmp = depth; var backwardFlg = false; var nodeNextSiblingTmp = null; var nodeChildTmp = null; if(domNode == null) { return; } while (nodeTmp != null) { nodeChildTmp = getFirstChildNotTextNode(nodeTmp); if (nodeChildTmp != null) { //Debug if (backwardFlg) { if (depthTmp < depth) break; //callBack callBackWhenBackwardNode(nodeTmp, depthTmp); if (depthTmp <= depth) break; nodeNextSiblingTmp = getNextSiblingNotTextNode(nodeTmp); if (nodeNextSiblingTmp == null) { nodeTmp = nodeTmp.parentNode; backwardFlg = true; depthTmp--; } else { nodeTmp = nodeNextSiblingTmp; backwardFlg = false; } } else { //callback callBackWhenForwardNode(nodeTmp, depthTmp); nodeTmp = nodeChildTmp; depthTmp++; } } else { //leaf node //callback callBackWhenVisitLeafNode(nodeTmp, depthTmp); nodeNextSiblingTmp = getNextSiblingNotTextNode(nodeTmp); if (nodeNextSiblingTmp == null) { nodeTmp = nodeTmp.parentNode; backwardFlg = true; depthTmp--; } else { nodeTmp = nodeNextSiblingTmp; } } }//while } /** * callBackWhenForwardNode(node, depth) * callBackWhenBackwardNode(node, depth) * callBackWhenVisitLeafNode(node, depth) * return CommonNode */ function traverseDomNodeFilteredByAttributeName( domNode, depth, attributeName, callBackWhenForwardNode, callBackWhenBackwardNode, callBackWhenVisitLeafNode ) { traverseDomNode(domNode, depth, function(nodeTmp, depthTmp) { //forward if($(nodeTmp).attr(attributeName) != undefined) { if(getFirstChildByAttributeName(nodeTmp, attributeName) == null) { callBackWhenVisitLeafNode(nodeTmp, depthTmp); } else { callBackWhenForwardNode(nodeTmp, depthTmp); } } }, function(nodeTmp, depthTmp) { //backward if($(nodeTmp).attr(attributeName) != undefined) { if(getFirstChildByAttributeName(nodeTmp, attributeName) != null) { callBackWhenBackwardNode(nodeTmp, depthTmp); } } }, function(nodeTmp, depthTmp) { //visit leaf if($(nodeTmp).attr(attributeName) != undefined) { callBackWhenVisitLeafNode(nodeTmp, depthTmp); } } ); } function getDataXml(domNode, depth, attributeName) { var nodeXml = ''; traverseDomNodeFilteredByAttributeName( domNode, depth, attributeName, function(nodeTmp, depthTmp) { //forward nodeXml += GetNodeBeginXml(nodeTmp, depthTmp, attributeName); nodeXml += RETURN_LINE_STR; }, function(nodeTmp, depthTmp) { //backward nodeXml += GetNodeEndXml(nodeTmp, depthTmp, attributeName); nodeXml += RETURN_LINE_STR; }, function(nodeTmp, depthTmp) { //visit leaf nodeXml += GetNodeBeginXml(nodeTmp, depthTmp, attributeName); nodeXml += encodeXmlContent(GetDomNodeValue(nodeTmp)); nodeXml += GetNodeEndXml(nodeTmp, 0, attributeName); nodeXml += RETURN_LINE_STR; } ); return nodeXml; } function autoCloneListElement(domNode, attributeName, dataXmlNode) { var domNodeTmps = $(domNode).find('[' + attributeName + '][autoCloneListElement]'); if(domNodeTmps.length == 0) { return; } //reset all handled status var autoCloneHandledAttr = 'autoCloneListElementHandled' + (new Date()).getTime(); $(domNodeTmps).each(function () { $(this).attr(autoCloneHandledAttr, 'false'); }); autoCloneListElementImp(domNode, attributeName, dataXmlNode, autoCloneHandledAttr); $(domNode).removeAttr(autoCloneHandledAttr); $($(domNode).find('[' + autoCloneHandledAttr + ']')).each(function() { $(this).removeAttr(autoCloneHandledAttr); }); } function autoCloneListElementImp(domNode, attributeName, dataXmlNode, autoCloneHandledAttrName){ if($(domNode).attr(autoCloneHandledAttrName) == 'true') { return; } else { $(domNode).attr(autoCloneHandledAttrName, 'true'); } //var childrenAutoListNodes = new Array(); var i, j; var index = 0; var index2 = 0; var xmlNodeTmp = dataXmlNode; var xmlNodeTmp2 = null; var xmlNodeListTmp = null; var domNodeNotHandledParents = null; var domNodeParents = null; var attrVal = ''; var listSize = 0; var nodeTmp2 = null; var domNodeTmp2; var domLen = 0; var domNodeTmp3 = null; var domNodeTmp4 = null; var index3 = 0; var domNodePrevTmp = null; //var domNodeTmps = $(domNode).find('[' + attributeName + '][autoCloneListElement]['+ autoCloneHandledAttrName +'="false"]'); var domNodeTmps = $(domNode).find('[' + attributeName + '][autoCloneListElement]'); if(domNodeTmps.length == 0) { return; } for(i = 0; i < domNodeTmps.length; i++) { domNodeTmp2 = domNodeTmps[i]; //IE8 not support .parentNode //if(domNodeTmp2.parentNode == null || domNodeTmp2.parentNode == undefined) { if($(domNodeTmp2).parents().length == 0) { continue; } if($(domNodeTmp2).attr(autoCloneHandledAttrName) == 'true') { continue; } domNodeNotHandledParents = $(domNodeTmp2).parents('[' + attributeName + ']['+ autoCloneHandledAttrName +'="false"]'); if(domNodeNotHandledParents.length == 0) { //Sync the xml data node domNodeParents = $(domNodeTmp2).parents('[' + attributeName + ']'); for (index = 0; index < domNodeParents.length; index++) { if($(domNodeParents[index]).attr(autoCloneHandledAttrName) == 'true') { index2 = index - 1; break; } } xmlNodeTmp2 = xmlNodeTmp; for(index = index2; index >= 0; index--) { attrVal = $(domNodeParents[index]).attr(attributeName); attrVal = attrVal.charAt(0).toLowerCase() + attrVal.substring(1); nodeTmp2 = $(xmlNodeTmp2).children(attrVal); if(nodeTmp2.length == 0) { attrVal = attrVal.charAt(0).toUpperCase() + attrVal.substring(1); nodeTmp2 = $(xmlNodeTmp2).children(attrVal); } //now, sync the xmlNodeTmp to the parent of current list element xmlNodeTmp2 = nodeTmp2[0]; }//for //Clone the nodes listSize = ($(xmlNodeTmp2).children()).length; attrVal = $(domNodeTmp2).attr(attributeName); domNodeTmp3 = $(domNodeTmp2.parentNode).children('[' + attributeName + '="' + attrVal + '"]'); domLen = domNodeTmp3.length; //$(domNodeTmp3[0]).attr('display', 'normal'); if(domLen > listSize) { for(index3 = domLen - 1; index3 >= listSize; index3--) { if(index3 == 0) { //keep the [0] //$(domNodeTmp3[index3]).attr('display', 'none'); } else { $(domNodeTmp3[index3]).remove(); } } } else if (domLen < listSize) { /* modify to adapt jqMobi domNodePrevTmp = domNodeTmp3[domLen-1]; for(index3 = domLen; index3 < listSize; index3++) { domNodeTmp4 = $(domNodePrevTmp).clone(true); $(domNodePrevTmp).after(domNodeTmp4); domNodePrevTmp = domNodeTmp4; } */ domNodePrevTmp = domNodeTmp3[domLen-1]; var parentNodeTmp = domNodeTmp3[0].parentNode; for(index3 = domLen; index3 < listSize; index3++) { domNodeTmp4 = $(domNodePrevTmp).clone(true); $(parentNodeTmp).append(domNodeTmp4); } } if(listSize > 0) { //loop the cloned nodes domNodeTmp3 = $(domNodeTmp2.parentNode).children('[' + attributeName + '="' + attrVal + '"]'); domLen = domNodeTmp3.length; xmlNodeListTmp = $(xmlNodeTmp2).children(); for(j = 0; j < domNodeTmp3.length; j++) { autoCloneListElementImp(domNodeTmp3[j], attributeName, xmlNodeListTmp[j], autoCloneHandledAttrName); } } else { //remove all the list node of children to retain size 1 removeListElementToSize1(domNodeTmp2.parentNode, 0, attributeName); } }//if }//for } function removeListElementToSize1(domNode, depth, attributeName) { var attributeValue = null; var autoSizeAttr = null; var i = 0; var domLen = 0; var domNodeTmp = null; function removeListNodeToSize1(nodeTmp, depthTmp){ autoSizeAttr = $(nodeTmp).attr("autoCloneListElement"); if(autoSizeAttr == undefined) { return; } attributeValue = $(nodeTmp).attr(attributeName); domNodeTmp = $(nodeTmp.parentNode).children('[' + attributeName + '="' + attributeValue + '"]'); domLen = domNodeTmp.length; for(i = domLen - 1; i >= 1; i--) { $(domNodeTmp[i]).remove(); } } traverseDomNodeFilteredByAttributeName( domNode, depth, attributeName, function(nodeTmp, depthTmp) { //forward removeListNodeToSize1(nodeTmp, depthTmp); }, function(nodeTmp, depthTmp) { //backward }, function(nodeTmp, depthTmp) { //visit leaf removeListNodeToSize1(nodeTmp, depthTmp); } ); } function autoCloneListElementToFixedSize(domNode, depth, attributeName, dataXmlNode) { var attributeValue = null; var autoSizeAttr = null; var autoSize = null; var i = 0; var domLen = 0; var domNodeTmp = null; var domNodeTmp2 = null; var domNodePrevTmp = null; var listSize = 0; function cloneListNode2(nodeTmp, depthTmp){ autoSizeAttr = $(nodeTmp).attr("autoCloneListElement"); if(autoSizeAttr == undefined) { return; } autoSize = Number(autoSizeAttr); if(!isNaN(autoSize)) { attributeValue = $(nodeTmp).attr(attributeName); domNodeTmp = $(nodeTmp.parentNode).children('[' + attributeName + '="' + attributeValue + '"]'); domLen = domNodeTmp.length; listSize = autoSize; //$(domNodeTmp[0]).attr('display', 'normal'); if(domLen > listSize) { for(i = domLen - 1; i >= listSize; i--) { $(domNodeTmp[i]).remove(); } } else if (domLen < listSize) { /* modify to adapt jqMobi domNodePrevTmp = domNodeTmp[domLen-1]; for(i = domLen; i < listSize; i++) { domNodeTmp2 = $(domNodePrevTmp).clone(true); $(domNodePrevTmp).after(domNodeTmp2); domNodePrevTmp = domNodeTmp2; } */ domNodePrevTmp = domNodeTmp[domLen-1]; var parentNodeTmp = domNodeTmp[0].parentNode; for(i = domLen; i < listSize; i++) { domNodeTmp2 = $(domNodePrevTmp).clone(true); $(parentNodeTmp).append(domNodeTmp2); } } } } traverseDomNodeFilteredByAttributeName( domNode, depth, attributeName, function(nodeTmp, depthTmp) { //forward }, function(nodeTmp, depthTmp) { //backward cloneListNode2(nodeTmp, depthTmp); }, function(nodeTmp, depthTmp) { //visit leaf cloneListNode2(nodeTmp, depthTmp); } ); } function setDataXmlNode(domNode, depth, attributeName, dataXmlNode, isAutoCloneListElement) { var nodeXml = ''; var domNodeArray = new Array(); var domNodeIndexTmp = 0; if ((isAutoCloneListElement != undefined) && (isAutoCloneListElement == true)) { //clone the list elements to the size in Result Xml autoCloneListElement(domNode, attributeName, dataXmlNode); //clone the node which auto fixed size autoCloneListElementToFixedSize(domNode, depth, attributeName, dataXmlNode); } //prescan traverseDomNodeFilteredByAttributeName( domNode, depth, attributeName, function(nodeTmp, depthTmp) { //forward nodeXml += GetNodeBeginXml(nodeTmp, depthTmp, attributeName); nodeXml += RETURN_LINE_STR; }, function(nodeTmp, depthTmp) { //backward nodeXml += GetNodeEndXml(nodeTmp, depthTmp, attributeName); nodeXml += RETURN_LINE_STR; }, function(nodeTmp, depthTmp) { //visit leaf nodeXml += GetNodeBeginXml(nodeTmp, depthTmp, attributeName); nodeXml += '' + domNodeIndexTmp; nodeXml += GetNodeEndXml(nodeTmp, 0, attributeName); nodeXml += RETURN_LINE_STR; SetDomNodeValue(nodeTmp, ""); domNodeArray[domNodeIndexTmp] = nodeTmp; domNodeIndexTmp++; } ); //Scan the xml //New way , the difference is that ignoring the text node { var xmlDocFromDom = myParseXML(nodeXml); var nodeTmp = xmlDocFromDom.childNodes[0]; //var nodeTmp2 = $(dataXmlNode).closest("Result")[0]; var nodeTmp2 = dataXmlNode; var nodeTmp2Next = null; var depthTmp = depth; var backwardFlg = false; var nodeNameTmp = null; var nodeNextSiblingTmp = null; var nodeChildTmp = null; while (nodeTmp != null) { nodeChildTmp = getFirstChildNotTextNode(nodeTmp); if (nodeChildTmp != null) { if (backwardFlg) { if (depthTmp < depth) break; nodeNextSiblingTmp = getNextSiblingNotTextNode(nodeTmp); if (nodeNextSiblingTmp != null) { nodeNameTmp = nodeTmp.nodeName; nodeTmp = nodeNextSiblingTmp; backwardFlg = false; //sync the dom xml node operation //The next node of xml data maybe null if(nodeTmp.nodeName == nodeNameTmp) { //Node name are same, so these nodes is the element of a list or array nodeTmp2Next = getNextSiblingNotTextNode(nodeTmp2); } else { //Find the same tag node in this depth nodeTmp2Next = findChildXmlNode(nodeTmp2.parentNode, nodeTmp.nodeName); } if(nodeTmp2Next != null) { nodeTmp2 = nodeTmp2Next; } else { backwardFlg = true; } } else { //IndexXml nodeTmp = nodeTmp.parentNode; backwardFlg = true; depthTmp--; //sync the dom xml node operation nodeTmp2 = nodeTmp2.parentNode; } } //if backward else { //IndexXml nodeTmp = nodeChildTmp; backwardFlg = false; depthTmp++; //sync the dom xml node operation //Find the first child whose name is same as nodeTmp nodeTmp2Next = null; nodeNextSiblingTmp = nodeTmp; while(true) { nodeTmp2Next = findChildXmlNode(nodeTmp2, nodeNextSiblingTmp.nodeName); if(nodeTmp2Next != null) { break; } nodeNextSiblingTmp = getNextSiblingNotTextNode(nodeNextSiblingTmp); if(nodeNextSiblingTmp == null) { break; } } if(nodeTmp2Next != null) { nodeTmp2 = nodeTmp2Next; nodeTmp = nodeNextSiblingTmp; } else { nodeTmp = nodeTmp.parentNode; backwardFlg = true; depthTmp--; } } // backward } // child != null else { //leaf node //Set value to domNode ******************************************* domNodeIndexTmp = getXmlNodeTextValue(nodeTmp); //nodeType == 9 is the document node if( isStrEqualIgnoreFirstCharCase(nodeTmp.nodeName, nodeTmp2.nodeName) ) { if(domNodeArray[domNodeIndexTmp] != undefined) { SetDomNodeValue(domNodeArray[domNodeIndexTmp], decodeXmlContent(getXmlNodeTextValue(nodeTmp2))); } } nodeNextSiblingTmp = getNextSiblingNotTextNode(nodeTmp); if (nodeNextSiblingTmp != null) { nodeNameTmp = nodeTmp.nodeName; nodeTmp = nodeNextSiblingTmp; backwardFlg = false; //sync the dom xml node operation if(nodeTmp.nodeName == nodeNameTmp) { //Node name are same, so these nodes is the element of a list or array nodeTmp2Next = getNextSiblingNotTextNode(nodeTmp2); if(nodeTmp2Next != null) { nodeTmp2 = nodeTmp2Next; } else { nodeTmp = nodeTmp.parentNode; backwardFlg = true; depthTmp--; //sync the dom xml node operation nodeTmp2 = nodeTmp2.parentNode; } } else { //Find the same tag node in this depth nodeTmp2Next = null; nodeNextSiblingTmp = nodeTmp; while(true) { nodeTmp2Next = findChildXmlNode(nodeTmp2.parentNode, nodeNextSiblingTmp.nodeName); if(nodeTmp2Next != null) { break; } nodeNextSiblingTmp = getNextSiblingNotTextNode(nodeNextSiblingTmp); if(nodeNextSiblingTmp == null) { break; } } if(nodeTmp2Next != null) { nodeTmp = nodeNextSiblingTmp; nodeTmp2 = nodeTmp2Next; } else { nodeTmp = nodeTmp.parentNode; backwardFlg = true; depthTmp--; nodeTmp2 = nodeTmp2.parentNode; } } } else { nodeTmp = nodeTmp.parentNode; backwardFlg = true; depthTmp--; //sync the dom xml node operation nodeTmp2 = nodeTmp2.parentNode; } } }//while } return nodeXml; } function isPropertyNameEqual(name1, name2) { if(name1 == name2) { return true; } else { var strL = ""; var strS = ""; if(name1.length > name2.length) { strS = "." + name2; strL = name1; } else if(name1.length < name2.length) { strS = "." + name1; strL = name2; } else { return false; } var index = strL.indexOf(strS); if(index < 0) { return false; } else { if((strL.length - index) == strS.length) { return true; } else { return false; } } } } function getAttributeValue(node, attributeName) { if(node.attributes != null) { if(isMSIE()){ for(var i = 0; i < node.attributes.length; i++) { if(isStrEqualIgnoreCase(node.attributes[i].name, attributeName)) { return node.attributes[i].value; } } return null; } else { return node.attributes[attributeName].value; } } else { return null; } } function containsAttribute(node, attributeName) { if(node.attributes != null) { if(isMSIE()){ for(var i = 0; i < node.attributes.length; i++) { if(isStrEqualIgnoreCase(node.attributes[i].name, attributeName)) { return true; } } return false; } else { if(node.attributes[attributeName] != null) { return true; } else { return false; } } } else { return false; } } function GetNodeBeginXml(node, depth, attributeName) { var beginXml = GetNodeDepthStr(depth) + "<" + GetNodeName(node, attributeName); // for (i = 0; i < node.getAttributes().size(); i++) // { // beginXml += " " + GetNodeAttributeXml(node.getAttributes().get(i)); // } beginXml += ">"; return beginXml; } function GetNodeName(node, attributeName) { return getAttributeValue(node,attributeName); } function GetDomNodeValue (node) { if(node.tagName.toLowerCase() == "input") { if(node.type.toLowerCase() == "radio") { //visit all sibling var nodeTmp = node; var radioName = node.name; while(nodeTmp != null) { if(!isXmlNodeTextType(nodeTmp) && nodeTmp.tagName.toLowerCase() == "input" && nodeTmp.type.toLowerCase() == "radio" && nodeTmp.name == radioName && nodeTmp.checked) { return nodeTmp.value; } nodeTmp = getNextSibling(nodeTmp); } return ""; } else if(node.type.toLowerCase() == "checkbox") { if(node.checked) { return "true"; } else { return "false"; } } else { //return node.value; return $(node).val(); } } else if(node.tagName.toLowerCase() == "select") { var selectedIndex = 0; if(node.selectedIndex >= 0) { selectedIndex = node.selectedIndex; } if (node.options.length == 0) { return ""; } return node.options[selectedIndex].value; } else if(node.tagName.toLowerCase() == "textarea") { return $(node).val(); } else { var radioChildren = $(node).find('input[type="radio"]'); if(radioChildren.length > 0) { for(var i = 0; i < radioChildren.length; i++) { if(radioChildren[i].checked) { return radioChildren[i].value; } } return ""; } else { //return node.innerText; return $(node).text(); } } } this.setDomNodeValue = function (node, value) { return SetDomNodeValue(node, value); } function SetDomNodeValue(node, value) { if(node.tagName.toLowerCase() == "input") { if(node.type.toLowerCase() == "radio") { //visit all sibling var nodeTmp = node; var radioName = node.name; while(nodeTmp != null) { if(!isXmlNodeTextType(nodeTmp) && nodeTmp.tagName.toLowerCase() == "input" && nodeTmp.type.toLowerCase() == "radio" && nodeTmp.name == radioName && nodeTmp.value == value) { nodeTmp.checked = true; } else { nodeTmp.checked = false; } nodeTmp = getNextSibling(nodeTmp); } } else if(node.type.toLowerCase() == "checkbox") { if("true" == value) { node.checked = true; } else { node.checked = false; } } else { $(node).val(value); } } // if input <- else if(node.tagName.toLowerCase() == "select") { var selectedIndex = node.selectedIndex; if(selectedIndex < 0) { selectedIndex = 0; } for(var i = 0; i < node.options.length; i++) { if(node.options[i].value == value) { selectedIndex = i; break; } } node.selectedIndex = selectedIndex; } else if(node.tagName.toLowerCase() == "textarea") { $(node).val(value); } else { var radioChildren = $(node).find('input[type="radio"]'); if(radioChildren.length > 0) { for(var i = 0; i < radioChildren.length; i++) { if(radioChildren[i].value == value) { radioChildren[i].checked = true; } else { radioChildren[i].checked = false; } } } else { //node.innerText = value; $(node).text(value); } } } function GetNodeEndXml(node, depth, attributeName) { return GetNodeDepthStr(depth) + "</" + GetNodeName(node, attributeName) + ">"; } function GetNodeDepthStr(depth) { if (depth <= 0) return ""; var depthStr = ""; var i = 0; for (;i < depth; i++) { depthStr += " "; } return depthStr; } /**************** XML ***************************/ var MetaChars = new Array('<', '>', '&', '\'', '"' ); var EncodeStrs = new Array("&lt;", "&gt;", "&amp;", "&apos;", "&quot;"); this.encodeXml = function(xmlContent) { return encodeXmlContent(xmlContent); }; this.decodeXml = function(xmlContent) { return decodeXmlContent(xmlContent); }; function encodeXmlContent(content) { var encodedContent = ''; if(content == null) return content; var i = 0; var indexOfMeta = 0; for (; i < content.length; i++) { indexOfMeta = 0; for (; indexOfMeta < 5; indexOfMeta++) { if (content.charAt(i) == MetaChars[indexOfMeta]) { break; } } if (indexOfMeta < 5) { encodedContent += EncodeStrs[indexOfMeta]; } else { encodedContent += content.charAt(i); } } return encodedContent; } function decodeXmlContent(content) { if (content == null) { return content; } var decodedContent = ''; var strTmp = ""; var lenTmp = 0; var indexOfEncodeStr = 0; var i = 0; for (; i < content.length; i++) { if (content.charAt(i) == '&') { indexOfEncodeStr = 0; for (; indexOfEncodeStr < EncodeStrs.length; indexOfEncodeStr++) { lenTmp = EncodeStrs[indexOfEncodeStr].length; if ((i + lenTmp) <= content.length) { strTmp = content.substring(i, i + lenTmp); if (strTmp == EncodeStrs[indexOfEncodeStr]) { break; } } } if (indexOfEncodeStr < EncodeStrs.length) { decodedContent += MetaChars[indexOfEncodeStr]; i += EncodeStrs[indexOfEncodeStr].length - 1; } else { decodedContent += content.charAt(i); } } else { decodedContent += content.charAt(i); } } return decodedContent; } function findNextXmlNode(node, nodeName) { var nodeTmp = getNextSibling(node); while(nodeTmp != null) { if(isStrEqualIgnoreFirstCharCase(nodeTmp.nodeName, nodeName)) { return nodeTmp; } nodeTmp = getNextSibling(nodeTmp); } return null; } function findChildXmlNode(node, nodeName) { var childNode = getFirstChild(node); if(childNode != null) { if(isStrEqualIgnoreFirstCharCase(childNode.nodeName, nodeName)) { return childNode; } else { return findNextXmlNode(childNode, nodeName); } } else { return null; } } function isXmlNodeTextType(xmlNode) { if(xmlNode.nodeType == 3 || xmlNode.nodeType == 8) { return true; } else { return false; } } function isStrEqualIgnoreCase(name1, name2) { if(name1.toLowerCase() == name2.toLowerCase()) { return true; } else { return false; } } function isStrEqualIgnoreFirstCharCase(name1, name2) { return isStrEqualIgnoreCase(name1, name2); /* In some explore xml document contents are automotical converted to UPPERCASE. * so there is no case sensitive compare. var strTmp1 = name1.charAt(0).toLowerCase() + name1.substring(1); var strTmp2 = name2.charAt(0).toLowerCase() + name2.substring(1); if(strTmp1 == strTmp2) { return true; } else { return false; } */ } this.getXmlNodeText = function (xmlNode) { return getXmlNodeTextValue(xmlNode); }; function getXmlNodeTextValue(xmlNode) { return $(xmlNode).text(); /* if(isExploreSupportWebkit()) { return xmlNode.textContent; } else { if(xmlNode.textContent == undefined) { return xmlNode.text; } else { return xmlNode.textContent; } } */ } function setXmlNodeTextValue(xmlNode, nodeValue) { $(xmlNode).text(xmlNode, nodeValue); /* if(isExploreSupportWebkit()) { xmlNode.textContent = nodeValue; } else { if(xmlNode.textContent == undefined) { xmlNode.text = nodeValue; } else { xmlNode.textContent = nodeValue; } } */ } /* function isExploreSupportWebkit() { var isWebKit = $.browser.webkit; if(isWebKit == undefined) { return false; } else { return isWebKit; } } */ function isMSIE() { if($.browser != undefined) { return $.browser.msie; } else { return false; } } this.parseXML = function(xmlContent) { return myParseXML(xmlContent); }; this.getXmlNodeFirstChild = function(xmlNode) { return getFirstChild(xmlNode); }; this.getXmlNodeNextSibling = function(xmlNode) { return getNextSibling(xmlNode); }; this.clearNodeValue = function(domNode, depth, attributeName) { var rootNode = domNode; if(domNode.length != undefined) { rootNode = domNode[0]; } traverseDomNodeFilteredByAttributeName( rootNode, depth, attributeName, function(nodeTmp, depthTmp) { }, function(nodeTmp, depthTmp) { }, function(nodeTmp, depthTmp) { SetDomNodeValue(nodeTmp, ""); } ); }; this.setNodeReadOnly = function(domNode, depth, attributeName) { var rootNode = domNode; if(domNode.length != undefined) { rootNode = domNode[0]; } traverseDomNodeFilteredByAttributeName( rootNode, depth, attributeName, function(nodeTmp, depthTmp) { }, function(nodeTmp, depthTmp) { }, function(nodeTmp, depthTmp) { setDomNodeReadOnly(nodeTmp); } ); }; function setDomNodeReadOnly(node) { if(node.tagName.toLowerCase() == "input") { if(node.type.toLowerCase() == "radio") { //visit all sibling var nodeTmp = node; var radioName = node.name; while(nodeTmp != null) { if(!isXmlNodeTextType(nodeTmp) && nodeTmp.tagName.toLowerCase() == "input" && nodeTmp.type.toLowerCase() == "radio" && nodeTmp.name == radioName) { nodeTmp.disabled = true; } nodeTmp = getNextSibling(nodeTmp); } } else if(node.type.toLowerCase() == "checkbox") { node.disabled = true; } else { node.readOnly = true; } } // if input <- else if(node.tagName.toLowerCase() == "select") { node.disabled = true; } else if(node.tagName.toLowerCase() == "textarea") { node.readOnly = true; } else { var radioChildren = $(node).find('input[type="radio"]'); if(radioChildren.length > 0) { for(var i = 0; i < radioChildren.length; i++) { radioChildren[i].disabled = true; } } else { //node.innerText = value; //$(node).text(value); } } } this.setNodeDisabled = function(domNode, depth, attributeName) { var rootNode = domNode; if(domNode.length != undefined) { rootNode = domNode[0]; } traverseDomNodeFilteredByAttributeName( rootNode, depth, attributeName, function(nodeTmp, depthTmp) { }, function(nodeTmp, depthTmp) { }, function(nodeTmp, depthTmp) { setDomNodeDisabled(nodeTmp); } ); }; function setDomNodeDisabled(node) { if(node.tagName.toLowerCase() == "input") { if(node.type.toLowerCase() == "radio") { //visit all sibling var nodeTmp = node; var radioName = node.name; while(nodeTmp != null) { if(!isXmlNodeTextType(nodeTmp) && nodeTmp.tagName.toLowerCase() == "input" && nodeTmp.type.toLowerCase() == "radio" && nodeTmp.name == radioName) { nodeTmp.disabled = true; } nodeTmp = getNextSibling(nodeTmp); } } else if(node.type.toLowerCase() == "checkbox") { node.disabled = true; } else { node.disabled = true; } } // if input <- else if(node.tagName.toLowerCase() == "select") { node.disabled = true; } else if(node.tagName.toLowerCase() == "textarea") { node.disabled = true; } else { var radioChildren = $(node).find('input:radio'); if(radioChildren.length > 0) { for(var i = 0; i < radioChildren.length; i++) { radioChildren[i].disabled = true; } } else { //node.innerText = value; //$(node).text(value); } } } this.parseXML = function (xmlContent) { return myParseXML(xmlContent); }; function myParseXML(xmlContent) { if(isMSIE()){ var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.loadXML(xmlContent); return xmlDoc; } else { return $.parseXML(xmlContent); } } function getFirstChild(xmlNode) { if(xmlNode.firstElementChild == undefined) { return xmlNode.firstChild; } else { return xmlNode.firstElementChild; } } function getFirstChildByAttributeName(xmlNode, attributeName) { var findResult = $(xmlNode).find('[' + attributeName + ']'); if(findResult.length > 0) { return findResult[0]; } else { return null; } } function getNextSibling(xmlNode) { if(xmlNode.nextElementSibling == undefined) { return xmlNode.nextSibling; } else { return xmlNode.nextElementSibling; } } this.getFirstChildNodeExceptTextAndComment = function (xmlNode) { return getFirstChildNotTextNode(xmlNode); }; this.getNextSiblingNodeExceptTextAndComment = function (xmlNode) { return getNextSiblingNotTextNode(xmlNode); }; function getFirstChildNotTextNode(xmlNode) { var nodeTmp = getFirstChild(xmlNode); while((nodeTmp != undefined) && (nodeTmp.nodeType == 3 || nodeTmp.nodeType == 8)) { nodeTmp = getNextSibling(nodeTmp); } return nodeTmp; } function getNextSiblingNotTextNode(xmlNode) { var nodeTmp = getNextSibling(xmlNode); while((nodeTmp != undefined) && (nodeTmp.nodeType == 3 || nodeTmp.nodeType == 8)) { nodeTmp = getNextSibling(nodeTmp); } return nodeTmp; } } //Expose window.easyJsDomUtil = easyJsDomUtil; })(window);
import moment from 'moment'; import { JOB_O_RECEIVE, JOBS_O_REQUEST, JOBS_O_RECEIVE, JOB_O_SELECT, JOB_O_SELECT_DONE } from '../actions/ownedJobs'; import { SESSION_REMOVE } from '../actions/session'; const initialState = { assigned: [], unassigned: [], historic: [], loading: false, error: null, selectedJob: null, selectInitialized: false, }; function getErrorState(state, action) { return { ...state, loading: false, error: action.error, }; } function removeMatchingJob(array, job) { array.forEach( (arrayJob, index, oldArray) => { if (arrayJob.id === job.data.id) { oldArray.splice(index, 1); } }); return array; } // Return true if the 'day' is before current day function historicDate(dateString) { return moment(dateString).isBefore(moment(), 'day'); } export default function (state = initialState, action) { switch (action.type) { case JOBS_O_RECEIVE: { // Receice all owned jobs if (action.error != null) { return getErrorState(state, action); } const assigned = []; const unassigned = []; const historic = []; if (action.jobJson.data != null) { // Loop through all the jobs action.jobJson.data.forEach( (job) => { // Add each job to appropriate collection if (historicDate(job.attributes.job_date)) { historic.push(job); } else if (job.attributes.filled) { assigned.push(job); } else { unassigned.push(job); } }); } return { ...state, assigned, unassigned, historic, loading: false, error: null, }; } case JOB_O_RECEIVE: { // Receive a single owned job if (action.error != null) { return getErrorState(state, action); } const newJob = action.jobJson.data; // Remove the job if it existed previously const assigned = removeMatchingJob(state.assigned, newJob); const unassigned = removeMatchingJob(state.unassigned, newJob); const historic = removeMatchingJob(state.historic, newJob); // Add the job in correct collection if (historicDate(newJob.attributes.job_date)) { historic.push(newJob); } else if (newJob.filled) { assigned.push(newJob); } else { unassigned.push(newJob); } return { ...state, assigned, unassigned, historic, loading: false, error: null, }; } case JOBS_O_REQUEST: // starting to fetch data requested return { ...state, loading: true, error: null, }; case JOB_O_SELECT: { // Select a specific job for inspection return { ...state, selectedJob: action.jobJson, selectInitialized: false, }; } case JOB_O_SELECT_DONE: return { ...state, selectInitialized: true, }; case SESSION_REMOVE: // Remove local data when user signs out return initialState; default: return state; } }
(function ($) { "use strict"; var app = angular.module('TableTypes', []); var mainController = function ($scope, $location) { $scope.tableTypes = tableTypes; $scope.columnOptions = columnOptions; $scope.languages = languages; $scope.activeTableType = null; $scope.editTableType = null; function specificColumn() { return {heading:"", displayName:""}; } function onSave(popup){ ipInitForms(); this.submit(); } $scope.activateTableType = function (tableType) { $scope.activeTableType = tableType; }; $scope.addModal = function () { var popup = $('#ipsAddModal'); $scope.editTableType = { id:null, name:'', language:0, columnOption: 0, specificColumns:[] }; popup.find('.ipsSave').off('click').on('click', onSave.bind($('#ipsAddModal form'), popup)); popup.find('form').off('ipSubmitResponse').on('ipSubmitResponse', function (e, response) { if (response && response.status == 'ok') { $scope.activeTableType = response.tableType; $scope.tableTypes.push($scope.activeTableType); $scope.$apply(); popup.modal('hide'); } }); popup.modal(); }; $scope.updateModal = function () { var popup = $('#ipsUpdateModal'); $scope.editTableType = angular.copy($scope.activeTableType); popup.find('.ipsSave').off('click').on('click', onSave.bind($('#ipsAddModal form'), popup)); popup.find('form').off('ipSubmitResponse').on('ipSubmitResponse', function (e, response) { if (response && response.status == 'ok') { $scope.activeTableType = response.tableType; angular.forEach($scope.tableTypes, function(tableType, key) { if (tableType.id == $scope.activeTableType.id) { $scope.tableTypes[key] = $scope.activeTableType; } }); $scope.$apply(); popup.modal('hide'); } }); popup.modal(); }; $scope.deleteModal = function () { var popup = $('#ipsDeleteModal'); popup.find('.ipsDelete').off('click').on('click', function () { $('#ipsDeleteModal form').submit(); }); popup.find('form').off('ipSubmitResponse').on('ipSubmitResponse', function (e, response) { if (response && response.status == 'ok') { var index = $scope.tableTypes.indexOf($scope.activeTableType); $scope.tableTypes.splice(index, 1); $scope.activeTableType = null; $scope.$apply(); popup.modal('hide'); } }); popup.modal(); }; $scope.selectedColumnOptionChanged = function() { if(!$scope.columnOptions[$scope.editTableType.columnOption].isColumnFilter) { return; } if($scope.editTableType.specificColumns.length < 1){ $scope.addSpecificColumnInput(); } }; $scope.addSpecificColumnInput = function() { $scope.editTableType.specificColumns.push(new specificColumn()); }; $scope.removeSpecificColumnInput= function($index){ $scope.editTableType.specificColumns.splice($index, 1); }; }; app.controller("mainController", ["$scope", "$location", mainController]); })(jQuery);
angular.module('templates-app', ['about/index.tpl.html', 'header/index.tpl.html', 'home/index.tpl.html', 'messages/index.tpl.html']); angular.module("about/index.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("about/index.tpl.html", "<h1>About Sailng</h1>\n" + "\n" + "<p>Sailng is a boilerplate application that uses the latest Sails.js and Angular to easily create realtime, single page web applications.</p>\n" + "<p>It borrows ideas from <a href=\"https://github.com/ngbp/ngbp\">ngbp</a> and <a href=\"https://github.com/angular-app/angular-app/\">angular-app</a>.</p>"); }]); angular.module("header/index.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("header/index.tpl.html", "<div ng-controller=\"HeaderCtrl\">\n" + " <div class=\"navbar navbar-inverse navbar-fixed-top\" role=\"navigation\">\n" + " <div class=\"container\">\n" + " <div class=\"navbar-header\">\n" + " <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\n" + " <span class=\"sr-only\">Toggle navigation</span>\n" + " <span class=\"icon-bar\"></span>\n" + " <span class=\"icon-bar\"></span>\n" + " <span class=\"icon-bar\"></span>\n" + " </button>\n" + " <a class=\"navbar-brand\" href=\"/home\">Sailng</a>\n" + " </div>\n" + " <div class=\"collapse navbar-collapse\">\n" + " <ul class=\"nav navbar-nav\">\n" + " <li ng-repeat=\"navItem in navItems\">\n" + " <a href=\"{{navItem.url}}\"><i class=\"{{navItem.cssClass}}\"></i> {{navItem.title}}</a>\n" + " </li>\n" + "\n" + " <li class=\"divider-vertical\"></li>\n" + "\n" + " <li ng-if=\"currentUser\" id=\"current-user-dropdown\" class=\"dropdown\">\n" + " <div class=\"btn-group\">\n" + " <a class=\"btn btn-default btn-sm dropdown-toggle\">\n" + " <i class=\"fa fa-user\"></i> {{currentUser.email}} <span class=\"caret\"></span>\n" + " </a>\n" + " <ul class=\"dropdown-menu\">\n" + " <li><a href=\"/logout\"><i class=\"fa fa-share\"></i> Logout</a></li>\n" + " </ul>\n" + " </div>\n" + " </li>\n" + " \n" + " </ul>\n" + " </div><!--/.nav-collapse -->\n" + " </div>\n" + " </div>\n" + "</div>"); }]); angular.module("home/index.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("home/index.tpl.html", "<h1>Sailng</h1>\n" + "<p class=\"lead\">Sails.js + Angular = Awesome</p>\n" + "\n" + "<p>Read <a href=\"/about\">about</a> the project to learn more</p>\n" + "\n" + "<p><a href=\"/messages\">View all messages</a><p>"); }]); angular.module("messages/index.tpl.html", []).run(["$templateCache", function($templateCache) { $templateCache.put("messages/index.tpl.html", "<h2>Messages</h2>\n" + "<p>Open this page in two browsers and see how easy Sails.js makes realtime applications!</p>\n" + "\n" + "<p ng-show=\"!currentUser\"><a href=\"/register\">Register</a> to post a message!</p>\n" + "\n" + "<div class=\"row\">\n" + " <div class=\"col-md-6\">\n" + " <form role=\"form\" ng-submit=\"createMessage(newMessage)\">\n" + " <div class=\"form-group\">\n" + " <label for=\"messageTitle\">Your Message</label>\n" + " <input type=\"text\" ng-model=\"newMessage.title\" class=\"form-control\" id=\"messageTitle\" ng-disabled=\"!currentUser\">\n" + " </div>\n" + " <button type=\"submit\" class=\"btn btn-primary\" ng-disabled=\"!currentUser || !newMessage.title\">Submit</button>\n" + " </form>\n" + " </div>\n" + " <div class=\"col-md-6\">\n" + " <h3>All Messages</h3>\n" + " <ul>\n" + " <li ng-repeat=\"message in messages\">{{message.title}} <b>by</b> {{message.user.username}}, <span am-time-ago=\"message.updatedAt\"></span> <button type=\"button\" class=\"btn btn-danger btn-xs\" ng-click=\"destroyMessage(message)\" ng-show=\"currentUser.id === message.user.id\"><i class=\"fa fa-trash-o\"></i></button></li>\n" + " </ul>\n" + " </div>\n" + "</div>"); }]);
/** * icu-converter * https://github.com/alex-dow/icu-converter * * Copyright (c) 2015 Alex Dowgailenko * Licensed under the MIT License * https://github.com/alex-dow/icu-converter/blob/master/LICENSE */ module.exports = { stringify: function(jsObj) { console.log(require('util').inspect(jsObj, true, 100)); } };
import React from 'react'; import BaseComponent from './BaseComponent'; import { get3DPrinterState } from '../lib/fetch'; import FA from 'react-fontawesome'; const styles = { container: { textAlign: 'right' }, listName: { color: 'white', fontSize: '2.1em', }, listItem: { color: 'white', fontSize: '1.8em', }, icon: { color: 'white', marginLeft: 15, fontSize: '0.9em', }, videoFeed: { maxWidth: '80%', maxHeight: '80%', marginTop: 10, marginRight: 0 }, }; const defaultState = { // Default simulate printing for demo purposes currentPrinterState: { state: { flags: { printing: true, }, }, temperature: { tool0: { actual: 60 }, bed: { actual: 210 } } }, currentJob: { job: { file: { name: 'test_demo_print.stl' }, }, progress: { completion: 22 } } }; export default class OctoPrint extends BaseComponent { static propTypes = { visible: React.PropTypes.bool, }; static defaultProps = { visible: true, }; constructor(props) { super(props); this.state = defaultState; this.refreshPrinterState = this.refreshPrinterState.bind(this); } componentDidMount() { this.refreshTimer = setInterval(() => this.refreshPrinterState(), 1000 * 10); this.refreshPrinterState(); } componentWillUnmount() { clearInterval(this.refreshTimer); } refreshPrinterState() { get3DPrinterState() .then(state => this.setState({ currentPrinterState: state.state, currentJob: state.job })) .catch(err => { console.log('Printer offline', err); this.setState(defaultState) }); } render() { if (!this.state.currentPrinterState.state || !this.state.currentPrinterState.state.flags) return null; let progress = null; if (this.state.currentJob && this.state.currentJob.job.file.name) { progress = ( <div style={styles.listName}> {'Printing ' + this.state.currentJob.job.file.name + ' ' + Math.round(this.state.currentJob.progress.completion)} % <FA name="spinner" spin style={styles.icon} /> </div> ); } else { progress = ( <div style={styles.listName}> Printer idle <FA name="bed" style={styles.icon} /> </div> ); } return ( <div hidden={!this.props.visible} style={styles.container}> {progress} <div style={styles.listItem}> Nossle {this.state.currentPrinterState.temperature.tool0.actual}°C <FA name="thermometer-half" style={styles.icon} /> </div> <div style={styles.listItem}> Bed {this.state.currentPrinterState.temperature.bed.actual}°C <FA name="thermometer-half" style={styles.icon} /> </div> <div> <img style={styles.videoFeed} src={"http://krantz.asuscomm.com:9080/"} alt="Stream of print"/> </div> </div> ); } }
const path = require('path'); const { exec } = require('child_process'); const execp = (...args) => new Promise((res, rej) => { exec(...args, (err, stdout, stderr) => { if (err) { rej({err, stdout, stderr}); } else { res({stdout, stderr}); } }) }); const makeCmd = 'make --no-builtin-rules'; console.log('Build project before startup. This may take a while'); execp(makeCmd) .then(startServer, ({err, stdout, stderr}) => { console.error(err); console.error(stdout); console.error(stderr); process.exit(-1); }); function startServer() { const express = require('express'); const fs = require('fs-extra'); const prism = require('prismjs'); const PkgRoot = __dirname; const StaticDir = 'build'; const StaticPath = path.join(PkgRoot, StaticDir); // Static file server const statics = express.static(StaticPath); const server = express(); // Call make server.use((req, res, next) => { execp(makeCmd) .then(() => next(), ({err, stdout, stderr}) => { console.log(`${stdout}`); console.log(`${stderr}`); res.status(500).send('Something\'s not right :/'); }); }); // Resolve index.html server.use((req, res, next) => { if (req.url.endsWith('/')) { res.sendFile(path.join(PkgRoot, StaticDir, req.url, 'index.html')); } else { next(); } }); server.use(statics); server.listen(3000); console.log('Server is ready'); }
/* ======================================================================== * Bootstrap (plugin): validator.js v0.8.1 * ======================================================================== * The MIT License (MIT) * * Copyright (c) 2015 Cina Saffary. * Made by @1000hz in the style of Bootstrap 3 era @fat * * 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. * ======================================================================== */ +function ($) { 'use strict'; var inputSelector = ':input:not([type="submit"], button):enabled:visible' // VALIDATOR CLASS DEFINITION // ========================== var Validator = function (element, options) { this.$element = $(element) this.options = options options.errors = $.extend({}, Validator.DEFAULTS.errors, options.errors) for (var custom in options.custom) { if (!options.errors[custom]) throw new Error('Missing default error message for custom validator: ' + custom) } $.extend(Validator.VALIDATORS, options.custom) this.$element.attr('novalidate', true) // disable automatic native validation this.toggleSubmit() this.$element.on('input.bs.validator change.bs.validator focusout.bs.validator', $.proxy(this.validateInput, this)) this.$element.on('submit.bs.validator', $.proxy(this.onSubmit, this)) this.$element.find('[data-match]').each(function () { var $this = $(this) var target = $this.data('match') $(target).on('input.bs.validator', function (e) { $this.val() && $this.trigger('input.bs.validator') }) }) } Validator.DEFAULTS = { delay: 500, html: false, disable: true, custom: {}, errors: { match: 'Does not match', minlength: 'Not long enough' }, feedback: { success: 'glyphicon-ok', error: 'glyphicon-warning-sign' } } Validator.VALIDATORS = { native: function ($el) { var el = $el[0] return el.checkValidity ? el.checkValidity() : true }, match: function ($el) { var target = $el.data('match') return !$el.val() || $el.val() === $(target).val() }, minlength: function ($el) { var minlength = $el.data('minlength') return !$el.val() || $el.val().length >= minlength } } Validator.prototype.validateInput = function (e) { var $el = $(e.target) var prevErrors = $el.data('bs.validator.errors') var errors if ($el.is('[type="radio"]')) $el = this.$element.find('input[name="' + $el.attr('name') + '"]') this.$element.trigger(e = $.Event('validate.bs.validator', {relatedTarget: $el[0]})) if (e.isDefaultPrevented()) return var self = this this.runValidators($el).done(function (errors) { $el.data('bs.validator.errors', errors) errors.length ? self.showErrors($el) : self.clearErrors($el) if (!prevErrors || errors.toString() !== prevErrors.toString()) { e = errors.length ? $.Event('invalid.bs.validator', {relatedTarget: $el[0], detail: errors}) : $.Event('valid.bs.validator', {relatedTarget: $el[0], detail: prevErrors}) self.$element.trigger(e) } self.toggleSubmit() self.$element.trigger($.Event('validated.bs.validator', {relatedTarget: $el[0]})) }) } Validator.prototype.runValidators = function ($el) { var errors = [] var deferred = $.Deferred() var options = this.options $el.data('bs.validator.deferred') && $el.data('bs.validator.deferred').reject() $el.data('bs.validator.deferred', deferred) function getErrorMessage(key) { return $el.data(key + '-error') || $el.data('error') || key == 'native' && $el[0].validationMessage || options.errors[key] } $.each(Validator.VALIDATORS, $.proxy(function (key, validator) { if ((typeof $el.data(key) !== 'undefined' || key == 'native') && !validator.call(this, $el)) { var error = getErrorMessage(key) !~errors.indexOf(error) && errors.push(error) } }, this)) if (!errors.length && $el.val() && $el.data('remote')) { this.defer($el, function () { var data = {} data[$el.attr('name')] = $el.val() $.get($el.data('remote'), data) .fail(function (jqXHR, textStatus, error) { errors.push(getErrorMessage('remote') || error) }) .always(function () { deferred.resolve(errors)}) }) } else deferred.resolve(errors) return deferred.promise() } Validator.prototype.validate = function () { var delay = this.options.delay this.options.delay = 0 this.$element.find(inputSelector).trigger('input.bs.validator') this.options.delay = delay return this } Validator.prototype.showErrors = function ($el) { var method = this.options.html ? 'html' : 'text' this.defer($el, function () { var $group = $el.closest('.form-group') var $block = $group.find('.help-block.with-errors') var $feedback = $group.find('.form-control-feedback') var errors = $el.data('bs.validator.errors') if (!errors.length) return errors = $('<ul/>') .addClass('list-unstyled') .append($.map(errors, function (error) { return $('<li/>')[method](error) })) $block.data('bs.validator.originalContent') === undefined && $block.data('bs.validator.originalContent', $block.html()) $block.empty().append(errors) $group.addClass('has-error') $feedback.length && $feedback.removeClass(this.options.feedback.success) && $feedback.addClass(this.options.feedback.error) && $group.removeClass('has-success') }) } Validator.prototype.clearErrors = function ($el) { var $group = $el.closest('.form-group') var $block = $group.find('.help-block.with-errors') var $feedback = $group.find('.form-control-feedback') $block.html($block.data('bs.validator.originalContent')) $group.removeClass('has-error') $feedback.length && $feedback.removeClass(this.options.feedback.error) && $feedback.addClass(this.options.feedback.success) && $group.addClass('has-success') } Validator.prototype.hasErrors = function () { function fieldErrors() { return !!($(this).data('bs.validator.errors') || []).length } return !!this.$element.find(inputSelector).filter(fieldErrors).length } Validator.prototype.isIncomplete = function () { function fieldIncomplete() { return this.type === 'checkbox' ? !this.checked : this.type === 'radio' ? !$('[name="' + this.name + '"]:checked').length : $.trim(this.value) === '' } return !!this.$element.find(inputSelector).filter('[required]').filter(fieldIncomplete).length } Validator.prototype.onSubmit = function (e) { this.validate() if (this.isIncomplete() || this.hasErrors()) e.preventDefault() } Validator.prototype.toggleSubmit = function () { if(!this.options.disable) return var $btn = $('button[type="submit"], input[type="submit"]') .filter('[form="' + this.$element.attr('id') + '"]') .add(this.$element.find('input[type="submit"], button[type="submit"]')) $btn.toggleClass('disabled', this.isIncomplete() || this.hasErrors()) .css({'pointer-events': 'all', 'cursor': 'pointer'}) } Validator.prototype.defer = function ($el, callback) { callback = $.proxy(callback, this) if (!this.options.delay) return callback() window.clearTimeout($el.data('bs.validator.timeout')) $el.data('bs.validator.timeout', window.setTimeout(callback, this.options.delay)) } Validator.prototype.destroy = function () { this.$element .removeAttr('novalidate') .removeData('bs.validator') .off('.bs.validator') this.$element.find(inputSelector) .off('.bs.validator') .removeData(['bs.validator.errors', 'bs.validator.deferred']) .each(function () { var $this = $(this) var timeout = $this.data('bs.validator.timeout') window.clearTimeout(timeout) && $this.removeData('bs.validator.timeout') }) this.$element.find('.help-block.with-errors').each(function () { var $this = $(this) var originalContent = $this.data('bs.validator.originalContent') $this .removeData('bs.validator.originalContent') .html(originalContent) }) this.$element.find('input[type="submit"], button[type="submit"]').removeClass('disabled') this.$element.find('.has-error').removeClass('has-error') return this } // VALIDATOR PLUGIN DEFINITION // =========================== function Plugin(option) { return this.each(function () { var $this = $(this) var options = $.extend({}, Validator.DEFAULTS, $this.data(), typeof option == 'object' && option) var data = $this.data('bs.validator') if (!data && option == 'destroy') return if (!data) $this.data('bs.validator', (data = new Validator(this, options))) if (typeof option == 'string') data[option]() }) } var old = $.fn.validator $.fn.validator = Plugin $.fn.validator.Constructor = Validator // VALIDATOR NO CONFLICT // ===================== $.fn.validator.noConflict = function () { $.fn.validator = old return this } // VALIDATOR DATA-API // ================== $(window).on('load', function () { $('form[data-toggle="validator"]').each(function () { var $form = $(this) Plugin.call($form, $form.data()) }) }) }(jQuery);
var app = angular.module("myApp"); app.service('StudentService', ['$q', '$rootScope', function($q, $rootScope) { this.loadStudents = function() { var deferred = $q.defer(); var Student = Parse.Object.extend("Student"); var query = new Parse.Query(Student); query.find({ success: function(results){ deferred.resolve(results); $rootScope.$apply(); }, error: function(error) { // TODO: Handle error } }); return deferred.promise; } this.findStudent = function(studentId) { var deferred = $q.defer(); var Student = Parse.Object.extend("Student"); var query = new Parse.Query(Student); query.equalTo("objectId", studentId); query.find({ success: function(results) { deferred.resolve(results); $rootScope.$apply(); }, error: function(error) { deferred.reject(error); $rootScope.$apply(); } }); return deferred.promise; } this.modifyAndSaveStudent = function(student, firstName, lastName, age, photoUrl){ var deferred = $q.defer(); student.set("firstName", firstName); student.set("lastName", lastName); student.set("age", age); student.set("photoUrl", photoUrl); student.save(null, { success: function(student) { deferred.resolve(student); $rootScope.$apply(); }, error: function(student, error) { deferred.reject(error); $rootScope.$apply(); } }); return deferred.promise; } this.addStudent = function(firstName, lastName, age, photoUrl) { var deferred = $q.defer(); var Student = Parse.Object.extend("Student"); var student = new Student(); student.set("firstName", firstName); student.set("lastName", lastName); student.set("age", age); student.set("photoUrl", photoUrl); student.save(null, { success: function(student) { deferred.resolve(student); $rootScope.$apply(); }, error: function(student, error) { deferred.reject(error); $rootScope.$apply(); } }); return deferred.promise; } this.deleteStudent = function(studentId) { var deferred = $q.defer(); this.findStudent(studentId).then(function(results){ results[0].destroy({ success: function(student) { deferred.resolve(student); $rootScope.$apply(); }, error: function(object, error) { deferred.resolve(error); $rootScope.$apply(); } }) }); return deferred.promise; } this.uploadPhoto = function(photoFile) { var deferred = $q.defer(); var serverUrl = 'https://api.parse.com/1/files/' + file.fileName; // TODO - Should we be using ajax or http? $.ajax({ type: "POST", beforeSend: function (request) { request.setRequestHeader("X-Parse-Application-Id", 'KGxHRY1i2W1plkO5rWORg8YQLaKjcwTvs9BIpjyj'); request.setRequestHeader("X-Parse-REST-API-Key", 'RRlhxpPRl3B55yYBQiZ60ODVYpVgKDGaBCKpKYCJ'); request.setRequestHeader("Content-Type", photoFile.type); }, url: serverUrl, data: photoFile, processData: false, contentType: false, success: function (data) { deferred.resolve(data); $rootScope.$apply(); }, error: function (error) { deferred.reject(error); $rootScope.$apply(); } }); return deferred.promise; } this.findStudentUsingName = function(firstName, lastName) { var deferred = $q.defer(); var Student = Parse.Object.extend("Student"); var query = new Parse.Query(Student); query.equalTo("firstName", firstName); query.equalTo("lastName", lastName); query.find({ success: function(results) { if (results.length > 0) { deferred.resolve(results); $rootScope.$apply(); } else { deferred.reject("No students found"); $rootScope.$apply(); } }, error: function(error) { deferred.reject(error); $rootScope.$apply(); } }) return deferred.promise; } }]);
function RemoveProblem(response) { if (response.type == 'good') { row = document.getElementById('trashing'+response.ProblemId); RemoveRow(document.getElementById('AdminProblemsOfAContestTable'), row); } } function RemoveProblemRequest(row) { var ProblemId = GetDataAttribute(row, 'problem_id'); row.id='trashing'+ProblemId; MakeAjaxRequest('../Modify/ManageContest.php', {ProblemId: ProblemId, type: 'RemoveProblem'}, RemoveProblem); } function AddProblem(response) { if (response.type == 'good') { var ProblemName = response.data['ProblemName']; var ProblemId = response.data['ProblemId']; AddRow(document.getElementById('AdminProblemsOfAContestTable'), { values: {'problem': ProblemName}, data: {'problem_id': ProblemId}}, 'problem'); } } function AddProblemRequest(inputs) { var ProblemName = inputs.namedItem('ProblemName').value; MakeAjaxRequest('../Modify/ManageContest.php', {ContestId: ContestId, name: ProblemName, type: 'AddProblem'}, AddProblem); } function Clear(row) { row.removeAttribute('id'); var ProblemTd = row.getElementsByClassName('ProblemColumn')[0]; ProblemTd.innerHTML=GetDataAttribute(ProblemTd, 'old_value'); SetDataAttribute(ProblemTd, 'old_value', null); var ModifyButtons = document.getElementsByClassName('ModifyButtonContainer'); for (i=0; i<ModifyButtons.length; i++) ModifyButtons[i].classList.remove('hidden'); var TrashButtons = document.getElementsByClassName('TrashButtonContainer'); for (i=0; i<TrashButtons.length; i++) TrashButtons[i].classList.remove('hidden'); var AddProblemButton = document.getElementById('AddProblemButton'); AddProblemButton.removeAttribute('disabled', 'disabled'); } function MakeChanges(response) { var row = document.getElementById('modifying'); var ProblemTd = row.getElementsByClassName('ProblemColumn')[0]; if (response.type == 'good') { SetDataAttribute(ProblemTd, 'old_value', GetDataAttribute(ProblemTd, 'new_value')); } SetDataAttribute(ProblemTd, 'new_value', null); Clear(row); } function Confirm(row) { var ProblemTd = row.getElementsByClassName('ProblemColumn')[0]; var ProblemName = ProblemTd.getElementsByClassName('ContentEditable')[0].innerHTML; SetDataAttribute(ProblemTd, 'new_value', ProblemName); var ProblemId = GetDataAttribute(row, 'problem_id'); MakeAjaxRequest('../Modify/ManageContest.php', {type: 'ChangeProblemName', name: ProblemName, ProblemId: ProblemId}, MakeChanges); } function OnModification(row) { row.id='modifying'; var ProblemTd = row.getElementsByClassName('ProblemColumn')[0]; var ProblemValue = ProblemTd.innerHTML; SetDataAttribute(ProblemTd, 'old_value', ProblemValue); var ProblemEditable = document.createElement('div'); ProblemEditable.setAttribute('contenteditable', 'true'); ProblemEditable.classList.add('ContentEditable'); ProblemEditable.innerHTML=ProblemValue; ProblemTd.replaceChild(ProblemEditable, ProblemTd.childNodes[0]); var ModifyButtons = document.getElementsByClassName('ModifyButtonContainer'); for (i=0; i<ModifyButtons.length; i++) ModifyButtons[i].classList.add('hidden'); var TrashButtons = document.getElementsByClassName('TrashButtonContainer'); for (i=0; i<TrashButtons.length; i++) TrashButtons[i].classList.add('hidden'); var AddProblemButton = document.getElementById('AddProblemButton'); AddProblemButton.setAttribute('disabled', 'disabled'); }
/** * Windows values emitted by the target signal `t` and emits a new signal * whenever the control signal `s` emits a value. * * @private */ export default function window (s, t) { return emit => { let windowEmit let innerSubscription const closeWindow = () => { if (innerSubscription) { windowEmit.complete() innerSubscription.unsubscribe() innerSubscription = null } } const newWindow = () => { closeWindow() const w = emit => { windowEmit = emit innerSubscription = t.subscribe(emit) } emit.next(w) } const subscriptions = [ s.subscribe(newWindow), t.subscribe({ complete () { closeWindow() emit.complete() } }) ] // Start a new window immediately newWindow() return () => { closeWindow() subscriptions.forEach(s => s.unsubscribe()) } } }
'use strict'; var assign = require('lodash.assign'); var uniqueId = require('lodash.uniqueid'); var noop = function() {}; var defaults = { toggle: null, autoClose: true, onOpen: noop, onClose: noop }; var clickEvent = 'ontouchstart' in window ? 'touchstart' : 'click'; if (window.PointerEvent) { clickEvent = 'pointerdown'; } if (window.navigator.msPointerEnabled) { clickEvent = 'MSPointerDown'; } clickEvent = 'click'; function findId(element, id) { var elementId = element.id; if (id) { return id; } if (elementId) { return elementId; } return uniqueId(); } function Dropdown(options) { this.options = assign({}, defaults, options); this.toggleElement = this.options.toggle instanceof Element ? this.options.toggle : document.querySelector(this.options.toggle); this.dropdownElement = document.querySelector(this.toggleElement.getAttribute('data-dropdown')); this.id = findId(this.dropdownElement, this.options.id); this.isOpen = false; this.openClass = Dropdown.openClass; this.events(); } module.exports = Dropdown; Dropdown.openClass = 'is-open'; Dropdown.global = function(classSelector) { window.addEventListener(clickEvent, function(e) { var autoClose; var target = e.target; var dropdown; if (target.classList.contains(classSelector) && target.getAttribute('data-global') !== 'true') { target.setAttribute('data-global', 'true'); autoClose = e.target.getAttribute('data-autoClose') === 'false' ? false : true; dropdown = new Dropdown({ toggle: e.target, autoClose: autoClose }); } }, true); }; Dropdown.prototype.events = function() { // Handlers this.onWindow = function(e) { if (e.dropdowns && e.dropdowns[this.id] === false) { return; } this.close(); // console.log('close in window', this.id); }.bind(this); this.onToggle = function(e) { // console.log('click button', this.id); if (!e.dropdowns) { e.dropdowns = {}; } e.dropdowns[this.id] = false; this.toggle(); }.bind(this); this.onDropdown = function(e) { // console.log('click dropdown', this.id); if (!e.dropdowns) { e.dropdowns = {}; } if (this.options.autoClose) { e.dropdowns[this.id] = true; } else { e.dropdowns[this.id] = false; } }.bind(this); this.toggleElement.addEventListener(clickEvent, this.onToggle); this.dropdownElement.addEventListener(clickEvent, this.onDropdown, true); }; Dropdown.prototype.open = function() { this.dropdownElement.classList.add(this.openClass); this.toggleElement.classList.add(this.openClass); this.isOpen = true; window.addEventListener(clickEvent, this.onWindow); this.options.onOpen(this); }; Dropdown.prototype.close = function() { this.dropdownElement.classList.remove(this.openClass); this.toggleElement.classList.remove(this.openClass); this.isOpen = false; window.removeEventListener(clickEvent, this.onWindow); this.options.onClose(this); }; Dropdown.prototype.toggle = function() { if (this.dropdownElement.classList.contains(this.openClass)) { this.close(); } else { this.open(); } }; Dropdown.prototype.destroy = function() { if (this.isOpen) { this.close(); } this.toggleElement.removeEventListener(clickEvent, this.onToggle); this.dropdownElement.removeEventListener(clickEvent, this.onDropdown); };
/** * GET /api/twilio/printer * * Receives a notification from Twilio API when the user sends a message. * and based on the URL for the thermal CLI app will ping it. * @param {telephhone} req [Phone number for incoming SMS] */ exports.smsToPrinter = function(req, res) { console.log('pinged from twilio'); res.status(200).send({ 'status': 'ok' }); }
function euler499() { // Good luck! return true } euler499()
goog.provide('gmf.ObjectEditingQuery'); goog.require('gmf'); goog.require('gmf.Themes'); goog.require('ol.format.WMSGetFeatureInfo'); goog.require('ol.source.ImageWMS'); /** * A service that collects all queryable layer nodes from all themes, stores * them and use them to make WMS GetFeatureInfo queries. Queries can be made * regardless of the associated layer visibility. The layer nodes are also * loaded only once. * * @param {angular.$http} $http Angular $http service. * @param {angular.$q} $q Angular $q service. * @param {gmf.Themes} gmfThemes The gmf themes service. * @constructor * @struct * @ngInject */ gmf.ObjectEditingQuery = function($http, $q, gmfThemes) { /** * @type {angular.$http} * @private */ this.http_ = $http; /** * @type {angular.$q} * @private */ this.q_ = $q; /** * @type {gmf.Themes} * @private */ this.gmfThemes_ = gmfThemes; /** * @type {?angular.$q.Deferred} * @private */ this.getQueryableLayerNodesDefered_ = null; }; /** * @return {angular.$q.Promise} Promise. * @export */ gmf.ObjectEditingQuery.prototype.getQueryableLayersInfo = function() { if (!this.getQueryableLayerNodesDefered_) { this.getQueryableLayerNodesDefered_ = this.q_.defer(); this.gmfThemes_.getOgcServersObject().then(function(ogcServers) { this.gmfThemes_.getThemesObject().then(function(themes) { if (!themes) { return; } // Get all queryable nodes var allQueryableLayersInfo = gmf.ObjectEditingQuery.getQueryableLayersInfoFromThemes( themes, ogcServers ); // Narrow down to only those that have the 'copyable' metadata set var queryableLayersInfo = []; for (var i = 0, ii = allQueryableLayersInfo.length; i < ii; i++) { if (allQueryableLayersInfo[i].layerNode.metadata.copyable) { queryableLayersInfo.push(allQueryableLayersInfo[i]); } } this.getQueryableLayerNodesDefered_.resolve(queryableLayersInfo); }.bind(this)); }.bind(this)); } return this.getQueryableLayerNodesDefered_.promise; }; /** * From a list of theme nodes, collect all WMS layer nodes that are queryable. * A list of OGC servers is given in order to bind each queryable layer node * to its associated server and be able to build requests. * * @param {Array.<gmfThemes.GmfTheme>} themes List of theme nodes. * @param {gmfThemes.GmfOgcServers} ogcServers List of ogc servers * @return {Array.<gmf.ObjectEditingQuery.QueryableLayerInfo>} List of * queryable layers information. * @export */ gmf.ObjectEditingQuery.getQueryableLayersInfoFromThemes = function( themes, ogcServers ) { var queryableLayersInfo = []; var theme; var group; var nodes; var node; for (var i = 0, ii = themes.length; i < ii; i++) { theme = /** @type {gmfThemes.GmfTheme} */ (themes[i]); for (var j = 0, jj = theme.children.length; j < jj; j++) { group = /** @type {gmfThemes.GmfGroup} */ (theme.children[j]); // Skip groups that don't have an ogcServer set if (!group.ogcServer) { continue; } nodes = []; gmf.Themes.getFlatNodes(group, nodes); for (var k = 0, kk = nodes.length; k < kk; k++) { node = /** @type {gmfThemes.GmfGroup|gmfThemes.GmfLayerWMS} */ ( nodes[k]); // Skip groups within groups if (node.children && node.children.length) { continue; } if (node.childLayers && node.childLayers[0] && node.childLayers[0].queryable ) { queryableLayersInfo.push({ layerNode: node, ogcServer: ogcServers[group.ogcServer] }); } } } } return queryableLayersInfo; }; /** * From a queryable layer (WMS layer node), use its associated OGC server * to issue a single WMS GetFeatureInfo request at a specific location on a * specific map to fetch a single feature. If no feature is found, a `null` * value is returned. * * @param {gmf.ObjectEditingQuery.QueryableLayerInfo} layerInfo Queryable layer * information. * @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Map} map Map. * @return {angular.$q.Promise} Promise. * @export */ gmf.ObjectEditingQuery.prototype.getFeatureInfo = function( layerInfo, coordinate, map ) { var view = map.getView(); var projCode = view.getProjection().getCode(); var resolution = /** @type {number} */(view.getResolution()); var infoFormat = ngeo.QueryInfoFormatType.GML; var layerNode = layerInfo.layerNode; var layersParam = layerNode.layers.split(','); var ogcServer = layerInfo.ogcServer; var format = new ol.format.WMSGetFeatureInfo({ layers: layersParam }); var wmsSource = new ol.source.ImageWMS({ url: ogcServer.url, params: { layers: layersParam } }); var url = /** @type {string} */ ( wmsSource.getGetFeatureInfoUrl(coordinate, resolution, projCode, { 'INFO_FORMAT': infoFormat, 'FEATURE_COUNT': 1, 'QUERY_LAYERS': layersParam }) ); return this.http_.get(url).then( function(format, response) { var features = format.readFeatures(response.data); return (features && features[0]) ? features[0] : null; }.bind(this, format) ); }; gmf.module.service('gmfObjectEditingQuery', gmf.ObjectEditingQuery); /** * @typedef {{ * ogcServers: (gmfThemes.GmfOgcServers), * queryableLayerNodes: (Array.<gmfThemes.GmfLayerWMS>) * }} */ gmf.ObjectEditingQuery.GetQueryableLayerNodesResponse; /** * @typedef {{ * ogcServer: (gmfThemes.GmfOgcServer), * layerNode: (gmfThemes.GmfLayerWMS) * }} */ gmf.ObjectEditingQuery.QueryableLayerInfo;
//Write a script that finds the maximal increasing sequence in an array. var i, counter= 1, currentCounter= 1, arr = [3, 2, 3, 4, 2, 8, 4], len = arr.length, result = []; for (i = 0; i < len; i+=1) { if(arr[i]<arr[i+1]){ currentCounter+=1; } else{ currentCounter=1; } if(currentCounter>counter){ counter=currentCounter; result.push(arr[i+1]); if(counter===2){ result.unshift(arr[i]); } } } console.log(result.join(', '));
var Manager; (function ($) { $(function () { Manager = new AjaxSolr.Manager({ // config is a object defined in config.js solrUrl: config.solrCoreURL // If you are using a local Solr instance with a "reuters" core, use: // solrUrl: 'http://localhost:8983/solr/reuters/' // If you are using a local Solr instance with a single core, use: // solrUrl: 'http://localhost:8983/solr/' }); Manager.addWidget(new AjaxSolr.ResultWidget({ id: 'result', target: '#docs' })); Manager.addWidget(new AjaxSolr.PagerWidget({ id: 'pager', target: '#pager', prevLabel: '&lt;', nextLabel: '&gt;', innerWindow: 1, renderHeader: function (perPage, offset, total) { $('#pager-header').html($('<span></span>').text('displaying ' + Math.min(total, offset + 1) + ' to ' + Math.min(total, offset + perPage) + ' of ' + total)); } })); var fields=['jate_domain_terms'] for (var i = 0, l = fields.length; i < l; i++) { Manager.addWidget(new AjaxSolr.TagcloudWidget({ id: fields[i], target: '#' + fields[i], field: fields[i] })); } Manager.addWidget(new AjaxSolr.CurrentSearchWidget({ id: 'currentsearch', target: '#selection' })); Manager.addWidget(new AjaxSolr.AutocompleteWidget({ id: 'text', target: '#search', fields: ['jate_domain_terms'] })); /* Manager.addWidget(new AjaxSolr.CountryCodeWidget({ id: 'countries', target: '#countries', field: 'location' })); Manager.addWidget(new AjaxSolr.CalendarWidget({ id: 'calendar', target: '#calendar', field: 'date' }));*/ Manager.init(); Manager.store.addByValue('q', '*:*'); var params = { facet: true, 'facet.field': ['jate_domain_terms'], //set facet limit for tag cloud size 'facet.limit': 250, 'facet.mincount': 1, 'f.topics.facet.limit': 50, //'f.countryCodes.facet.limit': -1, //'facet.date': 'date', //'facet.date.start': '1987-02-26T00:00:00.000Z/DAY', //'facet.date.end': '3000-10-20T00:00:00.000Z/DAY+1DAY', //'facet.date.gap': '+1DAY', 'json.nl': 'map' }; for (var name in params) { Manager.store.addByValue(name, params[name]); } Manager.doRequest(); }); $.fn.showIf = function (condition) { if (condition) { return this.show(); } else { return this.hide(); } } })(jQuery);
'use strict'; var path = require('path'); var gulp = require('gulp'); var iife = require('gulp-iife'); var conf = require('./conf'); var $ = require('gulp-load-plugins')({ pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license', 'del'] }); gulp.task('partials', function () { return gulp.src([ path.join(conf.paths.src, '/app/**/*.html'), path.join(conf.paths.tmp, '/serve/app/**/*.html') ]) .pipe($.htmlmin({ collapseWhitespace: true, maxLineLength : 120, removeComments : true, empty : true })) .pipe($.angularTemplatecache('templateCacheHtml.js', { module: 'ionic', root : 'app' })) .pipe(iife()) .pipe(gulp.dest(conf.paths.tmp + '/partials/')); }); gulp.task('html', ['inject', 'partials'], function () { var partialsInjectFile = gulp.src(path.join(conf.paths.tmp, '/partials/templateCacheHtml.js'), {read: false}); var partialsInjectOptions = { starttag : '<!-- inject:partials -->', ignorePath : path.join(conf.paths.tmp, '/partials'), addRootSlash: false }; var cssFilter = $.filter('**/*.css', {restore: true}); var jsFilter = $.filter('**/*.js', {restore: true}); var htmlFilter = $.filter('*.html', {restore: true}); return gulp.src(path.join(conf.paths.tmp, '/serve/*.html')) .pipe($.inject(partialsInjectFile, partialsInjectOptions)) .pipe($.useref()) .pipe(jsFilter) // .pipe($.stripDebug()) .pipe($.stripComments()) .pipe($.sourcemaps.init()) .pipe($.ngAnnotate()) .pipe($.uglify({preserveComments: $.uglifySaveLicense})).on('error', conf.errorHandler('Uglify')) .pipe($.rev()) .pipe($.sourcemaps.write('maps')) .pipe(jsFilter.restore) .pipe(cssFilter) .pipe($.sourcemaps.init()) .pipe($.cleanCss()) .pipe($.rev()) .pipe($.sourcemaps.write('maps')) .pipe(cssFilter.restore) .pipe($.revReplace()) .pipe(htmlFilter) .pipe($.htmlmin({ collapseWhitespace: true, maxLineLength : 120, removeComments : true })) .pipe(htmlFilter.restore) .pipe(gulp.dest(path.join(conf.paths.dist, '/'))) .pipe($.size({ title : path.join(conf.paths.dist, '/'), showFiles: true })); }); // Only applies for fonts from bower dependencies // Custom fonts are handled by the "other" task gulp.task('fonts', function () { return gulp.src($.mainBowerFiles()) .pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}')) .pipe($.flatten()) .pipe(gulp.dest(path.join(conf.paths.dist, '/fonts/'))); }); gulp.task('other', function () { var fileFilter = $.filter(function (file) { return file.stat.isFile(); }); return gulp.src([ path.join(conf.paths.src, '/**/*'), path.join('!' + conf.paths.src, '/**/*.{html,css,js,scss}') ]) .pipe(fileFilter) .pipe(gulp.dest(path.join(conf.paths.dist, '/'))); }); gulp.task('clean', function () { return $.del([path.join(conf.paths.dist, '/'), path.join(conf.paths.tmp, '/')]); }); gulp.task('build', ['html', 'fonts', 'other']);
function pascalCase(name) { return name.charAt(0).toUpperCase() + name.slice(1).replace(/-(\w)/g, (m, n) => n.toUpperCase()); } // Just import style for https://github.com/ant-design/ant-design/issues/3745 const req = require.context('./components', true, /^\.\/[^_][\w-]+\/style\/index\.tsx?$/); req.keys().forEach(mod => { let v = req(mod); if (v && v.default) { v = v.default; } const match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/); if (match && match[1]) { if (match[1] === 'message' || match[1] === 'notification') { // message & notification should not be capitalized exports[match[1]] = v; } else { exports[pascalCase(match[1])] = v; } } }); module.exports = exports;
define([ 'main/help/HelpApp', 'main/help/controllers/HelpController' ], function(){ });
'use strict'; const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware'); const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware'); const config = require('./webpack.config.dev'); const paths = require('./paths'); const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; const host = process.env.HOST || '0.0.0.0'; module.exports = function(proxy, allowedHost) { return { // WebpackDevServer 2.4.3 introduced a security fix that prevents remote // websites from potentially accessing local content through DNS rebinding: // https://github.com/webpack/webpack-dev-server/issues/887 // https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a // However, it made several existing use cases such as development in cloud // environment or subdomains in development significantly more complicated: // https://github.com/facebookincubator/create-react-app/issues/2271 // https://github.com/facebookincubator/create-react-app/issues/2233 // While we're investigating better solutions, for now we will take a // compromise. Since our WDS configuration only serves files in the `public` // folder we won't consider accessing them a vulnerability. However, if you // use the `proxy` feature, it gets more dangerous because it can expose // remote code execution vulnerabilities in backends like Django and Rails. // So we will disable the host check normally, but enable it if you have // specified the `proxy` setting. Finally, we let you override it if you // really know what you're doing with a special environment variable. disableHostCheck: !proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true', // Enable gzip compression of generated files. compress: true, // Silence WebpackDevServer's own logs since they're generally not useful. // It will still show compile warnings and errors with this setting. clientLogLevel: 'none', // By default WebpackDevServer serves physical files from current directory // in addition to all the virtual build products that it serves from memory. // This is confusing because those files won’t automatically be available in // production build folder unless we copy them. However, copying the whole // project directory is dangerous because we may expose sensitive files. // Instead, we establish a convention that only files in `public` directory // get served. Our build script will copy `public` into the `build` folder. // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%: // <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> // In JavaScript code, you can access it with `process.env.PUBLIC_URL`. // Note that we only recommend to use `public` folder as an escape hatch // for files like `favicon.ico`, `manifest.json`, and libraries that are // for some reason broken when imported through Webpack. If you just want to // use an image, put it in `src` and `import` it from JavaScript instead. contentBase: paths.appPublic, // By default files from `contentBase` will not trigger a page reload. watchContentBase: true, // Enable hot reloading server. It will provide /sockjs-node/ endpoint // for the WebpackDevServer react-ui so it can learn when the files were // updated. The WebpackDevServer react-ui is included as an entry point // in the Webpack development configuration. Note that only changes // to CSS are currently hot reloaded. JS changes will refresh the browser. hot: true, // It is important to tell WebpackDevServer to use the same "root" path // as we specified in the config. In development, we always serve from /. publicPath: config.output.publicPath, // WebpackDevServer is noisy by default so we emit custom message instead // by listening to the compiler events with `compiler.plugin` calls above. quiet: true, // Reportedly, this avoids CPU overload on some systems. // https://github.com/facebookincubator/create-react-app/issues/293 watchOptions: { ignored: /node_modules/, }, // Enable HTTPS if the HTTPS environment variable is set to 'true' https: protocol === 'https', host: host, overlay: false, historyApiFallback: { // Paths with dots should still use the history fallback. // See https://github.com/facebookincubator/create-react-app/issues/387. disableDotRule: true, }, public: allowedHost, proxy, setup(app) { // This lets us open files from the runtime error overlay. app.use(errorOverlayMiddleware()); // This service worker file is effectively a 'no-op' that will reset any // previous service worker registered for the same host:port combination. // We do this in development to avoid hitting the production cache if // it used the same host and port. // https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432 app.use(noopServiceWorkerMiddleware()); }, }; };
export const broken = {"viewBox":"0 0 8 8","children":[{"name":"path","attribs":{"d":"M2 0v1h-1v1h2v-2h-1zm3.88.03c-.18.01-.36.03-.53.09-.27.1-.53.25-.75.47l-.44.44a.5.5 0 1 0 .69.69l.44-.44c.11-.11.24-.17.38-.22.35-.12.78-.07 1.06.22.39.39.39 1.04 0 1.44l-1.5 1.5a.5.5 0 1 0 .69.69l1.5-1.5c.78-.78.78-2.04 0-2.81-.28-.28-.61-.45-.97-.53-.18-.04-.38-.04-.56-.03zm-3.59 2.91a.5.5 0 0 0-.19.16l-1.5 1.5c-.78.78-.78 2.04 0 2.81.56.56 1.36.72 2.06.47.27-.1.53-.25.75-.47l.44-.44a.5.5 0 1 0-.69-.69l-.44.44c-.11.11-.24.17-.38.22-.35.12-.78.07-1.06-.22-.39-.39-.39-1.04 0-1.44l1.5-1.5a.5.5 0 0 0-.44-.84.5.5 0 0 0-.06 0zm2.72 3.06v2h1v-1h1v-1h-2z"}}]};
'use strict'; const lodash = require('lodash'); const debug = require('debug')('todo:listCtrl'); const List = require(`${__dirname}/list-model`); const userCtrl = require(`${__dirname}/../user/user-controller`); // const itemCtrl = require(`${__dirname}/../item/item-controller`); const AppError = require(`${__dirname}/../../lib/app-error`); const listCtrl = module.exports = {}; listCtrl.newList = newList; listCtrl.getList = getList; listCtrl.updateList = updateList; listCtrl.deleteList = deleteList; listCtrl.deleteAllLists = deleteAllLists; listCtrl.handleListItems = handleListItems; /** * newList - creates a new list * * @param {object} listParams an object with properties for the new list * @param {object} user the authenticated user's mongo document * @return {promise} a promise that resolves with the new list or rejects with an appError */ function newList(listParams, user) { debug('newList'); let newList = null; return new Promise((resolve, reject) => { List.createAsync(listParams) .then((list) => { newList = list; return userCtrl.manageUserLists(list, user); }) .then((user) => { return resolve(newList); }) .catch((err) => { return reject(new AppError(400, err)); }); }); } /** * getList - finds a list by id * * @param {type} listId the _id of the list to find * @return {promise} a promise that resolves with a found list or rejects with an appError */ function getList(listId) { debug('getList'); return new Promise((resolve, reject) => { if (!listId) return reject(new AppError(400, 'no listId provided')); List.findById(listId) .populate('items') .exec((err, list) => { if (err || !list) { return reject(new AppError(404, err || 'no list found')); } return resolve(list); }); }); } /** * updateList - updates a lists properties, not to be used to modify a list's items * * @param {string} listToUpdate the list to update * @param {object} listParams the incoming request body detailing the changes to make * @return {promise} a promise that resolves with the updated list or rejects with an appError */ function updateList(listToUpdate, listParams = {}) { debug('updateList'); return new Promise((resolve, reject) => { if (Object.keys(listParams).length === 0) { return reject(new AppError(400, 'no update content provided')); } debug('updateList, listParams: ', listParams); // TODO: figure out if I need to be more careful about which updates are being allowed through List.findOneAndUpdate({ _id: listToUpdate._id }, { $set: listParams }, { runValidators: true, new: true }) .populate('items') .exec((err, list) => { if (err || !list) { return reject(new AppError(400, err || 'no list existed, shouldnt have happened')); } debug('updateList success, updatedList: ', list); return resolve(list); }); }); } /** * deleteList - deletes a list from the database, removes references to it from its owner, and deletes all its items * * @param {object} list the list to delete * @param {object} user the user the list belongs to * @return {promise} a promise that rejects with an appError or resolves with nothing */ function deleteList(list, user) { debug('deleteList'); // TODO: need to delete all items in the list return new Promise((resolve, reject) => { List.findOneAndRemoveAsync({ _id: list._id }) .then((deletedList) => { return userCtrl.manageUserLists(list, user, { removeFlag: true }); }) .then((items) => { return resolve(); }) .catch((err) => { return reject(new AppError(400, err)); }); }); } /** * deleteAllLists - deletes all lists belonging to a user * * @param {string} userId the id of the user * @return {promise} a promise that resolves with the deleted lists or rejects with an appError */ function deleteAllLists(userId) { debug('deleteAllLists'); return new Promise((resolve, reject) => { List.find({ owner: userId }) .remove() .exec((err, lists) => { if (err) { return reject(new AppError(400, 'error deleting all lists')); } return resolve(lists); }); }); } /** * handleListItems - adds or removes references to an item from a list * * @param {object} item the item that is being put into the list or removed from it * @param {object} listId the mongo _id of the list to modify the items of * @param {object} options an object specifying the options for the list items operations * @property {boolean} removeFlag whether to remove the item from the list with the * @return {promise} description */ function handleListItems(item, listId, options = {}) { debug('handleListItems'); let listOperator = '$push'; if (options.removeFlag) { debug('handleListItems removeFlag true'); listOperator = '$pull'; } let updatesToList = {}; updatesToList[listOperator] = { items: item._id }; return new Promise((resolve, reject) => { List.findOneAndUpdate( { _id: listId }, updatesToList, { runValidators: true, new: true }) .populate('items') .exec((err, updatedList) => { if (err || !updatedList) { return reject(new AppError(400, err || 'no list existed, shouldnt have happened')); } return resolve(updatedList); }); }); }
let template = require('babel-template'); let types = require('babel-types'); let fillTextTemplate = template(` DIRTYCHECK; FILLSTYLEDIRTYCHECK; CTX.fillRect(X, Y, WIDTH, HEIGHT); `) module.exports = (path, _types, attrs, children, internalState) => { path.replaceWithMultiple( fillTextTemplate( Object.assign({ X: attrs.x || types.numericLiteral(0), Y: attrs.y || types.numericLiteral(0), WIDTH: attrs.width, HEIGHT: attrs.height }, internalState.identifiers ) ) ); };
function textAreaController($scope) { // macro parameter editor doesn't contains a config object, // so we create a new one to hold any properties if (!$scope.model.config) { $scope.model.config = {}; } $scope.model.count = 0; if (!$scope.model.config.maxChars) { $scope.model.config.maxChars = false; } $scope.model.maxlength = false; if ($scope.model.config && $scope.model.config.maxChars) { $scope.model.maxlength = true; } $scope.model.change = function () { if ($scope.model.value) { $scope.model.count = $scope.model.value.length; } } $scope.model.change(); } angular.module('umbraco').controller("Umbraco.PropertyEditors.textAreaController", textAreaController);
/** * Simple middleware intercepts actions and replaces with * another by calling an alias function with the original action * @type {object} aliases an object that maps action types (keys) to alias functions (values) (e.g. { SOME_ACTION: newActionAliasFunc }) */ export default aliases => () => next => action => { const alias = aliases[action.type]; if (alias) { return next(alias(action)); } return next(action); };
// All code points in the Private Use Area block as per Unicode v6.0.0: [ 0xE000, 0xE001, 0xE002, 0xE003, 0xE004, 0xE005, 0xE006, 0xE007, 0xE008, 0xE009, 0xE00A, 0xE00B, 0xE00C, 0xE00D, 0xE00E, 0xE00F, 0xE010, 0xE011, 0xE012, 0xE013, 0xE014, 0xE015, 0xE016, 0xE017, 0xE018, 0xE019, 0xE01A, 0xE01B, 0xE01C, 0xE01D, 0xE01E, 0xE01F, 0xE020, 0xE021, 0xE022, 0xE023, 0xE024, 0xE025, 0xE026, 0xE027, 0xE028, 0xE029, 0xE02A, 0xE02B, 0xE02C, 0xE02D, 0xE02E, 0xE02F, 0xE030, 0xE031, 0xE032, 0xE033, 0xE034, 0xE035, 0xE036, 0xE037, 0xE038, 0xE039, 0xE03A, 0xE03B, 0xE03C, 0xE03D, 0xE03E, 0xE03F, 0xE040, 0xE041, 0xE042, 0xE043, 0xE044, 0xE045, 0xE046, 0xE047, 0xE048, 0xE049, 0xE04A, 0xE04B, 0xE04C, 0xE04D, 0xE04E, 0xE04F, 0xE050, 0xE051, 0xE052, 0xE053, 0xE054, 0xE055, 0xE056, 0xE057, 0xE058, 0xE059, 0xE05A, 0xE05B, 0xE05C, 0xE05D, 0xE05E, 0xE05F, 0xE060, 0xE061, 0xE062, 0xE063, 0xE064, 0xE065, 0xE066, 0xE067, 0xE068, 0xE069, 0xE06A, 0xE06B, 0xE06C, 0xE06D, 0xE06E, 0xE06F, 0xE070, 0xE071, 0xE072, 0xE073, 0xE074, 0xE075, 0xE076, 0xE077, 0xE078, 0xE079, 0xE07A, 0xE07B, 0xE07C, 0xE07D, 0xE07E, 0xE07F, 0xE080, 0xE081, 0xE082, 0xE083, 0xE084, 0xE085, 0xE086, 0xE087, 0xE088, 0xE089, 0xE08A, 0xE08B, 0xE08C, 0xE08D, 0xE08E, 0xE08F, 0x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0xE119, 0xE11A, 0xE11B, 0xE11C, 0xE11D, 0xE11E, 0xE11F, 0xE120, 0xE121, 0xE122, 0xE123, 0xE124, 0xE125, 0xE126, 0xE127, 0xE128, 0xE129, 0xE12A, 0xE12B, 0xE12C, 0xE12D, 0xE12E, 0xE12F, 0xE130, 0xE131, 0xE132, 0xE133, 0xE134, 0xE135, 0xE136, 0xE137, 0xE138, 0xE139, 0xE13A, 0xE13B, 0xE13C, 0xE13D, 0xE13E, 0xE13F, 0xE140, 0xE141, 0xE142, 0xE143, 0xE144, 0xE145, 0xE146, 0xE147, 0xE148, 0xE149, 0xE14A, 0xE14B, 0xE14C, 0xE14D, 0xE14E, 0xE14F, 0xE150, 0xE151, 0xE152, 0xE153, 0xE154, 0xE155, 0xE156, 0xE157, 0xE158, 0xE159, 0xE15A, 0xE15B, 0xE15C, 0xE15D, 0xE15E, 0xE15F, 0xE160, 0xE161, 0xE162, 0xE163, 0xE164, 0xE165, 0xE166, 0xE167, 0xE168, 0xE169, 0xE16A, 0xE16B, 0xE16C, 0xE16D, 0xE16E, 0xE16F, 0xE170, 0xE171, 0xE172, 0xE173, 0xE174, 0xE175, 0xE176, 0xE177, 0xE178, 0xE179, 0xE17A, 0xE17B, 0xE17C, 0xE17D, 0xE17E, 0xE17F, 0xE180, 0xE181, 0xE182, 0xE183, 0xE184, 0xE185, 0xE186, 0xE187, 0xE188, 0xE189, 0xE18A, 0xE18B, 0xE18C, 0xE18D, 0xE18E, 0xE18F, 0xE190, 0xE191, 0xE192, 0xE193, 0xE194, 0xE195, 0xE196, 0xE197, 0xE198, 0xE199, 0xE19A, 0xE19B, 0xE19C, 0xE19D, 0xE19E, 0xE19F, 0xE1A0, 0xE1A1, 0xE1A2, 0xE1A3, 0xE1A4, 0xE1A5, 0xE1A6, 0xE1A7, 0xE1A8, 0xE1A9, 0xE1AA, 0xE1AB, 0xE1AC, 0xE1AD, 0xE1AE, 0xE1AF, 0xE1B0, 0xE1B1, 0xE1B2, 0xE1B3, 0xE1B4, 0xE1B5, 0xE1B6, 0xE1B7, 0xE1B8, 0xE1B9, 0xE1BA, 0xE1BB, 0xE1BC, 0xE1BD, 0xE1BE, 0xE1BF, 0xE1C0, 0xE1C1, 0xE1C2, 0xE1C3, 0xE1C4, 0xE1C5, 0xE1C6, 0xE1C7, 0xE1C8, 0xE1C9, 0xE1CA, 0xE1CB, 0xE1CC, 0xE1CD, 0xE1CE, 0xE1CF, 0xE1D0, 0xE1D1, 0xE1D2, 0xE1D3, 0xE1D4, 0xE1D5, 0xE1D6, 0xE1D7, 0xE1D8, 0xE1D9, 0xE1DA, 0xE1DB, 0xE1DC, 0xE1DD, 0xE1DE, 0xE1DF, 0xE1E0, 0xE1E1, 0xE1E2, 0xE1E3, 0xE1E4, 0xE1E5, 0xE1E6, 0xE1E7, 0xE1E8, 0xE1E9, 0xE1EA, 0xE1EB, 0xE1EC, 0xE1ED, 0xE1EE, 0xE1EF, 0xE1F0, 0xE1F1, 0xE1F2, 0xE1F3, 0xE1F4, 0xE1F5, 0xE1F6, 0xE1F7, 0xE1F8, 0xE1F9, 0xE1FA, 0xE1FB, 0xE1FC, 0xE1FD, 0xE1FE, 0xE1FF, 0xE200, 0xE201, 0xE202, 0xE203, 0xE204, 0xE205, 0xE206, 0xE207, 0xE208, 0xE209, 0xE20A, 0xE20B, 0xE20C, 0xE20D, 0xE20E, 0xE20F, 0xE210, 0xE211, 0xE212, 0xE213, 0xE214, 0xE215, 0xE216, 0xE217, 0xE218, 0xE219, 0xE21A, 0xE21B, 0xE21C, 0xE21D, 0xE21E, 0xE21F, 0xE220, 0xE221, 0xE222, 0xE223, 0xE224, 0xE225, 0xE226, 0xE227, 0xE228, 0xE229, 0xE22A, 0xE22B, 0xE22C, 0xE22D, 0xE22E, 0xE22F, 0xE230, 0xE231, 0xE232, 0xE233, 0xE234, 0xE235, 0xE236, 0xE237, 0xE238, 0xE239, 0xE23A, 0xE23B, 0xE23C, 0xE23D, 0xE23E, 0xE23F, 0xE240, 0xE241, 0xE242, 0xE243, 0xE244, 0xE245, 0xE246, 0xE247, 0xE248, 0xE249, 0xE24A, 0xE24B, 0xE24C, 0xE24D, 0xE24E, 0xE24F, 0xE250, 0xE251, 0xE252, 0xE253, 0xE254, 0xE255, 0xE256, 0xE257, 0xE258, 0xE259, 0xE25A, 0xE25B, 0xE25C, 0xE25D, 0xE25E, 0xE25F, 0xE260, 0xE261, 0xE262, 0xE263, 0xE264, 0xE265, 0xE266, 0xE267, 0xE268, 0xE269, 0xE26A, 0xE26B, 0xE26C, 0xE26D, 0xE26E, 0xE26F, 0xE270, 0xE271, 0xE272, 0xE273, 0xE274, 0xE275, 0xE276, 0xE277, 0xE278, 0xE279, 0xE27A, 0xE27B, 0xE27C, 0xE27D, 0xE27E, 0xE27F, 0xE280, 0xE281, 0xE282, 0xE283, 0xE284, 0xE285, 0xE286, 0xE287, 0xE288, 0xE289, 0xE28A, 0xE28B, 0xE28C, 0xE28D, 0xE28E, 0xE28F, 0xE290, 0xE291, 0xE292, 0xE293, 0xE294, 0xE295, 0xE296, 0xE297, 0xE298, 0xE299, 0xE29A, 0xE29B, 0xE29C, 0xE29D, 0xE29E, 0xE29F, 0xE2A0, 0xE2A1, 0xE2A2, 0xE2A3, 0xE2A4, 0xE2A5, 0xE2A6, 0xE2A7, 0xE2A8, 0xE2A9, 0xE2AA, 0xE2AB, 0xE2AC, 0xE2AD, 0xE2AE, 0xE2AF, 0xE2B0, 0xE2B1, 0xE2B2, 0xE2B3, 0xE2B4, 0xE2B5, 0xE2B6, 0xE2B7, 0xE2B8, 0xE2B9, 0xE2BA, 0xE2BB, 0xE2BC, 0xE2BD, 0xE2BE, 0xE2BF, 0xE2C0, 0xE2C1, 0xE2C2, 0xE2C3, 0xE2C4, 0xE2C5, 0xE2C6, 0xE2C7, 0xE2C8, 0xE2C9, 0xE2CA, 0xE2CB, 0xE2CC, 0xE2CD, 0xE2CE, 0xE2CF, 0xE2D0, 0xE2D1, 0xE2D2, 0xE2D3, 0xE2D4, 0xE2D5, 0xE2D6, 0xE2D7, 0xE2D8, 0xE2D9, 0xE2DA, 0xE2DB, 0xE2DC, 0xE2DD, 0xE2DE, 0xE2DF, 0xE2E0, 0xE2E1, 0xE2E2, 0xE2E3, 0xE2E4, 0xE2E5, 0xE2E6, 0xE2E7, 0xE2E8, 0xE2E9, 0xE2EA, 0xE2EB, 0xE2EC, 0xE2ED, 0xE2EE, 0xE2EF, 0xE2F0, 0xE2F1, 0xE2F2, 0xE2F3, 0xE2F4, 0xE2F5, 0xE2F6, 0xE2F7, 0xE2F8, 0xE2F9, 0xE2FA, 0xE2FB, 0xE2FC, 0xE2FD, 0xE2FE, 0xE2FF, 0xE300, 0xE301, 0xE302, 0xE303, 0xE304, 0xE305, 0xE306, 0xE307, 0xE308, 0xE309, 0xE30A, 0xE30B, 0xE30C, 0xE30D, 0xE30E, 0xE30F, 0xE310, 0xE311, 0xE312, 0xE313, 0xE314, 0xE315, 0xE316, 0xE317, 0xE318, 0xE319, 0xE31A, 0xE31B, 0xE31C, 0xE31D, 0xE31E, 0xE31F, 0xE320, 0xE321, 0xE322, 0xE323, 0xE324, 0xE325, 0xE326, 0xE327, 0xE328, 0xE329, 0xE32A, 0xE32B, 0xE32C, 0xE32D, 0xE32E, 0xE32F, 0xE330, 0xE331, 0xE332, 0xE333, 0xE334, 0xE335, 0xE336, 0xE337, 0xE338, 0xE339, 0xE33A, 0xE33B, 0xE33C, 0xE33D, 0xE33E, 0xE33F, 0xE340, 0xE341, 0xE342, 0xE343, 0xE344, 0xE345, 0xE346, 0xE347, 0xE348, 0xE349, 0xE34A, 0xE34B, 0xE34C, 0xE34D, 0xE34E, 0xE34F, 0xE350, 0xE351, 0xE352, 0xE353, 0xE354, 0xE355, 0xE356, 0xE357, 0xE358, 0xE359, 0xE35A, 0xE35B, 0xE35C, 0xE35D, 0xE35E, 0xE35F, 0xE360, 0xE361, 0xE362, 0xE363, 0xE364, 0xE365, 0xE366, 0xE367, 0xE368, 0xE369, 0xE36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0xE3F5, 0xE3F6, 0xE3F7, 0xE3F8, 0xE3F9, 0xE3FA, 0xE3FB, 0xE3FC, 0xE3FD, 0xE3FE, 0xE3FF, 0xE400, 0xE401, 0xE402, 0xE403, 0xE404, 0xE405, 0xE406, 0xE407, 0xE408, 0xE409, 0xE40A, 0xE40B, 0xE40C, 0xE40D, 0xE40E, 0xE40F, 0xE410, 0xE411, 0xE412, 0xE413, 0xE414, 0xE415, 0xE416, 0xE417, 0xE418, 0xE419, 0xE41A, 0xE41B, 0xE41C, 0xE41D, 0xE41E, 0xE41F, 0xE420, 0xE421, 0xE422, 0xE423, 0xE424, 0xE425, 0xE426, 0xE427, 0xE428, 0xE429, 0xE42A, 0xE42B, 0xE42C, 0xE42D, 0xE42E, 0xE42F, 0xE430, 0xE431, 0xE432, 0xE433, 0xE434, 0xE435, 0xE436, 0xE437, 0xE438, 0xE439, 0xE43A, 0xE43B, 0xE43C, 0xE43D, 0xE43E, 0xE43F, 0xE440, 0xE441, 0xE442, 0xE443, 0xE444, 0xE445, 0xE446, 0xE447, 0xE448, 0xE449, 0xE44A, 0xE44B, 0xE44C, 0xE44D, 0xE44E, 0xE44F, 0xE450, 0xE451, 0xE452, 0xE453, 0xE454, 0xE455, 0xE456, 0xE457, 0xE458, 0xE459, 0xE45A, 0xE45B, 0xE45C, 0xE45D, 0xE45E, 0xE45F, 0xE460, 0xE461, 0xE462, 0xE463, 0xE464, 0xE465, 0xE466, 0xE467, 0xE468, 0xE469, 0xE46A, 0xE46B, 0xE46C, 0xE46D, 0xE46E, 0xE46F, 0xE470, 0xE471, 0xE472, 0xE473, 0xE474, 0xE475, 0xE476, 0xE477, 0xE478, 0xE479, 0xE47A, 0xE47B, 0xE47C, 0xE47D, 0xE47E, 0xE47F, 0xE480, 0xE481, 0xE482, 0xE483, 0xE484, 0xE485, 0xE486, 0xE487, 0xE488, 0xE489, 0xE48A, 0xE48B, 0xE48C, 0xE48D, 0xE48E, 0xE48F, 0xE490, 0xE491, 0xE492, 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51B, 0xE51C, 0xE51D, 0xE51E, 0xE51F, 0xE520, 0xE521, 0xE522, 0xE523, 0xE524, 0xE525, 0xE526, 0xE527, 0xE528, 0xE529, 0xE52A, 0xE52B, 0xE52C, 0xE52D, 0xE52E, 0xE52F, 0xE530, 0xE531, 0xE532, 0xE533, 0xE534, 0xE535, 0xE536, 0xE537, 0xE538, 0xE539, 0xE53A, 0xE53B, 0xE53C, 0xE53D, 0xE53E, 0xE53F, 0xE540, 0xE541, 0xE542, 0xE543, 0xE544, 0xE545, 0xE546, 0xE547, 0xE548, 0xE549, 0xE54A, 0xE54B, 0xE54C, 0xE54D, 0xE54E, 0xE54F, 0xE550, 0xE551, 0xE552, 0xE553, 0xE554, 0xE555, 0xE556, 0xE557, 0xE558, 0xE559, 0xE55A, 0xE55B, 0xE55C, 0xE55D, 0xE55E, 0xE55F, 0xE560, 0xE561, 0xE562, 0xE563, 0xE564, 0xE565, 0xE566, 0xE567, 0xE568, 0xE569, 0xE56A, 0xE56B, 0xE56C, 0xE56D, 0xE56E, 0xE56F, 0xE570, 0xE571, 0xE572, 0xE573, 0xE574, 0xE575, 0xE576, 0xE577, 0xE578, 0xE579, 0xE57A, 0xE57B, 0xE57C, 0xE57D, 0xE57E, 0xE57F, 0xE580, 0xE581, 0xE582, 0xE583, 0xE584, 0xE585, 0xE586, 0xE587, 0xE588, 0xE589, 0xE58A, 0xE58B, 0xE58C, 0xE58D, 0xE58E, 0xE58F, 0xE590, 0xE591, 0xE592, 0xE593, 0xE594, 0xE595, 0xE596, 0xE597, 0xE598, 0xE599, 0xE59A, 0xE59B, 0xE59C, 0xE59D, 0xE59E, 0xE59F, 0xE5A0, 0xE5A1, 0xE5A2, 0xE5A3, 0xE5A4, 0xE5A5, 0xE5A6, 0xE5A7, 0xE5A8, 0xE5A9, 0xE5AA, 0xE5AB, 0xE5AC, 0xE5AD, 0xE5AE, 0xE5AF, 0xE5B0, 0xE5B1, 0xE5B2, 0xE5B3, 0xE5B4, 0xE5B5, 0xE5B6, 0xE5B7, 0xE5B8, 0xE5B9, 0xE5BA, 0xE5BB, 0xE5BC, 0xE5BD, 0xE5BE, 0xE5BF, 0xE5C0, 0xE5C1, 0xE5C2, 0xE5C3, 0xE5C4, 0xE5C5, 0xE5C6, 0xE5C7, 0xE5C8, 0xE5C9, 0xE5CA, 0xE5CB, 0xE5CC, 0xE5CD, 0xE5CE, 0xE5CF, 0xE5D0, 0xE5D1, 0xE5D2, 0xE5D3, 0xE5D4, 0xE5D5, 0xE5D6, 0xE5D7, 0xE5D8, 0xE5D9, 0xE5DA, 0xE5DB, 0xE5DC, 0xE5DD, 0xE5DE, 0xE5DF, 0xE5E0, 0xE5E1, 0xE5E2, 0xE5E3, 0xE5E4, 0xE5E5, 0xE5E6, 0xE5E7, 0xE5E8, 0xE5E9, 0xE5EA, 0xE5EB, 0xE5EC, 0xE5ED, 0xE5EE, 0xE5EF, 0xE5F0, 0xE5F1, 0xE5F2, 0xE5F3, 0xE5F4, 0xE5F5, 0xE5F6, 0xE5F7, 0xE5F8, 0xE5F9, 0xE5FA, 0xE5FB, 0xE5FC, 0xE5FD, 0xE5FE, 0xE5FF, 0xE600, 0xE601, 0xE602, 0xE603, 0xE604, 0xE605, 0xE606, 0xE607, 0xE608, 0xE609, 0xE60A, 0xE60B, 0xE60C, 0xE60D, 0xE60E, 0xE60F, 0xE610, 0xE611, 0xE612, 0xE613, 0xE614, 0xE615, 0xE616, 0xE617, 0xE618, 0xE619, 0xE61A, 0xE61B, 0xE61C, 0xE61D, 0xE61E, 0xE61F, 0xE620, 0xE621, 0xE622, 0xE623, 0xE624, 0xE625, 0xE626, 0xE627, 0xE628, 0xE629, 0xE62A, 0xE62B, 0xE62C, 0xE62D, 0xE62E, 0xE62F, 0xE630, 0xE631, 0xE632, 0xE633, 0xE634, 0xE635, 0xE636, 0xE637, 0xE638, 0xE639, 0xE63A, 0xE63B, 0xE63C, 0xE63D, 0xE63E, 0xE63F, 0xE640, 0xE641, 0xE642, 0xE643, 0xE644, 0xE645, 0xE646, 0xE647, 0xE648, 0xE649, 0xE64A, 0xE64B, 0xE64C, 0xE64D, 0xE64E, 0xE64F, 0xE650, 0xE651, 0xE652, 0xE653, 0xE654, 0xE655, 0xE656, 0xE657, 0xE658, 0xE659, 0xE65A, 0xE65B, 0xE65C, 0xE65D, 0xE65E, 0xE65F, 0xE660, 0xE661, 0xE662, 0xE663, 0xE664, 0xE665, 0xE666, 0xE667, 0xE668, 0xE669, 0xE66A, 0xE66B, 0xE66C, 0xE66D, 0xE66E, 0xE66F, 0xE670, 0xE671, 0xE672, 0xE673, 0xE674, 0xE675, 0xE676, 0xE677, 0xE678, 0xE679, 0xE67A, 0xE67B, 0xE67C, 0xE67D, 0xE67E, 0xE67F, 0xE680, 0xE681, 0xE682, 0xE683, 0xE684, 0xE685, 0xE686, 0xE687, 0xE688, 0xE689, 0xE68A, 0xE68B, 0xE68C, 0xE68D, 0xE68E, 0xE68F, 0xE690, 0xE691, 0xE692, 0xE693, 0xE694, 0xE695, 0xE696, 0xE697, 0xE698, 0xE699, 0xE69A, 0xE69B, 0xE69C, 0xE69D, 0xE69E, 0xE69F, 0xE6A0, 0xE6A1, 0xE6A2, 0xE6A3, 0xE6A4, 0xE6A5, 0xE6A6, 0xE6A7, 0xE6A8, 0xE6A9, 0xE6AA, 0xE6AB, 0xE6AC, 0xE6AD, 0xE6AE, 0xE6AF, 0xE6B0, 0xE6B1, 0xE6B2, 0xE6B3, 0xE6B4, 0xE6B5, 0xE6B6, 0xE6B7, 0xE6B8, 0xE6B9, 0xE6BA, 0xE6BB, 0xE6BC, 0xE6BD, 0xE6BE, 0xE6BF, 0xE6C0, 0xE6C1, 0xE6C2, 0xE6C3, 0xE6C4, 0xE6C5, 0xE6C6, 0xE6C7, 0xE6C8, 0xE6C9, 0xE6CA, 0xE6CB, 0xE6CC, 0xE6CD, 0xE6CE, 0xE6CF, 0xE6D0, 0xE6D1, 0xE6D2, 0xE6D3, 0xE6D4, 0xE6D5, 0xE6D6, 0xE6D7, 0xE6D8, 0xE6D9, 0xE6DA, 0xE6DB, 0xE6DC, 0xE6DD, 0xE6DE, 0xE6DF, 0xE6E0, 0xE6E1, 0xE6E2, 0xE6E3, 0xE6E4, 0xE6E5, 0xE6E6, 0xE6E7, 0xE6E8, 0xE6E9, 0xE6EA, 0xE6EB, 0xE6EC, 0xE6ED, 0xE6EE, 0xE6EF, 0xE6F0, 0xE6F1, 0xE6F2, 0xE6F3, 0xE6F4, 0xE6F5, 0xE6F6, 0xE6F7, 0xE6F8, 0xE6F9, 0xE6FA, 0xE6FB, 0xE6FC, 0xE6FD, 0xE6FE, 0xE6FF, 0xE700, 0xE701, 0xE702, 0xE703, 0xE704, 0xE705, 0xE706, 0xE707, 0xE708, 0xE709, 0xE70A, 0xE70B, 0xE70C, 0xE70D, 0xE70E, 0xE70F, 0xE710, 0xE711, 0xE712, 0xE713, 0xE714, 0xE715, 0xE716, 0xE717, 0xE718, 0xE719, 0xE71A, 0xE71B, 0xE71C, 0xE71D, 0xE71E, 0xE71F, 0xE720, 0xE721, 0xE722, 0xE723, 0xE724, 0xE725, 0xE726, 0xE727, 0xE728, 0xE729, 0xE72A, 0xE72B, 0xE72C, 0xE72D, 0xE72E, 0xE72F, 0xE730, 0xE731, 0xE732, 0xE733, 0xE734, 0xE735, 0xE736, 0xE737, 0xE738, 0xE739, 0xE73A, 0xE73B, 0xE73C, 0xE73D, 0xE73E, 0xE73F, 0xE740, 0xE741, 0xE742, 0xE743, 0xE744, 0xE745, 0xE746, 0xE747, 0xE748, 0xE749, 0xE74A, 0xE74B, 0xE74C, 0xE74D, 0xE74E, 0xE74F, 0xE750, 0xE751, 0xE752, 0xE753, 0xE754, 0xE755, 0xE756, 0xE757, 0xE758, 0xE759, 0xE75A, 0xE75B, 0xE75C, 0xE75D, 0xE75E, 0xE75F, 0xE760, 0xE761, 0xE762, 0xE763, 0xE764, 0xE765, 0xE766, 0xE767, 0xE768, 0xE769, 0xE76A, 0xE76B, 0xE76C,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0xE7F7, 0xE7F8, 0xE7F9, 0xE7FA, 0xE7FB, 0xE7FC, 0xE7FD, 0xE7FE, 0xE7FF, 0xE800, 0xE801, 0xE802, 0xE803, 0xE804, 0xE805, 0xE806, 0xE807, 0xE808, 0xE809, 0xE80A, 0xE80B, 0xE80C, 0xE80D, 0xE80E, 0xE80F, 0xE810, 0xE811, 0xE812, 0xE813, 0xE814, 0xE815, 0xE816, 0xE817, 0xE818, 0xE819, 0xE81A, 0xE81B, 0xE81C, 0xE81D, 0xE81E, 0xE81F, 0xE820, 0xE821, 0xE822, 0xE823, 0xE824, 0xE825, 0xE826, 0xE827, 0xE828, 0xE829, 0xE82A, 0xE82B, 0xE82C, 0xE82D, 0xE82E, 0xE82F, 0xE830, 0xE831, 0xE832, 0xE833, 0xE834, 0xE835, 0xE836, 0xE837, 0xE838, 0xE839, 0xE83A, 0xE83B, 0xE83C, 0xE83D, 0xE83E, 0xE83F, 0xE840, 0xE841, 0xE842, 0xE843, 0xE844, 0xE845, 0xE846, 0xE847, 0xE848, 0xE849, 0xE84A, 0xE84B, 0xE84C, 0xE84D, 0xE84E, 0xE84F, 0xE850, 0xE851, 0xE852, 0xE853, 0xE854, 0xE855, 0xE856, 0xE857, 0xE858, 0xE859, 0xE85A, 0xE85B, 0xE85C, 0xE85D, 0xE85E, 0xE85F, 0xE860, 0xE861, 0xE862, 0xE863, 0xE864, 0xE865, 0xE866, 0xE867, 0xE868, 0xE869, 0xE86A, 0xE86B, 0xE86C, 0xE86D, 0xE86E, 0xE86F, 0xE870, 0xE871, 0xE872, 0xE873, 0xE874, 0xE875, 0xE876, 0xE877, 0xE878, 0xE879, 0xE87A, 0xE87B, 0xE87C, 0xE87D, 0xE87E, 0xE87F, 0xE880, 0xE881, 0xE882, 0xE883, 0xE884, 0xE885, 0xE886, 0xE887, 0xE888, 0xE889, 0xE88A, 0xE88B, 0xE88C, 0xE88D, 0xE88E, 0xE88F, 0xE890, 0xE891, 0xE892, 0xE893, 0xE894, 0xE895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, 0xE91E, 0xE91F, 0xE920, 0xE921, 0xE922, 0xE923, 0xE924, 0xE925, 0xE926, 0xE927, 0xE928, 0xE929, 0xE92A, 0xE92B, 0xE92C, 0xE92D, 0xE92E, 0xE92F, 0xE930, 0xE931, 0xE932, 0xE933, 0xE934, 0xE935, 0xE936, 0xE937, 0xE938, 0xE939, 0xE93A, 0xE93B, 0xE93C, 0xE93D, 0xE93E, 0xE93F, 0xE940, 0xE941, 0xE942, 0xE943, 0xE944, 0xE945, 0xE946, 0xE947, 0xE948, 0xE949, 0xE94A, 0xE94B, 0xE94C, 0xE94D, 0xE94E, 0xE94F, 0xE950, 0xE951, 0xE952, 0xE953, 0xE954, 0xE955, 0xE956, 0xE957, 0xE958, 0xE959, 0xE95A, 0xE95B, 0xE95C, 0xE95D, 0xE95E, 0xE95F, 0xE960, 0xE961, 0xE962, 0xE963, 0xE964, 0xE965, 0xE966, 0xE967, 0xE968, 0xE969, 0xE96A, 0xE96B, 0xE96C, 0xE96D, 0xE96E, 0xE96F, 0xE970, 0xE971, 0xE972, 0xE973, 0xE974, 0xE975, 0xE976, 0xE977, 0xE978, 0xE979, 0xE97A, 0xE97B, 0xE97C, 0xE97D, 0xE97E, 0xE97F, 0xE980, 0xE981, 0xE982, 0xE983, 0xE984, 0xE985, 0xE986, 0xE987, 0xE988, 0xE989, 0xE98A, 0xE98B, 0xE98C, 0xE98D, 0xE98E, 0xE98F, 0xE990, 0xE991, 0xE992, 0xE993, 0xE994, 0xE995, 0xE996, 0xE997, 0xE998, 0xE999, 0xE99A, 0xE99B, 0xE99C, 0xE99D, 0xE99E, 0xE99F, 0xE9A0, 0xE9A1, 0xE9A2, 0xE9A3, 0xE9A4, 0xE9A5, 0xE9A6, 0xE9A7, 0xE9A8, 0xE9A9, 0xE9AA, 0xE9AB, 0xE9AC, 0xE9AD, 0xE9AE, 0xE9AF, 0xE9B0, 0xE9B1, 0xE9B2, 0xE9B3, 0xE9B4, 0xE9B5, 0xE9B6, 0xE9B7, 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0xEC5B, 0xEC5C, 0xEC5D, 0xEC5E, 0xEC5F, 0xEC60, 0xEC61, 0xEC62, 0xEC63, 0xEC64, 0xEC65, 0xEC66, 0xEC67, 0xEC68, 0xEC69, 0xEC6A, 0xEC6B, 0xEC6C, 0xEC6D, 0xEC6E, 0xEC6F, 0xEC70, 0xEC71, 0xEC72, 0xEC73, 0xEC74, 0xEC75, 0xEC76, 0xEC77, 0xEC78, 0xEC79, 0xEC7A, 0xEC7B, 0xEC7C, 0xEC7D, 0xEC7E, 0xEC7F, 0xEC80, 0xEC81, 0xEC82, 0xEC83, 0xEC84, 0xEC85, 0xEC86, 0xEC87, 0xEC88, 0xEC89, 0xEC8A, 0xEC8B, 0xEC8C, 0xEC8D, 0xEC8E, 0xEC8F, 0xEC90, 0xEC91, 0xEC92, 0xEC93, 0xEC94, 0xEC95, 0xEC96, 0xEC97, 0xEC98, 0xEC99, 0xEC9A, 0xEC9B, 0xEC9C, 0xEC9D, 0xEC9E, 0xEC9F, 0xECA0, 0xECA1, 0xECA2, 0xECA3, 0xECA4, 0xECA5, 0xECA6, 0xECA7, 0xECA8, 0xECA9, 0xECAA, 0xECAB, 0xECAC, 0xECAD, 0xECAE, 0xECAF, 0xECB0, 0xECB1, 0xECB2, 0xECB3, 0xECB4, 0xECB5, 0xECB6, 0xECB7, 0xECB8, 0xECB9, 0xECBA, 0xECBB, 0xECBC, 0xECBD, 0xECBE, 0xECBF, 0xECC0, 0xECC1, 0xECC2, 0xECC3, 0xECC4, 0xECC5, 0xECC6, 0xECC7, 0xECC8, 0xECC9, 0xECCA, 0xECCB, 0xECCC, 0xECCD, 0xECCE, 0xECCF, 0xECD0, 0xECD1, 0xECD2, 0xECD3, 0xECD4, 0xECD5, 0xECD6, 0xECD7, 0xECD8, 0xECD9, 0xECDA, 0xECDB, 0xECDC, 0xECDD, 0xECDE, 0xECDF, 0xECE0, 0xECE1, 0xECE2, 0xECE3, 0xECE4, 0xECE5, 0xECE6, 0xECE7, 0xECE8, 0xECE9, 0xECEA, 0xECEB, 0xECEC, 0xECED, 0xECEE, 0xECEF, 0xECF0, 0xECF1, 0xECF2, 0xECF3, 0xECF4, 0xECF5, 0xECF6, 0xECF7, 0xECF8, 0xECF9, 0xECFA, 0xECFB, 0xECFC, 0xECFD, 0xECFE, 0xECFF, 0xED00, 0xED01, 0xED02, 0xED03, 0xED04, 0xED05, 0xED06, 0xED07, 0xED08, 0xED09, 0xED0A, 0xED0B, 0xED0C, 0xED0D, 0xED0E, 0xED0F, 0xED10, 0xED11, 0xED12, 0xED13, 0xED14, 0xED15, 0xED16, 0xED17, 0xED18, 0xED19, 0xED1A, 0xED1B, 0xED1C, 0xED1D, 0xED1E, 0xED1F, 0xED20, 0xED21, 0xED22, 0xED23, 0xED24, 0xED25, 0xED26, 0xED27, 0xED28, 0xED29, 0xED2A, 0xED2B, 0xED2C, 0xED2D, 0xED2E, 0xED2F, 0xED30, 0xED31, 0xED32, 0xED33, 0xED34, 0xED35, 0xED36, 0xED37, 0xED38, 0xED39, 0xED3A, 0xED3B, 0xED3C, 0xED3D, 0xED3E, 0xED3F, 0xED40, 0xED41, 0xED42, 0xED43, 0xED44, 0xED45, 0xED46, 0xED47, 0xED48, 0xED49, 0xED4A, 0xED4B, 0xED4C, 0xED4D, 0xED4E, 0xED4F, 0xED50, 0xED51, 0xED52, 0xED53, 0xED54, 0xED55, 0xED56, 0xED57, 0xED58, 0xED59, 0xED5A, 0xED5B, 0xED5C, 0xED5D, 0xED5E, 0xED5F, 0xED60, 0xED61, 0xED62, 0xED63, 0xED64, 0xED65, 0xED66, 0xED67, 0xED68, 0xED69, 0xED6A, 0xED6B, 0xED6C, 0xED6D, 0xED6E, 0xED6F, 0xED70, 0xED71, 0xED72, 0xED73, 0xED74, 0xED75, 0xED76, 0xED77, 0xED78, 0xED79, 0xED7A, 0xED7B, 0xED7C, 0xED7D, 0xED7E, 0xED7F, 0xED80, 0xED81, 0xED82, 0xED83, 0xED84, 0xED85, 0xED86, 0xED87, 0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F032, 0xF033, 0xF034, 0xF035, 0xF036, 0xF037, 0xF038, 0xF039, 0xF03A, 0xF03B, 0xF03C, 0xF03D, 0xF03E, 0xF03F, 0xF040, 0xF041, 0xF042, 0xF043, 0xF044, 0xF045, 0xF046, 0xF047, 0xF048, 0xF049, 0xF04A, 0xF04B, 0xF04C, 0xF04D, 0xF04E, 0xF04F, 0xF050, 0xF051, 0xF052, 0xF053, 0xF054, 0xF055, 0xF056, 0xF057, 0xF058, 0xF059, 0xF05A, 0xF05B, 0xF05C, 0xF05D, 0xF05E, 0xF05F, 0xF060, 0xF061, 0xF062, 0xF063, 0xF064, 0xF065, 0xF066, 0xF067, 0xF068, 0xF069, 0xF06A, 0xF06B, 0xF06C, 0xF06D, 0xF06E, 0xF06F, 0xF070, 0xF071, 0xF072, 0xF073, 0xF074, 0xF075, 0xF076, 0xF077, 0xF078, 0xF079, 0xF07A, 0xF07B, 0xF07C, 0xF07D, 0xF07E, 0xF07F, 0xF080, 0xF081, 0xF082, 0xF083, 0xF084, 0xF085, 0xF086, 0xF087, 0xF088, 0xF089, 0xF08A, 0xF08B, 0xF08C, 0xF08D, 0xF08E, 0xF08F, 0xF090, 0xF091, 0xF092, 0xF093, 0xF094, 0xF095, 0xF096, 0xF097, 0xF098, 0xF099, 0xF09A, 0xF09B, 0xF09C, 0xF09D, 0xF09E, 0xF09F, 0xF0A0, 0xF0A1, 0xF0A2, 0xF0A3, 0xF0A4, 0xF0A5, 0xF0A6, 0xF0A7, 0xF0A8, 0xF0A9, 0xF0AA, 0xF0AB, 0xF0AC, 0xF0AD, 0xF0AE, 0xF0AF, 0xF0B0, 0xF0B1, 0xF0B2, 0xF0B3, 0xF0B4, 0xF0B5, 0xF0B6, 0xF0B7, 0xF0B8, 0xF0B9, 0xF0BA, 0xF0BB, 0xF0BC, 0xF0BD, 0xF0BE, 0xF0BF, 0xF0C0, 0xF0C1, 0xF0C2, 0xF0C3, 0xF0C4, 0xF0C5, 0xF0C6, 0xF0C7, 0xF0C8, 0xF0C9, 0xF0CA, 0xF0CB, 0xF0CC, 0xF0CD, 0xF0CE, 0xF0CF, 0xF0D0, 0xF0D1, 0xF0D2, 0xF0D3, 0xF0D4, 0xF0D5, 0xF0D6, 0xF0D7, 0xF0D8, 0xF0D9, 0xF0DA, 0xF0DB, 0xF0DC, 0xF0DD, 0xF0DE, 0xF0DF, 0xF0E0, 0xF0E1, 0xF0E2, 0xF0E3, 0xF0E4, 0xF0E5, 0xF0E6, 0xF0E7, 0xF0E8, 0xF0E9, 0xF0EA, 0xF0EB, 0xF0EC, 0xF0ED, 0xF0EE, 0xF0EF, 0xF0F0, 0xF0F1, 0xF0F2, 0xF0F3, 0xF0F4, 0xF0F5, 0xF0F6, 0xF0F7, 0xF0F8, 0xF0F9, 0xF0FA, 0xF0FB, 0xF0FC, 0xF0FD, 0xF0FE, 0xF0FF, 0xF100, 0xF101, 0xF102, 0xF103, 0xF104, 0xF105, 0xF106, 0xF107, 0xF108, 0xF109, 0xF10A, 0xF10B, 0xF10C, 0xF10D, 0xF10E, 0xF10F, 0xF110, 0xF111, 0xF112, 0xF113, 0xF114, 0xF115, 0xF116, 0xF117, 0xF118, 0xF119, 0xF11A, 0xF11B, 0xF11C, 0xF11D, 0xF11E, 0xF11F, 0xF120, 0xF121, 0xF122, 0xF123, 0xF124, 0xF125, 0xF126, 0xF127, 0xF128, 0xF129, 0xF12A, 0xF12B, 0xF12C, 0xF12D, 0xF12E, 0xF12F, 0xF130, 0xF131, 0xF132, 0xF133, 0xF134, 0xF135, 0xF136, 0xF137, 0xF138, 0xF139, 0xF13A, 0xF13B, 0xF13C, 0xF13D, 0xF13E, 0xF13F, 0xF140, 0xF141, 0xF142, 0xF143, 0xF144, 0xF145, 0xF146, 0xF147, 0xF148, 0xF149, 0xF14A, 0xF14B, 0xF14C, 0xF14D, 0xF14E, 0xF14F, 0xF150, 0xF151, 0xF152, 0xF153, 0xF154, 0xF155, 0xF156, 0xF157, 0xF158, 0xF159, 0xF15A, 0xF15B, 0xF15C, 0xF15D, 0xF15E, 0xF15F, 0xF160, 0xF161, 0xF162, 0xF163, 0xF164, 0xF165, 0xF166, 0xF167, 0xF168, 0xF169, 0xF16A, 0xF16B, 0xF16C, 0xF16D, 0xF16E, 0xF16F, 0xF170, 0xF171, 0xF172, 0xF173, 0xF174, 0xF175, 0xF176, 0xF177, 0xF178, 0xF179, 0xF17A, 0xF17B, 0xF17C, 0xF17D, 0xF17E, 0xF17F, 0xF180, 0xF181, 0xF182, 0xF183, 0xF184, 0xF185, 0xF186, 0xF187, 0xF188, 0xF189, 0xF18A, 0xF18B, 0xF18C, 0xF18D, 0xF18E, 0xF18F, 0xF190, 0xF191, 0xF192, 0xF193, 0xF194, 0xF195, 0xF196, 0xF197, 0xF198, 0xF199, 0xF19A, 0xF19B, 0xF19C, 0xF19D, 0xF19E, 0xF19F, 0xF1A0, 0xF1A1, 0xF1A2, 0xF1A3, 0xF1A4, 0xF1A5, 0xF1A6, 0xF1A7, 0xF1A8, 0xF1A9, 0xF1AA, 0xF1AB, 0xF1AC, 0xF1AD, 0xF1AE, 0xF1AF, 0xF1B0, 0xF1B1, 0xF1B2, 0xF1B3, 0xF1B4, 0xF1B5, 0xF1B6, 0xF1B7, 0xF1B8, 0xF1B9, 0xF1BA, 0xF1BB, 0xF1BC, 0xF1BD, 0xF1BE, 0xF1BF, 0xF1C0, 0xF1C1, 0xF1C2, 0xF1C3, 0xF1C4, 0xF1C5, 0xF1C6, 0xF1C7, 0xF1C8, 0xF1C9, 0xF1CA, 0xF1CB, 0xF1CC, 0xF1CD, 0xF1CE, 0xF1CF, 0xF1D0, 0xF1D1, 0xF1D2, 0xF1D3, 0xF1D4, 0xF1D5, 0xF1D6, 0xF1D7, 0xF1D8, 0xF1D9, 0xF1DA, 0xF1DB, 0xF1DC, 0xF1DD, 0xF1DE, 0xF1DF, 0xF1E0, 0xF1E1, 0xF1E2, 0xF1E3, 0xF1E4, 0xF1E5, 0xF1E6, 0xF1E7, 0xF1E8, 0xF1E9, 0xF1EA, 0xF1EB, 0xF1EC, 0xF1ED, 0xF1EE, 0xF1EF, 0xF1F0, 0xF1F1, 0xF1F2, 0xF1F3, 0xF1F4, 0xF1F5, 0xF1F6, 0xF1F7, 0xF1F8, 0xF1F9, 0xF1FA, 0xF1FB, 0xF1FC, 0xF1FD, 0xF1FE, 0xF1FF, 0xF200, 0xF201, 0xF202, 0xF203, 0xF204, 0xF205, 0xF206, 0xF207, 0xF208, 0xF209, 0xF20A, 0xF20B, 0xF20C, 0xF20D, 0xF20E, 0xF20F, 0xF210, 0xF211, 0xF212, 0xF213, 0xF214, 0xF215, 0xF216, 0xF217, 0xF218, 0xF219, 0xF21A, 0xF21B, 0xF21C, 0xF21D, 0xF21E, 0xF21F, 0xF220, 0xF221, 0xF222, 0xF223, 0xF224, 0xF225, 0xF226, 0xF227, 0xF228, 0xF229, 0xF22A, 0xF22B, 0xF22C, 0xF22D, 0xF22E, 0xF22F, 0xF230, 0xF231, 0xF232, 0xF233, 0xF234, 0xF235, 0xF236, 0xF237, 0xF238, 0xF239, 0xF23A, 0xF23B, 0xF23C, 0xF23D, 0xF23E, 0xF23F, 0xF240, 0xF241, 0xF242, 0xF243, 0xF244, 0xF245, 0xF246, 0xF247, 0xF248, 0xF249, 0xF24A, 0xF24B, 0xF24C, 0xF24D, 0xF24E, 0xF24F, 0xF250, 0xF251, 0xF252, 0xF253, 0xF254, 0xF255, 0xF256, 0xF257, 0xF258, 0xF259, 0xF25A, 0xF25B, 0xF25C, 0xF25D, 0xF25E, 0xF25F, 0xF260, 0xF261, 0xF262, 0xF263, 0xF264, 0xF265, 0xF266, 0xF267, 0xF268, 0xF269, 0xF26A, 0xF26B, 0xF26C, 0xF26D, 0xF26E, 0xF26F, 0xF270, 0xF271, 0xF272, 0xF273, 0xF274, 0xF275, 0xF276, 0xF277, 0xF278, 0xF279, 0xF27A, 0xF27B, 0xF27C, 0xF27D, 0xF27E, 0xF27F, 0xF280, 0xF281, 0xF282, 0xF283, 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F30C, 0xF30D, 0xF30E, 0xF30F, 0xF310, 0xF311, 0xF312, 0xF313, 0xF314, 0xF315, 0xF316, 0xF317, 0xF318, 0xF319, 0xF31A, 0xF31B, 0xF31C, 0xF31D, 0xF31E, 0xF31F, 0xF320, 0xF321, 0xF322, 0xF323, 0xF324, 0xF325, 0xF326, 0xF327, 0xF328, 0xF329, 0xF32A, 0xF32B, 0xF32C, 0xF32D, 0xF32E, 0xF32F, 0xF330, 0xF331, 0xF332, 0xF333, 0xF334, 0xF335, 0xF336, 0xF337, 0xF338, 0xF339, 0xF33A, 0xF33B, 0xF33C, 0xF33D, 0xF33E, 0xF33F, 0xF340, 0xF341, 0xF342, 0xF343, 0xF344, 0xF345, 0xF346, 0xF347, 0xF348, 0xF349, 0xF34A, 0xF34B, 0xF34C, 0xF34D, 0xF34E, 0xF34F, 0xF350, 0xF351, 0xF352, 0xF353, 0xF354, 0xF355, 0xF356, 0xF357, 0xF358, 0xF359, 0xF35A, 0xF35B, 0xF35C, 0xF35D, 0xF35E, 0xF35F, 0xF360, 0xF361, 0xF362, 0xF363, 0xF364, 0xF365, 0xF366, 0xF367, 0xF368, 0xF369, 0xF36A, 0xF36B, 0xF36C, 0xF36D, 0xF36E, 0xF36F, 0xF370, 0xF371, 0xF372, 0xF373, 0xF374, 0xF375, 0xF376, 0xF377, 0xF378, 0xF379, 0xF37A, 0xF37B, 0xF37C, 0xF37D, 0xF37E, 0xF37F, 0xF380, 0xF381, 0xF382, 0xF383, 0xF384, 0xF385, 0xF386, 0xF387, 0xF388, 0xF389, 0xF38A, 0xF38B, 0xF38C, 0xF38D, 0xF38E, 0xF38F, 0xF390, 0xF391, 0xF392, 0xF393, 0xF394, 0xF395, 0xF396, 0xF397, 0xF398, 0xF399, 0xF39A, 0xF39B, 0xF39C, 0xF39D, 0xF39E, 0xF39F, 0xF3A0, 0xF3A1, 0xF3A2, 0xF3A3, 0xF3A4, 0xF3A5, 0xF3A6, 0xF3A7, 0xF3A8, 0xF3A9, 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0xF435, 0xF436, 0xF437, 0xF438, 0xF439, 0xF43A, 0xF43B, 0xF43C, 0xF43D, 0xF43E, 0xF43F, 0xF440, 0xF441, 0xF442, 0xF443, 0xF444, 0xF445, 0xF446, 0xF447, 0xF448, 0xF449, 0xF44A, 0xF44B, 0xF44C, 0xF44D, 0xF44E, 0xF44F, 0xF450, 0xF451, 0xF452, 0xF453, 0xF454, 0xF455, 0xF456, 0xF457, 0xF458, 0xF459, 0xF45A, 0xF45B, 0xF45C, 0xF45D, 0xF45E, 0xF45F, 0xF460, 0xF461, 0xF462, 0xF463, 0xF464, 0xF465, 0xF466, 0xF467, 0xF468, 0xF469, 0xF46A, 0xF46B, 0xF46C, 0xF46D, 0xF46E, 0xF46F, 0xF470, 0xF471, 0xF472, 0xF473, 0xF474, 0xF475, 0xF476, 0xF477, 0xF478, 0xF479, 0xF47A, 0xF47B, 0xF47C, 0xF47D, 0xF47E, 0xF47F, 0xF480, 0xF481, 0xF482, 0xF483, 0xF484, 0xF485, 0xF486, 0xF487, 0xF488, 0xF489, 0xF48A, 0xF48B, 0xF48C, 0xF48D, 0xF48E, 0xF48F, 0xF490, 0xF491, 0xF492, 0xF493, 0xF494, 0xF495, 0xF496, 0xF497, 0xF498, 0xF499, 0xF49A, 0xF49B, 0xF49C, 0xF49D, 0xF49E, 0xF49F, 0xF4A0, 0xF4A1, 0xF4A2, 0xF4A3, 0xF4A4, 0xF4A5, 0xF4A6, 0xF4A7, 0xF4A8, 0xF4A9, 0xF4AA, 0xF4AB, 0xF4AC, 0xF4AD, 0xF4AE, 0xF4AF, 0xF4B0, 0xF4B1, 0xF4B2, 0xF4B3, 0xF4B4, 0xF4B5, 0xF4B6, 0xF4B7, 0xF4B8, 0xF4B9, 0xF4BA, 0xF4BB, 0xF4BC, 0xF4BD, 0xF4BE, 0xF4BF, 0xF4C0, 0xF4C1, 0xF4C2, 0xF4C3, 0xF4C4, 0xF4C5, 0xF4C6, 0xF4C7, 0xF4C8, 0xF4C9, 0xF4CA, 0xF4CB, 0xF4CC, 0xF4CD, 0xF4CE, 0xF4CF, 0xF4D0, 0xF4D1, 0xF4D2, 0xF4D3, 0xF4D4, 0xF4D5, 0xF4D6, 0xF4D7, 0xF4D8, 0xF4D9, 0xF4DA, 0xF4DB, 0xF4DC, 0xF4DD, 0xF4DE, 0xF4DF, 0xF4E0, 0xF4E1, 0xF4E2, 0xF4E3, 0xF4E4, 0xF4E5, 0xF4E6, 0xF4E7, 0xF4E8, 0xF4E9, 0xF4EA, 0xF4EB, 0xF4EC, 0xF4ED, 0xF4EE, 0xF4EF, 0xF4F0, 0xF4F1, 0xF4F2, 0xF4F3, 0xF4F4, 0xF4F5, 0xF4F6, 0xF4F7, 0xF4F8, 0xF4F9, 0xF4FA, 0xF4FB, 0xF4FC, 0xF4FD, 0xF4FE, 0xF4FF, 0xF500, 0xF501, 0xF502, 0xF503, 0xF504, 0xF505, 0xF506, 0xF507, 0xF508, 0xF509, 0xF50A, 0xF50B, 0xF50C, 0xF50D, 0xF50E, 0xF50F, 0xF510, 0xF511, 0xF512, 0xF513, 0xF514, 0xF515, 0xF516, 0xF517, 0xF518, 0xF519, 0xF51A, 0xF51B, 0xF51C, 0xF51D, 0xF51E, 0xF51F, 0xF520, 0xF521, 0xF522, 0xF523, 0xF524, 0xF525, 0xF526, 0xF527, 0xF528, 0xF529, 0xF52A, 0xF52B, 0xF52C, 0xF52D, 0xF52E, 0xF52F, 0xF530, 0xF531, 0xF532, 0xF533, 0xF534, 0xF535, 0xF536, 0xF537, 0xF538, 0xF539, 0xF53A, 0xF53B, 0xF53C, 0xF53D, 0xF53E, 0xF53F, 0xF540, 0xF541, 0xF542, 0xF543, 0xF544, 0xF545, 0xF546, 0xF547, 0xF548, 0xF549, 0xF54A, 0xF54B, 0xF54C, 0xF54D, 0xF54E, 0xF54F, 0xF550, 0xF551, 0xF552, 0xF553, 0xF554, 0xF555, 0xF556, 0xF557, 0xF558, 0xF559, 0xF55A, 0xF55B, 0xF55C, 0xF55D, 0xF55E, 0xF55F, 0xF560, 0xF561, 0xF562, 0xF563, 0xF564, 0xF565, 0xF566, 0xF567, 0xF568, 0xF569, 0xF56A, 0xF56B, 0xF56C, 0xF56D, 0xF56E, 0xF56F, 0xF570, 0xF571, 0xF572, 0xF573, 0xF574, 0xF575, 0xF576, 0xF577, 0xF578, 0xF579, 0xF57A, 0xF57B, 0xF57C, 0xF57D, 0xF57E, 0xF57F, 0xF580, 0xF581, 0xF582, 0xF583, 0xF584, 0xF585, 0xF586, 0xF587, 0xF588, 0xF589, 0xF58A, 0xF58B, 0xF58C, 0xF58D, 0xF58E, 0xF58F, 0xF590, 0xF591, 0xF592, 0xF593, 0xF594, 0xF595, 0xF596, 0xF597, 0xF598, 0xF599, 0xF59A, 0xF59B, 0xF59C, 0xF59D, 0xF59E, 0xF59F, 0xF5A0, 0xF5A1, 0xF5A2, 0xF5A3, 0xF5A4, 0xF5A5, 0xF5A6, 0xF5A7, 0xF5A8, 0xF5A9, 0xF5AA, 0xF5AB, 0xF5AC, 0xF5AD, 0xF5AE, 0xF5AF, 0xF5B0, 0xF5B1, 0xF5B2, 0xF5B3, 0xF5B4, 0xF5B5, 0xF5B6, 0xF5B7, 0xF5B8, 0xF5B9, 0xF5BA, 0xF5BB, 0xF5BC, 0xF5BD, 0xF5BE, 0xF5BF, 0xF5C0, 0xF5C1, 0xF5C2, 0xF5C3, 0xF5C4, 0xF5C5, 0xF5C6, 0xF5C7, 0xF5C8, 0xF5C9, 0xF5CA, 0xF5CB, 0xF5CC, 0xF5CD, 0xF5CE, 0xF5CF, 0xF5D0, 0xF5D1, 0xF5D2, 0xF5D3, 0xF5D4, 0xF5D5, 0xF5D6, 0xF5D7, 0xF5D8, 0xF5D9, 0xF5DA, 0xF5DB, 0xF5DC, 0xF5DD, 0xF5DE, 0xF5DF, 0xF5E0, 0xF5E1, 0xF5E2, 0xF5E3, 0xF5E4, 0xF5E5, 0xF5E6, 0xF5E7, 0xF5E8, 0xF5E9, 0xF5EA, 0xF5EB, 0xF5EC, 0xF5ED, 0xF5EE, 0xF5EF, 0xF5F0, 0xF5F1, 0xF5F2, 0xF5F3, 0xF5F4, 0xF5F5, 0xF5F6, 0xF5F7, 0xF5F8, 0xF5F9, 0xF5FA, 0xF5FB, 0xF5FC, 0xF5FD, 0xF5FE, 0xF5FF, 0xF600, 0xF601, 0xF602, 0xF603, 0xF604, 0xF605, 0xF606, 0xF607, 0xF608, 0xF609, 0xF60A, 0xF60B, 0xF60C, 0xF60D, 0xF60E, 0xF60F, 0xF610, 0xF611, 0xF612, 0xF613, 0xF614, 0xF615, 0xF616, 0xF617, 0xF618, 0xF619, 0xF61A, 0xF61B, 0xF61C, 0xF61D, 0xF61E, 0xF61F, 0xF620, 0xF621, 0xF622, 0xF623, 0xF624, 0xF625, 0xF626, 0xF627, 0xF628, 0xF629, 0xF62A, 0xF62B, 0xF62C, 0xF62D, 0xF62E, 0xF62F, 0xF630, 0xF631, 0xF632, 0xF633, 0xF634, 0xF635, 0xF636, 0xF637, 0xF638, 0xF639, 0xF63A, 0xF63B, 0xF63C, 0xF63D, 0xF63E, 0xF63F, 0xF640, 0xF641, 0xF642, 0xF643, 0xF644, 0xF645, 0xF646, 0xF647, 0xF648, 0xF649, 0xF64A, 0xF64B, 0xF64C, 0xF64D, 0xF64E, 0xF64F, 0xF650, 0xF651, 0xF652, 0xF653, 0xF654, 0xF655, 0xF656, 0xF657, 0xF658, 0xF659, 0xF65A, 0xF65B, 0xF65C, 0xF65D, 0xF65E, 0xF65F, 0xF660, 0xF661, 0xF662, 0xF663, 0xF664, 0xF665, 0xF666, 0xF667, 0xF668, 0xF669, 0xF66A, 0xF66B, 0xF66C, 0xF66D, 0xF66E, 0xF66F, 0xF670, 0xF671, 0xF672, 0xF673, 0xF674, 0xF675, 0xF676, 0xF677, 0xF678, 0xF679, 0xF67A, 0xF67B, 0xF67C, 0xF67D, 0xF67E, 0xF67F, 0xF680, 0xF681, 0xF682, 0xF683, 0xF684, 0xF685, 0xF686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E, 0xF70F, 0xF710, 0xF711, 0xF712, 0xF713, 0xF714, 0xF715, 0xF716, 0xF717, 0xF718, 0xF719, 0xF71A, 0xF71B, 0xF71C, 0xF71D, 0xF71E, 0xF71F, 0xF720, 0xF721, 0xF722, 0xF723, 0xF724, 0xF725, 0xF726, 0xF727, 0xF728, 0xF729, 0xF72A, 0xF72B, 0xF72C, 0xF72D, 0xF72E, 0xF72F, 0xF730, 0xF731, 0xF732, 0xF733, 0xF734, 0xF735, 0xF736, 0xF737, 0xF738, 0xF739, 0xF73A, 0xF73B, 0xF73C, 0xF73D, 0xF73E, 0xF73F, 0xF740, 0xF741, 0xF742, 0xF743, 0xF744, 0xF745, 0xF746, 0xF747, 0xF748, 0xF749, 0xF74A, 0xF74B, 0xF74C, 0xF74D, 0xF74E, 0xF74F, 0xF750, 0xF751, 0xF752, 0xF753, 0xF754, 0xF755, 0xF756, 0xF757, 0xF758, 0xF759, 0xF75A, 0xF75B, 0xF75C, 0xF75D, 0xF75E, 0xF75F, 0xF760, 0xF761, 0xF762, 0xF763, 0xF764, 0xF765, 0xF766, 0xF767, 0xF768, 0xF769, 0xF76A, 0xF76B, 0xF76C, 0xF76D, 0xF76E, 0xF76F, 0xF770, 0xF771, 0xF772, 0xF773, 0xF774, 0xF775, 0xF776, 0xF777, 0xF778, 0xF779, 0xF77A, 0xF77B, 0xF77C, 0xF77D, 0xF77E, 0xF77F, 0xF780, 0xF781, 0xF782, 0xF783, 0xF784, 0xF785, 0xF786, 0xF787, 0xF788, 0xF789, 0xF78A, 0xF78B, 0xF78C, 0xF78D, 0xF78E, 0xF78F, 0xF790, 0xF791, 0xF792, 0xF793, 0xF794, 0xF795, 0xF796, 0xF797, 0xF798, 0xF799, 0xF79A, 0xF79B, 0xF79C, 0xF79D, 0xF79E, 0xF79F, 0xF7A0, 0xF7A1, 0xF7A2, 0xF7A3, 0xF7A4, 0xF7A5, 0xF7A6, 0xF7A7, 0xF7A8, 0xF7A9, 0xF7AA, 0xF7AB, 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, 0xF838, 0xF839, 0xF83A, 0xF83B, 0xF83C, 0xF83D, 0xF83E, 0xF83F, 0xF840, 0xF841, 0xF842, 0xF843, 0xF844, 0xF845, 0xF846, 0xF847, 0xF848, 0xF849, 0xF84A, 0xF84B, 0xF84C, 0xF84D, 0xF84E, 0xF84F, 0xF850, 0xF851, 0xF852, 0xF853, 0xF854, 0xF855, 0xF856, 0xF857, 0xF858, 0xF859, 0xF85A, 0xF85B, 0xF85C, 0xF85D, 0xF85E, 0xF85F, 0xF860, 0xF861, 0xF862, 0xF863, 0xF864, 0xF865, 0xF866, 0xF867, 0xF868, 0xF869, 0xF86A, 0xF86B, 0xF86C, 0xF86D, 0xF86E, 0xF86F, 0xF870, 0xF871, 0xF872, 0xF873, 0xF874, 0xF875, 0xF876, 0xF877, 0xF878, 0xF879, 0xF87A, 0xF87B, 0xF87C, 0xF87D, 0xF87E, 0xF87F, 0xF880, 0xF881, 0xF882, 0xF883, 0xF884, 0xF885, 0xF886, 0xF887, 0xF888, 0xF889, 0xF88A, 0xF88B, 0xF88C, 0xF88D, 0xF88E, 0xF88F, 0xF890, 0xF891, 0xF892, 0xF893, 0xF894, 0xF895, 0xF896, 0xF897, 0xF898, 0xF899, 0xF89A, 0xF89B, 0xF89C, 0xF89D, 0xF89E, 0xF89F, 0xF8A0, 0xF8A1, 0xF8A2, 0xF8A3, 0xF8A4, 0xF8A5, 0xF8A6, 0xF8A7, 0xF8A8, 0xF8A9, 0xF8AA, 0xF8AB, 0xF8AC, 0xF8AD, 0xF8AE, 0xF8AF, 0xF8B0, 0xF8B1, 0xF8B2, 0xF8B3, 0xF8B4, 0xF8B5, 0xF8B6, 0xF8B7, 0xF8B8, 0xF8B9, 0xF8BA, 0xF8BB, 0xF8BC, 0xF8BD, 0xF8BE, 0xF8BF, 0xF8C0, 0xF8C1, 0xF8C2, 0xF8C3, 0xF8C4, 0xF8C5, 0xF8C6, 0xF8C7, 0xF8C8, 0xF8C9, 0xF8CA, 0xF8CB, 0xF8CC, 0xF8CD, 0xF8CE, 0xF8CF, 0xF8D0, 0xF8D1, 0xF8D2, 0xF8D3, 0xF8D4, 0xF8D5, 0xF8D6, 0xF8D7, 0xF8D8, 0xF8D9, 0xF8DA, 0xF8DB, 0xF8DC, 0xF8DD, 0xF8DE, 0xF8DF, 0xF8E0, 0xF8E1, 0xF8E2, 0xF8E3, 0xF8E4, 0xF8E5, 0xF8E6, 0xF8E7, 0xF8E8, 0xF8E9, 0xF8EA, 0xF8EB, 0xF8EC, 0xF8ED, 0xF8EE, 0xF8EF, 0xF8F0, 0xF8F1, 0xF8F2, 0xF8F3, 0xF8F4, 0xF8F5, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, 0xF8FA, 0xF8FB, 0xF8FC, 0xF8FD, 0xF8FE, 0xF8FF ];
export default function(){ return [ { title: 'home' }, { title: 'about us' }, { title: 'tact x chula' }, { title: 'timeline' }, { title: 'contact' } ] }
var crypto = require('crypto') var express = require('express') var app = express() app.put('/message/:id', function(req, res) { var stream = crypto.createHash('sha1') var date = new Date().toDateString() stream.update(date + req.params.id) res.end(stream.digest('hex')) }) app.listen(process.argv[2])
jeweli = {}; jeweli.admin = {}; jeweli.admin.positionChannelList = function(){ var l = document.getElementById('new-post-link').offsetLeft; document.getElementById('new-post-channels-list').style.left = l + "px"; } jeweli.admin.previewArticle = function(){ // Get all of the data value fields var fields_container = document.getElementById('article-fields'); var fields = jeweli.admin.getElementsByClass('rich-edit-text', fields_container, 'textarea'); var preview_area = document.getElementById('preview-container'); for(var i = 0; i < fields.length; i++){ preview_area.innerHTML += "<p>" + fields[i].value + "</p>"; } return fields; } // Awesome implementation of getElementsByClass by // Dustin Diaz: http://www.dustindiaz.com/getelementsbyclass/ jeweli.admin.getElementsByClass = function(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } var virgin = true; // A sentinel telling us if updateSlug has been called yet jeweli.admin.updateSlug = function() { // TRICKY: only update the slug if it was empty on page load if (virgin == true && document.getElementById("article_slug").value != "") { return; } else { virgin = false; } var defaultTitle = '', Txt = document.getElementById("article_title").value, TxtTemp, separator = '-', multiReg, c, pos; if (defaultTitle != '') { if (Txt.substr(0, defaultTitle.length) == defaultTitle) { Txt = Txt.substr(defaultTitle.length) } } Txt = Txt.toLowerCase(); // Int'l chars filter TxtTemp = ''; for(pos=0; pos<Txt.length; pos++) { c = Txt.charCodeAt(pos); if (c >= 32 && c < 128) { TxtTemp += Txt.charAt(pos); } else { if (c == '223') {TxtTemp += 'ss'; continue;} if (c == '224') {TxtTemp += 'a'; continue;} if (c == '225') {TxtTemp += 'a'; continue;} if (c == '226') {TxtTemp += 'a'; continue;} if (c == '229') {TxtTemp += 'a'; continue;} if (c == '227') {TxtTemp += 'ae'; continue;} if (c == '230') {TxtTemp += 'ae'; continue;} if (c == '228') {TxtTemp += 'ae'; continue;} if (c == '231') {TxtTemp += 'c'; continue;} if (c == '232') {TxtTemp += 'e'; continue;} if (c == '233') {TxtTemp += 'e'; continue;} if (c == '234') {TxtTemp += 'e'; continue;} if (c == '235') {TxtTemp += 'e'; continue;} if (c == '236') {TxtTemp += 'i'; continue;} if (c == '237') {TxtTemp += 'i'; continue;} if (c == '238') {TxtTemp += 'i'; continue;} if (c == '239') {TxtTemp += 'i'; continue;} if (c == '241') {TxtTemp += 'n'; continue;} if (c == '242') {TxtTemp += 'o'; continue;} if (c == '243') {TxtTemp += 'o'; continue;} if (c == '244') {TxtTemp += 'o'; continue;} if (c == '245') {TxtTemp += 'o'; continue;} if (c == '246') {TxtTemp += 'oe'; continue;} if (c == '249') {TxtTemp += 'u'; continue;} if (c == '250') {TxtTemp += 'u'; continue;} if (c == '251') {TxtTemp += 'u'; continue;} if (c == '252') {TxtTemp += 'ue'; continue;} if (c == '255') {TxtTemp += 'y'; continue;} if (c == '257') {TxtTemp += 'aa'; continue;} if (c == '269') {TxtTemp += 'ch'; continue;} if (c == '275') {TxtTemp += 'ee'; continue;} if (c == '291') {TxtTemp += 'gj'; continue;} if (c == '299') {TxtTemp += 'ii'; continue;} if (c == '311') {TxtTemp += 'kj'; continue;} if (c == '316') {TxtTemp += 'lj'; continue;} if (c == '326') {TxtTemp += 'nj'; continue;} if (c == '353') {TxtTemp += 'sh'; continue;} if (c == '363') {TxtTemp += 'uu'; continue;} if (c == '382') {TxtTemp += 'zh'; continue;} if (c == '256') {TxtTemp += 'aa'; continue;} if (c == '268') {TxtTemp += 'ch'; continue;} if (c == '274') {TxtTemp += 'ee'; continue;} if (c == '290') {TxtTemp += 'gj'; continue;} if (c == '298') {TxtTemp += 'ii'; continue;} if (c == '310') {TxtTemp += 'kj'; continue;} if (c == '315') {TxtTemp += 'lj'; continue;} if (c == '325') {TxtTemp += 'nj'; continue;} if (c == '352') {TxtTemp += 'sh'; continue;} if (c == '362') {TxtTemp += 'uu'; continue;} if (c == '381') {TxtTemp += 'zh'; continue;} } } multiReg = new RegExp(separator + '{2,}', 'g'); Txt = TxtTemp; Txt = Txt.replace('/<(.*?)>/g', ''); Txt = Txt.replace(/\s+/g, separator); Txt = Txt.replace(/\//g, separator); Txt = Txt.replace(/[^a-z0-9\-\._]/g,''); Txt = Txt.replace(/\+/g, separator); Txt = Txt.replace(multiReg, separator); Txt = Txt.replace(/-$/g,''); Txt = Txt.replace(/_$/g,''); Txt = Txt.replace(/^_/g,''); Txt = Txt.replace(/^-/g,''); Txt = Txt.replace(/\.+$/g,''); if (document.getElementById("article_slug")) { document.getElementById("article_slug").value = "" + Txt; } else { document.forms['new_article'].elements['article_slug'].value = "" + Txt; } }
/** * Problem: https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ */ /** * @param {string} s * @return {number} */ let lengthOfLongestSubstring = s => { let maxLen = 0, subArr = [], index; for (let i = 0; i < s.length; i++) { index = subArr.indexOf(s[i]); if (index !== -1) { subArr = subArr.slice(index + 1, subArr.length); } subArr.push(s[i]); maxLen = Math.max(maxLen, subArr.length); } return maxLen; }; module.exports = lengthOfLongestSubstring;
define(['module2'], function (module2) { return module2; });
module.exports = function (ngModule) { 'use strict'; // @ngInject function Modal ($compile, $rootScope, $firebaseArray, User, _) { var el; var oldTopic; var scope; return { open, close, destroy }; function open (topic, council, title) { if (topic !== oldTopic) { destroy(); $rootScope.isLoading = true; scope = $rootScope.$new(); scope.title = title; User.get().then(user => { scope.user = user; var ref = new Firebase(`https://councilsapp.firebaseio.com/${user.homeUnitNbr}/${council}/threads/${topic}`); $firebaseArray(ref.orderByChild('date')).$loaded() .then((resp) => { scope.chats = resp; $rootScope.isLoading = false; }); el = $compile(require('./modal.html'))(scope); el.appendTo(document.body); setTimeout(scroll, 250); var target = el.find('.message-input-contianer'); el.find('.chats').scroll(_.throttle(function () { if (this.scrollTop + $(this).innerHeight() >= this.scrollHeight) { target.removeClass('md-whiteframe-z3'); } else { target.addClass('md-whiteframe-z3'); } }, 100)); }); scope.close = close; scope.send = function (message) { scope.chats.$add({ author: scope.user.uid, authorName: `${scope.user.fname} ${scope.user.lname}`, date: new Date().getTime(), message: message, profileImage: scope.user.profileImage }); scope.message = ''; scroll(); }; } else { el.addClass('open'); } } function close () { el.removeClass('open'); } function destroy () { scope && scope.$destroy(); el && el.remove(); } function scroll () { var chats = el.find('.chats'); chats.animate({ scrollTop: chats.get(0).scrollHeight }, '250', 'swing', angular.noop); } } ngModule.factory('Modal', Modal); };
var crypto = require("crypto") var hmacExpress = require("../index") describe("hmac-express", function() { it("should pass with an empty JSON body", function(done) { var middleware = hmacExpress("sha256", "secret", "token") var hmac = crypto.createHmac("sha256", "secret") var body = {} hmac.update(JSON.stringify(body)) var request = { "body": body, "query": { "token": hmac.digest("hex") } } var response = { sendStatus: function(code) { return done(new Error("Fail with the wrong error code")) } } return middleware(request, response, done) }) it("should pass with a JSON body", function(done) { var middleware = hmacExpress("sha256", "secret", "token") var hmac = crypto.createHmac("sha256", "secret") var body = { "key1": "value1", "Key2": { "key21": "value21", "key22": "value22", } } hmac.update(JSON.stringify(body)) var request = { "body": body, "query": { "token": hmac.digest("hex") } } var response = { sendStatus: function(code) { return done(new Error("Fail with the wrong error code")) } } return middleware(request, response, done) }) it("should not pass if the hmac of the received body is different", function(done) { var middleware = hmacExpress("sha256", "secret", "token") var body = { "key1": "value1", "Key2": { "key21": "value21", "key22": "value22", } } var request = { "body": body, "query": { "token": "wronghmac" } } var response = { sendStatus: function(code) { return done() } } return middleware(request, response, function() { return done(new Error("It should not have passed")) }) }) it("should pass with an empty JSON body with header token", function(done) { var opts = { header: "HMAC" } var middleware = hmacExpress("sha256", "secret", "token", opts) var hmac = crypto.createHmac("sha256", "secret") var body = {} hmac.update(JSON.stringify(body)) var request = { "body": body, "headers": { "HMAC": hmac.digest("hex") } } var response = { sendStatus: function(code) { return done(new Error("Fail with the wrong error code")) } } return middleware(request, response, done) }) it("should pass with a JSON body with header token", function(done) { var opts = { header: "HMAC" } var middleware = hmacExpress("sha256", "secret", "token", opts) var hmac = crypto.createHmac("sha256", "secret") var body = { "key1": "value1", "Key2": { "key21": "value21", "key22": "value22", } } hmac.update(JSON.stringify(body)) var request = { "body": body, "headers": { "HMAC": hmac.digest("hex") } } var response = { sendStatus: function(code) { return done(new Error("Fail with the wrong error code")) } } return middleware(request, response, done) }) it("should not pass if the hmac of the received body is different with header token", function(done) { var opts = { header: "HMAC" } var middleware = hmacExpress("sha256", "secret", "token", opts) var body = { "key1": "value1", "Key2": { "key21": "value21", "key22": "value22", } } var request = { "body": body, "headers": { "HMAC": "wronghmac" } } var response = { sendStatus: function(code) { return done() } } return middleware(request, response, function() { return done(new Error("It should not have passed")) }) }) it("should pass with the header version and a different encoding", function(done) { var opts = { encoding: "base64", header: "HMAC" } var middleware = hmacExpress("sha256", "secret", "token", opts) var hmac = crypto.createHmac("sha256", "secret") var body = { "key1": "value1", "Key2": { "key21": "value21", "key22": "value22", } } hmac.update(JSON.stringify(body)) var request = { "body": body, "headers": { "HMAC": hmac.digest("base64") } } var response = { sendStatus: function(code) { return done(new Error("Fail with the wrong error code")) } } return middleware(request, response, done) }) })
"use strict"; var winston = require('winston'); var dateFormat = require("dateformat"); var fse = require("fs-extra"); var fs = require("fs"); var logDir = "log"; // Or read from a configuration var config = { levels: { error: 0, warn: 1, info: 2, debug: 3, trace: 4, data: 5, verbose: 6, silly: 7 }, colors: { error: 'red', warn: 'yellow', info: 'green', debug: 'cyan', trace: 'grey', data: 'magenta', verbose: 'cyan', silly: 'magenta' } }; if (!fs.existsSync(logDir)) { // Create the directory if it does not exist fs.mkdirSync(logDir); } else { fse.emptyDir(logDir, function (err) { if(err) { console.log(err); } }); } /** * [exports description] * @method exports * @param {[type]} fileName [description] * @return {[type]} [description] */ module.exports = function logger(fileName) { var packageName = fileName.slice(fileName.indexOf("hourglass")+10, -3).replace("/",".") var l = new(winston.Logger)({ transports: [ new winston.transports.Console({ name: "console", colorize: "all", timestamp: function() { return "" + dateFormat(new Date(), "yyyy-mm-dd h:MM:ss.l") + "" }, formatter: function(options) { // Return string will be passed to logger. var message = options.timestamp() + ' [' + options.level.toUpperCase() + '] ' + packageName + ' - ' + (undefined !== options.message ? options.message : '') + (options.meta && Object.keys(options.meta).length ? '\n\t' + JSON.stringify(options.meta) : ''); return winston.config.colorize(options.level, message); } }), new winston.transports.File({ name: "all", filename: logDir + "/app-all.log", maxsize: 1024 * 1024 * 10, // 10MB json: false, timestamp: function() { return "[" + dateFormat(new Date(), "yyyy-mm-dd h:MM:ss.l") + "]" }, formatter: function(options) { // Return string will be passed to logger. var message = options.timestamp() + ' [' + options.level.toUpperCase() + '] '+ packageName + ' - ' + (undefined !== options.message ? options.message : '') + (options.meta && Object.keys(options.meta).length ? '\n\t' + JSON.stringify(options.meta) : ''); return message; }, level: "trace" }), new winston.transports.File({ name: "app", filename: logDir + "/app.log", maxsize: 1024 * 1024 * 10, // 10MB json: false, timestamp: function() { return "[" + dateFormat(new Date(), "yyyy-mm-dd h:MM:ss.l") + "]" }, formatter: function(options) { // Return string will be passed to logger. var message = options.timestamp() + ' [' + options.level.toUpperCase() + '] '+ packageName + ' - ' + (undefined !== options.message ? options.message : '') + (options.meta && Object.keys(options.meta).length ? '\n\t' + JSON.stringify(options.meta) : ''); return message; } }) ], levels: config.levels, colors: config.colors }); l.level="trace"; return l; };
module.exports = { input: './src/commands.js', output: [{ file: 'dist/index.js', format: 'cjs', sourcemap: true }, { file: 'dist/index.es.js', format: 'es', sourcemap: true }], plugins: [require('@rollup/plugin-buble')()], external(id) { return id[0] != "." && !require("path").isAbsolute(id) } }
var express = require('express') , path = require('path') , favicon = require('serve-favicon') , logger = require('morgan') , cookieParser = require('cookie-parser') , bodyParser = require('body-parser') , methodOverride = require('method-override') , MongoClient = require('mongodb').MongoClient , multer = require('multer') , session = require('express-session') , sessionStore = require('sessionstore') , genUuid = require('./helper/genUuid.js') , swig = require('swig') , extras = require('swig-extras') , url = require('url') , redis = require('redis') , moment = require('moment') , ua = require('universal-analytics'); var routes = require('./routes'); var app = express(); MongoClient.connect(process.env.MONGOLAB_URI || 'mongodb://localhost:27017/blog', function (err, db) { "use strict"; if (err) throw err; var redisURL = url.parse(process.env.REDISCLOUD_URL || 'redis://localhost:6379'); var client = redis.createClient(redisURL.port, redisURL.hostname, {no_ready_check: true}); if (redisURL.auth) { client.auth(redisURL.auth.split(":")[1]); } // view engine setup app.set('views', path.join(__dirname, 'views')); //app.set('view engine', 'jade'); app.engine('swig', swig.renderFile); app.set('view engine', 'swig'); swig.setFilter('length', function(input) { if( Object.prototype.toString.call( input ) === '[object Array]' ) { return input.length; } }); swig.setFilter('moment', function(input) { return moment(input).fromNow(); }); extras.useFilter(swig, 'markdown'); app.use(ua.middleware('UA-60346132-1', {cookieName: '_ga'})); //app.use(robots(__dirname + '/robots.txt')); // uncomment after placing your favicon in /public //app.use(favicon(__dirname + '/public/favicon.ico')); app.use(logger('dev')); app.use(methodOverride("_method")); //app.use(methodOverride(function(req, res){ // if (req.body && typeof req.body === 'object' && '_method' in req.body) { // // look in urlencoded POST bodies and delete it // var method = req.body._method; // delete req.body._method; // return method; // } //})); app.use(session({ genid: function (req) { return genUuid(); // use UUIDs for session IDs }, secret: process.env.SESSION_SECRET || 'hello world', name: "tiny_cookie", store: sessionStore.createSessionStore(process.env.REDISCLOUD_URL?{url:process.env.REDISCLOUD_URL}: { type: 'redis', host: 'localhost', // optional port: 6379, // optional prefix: 'sess', // optional ttl: 804600, // optional timeout: 10000 // optional }), resave: true, saveUninitialized: true })); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({extended: false})); app.use(cookieParser()); app.use(multer({ dest: './uploads/', rename: function (fieldname, filename) { return filename.replace(/\W+/g, '-').toLowerCase() + Date.now() }, limits: { fieldNameSize: 50, fieldSize: 4000000, files: 2, fields: 10 } })); app.use(express.static(path.join(__dirname, 'public'))); app.use(function(req, res, next){ req.visitor.pageview(req.originalUrl).send(); next(); }); // Application routes routes(app, db); // catch 404 and forward to error handler app.use(function (req, res, next) { var err = new Error('Not Found'); err.status = 404; next(err); }); // error handlers // development error handler // will print stacktrace if (app.get('env') === 'development') { app.set('view cache', false); swig.setDefaults({cache: false}); app.use(function (err, req, res, next) { console.error(err.message); console.error(err.stack); res.status(err.status || 500); res.render('error_template', { title: 'Internal error', message: err.message, error: err }); }); } // production error handler // no stacktraces leaked to user app.use(function (err, req, res, next) { res.status(err.status || 500); res.render('error_template', { message: err.message, error: {} }); }); }); module.exports = app;
(function () { 'use strict'; /** * This module provides some directives to display various charts. */ angular.module('foodstats.charts', ['foodstats.stats']); })();
'use strict'; module.exports = { mongo: { uri: 'mongodb://localhost/tweeder-dev' } }
module.exports = function testSample(superagent){ var res = superagent.get("http://darkboxjs.com").end(); res.status.should.equal(200); res = superagent.get("http://ampplifyng.ampplify.com").end(); res.status.should.equal(200); };
(function(angular) { 'use strict'; //--------------------------CONTROLLER START----------------------------------------- function EditOrderModalController($state, $http) { var ctrl = this; ctrl.init = function() { ctrl.productDetail = (ctrl.resolve && ctrl.resolve.details) || {}; ctrl.selectedProduct = { productInfo: '', price: 0, quantity: 0 }; $http({ url: "purchaser/getPurchasingRelatedInfo", method: "GET", }).then(function(response) { if (response.data && response.data.result && response.data.result.message) { ctrl.allProductsInfo = response.data.result.message.warehouseItems; } }).catch(function(err) { console.log("error while getting data in get purchaser info"); console.log(err); }) }; ctrl.addProduct = function() { //calculate total price ctrl.selectedProduct.totalPrice = parseToNumber(ctrl.selectedProduct.price) * parseToNumber(ctrl.selectedProduct.quantity); // push to array ctrl.productDetail.order_items.push(angular.copy(ctrl.selectedProduct)); ctrl.productDetail.billAmt += ctrl.selectedProduct.totalPrice; // initialise selected product ctrl.selectedProduct = { productInfo: '', price: 0, quantity: 0 }; }; ctrl.deleteProduct = function(index) { ctrl.productDetail.billAmt -= ctrl.productDetail.order_items[index].totalPrice; ctrl.productDetail.order_items.splice(index, 1); if (isNaN(ctrl.productDetail.billAmt)) { ctrl.productDetail.billAmt = 0; } }; ctrl.onSelectItem = function(item, model) { // Add 2 properties to selected item. item.quantity = 0; item.price = 0; ctrl.selectedProduct = angular.copy(item); } ctrl.cancelBtn = function() { ctrl.modalInstance.close({ action: 'update' }); }; ctrl.init(); //-------------------------------CONTROLLER END----------------------------------- } angular.module('editOrderModalModule') .component('editOrderModalComponent', { templateUrl: 'commonModals/edit-order-modal/edit-order-modal.template.html', controller: ['$state', '$http', EditOrderModalController], bindings: { modalInstance: '<', resolve: '<' } }); })(window.angular);
const mongoose = require('mongoose'); const ObjectId = mongoose.Schema.Types.ObjectId; let roleSchema = mongoose.Schema({ name: {type: String, required: true, unique: true}, users: [{type: ObjectId, ref: 'User'}] }); const Role = mongoose.model('Role', roleSchema); module.exports = Role; module.exports.iniialize = () => { Role.findOne({name: 'User'}).then(role => { if(!role){ Role.create({name: 'User'}); } }); Role.findOne({name: 'Admin'}).then(role => { if(!role){ Role.create({name: 'Admin'}); } }); };
var NAVTREEINDEX9 = { "struct_tempest_1_1_abstract_texture_1_1_clamp_mode.html#a48849804d7d26fa1588769fca3128b17a834560727b419849570a2d47a3ddadc5":[1,0,0,14,0,0,5], "struct_tempest_1_1_abstract_texture_1_1_clamp_mode.html#a48849804d7d26fa1588769fca3128b17aa919b17ebfa814e7946573ca9c45a99f":[1,0,0,14,0,0,4], "struct_tempest_1_1_abstract_texture_1_1_clamp_mode.html#a48849804d7d26fa1588769fca3128b17ae6ea4c7a2b62181edac89aefc6ca3266":[1,0,0,14,0,0,3], "struct_tempest_1_1_abstract_texture_1_1_clamp_mode.html#a48849804d7d26fa1588769fca3128b17ae84a663783844b63d0d994864cd97772":[1,0,0,14,0,0,1], "struct_tempest_1_1_abstract_texture_1_1_filter_type.html":[1,0,0,14,1], "struct_tempest_1_1_abstract_texture_1_1_filter_type.html#aa28dcbdc63244fe43cfb7258f6996978":[1,0,0,14,1,0], "struct_tempest_1_1_abstract_texture_1_1_filter_type.html#aa28dcbdc63244fe43cfb7258f6996978a045ff1a08bf815cbf4a46e9da4a8c506":[1,0,0,14,1,0,1], "struct_tempest_1_1_abstract_texture_1_1_filter_type.html#aa28dcbdc63244fe43cfb7258f6996978a484d5ec433c09e3e650a5edbb354df06":[1,0,0,14,1,0,0], "struct_tempest_1_1_abstract_texture_1_1_filter_type.html#aa28dcbdc63244fe43cfb7258f6996978a9d8f7121f7130f9bc78c4017e8c6962f":[1,0,0,14,1,0,2], "struct_tempest_1_1_abstract_texture_1_1_format.html":[1,0,0,14,2], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3":[1,0,0,14,2,0], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a0c1bde680ffaf4e2fa0c3c7561a1b962":[1,0,0,14,2,0,0], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a0d2f4fd57393fcfd9b4a8c177b7f11a7":[1,0,0,14,2,0,20], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a0df6a7f2778f0d1e72398bc5688fc08e":[1,0,0,14,2,0,2], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a1c7981ce007c3dd1040b3100d6ecb970":[1,0,0,14,2,0,25], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a2819ceeaffc8945bf216754ddca1adcd":[1,0,0,14,2,0,24], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a33bedb87907ce0e45f55f416cb1037eb":[1,0,0,14,2,0,12], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a3f2092da0de5e9b58aca6c020ab3e4f2":[1,0,0,14,2,0,18], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a4045f5f0b8cc8330a4edf915b6ebcb90":[1,0,0,14,2,0,13], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a45b04ce619af0c01c0818898ed054bfd":[1,0,0,14,2,0,16], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a476c52aeaaf2aa76078e188ec16e08c5":[1,0,0,14,2,0,19], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a4fa27e1bcab97be923670a55938be530":[1,0,0,14,2,0,21], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a5d153248f71c04e3af9210cc2b7d0c21":[1,0,0,14,2,0,5], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a5d235b8e0b6a200b83e016da56bf802f":[1,0,0,14,2,0,1], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a6fe3dc6af81c7e1c60997ad3ea13de10":[1,0,0,14,2,0,11], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a7cc9041c457390e313cf3e406069a6c5":[1,0,0,14,2,0,14], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a8a7be0e89822f1ecf210a02895350eb4":[1,0,0,14,2,0,6], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a91e277d1f41040d2df97f508eaa279e3":[1,0,0,14,2,0,3], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3a946252d601823c5d4091f3714412b7bc":[1,0,0,14,2,0,10], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3ab18692a6e5b0001865c4742b9b64e942":[1,0,0,14,2,0,8], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3acbd84ea9300f70cd2b32181054adef91":[1,0,0,14,2,0,4], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3accd652c52dc3261d726d0c5beab64a51":[1,0,0,14,2,0,26], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3ad22db84436ec7af766ddd5ba2ab9ab5e":[1,0,0,14,2,0,22], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3ad7e045abfc51ec0773363983941c8ce6":[1,0,0,14,2,0,15], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3adb6217acfadedb9f937e47bd67738c47":[1,0,0,14,2,0,23], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3ae013b89cb600443294b3d81ab41de469":[1,0,0,14,2,0,9], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3ae45e520901caf059f0be8798dae0f94f":[1,0,0,14,2,0,17], "struct_tempest_1_1_abstract_texture_1_1_format.html#a231a1f516e53783bf72c713669b115b3af904f4518899abf604cba93a3bd3233a":[1,0,0,14,2,0,7], "struct_tempest_1_1_abstract_texture_1_1_input_format.html":[1,0,0,14,3], "struct_tempest_1_1_abstract_texture_1_1_input_format.html#a76bada4dfe78209969b1e3e232e34279":[1,0,0,14,3,0], "struct_tempest_1_1_abstract_texture_1_1_input_format.html#a76bada4dfe78209969b1e3e232e34279a16af6a2093d2da0b2345203924a97371":[1,0,0,14,3,0,1], "struct_tempest_1_1_abstract_texture_1_1_input_format.html#a76bada4dfe78209969b1e3e232e34279a3041e11821775613e805fa13d5dedde8":[1,0,0,14,3,0,4], "struct_tempest_1_1_abstract_texture_1_1_input_format.html#a76bada4dfe78209969b1e3e232e34279a882fbbe83a12800d82b192414bf5db28":[1,0,0,14,3,0,3], "struct_tempest_1_1_abstract_texture_1_1_input_format.html#a76bada4dfe78209969b1e3e232e34279a8d11e6c04dc1af7a7d1ae009906bb92f":[1,0,0,14,3,0,2], "struct_tempest_1_1_abstract_texture_1_1_input_format.html#a76bada4dfe78209969b1e3e232e34279aefeec65019a14e12bdbb3d7e7cd325d3":[1,0,0,14,3,0,0], "struct_tempest_1_1_default_vertex.html":[1,0,0,26], "struct_tempest_1_1_default_vertex.html#a278b01a1f12f06738316e40d9d581654":[1,0,0,26,0], "struct_tempest_1_1_default_vertex.html#a5c3453b0bdcce1a3d3df5c2e87a1f600":[1,0,0,26,1], "struct_tempest_1_1_default_vertex.html#a6c1096452227831b528435826d6504fa":[1,0,0,26,3], "struct_tempest_1_1_default_vertex.html#aafbb820438e460f97795b61b06544734":[1,0,0,26,5], "struct_tempest_1_1_default_vertex.html#ac210e2340b4cfc33aa6bb9bf1a3f5a7c":[1,0,0,26,4], "struct_tempest_1_1_default_vertex.html#aef4584913c4200eeb5ba513d2df19a48":[1,0,0,26,2], "struct_tempest_1_1_e_t_c_codec.html":[1,0,0,34], "struct_tempest_1_1_e_t_c_codec.html#a1b1ad7fdfa650b2adcd73699229f9a28":[1,0,0,34,1], "struct_tempest_1_1_e_t_c_codec.html#a23984f355a74c55ccc1ab5ca16753a70":[1,0,0,34,5], "struct_tempest_1_1_e_t_c_codec.html#a74adf3da0f09b8e9c2a74489f9f80eb4":[1,0,0,34,2], "struct_tempest_1_1_e_t_c_codec.html#a788246dde3e239ba90bd2c4a4bcfcd87":[1,0,0,34,3], "struct_tempest_1_1_e_t_c_codec.html#a7d9e449546e9b48e9395e2c0486b97e8":[1,0,0,34,4], "struct_tempest_1_1_e_t_c_codec.html#a991d41163b4d1ec924d02173831c7c21":[1,0,0,34,6], "struct_tempest_1_1_e_t_c_codec.html#ae2eeeed6b15cd0867f132828e74904d5":[1,0,0,34,0], "struct_tempest_1_1_font_element_1_1_free_type_lib.html":[1,0,0,38,0], "struct_tempest_1_1_font_element_1_1_free_type_lib.html#a2cfb32d5922294621574e9d1378f5c10":[1,0,0,38,0,1], "struct_tempest_1_1_font_element_1_1_free_type_lib.html#a3ce44dd439db0a579f24a4d29d45b5de":[1,0,0,38,0,4], "struct_tempest_1_1_font_element_1_1_free_type_lib.html#a58d3ddc5dc093eafa5a98d8be01bd8d7":[1,0,0,38,0,5], "struct_tempest_1_1_font_element_1_1_free_type_lib.html#abe53b2340b7ad4b1a292a3b88ba1b24e":[1,0,0,38,0,3], "struct_tempest_1_1_font_element_1_1_free_type_lib.html#aced16c0b7626842c3ba5be71d0062e2b":[1,0,0,38,0,2], "struct_tempest_1_1_font_element_1_1_free_type_lib.html#adbcab89ca23c9654778e223347741f20":[1,0,0,38,0,0], "struct_tempest_1_1_font_element_1_1_letter.html":[1,0,0,38,1], "struct_tempest_1_1_font_element_1_1_letter.html#a1d750a9243d7b789a120dd2e47d4e92c":[1,0,0,38,1,2], "struct_tempest_1_1_font_element_1_1_letter.html#a628edad2f210cc4a8f1e09b7f459adab":[1,0,0,38,1,0], "struct_tempest_1_1_font_element_1_1_letter.html#ac12348263fa0f19dd21740c2f8a1d6dc":[1,0,0,38,1,3], "struct_tempest_1_1_font_element_1_1_letter.html#ad8d38c1fdf898e1086170ed1b1c13219":[1,0,0,38,1,1], "struct_tempest_1_1_font_element_1_1_letter_geometry.html":[1,0,0,38,2], "struct_tempest_1_1_font_element_1_1_letter_geometry.html#a0c5fbd0081070532f3becaf600c4efc6":[1,0,0,38,2,2], "struct_tempest_1_1_font_element_1_1_letter_geometry.html#a156ef7720039e8af14e8d395779e3e2c":[1,0,0,38,2,0], "struct_tempest_1_1_font_element_1_1_letter_geometry.html#af82814ba2b9ab2a1dcb0e093abb9a4e3":[1,0,0,38,2,1], "struct_tempest_1_1_graphics_subsystem_1_1_delete_event.html":[1,0,0,43,0], "struct_tempest_1_1_graphics_subsystem_1_1_delete_event.html#a129f5428efc46d3b5469d69179b6882e":[1,0,0,43,0,4], "struct_tempest_1_1_graphics_subsystem_1_1_delete_event.html#a2b959758eac95621a56ff65d4296690e":[1,0,0,43,0,5], "struct_tempest_1_1_graphics_subsystem_1_1_delete_event.html#a6fdfa31d79f3b45c953e11d4c2111c97":[1,0,0,43,0,0], "struct_tempest_1_1_graphics_subsystem_1_1_delete_event.html#abaef5a73c069e9cde25dc8e576ee4ff0":[1,0,0,43,0,3], "struct_tempest_1_1_graphics_subsystem_1_1_delete_event.html#ada17db211c16654d2bd921568734a4ce":[1,0,0,43,0,1], "struct_tempest_1_1_graphics_subsystem_1_1_delete_event.html#aef96cac721851095e66af4a82283d0c2":[1,0,0,43,0,2], "struct_tempest_1_1_graphics_subsystem_1_1_event.html":[1,0,0,43,1], "struct_tempest_1_1_graphics_subsystem_1_1_event.html#a6f95f8855a6d2008b6988aa941ecee20":[1,0,0,43,1,2], "struct_tempest_1_1_graphics_subsystem_1_1_event.html#ab45be1c9feb60b9660d597704296b300":[1,0,0,43,1,1], "struct_tempest_1_1_graphics_subsystem_1_1_event.html#aee9c81a4df7bf24670fbec79fc13054d":[1,0,0,43,1,0], "struct_tempest_1_1_graphics_subsystem_1_1_event.html#aee9c81a4df7bf24670fbec79fc13054da32fef920f5141c583a0192f3d7d04e5d":[1,0,0,43,1,0,1], "struct_tempest_1_1_graphics_subsystem_1_1_event.html#aee9c81a4df7bf24670fbec79fc13054da385304d774f635be40209d8afda2386a":[1,0,0,43,1,0,2], "struct_tempest_1_1_graphics_subsystem_1_1_event.html#aee9c81a4df7bf24670fbec79fc13054daaeebaee15a70b7270c8ad9a377a4a968":[1,0,0,43,1,0,0], "struct_tempest_1_1_jpeg_codec.html":[1,0,0,54], "struct_tempest_1_1_jpeg_codec.html#a4fe73b181a7a014c2999d8394571bcb8":[1,0,0,54,1], "struct_tempest_1_1_jpeg_codec.html#a7576d26fb5317e1315b93a1398daa7d2":[1,0,0,54,0], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed.html":[1,0,0,64,0], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed.html#a19f0314c767b5bbb0e24cd2e3c8e6b2b":[1,0,0,64,0,1], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed.html#a1f81bf6a9b1e189b681529b110f859c4":[1,0,0,64,0,2], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed.html#aa2dd2d32b9bbe891b19069f37581e685":[1,0,0,64,0,0], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed_data.html":[1,0,0,64,1], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed_data.html#a225a995fda4f6b25c9587badd0091394":[1,0,0,64,1,2], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed_data.html#a2bca51017688a8138fcf1fd018304cbf":[1,0,0,64,1,1], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed_data.html#aa738b06aa07f1ac9376b798a320a8af9":[1,0,0,64,1,0], "struct_tempest_1_1_local_buffer_holder_1_1_non_freed_data.html#abf136df1921b63bdbb6991ecd078b43e":[1,0,0,64,1,3], "struct_tempest_1_1_local_index_buffer_holder.html":[1,0,0,65], "struct_tempest_1_1_local_index_buffer_holder.html#a01d676ad9db9970fa922977bfd1e0087":[1,0,0,65,1], "struct_tempest_1_1_local_index_buffer_holder.html#af1bf04b8bd1c84d75b1f5615edd7ca2f":[1,0,0,65,0], "struct_tempest_1_1_local_object_pool.html":[1,0,0,66], "struct_tempest_1_1_local_object_pool.html#a0b5268a404a26369995a1fc4c5854f0d":[1,0,0,66,4], "struct_tempest_1_1_local_object_pool.html#a18031e65d9cc5c8dcd8a99ca169b8c04":[1,0,0,66,8], "struct_tempest_1_1_local_object_pool.html#a363032b3e443e23b1c94abb40f235cc9":[1,0,0,66,3], "struct_tempest_1_1_local_object_pool.html#a46b6e648c635ad2bdaf583320eb70580":[1,0,0,66,1], "struct_tempest_1_1_local_object_pool.html#a48f43366a7dc644e143cc421200dff65":[1,0,0,66,7], "struct_tempest_1_1_local_object_pool.html#a634f468ff129b248d54110c90df1d182":[1,0,0,66,5], "struct_tempest_1_1_local_object_pool.html#aa20a6aceda78b2a04fb0317c8ea8e920":[1,0,0,66,0], "struct_tempest_1_1_local_object_pool.html#aa4a385a2d4a190e1644e4a38a057efb1":[1,0,0,66,6], "struct_tempest_1_1_local_object_pool.html#ae741384b5203be69c6aefbdd20db7592":[1,0,0,66,2], "struct_tempest_1_1_local_vertex_buffer_holder.html":[1,0,0,68], "struct_tempest_1_1_local_vertex_buffer_holder.html#a71a00f8126b77f10b2c4f8f922125c21":[1,0,0,68,1], "struct_tempest_1_1_local_vertex_buffer_holder.html#a8e2a56359037c2103e5fa33aae54ee4c":[1,0,0,68,0], "struct_tempest_1_1_margin.html":[1,0,0,70], "struct_tempest_1_1_margin.html#a0bdd9013a034d4195d57507c403eac17":[1,0,0,70,4], "struct_tempest_1_1_margin.html#a1999979213549ef3a5e0dd736dc4c1e5":[1,0,0,70,5], "struct_tempest_1_1_margin.html#a2bcd64543e40c960b929397ef5f18782":[1,0,0,70,6], "struct_tempest_1_1_margin.html#a2e37426df7b0952b87ec7cbd806f53a3":[1,0,0,70,0], "struct_tempest_1_1_margin.html#a78ec30d6c9134c6341cb14b7d3c83324":[1,0,0,70,3], "struct_tempest_1_1_margin.html#a998db39c64860a9eb40186e372d453f1":[1,0,0,70,1], "struct_tempest_1_1_margin.html#abaff18479d576dbeb30a60ea05b0ecb0":[1,0,0,70,2], "struct_tempest_1_1_margin.html#adbd8d586231f72200134d779bcd35730":[1,0,0,70,7], "struct_tempest_1_1_menu_1_1_declarator.html":[0,1,12,0], "struct_tempest_1_1_menu_1_1_declarator.html#a205e4e1c0962ffb32e4bf3573638cb05":[0,1,12,0,2], "struct_tempest_1_1_menu_1_1_declarator.html#a38b2a6284b2074957259044815ebefce":[0,1,12,0,3], "struct_tempest_1_1_menu_1_1_declarator.html#a834cec0fab7efabab3cd53540e4d466d":[0,1,12,0,4], "struct_tempest_1_1_menu_1_1_declarator.html#acf3e3071c4ce32d3ee8598f4adebea4a":[0,1,12,0,1], "struct_tempest_1_1_menu_1_1_declarator.html#afd47e5f72223f91da2d310fec868174a":[0,1,12,0,0], "struct_tempest_1_1_menu_1_1_item.html":[0,1,12,2], "struct_tempest_1_1_menu_1_1_item.html#a3ae0c0556c8dc871ce9b41f2d1e8b3ef":[0,1,12,2,2], "struct_tempest_1_1_menu_1_1_item.html#abc38301f86a4117dff0083a8bdba39b7":[0,1,12,2,1], "struct_tempest_1_1_menu_1_1_item.html#ac61cb0eb27e6f255daa96cb54338c860":[0,1,12,2,3], "struct_tempest_1_1_menu_1_1_item.html#ad26215e50c771483d0611d973f548ddb":[0,1,12,2,0], "struct_tempest_1_1_menu_1_1_item_button.html":[0,1,12,3], "struct_tempest_1_1_menu_1_1_item_button.html#a4f6c7c72f66ff95c9b726b98c9d8a303":[0,1,12,3,0], "struct_tempest_1_1_menu_1_1_item_button.html#a7c067d62ae2c16936df97426b3dda89f":[0,1,12,3,2], "struct_tempest_1_1_menu_1_1_item_button.html#ad277440b337ed8229b372ee4f3fa5f0e":[0,1,12,3,1], "struct_tempest_1_1_model_bounds.html":[1,0,0,76], "struct_tempest_1_1_model_bounds.html#a00509ae595f949dfa95b06d9ad1659a4":[1,0,0,76,1], "struct_tempest_1_1_model_bounds.html#a870dc0c987a754fd7fc71655eefc260d":[1,0,0,76,3], "struct_tempest_1_1_model_bounds.html#a87238daa9fe16c0bb5302ab2b643bdcd":[1,0,0,76,0], "struct_tempest_1_1_model_bounds.html#a88cc5797a42f0c8430cb25d1551f90aa":[1,0,0,76,4], "struct_tempest_1_1_model_bounds.html#aad397bf697ee2d0a7b51357740f8dfbf":[1,0,0,76,2], "struct_tempest_1_1_model_bounds.html#afcd0da5fe0be8195f184db02ec351500":[1,0,0,76,5], "struct_tempest_1_1_opengl2x_1_1_impl_device.html":[1,0,0,79,0], "struct_tempest_1_1_opengl2x_1_1_impl_device.html#a1d7bb342ef8b052f06df6b1c7e473ae6":[1,0,0,79,0,0], "struct_tempest_1_1_opengl2x_1_1_impl_device.html#acaeec42da61ce0ef90dd1ad74937d69f":[1,0,0,79,0,1], "struct_tempest_1_1_pixmap_1_1_img_info.html":[1,0,0,89,0], "struct_tempest_1_1_pixmap_1_1_img_info.html#a39a853c8bb323aebf4c007aaab4f29d4":[1,0,0,89,0,2], "struct_tempest_1_1_pixmap_1_1_img_info.html#a3ac71c6e52c4c869778e347f01c83437":[1,0,0,89,0,1], "struct_tempest_1_1_pixmap_1_1_img_info.html#a4b773c6cfce7063bd6dec9689e8783ff":[1,0,0,89,0,6], "struct_tempest_1_1_pixmap_1_1_img_info.html#a65d38b8faed2ace2f29bdc6d0a9e0192":[1,0,0,89,0,5], "struct_tempest_1_1_pixmap_1_1_img_info.html#aa47b583611f1474f19d9d78a3012409a":[1,0,0,89,0,0], "struct_tempest_1_1_pixmap_1_1_img_info.html#aae2b042545b3eeb3ea26c754bd3746d4":[1,0,0,89,0,3], "struct_tempest_1_1_pixmap_1_1_img_info.html#ae2d796b27cfcc35d10e500894464bde5":[1,0,0,89,0,4], "struct_tempest_1_1_pixmap_1_1_pixel.html":[1,0,0,89,2], "struct_tempest_1_1_pixmap_1_1_pixel.html#a436223a21c8b5a4227dff94e9fc19935":[1,0,0,89,2,2], "struct_tempest_1_1_pixmap_1_1_pixel.html#a5d3adcd71ace8b04408ad8b724a5b723":[1,0,0,89,2,6], "struct_tempest_1_1_pixmap_1_1_pixel.html#a7c5eb2499d14d0bdf096a9ce93dc9a06":[1,0,0,89,2,0], "struct_tempest_1_1_pixmap_1_1_pixel.html#a89bf26c917c3f7b4478b354c9cecbc04":[1,0,0,89,2,5], "struct_tempest_1_1_pixmap_1_1_pixel.html#a9ecc23e81e98249771c87243db138d26":[1,0,0,89,2,3], "struct_tempest_1_1_pixmap_1_1_pixel.html#add033d88aebd7318ccf6bcf531dd4f15":[1,0,0,89,2,1], "struct_tempest_1_1_pixmap_1_1_pixel.html#aedad6b6d306cf608f9a4dfeae7025033":[1,0,0,89,2,4], "struct_tempest_1_1_png_codec.html":[1,0,0,90], "struct_tempest_1_1_png_codec.html#a54433332c55ab6233abc8f1f903bdffd":[1,0,0,90,3], "struct_tempest_1_1_png_codec.html#a60c5f8fd5acbef99b3b13607278a12fa":[1,0,0,90,0], "struct_tempest_1_1_png_codec.html#a88a729010aba234d83a3b8f06d260606":[1,0,0,90,2], "struct_tempest_1_1_png_codec.html#a8964fcad5ad0a258d6da7abae6223a40":[1,0,0,90,5], "struct_tempest_1_1_png_codec.html#ac9831c08784090193b72107ba1195ac4":[1,0,0,90,4], "struct_tempest_1_1_png_codec.html#af48c1ee1192accaadf4266caa3889dee":[1,0,0,90,1], "struct_tempest_1_1_point.html":[1,0,0,91], "struct_tempest_1_1_point.html#a112af79292ca9dce2281f71fab053db8":[1,0,0,91,14], "struct_tempest_1_1_point.html#a375d1b2c760f69c5824f274fbd76c739":[1,0,0,91,0], "struct_tempest_1_1_point.html#a396457f168b4f246793db5a2c8a83e5a":[1,0,0,91,25], "struct_tempest_1_1_point.html#a3a6e3ab3998a4e26c11736cbdbc832ac":[1,0,0,91,3], "struct_tempest_1_1_point.html#a4149556fe54a3721050ed1eb694bdd38":[1,0,0,91,8], "struct_tempest_1_1_point.html#a4218ebbe1cc5d02a823c49e3fc9c0703":[1,0,0,91,10], "struct_tempest_1_1_point.html#a4509b187170ddb4ba1c4ff0b4aeb74b3":[1,0,0,91,24], "struct_tempest_1_1_point.html#a46baab5a7295a52a4c456dd7128dd83b":[1,0,0,91,23], "struct_tempest_1_1_point.html#a47f4b05e7f6c41a1715c5fadecddf496":[1,0,0,91,4], "struct_tempest_1_1_point.html#a50e711a97d1381bf7e52a803348b947f":[1,0,0,91,1], "struct_tempest_1_1_point.html#a608d6b900e55e5be5fa08a35c078452f":[1,0,0,91,18], "struct_tempest_1_1_point.html#a6cfbc8ad8cc0827964836aa181ead980":[1,0,0,91,9], "struct_tempest_1_1_point.html#a6f4e0cc2da33daea13c1629f2d41de37":[1,0,0,91,5], "struct_tempest_1_1_point.html#a76a74c2785641000da6d72df93941a40":[1,0,0,91,6], "struct_tempest_1_1_point.html#a906e48aac86287fcf04d98bbde65c8f3":[1,0,0,91,2], "struct_tempest_1_1_point.html#a90aaf8c3fd2849d611be57bf9fa10513":[1,0,0,91,16], "struct_tempest_1_1_point.html#a9c29cd36d1ce448b8e1e56a204fe2b95":[1,0,0,91,21], "struct_tempest_1_1_point.html#aab678c11c26f0bc27eb0b192ff9585b8":[1,0,0,91,19], "struct_tempest_1_1_point.html#ac0a695b300232f6aaf931556710874cd":[1,0,0,91,13], "struct_tempest_1_1_point.html#ac5f5b327959928ddd2cc0f5b1d20e79f":[1,0,0,91,22], "struct_tempest_1_1_point.html#acfcd6a9569bb742b6cd78be6f40ec0ce":[1,0,0,91,17], "struct_tempest_1_1_point.html#adc560428e2abef43e2f4db098d53ba4d":[1,0,0,91,7], "struct_tempest_1_1_point.html#adf8c8346ffa7c1c14d79f95a8e66f110":[1,0,0,91,15], "struct_tempest_1_1_point.html#ae25b726a057b78fd66bdf470b2c79f44":[1,0,0,91,11], "struct_tempest_1_1_point.html#ae4ec92b14e766b962f09000aff318f48":[1,0,0,91,12], "struct_tempest_1_1_point.html#afffb629e64258a64a5636db01bb38ae8":[1,0,0,91,20], "struct_tempest_1_1_raw_model.html":[1,0,0,92], "struct_tempest_1_1_raw_model.html#a5099dddfa1a1f751d61158bc3c6f7714":[1,0,0,92,2], "struct_tempest_1_1_raw_model.html#a67323c8e47d3d1437680b139578aa7d2":[1,0,0,92,4], "struct_tempest_1_1_raw_model.html#a7f0fc6f70e5ba4a9fc880e4ffc40445f":[1,0,0,92,3], "struct_tempest_1_1_raw_model.html#a86202cf14076674f1b43e84a3af9d0e0":[1,0,0,92,0], "struct_tempest_1_1_raw_model.html#a8723fca6b296fd8d5dd134b6d4e63904":[1,0,0,92,1], "struct_tempest_1_1_raw_model.html#ac643df7fe248d09c0981f69610e55904":[1,0,0,92,5], "struct_tempest_1_1_raw_model.html#ae8d86fdbb59d55f01613048c6e7f238c":[1,0,0,92,6], "struct_tempest_1_1_raw_model.html#affff92b50950fa2105174f9dbe832a56":[1,0,0,92,7], "struct_tempest_1_1_rect.html":[1,0,0,93], "struct_tempest_1_1_rect.html#a00ccbcfa190aa9e8373dca5578e4e065":[1,0,0,93,3], "struct_tempest_1_1_rect.html#a08cf278c090cd5233dbadf3d7feedb2e":[1,0,0,93,5], "struct_tempest_1_1_rect.html#a0dce0d564123d4cda29231e9d7dc1c5b":[1,0,0,93,4], "struct_tempest_1_1_rect.html#a1f56342732d82b38285c50639c15b22d":[1,0,0,93,10], "struct_tempest_1_1_rect.html#a213c7b4f66ea6890bad0e23235c1fcc7":[1,0,0,93,16], "struct_tempest_1_1_rect.html#a3adeb73a39f0d4ff2a561e24eb1cfe6f":[1,0,0,93,13], "struct_tempest_1_1_rect.html#a3df8ac91f4b3c71a598303a94e933e01":[1,0,0,93,11], "struct_tempest_1_1_rect.html#a43f0e9ded9e0c27b5af5d02c12b23115":[1,0,0,93,9], "struct_tempest_1_1_rect.html#a544d19a9a366a74df336c6a075ef43f1":[1,0,0,93,14], "struct_tempest_1_1_rect.html#a5829a76fbee1d8e5440913f599a5165a":[1,0,0,93,2], "struct_tempest_1_1_rect.html#a651f18fe8c7254c395ecf2900b7ded77":[1,0,0,93,8], "struct_tempest_1_1_rect.html#a7512224a7b7497d07cce8ae5135a96c9":[1,0,0,93,0], "struct_tempest_1_1_rect.html#aa9e07976dcfe7b8320a239feada0fa03":[1,0,0,93,7], "struct_tempest_1_1_rect.html#aac430cc37dc11e597a2d77588de75bba":[1,0,0,93,6], "struct_tempest_1_1_rect.html#ac65492ed97b665c50bfd4ff46b67effe":[1,0,0,93,12], "struct_tempest_1_1_rect.html#acfef402fb7d00f16b40dffe32a204cd9":[1,0,0,93,1], "struct_tempest_1_1_rect.html#ae23446a02bc24c1f3e1aa034295e2ee2":[1,0,0,93,15], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html":[1,0,0,94,0], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07":[1,0,0,94,0,0], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07a06bf08439b710e3a8e369ba2a4ed5bcf":[1,0,0,94,0,0,4], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07a27cf4cfc5dfd2d260150694e900f6072":[1,0,0,94,0,0,8], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07a41470db50218d06e22da88eca4d938d0":[1,0,0,94,0,0,0], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07a75b039b9c904d15bd9ccb03e8db99234":[1,0,0,94,0,0,9], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07a7befe44784eb0498fa593acf4c3258a4":[1,0,0,94,0,0,6], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07a90f85f8613d04369a7092e5b56f79351":[1,0,0,94,0,0,5], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07aa58d0035ed5df4c5aff6b7192167e9ce":[1,0,0,94,0,0,7], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07ac9eff29973609e7fc1a6031ffc5eeda6":[1,0,0,94,0,0,1], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07acdd1bd2681aa068f852d95461bf6a03d":[1,0,0,94,0,0,3], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07ad364dc9b511ed62105cec260252d08a7":[1,0,0,94,0,0,2], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07aeb624ed74002beb965ae5d2a9a0af7ee":[1,0,0,94,0,0,10], "struct_tempest_1_1_render_state_1_1_alpha_blend_mode.html#afc2bd577f22a371d7b8d953e43b2ac07af0a40b84079b81da9e14388be16c7e74":[1,0,0,94,0,0,11], "struct_tempest_1_1_render_state_1_1_alpha_test_mode.html":[1,0,0,94,1], "struct_tempest_1_1_render_state_1_1_alpha_test_mode.html#adce96ba2d2ef19eacfee189daee26fe9":[1,0,0,94,1,0], "struct_tempest_1_1_render_state_1_1_alpha_test_mode.html#adce96ba2d2ef19eacfee189daee26fe9a0a6d265492332519901db479cc3b8218":[1,0,0,94,1,0,0], "struct_tempest_1_1_render_state_1_1_alpha_test_mode.html#adce96ba2d2ef19eacfee189daee26fe9a22b6ab58425054f484ab48052f8771da":[1,0,0,94,1,0,5], "struct_tempest_1_1_render_state_1_1_alpha_test_mode.html#adce96ba2d2ef19eacfee189daee26fe9a256e83ebc8af3569cb2ced7e4f83535d":[1,0,0,94,1,0,3], "struct_tempest_1_1_render_state_1_1_alpha_test_mode.html#adce96ba2d2ef19eacfee189daee26fe9a3da0dd63eaf36d4fb7944426e0d612e0":[1,0,0,94,1,0,1], "struct_tempest_1_1_render_state_1_1_alpha_test_mode.html#adce96ba2d2ef19eacfee189daee26fe9a4418f4bbbdac70e0d32552c8bfcb5fb7":[1,0,0,94,1,0,8] };
"use strict"; // TODO review all error messages for consistency and helpfulness across observables var observerFreeList = []; var observerToFreeList = []; var dispatching = false; module.exports = ObservableRange; function ObservableRange() { throw new Error("Can't construct. ObservableRange is a mixin."); } ObservableRange.prototype.observeRangeChange = function (handler, name, note, capture) { return observeRangeChange(this, handler, name, note, capture); }; ObservableRange.prototype.observeRangeWillChange = function (handler, name, note) { return observeRangeChange(this, handler, name, note, true); }; ObservableRange.prototype.dispatchRangeChange = function (plus, minus, index, capture) { return dispatchRangeChange(this, plus, minus, index, capture); }; ObservableRange.prototype.dispatchRangeWillChange = function (plus, minus, index) { return dispatchRangeChange(this, plus, minus, index, true); }; ObservableRange.prototype.getRangeChangeObservers = function (capture) { return getRangeChangeObservers(this, capture); }; ObservableRange.prototype.getRangeWillChangeObservers = function () { return getRangeChangeObservers(this, true); }; ObservableRange.observeRangeChange = observeRangeChange; function observeRangeChange(object, handler, name, note, capture) { makeRangeChangesObservable(object); var observers = getRangeChangeObservers(object, capture); var observer; if (observerFreeList.length) { // TODO !debug? observer = observerFreeList.pop(); } else { observer = new RangeChangeObserver(); } observer.object = object; observer.name = name; observer.capture = capture; observer.observers = observers; observer.handler = handler; observer.note = note; // Precompute dispatch method name var stringName = "" + name; // Array indicides must be coerced to string. var propertyName = stringName.slice(0, 1).toUpperCase() + stringName.slice(1); if (!capture) { var methodName = "handle" + propertyName + "RangeChange"; if (handler[methodName]) { observer.handlerMethodName = methodName; } else if (handler.handleRangeChange) { observer.handlerMethodName = "handleRangeChange"; } else if (handler.call) { observer.handlerMethodName = null; } else { throw new Error("Can't arrange to dispatch " + JSON.stringify(name) + " map changes"); } } else { methodName = "handle" + propertyName + "RangeWillChange"; if (handler[methodName]) { observer.handlerMethodName = methodName; } else if (handler.handleRangeWillChange) { observer.handlerMethodName = "handleRangeWillChange"; } else if (handler.call) { observer.handlerMethodName = null; } else { throw new Error("Can't arrange to dispatch " + JSON.stringify(name) + " map changes"); } } observers.push(observer); // TODO issue warning if the number of handler records is worrisome return observer; } ObservableRange.observeRangeWillChange = observeRangeWillChange; function observeRangeWillChange(object, handler, name, note) { return observeRangeChange(object, handler, name, note, true); } ObservableRange.dispatchRangeChange = dispatchRangeChange; function dispatchRangeChange(object, plus, minus, index, capture) { if (!dispatching) { // TODO && !debug? return startRangeChangeDispatchContext(object, plus, minus, index, capture); } var observers = getRangeChangeObservers(object, capture); for (var observerIndex = 0; observerIndex < observers.length; observerIndex++) { var observer = observers[observerIndex]; // The slicing ensures that handlers cannot interfere with another by // altering these arguments. observer.dispatch(plus.slice(), minus.slice(), index); } } ObservableRange.dispatchRangeWillChange = dispatchRangeWillChange; function dispatchRangeWillChange(object, plus, minus, index) { return dispatchRangeChange(object, plus, minus, index, true); } function startRangeChangeDispatchContext(object, plus, minus, index, capture) { dispatching = true; try { dispatchRangeChange(object, plus, minus, index, capture); } catch (error) { if (typeof error === "object" && typeof error.message === "string") { error.message = "Range change dispatch possibly corrupted by error: " + error.message; throw error; } else { throw new Error("Range change dispatch possibly corrupted by error: " + error); } } finally { dispatching = false; if (observerToFreeList.length) { // Using push.apply instead of addEach because push will definitely // be much faster than the generic addEach, which also handles // non-array collections. observerFreeList.push.apply( observerFreeList, observerToFreeList ); // Using clear because it is observable. The handler record array // is obtainable by getPropertyChangeObservers, and is observable. if (observerToFreeList.clear) { observerToFreeList.clear(); } else { observerToFreeList.length = 0; } } } } function makeRangeChangesObservable(object) { if (Array.isArray(object)) { Oa.makeRangeChangesObservable(object); } if (object.makeRangeChangesObservable) { object.makeRangeChangesObservable(); } object.dispatchesRangeChanges = true; } function getRangeChangeObservers(object, capture) { if (capture) { if (!object.rangeWillChangeObservers) { object.rangeWillChangeObservers = []; } return object.rangeWillChangeObservers; } else { if (!object.rangeChangeObservers) { object.rangeChangeObservers = []; } return object.rangeChangeObservers; } } /* if (object.preventPropertyObserver) { return object.preventPropertyObserver(name); } else { return preventPropertyObserver(object, name); } */ function RangeChangeObserver() { this.init(); } RangeChangeObserver.prototype.init = function () { this.object = null; this.name = null; this.observers = null; this.handler = null; this.handlerMethodName = null; this.childObserver = null; this.note = null; this.capture = null; }; RangeChangeObserver.prototype.cancel = function () { var observers = this.observers; var index = observers.indexOf(this); // Unfortunately, if this observer was reused, this would not be sufficient // to detect a duplicate cancel. Do not cancel more than once. if (index < 0) { throw new Error( "Can't cancel observer for " + JSON.stringify(this.name) + " range changes" + " because it has already been canceled" ); } var childObserver = this.childObserver; observers.splice(index, 1); this.init(); // If this observer is canceled while dispatching a change // notification for the same property... // 1. We cannot put the handler record onto the free list because // it may have been captured in the array of records to which // the change notification would be sent. We must mark it as // canceled by nulling out the handler property so the dispatcher // passes over it. // 2. We also cannot put the handler record onto the free list // until all change dispatches have been completed because it could // conceivably be reused, confusing the current dispatcher. if (dispatching) { // All handlers added to this list will be moved over to the // actual free list when there are no longer any property // change dispatchers on the stack. observerToFreeList.push(this); } else { observerFreeList.push(this); } if (childObserver) { // Calling user code on our stack. // Done in tail position to avoid a plan interference hazard. childObserver.cancel(); } }; RangeChangeObserver.prototype.dispatch = function (plus, minus, index) { var handler = this.handler; // A null handler implies that an observer was canceled during the dispatch // of a change. The observer is pending addition to the free list. if (!handler) { return; } var childObserver = this.childObserver; this.childObserver = null; // XXX plan interference hazards calling cancel and handler methods: if (childObserver) { childObserver.cancel(); } var handlerMethodName = this.handlerMethodName; if (handlerMethodName && typeof handler[handlerMethodName] === "function") { childObserver = handler[handlerMethodName](plus, minus, index, this.object); } else if (handler.call) { childObserver = handler.call(void 0, plus, minus, index, this.object); } else { throw new Error( "Can't dispatch range change to " + handler ); } this.childObserver = childObserver; return this; }; var Oa = require("./array");
const OccurrenceTimes = require("../src/OccurrenceTimes"); const expect = require("chai").expect; describe("OccurrenceTimes", () => { describe("#append", () => { it("returns the two values appended together", () => { const timesA = new OccurrenceTimes([[24, 44], [29]]); const timesB = new OccurrenceTimes([[68], []]); const result = timesA.append(timesB); expect(result.value).to.deep.equal([[24, 44, 68], [29]]); }); }); describe(".empty()", () => { it("returns OccurrenceTimes that has a value of [[], []]", () => { const result = OccurrenceTimes.empty().value; expect(result).to.deep.equal([[], []]); }); }); });
(function() { 'use strict'; angular .module('artemisApp') .controller('QuizExerciseDialogController', QuizExerciseDialogController); QuizExerciseDialogController.$inject = ['$timeout', '$scope', '$stateParams', '$uibModalInstance', 'entity', 'QuizExercise', 'Question']; function QuizExerciseDialogController ($timeout, $scope, $stateParams, $uibModalInstance, entity, QuizExercise, Question) { var vm = this; vm.quizExercise = entity; vm.clear = clear; vm.save = save; vm.questions = Question.query(); $timeout(function (){ angular.element('.form-group:eq(1)>input').focus(); }); function clear () { $uibModalInstance.dismiss('cancel'); } function save () { vm.isSaving = true; if (vm.quizExercise.id !== null) { QuizExercise.update(vm.quizExercise, onSaveSuccess, onSaveError); } else { QuizExercise.save(vm.quizExercise, onSaveSuccess, onSaveError); } } function onSaveSuccess (result) { $scope.$emit('artemisApp:quizExerciseUpdate', result); $uibModalInstance.close(result); vm.isSaving = false; } function onSaveError () { vm.isSaving = false; } } })();
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71C20.66 8.78 16.54 7 12 7z" }), 'CallEndOutlined');
/* */ "format cjs"; define( [ "../../core", "../../selector" ], function( jQuery ) { "use strict"; return jQuery.expr.match.needsContext; } );
importScripts('/packages/planifica_file-encryption/lzw.js'); // Must be included after cryptoJS var Latin1Formatter = { /** * Converts a cipher params object to an OpenSSL-style string using Latin1 * * @param {CipherParams} cipherParams The cipher params object. * * @return {string} The OpenSSL-style string. * */ stringify: function (cipherParams, opts) { // Shortcuts var ciphertext = cipherParams.ciphertext; var salt = cipherParams.salt; var wordArray; // Format if (salt) { wordArray = CryptoJS.lib.WordArray.create([0x53616c74, 0x65645f5f ]).concat(salt).concat(ciphertext); } else { wordArray = ciphertext; } var output = wordArray.toString(CryptoJS.enc.Latin1); //return lzw_encode(output); return output; }, /** * Converts an OpenSSL-style string using Latin1 to a cipher params object. * * @param {string} openSSLStr The OpenSSL-style string. * * @return {CipherParams} The cipher params object. * */ parse: function (str) { // Parse base64 //var ciphertext = CryptoJS.enc.Latin1.parse(lzw_decode(str)), salt; var ciphertext = CryptoJS.enc.Latin1.parse(str), salt; // Test for salt if (ciphertext.words[0] == 0x53616c74 && ciphertext.words[1] == 0x65645f5f) { // Extract salt salt = CryptoJS.lib.WordArray.create(ciphertext.words.slice( 2, 4)); // Remove salt from ciphertext ciphertext.words.splice(0, 4); ciphertext.sigBytes -= 16; } return CryptoJS.lib.CipherParams.create({ ciphertext: ciphertext, salt: salt }); } };
'use strict'; var AbstractMessageHandler = require('./abstract_message_handler'); class MessageHandlerConfirm extends AbstractMessageHandler { get MESSAGE_EVENT() { return 'confirm'; } handleMessage(message) { this.window.SUITE.integration.dialog.confirm(message); } static create(global) { return new MessageHandlerConfirm(global); } } module.exports = MessageHandlerConfirm;
// moment.js locale configuration // locale : korean (ko) // // authors // // - Kyungwook, Park : https://github.com/kyungw00k // - Jeeeyul Lee <jeeeyul@gmail.com> (function (factory) { if (typeof define === 'function' && define.amd) { define(['moment'], factory); // AMD } else if (typeof exports === 'object') { module.exports = factory(require('../moment')); // Node } else { factory(window.moment); // Browser global } }(function (moment) { return moment.defineLocale('ko', { months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), weekdaysShort : '일_월_화_수_목_금_토'.split('_'), weekdaysMin : '일_월_화_수_목_금_토'.split('_'), longDateFormat : { LT : 'A h시 m분', L : 'YYYY.MM.DD', LL : 'YYYY년 MMMM D일', LLL : 'YYYY년 MMMM D일 LT', LLLL : 'YYYY년 MMMM D일 dddd LT' }, meridiem : function (hour, minute, isUpper) { return hour < 12 ? '오전' : '오후'; }, calendar : { sameDay : '오늘 LT', nextDay : '내일 LT', nextWeek : 'dddd LT', lastDay : '어제 LT', lastWeek : '지난주 dddd LT', sameElse : 'L' }, relativeTime : { future : '%s 후', past : '%s 전', s : '몇초', ss : '%d초', m : '일분', mm : '%d분', h : '한시간', hh : '%d시간', d : '하루', dd : '%d일', M : '한달', MM : '%d달', y : '일년', yy : '%d년' }, ordinalParse : /\d{1,2}일/, ordinal : '%d일', meridiemParse : /(오전|오후)/, isPM : function (token) { return token === '오후'; } }); }));
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var gameSchema = new Schema({ name: String, host: Schema.Types.Mixed, players: [], bdeck: [], wdeck: [], dealer: Schema.Types.Mixed, rules: Schema.Types.Mixed }); // Compile model from schema var Game = mongoose.model('Game', gameSchema ); // function newDeck() { // Card.find({} function (err, cards) { // if (err) return handleError(err); // console.log(cards) // Space Ghost is a talk show host. // }) // } module.exports = gameSchema;
module.exports = { content: [], presets: [], darkMode: 'media', // or 'class' theme: { screens: { sm: '640px', md: '768px', lg: '1024px', xl: '1280px', '2xl': '1536px', }, colors: ({ colors }) => ({ inherit: colors.inherit, current: colors.current, transparent: colors.transparent, black: colors.black, white: colors.white, slate: colors.slate, gray: colors.gray, zinc: colors.zinc, neutral: colors.neutral, stone: colors.stone, red: colors.red, orange: colors.orange, amber: colors.amber, yellow: colors.yellow, lime: colors.lime, green: colors.green, emerald: colors.emerald, teal: colors.teal, cyan: colors.cyan, sky: colors.sky, blue: colors.blue, indigo: colors.indigo, violet: colors.violet, purple: colors.purple, fuchsia: colors.fuchsia, pink: colors.pink, rose: colors.rose, }), columns: { auto: 'auto', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: '10', 11: '11', 12: '12', '3xs': '16rem', '2xs': '18rem', xs: '20rem', sm: '24rem', md: '28rem', lg: '32rem', xl: '36rem', '2xl': '42rem', '3xl': '48rem', '4xl': '56rem', '5xl': '64rem', '6xl': '72rem', '7xl': '80rem', }, spacing: { px: '1px', 0: '0px', 0.5: '0.125rem', 1: '0.25rem', 1.5: '0.375rem', 2: '0.5rem', 2.5: '0.625rem', 3: '0.75rem', 3.5: '0.875rem', 4: '1rem', 5: '1.25rem', 6: '1.5rem', 7: '1.75rem', 8: '2rem', 9: '2.25rem', 10: '2.5rem', 11: '2.75rem', 12: '3rem', 14: '3.5rem', 16: '4rem', 20: '5rem', 24: '6rem', 28: '7rem', 32: '8rem', 36: '9rem', 40: '10rem', 44: '11rem', 48: '12rem', 52: '13rem', 56: '14rem', 60: '15rem', 64: '16rem', 72: '18rem', 80: '20rem', 96: '24rem', }, animation: { none: 'none', spin: 'spin 1s linear infinite', ping: 'ping 1s cubic-bezier(0, 0, 0.2, 1) infinite', pulse: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite', bounce: 'bounce 1s infinite', }, aspectRatio: { auto: 'auto', square: '1 / 1', video: '16 / 9', attrs: 'attr(width) / attr(height)' }, backdropBlur: ({ theme }) => theme('blur'), backdropBrightness: ({ theme }) => theme('brightness'), backdropContrast: ({ theme }) => theme('contrast'), backdropGrayscale: ({ theme }) => theme('grayscale'), backdropHueRotate: ({ theme }) => theme('hueRotate'), backdropInvert: ({ theme }) => theme('invert'), backdropOpacity: ({ theme }) => theme('opacity'), backdropSaturate: ({ theme }) => theme('saturate'), backdropSepia: ({ theme }) => theme('sepia'), backgroundColor: ({ theme }) => theme('colors'), backgroundImage: { none: 'none', 'gradient-to-t': 'linear-gradient(to top, var(--tw-gradient-stops))', 'gradient-to-tr': 'linear-gradient(to top right, var(--tw-gradient-stops))', 'gradient-to-r': 'linear-gradient(to right, var(--tw-gradient-stops))', 'gradient-to-br': 'linear-gradient(to bottom right, var(--tw-gradient-stops))', 'gradient-to-b': 'linear-gradient(to bottom, var(--tw-gradient-stops))', 'gradient-to-bl': 'linear-gradient(to bottom left, var(--tw-gradient-stops))', 'gradient-to-l': 'linear-gradient(to left, var(--tw-gradient-stops))', 'gradient-to-tl': 'linear-gradient(to top left, var(--tw-gradient-stops))', }, backgroundOpacity: ({ theme }) => theme('opacity'), backgroundPosition: { bottom: 'bottom', center: 'center', left: 'left', 'left-bottom': 'left bottom', 'left-top': 'left top', right: 'right', 'right-bottom': 'right bottom', 'right-top': 'right top', top: 'top', }, backgroundSize: { auto: 'auto', cover: 'cover', contain: 'contain', }, blur: { 0: '0', none: '0', sm: '4px', DEFAULT: '8px', md: '12px', lg: '16px', xl: '24px', '2xl': '40px', '3xl': '64px', }, brightness: { 0: '0', 50: '.5', 75: '.75', 90: '.9', 95: '.95', 100: '1', 105: '1.05', 110: '1.1', 125: '1.25', 150: '1.5', 200: '2', }, borderColor: ({ theme }) => ({ ...theme('colors'), DEFAULT: theme('colors.gray.200', 'currentColor'), }), borderOpacity: ({ theme }) => theme('opacity'), borderRadius: { none: '0px', sm: '0.125rem', DEFAULT: '0.25rem', md: '0.375rem', lg: '0.5rem', xl: '0.75rem', '2xl': '1rem', '3xl': '1.5rem', full: '9999px', }, borderWidth: { DEFAULT: '1px', 0: '0px', 2: '2px', 4: '4px', 8: '8px', }, boxShadow: { sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)', DEFAULT: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)', md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)', lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)', xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)', '2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)', inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)', none: 'none', }, boxShadowColor: ({ theme }) => theme('colors'), caretColor: ({ theme }) => theme('colors'), accentColor: ({ theme }) => ({ ...theme('colors'), auto: 'auto', }), contrast: { 0: '0', 50: '.5', 75: '.75', 100: '1', 125: '1.25', 150: '1.5', 200: '2', }, container: {}, content: { none: 'none', }, cursor: { auto: 'auto', default: 'default', pointer: 'pointer', wait: 'wait', text: 'text', move: 'move', help: 'help', 'not-allowed': 'not-allowed', none: 'none', 'context-menu': 'context-menu', progress: 'progress', cell: 'cell', crosshair: 'crosshair', 'vertical-text': 'vertical-text', alias: 'alias', copy: 'copy', 'no-drop': 'no-drop', grab: 'grab', grabbing: 'grabbing', 'all-scroll': 'all-scroll', 'col-resize': 'col-resize', 'row-resize': 'row-resize', 'n-resize': 'n-resize', 'e-resize': 'e-resize', 's-resize': 's-resize', 'w-resize': 'w-resize', 'ne-resize': 'ne-resize', 'nw-resize': 'nw-resize', 'se-resize': 'se-resize', 'sw-resize': 'sw-resize', 'ew-resize': 'ew-resize', 'ns-resize': 'ns-resize', 'nesw-resize': 'nesw-resize', 'nwse-resize': 'nwse-resize', 'zoom-in': 'zoom-in', 'zoom-out': 'zoom-out', }, divideColor: ({ theme }) => theme('borderColor'), divideOpacity: ({ theme }) => theme('borderOpacity'), divideWidth: ({ theme }) => theme('borderWidth'), dropShadow: { sm: '0 1px 1px rgb(0 0 0 / 0.05)', DEFAULT: ['0 1px 2px rgb(0 0 0 / 0.1)', '0 1px 1px rgb(0 0 0 / 0.06)'], md: ['0 4px 3px rgb(0 0 0 / 0.07)', '0 2px 2px rgb(0 0 0 / 0.06)'], lg: ['0 10px 8px rgb(0 0 0 / 0.04)', '0 4px 3px rgb(0 0 0 / 0.1)'], xl: ['0 20px 13px rgb(0 0 0 / 0.03)', '0 8px 5px rgb(0 0 0 / 0.08)'], '2xl': '0 25px 25px rgb(0 0 0 / 0.15)', none: '0 0 #0000', }, fill: ({ theme }) => theme('colors'), grayscale: { 0: '0', DEFAULT: '100%', }, hueRotate: { 0: '0deg', 15: '15deg', 30: '30deg', 60: '60deg', 90: '90deg', 180: '180deg', }, invert: { 0: '0', DEFAULT: '100%', }, flex: { 1: '1 1 0%', auto: '1 1 auto', initial: '0 1 auto', none: 'none', }, flexBasis: ({ theme }) => ({ auto: 'auto', ...theme('spacing'), '1/2': '50%', '1/3': '33.333333%', '2/3': '66.666667%', '1/4': '25%', '2/4': '50%', '3/4': '75%', '1/5': '20%', '2/5': '40%', '3/5': '60%', '4/5': '80%', '1/6': '16.666667%', '2/6': '33.333333%', '3/6': '50%', '4/6': '66.666667%', '5/6': '83.333333%', '1/12': '8.333333%', '2/12': '16.666667%', '3/12': '25%', '4/12': '33.333333%', '5/12': '41.666667%', '6/12': '50%', '7/12': '58.333333%', '8/12': '66.666667%', '9/12': '75%', '10/12': '83.333333%', '11/12': '91.666667%', full: '100%', }), flexGrow: { 0: '0', DEFAULT: '1', }, flexShrink: { 0: '0', DEFAULT: '1', }, fontFamily: { sans: [ 'ui-sans-serif', 'system-ui', '-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', '"Noto Sans"', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"', '"Noto Color Emoji"', ], serif: ['ui-serif', 'Georgia', 'Cambria', '"Times New Roman"', 'Times', 'serif'], mono: [ 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', '"Liberation Mono"', '"Courier New"', 'monospace', ], }, fontSize: { xs: ['0.75rem', { lineHeight: '1rem' }], sm: ['0.875rem', { lineHeight: '1.25rem' }], base: ['1rem', { lineHeight: '1.5rem' }], lg: ['1.125rem', { lineHeight: '1.75rem' }], xl: ['1.25rem', { lineHeight: '1.75rem' }], '2xl': ['1.5rem', { lineHeight: '2rem' }], '3xl': ['1.875rem', { lineHeight: '2.25rem' }], '4xl': ['2.25rem', { lineHeight: '2.5rem' }], '5xl': ['3rem', { lineHeight: '1' }], '6xl': ['3.75rem', { lineHeight: '1' }], '7xl': ['4.5rem', { lineHeight: '1' }], '8xl': ['6rem', { lineHeight: '1' }], '9xl': ['8rem', { lineHeight: '1' }], }, fontWeight: { thin: '100', extralight: '200', light: '300', normal: '400', medium: '500', semibold: '600', bold: '700', extrabold: '800', black: '900', }, gap: ({ theme }) => theme('spacing'), gradientColorStops: ({ theme }) => theme('colors'), gridAutoColumns: { auto: 'auto', min: 'min-content', max: 'max-content', fr: 'minmax(0, 1fr)', }, gridAutoRows: { auto: 'auto', min: 'min-content', max: 'max-content', fr: 'minmax(0, 1fr)', }, gridColumn: { auto: 'auto', 'span-1': 'span 1 / span 1', 'span-2': 'span 2 / span 2', 'span-3': 'span 3 / span 3', 'span-4': 'span 4 / span 4', 'span-5': 'span 5 / span 5', 'span-6': 'span 6 / span 6', 'span-7': 'span 7 / span 7', 'span-8': 'span 8 / span 8', 'span-9': 'span 9 / span 9', 'span-10': 'span 10 / span 10', 'span-11': 'span 11 / span 11', 'span-12': 'span 12 / span 12', 'span-full': '1 / -1', }, gridColumnEnd: { auto: 'auto', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: '10', 11: '11', 12: '12', 13: '13', }, gridColumnStart: { auto: 'auto', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: '10', 11: '11', 12: '12', 13: '13', }, gridRow: { auto: 'auto', 'span-1': 'span 1 / span 1', 'span-2': 'span 2 / span 2', 'span-3': 'span 3 / span 3', 'span-4': 'span 4 / span 4', 'span-5': 'span 5 / span 5', 'span-6': 'span 6 / span 6', 'span-full': '1 / -1', }, gridRowStart: { auto: 'auto', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', }, gridRowEnd: { auto: 'auto', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', }, gridTemplateColumns: { none: 'none', 1: 'repeat(1, minmax(0, 1fr))', 2: 'repeat(2, minmax(0, 1fr))', 3: 'repeat(3, minmax(0, 1fr))', 4: 'repeat(4, minmax(0, 1fr))', 5: 'repeat(5, minmax(0, 1fr))', 6: 'repeat(6, minmax(0, 1fr))', 7: 'repeat(7, minmax(0, 1fr))', 8: 'repeat(8, minmax(0, 1fr))', 9: 'repeat(9, minmax(0, 1fr))', 10: 'repeat(10, minmax(0, 1fr))', 11: 'repeat(11, minmax(0, 1fr))', 12: 'repeat(12, minmax(0, 1fr))', }, gridTemplateRows: { none: 'none', 1: 'repeat(1, minmax(0, 1fr))', 2: 'repeat(2, minmax(0, 1fr))', 3: 'repeat(3, minmax(0, 1fr))', 4: 'repeat(4, minmax(0, 1fr))', 5: 'repeat(5, minmax(0, 1fr))', 6: 'repeat(6, minmax(0, 1fr))', }, height: ({ theme }) => ({ auto: 'auto', ...theme('spacing'), '1/2': '50%', '1/3': '33.333333%', '2/3': '66.666667%', '1/4': '25%', '2/4': '50%', '3/4': '75%', '1/5': '20%', '2/5': '40%', '3/5': '60%', '4/5': '80%', '1/6': '16.666667%', '2/6': '33.333333%', '3/6': '50%', '4/6': '66.666667%', '5/6': '83.333333%', full: '100%', screen: '100vh', min: 'min-content', max: 'max-content', fit: 'fit-content', }), inset: ({ theme }) => ({ auto: 'auto', ...theme('spacing'), '1/2': '50%', '1/3': '33.333333%', '2/3': '66.666667%', '1/4': '25%', '2/4': '50%', '3/4': '75%', full: '100%', }), keyframes: { spin: { to: { transform: 'rotate(360deg)', }, }, ping: { '75%, 100%': { transform: 'scale(2)', opacity: '0', }, }, pulse: { '50%': { opacity: '.5', }, }, bounce: { '0%, 100%': { transform: 'translateY(-25%)', animationTimingFunction: 'cubic-bezier(0.8,0,1,1)', }, '50%': { transform: 'none', animationTimingFunction: 'cubic-bezier(0,0,0.2,1)', }, }, }, letterSpacing: { tighter: '-0.05em', tight: '-0.025em', normal: '0em', wide: '0.025em', wider: '0.05em', widest: '0.1em', }, lineHeight: { none: '1', tight: '1.25', snug: '1.375', normal: '1.5', relaxed: '1.625', loose: '2', 3: '.75rem', 4: '1rem', 5: '1.25rem', 6: '1.5rem', 7: '1.75rem', 8: '2rem', 9: '2.25rem', 10: '2.5rem', }, listStyleType: { none: 'none', disc: 'disc', decimal: 'decimal', }, margin: ({ theme }) => ({ auto: 'auto', ...theme('spacing'), }), maxHeight: ({ theme }) => ({ ...theme('spacing'), full: '100%', screen: '100vh', min: 'min-content', max: 'max-content', fit: 'fit-content', }), maxWidth: ({ theme, breakpoints }) => ({ none: 'none', 0: '0rem', xs: '20rem', sm: '24rem', md: '28rem', lg: '32rem', xl: '36rem', '2xl': '42rem', '3xl': '48rem', '4xl': '56rem', '5xl': '64rem', '6xl': '72rem', '7xl': '80rem', full: '100%', min: 'min-content', max: 'max-content', fit: 'fit-content', prose: '65ch', ...breakpoints(theme('screens')), }), minHeight: { 0: '0px', full: '100%', screen: '100vh', min: 'min-content', max: 'max-content', fit: 'fit-content', }, minWidth: { 0: '0px', full: '100%', min: 'min-content', max: 'max-content', fit: 'fit-content', }, objectPosition: { bottom: 'bottom', center: 'center', left: 'left', 'left-bottom': 'left bottom', 'left-top': 'left top', right: 'right', 'right-bottom': 'right bottom', 'right-top': 'right top', top: 'top', }, opacity: { 0: '0', 5: '0.05', 10: '0.1', 20: '0.2', 25: '0.25', 30: '0.3', 40: '0.4', 50: '0.5', 60: '0.6', 70: '0.7', 75: '0.75', 80: '0.8', 90: '0.9', 95: '0.95', 100: '1', }, order: { first: '-9999', last: '9999', none: '0', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: '10', 11: '11', 12: '12', }, padding: ({ theme }) => theme('spacing'), placeholderColor: ({ theme }) => theme('colors'), placeholderOpacity: ({ theme }) => theme('opacity'), outlineColor: ({ theme }) => theme('colors'), outlineOffset: { 0: '0px', 1: '1px', 2: '2px', 4: '4px', 8: '8px', }, outlineWidth: { 0: '0px', 1: '1px', 2: '2px', 4: '4px', 8: '8px', }, ringColor: ({ theme }) => ({ DEFAULT: theme('colors.blue.500', '#3b82f6'), ...theme('colors'), }), ringOffsetColor: ({ theme }) => theme('colors'), ringOffsetWidth: { 0: '0px', 1: '1px', 2: '2px', 4: '4px', 8: '8px', }, ringOpacity: ({ theme }) => ({ DEFAULT: '0.5', ...theme('opacity'), }), ringWidth: { DEFAULT: '3px', 0: '0px', 1: '1px', 2: '2px', 4: '4px', 8: '8px', }, rotate: { 0: '0deg', 1: '1deg', 2: '2deg', 3: '3deg', 6: '6deg', 12: '12deg', 45: '45deg', 90: '90deg', 180: '180deg', }, saturate: { 0: '0', 50: '.5', 100: '1', 150: '1.5', 200: '2', }, scale: { 0: '0', 50: '.5', 75: '.75', 90: '.9', 95: '.95', 100: '1', 105: '1.05', 110: '1.1', 125: '1.25', 150: '1.5', }, scrollMargin: ({ theme }) => ({ ...theme('spacing'), }), scrollPadding: ({ theme }) => theme('spacing'), sepia: { 0: '0', DEFAULT: '100%', }, skew: { 0: '0deg', 1: '1deg', 2: '2deg', 3: '3deg', 6: '6deg', 12: '12deg', }, space: ({ theme }) => ({ ...theme('spacing'), }), stroke: ({ theme }) => theme('colors'), strokeWidth: { 0: '0', 1: '1', 2: '2', }, textColor: ({ theme }) => theme('colors'), textDecorationColor: ({ theme }) => theme('colors'), textDecorationThickness: { auto: 'auto', 'from-font': 'from-font', 0: '0px', 1: '1px', 2: '2px', 4: '4px', 8: '8px', }, textUnderlineOffset: { auto: 'auto', 0: '0px', 1: '1px', 2: '2px', 4: '4px', 8: '8px', }, textIndent: ({ theme }) => ({ ...theme('spacing'), }), textOpacity: ({ theme }) => theme('opacity'), transformOrigin: { center: 'center', top: 'top', 'top-right': 'top right', right: 'right', 'bottom-right': 'bottom right', bottom: 'bottom', 'bottom-left': 'bottom left', left: 'left', 'top-left': 'top left', }, transitionDelay: { 75: '75ms', 100: '100ms', 150: '150ms', 200: '200ms', 300: '300ms', 500: '500ms', 700: '700ms', 1000: '1000ms', }, transitionDuration: { DEFAULT: '150ms', 75: '75ms', 100: '100ms', 150: '150ms', 200: '200ms', 300: '300ms', 500: '500ms', 700: '700ms', 1000: '1000ms', }, transitionProperty: { none: 'none', all: 'all', DEFAULT: 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter', colors: 'background-color, border-color, color, fill, stroke', opacity: 'opacity', shadow: 'box-shadow', transform: 'transform', }, transitionTimingFunction: { DEFAULT: 'cubic-bezier(0.4, 0, 0.2, 1)', linear: 'linear', in: 'cubic-bezier(0.4, 0, 1, 1)', out: 'cubic-bezier(0, 0, 0.2, 1)', 'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)', }, translate: ({ theme }) => ({ ...theme('spacing'), '1/2': '50%', '1/3': '33.333333%', '2/3': '66.666667%', '1/4': '25%', '2/4': '50%', '3/4': '75%', full: '100%', }), width: ({ theme }) => ({ auto: 'auto', ...theme('spacing'), '1/2': '50%', '1/3': '33.333333%', '2/3': '66.666667%', '1/4': '25%', '2/4': '50%', '3/4': '75%', '1/5': '20%', '2/5': '40%', '3/5': '60%', '4/5': '80%', '1/6': '16.666667%', '2/6': '33.333333%', '3/6': '50%', '4/6': '66.666667%', '5/6': '83.333333%', '1/12': '8.333333%', '2/12': '16.666667%', '3/12': '25%', '4/12': '33.333333%', '5/12': '41.666667%', '6/12': '50%', '7/12': '58.333333%', '8/12': '66.666667%', '9/12': '75%', '10/12': '83.333333%', '11/12': '91.666667%', full: '100%', screen: '100vw', min: 'min-content', max: 'max-content', fit: 'fit-content', }), willChange: { auto: 'auto', scroll: 'scroll-position', contents: 'contents', transform: 'transform', }, zIndex: { auto: 'auto', 0: '0', 10: '10', 20: '20', 30: '30', 40: '40', 50: '50', }, }, variantOrder: [ 'first', 'last', 'odd', 'even', 'visited', 'checked', 'empty', 'read-only', 'group-hover', 'group-focus', 'focus-within', 'hover', 'focus', 'focus-visible', 'active', 'disabled', ], plugins: [], }
function myFunc(n, m) { for (let i = 0; i < n; i++) { for (let j = 0; j < m; j++) { _myAssertFunction(i * j >= 0); } } }
/** global: VRS */ if(VRS && VRS.globalDispatch && VRS.serverConfig) { VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function(bootStrap) { if(VRS.renderPropertyHandlers) { VRS.renderPropertyHandlers[VRS.RenderProperty.Country] = new VRS.RenderPropertyHandler({ property: VRS.RenderProperty.Country, surfaces: VRS.RenderSurface.List + VRS.RenderSurface.DetailHead + VRS.RenderSurface.InfoWindow, headingKey: 'ListCountry', labelKey: 'Country', sortableField: VRS.AircraftListSortableField.Country, suppressLabelCallback: function() { return true; }, fixedWidth: function() { return '27px'; }, hasChangedCallback: function(aircraft) { return aircraft.country.chg; }, renderCallback: function(aircraft) { return customFormatCountryFlagImageHtml(aircraft); }, tooltipChangedCallback: function(aircraft) { return aircraft.country.chg; }, tooltipCallback: function(aircraft) { return aircraft.country.val; } }); } }); } function customFormatCountryFlagImageHtml(aircraft) { var result = ''; if(aircraft.country.val) { var codeToUse = ''; codeToUse = aircraft.country.val; //Place images on 'country' folder result = '<img src="images/web-country/Wdth-27/Hght-20'; if(VRS.browserHelper.isHighDpi()) result += '/HiDpi'; result += '/' + encodeURIComponent(codeToUse) +'.bmp" width="27px" height="20px" />'; } return result; } function customPipeSeparatedCode(text, code) { var result = text; if(code && code.length) { if(result.length) result += '|'; result += code; } return result; }
version https://git-lfs.github.com/spec/v1 oid sha256:4bba86e2e05511cd79d7dba0d419eb4fadeb1984198cf304e71db6ca87b51209 size 1866
'use strict'; (function() { describe('safe filter Spec', function() { // Initialize global variables var safeFilter, scope, $compile; beforeEach(module('angular-toolbox')); beforeEach(inject(function($rootScope, _safeFilter_, _$compile_) { safeFilter = _safeFilter_; scope = $rootScope.$new(); $compile = _$compile_; })); it('should be testable', inject(function() { expect(safeFilter).toBeDefined(); })); it('should returns safe html', function () { scope.html = '<b>Hello world&nbsp;!</b>'; var element = angular.element('<span ng-bind-html="html | safe"></span>'); element = $compile(element)(scope); scope.$digest(); // call watchers expect(element.html()).toBe(scope.html); }); }); }());
angular.module( 'App.friends', [ 'ui.router' ]) .config(function config( $stateProvider, $urlRouterProvider ) { $stateProvider.state( 'editFriends', { url: '/friends/edit?webid', views: { "main": { controller: 'EditFriendsCtrl', templateUrl: 'app/friends/friends.tpl.html' } }, data:{ pageTitle: 'Edit friends' } }); $stateProvider.state( 'viewFriends', { url: '/friends/view?webid', views: { "main": { controller: 'ViewFriendsCtrl', templateUrl: 'app/friends/friends.tpl.html' } }, data:{ pageTitle: 'View friends' } }); $stateProvider.state( 'addFriends', { url: '/friends/add?webid', views: { "main": { controller: 'AddFriendsCtrl', templateUrl: 'app/friends/add.tpl.html' } }, data:{ pageTitle: 'Add friends' } }); }) .filter('encodeURL', function() { return function(url) { return encodeURIComponent(url); }; }) .controller( 'EditFriendsCtrl', function EditFriendsCtrl( $scope, $state, $location, $upload, $stateParams ) { $scope.profile = {}; $scope.form = {}; $scope.editor = true; $scope.Befriend = function() { if (!$scope.profile.friends) { $scope.profile.friends = []; } var newFriend = new $scope.$parent.ProfileElement( $rdf.st( $rdf.sym($scope.profile.webid), FOAF('knows'), $rdf.sym(''), $rdf.sym('') ) ); $scope.profile.friends.push(newFriend); }; $scope.Unfriend = function(id) { $scope.profile.friends[id].value = ''; $scope.updateObject($scope.profile.friends[id]); $scope.profile.friends.splice(id, 1); }; $scope.updateObject = function (obj, force) { // update object and also patch graph if (obj.value && obj.statement.why.value.length === 0 && $scope.profile.sources.length > 0) { obj.picker = true; // $scope.locationPicker = obj; // $scope.$parent.overlay = true; // $('#location-picker').openModal(); } else { obj.updateObject(true, force); } }; $scope.viewFriends = function() { var newPath = $location.path("/friends/view"); if ($stateParams['webid']) { newPath.search({'webid': webid}); } newPath.replace(); }; if (!$scope.profile.webid) { if ($stateParams['webid']) { var webid = $stateParams['webid']; // check if it's the authenticated user if ($scope.$parent.profile && $scope.$parent.profile.webid == webid) { $scope.profile = $scope.$parent.profile; } else if ($scope.$parent.profiles[webid] && $scope.$parent.profiles[webid].webid == webid) { // load previous existing profile $scope.profile = $scope.$parent.profiles[webid]; } } else { $scope.profile = $scope.$parent.profile; } } $scope.$watch('profile.friends', function(newVal, oldVal) { if (newVal !== undefined) { newVal.forEach(function(webid) { if (webid && webid.value && !$scope.$parent.profiles[webid.value]) { $scope.$parent.getProfile(webid.value, false, false); } }); } }); }) .controller( 'ViewFriendsCtrl', function ViewFriendsCtrl( $scope, $state, $location, $upload, $stateParams ) { $scope.form = {}; $scope.profile = {}; $scope.editor = false; $scope.viewFriends = function(webid) { if (!$scope.$parent.profiles) { $scope.$parent.profiles = []; } var webid = (webid)?webid:$scope.form.webid; if (!$scope.$parent.profiles[webid]) { console.log("No profile exists for "+webid); $scope.$parent.profiles[webid] = {}; $scope.$parent.getProfile(webid, false, false); } $scope.profile = $scope.$parent.profiles[webid]; $scope.$parent.toWebID = $scope.profile.webid; $scope.$parent.toLoc = '/friends/view'; $location.path("/friends/view").search({'webid': webid}).replace(); }; $scope.editFriends = function() { var newPath = $location.path("/friends/edit"); if ($stateParams['webid']) { newPath.search({'webid': webid}); } newPath.replace(); }; // $scope.isKnown = function(webid) { // $scope.profile.friends.forEach(function(uri) { // console.log(webid, uri.value); // console.log("KNOWN ", !$scope.editor, $scope.$parent.authenticated, $scope.$parent.authenticated != uri.value, webid == uri.value); // if (!$scope.editor && $scope.$parent.authenticated && ($scope.$parent.authenticated != uri.value || webid == uri.value)) { // return true; // } // }); // return false; // } if (!$scope.profile.webid) { if ($stateParams['webid']) { var webid = $scope.form.webid = $stateParams['webid']; // check if it's the authenticated user if ($scope.$parent.profile && $scope.$parent.profile.webid == webid) { $scope.profile = $scope.$parent.profile; } else if ($scope.$parent.profiles[webid] && $scope.$parent.profiles[webid].webid == webid) { // load previous existing profile $scope.profile = $scope.$parent.profiles[webid]; } else { $scope.viewFriends(webid); } } else { $scope.profile = $scope.$parent.profile; } } $scope.$watch('profile.friends', function(newVal, oldVal) { if (newVal !== undefined) { newVal.forEach(function(webid) { if (webid && webid.value && !$scope.$parent.profiles[webid.value]) { $scope.$parent.getProfile(webid.value, false, false); } }); } }); }); // .directive('addFriend', function () { // return { // restrict: 'AE', // transclude: true, // template: '<input id="newfriend" type="tel" ng-model="friend.value" ng-blur="updateObject(friend)" ng-disabled="friend.locked">'+ // '<label for="newfriend" ng-class="{active: friend.value.length > 0}">WebID{{friend.locked?"...updating":""}}</label>'+ // '<div pick-source obj="friend" ng-if="friend.picker"></div>', // link: function($scope, $element, $attrs) { // $('#location-picker').openModal(); // $scope.$parent.overlay = true; // $scope.setWhy = function(uri) { // $scope.obj.statement['why']['uri'] = $scope.obj.statement['why']['value'] = uri; // console.log("Set Why to:"+uri); // console.log($scope.obj.statement); // if ($scope.obj.statement.predicate.value == FOAF('img').value || $scope.obj.statement.predicate.value == FOAF('depiction').value) { // console.log("Supposed to save picture"); // $scope.$parent.savePicture(); // } else if ($scope.obj.statement.predicate.value == UI('backgroundImage').value) { // console.log("Supposed to save bgpicture"); // $scope.$parent.saveBackground(); // } else { // console.log("Supposed to update obj"); // $scope.$parent.updateObject($scope.obj); // } // $scope.cancel(); // } // $scope.cancel = function() { // $scope.$parent.overlay = false; // $scope.obj.picker = false; // $('#location-picker').closeModal(); // } // } // }; // });
RocketChat.API.v1.addRoute('commands.get', { authRequired: true }, { get() { const params = this.queryParams; if (typeof params.command !== 'string') { return RocketChat.API.v1.failure('The query param "command" must be provided.'); } const cmd = RocketChat.slashCommands.commands[params.command.toLowerCase()]; if (!cmd) { return RocketChat.API.v1.failure(`There is no command in the system by the name of: ${ params.command }`); } return RocketChat.API.v1.success({ command: cmd }); }, }); RocketChat.API.v1.addRoute('commands.list', { authRequired: true }, { get() { const { offset, count } = this.getPaginationItems(); const { sort, fields, query } = this.parseJsonQuery(); let commands = Object.values(RocketChat.slashCommands.commands); if (query && query.command) { commands = commands.filter((command) => command.command === query.command); } const totalCount = commands.length; commands = RocketChat.models.Rooms.processQueryOptionsOnResult(commands, { sort: sort ? sort : { name: 1 }, skip: offset, limit: count, fields, }); return RocketChat.API.v1.success({ commands, offset, count: commands.length, total: totalCount, }); }, }); // Expects a body of: { command: 'gimme', params: 'any string value', roomId: 'value' } RocketChat.API.v1.addRoute('commands.run', { authRequired: true }, { post() { const body = this.bodyParams; const user = this.getLoggedInUser(); if (typeof body.command !== 'string') { return RocketChat.API.v1.failure('You must provide a command to run.'); } if (body.params && typeof body.params !== 'string') { return RocketChat.API.v1.failure('The parameters for the command must be a single string.'); } if (typeof body.roomId !== 'string') { return RocketChat.API.v1.failure('The room\'s id where to execute this command must be provided and be a string.'); } const cmd = body.command.toLowerCase(); if (!RocketChat.slashCommands.commands[body.command.toLowerCase()]) { return RocketChat.API.v1.failure('The command provided does not exist (or is disabled).'); } // This will throw an error if they can't or the room is invalid Meteor.call('canAccessRoom', body.roomId, user._id); const params = body.params ? body.params : ''; let result; Meteor.runAsUser(user._id, () => { result = RocketChat.slashCommands.run(cmd, params, { _id: Random.id(), rid: body.roomId, msg: `/${ cmd } ${ params }`, }); }); return RocketChat.API.v1.success({ result }); }, }); RocketChat.API.v1.addRoute('commands.preview', { authRequired: true }, { // Expects these query params: command: 'giphy', params: 'mine', roomId: 'value' get() { const query = this.queryParams; const user = this.getLoggedInUser(); if (typeof query.command !== 'string') { return RocketChat.API.v1.failure('You must provide a command to get the previews from.'); } if (query.params && typeof query.params !== 'string') { return RocketChat.API.v1.failure('The parameters for the command must be a single string.'); } if (typeof query.roomId !== 'string') { return RocketChat.API.v1.failure('The room\'s id where the previews are being displayed must be provided and be a string.'); } const cmd = query.command.toLowerCase(); if (!RocketChat.slashCommands.commands[cmd]) { return RocketChat.API.v1.failure('The command provided does not exist (or is disabled).'); } // This will throw an error if they can't or the room is invalid Meteor.call('canAccessRoom', query.roomId, user._id); const params = query.params ? query.params : ''; let preview; Meteor.runAsUser(user._id, () => { preview = Meteor.call('getSlashCommandPreviews', { cmd, params, msg: { rid: query.roomId } }); }); return RocketChat.API.v1.success({ preview }); }, // Expects a body format of: { command: 'giphy', params: 'mine', roomId: 'value', previewItem: { id: 'sadf8' type: 'image', value: 'https://dev.null/gif } } post() { const body = this.bodyParams; const user = this.getLoggedInUser(); if (typeof body.command !== 'string') { return RocketChat.API.v1.failure('You must provide a command to run the preview item on.'); } if (body.params && typeof body.params !== 'string') { return RocketChat.API.v1.failure('The parameters for the command must be a single string.'); } if (typeof body.roomId !== 'string') { return RocketChat.API.v1.failure('The room\'s id where the preview is being executed in must be provided and be a string.'); } if (typeof body.previewItem === 'undefined') { return RocketChat.API.v1.failure('The preview item being executed must be provided.'); } if (!body.previewItem.id || !body.previewItem.type || typeof body.previewItem.value === 'undefined') { return RocketChat.API.v1.failure('The preview item being executed is in the wrong format.'); } const cmd = body.command.toLowerCase(); if (!RocketChat.slashCommands.commands[cmd]) { return RocketChat.API.v1.failure('The command provided does not exist (or is disabled).'); } // This will throw an error if they can't or the room is invalid Meteor.call('canAccessRoom', body.roomId, user._id); const params = body.params ? body.params : ''; Meteor.runAsUser(user._id, () => { Meteor.call('executeSlashCommandPreview', { cmd, params, msg: { rid: body.roomId } }, body.previewItem); }); return RocketChat.API.v1.success(); }, });
var vows = require('vows'), assert = require('assert'), macros = require('../lib/macros'); var Todoist = require('../todoist'), todo = {}; var request = function (param){ return function () { todo.request('addProject', param, this.callback); }; }; // grab a 10 digit name. var project_name = Math.random().toString(36).substring(2,12); var idArr = []; vows.describe('/API/addProject').addBatch({ 'addProject': { topic: function setup () { todo = new Todoist(process.env.TODOIST_EMAIL, process.env.TODOIST_PASS, this.callback); }, 'when queried with a valid token': { 'and a valid project name' : { topic: request({name: project_name}), 'returns an HTTP 200 OK response': macros.assertStatusCode(200), 'returns an object': macros.assertDataIsObject(), 'has the same name': macros.assertDataHasPropAndVal('name', project_name), 'has an id': macros.assertDataHasProp('id'), 'save the id': macros.saveValue(idArr, 'id'), 'that is already taken?': { '...it don\'t care': { topic: request({name: project_name}), 'returns an HTTP 200 OK response': macros.assertStatusCode(200), 'returns an object': macros.assertDataIsObject(), 'has the same name': macros.assertDataHasPropAndVal('name', project_name), 'has an id': macros.assertDataHasProp('id'), 'save the id': macros.saveValue(idArr, 'id'), } }, }, 'and a null project name': { topic: request({name: null}), 'returns an HTTP 200 OK response': macros.assertStatusCode(200), 'returns "ERROR_NAME_IS_EMPTY': macros.assertDataEquals(macros.ENIE), }, 'and a missing name parameter': { topic: request({}), 'returns an HTTP 400 Bad Request response': macros.assertStatusCode(400), 'returns missing arguments message': macros.assertDataEquals(macros.MISSING_ARGS) } }, 'when queried with an invalid token': { 'and a valid project name': { topic: request({token: macros.BAD_TOKEN, name: project_name }), 'returns an HTTP 401 Unauthorized response': macros.assertStatusCode(401), 'returns "Token not correct!"': macros.assertDataEquals(macros.TNC), } }, 'when queried with a null token' :{ 'and a valid project id': { topic: request({token: null, name: project_name }), 'returns an HTTP 401 Unauthorized response': macros.assertStatusCode(401), 'returns "Token not correct!"': macros.assertDataEquals(macros.TNC), } } } }).export(module);
( function ( yeep ) { "use strict"; yeep.notes = ( function () { var result = {}; var notes = [ "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" ]; var noteIndex = 0; for ( var freq = 16.35161; freq < 20000; freq *= Math.pow( 2, 1 / 12 ) ) { result[ notes[ noteIndex % 12 ] + ( Math.floor( noteIndex / 12 ) ) ] = freq; noteIndex++; } return ( result ); } )(); return ( yeep.notes ); } )( this.yeep );
version https://git-lfs.github.com/spec/v1 oid sha256:afa6bd0a5478ea39e95c829308754ba193281f2795a1c0a47c074d410c3941d2 size 11097
const { Promise } = require('dexie') module.exports = class DexieBatch { constructor(opts) { assertValidOptions(opts) this.opts = opts } isParallel() { return Boolean(this.opts.limit) } each(collection, callback) { assertValidMethodArgs(...arguments) return this.eachBatch(collection, (batch, batchIdx) => { const baseIdx = batchIdx * this.opts.batchSize return Promise.all(batch.map((item, i) => callback(item, baseIdx + i))) }) } eachBatch(collection, callback) { assertValidMethodArgs(...arguments) const delegate = this.isParallel() ? 'eachBatchParallel' : 'eachBatchSerial' return this[delegate](collection, callback) } eachBatchParallel(collection, callback) { assertValidMethodArgs(...arguments) const { batchSize, limit } = this.opts if (!limit) { throw new Error('Option "limit" must be set for parallel operation') } const nextBatch = batchIterator(collection, batchSize) const numBatches = Math.ceil(limit / batchSize) const batchPromises = Array.from({ length: numBatches }, (_, idx) => nextBatch().then(batch => callback(batch, idx)) ) return Promise.all(batchPromises).then(batches => batches.length) } eachBatchSerial(collection, callback) { assertValidMethodArgs(...arguments) const userPromises = [] const nextBatch = batchIterator(collection, this.opts.batchSize) const nextUnlessEmpty = batch => { if (batch.length === 0) return userPromises.push(callback(batch, userPromises.length)) return nextBatch().then(nextUnlessEmpty) } return nextBatch() .then(nextUnlessEmpty) .then(() => Promise.all(userPromises)) .then(() => userPromises.length) } } // Does not conform to JS iterator requirements function batchIterator(collection, batchSize) { const it = collection.clone() return () => { const batchPromise = it.clone().limit(batchSize).toArray() it.offset(batchSize) return batchPromise } } function assertValidOptions(opts) { const batchSize = opts && opts.batchSize if (!(batchSize && Number.isInteger(batchSize) && batchSize > 0)) { throw new Error('Mandatory option "batchSize" must be a positive integer') } if ('limit' in opts && !(Number.isInteger(opts.limit) && opts.limit >= 0)) { throw new Error('Option "limit" must be a non-negative integer') } } function assertValidMethodArgs(collection, callback) { if (arguments.length < 2) { throw new Error('Arguments "collection" and "callback" are mandatory') } if (!isCollectionInstance(collection)) { throw new Error('"collection" must be of type Collection') } if (!(typeof callback === 'function')) { throw new TypeError('"callback" must be a function') } } // We would need the Dexie instance that created the collection to get the // Collection constructor and do some proper type checking. // So for now we resort to duck typing function isCollectionInstance(obj) { if (!obj) return false return ['clone', 'offset', 'limit', 'toArray'].every( name => typeof obj[name] === 'function' ) }
// Router.js define([ 'jquery', 'backbone', 'views/MainView', 'views/IndexView' ], function($, Backbone, MainView, IndexView) { // fire up the router var Router = Backbone.Router.extend({ initialize: function() { Backbone.history.start(); // Tells Backbone to start watching for hashchange events }, // All of your Backbone Routes (add more) routes: { '': 'index' // When there is no hash on the url, the home method is called }, index: function() { new IndexView(); // Instantiates a new view which will render the header text to the page } }); // Render the Main view new MainView(); // Returns the Router return Router; } );
/*global define, window*/ /*jslint nomen: true*/ /*jshint browser:true, devel:true*/ define(function (require) { 'use strict'; var layout, pageRenderedCbPool, document, console, $ = require('jquery'), _ = require('underscore'), __ = require('orotranslation/js/translator'), scrollspy = require('oroui/js/scrollspy'), mediator = require('oroui/js/mediator'), tools = require('oroui/js/tools'); require('bootstrap'); require('jquery-ui'); require('jquery.uniform'); require('oroui/js/responsive-jquery-widget'); document = window.document; console = window.console; pageRenderedCbPool = []; layout = { /** * Default padding to keep when calculate available height for fullscreen layout */ PAGE_BOTTOM_PADDING: 10, /** * Height of header on mobile devices */ MOBILE_HEADER_HEIGHT: 54, /** * Height of header on mobile devices */ MOBILE_POPUP_HEADER_HEIGHT: 44, /** * Minimal height for fullscreen layout */ minimalHeightForFullScreenLayout: 300, /** * Keeps calculated devToolbarHeight. Please use getDevToolbarHeight() to retrieve it */ devToolbarHeight: undefined, /** * @returns {number} development toolbar height in dev mode, 0 in production mode */ getDevToolbarHeight: function () { if (!this.devToolbarHeight) { var devToolbarComposition = mediator.execute('composer:retrieve', 'debugToolbar', true); if (devToolbarComposition && devToolbarComposition.view) { this.devToolbarHeight = devToolbarComposition.view.$el.height(); } else { this.devToolbarHeight = 0; } } return this.devToolbarHeight; }, /** * Initializes * - form widgets (uniform) * - tooltips * - popovers * - scrollspy * * @param {string|HTMLElement|jQuery.Element} container */ init: function (container) { var $container; $container = $(container); this.styleForm($container); scrollspy.init($container); $container.find('[data-toggle="tooltip"]').tooltip(); this.initPopover($container.find('label')); }, initPopover: function (container) { var $items = container.find('[data-toggle="popover"]').filter(function () { // skip already initialized popovers return !$(this).data('popover'); }); $items.not('[data-close="false"]').each(function (i, el) { //append close link var content = $(el).data('content'); content += '<i class="icon-remove popover-close"></i>'; $(el).data('content', content); }); $items.popover({ animation: false, delay: { show: 0, hide: 0 }, html: true, container: false, trigger: 'manual' }).on('click.popover', function (e) { $(this).popover('toggle'); e.preventDefault(); }); $('body') .on('click.popover-hide', function (e) { var $target = $(e.target); $items.each(function () { //the 'is' for buttons that trigger popups //the 'has' for icons within a button that triggers a popup if ( !$(this).is($target) && $(this).has($target).length === 0 && ($('.popover').has($target).length === 0 || $target.hasClass('popover-close')) ) { $(this).popover('hide'); } }); }).on('click.popover-prevent', '.popover', function (e) { if (e.target.tagName.toLowerCase() !== 'a') { e.preventDefault(); } }).on('focus.popover-hide', 'select, input, textarea', function () { $items.popover('hide'); }); mediator.once('page:request', function () { $('body').off('.popover-hide .popover-prevent'); }); }, hideProgressBar: function () { var $bar = $('#progressbar'); if ($bar.is(':visible')) { $bar.hide(); $('#page').show(); } }, /** * Bind forms widget and plugins to elements * * @param {jQuery=} $container */ styleForm: function ($container) { var $elements; if ($.isPlainObject($.uniform)) { // bind uniform plugin to select elements $elements = $container.find('select:not(.no-uniform,.select2)'); $elements.uniform(); if ($elements.is('.error:not([multiple])')) { $elements.removeClass('error').closest('.selector').addClass('error'); } // bind uniform plugin to input:file elements $elements = $container.find('input:file'); $elements.uniform({ fileDefaultHtml: __('Please select a file...'), fileButtonHtml: __('Choose File') }); if ($elements.is('.error')) { $elements.removeClass('error').closest('.uploader').addClass('error'); } } }, /** * Removes forms widget and plugins from elements * * @param {jQuery=} $container */ unstyleForm: function ($container) { var $elements; // removes uniform plugin from elements if ($.isPlainObject($.uniform)) { $elements = $container.find('select:not(.no-uniform,.select2)'); $.uniform.restore($elements); } // removes select2 plugin from elements $container.find('.select2-container').each(function () { var $this = $(this); if ($this.data('select2')) { $this.select2('destroy'); } }); }, onPageRendered: function (cb) { if (document.pageReady) { _.defer(cb); } else { pageRenderedCbPool.push(cb); } }, pageRendering: function () { document.pageReady = false; pageRenderedCbPool = []; }, pageRendered: function () { document.pageReady = true; _.each(pageRenderedCbPool, function (cb) { try { cb(); } catch (ex) { if (console && (typeof console.log === 'function')) { console.log(ex); } } }); pageRenderedCbPool = []; }, /** * Update modificators of responsive elements according to their containers size */ updateResponsiveLayout: function() { _.defer(function() { $(document).responsive(); }); }, /** * Returns available height for element if page will be transformed to fullscreen mode * * @param $mainEl * @returns {number} */ getAvailableHeight: function ($mainEl) { var $parents = $mainEl.parents(), documentHeight = $(document).height(), heightDiff = documentHeight - $mainEl[0].getBoundingClientRect().top; $parents.each(function () { heightDiff += this.scrollTop; }); return heightDiff - this.getDevToolbarHeight() - this.PAGE_BOTTOM_PADDING; }, /** * Returns name of preferred layout for $mainEl * * @param $mainEl * @returns {string} */ getPreferredLayout: function ($mainEl) { if (!this.hasHorizontalScroll() && !tools.isMobile() && this.getAvailableHeight($mainEl) > this.minimalHeightForFullScreenLayout) { return 'fullscreen'; } else { return 'scroll'; } }, /** * Disables ability to scroll of $mainEl's scrollable parents * * @param $mainEl * @returns {string} */ disablePageScroll: function ($mainEl) { var $scrollableParents = $mainEl.parents(); $scrollableParents.scrollTop(0); $scrollableParents.addClass('disable-scroll'); }, /** * Enables ability to scroll of $mainEl's scrollable parents * * @param $mainEl * @returns {string} */ enablePageScroll: function ($mainEl) { $mainEl.parents().removeClass('disable-scroll'); }, /** * Returns true if page has horizontal scroll * @returns {boolean} */ hasHorizontalScroll: function () { return $('body').outerWidth() > $(window).width(); }, /** * Try to calculate the scrollbar width for your browser/os * @return {Number} */ scrollbarWidth: function () { if (!this._scrollbarWidth) { var $div = $( //borrowed from anti-scroll '<div style="width:50px;height:50px;overflow-y:scroll;' + 'position:absolute;top:-200px;left:-200px;"><div style="height:100px;width:100%">' + '</div>' ); $('body').append($div); var w1 = $div.innerWidth(); var w2 = $('div', $div).innerWidth(); $div.remove(); this._scrollbarWidth = w1 - w2; } return this._scrollbarWidth; } }; return layout; });
import Mat3 from "../math/Mat3"; export default class MStack { constructor() { this.mats = []; this.size = 0; for (let i = 0; i < 20; i++) this.mats.push(Mat3.create([0, 0, 0, 0, 0, 0, 0, 0, 0])); } set(m, i) { if (i === 0) Mat3.set(m, this.mats[0]); else Mat3.multiply(this.mats[i - 1], m, this.mats[i]); this.size = Math.max(this.size, i + 1); } push(m) { if (this.size === 0) Mat3.set(m, this.mats[0]); else Mat3.multiply(this.mats[this.size - 1], m, this.mats[this.size]); this.size++; } pop() { if (this.size > 0) this.size--; } top() { return this.mats[this.size - 1]; } }
import styles from './styles'; import combineStyles from '../internal/combine-styles'; import colors from '../settings/colors'; const root = overrideStyle => combineStyles(styles.root, overrideStyle); const dot = (color = colors.theme, inverted, index, overrideStyle) => { let style = combineStyles(styles.dot, { backgroundColor: color }); if (index === 1) { style = combineStyles(style, { animationDelay: '.33s' }); } if (index === 2) { style = combineStyles(style, { animationDelay: '.66s' }); } if (inverted) { return combineStyles(combineStyles(style, styles.inverted), overrideStyle); } return combineStyles(style, overrideStyle); }; export default { root, dot };
var EJSON = require('./ejson') var _ = require('meteor/underscore') // Based on json2.js from https://github.com/douglascrockford/JSON-js // // json2.js // 2012-10-08 // // Public Domain. // // NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. function quote(string) { return JSON.stringify(string); } var str = function (key, holder, singleIndent, outerIndent, canonical) { // Produce a string from holder[key]. var i; // The loop counter. var k; // The member key. var v; // The member value. var length; var innerIndent = outerIndent; var partial; var value = holder[key]; // What happens next depends on the value's type. switch (typeof value) { case 'string': return quote(value); case 'number': // JSON numbers must be finite. Encode non-finite numbers as null. return isFinite(value) ? String(value) : 'null'; case 'boolean': return String(value); // If the type is 'object', we might be dealing with an object or an array or // null. case 'object': // Due to a specification blunder in ECMAScript, typeof null is 'object', // so watch out for that case. if (!value) { return 'null'; } // Make an array to hold the partial results of stringifying this object value. innerIndent = outerIndent + singleIndent; partial = []; // Is the value an array? if (_.isArray(value) || _.isArguments(value)) { // The value is an array. Stringify every element. Use null as a placeholder // for non-JSON values. length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value, singleIndent, innerIndent, canonical) || 'null'; } // Join all of the elements together, separated with commas, and wrap them in // brackets. if (partial.length === 0) { v = '[]'; } else if (innerIndent) { v = '[\n' + innerIndent + partial.join(',\n' + innerIndent) + '\n' + outerIndent + ']'; } else { v = '[' + partial.join(',') + ']'; } return v; } // Iterate through all of the keys in the object. var keys = _.keys(value); if (canonical) keys = keys.sort(); _.each(keys, function (k) { v = str(k, value, singleIndent, innerIndent, canonical); if (v) { partial.push(quote(k) + (innerIndent ? ': ' : ':') + v); } }); // Join all of the member texts together, separated with commas, // and wrap them in braces. if (partial.length === 0) { v = '{}'; } else if (innerIndent) { v = '{\n' + innerIndent + partial.join(',\n' + innerIndent) + '\n' + outerIndent + '}'; } else { v = '{' + partial.join(',') + '}'; } return v; } } // If the JSON object does not yet have a stringify method, give it one. EJSON._canonicalStringify = function (value, options) { // Make a fake root object containing our value under the key of ''. // Return the result of stringifying the value. options = _.extend({ indent: "", canonical: false }, options); if (options.indent === true) { options.indent = " "; } else if (typeof options.indent === 'number') { var newIndent = ""; for (var i = 0; i < options.indent; i++) { newIndent += ' '; } options.indent = newIndent; } return str('', {'': value}, options.indent, "", options.canonical); };
var isDateValid = require('date-fns/isValid'); var parseISO = require('date-fns/parseISO'); function leapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } function isValidDate(inDate) { if (inDate instanceof Date) { return !isNaN(inDate); } // reformat if supplied as mm.dd.yyyy (period delimiter) if (typeof inDate === 'string') { var pos = inDate.indexOf('.'); if (pos > 0 && pos <= 6) { inDate = inDate.replace(/\./g, '-'); } if (inDate.length === 10) { return isDateValid(parseISO(inDate)); } } var testDate = new Date(inDate); var yr = testDate.getFullYear(); var mo = testDate.getMonth(); var day = testDate.getDate(); var daysInMonth = [31, leapYear(yr) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; if (yr < 1000) { return false; } if (isNaN(mo)) { return false; } if (mo + 1 > 12) { return false; } if (isNaN(day)) { return false; } if (day > daysInMonth[mo]) { return false; } return true; } var rules = { required: function(val) { var str; if (val === undefined || val === null) { return false; } str = String(val).replace(/\s/g, ''); return str.length > 0 ? true : false; }, required_if: function(val, req, attribute) { req = this.getParameters(); if (this.validator._objectPath(this.validator.input, req[0]) === req[1]) { return this.validator.getRule('required').validate(val); } return true; }, required_unless: function(val, req, attribute) { req = this.getParameters(); if (this.validator._objectPath(this.validator.input, req[0]) !== req[1]) { return this.validator.getRule('required').validate(val); } return true; }, required_with: function(val, req, attribute) { if (this.validator._objectPath(this.validator.input, req)) { return this.validator.getRule('required').validate(val); } return true; }, required_with_all: function(val, req, attribute) { req = this.getParameters(); for (var i = 0; i < req.length; i++) { if (!this.validator._objectPath(this.validator.input, req[i])) { return true; } } return this.validator.getRule('required').validate(val); }, required_without: function(val, req, attribute) { if (this.validator._objectPath(this.validator.input, req)) { return true; } return this.validator.getRule('required').validate(val); }, required_without_all: function(val, req, attribute) { req = this.getParameters(); for (var i = 0; i < req.length; i++) { if (this.validator._objectPath(this.validator.input, req[i])) { return true; } } return this.validator.getRule('required').validate(val); }, boolean: function(val) { return ( val === true || val === false || val === 0 || val === 1 || val === '0' || val === '1' || val === 'true' || val === 'false' ); }, // compares the size of strings // with numbers, compares the value size: function(val, req, attribute) { if (val) { req = parseFloat(req); var size = this.getSize(); return size === req; } return true; }, string: function(val, req, attribute) { return typeof val === 'string'; }, sometimes: function(val) { return true; }, /** * Compares the size of strings or the value of numbers if there is a truthy value */ min: function(val, req, attribute) { var size = this.getSize(); return size >= req; }, /** * Compares the size of strings or the value of numbers if there is a truthy value */ max: function(val, req, attribute) { var size = this.getSize(); return size <= req; }, between: function(val, req, attribute) { req = this.getParameters(); var size = this.getSize(); var min = parseFloat(req[0], 10); var max = parseFloat(req[1], 10); return size >= min && size <= max; }, email: function(val) { var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(val); }, numeric: function(val) { var num; num = Number(val); // tries to convert value to a number. useful if value is coming from form element if (typeof num === 'number' && !isNaN(num) && typeof val !== 'boolean') { return true; } else { return false; } }, array: function(val) { return val instanceof Array; }, url: function(url) { return /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_\+.~#?&/=]*)/i.test(url); }, alpha: function(val) { return /^[a-zA-Z]+$/.test(val); }, alpha_dash: function(val) { return /^[a-zA-Z0-9_\-]+$/.test(val); }, alpha_num: function(val) { return /^[a-zA-Z0-9]+$/.test(val); }, same: function(val, req) { var val1 = this.validator._flattenObject(this.validator.input)[req]; var val2 = val; if (val1 === val2) { return true; } return false; }, different: function(val, req) { var val1 = this.validator._flattenObject(this.validator.input)[req]; var val2 = val; if (val1 !== val2) { return true; } return false; }, in: function(val, req) { var list, i; if (val) { list = this.getParameters(); } if (val && !(val instanceof Array)) { var localValue = val; for (i = 0; i < list.length; i++) { if (typeof list[i] === 'string') { localValue = String(val); } if (localValue === list[i]) { return true; } } return false; } if (val && val instanceof Array) { for (i = 0; i < val.length; i++) { if (list.indexOf(val[i]) < 0) { return false; } } } return true; }, not_in: function(val, req) { var list = this.getParameters(); var len = list.length; var returnVal = true; for (var i = 0; i < len; i++) { var localValue = val; if (typeof list[i] === 'string') { localValue = String(val); } if (localValue === list[i]) { returnVal = false; break; } } return returnVal; }, accepted: function(val) { if (val === 'on' || val === 'yes' || val === 1 || val === '1' || val === true) { return true; } return false; }, confirmed: function(val, req, key) { var confirmedKey = key + '_confirmation'; if (this.validator.input[confirmedKey] === val) { return true; } return false; }, integer: function(val) { return String(parseInt(val, 10)) === String(val); }, digits: function(val, req) { var numericRule = this.validator.getRule('numeric'); if (numericRule.validate(val) && String(val).length === parseInt(req)) { return true; } return false; }, digits_between: function(val) { var numericRule = this.validator.getRule('numeric'); var req = this.getParameters(); var valueDigitsCount = String(val).length; var min = parseFloat(req[0], 10); var max = parseFloat(req[1], 10); if (numericRule.validate(val) && valueDigitsCount >= min && valueDigitsCount <= max) { return true; } return false; }, regex: function(val, req) { var mod = /[g|i|m]{1,3}$/; var flag = req.match(mod); flag = flag ? flag[0] : ''; req = req.replace(mod, '').slice(1, -1); req = new RegExp(req, flag); return !!req.test(val); }, date: function(val, format) { return isValidDate(val); }, present: function(val) { return typeof val !== 'undefined'; }, after: function(val, req) { var val1 = this.validator.input[req]; var val2 = val; if (!isValidDate(val1)) { return false; } if (!isValidDate(val2)) { return false; } if (new Date(val1).getTime() < new Date(val2).getTime()) { return true; } return false; }, after_or_equal: function(val, req) { var val1 = this.validator.input[req]; var val2 = val; if (!isValidDate(val1)) { return false; } if (!isValidDate(val2)) { return false; } if (new Date(val1).getTime() <= new Date(val2).getTime()) { return true; } return false; }, before: function(val, req) { var val1 = this.validator.input[req]; var val2 = val; if (!isValidDate(val1)) { return false; } if (!isValidDate(val2)) { return false; } if (new Date(val1).getTime() > new Date(val2).getTime()) { return true; } return false; }, before_or_equal: function(val, req) { var val1 = this.validator.input[req]; var val2 = val; if (!isValidDate(val1)) { return false; } if (!isValidDate(val2)) { return false; } if (new Date(val1).getTime() >= new Date(val2).getTime()) { return true; } return false; }, hex: function(val) { return /^[0-9a-f]+$/i.test(val); } }; var missedRuleValidator = function() { throw new Error('Validator `' + this.name + '` is not defined!'); }; var missedRuleMessage; function Rule(name, fn, async) { this.name = name; this.fn = fn; this.passes = null; this._customMessage = undefined; this.async = async; } Rule.prototype = { /** * Validate rule * * @param {mixed} inputValue * @param {mixed} ruleValue * @param {string} attribute * @param {function} callback * @return {boolean|undefined} */ validate: function(inputValue, ruleValue, attribute, callback) { var _this = this; this._setValidatingData(attribute, inputValue, ruleValue); if (typeof callback === 'function') { this.callback = callback; var handleResponse = function(passes, message) { _this.response(passes, message); }; if (this.async) { return this._apply(inputValue, ruleValue, attribute, handleResponse); } else { return handleResponse(this._apply(inputValue, ruleValue, attribute)); } } return this._apply(inputValue, ruleValue, attribute); }, /** * Apply validation function * * @param {mixed} inputValue * @param {mixed} ruleValue * @param {string} attribute * @param {function} callback * @return {boolean|undefined} */ _apply: function(inputValue, ruleValue, attribute, callback) { var fn = this.isMissed() ? missedRuleValidator : this.fn; return fn.apply(this, [inputValue, ruleValue, attribute, callback]); }, /** * Set validating data * * @param {string} attribute * @param {mixed} inputValue * @param {mixed} ruleValue * @return {void} */ _setValidatingData: function(attribute, inputValue, ruleValue) { this.attribute = attribute; this.inputValue = inputValue; this.ruleValue = ruleValue; }, /** * Get parameters * * @return {array} */ getParameters: function() { var value = []; if (typeof this.ruleValue === 'string') { value = this.ruleValue.split(','); } if (typeof this.ruleValue === 'number') { value.push(this.ruleValue); } if (this.ruleValue instanceof Array) { value = this.ruleValue; } return value; }, /** * Get true size of value * * @return {integer|float} */ getSize: function() { var value = this.inputValue; if (value instanceof Array) { return value.length; } if (typeof value === 'number') { return value; } if (this.validator._hasNumericRule(this.attribute)) { return parseFloat(value, 10); } return value.length; }, /** * Get the type of value being checked; numeric or string. * * @return {string} */ _getValueType: function() { if (typeof this.inputValue === 'number' || this.validator._hasNumericRule(this.attribute)) { return 'numeric'; } return 'string'; }, /** * Set the async callback response * * @param {boolean|undefined} passes Whether validation passed * @param {string|undefined} message Custom error message * @return {void} */ response: function(passes, message) { this.passes = passes === undefined || passes === true; this._customMessage = message; this.callback(this.passes, message); }, /** * Set validator instance * * @param {Validator} validator * @return {void} */ setValidator: function(validator) { this.validator = validator; }, /** * Check if rule is missed * * @return {boolean} */ isMissed: function() { return typeof this.fn !== 'function'; }, get customMessage() { return this.isMissed() ? missedRuleMessage : this._customMessage; } }; var manager = { /** * List of async rule names * * @type {Array} */ asyncRules: [], /** * Implicit rules (rules to always validate) * * @type {Array} */ implicitRules: [ 'required', 'required_if', 'required_unless', 'required_with', 'required_with_all', 'required_without', 'required_without_all', 'accepted', 'present' ], /** * Get rule by name * * @param {string} name * @param {Validator} * @return {Rule} */ make: function(name, validator) { var async = this.isAsync(name); var rule = new Rule(name, rules[name], async); rule.setValidator(validator); return rule; }, /** * Determine if given rule is async * * @param {string} name * @return {boolean} */ isAsync: function(name) { for (var i = 0, len = this.asyncRules.length; i < len; i++) { if (this.asyncRules[i] === name) { return true; } } return false; }, /** * Determine if rule is implicit (should always validate) * * @param {string} name * @return {boolean} */ isImplicit: function(name) { return this.implicitRules.indexOf(name) > -1; }, /** * Register new rule * * @param {string} name * @param {function} fn * @return {void} */ register: function(name, fn) { rules[name] = fn; }, /** * Register new implicit rule * * @param {string} name * @param {function} fn * @return {void} */ registerImplicit: function(name, fn) { this.register(name, fn); this.implicitRules.push(name); }, /** * Register async rule * * @param {string} name * @param {function} fn * @return {void} */ registerAsync: function(name, fn) { this.register(name, fn); this.asyncRules.push(name); }, /** * Register implicit async rule * * @param {string} name * @param {function} fn * @return {void} */ registerAsyncImplicit: function(name, fn) { this.registerImplicit(name, fn); this.asyncRules.push(name); }, registerMissedRuleValidator: function(fn, message) { missedRuleValidator = fn; missedRuleMessage = message; } }; module.exports = manager;
const assert = require('assert'); const keyUppercase = require('../lib/key-facsimile').uppercase; describe('Key Uppercase =>', () => { it('Uppercases any given key', () => { var result = keyUppercase({ SOME_NAME: null, ANOTHER_NAME: null, lowercase: null, 'dash-full-support': null }); assert.deepEqual(result, { SOME_NAME: 'SOME_NAME', ANOTHER_NAME: 'ANOTHER_NAME', lowercase: 'LOWERCASE', 'dash-full-support': 'DASH_FULL_SUPPORT' }); }) });
var showModule = angular.module('show', ['core', 'song']);
/*! * jQuery meanMenu v2.0.8 * @Copyright (C) 2012-2014 Chris Wharton @ MeanThemes (https://github.com/meanthemes/meanMenu) * */ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT * HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR * FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE * OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.COPYRIGHT HOLDERS WILL NOT * BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL * DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://gnu.org/licenses/>. * * Find more information at http://www.meanthemes.com/plugins/meanmenu/ * */ (function ($) { "use strict"; $.fn.meanmenu = function (options) { var defaults = { meanMenuTarget: jQuery(this), // Target the current HTML markup you wish to replace meanMenuContainer: '.mobile-menu', // Choose where meanmenu will be placed within the HTML meanMenuClose: "X", // single character you want to represent the close menu button meanMenuCloseSize: "18px", // set font size of close button meanMenuOpen: "<span /><span /><span />", // text/markup you want when menu is closed meanRevealPosition: "right", // left right or center positions meanRevealPositionDistance: "0", // Tweak the position of the menu meanRevealColour: "", // override CSS colours for the reveal background meanScreenWidth: "991", // set the screen width you want meanmenu to kick in at meanNavPush: "", // set a height here in px, em or % if you want to budge your layout now the navigation is missing. meanShowChildren: true, // true to show children in the menu, false to hide them meanExpandableChildren: true, // true to allow expand/collapse children meanExpand: "+", // single character you want to represent the expand for ULs meanContract: "-", // single character you want to represent the contract for ULs meanRemoveAttrs: false, // true to remove classes and IDs, false to keep them onePage: false, // set to true for one page sites meanDisplay: "block", // override display method for table cell based layouts e.g. table-cell removeElements: "" // set to hide page elements }; options = $.extend(defaults, options); // get browser width var currentWidth = window.innerWidth || document.documentElement.clientWidth; return this.each(function () { var meanMenu = options.meanMenuTarget; var meanContainer = options.meanMenuContainer; var meanMenuClose = options.meanMenuClose; var meanMenuCloseSize = options.meanMenuCloseSize; var meanMenuOpen = options.meanMenuOpen; var meanRevealPosition = options.meanRevealPosition; var meanRevealPositionDistance = options.meanRevealPositionDistance; var meanRevealColour = options.meanRevealColour; var meanScreenWidth = options.meanScreenWidth; var meanNavPush = options.meanNavPush; var meanRevealClass = ".meanmenu-reveal"; var meanShowChildren = options.meanShowChildren; var meanExpandableChildren = options.meanExpandableChildren; var meanExpand = options.meanExpand; var meanContract = options.meanContract; var meanRemoveAttrs = options.meanRemoveAttrs; var onePage = options.onePage; var meanDisplay = options.meanDisplay; var removeElements = options.removeElements; //detect known mobile/tablet usage var isMobile = false; if ( (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i)) || (navigator.userAgent.match(/Blackberry/i)) || (navigator.userAgent.match(/Windows Phone/i)) ) { isMobile = true; } if ( (navigator.userAgent.match(/MSIE 8/i)) || (navigator.userAgent.match(/MSIE 7/i)) ) { // add scrollbar for IE7 & 8 to stop breaking resize function on small content sites jQuery('html').css("overflow-y" , "scroll"); } var meanRevealPos = ""; var meanCentered = function() { if (meanRevealPosition === "center") { var newWidth = window.innerWidth || document.documentElement.clientWidth; var meanCenter = ( (newWidth/2)-22 )+"px"; meanRevealPos = "left:" + meanCenter + ";right:auto;"; if (!isMobile) { jQuery('.meanmenu-reveal').css("left",meanCenter); } else { jQuery('.meanmenu-reveal').animate({ left: meanCenter }); } } }; var menuOn = false; var meanMenuExist = false; if (meanRevealPosition === "right") { meanRevealPos = "right:" + meanRevealPositionDistance + ";left:auto;"; } if (meanRevealPosition === "left") { meanRevealPos = "left:" + meanRevealPositionDistance + ";right:auto;"; } // run center function meanCentered(); // set all styles for mean-reveal var $navreveal = ""; var meanInner = function() { // get last class name if (jQuery($navreveal).is(".meanmenu-reveal.meanclose")) { $navreveal.html(meanMenuClose); } else { $navreveal.html(meanMenuOpen); } }; // re-instate original nav (and call this on window.width functions) var meanOriginal = function() { jQuery('.mean-bar,.mean-push').remove(); jQuery(meanContainer).removeClass("mean-container"); jQuery(meanMenu).css('display', meanDisplay); menuOn = false; meanMenuExist = false; jQuery(removeElements).removeClass('mean-remove'); }; // navigation reveal var showMeanMenu = function() { var meanStyles = "background:"+meanRevealColour+";color:"+meanRevealColour+";"+meanRevealPos; if (currentWidth <= meanScreenWidth) { jQuery(removeElements).addClass('mean-remove'); meanMenuExist = true; // add class to body so we don't need to worry about media queries here, all CSS is wrapped in '.mean-container' jQuery(meanContainer).addClass("mean-container"); jQuery('.mean-container').prepend('<div class="mean-bar"><a href="#nav" class="meanmenu-reveal" style="'+meanStyles+'">Show Navigation</a><nav class="mean-nav"></nav></div>'); //push meanMenu navigation into .mean-nav var meanMenuContents = jQuery(meanMenu).html(); jQuery('.mean-nav').html(meanMenuContents); // remove all classes from EVERYTHING inside meanmenu nav if(meanRemoveAttrs) { jQuery('nav.mean-nav ul, nav.mean-nav ul *').each(function() { // First check if this has mean-remove class if (jQuery(this).is('.mean-remove')) { jQuery(this).attr('class', 'mean-remove'); } else { jQuery(this).removeAttr("class"); } jQuery(this).removeAttr("id"); }); } // push in a holder div (this can be used if removal of nav is causing layout issues) jQuery(meanMenu).before('<div class="mean-push" />'); jQuery('.mean-push').css("margin-top",meanNavPush); // hide current navigation and reveal mean nav link jQuery(meanMenu).hide(); jQuery(".meanmenu-reveal").show(); // turn 'X' on or off jQuery(meanRevealClass).html(meanMenuOpen); $navreveal = jQuery(meanRevealClass); //hide mean-nav ul jQuery('.mean-nav ul').hide(); // hide sub nav if(meanShowChildren) { // allow expandable sub nav(s) if(meanExpandableChildren){ jQuery('.mean-nav ul ul').each(function() { if(jQuery(this).children().length){ jQuery(this,'li:first').parent().append('<a class="mean-expand" href="#" style="font-size: '+ meanMenuCloseSize +'">'+ meanExpand +'</a>'); } }); jQuery('.mean-expand').on("click",function(e){ e.preventDefault(); if (jQuery(this).hasClass("mean-clicked")) { jQuery(this).text(meanExpand); jQuery(this).prev('ul').slideUp(300, function(){}); } else { jQuery(this).text(meanContract); jQuery(this).prev('ul').slideDown(300, function(){}); } jQuery(this).toggleClass("mean-clicked"); }); } else { jQuery('.mean-nav ul ul').show(); } } else { jQuery('.mean-nav ul ul').hide(); } // add last class to tidy up borders jQuery('.mean-nav ul li').last().addClass('mean-last'); $navreveal.removeClass("meanclose"); jQuery($navreveal).click(function(e){ e.preventDefault(); if( menuOn === false ) { $navreveal.css("text-align", "center"); $navreveal.css("text-indent", "0"); $navreveal.css("font-size", meanMenuCloseSize); jQuery('.mean-nav ul:first').slideDown(); menuOn = true; } else { jQuery('.mean-nav ul:first').slideUp(); menuOn = false; } $navreveal.toggleClass("meanclose"); meanInner(); jQuery(removeElements).addClass('mean-remove'); }); // for one page websites, reset all variables... if ( onePage ) { jQuery('.mean-nav ul > li > a:first-child').on( "click" , function () { jQuery('.mean-nav ul:first').slideUp(); menuOn = false; jQuery($navreveal).toggleClass("meanclose").html(meanMenuOpen); }); } } else { meanOriginal(); } }; if (!isMobile) { // reset menu on resize above meanScreenWidth jQuery(window).resize(function () { currentWidth = window.innerWidth || document.documentElement.clientWidth; if (currentWidth > meanScreenWidth) { meanOriginal(); } else { meanOriginal(); } if (currentWidth <= meanScreenWidth) { showMeanMenu(); meanCentered(); } else { meanOriginal(); } }); } jQuery(window).resize(function () { // get browser width currentWidth = window.innerWidth || document.documentElement.clientWidth; if (!isMobile) { meanOriginal(); if (currentWidth <= meanScreenWidth) { showMeanMenu(); meanCentered(); } } else { meanCentered(); if (currentWidth <= meanScreenWidth) { if (meanMenuExist === false) { showMeanMenu(); } } else { meanOriginal(); } } }); // run main menuMenu function on load showMeanMenu(); }); }; })(jQuery);
module.exports = function (mongoose) { var roomSchema = mongoose.Schema({ name: String, connected: { type: [{ id: String, number: Number }], default: [] } }, { timestamps: true }); return roomSchema; }
import Plugin from "./../Plugin"; import Auth from "./../helpers/Auth"; export default class AuthPlugin extends Plugin { static get plugin() { return { name: "Auth", description: "Plugin to handle authentication", help: "", visibility: Plugin.Visibility.VISIBLE, type: Plugin.Type.SPECIAL }; } onCommand({message, command, args}, reply) { const author = message.from.id; const chat = message.chat.id; const targetId = args[0]; switch (command) { case "modlist": return reply({ type: "text", text: JSON.stringify(Auth.getMods(chat)) }); case "adminlist": return reply({ type: "text", text: JSON.stringify(Auth.getAdmins(chat)) }); // The code from here on is admin-only. case "addmod": if (!Auth.isAdmin(author, chat)) return; Auth.addMod(targetId, chat); return reply({ type: "text", text: "Done." }); case "addadmin": if (!Auth.isAdmin(author, chat)) return; Auth.addAdmin(targetId, chat); return reply({ type: "text", text: "Done." }); case "delmod": if (!Auth.isAdmin(author, chat)) return; Auth.removeMod(targetId, chat); return reply({ type: "text", text: "Done." }); case "deladmin": if (!Auth.isAdmin(author, chat)) return; Auth.removeAdmin(targetId, chat); return reply({ type: "text", text: "Done." }); default: return; } } }
import angular from 'angular'; import moment from 'moment'; angular .module('sfinapp.core.dateUtilSrv', [ ]) .provider('dateUtilSrv', dateUtilSrvProvider); function dateUtilSrvProvider() { var dateRegex = /^(\d{4})-(\d{2})-(\d{2})/; var dateFormat = 'YYYY-MM-DD'; this.$get = () => { return new DateUtilSrv(); }; function DateUtilSrv() { return { formatDate: formatDate, formatDates: formatDates, parseDate: parseDate, parseDates: parseDates }; function formatDate(date) { return moment(date).format(dateFormat); } function formatDates(input) { // Ignore things that aren't objects. if (typeof input !== 'object') { return; } for (var key in input) { if (!input.hasOwnProperty(key)) { continue; } var value = input[key]; if (angular.isDate(value)) { input[key] = formatDate(value); } else if (typeof value === 'object') { formatDates(value); } } return input; } function parseDate(str) { return moment(str, dateFormat).toDate(); } function parseDates(input) { // Ignore things that aren't objects. if (typeof input !== 'object') { return; } for (var key in input) { if (!input.hasOwnProperty(key)) { continue; } var value = input[key]; var match; // Check for string properties which look like dates. if (typeof value === 'string' && (match = value.match(dateRegex))) { var parsed = parseDate(match[0]); if (parsed) { input[key] = parsed; } } else if (typeof value === 'object') { parseDates(value); } } return input; } } }
/** * Created by Mikk on 4.07.2015. */ "use strict"; class BaseModule { /** * Explode a string with a limit * @param {string} input * @param {string} delimiter * @param {number} [limit] * @returns {string[]} */ static explode(input, delimiter, limit) { var s = input.split(delimiter); if (limit > 0) { if (limit >= s.length) { return s; } return s.slice(0, limit - 1).concat([s.slice(limit - 1).join(delimiter)]); } return s; } /** * Pad a string with zeroes so it has at least a length of two * @param {string} input * @returns {string} */ static pad(input) { input = input.toString(); if (input.length < 2) { input = "0" + input; } return input; } } module.exports = BaseModule;
import passport from 'passport' export default (options = { public: false, scope: '' }) => { if (options.public) return (req, res, next) => next() return [ passport.authenticate('bearer', { session: false }), (req, res, next) => { const scopes = req.authInfo.scope && req.authInfo.scope.split(',') const hasScope = scopes.includes(options.scope) if (options.scope === '*') return next() if (hasScope) return next() res.status(401).json({ message: 'Unauthorized' }) } ] }
/** * 带标题展示组件 */ import React, { PropTypes } from 'react'; import { StyleSheet, View, Text, } from 'react-native'; const styles = StyleSheet.create({ all: { marginBottom: 10, }, title: { paddingVertical: 10, }, titleText: { fontSize: 10, }, }); function Article(props) { return ( <View style={[styles.all, props.style]}> <View style={[styles.title, props.titleStyle]}> <Text style={styles.titleText}> { props.title } </Text> </View> { props.children } </View> ); } Article.propTypes = { // 子元素 children: PropTypes.oneOfType([PropTypes.element, PropTypes.array]), // 自定义样式 style: View.propTypes.style, // 标题 title: PropTypes.string, // 标题样式 titleStyle: View.propTypes.style, }; Article.defaultProps = { children: null, style: null, title: '', titleStyle: null, }; export default Article;